diff --git a/Phase1/Samples/1.fl b/Phase1/Samples/1.fl index 135dffb..96783ac 100644 --- a/Phase1/Samples/1.fl +++ b/Phase1/Samples/1.fl @@ -2,6 +2,4 @@ def main() a << b; push(a, c); puts(a); -end - - +end \ No newline at end of file diff --git a/Phase1Template/.idea/misc.xml b/Phase1Template/.idea/misc.xml new file mode 100644 index 0000000..6f29fee --- /dev/null +++ b/Phase1Template/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Phase1Template/.idea/modules.xml b/Phase1Template/.idea/modules.xml new file mode 100644 index 0000000..10263b2 --- /dev/null +++ b/Phase1Template/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/Phase1Template/.idea/vcs.xml b/Phase1Template/.idea/vcs.xml new file mode 100644 index 0000000..6c0b863 --- /dev/null +++ b/Phase1Template/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Phase1Template/.idea/workspace.xml b/Phase1Template/.idea/workspace.xml new file mode 100644 index 0000000..927ac8b --- /dev/null +++ b/Phase1Template/.idea/workspace.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + 1713046498302 + + + + \ No newline at end of file diff --git a/Phase1Template/Phase1Template.iml b/Phase1Template/Phase1Template.iml new file mode 100644 index 0000000..726ae78 --- /dev/null +++ b/Phase1Template/Phase1Template.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Phase1Template/untitled/gen/main/grammer/FunctionCraft.interp b/Phase1Template/untitled/gen/main/grammer/FunctionCraft.interp index a687692..9942363 100644 --- a/Phase1Template/untitled/gen/main/grammer/FunctionCraft.interp +++ b/Phase1Template/untitled/gen/main/grammer/FunctionCraft.interp @@ -25,8 +25,8 @@ null '/' '==' '!=' -'is not' -'is' +'<=' +'>=' '>' '<' '&&' @@ -34,6 +34,7 @@ null '!' '++' '--' +' |' '|' '<<' 'true' @@ -41,6 +42,11 @@ null 'break' 'next' '->' +'+=' +'-=' +'*=' +'/=' +'%=' '=' '(' ')' @@ -87,8 +93,8 @@ MULT DIVIDE EQUAL NOT_EQUAL -IS_NOT -IS +LESS_EQUAL_THAN +GREATER_EQUAL_THAN GREATER_THAN LESS_THAN AND @@ -96,6 +102,7 @@ OR NOT INCREMENT DECREMENT +PATTERN_MATCHING_SEPARATOR SEPARATOR APPEND TRUE @@ -103,6 +110,11 @@ FALSE BREAK NEXT ARROW +PLUS_ASSIGN +MINUS_ASSIGN +MULT_ASSIGN +DIVIDE_ASSIGN +MOD_ASSIGN ASSIGN LPAR RPAR @@ -147,11 +159,11 @@ accessList statement body expression +eqaulityExpression relationalExpression additiveExpression multiplicativeExpression preUnaryExpression -appendExpression accessExpression otherExpression lambdaFunction @@ -162,4 +174,4 @@ functionPointer atn: -[4, 1, 59, 488, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 1, 0, 1, 0, 5, 0, 75, 8, 0, 10, 0, 12, 0, 78, 9, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 5, 2, 93, 8, 2, 10, 2, 12, 2, 96, 9, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 5, 2, 107, 8, 2, 10, 2, 12, 2, 110, 9, 2, 1, 2, 1, 2, 3, 2, 114, 8, 2, 3, 2, 116, 8, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 5, 3, 131, 8, 3, 10, 3, 12, 3, 134, 9, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 5, 5, 149, 8, 5, 10, 5, 12, 5, 152, 9, 5, 3, 5, 154, 8, 5, 1, 6, 1, 6, 1, 6, 3, 6, 159, 8, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 5, 7, 172, 8, 7, 10, 7, 12, 7, 175, 9, 7, 1, 7, 1, 7, 1, 7, 3, 7, 180, 8, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 189, 8, 8, 1, 8, 1, 8, 3, 8, 193, 8, 8, 5, 8, 195, 8, 8, 10, 8, 12, 8, 198, 9, 8, 5, 8, 200, 8, 8, 10, 8, 12, 8, 203, 9, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 238, 8, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 245, 8, 13, 1, 13, 5, 13, 248, 8, 13, 10, 13, 12, 13, 251, 9, 13, 1, 13, 3, 13, 254, 8, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 5, 15, 274, 8, 15, 10, 15, 12, 15, 277, 9, 15, 1, 15, 1, 15, 1, 15, 3, 15, 282, 8, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 5, 16, 295, 8, 16, 10, 16, 12, 16, 298, 9, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 3, 18, 314, 8, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 3, 19, 323, 8, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 3, 21, 342, 8, 21, 1, 22, 5, 22, 345, 8, 22, 10, 22, 12, 22, 348, 9, 22, 1, 22, 3, 22, 351, 8, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 3, 23, 358, 8, 23, 1, 23, 1, 23, 1, 23, 5, 23, 363, 8, 23, 10, 23, 12, 23, 366, 9, 23, 1, 24, 1, 24, 1, 24, 3, 24, 371, 8, 24, 1, 24, 1, 24, 1, 24, 5, 24, 376, 8, 24, 10, 24, 12, 24, 379, 9, 24, 1, 25, 1, 25, 1, 25, 3, 25, 384, 8, 25, 1, 25, 1, 25, 1, 25, 5, 25, 389, 8, 25, 10, 25, 12, 25, 392, 9, 25, 1, 26, 1, 26, 1, 26, 3, 26, 397, 8, 26, 1, 26, 1, 26, 1, 26, 5, 26, 402, 8, 26, 10, 26, 12, 26, 405, 9, 26, 1, 27, 1, 27, 1, 27, 1, 27, 3, 27, 411, 8, 27, 1, 27, 1, 27, 1, 27, 1, 27, 3, 27, 417, 8, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 5, 28, 424, 8, 28, 10, 28, 12, 28, 427, 9, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 5, 29, 435, 8, 29, 10, 29, 12, 29, 438, 9, 29, 1, 29, 5, 29, 441, 8, 29, 10, 29, 12, 29, 444, 9, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 3, 30, 455, 8, 30, 1, 30, 3, 30, 458, 8, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 3, 32, 474, 8, 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 0, 0, 36, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 0, 2, 1, 0, 30, 31, 1, 0, 37, 38, 517, 0, 76, 1, 0, 0, 0, 2, 81, 1, 0, 0, 0, 4, 88, 1, 0, 0, 0, 6, 119, 1, 0, 0, 0, 8, 137, 1, 0, 0, 0, 10, 153, 1, 0, 0, 0, 12, 155, 1, 0, 0, 0, 14, 162, 1, 0, 0, 0, 16, 201, 1, 0, 0, 0, 18, 204, 1, 0, 0, 0, 20, 211, 1, 0, 0, 0, 22, 217, 1, 0, 0, 0, 24, 226, 1, 0, 0, 0, 26, 249, 1, 0, 0, 0, 28, 255, 1, 0, 0, 0, 30, 281, 1, 0, 0, 0, 32, 283, 1, 0, 0, 0, 34, 301, 1, 0, 0, 0, 36, 313, 1, 0, 0, 0, 38, 319, 1, 0, 0, 0, 40, 328, 1, 0, 0, 0, 42, 341, 1, 0, 0, 0, 44, 346, 1, 0, 0, 0, 46, 352, 1, 0, 0, 0, 48, 367, 1, 0, 0, 0, 50, 380, 1, 0, 0, 0, 52, 393, 1, 0, 0, 0, 54, 416, 1, 0, 0, 0, 56, 418, 1, 0, 0, 0, 58, 428, 1, 0, 0, 0, 60, 457, 1, 0, 0, 0, 62, 459, 1, 0, 0, 0, 64, 473, 1, 0, 0, 0, 66, 475, 1, 0, 0, 0, 68, 479, 1, 0, 0, 0, 70, 481, 1, 0, 0, 0, 72, 75, 3, 2, 1, 0, 73, 75, 3, 6, 3, 0, 74, 72, 1, 0, 0, 0, 74, 73, 1, 0, 0, 0, 75, 78, 1, 0, 0, 0, 76, 74, 1, 0, 0, 0, 76, 77, 1, 0, 0, 0, 77, 79, 1, 0, 0, 0, 78, 76, 1, 0, 0, 0, 79, 80, 3, 8, 4, 0, 80, 1, 1, 0, 0, 0, 81, 82, 5, 1, 0, 0, 82, 83, 5, 56, 0, 0, 83, 84, 6, 1, -1, 0, 84, 85, 3, 4, 2, 0, 85, 86, 3, 44, 22, 0, 86, 87, 5, 2, 0, 0, 87, 3, 1, 0, 0, 0, 88, 115, 5, 43, 0, 0, 89, 94, 5, 56, 0, 0, 90, 91, 5, 49, 0, 0, 91, 93, 5, 56, 0, 0, 92, 90, 1, 0, 0, 0, 93, 96, 1, 0, 0, 0, 94, 92, 1, 0, 0, 0, 94, 95, 1, 0, 0, 0, 95, 113, 1, 0, 0, 0, 96, 94, 1, 0, 0, 0, 97, 98, 5, 49, 0, 0, 98, 99, 5, 45, 0, 0, 99, 100, 5, 56, 0, 0, 100, 101, 5, 42, 0, 0, 101, 108, 3, 46, 23, 0, 102, 103, 5, 49, 0, 0, 103, 104, 5, 56, 0, 0, 104, 105, 5, 42, 0, 0, 105, 107, 3, 46, 23, 0, 106, 102, 1, 0, 0, 0, 107, 110, 1, 0, 0, 0, 108, 106, 1, 0, 0, 0, 108, 109, 1, 0, 0, 0, 109, 111, 1, 0, 0, 0, 110, 108, 1, 0, 0, 0, 111, 112, 5, 46, 0, 0, 112, 114, 1, 0, 0, 0, 113, 97, 1, 0, 0, 0, 113, 114, 1, 0, 0, 0, 114, 116, 1, 0, 0, 0, 115, 89, 1, 0, 0, 0, 115, 116, 1, 0, 0, 0, 116, 117, 1, 0, 0, 0, 117, 118, 5, 44, 0, 0, 118, 5, 1, 0, 0, 0, 119, 120, 5, 12, 0, 0, 120, 121, 5, 56, 0, 0, 121, 122, 6, 3, -1, 0, 122, 123, 5, 43, 0, 0, 123, 124, 5, 56, 0, 0, 124, 132, 5, 44, 0, 0, 125, 126, 5, 35, 0, 0, 126, 127, 3, 16, 8, 0, 127, 128, 5, 42, 0, 0, 128, 129, 3, 46, 23, 0, 129, 131, 1, 0, 0, 0, 130, 125, 1, 0, 0, 0, 131, 134, 1, 0, 0, 0, 132, 130, 1, 0, 0, 0, 132, 133, 1, 0, 0, 0, 133, 135, 1, 0, 0, 0, 134, 132, 1, 0, 0, 0, 135, 136, 5, 53, 0, 0, 136, 7, 1, 0, 0, 0, 137, 138, 5, 1, 0, 0, 138, 139, 5, 3, 0, 0, 139, 140, 6, 4, -1, 0, 140, 141, 5, 43, 0, 0, 141, 142, 5, 44, 0, 0, 142, 143, 3, 44, 22, 0, 143, 144, 5, 2, 0, 0, 144, 9, 1, 0, 0, 0, 145, 150, 3, 46, 23, 0, 146, 147, 5, 49, 0, 0, 147, 149, 3, 46, 23, 0, 148, 146, 1, 0, 0, 0, 149, 152, 1, 0, 0, 0, 150, 148, 1, 0, 0, 0, 150, 151, 1, 0, 0, 0, 151, 154, 1, 0, 0, 0, 152, 150, 1, 0, 0, 0, 153, 145, 1, 0, 0, 0, 153, 154, 1, 0, 0, 0, 154, 11, 1, 0, 0, 0, 155, 156, 5, 7, 0, 0, 156, 158, 6, 6, -1, 0, 157, 159, 3, 46, 23, 0, 158, 157, 1, 0, 0, 0, 158, 159, 1, 0, 0, 0, 159, 160, 1, 0, 0, 0, 160, 161, 5, 53, 0, 0, 161, 13, 1, 0, 0, 0, 162, 163, 5, 8, 0, 0, 163, 164, 6, 7, -1, 0, 164, 165, 3, 16, 8, 0, 165, 173, 3, 44, 22, 0, 166, 167, 5, 10, 0, 0, 167, 168, 6, 7, -1, 0, 168, 169, 3, 16, 8, 0, 169, 170, 3, 44, 22, 0, 170, 172, 1, 0, 0, 0, 171, 166, 1, 0, 0, 0, 172, 175, 1, 0, 0, 0, 173, 171, 1, 0, 0, 0, 173, 174, 1, 0, 0, 0, 174, 179, 1, 0, 0, 0, 175, 173, 1, 0, 0, 0, 176, 177, 5, 9, 0, 0, 177, 178, 6, 7, -1, 0, 178, 180, 3, 44, 22, 0, 179, 176, 1, 0, 0, 0, 179, 180, 1, 0, 0, 0, 180, 181, 1, 0, 0, 0, 181, 182, 5, 2, 0, 0, 182, 15, 1, 0, 0, 0, 183, 184, 5, 43, 0, 0, 184, 185, 3, 46, 23, 0, 185, 196, 5, 44, 0, 0, 186, 188, 7, 0, 0, 0, 187, 189, 5, 43, 0, 0, 188, 187, 1, 0, 0, 0, 188, 189, 1, 0, 0, 0, 189, 190, 1, 0, 0, 0, 190, 192, 3, 16, 8, 0, 191, 193, 5, 44, 0, 0, 192, 191, 1, 0, 0, 0, 192, 193, 1, 0, 0, 0, 193, 195, 1, 0, 0, 0, 194, 186, 1, 0, 0, 0, 195, 198, 1, 0, 0, 0, 196, 194, 1, 0, 0, 0, 196, 197, 1, 0, 0, 0, 197, 200, 1, 0, 0, 0, 198, 196, 1, 0, 0, 0, 199, 183, 1, 0, 0, 0, 200, 203, 1, 0, 0, 0, 201, 199, 1, 0, 0, 0, 201, 202, 1, 0, 0, 0, 202, 17, 1, 0, 0, 0, 203, 201, 1, 0, 0, 0, 204, 205, 5, 4, 0, 0, 205, 206, 6, 9, -1, 0, 206, 207, 5, 43, 0, 0, 207, 208, 3, 46, 23, 0, 208, 209, 5, 44, 0, 0, 209, 210, 5, 53, 0, 0, 210, 19, 1, 0, 0, 0, 211, 212, 5, 6, 0, 0, 212, 213, 6, 10, -1, 0, 213, 214, 5, 43, 0, 0, 214, 215, 3, 46, 23, 0, 215, 216, 5, 44, 0, 0, 216, 21, 1, 0, 0, 0, 217, 218, 5, 5, 0, 0, 218, 219, 6, 11, -1, 0, 219, 220, 5, 43, 0, 0, 220, 221, 3, 46, 23, 0, 221, 222, 5, 49, 0, 0, 222, 223, 3, 46, 23, 0, 223, 224, 5, 44, 0, 0, 224, 225, 5, 53, 0, 0, 225, 23, 1, 0, 0, 0, 226, 227, 5, 14, 0, 0, 227, 228, 5, 17, 0, 0, 228, 229, 6, 12, -1, 0, 229, 230, 3, 26, 13, 0, 230, 231, 5, 2, 0, 0, 231, 25, 1, 0, 0, 0, 232, 248, 3, 42, 21, 0, 233, 234, 5, 39, 0, 0, 234, 237, 6, 13, -1, 0, 235, 236, 5, 8, 0, 0, 236, 238, 3, 16, 8, 0, 237, 235, 1, 0, 0, 0, 237, 238, 1, 0, 0, 0, 238, 239, 1, 0, 0, 0, 239, 248, 5, 53, 0, 0, 240, 241, 5, 40, 0, 0, 241, 244, 6, 13, -1, 0, 242, 243, 5, 8, 0, 0, 243, 245, 3, 16, 8, 0, 244, 242, 1, 0, 0, 0, 244, 245, 1, 0, 0, 0, 245, 246, 1, 0, 0, 0, 246, 248, 5, 53, 0, 0, 247, 232, 1, 0, 0, 0, 247, 233, 1, 0, 0, 0, 247, 240, 1, 0, 0, 0, 248, 251, 1, 0, 0, 0, 249, 247, 1, 0, 0, 0, 249, 250, 1, 0, 0, 0, 250, 253, 1, 0, 0, 0, 251, 249, 1, 0, 0, 0, 252, 254, 3, 12, 6, 0, 253, 252, 1, 0, 0, 0, 253, 254, 1, 0, 0, 0, 254, 27, 1, 0, 0, 0, 255, 256, 5, 15, 0, 0, 256, 257, 6, 14, -1, 0, 257, 258, 5, 56, 0, 0, 258, 259, 5, 16, 0, 0, 259, 260, 3, 30, 15, 0, 260, 261, 3, 26, 13, 0, 261, 262, 5, 2, 0, 0, 262, 29, 1, 0, 0, 0, 263, 264, 5, 43, 0, 0, 264, 265, 3, 46, 23, 0, 265, 266, 5, 51, 0, 0, 266, 267, 3, 46, 23, 0, 267, 268, 5, 44, 0, 0, 268, 282, 1, 0, 0, 0, 269, 270, 5, 45, 0, 0, 270, 275, 3, 46, 23, 0, 271, 272, 5, 49, 0, 0, 272, 274, 3, 46, 23, 0, 273, 271, 1, 0, 0, 0, 274, 277, 1, 0, 0, 0, 275, 273, 1, 0, 0, 0, 275, 276, 1, 0, 0, 0, 276, 278, 1, 0, 0, 0, 277, 275, 1, 0, 0, 0, 278, 279, 5, 46, 0, 0, 279, 282, 1, 0, 0, 0, 280, 282, 5, 56, 0, 0, 281, 263, 1, 0, 0, 0, 281, 269, 1, 0, 0, 0, 281, 280, 1, 0, 0, 0, 282, 31, 1, 0, 0, 0, 283, 284, 6, 16, -1, 0, 284, 285, 5, 45, 0, 0, 285, 286, 3, 46, 23, 0, 286, 287, 5, 35, 0, 0, 287, 288, 5, 56, 0, 0, 288, 289, 5, 41, 0, 0, 289, 290, 3, 30, 15, 0, 290, 291, 5, 49, 0, 0, 291, 296, 3, 46, 23, 0, 292, 293, 5, 49, 0, 0, 293, 295, 3, 46, 23, 0, 294, 292, 1, 0, 0, 0, 295, 298, 1, 0, 0, 0, 296, 294, 1, 0, 0, 0, 296, 297, 1, 0, 0, 0, 297, 299, 1, 0, 0, 0, 298, 296, 1, 0, 0, 0, 299, 300, 5, 46, 0, 0, 300, 33, 1, 0, 0, 0, 301, 302, 6, 17, -1, 0, 302, 303, 5, 56, 0, 0, 303, 304, 5, 50, 0, 0, 304, 305, 5, 13, 0, 0, 305, 306, 5, 43, 0, 0, 306, 307, 3, 46, 23, 0, 307, 308, 5, 44, 0, 0, 308, 35, 1, 0, 0, 0, 309, 310, 5, 18, 0, 0, 310, 314, 6, 18, -1, 0, 311, 312, 5, 19, 0, 0, 312, 314, 6, 18, -1, 0, 313, 309, 1, 0, 0, 0, 313, 311, 1, 0, 0, 0, 314, 315, 1, 0, 0, 0, 315, 316, 5, 43, 0, 0, 316, 317, 3, 46, 23, 0, 317, 318, 5, 44, 0, 0, 318, 37, 1, 0, 0, 0, 319, 320, 5, 56, 0, 0, 320, 322, 6, 19, -1, 0, 321, 323, 3, 40, 20, 0, 322, 321, 1, 0, 0, 0, 322, 323, 1, 0, 0, 0, 323, 324, 1, 0, 0, 0, 324, 325, 5, 42, 0, 0, 325, 326, 3, 46, 23, 0, 326, 327, 5, 53, 0, 0, 327, 39, 1, 0, 0, 0, 328, 329, 5, 45, 0, 0, 329, 330, 3, 46, 23, 0, 330, 331, 5, 46, 0, 0, 331, 41, 1, 0, 0, 0, 332, 342, 3, 14, 7, 0, 333, 342, 3, 24, 12, 0, 334, 342, 3, 28, 14, 0, 335, 342, 3, 18, 9, 0, 336, 342, 3, 22, 11, 0, 337, 338, 3, 46, 23, 0, 338, 339, 5, 53, 0, 0, 339, 342, 1, 0, 0, 0, 340, 342, 3, 38, 19, 0, 341, 332, 1, 0, 0, 0, 341, 333, 1, 0, 0, 0, 341, 334, 1, 0, 0, 0, 341, 335, 1, 0, 0, 0, 341, 336, 1, 0, 0, 0, 341, 337, 1, 0, 0, 0, 341, 340, 1, 0, 0, 0, 342, 43, 1, 0, 0, 0, 343, 345, 3, 42, 21, 0, 344, 343, 1, 0, 0, 0, 345, 348, 1, 0, 0, 0, 346, 344, 1, 0, 0, 0, 346, 347, 1, 0, 0, 0, 347, 350, 1, 0, 0, 0, 348, 346, 1, 0, 0, 0, 349, 351, 3, 12, 6, 0, 350, 349, 1, 0, 0, 0, 350, 351, 1, 0, 0, 0, 351, 45, 1, 0, 0, 0, 352, 364, 3, 48, 24, 0, 353, 358, 5, 24, 0, 0, 354, 358, 5, 25, 0, 0, 355, 358, 5, 26, 0, 0, 356, 358, 5, 27, 0, 0, 357, 353, 1, 0, 0, 0, 357, 354, 1, 0, 0, 0, 357, 355, 1, 0, 0, 0, 357, 356, 1, 0, 0, 0, 358, 359, 1, 0, 0, 0, 359, 360, 3, 48, 24, 0, 360, 361, 6, 23, -1, 0, 361, 363, 1, 0, 0, 0, 362, 357, 1, 0, 0, 0, 363, 366, 1, 0, 0, 0, 364, 362, 1, 0, 0, 0, 364, 365, 1, 0, 0, 0, 365, 47, 1, 0, 0, 0, 366, 364, 1, 0, 0, 0, 367, 377, 3, 50, 25, 0, 368, 371, 5, 28, 0, 0, 369, 371, 5, 29, 0, 0, 370, 368, 1, 0, 0, 0, 370, 369, 1, 0, 0, 0, 371, 372, 1, 0, 0, 0, 372, 373, 3, 50, 25, 0, 373, 374, 6, 24, -1, 0, 374, 376, 1, 0, 0, 0, 375, 370, 1, 0, 0, 0, 376, 379, 1, 0, 0, 0, 377, 375, 1, 0, 0, 0, 377, 378, 1, 0, 0, 0, 378, 49, 1, 0, 0, 0, 379, 377, 1, 0, 0, 0, 380, 390, 3, 52, 26, 0, 381, 384, 5, 20, 0, 0, 382, 384, 5, 21, 0, 0, 383, 381, 1, 0, 0, 0, 383, 382, 1, 0, 0, 0, 384, 385, 1, 0, 0, 0, 385, 386, 3, 52, 26, 0, 386, 387, 6, 25, -1, 0, 387, 389, 1, 0, 0, 0, 388, 383, 1, 0, 0, 0, 389, 392, 1, 0, 0, 0, 390, 388, 1, 0, 0, 0, 390, 391, 1, 0, 0, 0, 391, 51, 1, 0, 0, 0, 392, 390, 1, 0, 0, 0, 393, 403, 3, 54, 27, 0, 394, 397, 5, 22, 0, 0, 395, 397, 5, 23, 0, 0, 396, 394, 1, 0, 0, 0, 396, 395, 1, 0, 0, 0, 397, 398, 1, 0, 0, 0, 398, 399, 3, 54, 27, 0, 399, 400, 6, 26, -1, 0, 400, 402, 1, 0, 0, 0, 401, 396, 1, 0, 0, 0, 402, 405, 1, 0, 0, 0, 403, 401, 1, 0, 0, 0, 403, 404, 1, 0, 0, 0, 404, 53, 1, 0, 0, 0, 405, 403, 1, 0, 0, 0, 406, 411, 5, 32, 0, 0, 407, 411, 5, 21, 0, 0, 408, 411, 5, 33, 0, 0, 409, 411, 5, 34, 0, 0, 410, 406, 1, 0, 0, 0, 410, 407, 1, 0, 0, 0, 410, 408, 1, 0, 0, 0, 410, 409, 1, 0, 0, 0, 411, 412, 1, 0, 0, 0, 412, 413, 3, 54, 27, 0, 413, 414, 6, 27, -1, 0, 414, 417, 1, 0, 0, 0, 415, 417, 3, 56, 28, 0, 416, 410, 1, 0, 0, 0, 416, 415, 1, 0, 0, 0, 417, 55, 1, 0, 0, 0, 418, 425, 3, 58, 29, 0, 419, 420, 5, 36, 0, 0, 420, 421, 3, 58, 29, 0, 421, 422, 6, 28, -1, 0, 422, 424, 1, 0, 0, 0, 423, 419, 1, 0, 0, 0, 424, 427, 1, 0, 0, 0, 425, 423, 1, 0, 0, 0, 425, 426, 1, 0, 0, 0, 426, 57, 1, 0, 0, 0, 427, 425, 1, 0, 0, 0, 428, 436, 3, 60, 30, 0, 429, 430, 5, 43, 0, 0, 430, 431, 3, 10, 5, 0, 431, 432, 5, 44, 0, 0, 432, 433, 6, 29, -1, 0, 433, 435, 1, 0, 0, 0, 434, 429, 1, 0, 0, 0, 435, 438, 1, 0, 0, 0, 436, 434, 1, 0, 0, 0, 436, 437, 1, 0, 0, 0, 437, 442, 1, 0, 0, 0, 438, 436, 1, 0, 0, 0, 439, 441, 3, 40, 20, 0, 440, 439, 1, 0, 0, 0, 441, 444, 1, 0, 0, 0, 442, 440, 1, 0, 0, 0, 442, 443, 1, 0, 0, 0, 443, 59, 1, 0, 0, 0, 444, 442, 1, 0, 0, 0, 445, 458, 3, 64, 32, 0, 446, 458, 5, 56, 0, 0, 447, 458, 3, 62, 31, 0, 448, 458, 3, 36, 18, 0, 449, 458, 3, 34, 17, 0, 450, 458, 3, 32, 16, 0, 451, 458, 3, 20, 10, 0, 452, 454, 5, 43, 0, 0, 453, 455, 3, 46, 23, 0, 454, 453, 1, 0, 0, 0, 454, 455, 1, 0, 0, 0, 455, 456, 1, 0, 0, 0, 456, 458, 5, 44, 0, 0, 457, 445, 1, 0, 0, 0, 457, 446, 1, 0, 0, 0, 457, 447, 1, 0, 0, 0, 457, 448, 1, 0, 0, 0, 457, 449, 1, 0, 0, 0, 457, 450, 1, 0, 0, 0, 457, 451, 1, 0, 0, 0, 457, 452, 1, 0, 0, 0, 458, 61, 1, 0, 0, 0, 459, 460, 5, 41, 0, 0, 460, 461, 6, 31, -1, 0, 461, 462, 3, 4, 2, 0, 462, 463, 5, 47, 0, 0, 463, 464, 3, 44, 22, 0, 464, 465, 5, 48, 0, 0, 465, 466, 3, 10, 5, 0, 466, 63, 1, 0, 0, 0, 467, 474, 3, 68, 34, 0, 468, 474, 5, 57, 0, 0, 469, 474, 5, 54, 0, 0, 470, 474, 5, 55, 0, 0, 471, 474, 3, 66, 33, 0, 472, 474, 3, 70, 35, 0, 473, 467, 1, 0, 0, 0, 473, 468, 1, 0, 0, 0, 473, 469, 1, 0, 0, 0, 473, 470, 1, 0, 0, 0, 473, 471, 1, 0, 0, 0, 473, 472, 1, 0, 0, 0, 474, 65, 1, 0, 0, 0, 475, 476, 5, 45, 0, 0, 476, 477, 3, 10, 5, 0, 477, 478, 5, 46, 0, 0, 478, 67, 1, 0, 0, 0, 479, 480, 7, 1, 0, 0, 480, 69, 1, 0, 0, 0, 481, 482, 5, 11, 0, 0, 482, 483, 5, 43, 0, 0, 483, 484, 5, 52, 0, 0, 484, 485, 5, 56, 0, 0, 485, 486, 5, 44, 0, 0, 486, 71, 1, 0, 0, 0, 45, 74, 76, 94, 108, 113, 115, 132, 150, 153, 158, 173, 179, 188, 192, 196, 201, 237, 244, 247, 249, 253, 275, 281, 296, 313, 322, 341, 346, 350, 357, 364, 370, 377, 383, 390, 396, 403, 410, 416, 425, 436, 442, 454, 457, 473] \ No newline at end of file +[4, 1, 65, 503, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 1, 0, 1, 0, 5, 0, 75, 8, 0, 10, 0, 12, 0, 78, 9, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 5, 2, 93, 8, 2, 10, 2, 12, 2, 96, 9, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 5, 2, 107, 8, 2, 10, 2, 12, 2, 110, 9, 2, 1, 2, 1, 2, 3, 2, 114, 8, 2, 3, 2, 116, 8, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 5, 3, 131, 8, 3, 10, 3, 12, 3, 134, 9, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 5, 5, 149, 8, 5, 10, 5, 12, 5, 152, 9, 5, 3, 5, 154, 8, 5, 1, 6, 1, 6, 1, 6, 3, 6, 159, 8, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 5, 7, 172, 8, 7, 10, 7, 12, 7, 175, 9, 7, 1, 7, 1, 7, 1, 7, 3, 7, 180, 8, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 189, 8, 8, 1, 8, 1, 8, 3, 8, 193, 8, 8, 5, 8, 195, 8, 8, 10, 8, 12, 8, 198, 9, 8, 5, 8, 200, 8, 8, 10, 8, 12, 8, 203, 9, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 238, 8, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 245, 8, 13, 1, 13, 5, 13, 248, 8, 13, 10, 13, 12, 13, 251, 9, 13, 1, 13, 3, 13, 254, 8, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 5, 15, 274, 8, 15, 10, 15, 12, 15, 277, 9, 15, 1, 15, 1, 15, 1, 15, 3, 15, 282, 8, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 5, 16, 295, 8, 16, 10, 16, 12, 16, 298, 9, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 3, 18, 314, 8, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 3, 19, 323, 8, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 3, 21, 342, 8, 21, 1, 22, 5, 22, 345, 8, 22, 10, 22, 12, 22, 348, 9, 22, 1, 22, 3, 22, 351, 8, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 5, 23, 361, 8, 23, 10, 23, 12, 23, 364, 9, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 3, 24, 372, 8, 24, 1, 24, 1, 24, 1, 24, 5, 24, 377, 8, 24, 10, 24, 12, 24, 380, 9, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 3, 25, 390, 8, 25, 1, 25, 1, 25, 1, 25, 5, 25, 395, 8, 25, 10, 25, 12, 25, 398, 9, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 3, 26, 406, 8, 26, 1, 26, 1, 26, 1, 26, 5, 26, 411, 8, 26, 10, 26, 12, 26, 414, 9, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 3, 27, 422, 8, 27, 1, 27, 1, 27, 1, 27, 5, 27, 427, 8, 27, 10, 27, 12, 27, 430, 9, 27, 1, 28, 1, 28, 1, 28, 1, 28, 3, 28, 436, 8, 28, 1, 28, 1, 28, 1, 28, 1, 28, 3, 28, 442, 8, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 5, 29, 450, 8, 29, 10, 29, 12, 29, 453, 9, 29, 1, 29, 5, 29, 456, 8, 29, 10, 29, 12, 29, 459, 9, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 3, 30, 470, 8, 30, 1, 30, 3, 30, 473, 8, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 3, 32, 489, 8, 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 0, 5, 46, 48, 50, 52, 54, 36, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 0, 3, 1, 0, 30, 31, 1, 0, 43, 48, 1, 0, 38, 39, 532, 0, 76, 1, 0, 0, 0, 2, 81, 1, 0, 0, 0, 4, 88, 1, 0, 0, 0, 6, 119, 1, 0, 0, 0, 8, 137, 1, 0, 0, 0, 10, 153, 1, 0, 0, 0, 12, 155, 1, 0, 0, 0, 14, 162, 1, 0, 0, 0, 16, 201, 1, 0, 0, 0, 18, 204, 1, 0, 0, 0, 20, 211, 1, 0, 0, 0, 22, 217, 1, 0, 0, 0, 24, 226, 1, 0, 0, 0, 26, 249, 1, 0, 0, 0, 28, 255, 1, 0, 0, 0, 30, 281, 1, 0, 0, 0, 32, 283, 1, 0, 0, 0, 34, 301, 1, 0, 0, 0, 36, 313, 1, 0, 0, 0, 38, 319, 1, 0, 0, 0, 40, 328, 1, 0, 0, 0, 42, 341, 1, 0, 0, 0, 44, 346, 1, 0, 0, 0, 46, 352, 1, 0, 0, 0, 48, 365, 1, 0, 0, 0, 50, 381, 1, 0, 0, 0, 52, 399, 1, 0, 0, 0, 54, 415, 1, 0, 0, 0, 56, 441, 1, 0, 0, 0, 58, 443, 1, 0, 0, 0, 60, 472, 1, 0, 0, 0, 62, 474, 1, 0, 0, 0, 64, 488, 1, 0, 0, 0, 66, 490, 1, 0, 0, 0, 68, 494, 1, 0, 0, 0, 70, 496, 1, 0, 0, 0, 72, 75, 3, 2, 1, 0, 73, 75, 3, 6, 3, 0, 74, 72, 1, 0, 0, 0, 74, 73, 1, 0, 0, 0, 75, 78, 1, 0, 0, 0, 76, 74, 1, 0, 0, 0, 76, 77, 1, 0, 0, 0, 77, 79, 1, 0, 0, 0, 78, 76, 1, 0, 0, 0, 79, 80, 3, 8, 4, 0, 80, 1, 1, 0, 0, 0, 81, 82, 5, 1, 0, 0, 82, 83, 5, 62, 0, 0, 83, 84, 6, 1, -1, 0, 84, 85, 3, 4, 2, 0, 85, 86, 3, 44, 22, 0, 86, 87, 5, 2, 0, 0, 87, 3, 1, 0, 0, 0, 88, 115, 5, 49, 0, 0, 89, 94, 5, 62, 0, 0, 90, 91, 5, 55, 0, 0, 91, 93, 5, 62, 0, 0, 92, 90, 1, 0, 0, 0, 93, 96, 1, 0, 0, 0, 94, 92, 1, 0, 0, 0, 94, 95, 1, 0, 0, 0, 95, 113, 1, 0, 0, 0, 96, 94, 1, 0, 0, 0, 97, 98, 5, 55, 0, 0, 98, 99, 5, 51, 0, 0, 99, 100, 5, 62, 0, 0, 100, 101, 5, 48, 0, 0, 101, 108, 3, 46, 23, 0, 102, 103, 5, 55, 0, 0, 103, 104, 5, 62, 0, 0, 104, 105, 5, 48, 0, 0, 105, 107, 3, 46, 23, 0, 106, 102, 1, 0, 0, 0, 107, 110, 1, 0, 0, 0, 108, 106, 1, 0, 0, 0, 108, 109, 1, 0, 0, 0, 109, 111, 1, 0, 0, 0, 110, 108, 1, 0, 0, 0, 111, 112, 5, 52, 0, 0, 112, 114, 1, 0, 0, 0, 113, 97, 1, 0, 0, 0, 113, 114, 1, 0, 0, 0, 114, 116, 1, 0, 0, 0, 115, 89, 1, 0, 0, 0, 115, 116, 1, 0, 0, 0, 116, 117, 1, 0, 0, 0, 117, 118, 5, 50, 0, 0, 118, 5, 1, 0, 0, 0, 119, 120, 5, 12, 0, 0, 120, 121, 5, 62, 0, 0, 121, 122, 6, 3, -1, 0, 122, 123, 5, 49, 0, 0, 123, 124, 5, 62, 0, 0, 124, 132, 5, 50, 0, 0, 125, 126, 5, 35, 0, 0, 126, 127, 3, 16, 8, 0, 127, 128, 5, 48, 0, 0, 128, 129, 3, 46, 23, 0, 129, 131, 1, 0, 0, 0, 130, 125, 1, 0, 0, 0, 131, 134, 1, 0, 0, 0, 132, 130, 1, 0, 0, 0, 132, 133, 1, 0, 0, 0, 133, 135, 1, 0, 0, 0, 134, 132, 1, 0, 0, 0, 135, 136, 5, 59, 0, 0, 136, 7, 1, 0, 0, 0, 137, 138, 5, 1, 0, 0, 138, 139, 5, 3, 0, 0, 139, 140, 6, 4, -1, 0, 140, 141, 5, 49, 0, 0, 141, 142, 5, 50, 0, 0, 142, 143, 3, 44, 22, 0, 143, 144, 5, 2, 0, 0, 144, 9, 1, 0, 0, 0, 145, 150, 3, 46, 23, 0, 146, 147, 5, 55, 0, 0, 147, 149, 3, 46, 23, 0, 148, 146, 1, 0, 0, 0, 149, 152, 1, 0, 0, 0, 150, 148, 1, 0, 0, 0, 150, 151, 1, 0, 0, 0, 151, 154, 1, 0, 0, 0, 152, 150, 1, 0, 0, 0, 153, 145, 1, 0, 0, 0, 153, 154, 1, 0, 0, 0, 154, 11, 1, 0, 0, 0, 155, 156, 5, 7, 0, 0, 156, 158, 6, 6, -1, 0, 157, 159, 3, 46, 23, 0, 158, 157, 1, 0, 0, 0, 158, 159, 1, 0, 0, 0, 159, 160, 1, 0, 0, 0, 160, 161, 5, 59, 0, 0, 161, 13, 1, 0, 0, 0, 162, 163, 5, 8, 0, 0, 163, 164, 6, 7, -1, 0, 164, 165, 3, 16, 8, 0, 165, 173, 3, 44, 22, 0, 166, 167, 5, 10, 0, 0, 167, 168, 6, 7, -1, 0, 168, 169, 3, 16, 8, 0, 169, 170, 3, 44, 22, 0, 170, 172, 1, 0, 0, 0, 171, 166, 1, 0, 0, 0, 172, 175, 1, 0, 0, 0, 173, 171, 1, 0, 0, 0, 173, 174, 1, 0, 0, 0, 174, 179, 1, 0, 0, 0, 175, 173, 1, 0, 0, 0, 176, 177, 5, 9, 0, 0, 177, 178, 6, 7, -1, 0, 178, 180, 3, 44, 22, 0, 179, 176, 1, 0, 0, 0, 179, 180, 1, 0, 0, 0, 180, 181, 1, 0, 0, 0, 181, 182, 5, 2, 0, 0, 182, 15, 1, 0, 0, 0, 183, 184, 5, 49, 0, 0, 184, 185, 3, 46, 23, 0, 185, 196, 5, 50, 0, 0, 186, 188, 7, 0, 0, 0, 187, 189, 5, 49, 0, 0, 188, 187, 1, 0, 0, 0, 188, 189, 1, 0, 0, 0, 189, 190, 1, 0, 0, 0, 190, 192, 3, 16, 8, 0, 191, 193, 5, 50, 0, 0, 192, 191, 1, 0, 0, 0, 192, 193, 1, 0, 0, 0, 193, 195, 1, 0, 0, 0, 194, 186, 1, 0, 0, 0, 195, 198, 1, 0, 0, 0, 196, 194, 1, 0, 0, 0, 196, 197, 1, 0, 0, 0, 197, 200, 1, 0, 0, 0, 198, 196, 1, 0, 0, 0, 199, 183, 1, 0, 0, 0, 200, 203, 1, 0, 0, 0, 201, 199, 1, 0, 0, 0, 201, 202, 1, 0, 0, 0, 202, 17, 1, 0, 0, 0, 203, 201, 1, 0, 0, 0, 204, 205, 5, 4, 0, 0, 205, 206, 6, 9, -1, 0, 206, 207, 5, 49, 0, 0, 207, 208, 3, 46, 23, 0, 208, 209, 5, 50, 0, 0, 209, 210, 5, 59, 0, 0, 210, 19, 1, 0, 0, 0, 211, 212, 5, 6, 0, 0, 212, 213, 6, 10, -1, 0, 213, 214, 5, 49, 0, 0, 214, 215, 3, 46, 23, 0, 215, 216, 5, 50, 0, 0, 216, 21, 1, 0, 0, 0, 217, 218, 5, 5, 0, 0, 218, 219, 6, 11, -1, 0, 219, 220, 5, 49, 0, 0, 220, 221, 3, 46, 23, 0, 221, 222, 5, 55, 0, 0, 222, 223, 3, 46, 23, 0, 223, 224, 5, 50, 0, 0, 224, 225, 5, 59, 0, 0, 225, 23, 1, 0, 0, 0, 226, 227, 5, 14, 0, 0, 227, 228, 5, 17, 0, 0, 228, 229, 6, 12, -1, 0, 229, 230, 3, 26, 13, 0, 230, 231, 5, 2, 0, 0, 231, 25, 1, 0, 0, 0, 232, 248, 3, 42, 21, 0, 233, 234, 5, 40, 0, 0, 234, 237, 6, 13, -1, 0, 235, 236, 5, 8, 0, 0, 236, 238, 3, 16, 8, 0, 237, 235, 1, 0, 0, 0, 237, 238, 1, 0, 0, 0, 238, 239, 1, 0, 0, 0, 239, 248, 5, 59, 0, 0, 240, 241, 5, 41, 0, 0, 241, 244, 6, 13, -1, 0, 242, 243, 5, 8, 0, 0, 243, 245, 3, 16, 8, 0, 244, 242, 1, 0, 0, 0, 244, 245, 1, 0, 0, 0, 245, 246, 1, 0, 0, 0, 246, 248, 5, 59, 0, 0, 247, 232, 1, 0, 0, 0, 247, 233, 1, 0, 0, 0, 247, 240, 1, 0, 0, 0, 248, 251, 1, 0, 0, 0, 249, 247, 1, 0, 0, 0, 249, 250, 1, 0, 0, 0, 250, 253, 1, 0, 0, 0, 251, 249, 1, 0, 0, 0, 252, 254, 3, 12, 6, 0, 253, 252, 1, 0, 0, 0, 253, 254, 1, 0, 0, 0, 254, 27, 1, 0, 0, 0, 255, 256, 5, 15, 0, 0, 256, 257, 6, 14, -1, 0, 257, 258, 5, 62, 0, 0, 258, 259, 5, 16, 0, 0, 259, 260, 3, 30, 15, 0, 260, 261, 3, 26, 13, 0, 261, 262, 5, 2, 0, 0, 262, 29, 1, 0, 0, 0, 263, 264, 5, 49, 0, 0, 264, 265, 3, 46, 23, 0, 265, 266, 5, 57, 0, 0, 266, 267, 3, 46, 23, 0, 267, 268, 5, 50, 0, 0, 268, 282, 1, 0, 0, 0, 269, 270, 5, 51, 0, 0, 270, 275, 3, 46, 23, 0, 271, 272, 5, 55, 0, 0, 272, 274, 3, 46, 23, 0, 273, 271, 1, 0, 0, 0, 274, 277, 1, 0, 0, 0, 275, 273, 1, 0, 0, 0, 275, 276, 1, 0, 0, 0, 276, 278, 1, 0, 0, 0, 277, 275, 1, 0, 0, 0, 278, 279, 5, 52, 0, 0, 279, 282, 1, 0, 0, 0, 280, 282, 5, 62, 0, 0, 281, 263, 1, 0, 0, 0, 281, 269, 1, 0, 0, 0, 281, 280, 1, 0, 0, 0, 282, 31, 1, 0, 0, 0, 283, 284, 6, 16, -1, 0, 284, 285, 5, 51, 0, 0, 285, 286, 3, 46, 23, 0, 286, 287, 5, 36, 0, 0, 287, 288, 5, 62, 0, 0, 288, 289, 5, 42, 0, 0, 289, 290, 3, 30, 15, 0, 290, 291, 5, 55, 0, 0, 291, 296, 3, 46, 23, 0, 292, 293, 5, 55, 0, 0, 293, 295, 3, 46, 23, 0, 294, 292, 1, 0, 0, 0, 295, 298, 1, 0, 0, 0, 296, 294, 1, 0, 0, 0, 296, 297, 1, 0, 0, 0, 297, 299, 1, 0, 0, 0, 298, 296, 1, 0, 0, 0, 299, 300, 5, 52, 0, 0, 300, 33, 1, 0, 0, 0, 301, 302, 6, 17, -1, 0, 302, 303, 5, 62, 0, 0, 303, 304, 5, 56, 0, 0, 304, 305, 5, 13, 0, 0, 305, 306, 5, 49, 0, 0, 306, 307, 3, 46, 23, 0, 307, 308, 5, 50, 0, 0, 308, 35, 1, 0, 0, 0, 309, 310, 5, 18, 0, 0, 310, 314, 6, 18, -1, 0, 311, 312, 5, 19, 0, 0, 312, 314, 6, 18, -1, 0, 313, 309, 1, 0, 0, 0, 313, 311, 1, 0, 0, 0, 314, 315, 1, 0, 0, 0, 315, 316, 5, 49, 0, 0, 316, 317, 3, 46, 23, 0, 317, 318, 5, 50, 0, 0, 318, 37, 1, 0, 0, 0, 319, 320, 5, 62, 0, 0, 320, 322, 6, 19, -1, 0, 321, 323, 3, 40, 20, 0, 322, 321, 1, 0, 0, 0, 322, 323, 1, 0, 0, 0, 323, 324, 1, 0, 0, 0, 324, 325, 7, 1, 0, 0, 325, 326, 3, 46, 23, 0, 326, 327, 5, 59, 0, 0, 327, 39, 1, 0, 0, 0, 328, 329, 5, 51, 0, 0, 329, 330, 3, 46, 23, 0, 330, 331, 5, 52, 0, 0, 331, 41, 1, 0, 0, 0, 332, 342, 3, 14, 7, 0, 333, 342, 3, 24, 12, 0, 334, 342, 3, 28, 14, 0, 335, 342, 3, 18, 9, 0, 336, 342, 3, 22, 11, 0, 337, 338, 3, 46, 23, 0, 338, 339, 5, 59, 0, 0, 339, 342, 1, 0, 0, 0, 340, 342, 3, 38, 19, 0, 341, 332, 1, 0, 0, 0, 341, 333, 1, 0, 0, 0, 341, 334, 1, 0, 0, 0, 341, 335, 1, 0, 0, 0, 341, 336, 1, 0, 0, 0, 341, 337, 1, 0, 0, 0, 341, 340, 1, 0, 0, 0, 342, 43, 1, 0, 0, 0, 343, 345, 3, 42, 21, 0, 344, 343, 1, 0, 0, 0, 345, 348, 1, 0, 0, 0, 346, 344, 1, 0, 0, 0, 346, 347, 1, 0, 0, 0, 347, 350, 1, 0, 0, 0, 348, 346, 1, 0, 0, 0, 349, 351, 3, 12, 6, 0, 350, 349, 1, 0, 0, 0, 350, 351, 1, 0, 0, 0, 351, 45, 1, 0, 0, 0, 352, 353, 6, 23, -1, 0, 353, 354, 3, 48, 24, 0, 354, 362, 1, 0, 0, 0, 355, 356, 10, 2, 0, 0, 356, 357, 5, 37, 0, 0, 357, 358, 3, 48, 24, 0, 358, 359, 6, 23, -1, 0, 359, 361, 1, 0, 0, 0, 360, 355, 1, 0, 0, 0, 361, 364, 1, 0, 0, 0, 362, 360, 1, 0, 0, 0, 362, 363, 1, 0, 0, 0, 363, 47, 1, 0, 0, 0, 364, 362, 1, 0, 0, 0, 365, 366, 6, 24, -1, 0, 366, 367, 3, 50, 25, 0, 367, 378, 1, 0, 0, 0, 368, 371, 10, 2, 0, 0, 369, 372, 5, 24, 0, 0, 370, 372, 5, 25, 0, 0, 371, 369, 1, 0, 0, 0, 371, 370, 1, 0, 0, 0, 372, 373, 1, 0, 0, 0, 373, 374, 3, 50, 25, 0, 374, 375, 6, 24, -1, 0, 375, 377, 1, 0, 0, 0, 376, 368, 1, 0, 0, 0, 377, 380, 1, 0, 0, 0, 378, 376, 1, 0, 0, 0, 378, 379, 1, 0, 0, 0, 379, 49, 1, 0, 0, 0, 380, 378, 1, 0, 0, 0, 381, 382, 6, 25, -1, 0, 382, 383, 3, 52, 26, 0, 383, 396, 1, 0, 0, 0, 384, 389, 10, 2, 0, 0, 385, 390, 5, 28, 0, 0, 386, 390, 5, 29, 0, 0, 387, 390, 5, 26, 0, 0, 388, 390, 5, 27, 0, 0, 389, 385, 1, 0, 0, 0, 389, 386, 1, 0, 0, 0, 389, 387, 1, 0, 0, 0, 389, 388, 1, 0, 0, 0, 390, 391, 1, 0, 0, 0, 391, 392, 3, 52, 26, 0, 392, 393, 6, 25, -1, 0, 393, 395, 1, 0, 0, 0, 394, 384, 1, 0, 0, 0, 395, 398, 1, 0, 0, 0, 396, 394, 1, 0, 0, 0, 396, 397, 1, 0, 0, 0, 397, 51, 1, 0, 0, 0, 398, 396, 1, 0, 0, 0, 399, 400, 6, 26, -1, 0, 400, 401, 3, 54, 27, 0, 401, 412, 1, 0, 0, 0, 402, 405, 10, 2, 0, 0, 403, 406, 5, 20, 0, 0, 404, 406, 5, 21, 0, 0, 405, 403, 1, 0, 0, 0, 405, 404, 1, 0, 0, 0, 406, 407, 1, 0, 0, 0, 407, 408, 3, 54, 27, 0, 408, 409, 6, 26, -1, 0, 409, 411, 1, 0, 0, 0, 410, 402, 1, 0, 0, 0, 411, 414, 1, 0, 0, 0, 412, 410, 1, 0, 0, 0, 412, 413, 1, 0, 0, 0, 413, 53, 1, 0, 0, 0, 414, 412, 1, 0, 0, 0, 415, 416, 6, 27, -1, 0, 416, 417, 3, 56, 28, 0, 417, 428, 1, 0, 0, 0, 418, 421, 10, 2, 0, 0, 419, 422, 5, 22, 0, 0, 420, 422, 5, 23, 0, 0, 421, 419, 1, 0, 0, 0, 421, 420, 1, 0, 0, 0, 422, 423, 1, 0, 0, 0, 423, 424, 3, 56, 28, 0, 424, 425, 6, 27, -1, 0, 425, 427, 1, 0, 0, 0, 426, 418, 1, 0, 0, 0, 427, 430, 1, 0, 0, 0, 428, 426, 1, 0, 0, 0, 428, 429, 1, 0, 0, 0, 429, 55, 1, 0, 0, 0, 430, 428, 1, 0, 0, 0, 431, 436, 5, 32, 0, 0, 432, 436, 5, 21, 0, 0, 433, 436, 5, 33, 0, 0, 434, 436, 5, 34, 0, 0, 435, 431, 1, 0, 0, 0, 435, 432, 1, 0, 0, 0, 435, 433, 1, 0, 0, 0, 435, 434, 1, 0, 0, 0, 436, 437, 1, 0, 0, 0, 437, 438, 3, 58, 29, 0, 438, 439, 6, 28, -1, 0, 439, 442, 1, 0, 0, 0, 440, 442, 3, 58, 29, 0, 441, 435, 1, 0, 0, 0, 441, 440, 1, 0, 0, 0, 442, 57, 1, 0, 0, 0, 443, 451, 3, 60, 30, 0, 444, 445, 5, 49, 0, 0, 445, 446, 6, 29, -1, 0, 446, 447, 3, 10, 5, 0, 447, 448, 5, 50, 0, 0, 448, 450, 1, 0, 0, 0, 449, 444, 1, 0, 0, 0, 450, 453, 1, 0, 0, 0, 451, 449, 1, 0, 0, 0, 451, 452, 1, 0, 0, 0, 452, 457, 1, 0, 0, 0, 453, 451, 1, 0, 0, 0, 454, 456, 3, 40, 20, 0, 455, 454, 1, 0, 0, 0, 456, 459, 1, 0, 0, 0, 457, 455, 1, 0, 0, 0, 457, 458, 1, 0, 0, 0, 458, 59, 1, 0, 0, 0, 459, 457, 1, 0, 0, 0, 460, 473, 3, 64, 32, 0, 461, 473, 5, 62, 0, 0, 462, 473, 3, 62, 31, 0, 463, 473, 3, 36, 18, 0, 464, 473, 3, 34, 17, 0, 465, 473, 3, 32, 16, 0, 466, 473, 3, 20, 10, 0, 467, 469, 5, 49, 0, 0, 468, 470, 3, 46, 23, 0, 469, 468, 1, 0, 0, 0, 469, 470, 1, 0, 0, 0, 470, 471, 1, 0, 0, 0, 471, 473, 5, 50, 0, 0, 472, 460, 1, 0, 0, 0, 472, 461, 1, 0, 0, 0, 472, 462, 1, 0, 0, 0, 472, 463, 1, 0, 0, 0, 472, 464, 1, 0, 0, 0, 472, 465, 1, 0, 0, 0, 472, 466, 1, 0, 0, 0, 472, 467, 1, 0, 0, 0, 473, 61, 1, 0, 0, 0, 474, 475, 5, 42, 0, 0, 475, 476, 6, 31, -1, 0, 476, 477, 3, 4, 2, 0, 477, 478, 5, 53, 0, 0, 478, 479, 3, 44, 22, 0, 479, 480, 5, 54, 0, 0, 480, 481, 3, 10, 5, 0, 481, 63, 1, 0, 0, 0, 482, 489, 3, 68, 34, 0, 483, 489, 5, 63, 0, 0, 484, 489, 5, 60, 0, 0, 485, 489, 5, 61, 0, 0, 486, 489, 3, 66, 33, 0, 487, 489, 3, 70, 35, 0, 488, 482, 1, 0, 0, 0, 488, 483, 1, 0, 0, 0, 488, 484, 1, 0, 0, 0, 488, 485, 1, 0, 0, 0, 488, 486, 1, 0, 0, 0, 488, 487, 1, 0, 0, 0, 489, 65, 1, 0, 0, 0, 490, 491, 5, 51, 0, 0, 491, 492, 3, 10, 5, 0, 492, 493, 5, 52, 0, 0, 493, 67, 1, 0, 0, 0, 494, 495, 7, 2, 0, 0, 495, 69, 1, 0, 0, 0, 496, 497, 5, 11, 0, 0, 497, 498, 5, 49, 0, 0, 498, 499, 5, 58, 0, 0, 499, 500, 5, 62, 0, 0, 500, 501, 5, 50, 0, 0, 501, 71, 1, 0, 0, 0, 45, 74, 76, 94, 108, 113, 115, 132, 150, 153, 158, 173, 179, 188, 192, 196, 201, 237, 244, 247, 249, 253, 275, 281, 296, 313, 322, 341, 346, 350, 362, 371, 378, 389, 396, 405, 412, 421, 428, 435, 441, 451, 457, 469, 472, 488] \ No newline at end of file diff --git a/Phase1Template/untitled/gen/main/grammer/FunctionCraft.tokens b/Phase1Template/untitled/gen/main/grammer/FunctionCraft.tokens index 8deafa5..c103028 100644 --- a/Phase1Template/untitled/gen/main/grammer/FunctionCraft.tokens +++ b/Phase1Template/untitled/gen/main/grammer/FunctionCraft.tokens @@ -23,8 +23,8 @@ MULT=22 DIVIDE=23 EQUAL=24 NOT_EQUAL=25 -IS_NOT=26 -IS=27 +LESS_EQUAL_THAN=26 +GREATER_EQUAL_THAN=27 GREATER_THAN=28 LESS_THAN=29 AND=30 @@ -32,31 +32,37 @@ OR=31 NOT=32 INCREMENT=33 DECREMENT=34 -SEPARATOR=35 -APPEND=36 -TRUE=37 -FALSE=38 -BREAK=39 -NEXT=40 -ARROW=41 -ASSIGN=42 -LPAR=43 -RPAR=44 -LBRACK=45 -RBRACK=46 -LBRACE=47 -RBRACE=48 -COMMA=49 -DOT=50 -DOUBLEDOT=51 -COLON=52 -SEMICOLLON=53 -INT_VALUE=54 -FLOAT_VALUE=55 -IDENTIFIER=56 -STRING_VALUE=57 -COMMENT=58 -WS=59 +PATTERN_MATCHING_SEPARATOR=35 +SEPARATOR=36 +APPEND=37 +TRUE=38 +FALSE=39 +BREAK=40 +NEXT=41 +ARROW=42 +PLUS_ASSIGN=43 +MINUS_ASSIGN=44 +MULT_ASSIGN=45 +DIVIDE_ASSIGN=46 +MOD_ASSIGN=47 +ASSIGN=48 +LPAR=49 +RPAR=50 +LBRACK=51 +RBRACK=52 +LBRACE=53 +RBRACE=54 +COMMA=55 +DOT=56 +DOUBLEDOT=57 +COLON=58 +SEMICOLLON=59 +INT_VALUE=60 +FLOAT_VALUE=61 +IDENTIFIER=62 +STRING_VALUE=63 +COMMENT=64 +WS=65 'def'=1 'end'=2 'main'=3 @@ -82,8 +88,8 @@ WS=59 '/'=23 '=='=24 '!='=25 -'is not'=26 -'is'=27 +'<='=26 +'>='=27 '>'=28 '<'=29 '&&'=30 @@ -91,22 +97,28 @@ WS=59 '!'=32 '++'=33 '--'=34 -'|'=35 -'<<'=36 -'true'=37 -'false'=38 -'break'=39 -'next'=40 -'->'=41 -'='=42 -'('=43 -')'=44 -'['=45 -']'=46 -'{'=47 -'}'=48 -','=49 -'.'=50 -'..'=51 -':'=52 -';'=53 +' |'=35 +'|'=36 +'<<'=37 +'true'=38 +'false'=39 +'break'=40 +'next'=41 +'->'=42 +'+='=43 +'-='=44 +'*='=45 +'/='=46 +'%='=47 +'='=48 +'('=49 +')'=50 +'['=51 +']'=52 +'{'=53 +'}'=54 +','=55 +'.'=56 +'..'=57 +':'=58 +';'=59 diff --git a/Phase1Template/untitled/gen/main/grammer/FunctionCraftBaseListener.java b/Phase1Template/untitled/gen/main/grammer/FunctionCraftBaseListener.java index 132accc..0dd233f 100644 --- a/Phase1Template/untitled/gen/main/grammer/FunctionCraftBaseListener.java +++ b/Phase1Template/untitled/gen/main/grammer/FunctionCraftBaseListener.java @@ -305,61 +305,61 @@ public class FunctionCraftBaseListener implements FunctionCraftListener { * *

The default implementation does nothing.

*/ - @Override public void enterRelationalExpression(FunctionCraftParser.RelationalExpressionContext ctx) { } + @Override public void enterEqaulityExpression(FunctionCraftParser.EqaulityExpressionContext ctx) { } /** * {@inheritDoc} * *

The default implementation does nothing.

*/ - @Override public void exitRelationalExpression(FunctionCraftParser.RelationalExpressionContext ctx) { } + @Override public void exitEqaulityExpression(FunctionCraftParser.EqaulityExpressionContext ctx) { } /** * {@inheritDoc} * *

The default implementation does nothing.

*/ - @Override public void enterAdditiveExpression(FunctionCraftParser.AdditiveExpressionContext ctx) { } + @Override public void enterRelationalExpression(FunctionCraftParser.RelationalExpressionContext ctx) { } /** * {@inheritDoc} * *

The default implementation does nothing.

*/ - @Override public void exitAdditiveExpression(FunctionCraftParser.AdditiveExpressionContext ctx) { } + @Override public void exitRelationalExpression(FunctionCraftParser.RelationalExpressionContext ctx) { } /** * {@inheritDoc} * *

The default implementation does nothing.

*/ - @Override public void enterMultiplicativeExpression(FunctionCraftParser.MultiplicativeExpressionContext ctx) { } + @Override public void enterAdditiveExpression(FunctionCraftParser.AdditiveExpressionContext ctx) { } /** * {@inheritDoc} * *

The default implementation does nothing.

*/ - @Override public void exitMultiplicativeExpression(FunctionCraftParser.MultiplicativeExpressionContext ctx) { } + @Override public void exitAdditiveExpression(FunctionCraftParser.AdditiveExpressionContext ctx) { } /** * {@inheritDoc} * *

The default implementation does nothing.

*/ - @Override public void enterPreUnaryExpression(FunctionCraftParser.PreUnaryExpressionContext ctx) { } + @Override public void enterMultiplicativeExpression(FunctionCraftParser.MultiplicativeExpressionContext ctx) { } /** * {@inheritDoc} * *

The default implementation does nothing.

*/ - @Override public void exitPreUnaryExpression(FunctionCraftParser.PreUnaryExpressionContext ctx) { } + @Override public void exitMultiplicativeExpression(FunctionCraftParser.MultiplicativeExpressionContext ctx) { } /** * {@inheritDoc} * *

The default implementation does nothing.

*/ - @Override public void enterAppendExpression(FunctionCraftParser.AppendExpressionContext ctx) { } + @Override public void enterPreUnaryExpression(FunctionCraftParser.PreUnaryExpressionContext ctx) { } /** * {@inheritDoc} * *

The default implementation does nothing.

*/ - @Override public void exitAppendExpression(FunctionCraftParser.AppendExpressionContext ctx) { } + @Override public void exitPreUnaryExpression(FunctionCraftParser.PreUnaryExpressionContext ctx) { } /** * {@inheritDoc} * diff --git a/Phase1Template/untitled/gen/main/grammer/FunctionCraftBaseVisitor.java b/Phase1Template/untitled/gen/main/grammer/FunctionCraftBaseVisitor.java index 79e8e79..1dfad61 100644 --- a/Phase1Template/untitled/gen/main/grammer/FunctionCraftBaseVisitor.java +++ b/Phase1Template/untitled/gen/main/grammer/FunctionCraftBaseVisitor.java @@ -186,35 +186,35 @@ public class FunctionCraftBaseVisitor extends AbstractParseTreeVisitor imp *

The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.

*/ - @Override public T visitRelationalExpression(FunctionCraftParser.RelationalExpressionContext ctx) { return visitChildren(ctx); } + @Override public T visitEqaulityExpression(FunctionCraftParser.EqaulityExpressionContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * *

The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.

*/ - @Override public T visitAdditiveExpression(FunctionCraftParser.AdditiveExpressionContext ctx) { return visitChildren(ctx); } + @Override public T visitRelationalExpression(FunctionCraftParser.RelationalExpressionContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * *

The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.

*/ - @Override public T visitMultiplicativeExpression(FunctionCraftParser.MultiplicativeExpressionContext ctx) { return visitChildren(ctx); } + @Override public T visitAdditiveExpression(FunctionCraftParser.AdditiveExpressionContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * *

The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.

*/ - @Override public T visitPreUnaryExpression(FunctionCraftParser.PreUnaryExpressionContext ctx) { return visitChildren(ctx); } + @Override public T visitMultiplicativeExpression(FunctionCraftParser.MultiplicativeExpressionContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * *

The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.

*/ - @Override public T visitAppendExpression(FunctionCraftParser.AppendExpressionContext ctx) { return visitChildren(ctx); } + @Override public T visitPreUnaryExpression(FunctionCraftParser.PreUnaryExpressionContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * diff --git a/Phase1Template/untitled/gen/main/grammer/FunctionCraftLexer.interp b/Phase1Template/untitled/gen/main/grammer/FunctionCraftLexer.interp index 6b2f602..6d42009 100644 --- a/Phase1Template/untitled/gen/main/grammer/FunctionCraftLexer.interp +++ b/Phase1Template/untitled/gen/main/grammer/FunctionCraftLexer.interp @@ -25,8 +25,8 @@ null '/' '==' '!=' -'is not' -'is' +'<=' +'>=' '>' '<' '&&' @@ -34,6 +34,7 @@ null '!' '++' '--' +' |' '|' '<<' 'true' @@ -41,6 +42,11 @@ null 'break' 'next' '->' +'+=' +'-=' +'*=' +'/=' +'%=' '=' '(' ')' @@ -87,8 +93,8 @@ MULT DIVIDE EQUAL NOT_EQUAL -IS_NOT -IS +LESS_EQUAL_THAN +GREATER_EQUAL_THAN GREATER_THAN LESS_THAN AND @@ -96,6 +102,7 @@ OR NOT INCREMENT DECREMENT +PATTERN_MATCHING_SEPARATOR SEPARATOR APPEND TRUE @@ -103,6 +110,11 @@ FALSE BREAK NEXT ARROW +PLUS_ASSIGN +MINUS_ASSIGN +MULT_ASSIGN +DIVIDE_ASSIGN +MOD_ASSIGN ASSIGN LPAR RPAR @@ -148,8 +160,8 @@ MULT DIVIDE EQUAL NOT_EQUAL -IS_NOT -IS +LESS_EQUAL_THAN +GREATER_EQUAL_THAN GREATER_THAN LESS_THAN AND @@ -157,6 +169,7 @@ OR NOT INCREMENT DECREMENT +PATTERN_MATCHING_SEPARATOR SEPARATOR APPEND TRUE @@ -164,6 +177,11 @@ FALSE BREAK NEXT ARROW +PLUS_ASSIGN +MINUS_ASSIGN +MULT_ASSIGN +DIVIDE_ASSIGN +MOD_ASSIGN ASSIGN LPAR RPAR @@ -191,4 +209,4 @@ mode names: DEFAULT_MODE atn: -[4, 0, 59, 382, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 20, 1, 20, 1, 21, 1, 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 42, 1, 42, 1, 43, 1, 43, 1, 44, 1, 44, 1, 45, 1, 45, 1, 46, 1, 46, 1, 47, 1, 47, 1, 48, 1, 48, 1, 49, 1, 49, 1, 50, 1, 50, 1, 50, 1, 51, 1, 51, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 5, 53, 316, 8, 53, 10, 53, 12, 53, 319, 9, 53, 3, 53, 321, 8, 53, 1, 54, 5, 54, 324, 8, 54, 10, 54, 12, 54, 327, 9, 54, 1, 54, 1, 54, 4, 54, 331, 8, 54, 11, 54, 12, 54, 332, 1, 55, 1, 55, 5, 55, 337, 8, 55, 10, 55, 12, 55, 340, 9, 55, 1, 56, 1, 56, 5, 56, 344, 8, 56, 10, 56, 12, 56, 347, 9, 56, 1, 56, 1, 56, 1, 57, 1, 57, 5, 57, 353, 8, 57, 10, 57, 12, 57, 356, 9, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 5, 57, 366, 8, 57, 10, 57, 12, 57, 369, 9, 57, 1, 57, 1, 57, 1, 57, 1, 57, 3, 57, 375, 8, 57, 1, 57, 1, 57, 1, 58, 1, 58, 1, 58, 1, 58, 1, 367, 0, 59, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 47, 95, 48, 97, 49, 99, 50, 101, 51, 103, 52, 105, 53, 107, 54, 109, 55, 111, 56, 113, 57, 115, 58, 117, 59, 1, 0, 7, 1, 0, 49, 57, 1, 0, 48, 57, 3, 0, 65, 90, 95, 95, 97, 122, 4, 0, 48, 57, 65, 90, 95, 95, 97, 122, 1, 0, 34, 34, 2, 0, 10, 10, 13, 13, 3, 0, 9, 10, 13, 13, 32, 32, 390, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, 0, 0, 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 1, 119, 1, 0, 0, 0, 3, 123, 1, 0, 0, 0, 5, 127, 1, 0, 0, 0, 7, 132, 1, 0, 0, 0, 9, 137, 1, 0, 0, 0, 11, 142, 1, 0, 0, 0, 13, 146, 1, 0, 0, 0, 15, 153, 1, 0, 0, 0, 17, 156, 1, 0, 0, 0, 19, 161, 1, 0, 0, 0, 21, 168, 1, 0, 0, 0, 23, 175, 1, 0, 0, 0, 25, 183, 1, 0, 0, 0, 27, 189, 1, 0, 0, 0, 29, 194, 1, 0, 0, 0, 31, 198, 1, 0, 0, 0, 33, 201, 1, 0, 0, 0, 35, 204, 1, 0, 0, 0, 37, 209, 1, 0, 0, 0, 39, 215, 1, 0, 0, 0, 41, 217, 1, 0, 0, 0, 43, 219, 1, 0, 0, 0, 45, 221, 1, 0, 0, 0, 47, 223, 1, 0, 0, 0, 49, 226, 1, 0, 0, 0, 51, 229, 1, 0, 0, 0, 53, 236, 1, 0, 0, 0, 55, 239, 1, 0, 0, 0, 57, 241, 1, 0, 0, 0, 59, 243, 1, 0, 0, 0, 61, 246, 1, 0, 0, 0, 63, 249, 1, 0, 0, 0, 65, 251, 1, 0, 0, 0, 67, 254, 1, 0, 0, 0, 69, 257, 1, 0, 0, 0, 71, 259, 1, 0, 0, 0, 73, 262, 1, 0, 0, 0, 75, 267, 1, 0, 0, 0, 77, 273, 1, 0, 0, 0, 79, 279, 1, 0, 0, 0, 81, 284, 1, 0, 0, 0, 83, 287, 1, 0, 0, 0, 85, 289, 1, 0, 0, 0, 87, 291, 1, 0, 0, 0, 89, 293, 1, 0, 0, 0, 91, 295, 1, 0, 0, 0, 93, 297, 1, 0, 0, 0, 95, 299, 1, 0, 0, 0, 97, 301, 1, 0, 0, 0, 99, 303, 1, 0, 0, 0, 101, 305, 1, 0, 0, 0, 103, 308, 1, 0, 0, 0, 105, 310, 1, 0, 0, 0, 107, 320, 1, 0, 0, 0, 109, 325, 1, 0, 0, 0, 111, 334, 1, 0, 0, 0, 113, 341, 1, 0, 0, 0, 115, 374, 1, 0, 0, 0, 117, 378, 1, 0, 0, 0, 119, 120, 5, 100, 0, 0, 120, 121, 5, 101, 0, 0, 121, 122, 5, 102, 0, 0, 122, 2, 1, 0, 0, 0, 123, 124, 5, 101, 0, 0, 124, 125, 5, 110, 0, 0, 125, 126, 5, 100, 0, 0, 126, 4, 1, 0, 0, 0, 127, 128, 5, 109, 0, 0, 128, 129, 5, 97, 0, 0, 129, 130, 5, 105, 0, 0, 130, 131, 5, 110, 0, 0, 131, 6, 1, 0, 0, 0, 132, 133, 5, 112, 0, 0, 133, 134, 5, 117, 0, 0, 134, 135, 5, 116, 0, 0, 135, 136, 5, 115, 0, 0, 136, 8, 1, 0, 0, 0, 137, 138, 5, 112, 0, 0, 138, 139, 5, 117, 0, 0, 139, 140, 5, 115, 0, 0, 140, 141, 5, 104, 0, 0, 141, 10, 1, 0, 0, 0, 142, 143, 5, 108, 0, 0, 143, 144, 5, 101, 0, 0, 144, 145, 5, 110, 0, 0, 145, 12, 1, 0, 0, 0, 146, 147, 5, 114, 0, 0, 147, 148, 5, 101, 0, 0, 148, 149, 5, 116, 0, 0, 149, 150, 5, 117, 0, 0, 150, 151, 5, 114, 0, 0, 151, 152, 5, 110, 0, 0, 152, 14, 1, 0, 0, 0, 153, 154, 5, 105, 0, 0, 154, 155, 5, 102, 0, 0, 155, 16, 1, 0, 0, 0, 156, 157, 5, 101, 0, 0, 157, 158, 5, 108, 0, 0, 158, 159, 5, 115, 0, 0, 159, 160, 5, 101, 0, 0, 160, 18, 1, 0, 0, 0, 161, 162, 5, 101, 0, 0, 162, 163, 5, 108, 0, 0, 163, 164, 5, 115, 0, 0, 164, 165, 5, 101, 0, 0, 165, 166, 5, 105, 0, 0, 166, 167, 5, 102, 0, 0, 167, 20, 1, 0, 0, 0, 168, 169, 5, 109, 0, 0, 169, 170, 5, 101, 0, 0, 170, 171, 5, 116, 0, 0, 171, 172, 5, 104, 0, 0, 172, 173, 5, 111, 0, 0, 173, 174, 5, 100, 0, 0, 174, 22, 1, 0, 0, 0, 175, 176, 5, 112, 0, 0, 176, 177, 5, 97, 0, 0, 177, 178, 5, 116, 0, 0, 178, 179, 5, 116, 0, 0, 179, 180, 5, 101, 0, 0, 180, 181, 5, 114, 0, 0, 181, 182, 5, 110, 0, 0, 182, 24, 1, 0, 0, 0, 183, 184, 5, 109, 0, 0, 184, 185, 5, 97, 0, 0, 185, 186, 5, 116, 0, 0, 186, 187, 5, 99, 0, 0, 187, 188, 5, 104, 0, 0, 188, 26, 1, 0, 0, 0, 189, 190, 5, 108, 0, 0, 190, 191, 5, 111, 0, 0, 191, 192, 5, 111, 0, 0, 192, 193, 5, 112, 0, 0, 193, 28, 1, 0, 0, 0, 194, 195, 5, 102, 0, 0, 195, 196, 5, 111, 0, 0, 196, 197, 5, 114, 0, 0, 197, 30, 1, 0, 0, 0, 198, 199, 5, 105, 0, 0, 199, 200, 5, 110, 0, 0, 200, 32, 1, 0, 0, 0, 201, 202, 5, 100, 0, 0, 202, 203, 5, 111, 0, 0, 203, 34, 1, 0, 0, 0, 204, 205, 5, 99, 0, 0, 205, 206, 5, 104, 0, 0, 206, 207, 5, 111, 0, 0, 207, 208, 5, 112, 0, 0, 208, 36, 1, 0, 0, 0, 209, 210, 5, 99, 0, 0, 210, 211, 5, 104, 0, 0, 211, 212, 5, 111, 0, 0, 212, 213, 5, 109, 0, 0, 213, 214, 5, 112, 0, 0, 214, 38, 1, 0, 0, 0, 215, 216, 5, 43, 0, 0, 216, 40, 1, 0, 0, 0, 217, 218, 5, 45, 0, 0, 218, 42, 1, 0, 0, 0, 219, 220, 5, 42, 0, 0, 220, 44, 1, 0, 0, 0, 221, 222, 5, 47, 0, 0, 222, 46, 1, 0, 0, 0, 223, 224, 5, 61, 0, 0, 224, 225, 5, 61, 0, 0, 225, 48, 1, 0, 0, 0, 226, 227, 5, 33, 0, 0, 227, 228, 5, 61, 0, 0, 228, 50, 1, 0, 0, 0, 229, 230, 5, 105, 0, 0, 230, 231, 5, 115, 0, 0, 231, 232, 5, 32, 0, 0, 232, 233, 5, 110, 0, 0, 233, 234, 5, 111, 0, 0, 234, 235, 5, 116, 0, 0, 235, 52, 1, 0, 0, 0, 236, 237, 5, 105, 0, 0, 237, 238, 5, 115, 0, 0, 238, 54, 1, 0, 0, 0, 239, 240, 5, 62, 0, 0, 240, 56, 1, 0, 0, 0, 241, 242, 5, 60, 0, 0, 242, 58, 1, 0, 0, 0, 243, 244, 5, 38, 0, 0, 244, 245, 5, 38, 0, 0, 245, 60, 1, 0, 0, 0, 246, 247, 5, 124, 0, 0, 247, 248, 5, 124, 0, 0, 248, 62, 1, 0, 0, 0, 249, 250, 5, 33, 0, 0, 250, 64, 1, 0, 0, 0, 251, 252, 5, 43, 0, 0, 252, 253, 5, 43, 0, 0, 253, 66, 1, 0, 0, 0, 254, 255, 5, 45, 0, 0, 255, 256, 5, 45, 0, 0, 256, 68, 1, 0, 0, 0, 257, 258, 5, 124, 0, 0, 258, 70, 1, 0, 0, 0, 259, 260, 5, 60, 0, 0, 260, 261, 5, 60, 0, 0, 261, 72, 1, 0, 0, 0, 262, 263, 5, 116, 0, 0, 263, 264, 5, 114, 0, 0, 264, 265, 5, 117, 0, 0, 265, 266, 5, 101, 0, 0, 266, 74, 1, 0, 0, 0, 267, 268, 5, 102, 0, 0, 268, 269, 5, 97, 0, 0, 269, 270, 5, 108, 0, 0, 270, 271, 5, 115, 0, 0, 271, 272, 5, 101, 0, 0, 272, 76, 1, 0, 0, 0, 273, 274, 5, 98, 0, 0, 274, 275, 5, 114, 0, 0, 275, 276, 5, 101, 0, 0, 276, 277, 5, 97, 0, 0, 277, 278, 5, 107, 0, 0, 278, 78, 1, 0, 0, 0, 279, 280, 5, 110, 0, 0, 280, 281, 5, 101, 0, 0, 281, 282, 5, 120, 0, 0, 282, 283, 5, 116, 0, 0, 283, 80, 1, 0, 0, 0, 284, 285, 5, 45, 0, 0, 285, 286, 5, 62, 0, 0, 286, 82, 1, 0, 0, 0, 287, 288, 5, 61, 0, 0, 288, 84, 1, 0, 0, 0, 289, 290, 5, 40, 0, 0, 290, 86, 1, 0, 0, 0, 291, 292, 5, 41, 0, 0, 292, 88, 1, 0, 0, 0, 293, 294, 5, 91, 0, 0, 294, 90, 1, 0, 0, 0, 295, 296, 5, 93, 0, 0, 296, 92, 1, 0, 0, 0, 297, 298, 5, 123, 0, 0, 298, 94, 1, 0, 0, 0, 299, 300, 5, 125, 0, 0, 300, 96, 1, 0, 0, 0, 301, 302, 5, 44, 0, 0, 302, 98, 1, 0, 0, 0, 303, 304, 5, 46, 0, 0, 304, 100, 1, 0, 0, 0, 305, 306, 5, 46, 0, 0, 306, 307, 5, 46, 0, 0, 307, 102, 1, 0, 0, 0, 308, 309, 5, 58, 0, 0, 309, 104, 1, 0, 0, 0, 310, 311, 5, 59, 0, 0, 311, 106, 1, 0, 0, 0, 312, 321, 5, 48, 0, 0, 313, 317, 7, 0, 0, 0, 314, 316, 7, 1, 0, 0, 315, 314, 1, 0, 0, 0, 316, 319, 1, 0, 0, 0, 317, 315, 1, 0, 0, 0, 317, 318, 1, 0, 0, 0, 318, 321, 1, 0, 0, 0, 319, 317, 1, 0, 0, 0, 320, 312, 1, 0, 0, 0, 320, 313, 1, 0, 0, 0, 321, 108, 1, 0, 0, 0, 322, 324, 7, 1, 0, 0, 323, 322, 1, 0, 0, 0, 324, 327, 1, 0, 0, 0, 325, 323, 1, 0, 0, 0, 325, 326, 1, 0, 0, 0, 326, 328, 1, 0, 0, 0, 327, 325, 1, 0, 0, 0, 328, 330, 5, 46, 0, 0, 329, 331, 7, 1, 0, 0, 330, 329, 1, 0, 0, 0, 331, 332, 1, 0, 0, 0, 332, 330, 1, 0, 0, 0, 332, 333, 1, 0, 0, 0, 333, 110, 1, 0, 0, 0, 334, 338, 7, 2, 0, 0, 335, 337, 7, 3, 0, 0, 336, 335, 1, 0, 0, 0, 337, 340, 1, 0, 0, 0, 338, 336, 1, 0, 0, 0, 338, 339, 1, 0, 0, 0, 339, 112, 1, 0, 0, 0, 340, 338, 1, 0, 0, 0, 341, 345, 5, 34, 0, 0, 342, 344, 8, 4, 0, 0, 343, 342, 1, 0, 0, 0, 344, 347, 1, 0, 0, 0, 345, 343, 1, 0, 0, 0, 345, 346, 1, 0, 0, 0, 346, 348, 1, 0, 0, 0, 347, 345, 1, 0, 0, 0, 348, 349, 5, 34, 0, 0, 349, 114, 1, 0, 0, 0, 350, 354, 5, 35, 0, 0, 351, 353, 8, 5, 0, 0, 352, 351, 1, 0, 0, 0, 353, 356, 1, 0, 0, 0, 354, 352, 1, 0, 0, 0, 354, 355, 1, 0, 0, 0, 355, 375, 1, 0, 0, 0, 356, 354, 1, 0, 0, 0, 357, 358, 5, 61, 0, 0, 358, 359, 5, 98, 0, 0, 359, 360, 5, 101, 0, 0, 360, 361, 5, 103, 0, 0, 361, 362, 5, 105, 0, 0, 362, 363, 5, 110, 0, 0, 363, 367, 1, 0, 0, 0, 364, 366, 9, 0, 0, 0, 365, 364, 1, 0, 0, 0, 366, 369, 1, 0, 0, 0, 367, 368, 1, 0, 0, 0, 367, 365, 1, 0, 0, 0, 368, 370, 1, 0, 0, 0, 369, 367, 1, 0, 0, 0, 370, 371, 5, 61, 0, 0, 371, 372, 5, 101, 0, 0, 372, 373, 5, 110, 0, 0, 373, 375, 5, 100, 0, 0, 374, 350, 1, 0, 0, 0, 374, 357, 1, 0, 0, 0, 375, 376, 1, 0, 0, 0, 376, 377, 6, 57, 0, 0, 377, 116, 1, 0, 0, 0, 378, 379, 7, 6, 0, 0, 379, 380, 1, 0, 0, 0, 380, 381, 6, 58, 0, 0, 381, 118, 1, 0, 0, 0, 10, 0, 317, 320, 325, 332, 338, 345, 354, 367, 374, 1, 6, 0, 0] \ No newline at end of file +[4, 0, 65, 411, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 20, 1, 20, 1, 21, 1, 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, 47, 1, 47, 1, 48, 1, 48, 1, 49, 1, 49, 1, 50, 1, 50, 1, 51, 1, 51, 1, 52, 1, 52, 1, 53, 1, 53, 1, 54, 1, 54, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 5, 59, 345, 8, 59, 10, 59, 12, 59, 348, 9, 59, 3, 59, 350, 8, 59, 1, 60, 5, 60, 353, 8, 60, 10, 60, 12, 60, 356, 9, 60, 1, 60, 1, 60, 4, 60, 360, 8, 60, 11, 60, 12, 60, 361, 1, 61, 1, 61, 5, 61, 366, 8, 61, 10, 61, 12, 61, 369, 9, 61, 1, 62, 1, 62, 5, 62, 373, 8, 62, 10, 62, 12, 62, 376, 9, 62, 1, 62, 1, 62, 1, 63, 1, 63, 5, 63, 382, 8, 63, 10, 63, 12, 63, 385, 9, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 5, 63, 395, 8, 63, 10, 63, 12, 63, 398, 9, 63, 1, 63, 1, 63, 1, 63, 1, 63, 3, 63, 404, 8, 63, 1, 63, 1, 63, 1, 64, 1, 64, 1, 64, 1, 64, 1, 396, 0, 65, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 47, 95, 48, 97, 49, 99, 50, 101, 51, 103, 52, 105, 53, 107, 54, 109, 55, 111, 56, 113, 57, 115, 58, 117, 59, 119, 60, 121, 61, 123, 62, 125, 63, 127, 64, 129, 65, 1, 0, 7, 1, 0, 49, 57, 1, 0, 48, 57, 3, 0, 65, 90, 95, 95, 97, 122, 4, 0, 48, 57, 65, 90, 95, 95, 97, 122, 1, 0, 34, 34, 2, 0, 10, 10, 13, 13, 3, 0, 9, 10, 13, 13, 32, 32, 419, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, 0, 0, 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 119, 1, 0, 0, 0, 0, 121, 1, 0, 0, 0, 0, 123, 1, 0, 0, 0, 0, 125, 1, 0, 0, 0, 0, 127, 1, 0, 0, 0, 0, 129, 1, 0, 0, 0, 1, 131, 1, 0, 0, 0, 3, 135, 1, 0, 0, 0, 5, 139, 1, 0, 0, 0, 7, 144, 1, 0, 0, 0, 9, 149, 1, 0, 0, 0, 11, 154, 1, 0, 0, 0, 13, 158, 1, 0, 0, 0, 15, 165, 1, 0, 0, 0, 17, 168, 1, 0, 0, 0, 19, 173, 1, 0, 0, 0, 21, 180, 1, 0, 0, 0, 23, 187, 1, 0, 0, 0, 25, 195, 1, 0, 0, 0, 27, 201, 1, 0, 0, 0, 29, 206, 1, 0, 0, 0, 31, 210, 1, 0, 0, 0, 33, 213, 1, 0, 0, 0, 35, 216, 1, 0, 0, 0, 37, 221, 1, 0, 0, 0, 39, 227, 1, 0, 0, 0, 41, 229, 1, 0, 0, 0, 43, 231, 1, 0, 0, 0, 45, 233, 1, 0, 0, 0, 47, 235, 1, 0, 0, 0, 49, 238, 1, 0, 0, 0, 51, 241, 1, 0, 0, 0, 53, 244, 1, 0, 0, 0, 55, 247, 1, 0, 0, 0, 57, 249, 1, 0, 0, 0, 59, 251, 1, 0, 0, 0, 61, 254, 1, 0, 0, 0, 63, 257, 1, 0, 0, 0, 65, 259, 1, 0, 0, 0, 67, 262, 1, 0, 0, 0, 69, 265, 1, 0, 0, 0, 71, 271, 1, 0, 0, 0, 73, 273, 1, 0, 0, 0, 75, 276, 1, 0, 0, 0, 77, 281, 1, 0, 0, 0, 79, 287, 1, 0, 0, 0, 81, 293, 1, 0, 0, 0, 83, 298, 1, 0, 0, 0, 85, 301, 1, 0, 0, 0, 87, 304, 1, 0, 0, 0, 89, 307, 1, 0, 0, 0, 91, 310, 1, 0, 0, 0, 93, 313, 1, 0, 0, 0, 95, 316, 1, 0, 0, 0, 97, 318, 1, 0, 0, 0, 99, 320, 1, 0, 0, 0, 101, 322, 1, 0, 0, 0, 103, 324, 1, 0, 0, 0, 105, 326, 1, 0, 0, 0, 107, 328, 1, 0, 0, 0, 109, 330, 1, 0, 0, 0, 111, 332, 1, 0, 0, 0, 113, 334, 1, 0, 0, 0, 115, 337, 1, 0, 0, 0, 117, 339, 1, 0, 0, 0, 119, 349, 1, 0, 0, 0, 121, 354, 1, 0, 0, 0, 123, 363, 1, 0, 0, 0, 125, 370, 1, 0, 0, 0, 127, 403, 1, 0, 0, 0, 129, 407, 1, 0, 0, 0, 131, 132, 5, 100, 0, 0, 132, 133, 5, 101, 0, 0, 133, 134, 5, 102, 0, 0, 134, 2, 1, 0, 0, 0, 135, 136, 5, 101, 0, 0, 136, 137, 5, 110, 0, 0, 137, 138, 5, 100, 0, 0, 138, 4, 1, 0, 0, 0, 139, 140, 5, 109, 0, 0, 140, 141, 5, 97, 0, 0, 141, 142, 5, 105, 0, 0, 142, 143, 5, 110, 0, 0, 143, 6, 1, 0, 0, 0, 144, 145, 5, 112, 0, 0, 145, 146, 5, 117, 0, 0, 146, 147, 5, 116, 0, 0, 147, 148, 5, 115, 0, 0, 148, 8, 1, 0, 0, 0, 149, 150, 5, 112, 0, 0, 150, 151, 5, 117, 0, 0, 151, 152, 5, 115, 0, 0, 152, 153, 5, 104, 0, 0, 153, 10, 1, 0, 0, 0, 154, 155, 5, 108, 0, 0, 155, 156, 5, 101, 0, 0, 156, 157, 5, 110, 0, 0, 157, 12, 1, 0, 0, 0, 158, 159, 5, 114, 0, 0, 159, 160, 5, 101, 0, 0, 160, 161, 5, 116, 0, 0, 161, 162, 5, 117, 0, 0, 162, 163, 5, 114, 0, 0, 163, 164, 5, 110, 0, 0, 164, 14, 1, 0, 0, 0, 165, 166, 5, 105, 0, 0, 166, 167, 5, 102, 0, 0, 167, 16, 1, 0, 0, 0, 168, 169, 5, 101, 0, 0, 169, 170, 5, 108, 0, 0, 170, 171, 5, 115, 0, 0, 171, 172, 5, 101, 0, 0, 172, 18, 1, 0, 0, 0, 173, 174, 5, 101, 0, 0, 174, 175, 5, 108, 0, 0, 175, 176, 5, 115, 0, 0, 176, 177, 5, 101, 0, 0, 177, 178, 5, 105, 0, 0, 178, 179, 5, 102, 0, 0, 179, 20, 1, 0, 0, 0, 180, 181, 5, 109, 0, 0, 181, 182, 5, 101, 0, 0, 182, 183, 5, 116, 0, 0, 183, 184, 5, 104, 0, 0, 184, 185, 5, 111, 0, 0, 185, 186, 5, 100, 0, 0, 186, 22, 1, 0, 0, 0, 187, 188, 5, 112, 0, 0, 188, 189, 5, 97, 0, 0, 189, 190, 5, 116, 0, 0, 190, 191, 5, 116, 0, 0, 191, 192, 5, 101, 0, 0, 192, 193, 5, 114, 0, 0, 193, 194, 5, 110, 0, 0, 194, 24, 1, 0, 0, 0, 195, 196, 5, 109, 0, 0, 196, 197, 5, 97, 0, 0, 197, 198, 5, 116, 0, 0, 198, 199, 5, 99, 0, 0, 199, 200, 5, 104, 0, 0, 200, 26, 1, 0, 0, 0, 201, 202, 5, 108, 0, 0, 202, 203, 5, 111, 0, 0, 203, 204, 5, 111, 0, 0, 204, 205, 5, 112, 0, 0, 205, 28, 1, 0, 0, 0, 206, 207, 5, 102, 0, 0, 207, 208, 5, 111, 0, 0, 208, 209, 5, 114, 0, 0, 209, 30, 1, 0, 0, 0, 210, 211, 5, 105, 0, 0, 211, 212, 5, 110, 0, 0, 212, 32, 1, 0, 0, 0, 213, 214, 5, 100, 0, 0, 214, 215, 5, 111, 0, 0, 215, 34, 1, 0, 0, 0, 216, 217, 5, 99, 0, 0, 217, 218, 5, 104, 0, 0, 218, 219, 5, 111, 0, 0, 219, 220, 5, 112, 0, 0, 220, 36, 1, 0, 0, 0, 221, 222, 5, 99, 0, 0, 222, 223, 5, 104, 0, 0, 223, 224, 5, 111, 0, 0, 224, 225, 5, 109, 0, 0, 225, 226, 5, 112, 0, 0, 226, 38, 1, 0, 0, 0, 227, 228, 5, 43, 0, 0, 228, 40, 1, 0, 0, 0, 229, 230, 5, 45, 0, 0, 230, 42, 1, 0, 0, 0, 231, 232, 5, 42, 0, 0, 232, 44, 1, 0, 0, 0, 233, 234, 5, 47, 0, 0, 234, 46, 1, 0, 0, 0, 235, 236, 5, 61, 0, 0, 236, 237, 5, 61, 0, 0, 237, 48, 1, 0, 0, 0, 238, 239, 5, 33, 0, 0, 239, 240, 5, 61, 0, 0, 240, 50, 1, 0, 0, 0, 241, 242, 5, 60, 0, 0, 242, 243, 5, 61, 0, 0, 243, 52, 1, 0, 0, 0, 244, 245, 5, 62, 0, 0, 245, 246, 5, 61, 0, 0, 246, 54, 1, 0, 0, 0, 247, 248, 5, 62, 0, 0, 248, 56, 1, 0, 0, 0, 249, 250, 5, 60, 0, 0, 250, 58, 1, 0, 0, 0, 251, 252, 5, 38, 0, 0, 252, 253, 5, 38, 0, 0, 253, 60, 1, 0, 0, 0, 254, 255, 5, 124, 0, 0, 255, 256, 5, 124, 0, 0, 256, 62, 1, 0, 0, 0, 257, 258, 5, 33, 0, 0, 258, 64, 1, 0, 0, 0, 259, 260, 5, 43, 0, 0, 260, 261, 5, 43, 0, 0, 261, 66, 1, 0, 0, 0, 262, 263, 5, 45, 0, 0, 263, 264, 5, 45, 0, 0, 264, 68, 1, 0, 0, 0, 265, 266, 5, 32, 0, 0, 266, 267, 5, 32, 0, 0, 267, 268, 5, 32, 0, 0, 268, 269, 5, 32, 0, 0, 269, 270, 5, 124, 0, 0, 270, 70, 1, 0, 0, 0, 271, 272, 5, 124, 0, 0, 272, 72, 1, 0, 0, 0, 273, 274, 5, 60, 0, 0, 274, 275, 5, 60, 0, 0, 275, 74, 1, 0, 0, 0, 276, 277, 5, 116, 0, 0, 277, 278, 5, 114, 0, 0, 278, 279, 5, 117, 0, 0, 279, 280, 5, 101, 0, 0, 280, 76, 1, 0, 0, 0, 281, 282, 5, 102, 0, 0, 282, 283, 5, 97, 0, 0, 283, 284, 5, 108, 0, 0, 284, 285, 5, 115, 0, 0, 285, 286, 5, 101, 0, 0, 286, 78, 1, 0, 0, 0, 287, 288, 5, 98, 0, 0, 288, 289, 5, 114, 0, 0, 289, 290, 5, 101, 0, 0, 290, 291, 5, 97, 0, 0, 291, 292, 5, 107, 0, 0, 292, 80, 1, 0, 0, 0, 293, 294, 5, 110, 0, 0, 294, 295, 5, 101, 0, 0, 295, 296, 5, 120, 0, 0, 296, 297, 5, 116, 0, 0, 297, 82, 1, 0, 0, 0, 298, 299, 5, 45, 0, 0, 299, 300, 5, 62, 0, 0, 300, 84, 1, 0, 0, 0, 301, 302, 5, 43, 0, 0, 302, 303, 5, 61, 0, 0, 303, 86, 1, 0, 0, 0, 304, 305, 5, 45, 0, 0, 305, 306, 5, 61, 0, 0, 306, 88, 1, 0, 0, 0, 307, 308, 5, 42, 0, 0, 308, 309, 5, 61, 0, 0, 309, 90, 1, 0, 0, 0, 310, 311, 5, 47, 0, 0, 311, 312, 5, 61, 0, 0, 312, 92, 1, 0, 0, 0, 313, 314, 5, 37, 0, 0, 314, 315, 5, 61, 0, 0, 315, 94, 1, 0, 0, 0, 316, 317, 5, 61, 0, 0, 317, 96, 1, 0, 0, 0, 318, 319, 5, 40, 0, 0, 319, 98, 1, 0, 0, 0, 320, 321, 5, 41, 0, 0, 321, 100, 1, 0, 0, 0, 322, 323, 5, 91, 0, 0, 323, 102, 1, 0, 0, 0, 324, 325, 5, 93, 0, 0, 325, 104, 1, 0, 0, 0, 326, 327, 5, 123, 0, 0, 327, 106, 1, 0, 0, 0, 328, 329, 5, 125, 0, 0, 329, 108, 1, 0, 0, 0, 330, 331, 5, 44, 0, 0, 331, 110, 1, 0, 0, 0, 332, 333, 5, 46, 0, 0, 333, 112, 1, 0, 0, 0, 334, 335, 5, 46, 0, 0, 335, 336, 5, 46, 0, 0, 336, 114, 1, 0, 0, 0, 337, 338, 5, 58, 0, 0, 338, 116, 1, 0, 0, 0, 339, 340, 5, 59, 0, 0, 340, 118, 1, 0, 0, 0, 341, 350, 5, 48, 0, 0, 342, 346, 7, 0, 0, 0, 343, 345, 7, 1, 0, 0, 344, 343, 1, 0, 0, 0, 345, 348, 1, 0, 0, 0, 346, 344, 1, 0, 0, 0, 346, 347, 1, 0, 0, 0, 347, 350, 1, 0, 0, 0, 348, 346, 1, 0, 0, 0, 349, 341, 1, 0, 0, 0, 349, 342, 1, 0, 0, 0, 350, 120, 1, 0, 0, 0, 351, 353, 7, 1, 0, 0, 352, 351, 1, 0, 0, 0, 353, 356, 1, 0, 0, 0, 354, 352, 1, 0, 0, 0, 354, 355, 1, 0, 0, 0, 355, 357, 1, 0, 0, 0, 356, 354, 1, 0, 0, 0, 357, 359, 5, 46, 0, 0, 358, 360, 7, 1, 0, 0, 359, 358, 1, 0, 0, 0, 360, 361, 1, 0, 0, 0, 361, 359, 1, 0, 0, 0, 361, 362, 1, 0, 0, 0, 362, 122, 1, 0, 0, 0, 363, 367, 7, 2, 0, 0, 364, 366, 7, 3, 0, 0, 365, 364, 1, 0, 0, 0, 366, 369, 1, 0, 0, 0, 367, 365, 1, 0, 0, 0, 367, 368, 1, 0, 0, 0, 368, 124, 1, 0, 0, 0, 369, 367, 1, 0, 0, 0, 370, 374, 5, 34, 0, 0, 371, 373, 8, 4, 0, 0, 372, 371, 1, 0, 0, 0, 373, 376, 1, 0, 0, 0, 374, 372, 1, 0, 0, 0, 374, 375, 1, 0, 0, 0, 375, 377, 1, 0, 0, 0, 376, 374, 1, 0, 0, 0, 377, 378, 5, 34, 0, 0, 378, 126, 1, 0, 0, 0, 379, 383, 5, 35, 0, 0, 380, 382, 8, 5, 0, 0, 381, 380, 1, 0, 0, 0, 382, 385, 1, 0, 0, 0, 383, 381, 1, 0, 0, 0, 383, 384, 1, 0, 0, 0, 384, 404, 1, 0, 0, 0, 385, 383, 1, 0, 0, 0, 386, 387, 5, 61, 0, 0, 387, 388, 5, 98, 0, 0, 388, 389, 5, 101, 0, 0, 389, 390, 5, 103, 0, 0, 390, 391, 5, 105, 0, 0, 391, 392, 5, 110, 0, 0, 392, 396, 1, 0, 0, 0, 393, 395, 9, 0, 0, 0, 394, 393, 1, 0, 0, 0, 395, 398, 1, 0, 0, 0, 396, 397, 1, 0, 0, 0, 396, 394, 1, 0, 0, 0, 397, 399, 1, 0, 0, 0, 398, 396, 1, 0, 0, 0, 399, 400, 5, 61, 0, 0, 400, 401, 5, 101, 0, 0, 401, 402, 5, 110, 0, 0, 402, 404, 5, 100, 0, 0, 403, 379, 1, 0, 0, 0, 403, 386, 1, 0, 0, 0, 404, 405, 1, 0, 0, 0, 405, 406, 6, 63, 0, 0, 406, 128, 1, 0, 0, 0, 407, 408, 7, 6, 0, 0, 408, 409, 1, 0, 0, 0, 409, 410, 6, 64, 0, 0, 410, 130, 1, 0, 0, 0, 10, 0, 346, 349, 354, 361, 367, 374, 383, 396, 403, 1, 6, 0, 0] \ No newline at end of file diff --git a/Phase1Template/untitled/gen/main/grammer/FunctionCraftLexer.java b/Phase1Template/untitled/gen/main/grammer/FunctionCraftLexer.java index 0608d2d..62f6919 100644 --- a/Phase1Template/untitled/gen/main/grammer/FunctionCraftLexer.java +++ b/Phase1Template/untitled/gen/main/grammer/FunctionCraftLexer.java @@ -20,12 +20,13 @@ public class FunctionCraftLexer extends Lexer { DEF=1, END=2, MAIN=3, PUTS=4, PUSH=5, LEN=6, RETURN=7, IF=8, ELSE=9, ELSEIF=10, METHOD=11, PATTERN=12, MATCH=13, LOOP=14, FOR=15, IN=16, DO=17, CHOP=18, CHOMP=19, PLUS=20, MINUS=21, MULT=22, DIVIDE=23, EQUAL=24, NOT_EQUAL=25, - IS_NOT=26, IS=27, GREATER_THAN=28, LESS_THAN=29, AND=30, OR=31, NOT=32, - INCREMENT=33, DECREMENT=34, SEPARATOR=35, APPEND=36, TRUE=37, FALSE=38, - BREAK=39, NEXT=40, ARROW=41, ASSIGN=42, LPAR=43, RPAR=44, LBRACK=45, RBRACK=46, - LBRACE=47, RBRACE=48, COMMA=49, DOT=50, DOUBLEDOT=51, COLON=52, SEMICOLLON=53, - INT_VALUE=54, FLOAT_VALUE=55, IDENTIFIER=56, STRING_VALUE=57, COMMENT=58, - WS=59; + LESS_EQUAL_THAN=26, GREATER_EQUAL_THAN=27, GREATER_THAN=28, LESS_THAN=29, + AND=30, OR=31, NOT=32, INCREMENT=33, DECREMENT=34, PATTERN_MATCHING_SEPARATOR=35, + SEPARATOR=36, APPEND=37, TRUE=38, FALSE=39, BREAK=40, NEXT=41, ARROW=42, + PLUS_ASSIGN=43, MINUS_ASSIGN=44, MULT_ASSIGN=45, DIVIDE_ASSIGN=46, MOD_ASSIGN=47, + ASSIGN=48, LPAR=49, RPAR=50, LBRACK=51, RBRACK=52, LBRACE=53, RBRACE=54, + COMMA=55, DOT=56, DOUBLEDOT=57, COLON=58, SEMICOLLON=59, INT_VALUE=60, + FLOAT_VALUE=61, IDENTIFIER=62, STRING_VALUE=63, COMMENT=64, WS=65; public static String[] channelNames = { "DEFAULT_TOKEN_CHANNEL", "HIDDEN" }; @@ -38,12 +39,14 @@ private static String[] makeRuleNames() { return new String[] { "DEF", "END", "MAIN", "PUTS", "PUSH", "LEN", "RETURN", "IF", "ELSE", "ELSEIF", "METHOD", "PATTERN", "MATCH", "LOOP", "FOR", "IN", "DO", "CHOP", - "CHOMP", "PLUS", "MINUS", "MULT", "DIVIDE", "EQUAL", "NOT_EQUAL", "IS_NOT", - "IS", "GREATER_THAN", "LESS_THAN", "AND", "OR", "NOT", "INCREMENT", "DECREMENT", - "SEPARATOR", "APPEND", "TRUE", "FALSE", "BREAK", "NEXT", "ARROW", "ASSIGN", - "LPAR", "RPAR", "LBRACK", "RBRACK", "LBRACE", "RBRACE", "COMMA", "DOT", - "DOUBLEDOT", "COLON", "SEMICOLLON", "INT_VALUE", "FLOAT_VALUE", "IDENTIFIER", - "STRING_VALUE", "COMMENT", "WS" + "CHOMP", "PLUS", "MINUS", "MULT", "DIVIDE", "EQUAL", "NOT_EQUAL", "LESS_EQUAL_THAN", + "GREATER_EQUAL_THAN", "GREATER_THAN", "LESS_THAN", "AND", "OR", "NOT", + "INCREMENT", "DECREMENT", "PATTERN_MATCHING_SEPARATOR", "SEPARATOR", + "APPEND", "TRUE", "FALSE", "BREAK", "NEXT", "ARROW", "PLUS_ASSIGN", "MINUS_ASSIGN", + "MULT_ASSIGN", "DIVIDE_ASSIGN", "MOD_ASSIGN", "ASSIGN", "LPAR", "RPAR", + "LBRACK", "RBRACK", "LBRACE", "RBRACE", "COMMA", "DOT", "DOUBLEDOT", + "COLON", "SEMICOLLON", "INT_VALUE", "FLOAT_VALUE", "IDENTIFIER", "STRING_VALUE", + "COMMENT", "WS" }; } public static final String[] ruleNames = makeRuleNames(); @@ -53,10 +56,10 @@ private static String[] makeLiteralNames() { null, "'def'", "'end'", "'main'", "'puts'", "'push'", "'len'", "'return'", "'if'", "'else'", "'elseif'", "'method'", "'pattern'", "'match'", "'loop'", "'for'", "'in'", "'do'", "'chop'", "'chomp'", "'+'", "'-'", "'*'", "'/'", - "'=='", "'!='", "'is not'", "'is'", "'>'", "'<'", "'&&'", "'||'", "'!'", - "'++'", "'--'", "'|'", "'<<'", "'true'", "'false'", "'break'", "'next'", - "'->'", "'='", "'('", "')'", "'['", "']'", "'{'", "'}'", "','", "'.'", - "'..'", "':'", "';'" + "'=='", "'!='", "'<='", "'>='", "'>'", "'<'", "'&&'", "'||'", "'!'", + "'++'", "'--'", "' |'", "'|'", "'<<'", "'true'", "'false'", "'break'", + "'next'", "'->'", "'+='", "'-='", "'*='", "'/='", "'%='", "'='", "'('", + "')'", "'['", "']'", "'{'", "'}'", "','", "'.'", "'..'", "':'", "';'" }; } private static final String[] _LITERAL_NAMES = makeLiteralNames(); @@ -64,12 +67,14 @@ private static String[] makeSymbolicNames() { return new String[] { null, "DEF", "END", "MAIN", "PUTS", "PUSH", "LEN", "RETURN", "IF", "ELSE", "ELSEIF", "METHOD", "PATTERN", "MATCH", "LOOP", "FOR", "IN", "DO", "CHOP", - "CHOMP", "PLUS", "MINUS", "MULT", "DIVIDE", "EQUAL", "NOT_EQUAL", "IS_NOT", - "IS", "GREATER_THAN", "LESS_THAN", "AND", "OR", "NOT", "INCREMENT", "DECREMENT", - "SEPARATOR", "APPEND", "TRUE", "FALSE", "BREAK", "NEXT", "ARROW", "ASSIGN", - "LPAR", "RPAR", "LBRACK", "RBRACK", "LBRACE", "RBRACE", "COMMA", "DOT", - "DOUBLEDOT", "COLON", "SEMICOLLON", "INT_VALUE", "FLOAT_VALUE", "IDENTIFIER", - "STRING_VALUE", "COMMENT", "WS" + "CHOMP", "PLUS", "MINUS", "MULT", "DIVIDE", "EQUAL", "NOT_EQUAL", "LESS_EQUAL_THAN", + "GREATER_EQUAL_THAN", "GREATER_THAN", "LESS_THAN", "AND", "OR", "NOT", + "INCREMENT", "DECREMENT", "PATTERN_MATCHING_SEPARATOR", "SEPARATOR", + "APPEND", "TRUE", "FALSE", "BREAK", "NEXT", "ARROW", "PLUS_ASSIGN", "MINUS_ASSIGN", + "MULT_ASSIGN", "DIVIDE_ASSIGN", "MOD_ASSIGN", "ASSIGN", "LPAR", "RPAR", + "LBRACK", "RBRACK", "LBRACE", "RBRACE", "COMMA", "DOT", "DOUBLEDOT", + "COLON", "SEMICOLLON", "INT_VALUE", "FLOAT_VALUE", "IDENTIFIER", "STRING_VALUE", + "COMMENT", "WS" }; } private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames(); @@ -131,7 +136,7 @@ public FunctionCraftLexer(CharStream input) { public ATN getATN() { return _ATN; } public static final String _serializedATN = - "\u0004\u0000;\u017e\u0006\uffff\uffff\u0002\u0000\u0007\u0000\u0002\u0001"+ + "\u0004\u0000A\u019b\u0006\uffff\uffff\u0002\u0000\u0007\u0000\u0002\u0001"+ "\u0007\u0001\u0002\u0002\u0007\u0002\u0002\u0003\u0007\u0003\u0002\u0004"+ "\u0007\u0004\u0002\u0005\u0007\u0005\u0002\u0006\u0007\u0006\u0002\u0007"+ "\u0007\u0007\u0002\b\u0007\b\u0002\t\u0007\t\u0002\n\u0007\n\u0002\u000b"+ @@ -147,47 +152,50 @@ public FunctionCraftLexer(CharStream input) { "+\u0002,\u0007,\u0002-\u0007-\u0002.\u0007.\u0002/\u0007/\u00020\u0007"+ "0\u00021\u00071\u00022\u00072\u00023\u00073\u00024\u00074\u00025\u0007"+ "5\u00026\u00076\u00027\u00077\u00028\u00078\u00029\u00079\u0002:\u0007"+ - ":\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0001\u0001\u0001"+ - "\u0001\u0001\u0001\u0001\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002"+ - "\u0001\u0002\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003"+ - "\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0005"+ - "\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0006\u0001\u0006\u0001\u0006"+ - "\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0007\u0001\u0007"+ - "\u0001\u0007\u0001\b\u0001\b\u0001\b\u0001\b\u0001\b\u0001\t\u0001\t\u0001"+ - "\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\n\u0001\n\u0001\n\u0001\n\u0001"+ - "\n\u0001\n\u0001\n\u0001\u000b\u0001\u000b\u0001\u000b\u0001\u000b\u0001"+ - "\u000b\u0001\u000b\u0001\u000b\u0001\u000b\u0001\f\u0001\f\u0001\f\u0001"+ - "\f\u0001\f\u0001\f\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\u000e"+ - "\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000f\u0001\u000f\u0001\u000f"+ - "\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0011\u0001\u0011\u0001\u0011"+ - "\u0001\u0011\u0001\u0011\u0001\u0012\u0001\u0012\u0001\u0012\u0001\u0012"+ - "\u0001\u0012\u0001\u0012\u0001\u0013\u0001\u0013\u0001\u0014\u0001\u0014"+ - "\u0001\u0015\u0001\u0015\u0001\u0016\u0001\u0016\u0001\u0017\u0001\u0017"+ - "\u0001\u0017\u0001\u0018\u0001\u0018\u0001\u0018\u0001\u0019\u0001\u0019"+ - "\u0001\u0019\u0001\u0019\u0001\u0019\u0001\u0019\u0001\u0019\u0001\u001a"+ - "\u0001\u001a\u0001\u001a\u0001\u001b\u0001\u001b\u0001\u001c\u0001\u001c"+ - "\u0001\u001d\u0001\u001d\u0001\u001d\u0001\u001e\u0001\u001e\u0001\u001e"+ - "\u0001\u001f\u0001\u001f\u0001 \u0001 \u0001 \u0001!\u0001!\u0001!\u0001"+ - "\"\u0001\"\u0001#\u0001#\u0001#\u0001$\u0001$\u0001$\u0001$\u0001$\u0001"+ - "%\u0001%\u0001%\u0001%\u0001%\u0001%\u0001&\u0001&\u0001&\u0001&\u0001"+ - "&\u0001&\u0001\'\u0001\'\u0001\'\u0001\'\u0001\'\u0001(\u0001(\u0001("+ - "\u0001)\u0001)\u0001*\u0001*\u0001+\u0001+\u0001,\u0001,\u0001-\u0001"+ - "-\u0001.\u0001.\u0001/\u0001/\u00010\u00010\u00011\u00011\u00012\u0001"+ - "2\u00012\u00013\u00013\u00014\u00014\u00015\u00015\u00015\u00055\u013c"+ - "\b5\n5\f5\u013f\t5\u00035\u0141\b5\u00016\u00056\u0144\b6\n6\f6\u0147"+ - "\t6\u00016\u00016\u00046\u014b\b6\u000b6\f6\u014c\u00017\u00017\u0005"+ - "7\u0151\b7\n7\f7\u0154\t7\u00018\u00018\u00058\u0158\b8\n8\f8\u015b\t"+ - "8\u00018\u00018\u00019\u00019\u00059\u0161\b9\n9\f9\u0164\t9\u00019\u0001"+ - "9\u00019\u00019\u00019\u00019\u00019\u00019\u00059\u016e\b9\n9\f9\u0171"+ - "\t9\u00019\u00019\u00019\u00019\u00039\u0177\b9\u00019\u00019\u0001:\u0001"+ - ":\u0001:\u0001:\u0001\u016f\u0000;\u0001\u0001\u0003\u0002\u0005\u0003"+ - "\u0007\u0004\t\u0005\u000b\u0006\r\u0007\u000f\b\u0011\t\u0013\n\u0015"+ - "\u000b\u0017\f\u0019\r\u001b\u000e\u001d\u000f\u001f\u0010!\u0011#\u0012"+ - "%\u0013\'\u0014)\u0015+\u0016-\u0017/\u00181\u00193\u001a5\u001b7\u001c"+ - "9\u001d;\u001e=\u001f? A!C\"E#G$I%K&M\'O(Q)S*U+W,Y-[.]/_0a1c2e3g4i5k6"+ - "m7o8q9s:u;\u0001\u0000\u0007\u0001\u000019\u0001\u000009\u0003\u0000A"+ - "Z__az\u0004\u000009AZ__az\u0001\u0000\"\"\u0002\u0000\n\n\r\r\u0003\u0000"+ - "\t\n\r\r \u0186\u0000\u0001\u0001\u0000\u0000\u0000\u0000\u0003\u0001"+ + ":\u0002;\u0007;\u0002<\u0007<\u0002=\u0007=\u0002>\u0007>\u0002?\u0007"+ + "?\u0002@\u0007@\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0000\u0001"+ + "\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0002\u0001\u0002\u0001"+ + "\u0002\u0001\u0002\u0001\u0002\u0001\u0003\u0001\u0003\u0001\u0003\u0001"+ + "\u0003\u0001\u0003\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001"+ + "\u0004\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0006\u0001"+ + "\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001"+ + "\u0007\u0001\u0007\u0001\u0007\u0001\b\u0001\b\u0001\b\u0001\b\u0001\b"+ + "\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\n\u0001"+ + "\n\u0001\n\u0001\n\u0001\n\u0001\n\u0001\n\u0001\u000b\u0001\u000b\u0001"+ + "\u000b\u0001\u000b\u0001\u000b\u0001\u000b\u0001\u000b\u0001\u000b\u0001"+ + "\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\r\u0001\r\u0001\r\u0001"+ + "\r\u0001\r\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000f"+ + "\u0001\u000f\u0001\u000f\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0011"+ + "\u0001\u0011\u0001\u0011\u0001\u0011\u0001\u0011\u0001\u0012\u0001\u0012"+ + "\u0001\u0012\u0001\u0012\u0001\u0012\u0001\u0012\u0001\u0013\u0001\u0013"+ + "\u0001\u0014\u0001\u0014\u0001\u0015\u0001\u0015\u0001\u0016\u0001\u0016"+ + "\u0001\u0017\u0001\u0017\u0001\u0017\u0001\u0018\u0001\u0018\u0001\u0018"+ + "\u0001\u0019\u0001\u0019\u0001\u0019\u0001\u001a\u0001\u001a\u0001\u001a"+ + "\u0001\u001b\u0001\u001b\u0001\u001c\u0001\u001c\u0001\u001d\u0001\u001d"+ + "\u0001\u001d\u0001\u001e\u0001\u001e\u0001\u001e\u0001\u001f\u0001\u001f"+ + "\u0001 \u0001 \u0001 \u0001!\u0001!\u0001!\u0001\"\u0001\"\u0001\"\u0001"+ + "\"\u0001\"\u0001\"\u0001#\u0001#\u0001$\u0001$\u0001$\u0001%\u0001%\u0001"+ + "%\u0001%\u0001%\u0001&\u0001&\u0001&\u0001&\u0001&\u0001&\u0001\'\u0001"+ + "\'\u0001\'\u0001\'\u0001\'\u0001\'\u0001(\u0001(\u0001(\u0001(\u0001("+ + "\u0001)\u0001)\u0001)\u0001*\u0001*\u0001*\u0001+\u0001+\u0001+\u0001"+ + ",\u0001,\u0001,\u0001-\u0001-\u0001-\u0001.\u0001.\u0001.\u0001/\u0001"+ + "/\u00010\u00010\u00011\u00011\u00012\u00012\u00013\u00013\u00014\u0001"+ + "4\u00015\u00015\u00016\u00016\u00017\u00017\u00018\u00018\u00018\u0001"+ + "9\u00019\u0001:\u0001:\u0001;\u0001;\u0001;\u0005;\u0159\b;\n;\f;\u015c"+ + "\t;\u0003;\u015e\b;\u0001<\u0005<\u0161\b<\n<\f<\u0164\t<\u0001<\u0001"+ + "<\u0004<\u0168\b<\u000b<\f<\u0169\u0001=\u0001=\u0005=\u016e\b=\n=\f="+ + "\u0171\t=\u0001>\u0001>\u0005>\u0175\b>\n>\f>\u0178\t>\u0001>\u0001>\u0001"+ + "?\u0001?\u0005?\u017e\b?\n?\f?\u0181\t?\u0001?\u0001?\u0001?\u0001?\u0001"+ + "?\u0001?\u0001?\u0001?\u0005?\u018b\b?\n?\f?\u018e\t?\u0001?\u0001?\u0001"+ + "?\u0001?\u0003?\u0194\b?\u0001?\u0001?\u0001@\u0001@\u0001@\u0001@\u0001"+ + "\u018c\u0000A\u0001\u0001\u0003\u0002\u0005\u0003\u0007\u0004\t\u0005"+ + "\u000b\u0006\r\u0007\u000f\b\u0011\t\u0013\n\u0015\u000b\u0017\f\u0019"+ + "\r\u001b\u000e\u001d\u000f\u001f\u0010!\u0011#\u0012%\u0013\'\u0014)\u0015"+ + "+\u0016-\u0017/\u00181\u00193\u001a5\u001b7\u001c9\u001d;\u001e=\u001f"+ + "? A!C\"E#G$I%K&M\'O(Q)S*U+W,Y-[.]/_0a1c2e3g4i5k6m7o8q9s:u;w}?\u007f"+ + "@\u0081A\u0001\u0000\u0007\u0001\u000019\u0001\u000009\u0003\u0000AZ_"+ + "_az\u0004\u000009AZ__az\u0001\u0000\"\"\u0002\u0000\n\n\r\r\u0003\u0000"+ + "\t\n\r\r \u01a3\u0000\u0001\u0001\u0000\u0000\u0000\u0000\u0003\u0001"+ "\u0000\u0000\u0000\u0000\u0005\u0001\u0000\u0000\u0000\u0000\u0007\u0001"+ "\u0000\u0000\u0000\u0000\t\u0001\u0000\u0000\u0000\u0000\u000b\u0001\u0000"+ "\u0000\u0000\u0000\r\u0001\u0000\u0000\u0000\u0000\u000f\u0001\u0000\u0000"+ @@ -213,154 +221,168 @@ public FunctionCraftLexer(CharStream input) { "\u0000\u0000g\u0001\u0000\u0000\u0000\u0000i\u0001\u0000\u0000\u0000\u0000"+ "k\u0001\u0000\u0000\u0000\u0000m\u0001\u0000\u0000\u0000\u0000o\u0001"+ "\u0000\u0000\u0000\u0000q\u0001\u0000\u0000\u0000\u0000s\u0001\u0000\u0000"+ - "\u0000\u0000u\u0001\u0000\u0000\u0000\u0001w\u0001\u0000\u0000\u0000\u0003"+ - "{\u0001\u0000\u0000\u0000\u0005\u007f\u0001\u0000\u0000\u0000\u0007\u0084"+ - "\u0001\u0000\u0000\u0000\t\u0089\u0001\u0000\u0000\u0000\u000b\u008e\u0001"+ - "\u0000\u0000\u0000\r\u0092\u0001\u0000\u0000\u0000\u000f\u0099\u0001\u0000"+ - "\u0000\u0000\u0011\u009c\u0001\u0000\u0000\u0000\u0013\u00a1\u0001\u0000"+ - "\u0000\u0000\u0015\u00a8\u0001\u0000\u0000\u0000\u0017\u00af\u0001\u0000"+ - "\u0000\u0000\u0019\u00b7\u0001\u0000\u0000\u0000\u001b\u00bd\u0001\u0000"+ - "\u0000\u0000\u001d\u00c2\u0001\u0000\u0000\u0000\u001f\u00c6\u0001\u0000"+ - "\u0000\u0000!\u00c9\u0001\u0000\u0000\u0000#\u00cc\u0001\u0000\u0000\u0000"+ - "%\u00d1\u0001\u0000\u0000\u0000\'\u00d7\u0001\u0000\u0000\u0000)\u00d9"+ - "\u0001\u0000\u0000\u0000+\u00db\u0001\u0000\u0000\u0000-\u00dd\u0001\u0000"+ - "\u0000\u0000/\u00df\u0001\u0000\u0000\u00001\u00e2\u0001\u0000\u0000\u0000"+ - "3\u00e5\u0001\u0000\u0000\u00005\u00ec\u0001\u0000\u0000\u00007\u00ef"+ - "\u0001\u0000\u0000\u00009\u00f1\u0001\u0000\u0000\u0000;\u00f3\u0001\u0000"+ - "\u0000\u0000=\u00f6\u0001\u0000\u0000\u0000?\u00f9\u0001\u0000\u0000\u0000"+ - "A\u00fb\u0001\u0000\u0000\u0000C\u00fe\u0001\u0000\u0000\u0000E\u0101"+ - "\u0001\u0000\u0000\u0000G\u0103\u0001\u0000\u0000\u0000I\u0106\u0001\u0000"+ - "\u0000\u0000K\u010b\u0001\u0000\u0000\u0000M\u0111\u0001\u0000\u0000\u0000"+ - "O\u0117\u0001\u0000\u0000\u0000Q\u011c\u0001\u0000\u0000\u0000S\u011f"+ - "\u0001\u0000\u0000\u0000U\u0121\u0001\u0000\u0000\u0000W\u0123\u0001\u0000"+ - "\u0000\u0000Y\u0125\u0001\u0000\u0000\u0000[\u0127\u0001\u0000\u0000\u0000"+ - "]\u0129\u0001\u0000\u0000\u0000_\u012b\u0001\u0000\u0000\u0000a\u012d"+ - "\u0001\u0000\u0000\u0000c\u012f\u0001\u0000\u0000\u0000e\u0131\u0001\u0000"+ - "\u0000\u0000g\u0134\u0001\u0000\u0000\u0000i\u0136\u0001\u0000\u0000\u0000"+ - "k\u0140\u0001\u0000\u0000\u0000m\u0145\u0001\u0000\u0000\u0000o\u014e"+ - "\u0001\u0000\u0000\u0000q\u0155\u0001\u0000\u0000\u0000s\u0176\u0001\u0000"+ - "\u0000\u0000u\u017a\u0001\u0000\u0000\u0000wx\u0005d\u0000\u0000xy\u0005"+ - "e\u0000\u0000yz\u0005f\u0000\u0000z\u0002\u0001\u0000\u0000\u0000{|\u0005"+ - "e\u0000\u0000|}\u0005n\u0000\u0000}~\u0005d\u0000\u0000~\u0004\u0001\u0000"+ - "\u0000\u0000\u007f\u0080\u0005m\u0000\u0000\u0080\u0081\u0005a\u0000\u0000"+ - "\u0081\u0082\u0005i\u0000\u0000\u0082\u0083\u0005n\u0000\u0000\u0083\u0006"+ - "\u0001\u0000\u0000\u0000\u0084\u0085\u0005p\u0000\u0000\u0085\u0086\u0005"+ - "u\u0000\u0000\u0086\u0087\u0005t\u0000\u0000\u0087\u0088\u0005s\u0000"+ - "\u0000\u0088\b\u0001\u0000\u0000\u0000\u0089\u008a\u0005p\u0000\u0000"+ - "\u008a\u008b\u0005u\u0000\u0000\u008b\u008c\u0005s\u0000\u0000\u008c\u008d"+ - "\u0005h\u0000\u0000\u008d\n\u0001\u0000\u0000\u0000\u008e\u008f\u0005"+ - "l\u0000\u0000\u008f\u0090\u0005e\u0000\u0000\u0090\u0091\u0005n\u0000"+ - "\u0000\u0091\f\u0001\u0000\u0000\u0000\u0092\u0093\u0005r\u0000\u0000"+ - "\u0093\u0094\u0005e\u0000\u0000\u0094\u0095\u0005t\u0000\u0000\u0095\u0096"+ - "\u0005u\u0000\u0000\u0096\u0097\u0005r\u0000\u0000\u0097\u0098\u0005n"+ - "\u0000\u0000\u0098\u000e\u0001\u0000\u0000\u0000\u0099\u009a\u0005i\u0000"+ - "\u0000\u009a\u009b\u0005f\u0000\u0000\u009b\u0010\u0001\u0000\u0000\u0000"+ - "\u009c\u009d\u0005e\u0000\u0000\u009d\u009e\u0005l\u0000\u0000\u009e\u009f"+ - "\u0005s\u0000\u0000\u009f\u00a0\u0005e\u0000\u0000\u00a0\u0012\u0001\u0000"+ - "\u0000\u0000\u00a1\u00a2\u0005e\u0000\u0000\u00a2\u00a3\u0005l\u0000\u0000"+ - "\u00a3\u00a4\u0005s\u0000\u0000\u00a4\u00a5\u0005e\u0000\u0000\u00a5\u00a6"+ - "\u0005i\u0000\u0000\u00a6\u00a7\u0005f\u0000\u0000\u00a7\u0014\u0001\u0000"+ - "\u0000\u0000\u00a8\u00a9\u0005m\u0000\u0000\u00a9\u00aa\u0005e\u0000\u0000"+ - "\u00aa\u00ab\u0005t\u0000\u0000\u00ab\u00ac\u0005h\u0000\u0000\u00ac\u00ad"+ - "\u0005o\u0000\u0000\u00ad\u00ae\u0005d\u0000\u0000\u00ae\u0016\u0001\u0000"+ - "\u0000\u0000\u00af\u00b0\u0005p\u0000\u0000\u00b0\u00b1\u0005a\u0000\u0000"+ - "\u00b1\u00b2\u0005t\u0000\u0000\u00b2\u00b3\u0005t\u0000\u0000\u00b3\u00b4"+ - "\u0005e\u0000\u0000\u00b4\u00b5\u0005r\u0000\u0000\u00b5\u00b6\u0005n"+ - "\u0000\u0000\u00b6\u0018\u0001\u0000\u0000\u0000\u00b7\u00b8\u0005m\u0000"+ - "\u0000\u00b8\u00b9\u0005a\u0000\u0000\u00b9\u00ba\u0005t\u0000\u0000\u00ba"+ - "\u00bb\u0005c\u0000\u0000\u00bb\u00bc\u0005h\u0000\u0000\u00bc\u001a\u0001"+ - "\u0000\u0000\u0000\u00bd\u00be\u0005l\u0000\u0000\u00be\u00bf\u0005o\u0000"+ - "\u0000\u00bf\u00c0\u0005o\u0000\u0000\u00c0\u00c1\u0005p\u0000\u0000\u00c1"+ - "\u001c\u0001\u0000\u0000\u0000\u00c2\u00c3\u0005f\u0000\u0000\u00c3\u00c4"+ - "\u0005o\u0000\u0000\u00c4\u00c5\u0005r\u0000\u0000\u00c5\u001e\u0001\u0000"+ - "\u0000\u0000\u00c6\u00c7\u0005i\u0000\u0000\u00c7\u00c8\u0005n\u0000\u0000"+ - "\u00c8 \u0001\u0000\u0000\u0000\u00c9\u00ca\u0005d\u0000\u0000\u00ca\u00cb"+ - "\u0005o\u0000\u0000\u00cb\"\u0001\u0000\u0000\u0000\u00cc\u00cd\u0005"+ - "c\u0000\u0000\u00cd\u00ce\u0005h\u0000\u0000\u00ce\u00cf\u0005o\u0000"+ - "\u0000\u00cf\u00d0\u0005p\u0000\u0000\u00d0$\u0001\u0000\u0000\u0000\u00d1"+ - "\u00d2\u0005c\u0000\u0000\u00d2\u00d3\u0005h\u0000\u0000\u00d3\u00d4\u0005"+ - "o\u0000\u0000\u00d4\u00d5\u0005m\u0000\u0000\u00d5\u00d6\u0005p\u0000"+ - "\u0000\u00d6&\u0001\u0000\u0000\u0000\u00d7\u00d8\u0005+\u0000\u0000\u00d8"+ - "(\u0001\u0000\u0000\u0000\u00d9\u00da\u0005-\u0000\u0000\u00da*\u0001"+ - "\u0000\u0000\u0000\u00db\u00dc\u0005*\u0000\u0000\u00dc,\u0001\u0000\u0000"+ - "\u0000\u00dd\u00de\u0005/\u0000\u0000\u00de.\u0001\u0000\u0000\u0000\u00df"+ - "\u00e0\u0005=\u0000\u0000\u00e0\u00e1\u0005=\u0000\u0000\u00e10\u0001"+ - "\u0000\u0000\u0000\u00e2\u00e3\u0005!\u0000\u0000\u00e3\u00e4\u0005=\u0000"+ - "\u0000\u00e42\u0001\u0000\u0000\u0000\u00e5\u00e6\u0005i\u0000\u0000\u00e6"+ - "\u00e7\u0005s\u0000\u0000\u00e7\u00e8\u0005 \u0000\u0000\u00e8\u00e9\u0005"+ - "n\u0000\u0000\u00e9\u00ea\u0005o\u0000\u0000\u00ea\u00eb\u0005t\u0000"+ - "\u0000\u00eb4\u0001\u0000\u0000\u0000\u00ec\u00ed\u0005i\u0000\u0000\u00ed"+ - "\u00ee\u0005s\u0000\u0000\u00ee6\u0001\u0000\u0000\u0000\u00ef\u00f0\u0005"+ - ">\u0000\u0000\u00f08\u0001\u0000\u0000\u0000\u00f1\u00f2\u0005<\u0000"+ - "\u0000\u00f2:\u0001\u0000\u0000\u0000\u00f3\u00f4\u0005&\u0000\u0000\u00f4"+ - "\u00f5\u0005&\u0000\u0000\u00f5<\u0001\u0000\u0000\u0000\u00f6\u00f7\u0005"+ - "|\u0000\u0000\u00f7\u00f8\u0005|\u0000\u0000\u00f8>\u0001\u0000\u0000"+ - "\u0000\u00f9\u00fa\u0005!\u0000\u0000\u00fa@\u0001\u0000\u0000\u0000\u00fb"+ - "\u00fc\u0005+\u0000\u0000\u00fc\u00fd\u0005+\u0000\u0000\u00fdB\u0001"+ - "\u0000\u0000\u0000\u00fe\u00ff\u0005-\u0000\u0000\u00ff\u0100\u0005-\u0000"+ - "\u0000\u0100D\u0001\u0000\u0000\u0000\u0101\u0102\u0005|\u0000\u0000\u0102"+ - "F\u0001\u0000\u0000\u0000\u0103\u0104\u0005<\u0000\u0000\u0104\u0105\u0005"+ - "<\u0000\u0000\u0105H\u0001\u0000\u0000\u0000\u0106\u0107\u0005t\u0000"+ - "\u0000\u0107\u0108\u0005r\u0000\u0000\u0108\u0109\u0005u\u0000\u0000\u0109"+ - "\u010a\u0005e\u0000\u0000\u010aJ\u0001\u0000\u0000\u0000\u010b\u010c\u0005"+ - "f\u0000\u0000\u010c\u010d\u0005a\u0000\u0000\u010d\u010e\u0005l\u0000"+ - "\u0000\u010e\u010f\u0005s\u0000\u0000\u010f\u0110\u0005e\u0000\u0000\u0110"+ - "L\u0001\u0000\u0000\u0000\u0111\u0112\u0005b\u0000\u0000\u0112\u0113\u0005"+ - "r\u0000\u0000\u0113\u0114\u0005e\u0000\u0000\u0114\u0115\u0005a\u0000"+ - "\u0000\u0115\u0116\u0005k\u0000\u0000\u0116N\u0001\u0000\u0000\u0000\u0117"+ - "\u0118\u0005n\u0000\u0000\u0118\u0119\u0005e\u0000\u0000\u0119\u011a\u0005"+ - "x\u0000\u0000\u011a\u011b\u0005t\u0000\u0000\u011bP\u0001\u0000\u0000"+ - "\u0000\u011c\u011d\u0005-\u0000\u0000\u011d\u011e\u0005>\u0000\u0000\u011e"+ - "R\u0001\u0000\u0000\u0000\u011f\u0120\u0005=\u0000\u0000\u0120T\u0001"+ - "\u0000\u0000\u0000\u0121\u0122\u0005(\u0000\u0000\u0122V\u0001\u0000\u0000"+ - "\u0000\u0123\u0124\u0005)\u0000\u0000\u0124X\u0001\u0000\u0000\u0000\u0125"+ - "\u0126\u0005[\u0000\u0000\u0126Z\u0001\u0000\u0000\u0000\u0127\u0128\u0005"+ - "]\u0000\u0000\u0128\\\u0001\u0000\u0000\u0000\u0129\u012a\u0005{\u0000"+ - "\u0000\u012a^\u0001\u0000\u0000\u0000\u012b\u012c\u0005}\u0000\u0000\u012c"+ - "`\u0001\u0000\u0000\u0000\u012d\u012e\u0005,\u0000\u0000\u012eb\u0001"+ - "\u0000\u0000\u0000\u012f\u0130\u0005.\u0000\u0000\u0130d\u0001\u0000\u0000"+ - "\u0000\u0131\u0132\u0005.\u0000\u0000\u0132\u0133\u0005.\u0000\u0000\u0133"+ - "f\u0001\u0000\u0000\u0000\u0134\u0135\u0005:\u0000\u0000\u0135h\u0001"+ - "\u0000\u0000\u0000\u0136\u0137\u0005;\u0000\u0000\u0137j\u0001\u0000\u0000"+ - "\u0000\u0138\u0141\u00050\u0000\u0000\u0139\u013d\u0007\u0000\u0000\u0000"+ - "\u013a\u013c\u0007\u0001\u0000\u0000\u013b\u013a\u0001\u0000\u0000\u0000"+ - "\u013c\u013f\u0001\u0000\u0000\u0000\u013d\u013b\u0001\u0000\u0000\u0000"+ - "\u013d\u013e\u0001\u0000\u0000\u0000\u013e\u0141\u0001\u0000\u0000\u0000"+ - "\u013f\u013d\u0001\u0000\u0000\u0000\u0140\u0138\u0001\u0000\u0000\u0000"+ - "\u0140\u0139\u0001\u0000\u0000\u0000\u0141l\u0001\u0000\u0000\u0000\u0142"+ - "\u0144\u0007\u0001\u0000\u0000\u0143\u0142\u0001\u0000\u0000\u0000\u0144"+ - "\u0147\u0001\u0000\u0000\u0000\u0145\u0143\u0001\u0000\u0000\u0000\u0145"+ - "\u0146\u0001\u0000\u0000\u0000\u0146\u0148\u0001\u0000\u0000\u0000\u0147"+ - "\u0145\u0001\u0000\u0000\u0000\u0148\u014a\u0005.\u0000\u0000\u0149\u014b"+ - "\u0007\u0001\u0000\u0000\u014a\u0149\u0001\u0000\u0000\u0000\u014b\u014c"+ - "\u0001\u0000\u0000\u0000\u014c\u014a\u0001\u0000\u0000\u0000\u014c\u014d"+ - "\u0001\u0000\u0000\u0000\u014dn\u0001\u0000\u0000\u0000\u014e\u0152\u0007"+ - "\u0002\u0000\u0000\u014f\u0151\u0007\u0003\u0000\u0000\u0150\u014f\u0001"+ - "\u0000\u0000\u0000\u0151\u0154\u0001\u0000\u0000\u0000\u0152\u0150\u0001"+ - "\u0000\u0000\u0000\u0152\u0153\u0001\u0000\u0000\u0000\u0153p\u0001\u0000"+ - "\u0000\u0000\u0154\u0152\u0001\u0000\u0000\u0000\u0155\u0159\u0005\"\u0000"+ - "\u0000\u0156\u0158\b\u0004\u0000\u0000\u0157\u0156\u0001\u0000\u0000\u0000"+ - "\u0158\u015b\u0001\u0000\u0000\u0000\u0159\u0157\u0001\u0000\u0000\u0000"+ - "\u0159\u015a\u0001\u0000\u0000\u0000\u015a\u015c\u0001\u0000\u0000\u0000"+ - "\u015b\u0159\u0001\u0000\u0000\u0000\u015c\u015d\u0005\"\u0000\u0000\u015d"+ - "r\u0001\u0000\u0000\u0000\u015e\u0162\u0005#\u0000\u0000\u015f\u0161\b"+ - "\u0005\u0000\u0000\u0160\u015f\u0001\u0000\u0000\u0000\u0161\u0164\u0001"+ - "\u0000\u0000\u0000\u0162\u0160\u0001\u0000\u0000\u0000\u0162\u0163\u0001"+ - "\u0000\u0000\u0000\u0163\u0177\u0001\u0000\u0000\u0000\u0164\u0162\u0001"+ - "\u0000\u0000\u0000\u0165\u0166\u0005=\u0000\u0000\u0166\u0167\u0005b\u0000"+ - "\u0000\u0167\u0168\u0005e\u0000\u0000\u0168\u0169\u0005g\u0000\u0000\u0169"+ - "\u016a\u0005i\u0000\u0000\u016a\u016b\u0005n\u0000\u0000\u016b\u016f\u0001"+ - "\u0000\u0000\u0000\u016c\u016e\t\u0000\u0000\u0000\u016d\u016c\u0001\u0000"+ - "\u0000\u0000\u016e\u0171\u0001\u0000\u0000\u0000\u016f\u0170\u0001\u0000"+ - "\u0000\u0000\u016f\u016d\u0001\u0000\u0000\u0000\u0170\u0172\u0001\u0000"+ - "\u0000\u0000\u0171\u016f\u0001\u0000\u0000\u0000\u0172\u0173\u0005=\u0000"+ - "\u0000\u0173\u0174\u0005e\u0000\u0000\u0174\u0175\u0005n\u0000\u0000\u0175"+ - "\u0177\u0005d\u0000\u0000\u0176\u015e\u0001\u0000\u0000\u0000\u0176\u0165"+ - "\u0001\u0000\u0000\u0000\u0177\u0178\u0001\u0000\u0000\u0000\u0178\u0179"+ - "\u00069\u0000\u0000\u0179t\u0001\u0000\u0000\u0000\u017a\u017b\u0007\u0006"+ - "\u0000\u0000\u017b\u017c\u0001\u0000\u0000\u0000\u017c\u017d\u0006:\u0000"+ - "\u0000\u017dv\u0001\u0000\u0000\u0000\n\u0000\u013d\u0140\u0145\u014c"+ - "\u0152\u0159\u0162\u016f\u0176\u0001\u0006\u0000\u0000"; + "\u0000\u0000u\u0001\u0000\u0000\u0000\u0000w\u0001\u0000\u0000\u0000\u0000"+ + "y\u0001\u0000\u0000\u0000\u0000{\u0001\u0000\u0000\u0000\u0000}\u0001"+ + "\u0000\u0000\u0000\u0000\u007f\u0001\u0000\u0000\u0000\u0000\u0081\u0001"+ + "\u0000\u0000\u0000\u0001\u0083\u0001\u0000\u0000\u0000\u0003\u0087\u0001"+ + "\u0000\u0000\u0000\u0005\u008b\u0001\u0000\u0000\u0000\u0007\u0090\u0001"+ + "\u0000\u0000\u0000\t\u0095\u0001\u0000\u0000\u0000\u000b\u009a\u0001\u0000"+ + "\u0000\u0000\r\u009e\u0001\u0000\u0000\u0000\u000f\u00a5\u0001\u0000\u0000"+ + "\u0000\u0011\u00a8\u0001\u0000\u0000\u0000\u0013\u00ad\u0001\u0000\u0000"+ + "\u0000\u0015\u00b4\u0001\u0000\u0000\u0000\u0017\u00bb\u0001\u0000\u0000"+ + "\u0000\u0019\u00c3\u0001\u0000\u0000\u0000\u001b\u00c9\u0001\u0000\u0000"+ + "\u0000\u001d\u00ce\u0001\u0000\u0000\u0000\u001f\u00d2\u0001\u0000\u0000"+ + "\u0000!\u00d5\u0001\u0000\u0000\u0000#\u00d8\u0001\u0000\u0000\u0000%"+ + "\u00dd\u0001\u0000\u0000\u0000\'\u00e3\u0001\u0000\u0000\u0000)\u00e5"+ + "\u0001\u0000\u0000\u0000+\u00e7\u0001\u0000\u0000\u0000-\u00e9\u0001\u0000"+ + "\u0000\u0000/\u00eb\u0001\u0000\u0000\u00001\u00ee\u0001\u0000\u0000\u0000"+ + "3\u00f1\u0001\u0000\u0000\u00005\u00f4\u0001\u0000\u0000\u00007\u00f7"+ + "\u0001\u0000\u0000\u00009\u00f9\u0001\u0000\u0000\u0000;\u00fb\u0001\u0000"+ + "\u0000\u0000=\u00fe\u0001\u0000\u0000\u0000?\u0101\u0001\u0000\u0000\u0000"+ + "A\u0103\u0001\u0000\u0000\u0000C\u0106\u0001\u0000\u0000\u0000E\u0109"+ + "\u0001\u0000\u0000\u0000G\u010f\u0001\u0000\u0000\u0000I\u0111\u0001\u0000"+ + "\u0000\u0000K\u0114\u0001\u0000\u0000\u0000M\u0119\u0001\u0000\u0000\u0000"+ + "O\u011f\u0001\u0000\u0000\u0000Q\u0125\u0001\u0000\u0000\u0000S\u012a"+ + "\u0001\u0000\u0000\u0000U\u012d\u0001\u0000\u0000\u0000W\u0130\u0001\u0000"+ + "\u0000\u0000Y\u0133\u0001\u0000\u0000\u0000[\u0136\u0001\u0000\u0000\u0000"+ + "]\u0139\u0001\u0000\u0000\u0000_\u013c\u0001\u0000\u0000\u0000a\u013e"+ + "\u0001\u0000\u0000\u0000c\u0140\u0001\u0000\u0000\u0000e\u0142\u0001\u0000"+ + "\u0000\u0000g\u0144\u0001\u0000\u0000\u0000i\u0146\u0001\u0000\u0000\u0000"+ + "k\u0148\u0001\u0000\u0000\u0000m\u014a\u0001\u0000\u0000\u0000o\u014c"+ + "\u0001\u0000\u0000\u0000q\u014e\u0001\u0000\u0000\u0000s\u0151\u0001\u0000"+ + "\u0000\u0000u\u0153\u0001\u0000\u0000\u0000w\u015d\u0001\u0000\u0000\u0000"+ + "y\u0162\u0001\u0000\u0000\u0000{\u016b\u0001\u0000\u0000\u0000}\u0172"+ + "\u0001\u0000\u0000\u0000\u007f\u0193\u0001\u0000\u0000\u0000\u0081\u0197"+ + "\u0001\u0000\u0000\u0000\u0083\u0084\u0005d\u0000\u0000\u0084\u0085\u0005"+ + "e\u0000\u0000\u0085\u0086\u0005f\u0000\u0000\u0086\u0002\u0001\u0000\u0000"+ + "\u0000\u0087\u0088\u0005e\u0000\u0000\u0088\u0089\u0005n\u0000\u0000\u0089"+ + "\u008a\u0005d\u0000\u0000\u008a\u0004\u0001\u0000\u0000\u0000\u008b\u008c"+ + "\u0005m\u0000\u0000\u008c\u008d\u0005a\u0000\u0000\u008d\u008e\u0005i"+ + "\u0000\u0000\u008e\u008f\u0005n\u0000\u0000\u008f\u0006\u0001\u0000\u0000"+ + "\u0000\u0090\u0091\u0005p\u0000\u0000\u0091\u0092\u0005u\u0000\u0000\u0092"+ + "\u0093\u0005t\u0000\u0000\u0093\u0094\u0005s\u0000\u0000\u0094\b\u0001"+ + "\u0000\u0000\u0000\u0095\u0096\u0005p\u0000\u0000\u0096\u0097\u0005u\u0000"+ + "\u0000\u0097\u0098\u0005s\u0000\u0000\u0098\u0099\u0005h\u0000\u0000\u0099"+ + "\n\u0001\u0000\u0000\u0000\u009a\u009b\u0005l\u0000\u0000\u009b\u009c"+ + "\u0005e\u0000\u0000\u009c\u009d\u0005n\u0000\u0000\u009d\f\u0001\u0000"+ + "\u0000\u0000\u009e\u009f\u0005r\u0000\u0000\u009f\u00a0\u0005e\u0000\u0000"+ + "\u00a0\u00a1\u0005t\u0000\u0000\u00a1\u00a2\u0005u\u0000\u0000\u00a2\u00a3"+ + "\u0005r\u0000\u0000\u00a3\u00a4\u0005n\u0000\u0000\u00a4\u000e\u0001\u0000"+ + "\u0000\u0000\u00a5\u00a6\u0005i\u0000\u0000\u00a6\u00a7\u0005f\u0000\u0000"+ + "\u00a7\u0010\u0001\u0000\u0000\u0000\u00a8\u00a9\u0005e\u0000\u0000\u00a9"+ + "\u00aa\u0005l\u0000\u0000\u00aa\u00ab\u0005s\u0000\u0000\u00ab\u00ac\u0005"+ + "e\u0000\u0000\u00ac\u0012\u0001\u0000\u0000\u0000\u00ad\u00ae\u0005e\u0000"+ + "\u0000\u00ae\u00af\u0005l\u0000\u0000\u00af\u00b0\u0005s\u0000\u0000\u00b0"+ + "\u00b1\u0005e\u0000\u0000\u00b1\u00b2\u0005i\u0000\u0000\u00b2\u00b3\u0005"+ + "f\u0000\u0000\u00b3\u0014\u0001\u0000\u0000\u0000\u00b4\u00b5\u0005m\u0000"+ + "\u0000\u00b5\u00b6\u0005e\u0000\u0000\u00b6\u00b7\u0005t\u0000\u0000\u00b7"+ + "\u00b8\u0005h\u0000\u0000\u00b8\u00b9\u0005o\u0000\u0000\u00b9\u00ba\u0005"+ + "d\u0000\u0000\u00ba\u0016\u0001\u0000\u0000\u0000\u00bb\u00bc\u0005p\u0000"+ + "\u0000\u00bc\u00bd\u0005a\u0000\u0000\u00bd\u00be\u0005t\u0000\u0000\u00be"+ + "\u00bf\u0005t\u0000\u0000\u00bf\u00c0\u0005e\u0000\u0000\u00c0\u00c1\u0005"+ + "r\u0000\u0000\u00c1\u00c2\u0005n\u0000\u0000\u00c2\u0018\u0001\u0000\u0000"+ + "\u0000\u00c3\u00c4\u0005m\u0000\u0000\u00c4\u00c5\u0005a\u0000\u0000\u00c5"+ + "\u00c6\u0005t\u0000\u0000\u00c6\u00c7\u0005c\u0000\u0000\u00c7\u00c8\u0005"+ + "h\u0000\u0000\u00c8\u001a\u0001\u0000\u0000\u0000\u00c9\u00ca\u0005l\u0000"+ + "\u0000\u00ca\u00cb\u0005o\u0000\u0000\u00cb\u00cc\u0005o\u0000\u0000\u00cc"+ + "\u00cd\u0005p\u0000\u0000\u00cd\u001c\u0001\u0000\u0000\u0000\u00ce\u00cf"+ + "\u0005f\u0000\u0000\u00cf\u00d0\u0005o\u0000\u0000\u00d0\u00d1\u0005r"+ + "\u0000\u0000\u00d1\u001e\u0001\u0000\u0000\u0000\u00d2\u00d3\u0005i\u0000"+ + "\u0000\u00d3\u00d4\u0005n\u0000\u0000\u00d4 \u0001\u0000\u0000\u0000\u00d5"+ + "\u00d6\u0005d\u0000\u0000\u00d6\u00d7\u0005o\u0000\u0000\u00d7\"\u0001"+ + "\u0000\u0000\u0000\u00d8\u00d9\u0005c\u0000\u0000\u00d9\u00da\u0005h\u0000"+ + "\u0000\u00da\u00db\u0005o\u0000\u0000\u00db\u00dc\u0005p\u0000\u0000\u00dc"+ + "$\u0001\u0000\u0000\u0000\u00dd\u00de\u0005c\u0000\u0000\u00de\u00df\u0005"+ + "h\u0000\u0000\u00df\u00e0\u0005o\u0000\u0000\u00e0\u00e1\u0005m\u0000"+ + "\u0000\u00e1\u00e2\u0005p\u0000\u0000\u00e2&\u0001\u0000\u0000\u0000\u00e3"+ + "\u00e4\u0005+\u0000\u0000\u00e4(\u0001\u0000\u0000\u0000\u00e5\u00e6\u0005"+ + "-\u0000\u0000\u00e6*\u0001\u0000\u0000\u0000\u00e7\u00e8\u0005*\u0000"+ + "\u0000\u00e8,\u0001\u0000\u0000\u0000\u00e9\u00ea\u0005/\u0000\u0000\u00ea"+ + ".\u0001\u0000\u0000\u0000\u00eb\u00ec\u0005=\u0000\u0000\u00ec\u00ed\u0005"+ + "=\u0000\u0000\u00ed0\u0001\u0000\u0000\u0000\u00ee\u00ef\u0005!\u0000"+ + "\u0000\u00ef\u00f0\u0005=\u0000\u0000\u00f02\u0001\u0000\u0000\u0000\u00f1"+ + "\u00f2\u0005<\u0000\u0000\u00f2\u00f3\u0005=\u0000\u0000\u00f34\u0001"+ + "\u0000\u0000\u0000\u00f4\u00f5\u0005>\u0000\u0000\u00f5\u00f6\u0005=\u0000"+ + "\u0000\u00f66\u0001\u0000\u0000\u0000\u00f7\u00f8\u0005>\u0000\u0000\u00f8"+ + "8\u0001\u0000\u0000\u0000\u00f9\u00fa\u0005<\u0000\u0000\u00fa:\u0001"+ + "\u0000\u0000\u0000\u00fb\u00fc\u0005&\u0000\u0000\u00fc\u00fd\u0005&\u0000"+ + "\u0000\u00fd<\u0001\u0000\u0000\u0000\u00fe\u00ff\u0005|\u0000\u0000\u00ff"+ + "\u0100\u0005|\u0000\u0000\u0100>\u0001\u0000\u0000\u0000\u0101\u0102\u0005"+ + "!\u0000\u0000\u0102@\u0001\u0000\u0000\u0000\u0103\u0104\u0005+\u0000"+ + "\u0000\u0104\u0105\u0005+\u0000\u0000\u0105B\u0001\u0000\u0000\u0000\u0106"+ + "\u0107\u0005-\u0000\u0000\u0107\u0108\u0005-\u0000\u0000\u0108D\u0001"+ + "\u0000\u0000\u0000\u0109\u010a\u0005 \u0000\u0000\u010a\u010b\u0005 \u0000"+ + "\u0000\u010b\u010c\u0005 \u0000\u0000\u010c\u010d\u0005 \u0000\u0000\u010d"+ + "\u010e\u0005|\u0000\u0000\u010eF\u0001\u0000\u0000\u0000\u010f\u0110\u0005"+ + "|\u0000\u0000\u0110H\u0001\u0000\u0000\u0000\u0111\u0112\u0005<\u0000"+ + "\u0000\u0112\u0113\u0005<\u0000\u0000\u0113J\u0001\u0000\u0000\u0000\u0114"+ + "\u0115\u0005t\u0000\u0000\u0115\u0116\u0005r\u0000\u0000\u0116\u0117\u0005"+ + "u\u0000\u0000\u0117\u0118\u0005e\u0000\u0000\u0118L\u0001\u0000\u0000"+ + "\u0000\u0119\u011a\u0005f\u0000\u0000\u011a\u011b\u0005a\u0000\u0000\u011b"+ + "\u011c\u0005l\u0000\u0000\u011c\u011d\u0005s\u0000\u0000\u011d\u011e\u0005"+ + "e\u0000\u0000\u011eN\u0001\u0000\u0000\u0000\u011f\u0120\u0005b\u0000"+ + "\u0000\u0120\u0121\u0005r\u0000\u0000\u0121\u0122\u0005e\u0000\u0000\u0122"+ + "\u0123\u0005a\u0000\u0000\u0123\u0124\u0005k\u0000\u0000\u0124P\u0001"+ + "\u0000\u0000\u0000\u0125\u0126\u0005n\u0000\u0000\u0126\u0127\u0005e\u0000"+ + "\u0000\u0127\u0128\u0005x\u0000\u0000\u0128\u0129\u0005t\u0000\u0000\u0129"+ + "R\u0001\u0000\u0000\u0000\u012a\u012b\u0005-\u0000\u0000\u012b\u012c\u0005"+ + ">\u0000\u0000\u012cT\u0001\u0000\u0000\u0000\u012d\u012e\u0005+\u0000"+ + "\u0000\u012e\u012f\u0005=\u0000\u0000\u012fV\u0001\u0000\u0000\u0000\u0130"+ + "\u0131\u0005-\u0000\u0000\u0131\u0132\u0005=\u0000\u0000\u0132X\u0001"+ + "\u0000\u0000\u0000\u0133\u0134\u0005*\u0000\u0000\u0134\u0135\u0005=\u0000"+ + "\u0000\u0135Z\u0001\u0000\u0000\u0000\u0136\u0137\u0005/\u0000\u0000\u0137"+ + "\u0138\u0005=\u0000\u0000\u0138\\\u0001\u0000\u0000\u0000\u0139\u013a"+ + "\u0005%\u0000\u0000\u013a\u013b\u0005=\u0000\u0000\u013b^\u0001\u0000"+ + "\u0000\u0000\u013c\u013d\u0005=\u0000\u0000\u013d`\u0001\u0000\u0000\u0000"+ + "\u013e\u013f\u0005(\u0000\u0000\u013fb\u0001\u0000\u0000\u0000\u0140\u0141"+ + "\u0005)\u0000\u0000\u0141d\u0001\u0000\u0000\u0000\u0142\u0143\u0005["+ + "\u0000\u0000\u0143f\u0001\u0000\u0000\u0000\u0144\u0145\u0005]\u0000\u0000"+ + "\u0145h\u0001\u0000\u0000\u0000\u0146\u0147\u0005{\u0000\u0000\u0147j"+ + "\u0001\u0000\u0000\u0000\u0148\u0149\u0005}\u0000\u0000\u0149l\u0001\u0000"+ + "\u0000\u0000\u014a\u014b\u0005,\u0000\u0000\u014bn\u0001\u0000\u0000\u0000"+ + "\u014c\u014d\u0005.\u0000\u0000\u014dp\u0001\u0000\u0000\u0000\u014e\u014f"+ + "\u0005.\u0000\u0000\u014f\u0150\u0005.\u0000\u0000\u0150r\u0001\u0000"+ + "\u0000\u0000\u0151\u0152\u0005:\u0000\u0000\u0152t\u0001\u0000\u0000\u0000"+ + "\u0153\u0154\u0005;\u0000\u0000\u0154v\u0001\u0000\u0000\u0000\u0155\u015e"+ + "\u00050\u0000\u0000\u0156\u015a\u0007\u0000\u0000\u0000\u0157\u0159\u0007"+ + "\u0001\u0000\u0000\u0158\u0157\u0001\u0000\u0000\u0000\u0159\u015c\u0001"+ + "\u0000\u0000\u0000\u015a\u0158\u0001\u0000\u0000\u0000\u015a\u015b\u0001"+ + "\u0000\u0000\u0000\u015b\u015e\u0001\u0000\u0000\u0000\u015c\u015a\u0001"+ + "\u0000\u0000\u0000\u015d\u0155\u0001\u0000\u0000\u0000\u015d\u0156\u0001"+ + "\u0000\u0000\u0000\u015ex\u0001\u0000\u0000\u0000\u015f\u0161\u0007\u0001"+ + "\u0000\u0000\u0160\u015f\u0001\u0000\u0000\u0000\u0161\u0164\u0001\u0000"+ + "\u0000\u0000\u0162\u0160\u0001\u0000\u0000\u0000\u0162\u0163\u0001\u0000"+ + "\u0000\u0000\u0163\u0165\u0001\u0000\u0000\u0000\u0164\u0162\u0001\u0000"+ + "\u0000\u0000\u0165\u0167\u0005.\u0000\u0000\u0166\u0168\u0007\u0001\u0000"+ + "\u0000\u0167\u0166\u0001\u0000\u0000\u0000\u0168\u0169\u0001\u0000\u0000"+ + "\u0000\u0169\u0167\u0001\u0000\u0000\u0000\u0169\u016a\u0001\u0000\u0000"+ + "\u0000\u016az\u0001\u0000\u0000\u0000\u016b\u016f\u0007\u0002\u0000\u0000"+ + "\u016c\u016e\u0007\u0003\u0000\u0000\u016d\u016c\u0001\u0000\u0000\u0000"+ + "\u016e\u0171\u0001\u0000\u0000\u0000\u016f\u016d\u0001\u0000\u0000\u0000"+ + "\u016f\u0170\u0001\u0000\u0000\u0000\u0170|\u0001\u0000\u0000\u0000\u0171"+ + "\u016f\u0001\u0000\u0000\u0000\u0172\u0176\u0005\"\u0000\u0000\u0173\u0175"+ + "\b\u0004\u0000\u0000\u0174\u0173\u0001\u0000\u0000\u0000\u0175\u0178\u0001"+ + "\u0000\u0000\u0000\u0176\u0174\u0001\u0000\u0000\u0000\u0176\u0177\u0001"+ + "\u0000\u0000\u0000\u0177\u0179\u0001\u0000\u0000\u0000\u0178\u0176\u0001"+ + "\u0000\u0000\u0000\u0179\u017a\u0005\"\u0000\u0000\u017a~\u0001\u0000"+ + "\u0000\u0000\u017b\u017f\u0005#\u0000\u0000\u017c\u017e\b\u0005\u0000"+ + "\u0000\u017d\u017c\u0001\u0000\u0000\u0000\u017e\u0181\u0001\u0000\u0000"+ + "\u0000\u017f\u017d\u0001\u0000\u0000\u0000\u017f\u0180\u0001\u0000\u0000"+ + "\u0000\u0180\u0194\u0001\u0000\u0000\u0000\u0181\u017f\u0001\u0000\u0000"+ + "\u0000\u0182\u0183\u0005=\u0000\u0000\u0183\u0184\u0005b\u0000\u0000\u0184"+ + "\u0185\u0005e\u0000\u0000\u0185\u0186\u0005g\u0000\u0000\u0186\u0187\u0005"+ + "i\u0000\u0000\u0187\u0188\u0005n\u0000\u0000\u0188\u018c\u0001\u0000\u0000"+ + "\u0000\u0189\u018b\t\u0000\u0000\u0000\u018a\u0189\u0001\u0000\u0000\u0000"+ + "\u018b\u018e\u0001\u0000\u0000\u0000\u018c\u018d\u0001\u0000\u0000\u0000"+ + "\u018c\u018a\u0001\u0000\u0000\u0000\u018d\u018f\u0001\u0000\u0000\u0000"+ + "\u018e\u018c\u0001\u0000\u0000\u0000\u018f\u0190\u0005=\u0000\u0000\u0190"+ + "\u0191\u0005e\u0000\u0000\u0191\u0192\u0005n\u0000\u0000\u0192\u0194\u0005"+ + "d\u0000\u0000\u0193\u017b\u0001\u0000\u0000\u0000\u0193\u0182\u0001\u0000"+ + "\u0000\u0000\u0194\u0195\u0001\u0000\u0000\u0000\u0195\u0196\u0006?\u0000"+ + "\u0000\u0196\u0080\u0001\u0000\u0000\u0000\u0197\u0198\u0007\u0006\u0000"+ + "\u0000\u0198\u0199\u0001\u0000\u0000\u0000\u0199\u019a\u0006@\u0000\u0000"+ + "\u019a\u0082\u0001\u0000\u0000\u0000\n\u0000\u015a\u015d\u0162\u0169\u016f"+ + "\u0176\u017f\u018c\u0193\u0001\u0006\u0000\u0000"; public static final ATN _ATN = new ATNDeserializer().deserialize(_serializedATN.toCharArray()); static { diff --git a/Phase1Template/untitled/gen/main/grammer/FunctionCraftLexer.tokens b/Phase1Template/untitled/gen/main/grammer/FunctionCraftLexer.tokens index 8deafa5..c103028 100644 --- a/Phase1Template/untitled/gen/main/grammer/FunctionCraftLexer.tokens +++ b/Phase1Template/untitled/gen/main/grammer/FunctionCraftLexer.tokens @@ -23,8 +23,8 @@ MULT=22 DIVIDE=23 EQUAL=24 NOT_EQUAL=25 -IS_NOT=26 -IS=27 +LESS_EQUAL_THAN=26 +GREATER_EQUAL_THAN=27 GREATER_THAN=28 LESS_THAN=29 AND=30 @@ -32,31 +32,37 @@ OR=31 NOT=32 INCREMENT=33 DECREMENT=34 -SEPARATOR=35 -APPEND=36 -TRUE=37 -FALSE=38 -BREAK=39 -NEXT=40 -ARROW=41 -ASSIGN=42 -LPAR=43 -RPAR=44 -LBRACK=45 -RBRACK=46 -LBRACE=47 -RBRACE=48 -COMMA=49 -DOT=50 -DOUBLEDOT=51 -COLON=52 -SEMICOLLON=53 -INT_VALUE=54 -FLOAT_VALUE=55 -IDENTIFIER=56 -STRING_VALUE=57 -COMMENT=58 -WS=59 +PATTERN_MATCHING_SEPARATOR=35 +SEPARATOR=36 +APPEND=37 +TRUE=38 +FALSE=39 +BREAK=40 +NEXT=41 +ARROW=42 +PLUS_ASSIGN=43 +MINUS_ASSIGN=44 +MULT_ASSIGN=45 +DIVIDE_ASSIGN=46 +MOD_ASSIGN=47 +ASSIGN=48 +LPAR=49 +RPAR=50 +LBRACK=51 +RBRACK=52 +LBRACE=53 +RBRACE=54 +COMMA=55 +DOT=56 +DOUBLEDOT=57 +COLON=58 +SEMICOLLON=59 +INT_VALUE=60 +FLOAT_VALUE=61 +IDENTIFIER=62 +STRING_VALUE=63 +COMMENT=64 +WS=65 'def'=1 'end'=2 'main'=3 @@ -82,8 +88,8 @@ WS=59 '/'=23 '=='=24 '!='=25 -'is not'=26 -'is'=27 +'<='=26 +'>='=27 '>'=28 '<'=29 '&&'=30 @@ -91,22 +97,28 @@ WS=59 '!'=32 '++'=33 '--'=34 -'|'=35 -'<<'=36 -'true'=37 -'false'=38 -'break'=39 -'next'=40 -'->'=41 -'='=42 -'('=43 -')'=44 -'['=45 -']'=46 -'{'=47 -'}'=48 -','=49 -'.'=50 -'..'=51 -':'=52 -';'=53 +' |'=35 +'|'=36 +'<<'=37 +'true'=38 +'false'=39 +'break'=40 +'next'=41 +'->'=42 +'+='=43 +'-='=44 +'*='=45 +'/='=46 +'%='=47 +'='=48 +'('=49 +')'=50 +'['=51 +']'=52 +'{'=53 +'}'=54 +','=55 +'.'=56 +'..'=57 +':'=58 +';'=59 diff --git a/Phase1Template/untitled/gen/main/grammer/FunctionCraftListener.java b/Phase1Template/untitled/gen/main/grammer/FunctionCraftListener.java index 6f566d2..0cf4902 100644 --- a/Phase1Template/untitled/gen/main/grammer/FunctionCraftListener.java +++ b/Phase1Template/untitled/gen/main/grammer/FunctionCraftListener.java @@ -247,6 +247,16 @@ public interface FunctionCraftListener extends ParseTreeListener { * @param ctx the parse tree */ void exitExpression(FunctionCraftParser.ExpressionContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#eqaulityExpression}. + * @param ctx the parse tree + */ + void enterEqaulityExpression(FunctionCraftParser.EqaulityExpressionContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#eqaulityExpression}. + * @param ctx the parse tree + */ + void exitEqaulityExpression(FunctionCraftParser.EqaulityExpressionContext ctx); /** * Enter a parse tree produced by {@link FunctionCraftParser#relationalExpression}. * @param ctx the parse tree @@ -287,16 +297,6 @@ public interface FunctionCraftListener extends ParseTreeListener { * @param ctx the parse tree */ void exitPreUnaryExpression(FunctionCraftParser.PreUnaryExpressionContext ctx); - /** - * Enter a parse tree produced by {@link FunctionCraftParser#appendExpression}. - * @param ctx the parse tree - */ - void enterAppendExpression(FunctionCraftParser.AppendExpressionContext ctx); - /** - * Exit a parse tree produced by {@link FunctionCraftParser#appendExpression}. - * @param ctx the parse tree - */ - void exitAppendExpression(FunctionCraftParser.AppendExpressionContext ctx); /** * Enter a parse tree produced by {@link FunctionCraftParser#accessExpression}. * @param ctx the parse tree diff --git a/Phase1Template/untitled/gen/main/grammer/FunctionCraftParser.java b/Phase1Template/untitled/gen/main/grammer/FunctionCraftParser.java index e509242..22e086e 100644 --- a/Phase1Template/untitled/gen/main/grammer/FunctionCraftParser.java +++ b/Phase1Template/untitled/gen/main/grammer/FunctionCraftParser.java @@ -20,12 +20,13 @@ public class FunctionCraftParser extends Parser { DEF=1, END=2, MAIN=3, PUTS=4, PUSH=5, LEN=6, RETURN=7, IF=8, ELSE=9, ELSEIF=10, METHOD=11, PATTERN=12, MATCH=13, LOOP=14, FOR=15, IN=16, DO=17, CHOP=18, CHOMP=19, PLUS=20, MINUS=21, MULT=22, DIVIDE=23, EQUAL=24, NOT_EQUAL=25, - IS_NOT=26, IS=27, GREATER_THAN=28, LESS_THAN=29, AND=30, OR=31, NOT=32, - INCREMENT=33, DECREMENT=34, SEPARATOR=35, APPEND=36, TRUE=37, FALSE=38, - BREAK=39, NEXT=40, ARROW=41, ASSIGN=42, LPAR=43, RPAR=44, LBRACK=45, RBRACK=46, - LBRACE=47, RBRACE=48, COMMA=49, DOT=50, DOUBLEDOT=51, COLON=52, SEMICOLLON=53, - INT_VALUE=54, FLOAT_VALUE=55, IDENTIFIER=56, STRING_VALUE=57, COMMENT=58, - WS=59; + LESS_EQUAL_THAN=26, GREATER_EQUAL_THAN=27, GREATER_THAN=28, LESS_THAN=29, + AND=30, OR=31, NOT=32, INCREMENT=33, DECREMENT=34, PATTERN_MATCHING_SEPARATOR=35, + SEPARATOR=36, APPEND=37, TRUE=38, FALSE=39, BREAK=40, NEXT=41, ARROW=42, + PLUS_ASSIGN=43, MINUS_ASSIGN=44, MULT_ASSIGN=45, DIVIDE_ASSIGN=46, MOD_ASSIGN=47, + ASSIGN=48, LPAR=49, RPAR=50, LBRACK=51, RBRACK=52, LBRACE=53, RBRACE=54, + COMMA=55, DOT=56, DOUBLEDOT=57, COLON=58, SEMICOLLON=59, INT_VALUE=60, + FLOAT_VALUE=61, IDENTIFIER=62, STRING_VALUE=63, COMMENT=64, WS=65; public static final int RULE_program = 0, RULE_functionDeclaration = 1, RULE_functionArgumentsDeclaration = 2, RULE_patternMatching = 3, RULE_main = 4, RULE_functionArguments = 5, RULE_returnStatement = 6, @@ -33,9 +34,9 @@ public class FunctionCraftParser extends Parser { RULE_pushStatement = 11, RULE_loopDoStatement = 12, RULE_loopBody = 13, RULE_forStatement = 14, RULE_range = 15, RULE_filterStatement = 16, RULE_matchPatternStatement = 17, RULE_chopAndChompStatement = 18, RULE_assignment = 19, RULE_accessList = 20, - RULE_statement = 21, RULE_body = 22, RULE_expression = 23, RULE_relationalExpression = 24, - RULE_additiveExpression = 25, RULE_multiplicativeExpression = 26, RULE_preUnaryExpression = 27, - RULE_appendExpression = 28, RULE_accessExpression = 29, RULE_otherExpression = 30, + RULE_statement = 21, RULE_body = 22, RULE_expression = 23, RULE_eqaulityExpression = 24, + RULE_relationalExpression = 25, RULE_additiveExpression = 26, RULE_multiplicativeExpression = 27, + RULE_preUnaryExpression = 28, RULE_accessExpression = 29, RULE_otherExpression = 30, RULE_lambdaFunction = 31, RULE_values = 32, RULE_listValue = 33, RULE_boolValue = 34, RULE_functionPointer = 35; private static String[] makeRuleNames() { @@ -45,9 +46,10 @@ private static String[] makeRuleNames() { "putsStatement", "lenStatement", "pushStatement", "loopDoStatement", "loopBody", "forStatement", "range", "filterStatement", "matchPatternStatement", "chopAndChompStatement", "assignment", "accessList", "statement", "body", - "expression", "relationalExpression", "additiveExpression", "multiplicativeExpression", - "preUnaryExpression", "appendExpression", "accessExpression", "otherExpression", - "lambdaFunction", "values", "listValue", "boolValue", "functionPointer" + "expression", "eqaulityExpression", "relationalExpression", "additiveExpression", + "multiplicativeExpression", "preUnaryExpression", "accessExpression", + "otherExpression", "lambdaFunction", "values", "listValue", "boolValue", + "functionPointer" }; } public static final String[] ruleNames = makeRuleNames(); @@ -57,10 +59,10 @@ private static String[] makeLiteralNames() { null, "'def'", "'end'", "'main'", "'puts'", "'push'", "'len'", "'return'", "'if'", "'else'", "'elseif'", "'method'", "'pattern'", "'match'", "'loop'", "'for'", "'in'", "'do'", "'chop'", "'chomp'", "'+'", "'-'", "'*'", "'/'", - "'=='", "'!='", "'is not'", "'is'", "'>'", "'<'", "'&&'", "'||'", "'!'", - "'++'", "'--'", "'|'", "'<<'", "'true'", "'false'", "'break'", "'next'", - "'->'", "'='", "'('", "')'", "'['", "']'", "'{'", "'}'", "','", "'.'", - "'..'", "':'", "';'" + "'=='", "'!='", "'<='", "'>='", "'>'", "'<'", "'&&'", "'||'", "'!'", + "'++'", "'--'", "' |'", "'|'", "'<<'", "'true'", "'false'", "'break'", + "'next'", "'->'", "'+='", "'-='", "'*='", "'/='", "'%='", "'='", "'('", + "')'", "'['", "']'", "'{'", "'}'", "','", "'.'", "'..'", "':'", "';'" }; } private static final String[] _LITERAL_NAMES = makeLiteralNames(); @@ -68,12 +70,14 @@ private static String[] makeSymbolicNames() { return new String[] { null, "DEF", "END", "MAIN", "PUTS", "PUSH", "LEN", "RETURN", "IF", "ELSE", "ELSEIF", "METHOD", "PATTERN", "MATCH", "LOOP", "FOR", "IN", "DO", "CHOP", - "CHOMP", "PLUS", "MINUS", "MULT", "DIVIDE", "EQUAL", "NOT_EQUAL", "IS_NOT", - "IS", "GREATER_THAN", "LESS_THAN", "AND", "OR", "NOT", "INCREMENT", "DECREMENT", - "SEPARATOR", "APPEND", "TRUE", "FALSE", "BREAK", "NEXT", "ARROW", "ASSIGN", - "LPAR", "RPAR", "LBRACK", "RBRACK", "LBRACE", "RBRACE", "COMMA", "DOT", - "DOUBLEDOT", "COLON", "SEMICOLLON", "INT_VALUE", "FLOAT_VALUE", "IDENTIFIER", - "STRING_VALUE", "COMMENT", "WS" + "CHOMP", "PLUS", "MINUS", "MULT", "DIVIDE", "EQUAL", "NOT_EQUAL", "LESS_EQUAL_THAN", + "GREATER_EQUAL_THAN", "GREATER_THAN", "LESS_THAN", "AND", "OR", "NOT", + "INCREMENT", "DECREMENT", "PATTERN_MATCHING_SEPARATOR", "SEPARATOR", + "APPEND", "TRUE", "FALSE", "BREAK", "NEXT", "ARROW", "PLUS_ASSIGN", "MINUS_ASSIGN", + "MULT_ASSIGN", "DIVIDE_ASSIGN", "MOD_ASSIGN", "ASSIGN", "LPAR", "RPAR", + "LBRACK", "RBRACK", "LBRACE", "RBRACE", "COMMA", "DOT", "DOUBLEDOT", + "COLON", "SEMICOLLON", "INT_VALUE", "FLOAT_VALUE", "IDENTIFIER", "STRING_VALUE", + "COMMENT", "WS" }; } private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames(); @@ -368,7 +372,7 @@ public final FunctionArgumentsDeclarationContext functionArgumentsDeclaration() setState(100); match(ASSIGN); setState(101); - expression(); + expression(0); setState(108); _errHandler.sync(this); _la = _input.LA(1); @@ -382,7 +386,7 @@ public final FunctionArgumentsDeclarationContext functionArgumentsDeclaration() setState(104); match(ASSIGN); setState(105); - expression(); + expression(0); } } setState(110); @@ -423,9 +427,9 @@ public TerminalNode IDENTIFIER(int i) { public TerminalNode LPAR() { return getToken(FunctionCraftParser.LPAR, 0); } public TerminalNode RPAR() { return getToken(FunctionCraftParser.RPAR, 0); } public TerminalNode SEMICOLLON() { return getToken(FunctionCraftParser.SEMICOLLON, 0); } - public List SEPARATOR() { return getTokens(FunctionCraftParser.SEPARATOR); } - public TerminalNode SEPARATOR(int i) { - return getToken(FunctionCraftParser.SEPARATOR, i); + public List PATTERN_MATCHING_SEPARATOR() { return getTokens(FunctionCraftParser.PATTERN_MATCHING_SEPARATOR); } + public TerminalNode PATTERN_MATCHING_SEPARATOR(int i) { + return getToken(FunctionCraftParser.PATTERN_MATCHING_SEPARATOR, i); } public List condition() { return getRuleContexts(ConditionContext.class); @@ -483,17 +487,17 @@ public final PatternMatchingContext patternMatching() throws RecognitionExceptio setState(132); _errHandler.sync(this); _la = _input.LA(1); - while (_la==SEPARATOR) { + while (_la==PATTERN_MATCHING_SEPARATOR) { { { setState(125); - match(SEPARATOR); + match(PATTERN_MATCHING_SEPARATOR); setState(126); condition(); setState(127); match(ASSIGN); setState(128); - expression(); + expression(0); } } setState(134); @@ -620,7 +624,7 @@ public final FunctionArgumentsContext functionArguments() throws RecognitionExce case 1: { setState(145); - expression(); + expression(0); setState(150); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,7,_ctx); @@ -631,7 +635,7 @@ public final FunctionArgumentsContext functionArguments() throws RecognitionExce setState(146); match(COMMA); setState(147); - expression(); + expression(0); } } } @@ -694,10 +698,10 @@ public final ReturnStatementContext returnStatement() throws RecognitionExceptio setState(158); _errHandler.sync(this); _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 270262599515113536L) != 0)) { + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & -1150101502091851712L) != 0)) { { setState(157); - expression(); + expression(0); } } @@ -884,7 +888,7 @@ public final ConditionContext condition() throws RecognitionException { setState(183); match(LPAR); setState(184); - expression(); + expression(0); setState(185); match(RPAR); setState(196); @@ -993,7 +997,7 @@ public final PutsStatementContext putsStatement() throws RecognitionException { setState(206); match(LPAR); setState(207); - expression(); + expression(0); setState(208); match(RPAR); setState(209); @@ -1050,7 +1054,7 @@ public final LenStatementContext lenStatement() throws RecognitionException { setState(213); match(LPAR); setState(214); - expression(); + expression(0); setState(215); match(RPAR); } @@ -1110,11 +1114,11 @@ public final PushStatementContext pushStatement() throws RecognitionException { setState(219); match(LPAR); setState(220); - expression(); + expression(0); setState(221); match(COMMA); setState(222); - expression(); + expression(0); setState(223); match(RPAR); setState(224); @@ -1249,7 +1253,7 @@ public final LoopBodyContext loopBody() throws RecognitionException { setState(249); _errHandler.sync(this); _la = _input.LA(1); - while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 270264248782604656L) != 0)) { + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & -1150098203556918928L) != 0)) { { setState(247); _errHandler.sync(this); @@ -1469,11 +1473,11 @@ public final RangeContext range() throws RecognitionException { setState(263); match(LPAR); setState(264); - expression(); + expression(0); setState(265); match(DOUBLEDOT); setState(266); - expression(); + expression(0); setState(267); match(RPAR); } @@ -1487,7 +1491,7 @@ public final RangeContext range() throws RecognitionException { match(LBRACK); { setState(270); - expression(); + expression(0); setState(275); _errHandler.sync(this); _la = _input.LA(1); @@ -1497,7 +1501,7 @@ public final RangeContext range() throws RecognitionException { setState(271); match(COMMA); setState(272); - expression(); + expression(0); } } setState(277); @@ -1582,7 +1586,7 @@ public final FilterStatementContext filterStatement() throws RecognitionExceptio setState(284); match(LBRACK); setState(285); - expression(); + expression(0); setState(286); match(SEPARATOR); setState(287); @@ -1594,7 +1598,7 @@ public final FilterStatementContext filterStatement() throws RecognitionExceptio setState(290); match(COMMA); setState(291); - expression(); + expression(0); setState(296); _errHandler.sync(this); _la = _input.LA(1); @@ -1604,7 +1608,7 @@ public final FilterStatementContext filterStatement() throws RecognitionExceptio setState(292); match(COMMA); setState(293); - expression(); + expression(0); } } setState(298); @@ -1671,7 +1675,7 @@ public final MatchPatternStatementContext matchPatternStatement() throws Recogni setState(305); match(LPAR); setState(306); - expression(); + expression(0); setState(307); match(RPAR); } @@ -1744,7 +1748,7 @@ public final ChopAndChompStatementContext chopAndChompStatement() throws Recogni setState(315); match(LPAR); setState(316); - expression(); + expression(0); setState(317); match(RPAR); } @@ -1764,11 +1768,16 @@ public final ChopAndChompStatementContext chopAndChompStatement() throws Recogni public static class AssignmentContext extends ParserRuleContext { public Token IDENTIFIER; public TerminalNode IDENTIFIER() { return getToken(FunctionCraftParser.IDENTIFIER, 0); } - public TerminalNode ASSIGN() { return getToken(FunctionCraftParser.ASSIGN, 0); } public ExpressionContext expression() { return getRuleContext(ExpressionContext.class,0); } public TerminalNode SEMICOLLON() { return getToken(FunctionCraftParser.SEMICOLLON, 0); } + public TerminalNode ASSIGN() { return getToken(FunctionCraftParser.ASSIGN, 0); } + public TerminalNode PLUS_ASSIGN() { return getToken(FunctionCraftParser.PLUS_ASSIGN, 0); } + public TerminalNode MINUS_ASSIGN() { return getToken(FunctionCraftParser.MINUS_ASSIGN, 0); } + public TerminalNode DIVIDE_ASSIGN() { return getToken(FunctionCraftParser.DIVIDE_ASSIGN, 0); } + public TerminalNode MULT_ASSIGN() { return getToken(FunctionCraftParser.MULT_ASSIGN, 0); } + public TerminalNode MOD_ASSIGN() { return getToken(FunctionCraftParser.MOD_ASSIGN, 0); } public AccessListContext accessList() { return getRuleContext(AccessListContext.class,0); } @@ -1812,9 +1821,17 @@ public final AssignmentContext assignment() throws RecognitionException { } setState(324); - match(ASSIGN); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 554153860399104L) != 0)) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } setState(325); - expression(); + expression(0); setState(326); match(SEMICOLLON); } @@ -1865,7 +1882,7 @@ public final AccessListContext accessList() throws RecognitionException { setState(328); match(LBRACK); setState(329); - expression(); + expression(0); setState(330); match(RBRACK); } @@ -1970,7 +1987,7 @@ public final StatementContext statement() throws RecognitionException { enterOuterAlt(_localctx, 6); { setState(337); - expression(); + expression(0); setState(338); match(SEMICOLLON); } @@ -2035,7 +2052,7 @@ public final BodyContext body() throws RecognitionException { setState(346); _errHandler.sync(this); _la = _input.LA(1); - while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 270262599515162992L) != 0)) { + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & -1150101502091802256L) != 0)) { { { setState(343); @@ -2071,29 +2088,14 @@ public final BodyContext body() throws RecognitionException { @SuppressWarnings("CheckReturnValue") public static class ExpressionContext extends ParserRuleContext { - public Token op; - public List relationalExpression() { - return getRuleContexts(RelationalExpressionContext.class); - } - public RelationalExpressionContext relationalExpression(int i) { - return getRuleContext(RelationalExpressionContext.class,i); - } - public List EQUAL() { return getTokens(FunctionCraftParser.EQUAL); } - public TerminalNode EQUAL(int i) { - return getToken(FunctionCraftParser.EQUAL, i); - } - public List NOT_EQUAL() { return getTokens(FunctionCraftParser.NOT_EQUAL); } - public TerminalNode NOT_EQUAL(int i) { - return getToken(FunctionCraftParser.NOT_EQUAL, i); - } - public List IS_NOT() { return getTokens(FunctionCraftParser.IS_NOT); } - public TerminalNode IS_NOT(int i) { - return getToken(FunctionCraftParser.IS_NOT, i); + public Token APPEND; + public EqaulityExpressionContext eqaulityExpression() { + return getRuleContext(EqaulityExpressionContext.class,0); } - public List IS() { return getTokens(FunctionCraftParser.IS); } - public TerminalNode IS(int i) { - return getToken(FunctionCraftParser.IS, i); + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); } + public TerminalNode APPEND() { return getToken(FunctionCraftParser.APPEND, 0); } public ExpressionContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -2114,60 +2116,153 @@ public T accept(ParseTreeVisitor visitor) { } public final ExpressionContext expression() throws RecognitionException { - ExpressionContext _localctx = new ExpressionContext(_ctx, getState()); - enterRule(_localctx, 46, RULE_expression); + return expression(0); + } + + private ExpressionContext expression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + ExpressionContext _localctx = new ExpressionContext(_ctx, _parentState); + ExpressionContext _prevctx = _localctx; + int _startState = 46; + enterRecursionRule(_localctx, 46, RULE_expression, _p); try { int _alt; enterOuterAlt(_localctx, 1); { - setState(352); - relationalExpression(); - setState(364); + { + setState(353); + eqaulityExpression(0); + } + _ctx.stop = _input.LT(-1); + setState(362); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,30,_ctx); + _alt = getInterpreter().adaptivePredict(_input,29,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; { { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(355); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + setState(356); + ((ExpressionContext)_localctx).APPEND = match(APPEND); setState(357); + eqaulityExpression(0); + System.out.println("Operator: " + (((ExpressionContext)_localctx).APPEND!=null?((ExpressionContext)_localctx).APPEND.getText():null)); + } + } + } + setState(364); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,29,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class EqaulityExpressionContext extends ParserRuleContext { + public Token op; + public RelationalExpressionContext relationalExpression() { + return getRuleContext(RelationalExpressionContext.class,0); + } + public EqaulityExpressionContext eqaulityExpression() { + return getRuleContext(EqaulityExpressionContext.class,0); + } + public TerminalNode EQUAL() { return getToken(FunctionCraftParser.EQUAL, 0); } + public TerminalNode NOT_EQUAL() { return getToken(FunctionCraftParser.NOT_EQUAL, 0); } + public EqaulityExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_eqaulityExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterEqaulityExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitEqaulityExpression(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitEqaulityExpression(this); + else return visitor.visitChildren(this); + } + } + + public final EqaulityExpressionContext eqaulityExpression() throws RecognitionException { + return eqaulityExpression(0); + } + + private EqaulityExpressionContext eqaulityExpression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + EqaulityExpressionContext _localctx = new EqaulityExpressionContext(_ctx, _parentState); + EqaulityExpressionContext _prevctx = _localctx; + int _startState = 48; + enterRecursionRule(_localctx, 48, RULE_eqaulityExpression, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(366); + relationalExpression(0); + } + _ctx.stop = _input.LT(-1); + setState(378); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,31,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new EqaulityExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_eqaulityExpression); + setState(368); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + setState(371); _errHandler.sync(this); switch (_input.LA(1)) { case EQUAL: { - setState(353); - ((ExpressionContext)_localctx).op = match(EQUAL); + setState(369); + ((EqaulityExpressionContext)_localctx).op = match(EQUAL); } break; case NOT_EQUAL: { - setState(354); - ((ExpressionContext)_localctx).op = match(NOT_EQUAL); - } - break; - case IS_NOT: - { - setState(355); - ((ExpressionContext)_localctx).op = match(IS_NOT); - } - break; - case IS: - { - setState(356); - ((ExpressionContext)_localctx).op = match(IS); + setState(370); + ((EqaulityExpressionContext)_localctx).op = match(NOT_EQUAL); } break; default: throw new NoViableAltException(this); } - setState(359); - relationalExpression(); - System.out.println("Operator: " + (((ExpressionContext)_localctx).op!=null?((ExpressionContext)_localctx).op.getText():null)); + setState(373); + relationalExpression(0); + System.out.println("Operator: " + (((EqaulityExpressionContext)_localctx).op!=null?((EqaulityExpressionContext)_localctx).op.getText():null)); } } } - setState(366); + setState(380); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,30,_ctx); + _alt = getInterpreter().adaptivePredict(_input,31,_ctx); } } } @@ -2177,7 +2272,7 @@ public final ExpressionContext expression() throws RecognitionException { _errHandler.recover(this, re); } finally { - exitRule(); + unrollRecursionContexts(_parentctx); } return _localctx; } @@ -2185,20 +2280,16 @@ public final ExpressionContext expression() throws RecognitionException { @SuppressWarnings("CheckReturnValue") public static class RelationalExpressionContext extends ParserRuleContext { public Token op; - public List additiveExpression() { - return getRuleContexts(AdditiveExpressionContext.class); + public AdditiveExpressionContext additiveExpression() { + return getRuleContext(AdditiveExpressionContext.class,0); } - public AdditiveExpressionContext additiveExpression(int i) { - return getRuleContext(AdditiveExpressionContext.class,i); - } - public List GREATER_THAN() { return getTokens(FunctionCraftParser.GREATER_THAN); } - public TerminalNode GREATER_THAN(int i) { - return getToken(FunctionCraftParser.GREATER_THAN, i); - } - public List LESS_THAN() { return getTokens(FunctionCraftParser.LESS_THAN); } - public TerminalNode LESS_THAN(int i) { - return getToken(FunctionCraftParser.LESS_THAN, i); + public RelationalExpressionContext relationalExpression() { + return getRuleContext(RelationalExpressionContext.class,0); } + public TerminalNode GREATER_THAN() { return getToken(FunctionCraftParser.GREATER_THAN, 0); } + public TerminalNode LESS_THAN() { return getToken(FunctionCraftParser.LESS_THAN, 0); } + public TerminalNode LESS_EQUAL_THAN() { return getToken(FunctionCraftParser.LESS_EQUAL_THAN, 0); } + public TerminalNode GREATER_EQUAL_THAN() { return getToken(FunctionCraftParser.GREATER_EQUAL_THAN, 0); } public RelationalExpressionContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -2219,48 +2310,77 @@ public T accept(ParseTreeVisitor visitor) { } public final RelationalExpressionContext relationalExpression() throws RecognitionException { - RelationalExpressionContext _localctx = new RelationalExpressionContext(_ctx, getState()); - enterRule(_localctx, 48, RULE_relationalExpression); + return relationalExpression(0); + } + + private RelationalExpressionContext relationalExpression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + RelationalExpressionContext _localctx = new RelationalExpressionContext(_ctx, _parentState); + RelationalExpressionContext _prevctx = _localctx; + int _startState = 50; + enterRecursionRule(_localctx, 50, RULE_relationalExpression, _p); try { int _alt; enterOuterAlt(_localctx, 1); { - setState(367); - additiveExpression(); - setState(377); + { + setState(382); + additiveExpression(0); + } + _ctx.stop = _input.LT(-1); + setState(396); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,32,_ctx); + _alt = getInterpreter().adaptivePredict(_input,33,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; { { - setState(370); + _localctx = new RelationalExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_relationalExpression); + setState(384); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + setState(389); _errHandler.sync(this); switch (_input.LA(1)) { case GREATER_THAN: { - setState(368); + setState(385); ((RelationalExpressionContext)_localctx).op = match(GREATER_THAN); } break; case LESS_THAN: { - setState(369); + setState(386); ((RelationalExpressionContext)_localctx).op = match(LESS_THAN); } break; + case LESS_EQUAL_THAN: + { + setState(387); + ((RelationalExpressionContext)_localctx).op = match(LESS_EQUAL_THAN); + } + break; + case GREATER_EQUAL_THAN: + { + setState(388); + ((RelationalExpressionContext)_localctx).op = match(GREATER_EQUAL_THAN); + } + break; default: throw new NoViableAltException(this); } - setState(372); - additiveExpression(); + setState(391); + additiveExpression(0); System.out.println("Operator: " + (((RelationalExpressionContext)_localctx).op!=null?((RelationalExpressionContext)_localctx).op.getText():null)); } } } - setState(379); + setState(398); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,32,_ctx); + _alt = getInterpreter().adaptivePredict(_input,33,_ctx); } } } @@ -2270,7 +2390,7 @@ public final RelationalExpressionContext relationalExpression() throws Recogniti _errHandler.recover(this, re); } finally { - exitRule(); + unrollRecursionContexts(_parentctx); } return _localctx; } @@ -2278,20 +2398,14 @@ public final RelationalExpressionContext relationalExpression() throws Recogniti @SuppressWarnings("CheckReturnValue") public static class AdditiveExpressionContext extends ParserRuleContext { public Token op; - public List multiplicativeExpression() { - return getRuleContexts(MultiplicativeExpressionContext.class); - } - public MultiplicativeExpressionContext multiplicativeExpression(int i) { - return getRuleContext(MultiplicativeExpressionContext.class,i); + public MultiplicativeExpressionContext multiplicativeExpression() { + return getRuleContext(MultiplicativeExpressionContext.class,0); } - public List PLUS() { return getTokens(FunctionCraftParser.PLUS); } - public TerminalNode PLUS(int i) { - return getToken(FunctionCraftParser.PLUS, i); - } - public List MINUS() { return getTokens(FunctionCraftParser.MINUS); } - public TerminalNode MINUS(int i) { - return getToken(FunctionCraftParser.MINUS, i); + public AdditiveExpressionContext additiveExpression() { + return getRuleContext(AdditiveExpressionContext.class,0); } + public TerminalNode PLUS() { return getToken(FunctionCraftParser.PLUS, 0); } + public TerminalNode MINUS() { return getToken(FunctionCraftParser.MINUS, 0); } public AdditiveExpressionContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -2312,48 +2426,65 @@ public T accept(ParseTreeVisitor visitor) { } public final AdditiveExpressionContext additiveExpression() throws RecognitionException { - AdditiveExpressionContext _localctx = new AdditiveExpressionContext(_ctx, getState()); - enterRule(_localctx, 50, RULE_additiveExpression); + return additiveExpression(0); + } + + private AdditiveExpressionContext additiveExpression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + AdditiveExpressionContext _localctx = new AdditiveExpressionContext(_ctx, _parentState); + AdditiveExpressionContext _prevctx = _localctx; + int _startState = 52; + enterRecursionRule(_localctx, 52, RULE_additiveExpression, _p); try { int _alt; enterOuterAlt(_localctx, 1); { - setState(380); - multiplicativeExpression(); - setState(390); + { + setState(400); + multiplicativeExpression(0); + } + _ctx.stop = _input.LT(-1); + setState(412); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,34,_ctx); + _alt = getInterpreter().adaptivePredict(_input,35,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; { { - setState(383); + _localctx = new AdditiveExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_additiveExpression); + setState(402); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + setState(405); _errHandler.sync(this); switch (_input.LA(1)) { case PLUS: { - setState(381); + setState(403); ((AdditiveExpressionContext)_localctx).op = match(PLUS); } break; case MINUS: { - setState(382); + setState(404); ((AdditiveExpressionContext)_localctx).op = match(MINUS); } break; default: throw new NoViableAltException(this); } - setState(385); - multiplicativeExpression(); + setState(407); + multiplicativeExpression(0); System.out.println("Operator: " + (((AdditiveExpressionContext)_localctx).op!=null?((AdditiveExpressionContext)_localctx).op.getText():null)); } } } - setState(392); + setState(414); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,34,_ctx); + _alt = getInterpreter().adaptivePredict(_input,35,_ctx); } } } @@ -2363,7 +2494,7 @@ public final AdditiveExpressionContext additiveExpression() throws RecognitionEx _errHandler.recover(this, re); } finally { - exitRule(); + unrollRecursionContexts(_parentctx); } return _localctx; } @@ -2371,20 +2502,14 @@ public final AdditiveExpressionContext additiveExpression() throws RecognitionEx @SuppressWarnings("CheckReturnValue") public static class MultiplicativeExpressionContext extends ParserRuleContext { public Token op; - public List preUnaryExpression() { - return getRuleContexts(PreUnaryExpressionContext.class); - } - public PreUnaryExpressionContext preUnaryExpression(int i) { - return getRuleContext(PreUnaryExpressionContext.class,i); - } - public List MULT() { return getTokens(FunctionCraftParser.MULT); } - public TerminalNode MULT(int i) { - return getToken(FunctionCraftParser.MULT, i); + public PreUnaryExpressionContext preUnaryExpression() { + return getRuleContext(PreUnaryExpressionContext.class,0); } - public List DIVIDE() { return getTokens(FunctionCraftParser.DIVIDE); } - public TerminalNode DIVIDE(int i) { - return getToken(FunctionCraftParser.DIVIDE, i); + public MultiplicativeExpressionContext multiplicativeExpression() { + return getRuleContext(MultiplicativeExpressionContext.class,0); } + public TerminalNode MULT() { return getToken(FunctionCraftParser.MULT, 0); } + public TerminalNode DIVIDE() { return getToken(FunctionCraftParser.DIVIDE, 0); } public MultiplicativeExpressionContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -2405,48 +2530,65 @@ public T accept(ParseTreeVisitor visitor) { } public final MultiplicativeExpressionContext multiplicativeExpression() throws RecognitionException { - MultiplicativeExpressionContext _localctx = new MultiplicativeExpressionContext(_ctx, getState()); - enterRule(_localctx, 52, RULE_multiplicativeExpression); + return multiplicativeExpression(0); + } + + private MultiplicativeExpressionContext multiplicativeExpression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + MultiplicativeExpressionContext _localctx = new MultiplicativeExpressionContext(_ctx, _parentState); + MultiplicativeExpressionContext _prevctx = _localctx; + int _startState = 54; + enterRecursionRule(_localctx, 54, RULE_multiplicativeExpression, _p); try { int _alt; enterOuterAlt(_localctx, 1); { - setState(393); + { + setState(416); preUnaryExpression(); - setState(403); + } + _ctx.stop = _input.LT(-1); + setState(428); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,36,_ctx); + _alt = getInterpreter().adaptivePredict(_input,37,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; { { - setState(396); + _localctx = new MultiplicativeExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_multiplicativeExpression); + setState(418); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + setState(421); _errHandler.sync(this); switch (_input.LA(1)) { case MULT: { - setState(394); + setState(419); ((MultiplicativeExpressionContext)_localctx).op = match(MULT); } break; case DIVIDE: { - setState(395); + setState(420); ((MultiplicativeExpressionContext)_localctx).op = match(DIVIDE); } break; default: throw new NoViableAltException(this); } - setState(398); + setState(423); preUnaryExpression(); System.out.println("Operator: " + (((MultiplicativeExpressionContext)_localctx).op!=null?((MultiplicativeExpressionContext)_localctx).op.getText():null)); } } } - setState(405); + setState(430); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,36,_ctx); + _alt = getInterpreter().adaptivePredict(_input,37,_ctx); } } } @@ -2456,7 +2598,7 @@ public final MultiplicativeExpressionContext multiplicativeExpression() throws R _errHandler.recover(this, re); } finally { - exitRule(); + unrollRecursionContexts(_parentctx); } return _localctx; } @@ -2464,16 +2606,13 @@ public final MultiplicativeExpressionContext multiplicativeExpression() throws R @SuppressWarnings("CheckReturnValue") public static class PreUnaryExpressionContext extends ParserRuleContext { public Token op; - public PreUnaryExpressionContext preUnaryExpression() { - return getRuleContext(PreUnaryExpressionContext.class,0); + public AccessExpressionContext accessExpression() { + return getRuleContext(AccessExpressionContext.class,0); } public TerminalNode NOT() { return getToken(FunctionCraftParser.NOT, 0); } public TerminalNode MINUS() { return getToken(FunctionCraftParser.MINUS, 0); } public TerminalNode INCREMENT() { return getToken(FunctionCraftParser.INCREMENT, 0); } public TerminalNode DECREMENT() { return getToken(FunctionCraftParser.DECREMENT, 0); } - public AppendExpressionContext appendExpression() { - return getRuleContext(AppendExpressionContext.class,0); - } public PreUnaryExpressionContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -2495,9 +2634,9 @@ public T accept(ParseTreeVisitor visitor) { public final PreUnaryExpressionContext preUnaryExpression() throws RecognitionException { PreUnaryExpressionContext _localctx = new PreUnaryExpressionContext(_ctx, getState()); - enterRule(_localctx, 54, RULE_preUnaryExpression); + enterRule(_localctx, 56, RULE_preUnaryExpression); try { - setState(416); + setState(441); _errHandler.sync(this); switch (_input.LA(1)) { case MINUS: @@ -2506,42 +2645,40 @@ public final PreUnaryExpressionContext preUnaryExpression() throws RecognitionEx case DECREMENT: enterOuterAlt(_localctx, 1); { - { - setState(410); + setState(435); _errHandler.sync(this); switch (_input.LA(1)) { case NOT: { - setState(406); + setState(431); ((PreUnaryExpressionContext)_localctx).op = match(NOT); } break; case MINUS: { - setState(407); + setState(432); ((PreUnaryExpressionContext)_localctx).op = match(MINUS); } break; case INCREMENT: { - setState(408); + setState(433); ((PreUnaryExpressionContext)_localctx).op = match(INCREMENT); } break; case DECREMENT: { - setState(409); + setState(434); ((PreUnaryExpressionContext)_localctx).op = match(DECREMENT); } break; default: throw new NoViableAltException(this); } - setState(412); - preUnaryExpression(); + setState(437); + accessExpression(); System.out.println("Operator: " + (((PreUnaryExpressionContext)_localctx).op!=null?((PreUnaryExpressionContext)_localctx).op.getText():null)); } - } break; case LEN: case METHOD: @@ -2558,8 +2695,8 @@ public final PreUnaryExpressionContext preUnaryExpression() throws RecognitionEx case STRING_VALUE: enterOuterAlt(_localctx, 2); { - setState(415); - appendExpression(); + setState(440); + accessExpression(); } break; default: @@ -2577,79 +2714,6 @@ public final PreUnaryExpressionContext preUnaryExpression() throws RecognitionEx return _localctx; } - @SuppressWarnings("CheckReturnValue") - public static class AppendExpressionContext extends ParserRuleContext { - public Token APPEND; - public List accessExpression() { - return getRuleContexts(AccessExpressionContext.class); - } - public AccessExpressionContext accessExpression(int i) { - return getRuleContext(AccessExpressionContext.class,i); - } - public List APPEND() { return getTokens(FunctionCraftParser.APPEND); } - public TerminalNode APPEND(int i) { - return getToken(FunctionCraftParser.APPEND, i); - } - public AppendExpressionContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_appendExpression; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterAppendExpression(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitAppendExpression(this); - } - @Override - public T accept(ParseTreeVisitor visitor) { - if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitAppendExpression(this); - else return visitor.visitChildren(this); - } - } - - public final AppendExpressionContext appendExpression() throws RecognitionException { - AppendExpressionContext _localctx = new AppendExpressionContext(_ctx, getState()); - enterRule(_localctx, 56, RULE_appendExpression); - try { - int _alt; - enterOuterAlt(_localctx, 1); - { - setState(418); - accessExpression(); - setState(425); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,39,_ctx); - while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { - if ( _alt==1 ) { - { - { - setState(419); - ((AppendExpressionContext)_localctx).APPEND = match(APPEND); - setState(420); - accessExpression(); - System.out.println("Operator: " + (((AppendExpressionContext)_localctx).APPEND!=null?((AppendExpressionContext)_localctx).APPEND.getText():null)); - } - } - } - setState(427); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,39,_ctx); - } - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - @SuppressWarnings("CheckReturnValue") public static class AccessExpressionContext extends ParserRuleContext { public OtherExpressionContext otherExpression() { @@ -2701,42 +2765,42 @@ public final AccessExpressionContext accessExpression() throws RecognitionExcept int _alt; enterOuterAlt(_localctx, 1); { - setState(428); + setState(443); otherExpression(); - setState(436); + setState(451); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,40,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(429); + setState(444); match(LPAR); - setState(430); + System.out.println("FunctionCall"); + setState(446); functionArguments(); - setState(431); + setState(447); match(RPAR); - System.out.println("FunctionCall"); } } } - setState(438); + setState(453); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,40,_ctx); } - setState(442); + setState(457); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,41,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(439); + setState(454); accessList(); } } } - setState(444); + setState(459); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,41,_ctx); } @@ -2803,74 +2867,74 @@ public final OtherExpressionContext otherExpression() throws RecognitionExceptio enterRule(_localctx, 60, RULE_otherExpression); int _la; try { - setState(457); + setState(472); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,43,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { - setState(445); + setState(460); values(); } break; case 2: enterOuterAlt(_localctx, 2); { - setState(446); + setState(461); match(IDENTIFIER); } break; case 3: enterOuterAlt(_localctx, 3); { - setState(447); + setState(462); lambdaFunction(); } break; case 4: enterOuterAlt(_localctx, 4); { - setState(448); + setState(463); chopAndChompStatement(); } break; case 5: enterOuterAlt(_localctx, 5); { - setState(449); + setState(464); matchPatternStatement(); } break; case 6: enterOuterAlt(_localctx, 6); { - setState(450); + setState(465); filterStatement(); } break; case 7: enterOuterAlt(_localctx, 7); { - setState(451); + setState(466); lenStatement(); } break; case 8: enterOuterAlt(_localctx, 8); { - setState(452); + setState(467); match(LPAR); - setState(454); + setState(469); _errHandler.sync(this); _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 270262599515113536L) != 0)) { + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & -1150101502091851712L) != 0)) { { - setState(453); - expression(); + setState(468); + expression(0); } } - setState(456); + setState(471); match(RPAR); } break; @@ -2926,18 +2990,18 @@ public final LambdaFunctionContext lambdaFunction() throws RecognitionException try { enterOuterAlt(_localctx, 1); { - setState(459); + setState(474); match(ARROW); System.out.println("Structure: LAMBDA"); - setState(461); + setState(476); functionArgumentsDeclaration(); - setState(462); + setState(477); match(LBRACE); - setState(463); + setState(478); body(); - setState(464); + setState(479); match(RBRACE); - setState(465); + setState(480); functionArguments(); } } @@ -2989,49 +3053,49 @@ public final ValuesContext values() throws RecognitionException { ValuesContext _localctx = new ValuesContext(_ctx, getState()); enterRule(_localctx, 64, RULE_values); try { - setState(473); + setState(488); _errHandler.sync(this); switch (_input.LA(1)) { case TRUE: case FALSE: enterOuterAlt(_localctx, 1); { - setState(467); + setState(482); boolValue(); } break; case STRING_VALUE: enterOuterAlt(_localctx, 2); { - setState(468); + setState(483); match(STRING_VALUE); } break; case INT_VALUE: enterOuterAlt(_localctx, 3); { - setState(469); + setState(484); match(INT_VALUE); } break; case FLOAT_VALUE: enterOuterAlt(_localctx, 4); { - setState(470); + setState(485); match(FLOAT_VALUE); } break; case LBRACK: enterOuterAlt(_localctx, 5); { - setState(471); + setState(486); listValue(); } break; case METHOD: enterOuterAlt(_localctx, 6); { - setState(472); + setState(487); functionPointer(); } break; @@ -3082,11 +3146,11 @@ public final ListValueContext listValue() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(475); + setState(490); match(LBRACK); - setState(476); + setState(491); functionArguments(); - setState(477); + setState(492); match(RBRACK); } } @@ -3131,7 +3195,7 @@ public final BoolValueContext boolValue() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(479); + setState(494); _la = _input.LA(1); if ( !(_la==TRUE || _la==FALSE) ) { _errHandler.recoverInline(this); @@ -3186,15 +3250,15 @@ public final FunctionPointerContext functionPointer() throws RecognitionExceptio try { enterOuterAlt(_localctx, 1); { - setState(481); + setState(496); match(METHOD); - setState(482); + setState(497); match(LPAR); - setState(483); + setState(498); match(COLON); - setState(484); + setState(499); match(IDENTIFIER); - setState(485); + setState(500); match(RPAR); } } @@ -3209,8 +3273,59 @@ public final FunctionPointerContext functionPointer() throws RecognitionExceptio return _localctx; } + public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) { + switch (ruleIndex) { + case 23: + return expression_sempred((ExpressionContext)_localctx, predIndex); + case 24: + return eqaulityExpression_sempred((EqaulityExpressionContext)_localctx, predIndex); + case 25: + return relationalExpression_sempred((RelationalExpressionContext)_localctx, predIndex); + case 26: + return additiveExpression_sempred((AdditiveExpressionContext)_localctx, predIndex); + case 27: + return multiplicativeExpression_sempred((MultiplicativeExpressionContext)_localctx, predIndex); + } + return true; + } + private boolean expression_sempred(ExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 0: + return precpred(_ctx, 2); + } + return true; + } + private boolean eqaulityExpression_sempred(EqaulityExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 1: + return precpred(_ctx, 2); + } + return true; + } + private boolean relationalExpression_sempred(RelationalExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 2: + return precpred(_ctx, 2); + } + return true; + } + private boolean additiveExpression_sempred(AdditiveExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 3: + return precpred(_ctx, 2); + } + return true; + } + private boolean multiplicativeExpression_sempred(MultiplicativeExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 4: + return precpred(_ctx, 2); + } + return true; + } + public static final String _serializedATN = - "\u0004\u0001;\u01e8\u0002\u0000\u0007\u0000\u0002\u0001\u0007\u0001\u0002"+ + "\u0004\u0001A\u01f7\u0002\u0000\u0007\u0000\u0002\u0001\u0007\u0001\u0002"+ "\u0002\u0007\u0002\u0002\u0003\u0007\u0003\u0002\u0004\u0007\u0004\u0002"+ "\u0005\u0007\u0005\u0002\u0006\u0007\u0006\u0002\u0007\u0007\u0007\u0002"+ "\b\u0007\b\u0002\t\u0007\t\u0002\n\u0007\n\u0002\u000b\u0007\u000b\u0002"+ @@ -3264,269 +3379,280 @@ public final FunctionPointerContext functionPointer() throws RecognitionExceptio "\u0001\u0015\u0001\u0015\u0001\u0015\u0001\u0015\u0003\u0015\u0156\b\u0015"+ "\u0001\u0016\u0005\u0016\u0159\b\u0016\n\u0016\f\u0016\u015c\t\u0016\u0001"+ "\u0016\u0003\u0016\u015f\b\u0016\u0001\u0017\u0001\u0017\u0001\u0017\u0001"+ - "\u0017\u0001\u0017\u0003\u0017\u0166\b\u0017\u0001\u0017\u0001\u0017\u0001"+ - "\u0017\u0005\u0017\u016b\b\u0017\n\u0017\f\u0017\u016e\t\u0017\u0001\u0018"+ - "\u0001\u0018\u0001\u0018\u0003\u0018\u0173\b\u0018\u0001\u0018\u0001\u0018"+ - "\u0001\u0018\u0005\u0018\u0178\b\u0018\n\u0018\f\u0018\u017b\t\u0018\u0001"+ - "\u0019\u0001\u0019\u0001\u0019\u0003\u0019\u0180\b\u0019\u0001\u0019\u0001"+ - "\u0019\u0001\u0019\u0005\u0019\u0185\b\u0019\n\u0019\f\u0019\u0188\t\u0019"+ - "\u0001\u001a\u0001\u001a\u0001\u001a\u0003\u001a\u018d\b\u001a\u0001\u001a"+ - "\u0001\u001a\u0001\u001a\u0005\u001a\u0192\b\u001a\n\u001a\f\u001a\u0195"+ - "\t\u001a\u0001\u001b\u0001\u001b\u0001\u001b\u0001\u001b\u0003\u001b\u019b"+ - "\b\u001b\u0001\u001b\u0001\u001b\u0001\u001b\u0001\u001b\u0003\u001b\u01a1"+ - "\b\u001b\u0001\u001c\u0001\u001c\u0001\u001c\u0001\u001c\u0001\u001c\u0005"+ - "\u001c\u01a8\b\u001c\n\u001c\f\u001c\u01ab\t\u001c\u0001\u001d\u0001\u001d"+ - "\u0001\u001d\u0001\u001d\u0001\u001d\u0001\u001d\u0005\u001d\u01b3\b\u001d"+ - "\n\u001d\f\u001d\u01b6\t\u001d\u0001\u001d\u0005\u001d\u01b9\b\u001d\n"+ - "\u001d\f\u001d\u01bc\t\u001d\u0001\u001e\u0001\u001e\u0001\u001e\u0001"+ - "\u001e\u0001\u001e\u0001\u001e\u0001\u001e\u0001\u001e\u0001\u001e\u0003"+ - "\u001e\u01c7\b\u001e\u0001\u001e\u0003\u001e\u01ca\b\u001e\u0001\u001f"+ - "\u0001\u001f\u0001\u001f\u0001\u001f\u0001\u001f\u0001\u001f\u0001\u001f"+ - "\u0001\u001f\u0001 \u0001 \u0001 \u0001 \u0001 \u0001 \u0003 \u01da\b"+ - " \u0001!\u0001!\u0001!\u0001!\u0001\"\u0001\"\u0001#\u0001#\u0001#\u0001"+ - "#\u0001#\u0001#\u0001#\u0000\u0000$\u0000\u0002\u0004\u0006\b\n\f\u000e"+ - "\u0010\u0012\u0014\u0016\u0018\u001a\u001c\u001e \"$&(*,.02468:<>@BDF"+ - "\u0000\u0002\u0001\u0000\u001e\u001f\u0001\u0000%&\u0205\u0000L\u0001"+ - "\u0000\u0000\u0000\u0002Q\u0001\u0000\u0000\u0000\u0004X\u0001\u0000\u0000"+ - "\u0000\u0006w\u0001\u0000\u0000\u0000\b\u0089\u0001\u0000\u0000\u0000"+ - "\n\u0099\u0001\u0000\u0000\u0000\f\u009b\u0001\u0000\u0000\u0000\u000e"+ - "\u00a2\u0001\u0000\u0000\u0000\u0010\u00c9\u0001\u0000\u0000\u0000\u0012"+ - "\u00cc\u0001\u0000\u0000\u0000\u0014\u00d3\u0001\u0000\u0000\u0000\u0016"+ - "\u00d9\u0001\u0000\u0000\u0000\u0018\u00e2\u0001\u0000\u0000\u0000\u001a"+ - "\u00f9\u0001\u0000\u0000\u0000\u001c\u00ff\u0001\u0000\u0000\u0000\u001e"+ - "\u0119\u0001\u0000\u0000\u0000 \u011b\u0001\u0000\u0000\u0000\"\u012d"+ - "\u0001\u0000\u0000\u0000$\u0139\u0001\u0000\u0000\u0000&\u013f\u0001\u0000"+ - "\u0000\u0000(\u0148\u0001\u0000\u0000\u0000*\u0155\u0001\u0000\u0000\u0000"+ - ",\u015a\u0001\u0000\u0000\u0000.\u0160\u0001\u0000\u0000\u00000\u016f"+ - "\u0001\u0000\u0000\u00002\u017c\u0001\u0000\u0000\u00004\u0189\u0001\u0000"+ - "\u0000\u00006\u01a0\u0001\u0000\u0000\u00008\u01a2\u0001\u0000\u0000\u0000"+ - ":\u01ac\u0001\u0000\u0000\u0000<\u01c9\u0001\u0000\u0000\u0000>\u01cb"+ - "\u0001\u0000\u0000\u0000@\u01d9\u0001\u0000\u0000\u0000B\u01db\u0001\u0000"+ - "\u0000\u0000D\u01df\u0001\u0000\u0000\u0000F\u01e1\u0001\u0000\u0000\u0000"+ - "HK\u0003\u0002\u0001\u0000IK\u0003\u0006\u0003\u0000JH\u0001\u0000\u0000"+ - "\u0000JI\u0001\u0000\u0000\u0000KN\u0001\u0000\u0000\u0000LJ\u0001\u0000"+ - "\u0000\u0000LM\u0001\u0000\u0000\u0000MO\u0001\u0000\u0000\u0000NL\u0001"+ - "\u0000\u0000\u0000OP\u0003\b\u0004\u0000P\u0001\u0001\u0000\u0000\u0000"+ - "QR\u0005\u0001\u0000\u0000RS\u00058\u0000\u0000ST\u0006\u0001\uffff\uffff"+ - "\u0000TU\u0003\u0004\u0002\u0000UV\u0003,\u0016\u0000VW\u0005\u0002\u0000"+ - "\u0000W\u0003\u0001\u0000\u0000\u0000Xs\u0005+\u0000\u0000Y^\u00058\u0000"+ - "\u0000Z[\u00051\u0000\u0000[]\u00058\u0000\u0000\\Z\u0001\u0000\u0000"+ - "\u0000]`\u0001\u0000\u0000\u0000^\\\u0001\u0000\u0000\u0000^_\u0001\u0000"+ - "\u0000\u0000_q\u0001\u0000\u0000\u0000`^\u0001\u0000\u0000\u0000ab\u0005"+ - "1\u0000\u0000bc\u0005-\u0000\u0000cd\u00058\u0000\u0000de\u0005*\u0000"+ - "\u0000el\u0003.\u0017\u0000fg\u00051\u0000\u0000gh\u00058\u0000\u0000"+ - "hi\u0005*\u0000\u0000ik\u0003.\u0017\u0000jf\u0001\u0000\u0000\u0000k"+ - "n\u0001\u0000\u0000\u0000lj\u0001\u0000\u0000\u0000lm\u0001\u0000\u0000"+ - "\u0000mo\u0001\u0000\u0000\u0000nl\u0001\u0000\u0000\u0000op\u0005.\u0000"+ - "\u0000pr\u0001\u0000\u0000\u0000qa\u0001\u0000\u0000\u0000qr\u0001\u0000"+ - "\u0000\u0000rt\u0001\u0000\u0000\u0000sY\u0001\u0000\u0000\u0000st\u0001"+ - "\u0000\u0000\u0000tu\u0001\u0000\u0000\u0000uv\u0005,\u0000\u0000v\u0005"+ - "\u0001\u0000\u0000\u0000wx\u0005\f\u0000\u0000xy\u00058\u0000\u0000yz"+ - "\u0006\u0003\uffff\uffff\u0000z{\u0005+\u0000\u0000{|\u00058\u0000\u0000"+ - "|\u0084\u0005,\u0000\u0000}~\u0005#\u0000\u0000~\u007f\u0003\u0010\b\u0000"+ - "\u007f\u0080\u0005*\u0000\u0000\u0080\u0081\u0003.\u0017\u0000\u0081\u0083"+ - "\u0001\u0000\u0000\u0000\u0082}\u0001\u0000\u0000\u0000\u0083\u0086\u0001"+ - "\u0000\u0000\u0000\u0084\u0082\u0001\u0000\u0000\u0000\u0084\u0085\u0001"+ - "\u0000\u0000\u0000\u0085\u0087\u0001\u0000\u0000\u0000\u0086\u0084\u0001"+ - "\u0000\u0000\u0000\u0087\u0088\u00055\u0000\u0000\u0088\u0007\u0001\u0000"+ - "\u0000\u0000\u0089\u008a\u0005\u0001\u0000\u0000\u008a\u008b\u0005\u0003"+ - "\u0000\u0000\u008b\u008c\u0006\u0004\uffff\uffff\u0000\u008c\u008d\u0005"+ - "+\u0000\u0000\u008d\u008e\u0005,\u0000\u0000\u008e\u008f\u0003,\u0016"+ - "\u0000\u008f\u0090\u0005\u0002\u0000\u0000\u0090\t\u0001\u0000\u0000\u0000"+ - "\u0091\u0096\u0003.\u0017\u0000\u0092\u0093\u00051\u0000\u0000\u0093\u0095"+ - "\u0003.\u0017\u0000\u0094\u0092\u0001\u0000\u0000\u0000\u0095\u0098\u0001"+ - "\u0000\u0000\u0000\u0096\u0094\u0001\u0000\u0000\u0000\u0096\u0097\u0001"+ - "\u0000\u0000\u0000\u0097\u009a\u0001\u0000\u0000\u0000\u0098\u0096\u0001"+ - "\u0000\u0000\u0000\u0099\u0091\u0001\u0000\u0000\u0000\u0099\u009a\u0001"+ - "\u0000\u0000\u0000\u009a\u000b\u0001\u0000\u0000\u0000\u009b\u009c\u0005"+ - "\u0007\u0000\u0000\u009c\u009e\u0006\u0006\uffff\uffff\u0000\u009d\u009f"+ - "\u0003.\u0017\u0000\u009e\u009d\u0001\u0000\u0000\u0000\u009e\u009f\u0001"+ - "\u0000\u0000\u0000\u009f\u00a0\u0001\u0000\u0000\u0000\u00a0\u00a1\u0005"+ - "5\u0000\u0000\u00a1\r\u0001\u0000\u0000\u0000\u00a2\u00a3\u0005\b\u0000"+ - "\u0000\u00a3\u00a4\u0006\u0007\uffff\uffff\u0000\u00a4\u00a5\u0003\u0010"+ - "\b\u0000\u00a5\u00ad\u0003,\u0016\u0000\u00a6\u00a7\u0005\n\u0000\u0000"+ - "\u00a7\u00a8\u0006\u0007\uffff\uffff\u0000\u00a8\u00a9\u0003\u0010\b\u0000"+ - "\u00a9\u00aa\u0003,\u0016\u0000\u00aa\u00ac\u0001\u0000\u0000\u0000\u00ab"+ - "\u00a6\u0001\u0000\u0000\u0000\u00ac\u00af\u0001\u0000\u0000\u0000\u00ad"+ - "\u00ab\u0001\u0000\u0000\u0000\u00ad\u00ae\u0001\u0000\u0000\u0000\u00ae"+ - "\u00b3\u0001\u0000\u0000\u0000\u00af\u00ad\u0001\u0000\u0000\u0000\u00b0"+ - "\u00b1\u0005\t\u0000\u0000\u00b1\u00b2\u0006\u0007\uffff\uffff\u0000\u00b2"+ - "\u00b4\u0003,\u0016\u0000\u00b3\u00b0\u0001\u0000\u0000\u0000\u00b3\u00b4"+ - "\u0001\u0000\u0000\u0000\u00b4\u00b5\u0001\u0000\u0000\u0000\u00b5\u00b6"+ - "\u0005\u0002\u0000\u0000\u00b6\u000f\u0001\u0000\u0000\u0000\u00b7\u00b8"+ - "\u0005+\u0000\u0000\u00b8\u00b9\u0003.\u0017\u0000\u00b9\u00c4\u0005,"+ - "\u0000\u0000\u00ba\u00bc\u0007\u0000\u0000\u0000\u00bb\u00bd\u0005+\u0000"+ - "\u0000\u00bc\u00bb\u0001\u0000\u0000\u0000\u00bc\u00bd\u0001\u0000\u0000"+ - "\u0000\u00bd\u00be\u0001\u0000\u0000\u0000\u00be\u00c0\u0003\u0010\b\u0000"+ - "\u00bf\u00c1\u0005,\u0000\u0000\u00c0\u00bf\u0001\u0000\u0000\u0000\u00c0"+ - "\u00c1\u0001\u0000\u0000\u0000\u00c1\u00c3\u0001\u0000\u0000\u0000\u00c2"+ - "\u00ba\u0001\u0000\u0000\u0000\u00c3\u00c6\u0001\u0000\u0000\u0000\u00c4"+ - "\u00c2\u0001\u0000\u0000\u0000\u00c4\u00c5\u0001\u0000\u0000\u0000\u00c5"+ - "\u00c8\u0001\u0000\u0000\u0000\u00c6\u00c4\u0001\u0000\u0000\u0000\u00c7"+ - "\u00b7\u0001\u0000\u0000\u0000\u00c8\u00cb\u0001\u0000\u0000\u0000\u00c9"+ - "\u00c7\u0001\u0000\u0000\u0000\u00c9\u00ca\u0001\u0000\u0000\u0000\u00ca"+ - "\u0011\u0001\u0000\u0000\u0000\u00cb\u00c9\u0001\u0000\u0000\u0000\u00cc"+ - "\u00cd\u0005\u0004\u0000\u0000\u00cd\u00ce\u0006\t\uffff\uffff\u0000\u00ce"+ - "\u00cf\u0005+\u0000\u0000\u00cf\u00d0\u0003.\u0017\u0000\u00d0\u00d1\u0005"+ - ",\u0000\u0000\u00d1\u00d2\u00055\u0000\u0000\u00d2\u0013\u0001\u0000\u0000"+ - "\u0000\u00d3\u00d4\u0005\u0006\u0000\u0000\u00d4\u00d5\u0006\n\uffff\uffff"+ - "\u0000\u00d5\u00d6\u0005+\u0000\u0000\u00d6\u00d7\u0003.\u0017\u0000\u00d7"+ - "\u00d8\u0005,\u0000\u0000\u00d8\u0015\u0001\u0000\u0000\u0000\u00d9\u00da"+ - "\u0005\u0005\u0000\u0000\u00da\u00db\u0006\u000b\uffff\uffff\u0000\u00db"+ - "\u00dc\u0005+\u0000\u0000\u00dc\u00dd\u0003.\u0017\u0000\u00dd\u00de\u0005"+ - "1\u0000\u0000\u00de\u00df\u0003.\u0017\u0000\u00df\u00e0\u0005,\u0000"+ - "\u0000\u00e0\u00e1\u00055\u0000\u0000\u00e1\u0017\u0001\u0000\u0000\u0000"+ - "\u00e2\u00e3\u0005\u000e\u0000\u0000\u00e3\u00e4\u0005\u0011\u0000\u0000"+ - "\u00e4\u00e5\u0006\f\uffff\uffff\u0000\u00e5\u00e6\u0003\u001a\r\u0000"+ - "\u00e6\u00e7\u0005\u0002\u0000\u0000\u00e7\u0019\u0001\u0000\u0000\u0000"+ - "\u00e8\u00f8\u0003*\u0015\u0000\u00e9\u00ea\u0005\'\u0000\u0000\u00ea"+ - "\u00ed\u0006\r\uffff\uffff\u0000\u00eb\u00ec\u0005\b\u0000\u0000\u00ec"+ - "\u00ee\u0003\u0010\b\u0000\u00ed\u00eb\u0001\u0000\u0000\u0000\u00ed\u00ee"+ - "\u0001\u0000\u0000\u0000\u00ee\u00ef\u0001\u0000\u0000\u0000\u00ef\u00f8"+ - "\u00055\u0000\u0000\u00f0\u00f1\u0005(\u0000\u0000\u00f1\u00f4\u0006\r"+ - "\uffff\uffff\u0000\u00f2\u00f3\u0005\b\u0000\u0000\u00f3\u00f5\u0003\u0010"+ - "\b\u0000\u00f4\u00f2\u0001\u0000\u0000\u0000\u00f4\u00f5\u0001\u0000\u0000"+ - "\u0000\u00f5\u00f6\u0001\u0000\u0000\u0000\u00f6\u00f8\u00055\u0000\u0000"+ - "\u00f7\u00e8\u0001\u0000\u0000\u0000\u00f7\u00e9\u0001\u0000\u0000\u0000"+ - "\u00f7\u00f0\u0001\u0000\u0000\u0000\u00f8\u00fb\u0001\u0000\u0000\u0000"+ - "\u00f9\u00f7\u0001\u0000\u0000\u0000\u00f9\u00fa\u0001\u0000\u0000\u0000"+ - "\u00fa\u00fd\u0001\u0000\u0000\u0000\u00fb\u00f9\u0001\u0000\u0000\u0000"+ - "\u00fc\u00fe\u0003\f\u0006\u0000\u00fd\u00fc\u0001\u0000\u0000\u0000\u00fd"+ - "\u00fe\u0001\u0000\u0000\u0000\u00fe\u001b\u0001\u0000\u0000\u0000\u00ff"+ - "\u0100\u0005\u000f\u0000\u0000\u0100\u0101\u0006\u000e\uffff\uffff\u0000"+ - "\u0101\u0102\u00058\u0000\u0000\u0102\u0103\u0005\u0010\u0000\u0000\u0103"+ - "\u0104\u0003\u001e\u000f\u0000\u0104\u0105\u0003\u001a\r\u0000\u0105\u0106"+ - "\u0005\u0002\u0000\u0000\u0106\u001d\u0001\u0000\u0000\u0000\u0107\u0108"+ - "\u0005+\u0000\u0000\u0108\u0109\u0003.\u0017\u0000\u0109\u010a\u00053"+ - "\u0000\u0000\u010a\u010b\u0003.\u0017\u0000\u010b\u010c\u0005,\u0000\u0000"+ - "\u010c\u011a\u0001\u0000\u0000\u0000\u010d\u010e\u0005-\u0000\u0000\u010e"+ - "\u0113\u0003.\u0017\u0000\u010f\u0110\u00051\u0000\u0000\u0110\u0112\u0003"+ - ".\u0017\u0000\u0111\u010f\u0001\u0000\u0000\u0000\u0112\u0115\u0001\u0000"+ - "\u0000\u0000\u0113\u0111\u0001\u0000\u0000\u0000\u0113\u0114\u0001\u0000"+ - "\u0000\u0000\u0114\u0116\u0001\u0000\u0000\u0000\u0115\u0113\u0001\u0000"+ - "\u0000\u0000\u0116\u0117\u0005.\u0000\u0000\u0117\u011a\u0001\u0000\u0000"+ - "\u0000\u0118\u011a\u00058\u0000\u0000\u0119\u0107\u0001\u0000\u0000\u0000"+ - "\u0119\u010d\u0001\u0000\u0000\u0000\u0119\u0118\u0001\u0000\u0000\u0000"+ - "\u011a\u001f\u0001\u0000\u0000\u0000\u011b\u011c\u0006\u0010\uffff\uffff"+ - "\u0000\u011c\u011d\u0005-\u0000\u0000\u011d\u011e\u0003.\u0017\u0000\u011e"+ - "\u011f\u0005#\u0000\u0000\u011f\u0120\u00058\u0000\u0000\u0120\u0121\u0005"+ - ")\u0000\u0000\u0121\u0122\u0003\u001e\u000f\u0000\u0122\u0123\u00051\u0000"+ - "\u0000\u0123\u0128\u0003.\u0017\u0000\u0124\u0125\u00051\u0000\u0000\u0125"+ - "\u0127\u0003.\u0017\u0000\u0126\u0124\u0001\u0000\u0000\u0000\u0127\u012a"+ - "\u0001\u0000\u0000\u0000\u0128\u0126\u0001\u0000\u0000\u0000\u0128\u0129"+ - "\u0001\u0000\u0000\u0000\u0129\u012b\u0001\u0000\u0000\u0000\u012a\u0128"+ - "\u0001\u0000\u0000\u0000\u012b\u012c\u0005.\u0000\u0000\u012c!\u0001\u0000"+ - "\u0000\u0000\u012d\u012e\u0006\u0011\uffff\uffff\u0000\u012e\u012f\u0005"+ - "8\u0000\u0000\u012f\u0130\u00052\u0000\u0000\u0130\u0131\u0005\r\u0000"+ - "\u0000\u0131\u0132\u0005+\u0000\u0000\u0132\u0133\u0003.\u0017\u0000\u0133"+ - "\u0134\u0005,\u0000\u0000\u0134#\u0001\u0000\u0000\u0000\u0135\u0136\u0005"+ - "\u0012\u0000\u0000\u0136\u013a\u0006\u0012\uffff\uffff\u0000\u0137\u0138"+ - "\u0005\u0013\u0000\u0000\u0138\u013a\u0006\u0012\uffff\uffff\u0000\u0139"+ - "\u0135\u0001\u0000\u0000\u0000\u0139\u0137\u0001\u0000\u0000\u0000\u013a"+ - "\u013b\u0001\u0000\u0000\u0000\u013b\u013c\u0005+\u0000\u0000\u013c\u013d"+ - "\u0003.\u0017\u0000\u013d\u013e\u0005,\u0000\u0000\u013e%\u0001\u0000"+ - "\u0000\u0000\u013f\u0140\u00058\u0000\u0000\u0140\u0142\u0006\u0013\uffff"+ - "\uffff\u0000\u0141\u0143\u0003(\u0014\u0000\u0142\u0141\u0001\u0000\u0000"+ - "\u0000\u0142\u0143\u0001\u0000\u0000\u0000\u0143\u0144\u0001\u0000\u0000"+ - "\u0000\u0144\u0145\u0005*\u0000\u0000\u0145\u0146\u0003.\u0017\u0000\u0146"+ - "\u0147\u00055\u0000\u0000\u0147\'\u0001\u0000\u0000\u0000\u0148\u0149"+ - "\u0005-\u0000\u0000\u0149\u014a\u0003.\u0017\u0000\u014a\u014b\u0005."+ - "\u0000\u0000\u014b)\u0001\u0000\u0000\u0000\u014c\u0156\u0003\u000e\u0007"+ - "\u0000\u014d\u0156\u0003\u0018\f\u0000\u014e\u0156\u0003\u001c\u000e\u0000"+ - "\u014f\u0156\u0003\u0012\t\u0000\u0150\u0156\u0003\u0016\u000b\u0000\u0151"+ - "\u0152\u0003.\u0017\u0000\u0152\u0153\u00055\u0000\u0000\u0153\u0156\u0001"+ - "\u0000\u0000\u0000\u0154\u0156\u0003&\u0013\u0000\u0155\u014c\u0001\u0000"+ - "\u0000\u0000\u0155\u014d\u0001\u0000\u0000\u0000\u0155\u014e\u0001\u0000"+ - "\u0000\u0000\u0155\u014f\u0001\u0000\u0000\u0000\u0155\u0150\u0001\u0000"+ - "\u0000\u0000\u0155\u0151\u0001\u0000\u0000\u0000\u0155\u0154\u0001\u0000"+ - "\u0000\u0000\u0156+\u0001\u0000\u0000\u0000\u0157\u0159\u0003*\u0015\u0000"+ - "\u0158\u0157\u0001\u0000\u0000\u0000\u0159\u015c\u0001\u0000\u0000\u0000"+ - "\u015a\u0158\u0001\u0000\u0000\u0000\u015a\u015b\u0001\u0000\u0000\u0000"+ - "\u015b\u015e\u0001\u0000\u0000\u0000\u015c\u015a\u0001\u0000\u0000\u0000"+ - "\u015d\u015f\u0003\f\u0006\u0000\u015e\u015d\u0001\u0000\u0000\u0000\u015e"+ - "\u015f\u0001\u0000\u0000\u0000\u015f-\u0001\u0000\u0000\u0000\u0160\u016c"+ - "\u00030\u0018\u0000\u0161\u0166\u0005\u0018\u0000\u0000\u0162\u0166\u0005"+ - "\u0019\u0000\u0000\u0163\u0166\u0005\u001a\u0000\u0000\u0164\u0166\u0005"+ - "\u001b\u0000\u0000\u0165\u0161\u0001\u0000\u0000\u0000\u0165\u0162\u0001"+ - "\u0000\u0000\u0000\u0165\u0163\u0001\u0000\u0000\u0000\u0165\u0164\u0001"+ - "\u0000\u0000\u0000\u0166\u0167\u0001\u0000\u0000\u0000\u0167\u0168\u0003"+ - "0\u0018\u0000\u0168\u0169\u0006\u0017\uffff\uffff\u0000\u0169\u016b\u0001"+ - "\u0000\u0000\u0000\u016a\u0165\u0001\u0000\u0000\u0000\u016b\u016e\u0001"+ - "\u0000\u0000\u0000\u016c\u016a\u0001\u0000\u0000\u0000\u016c\u016d\u0001"+ - "\u0000\u0000\u0000\u016d/\u0001\u0000\u0000\u0000\u016e\u016c\u0001\u0000"+ - "\u0000\u0000\u016f\u0179\u00032\u0019\u0000\u0170\u0173\u0005\u001c\u0000"+ - "\u0000\u0171\u0173\u0005\u001d\u0000\u0000\u0172\u0170\u0001\u0000\u0000"+ - "\u0000\u0172\u0171\u0001\u0000\u0000\u0000\u0173\u0174\u0001\u0000\u0000"+ - "\u0000\u0174\u0175\u00032\u0019\u0000\u0175\u0176\u0006\u0018\uffff\uffff"+ - "\u0000\u0176\u0178\u0001\u0000\u0000\u0000\u0177\u0172\u0001\u0000\u0000"+ - "\u0000\u0178\u017b\u0001\u0000\u0000\u0000\u0179\u0177\u0001\u0000\u0000"+ - "\u0000\u0179\u017a\u0001\u0000\u0000\u0000\u017a1\u0001\u0000\u0000\u0000"+ - "\u017b\u0179\u0001\u0000\u0000\u0000\u017c\u0186\u00034\u001a\u0000\u017d"+ - "\u0180\u0005\u0014\u0000\u0000\u017e\u0180\u0005\u0015\u0000\u0000\u017f"+ - "\u017d\u0001\u0000\u0000\u0000\u017f\u017e\u0001\u0000\u0000\u0000\u0180"+ - "\u0181\u0001\u0000\u0000\u0000\u0181\u0182\u00034\u001a\u0000\u0182\u0183"+ - "\u0006\u0019\uffff\uffff\u0000\u0183\u0185\u0001\u0000\u0000\u0000\u0184"+ - "\u017f\u0001\u0000\u0000\u0000\u0185\u0188\u0001\u0000\u0000\u0000\u0186"+ - "\u0184\u0001\u0000\u0000\u0000\u0186\u0187\u0001\u0000\u0000\u0000\u0187"+ - "3\u0001\u0000\u0000\u0000\u0188\u0186\u0001\u0000\u0000\u0000\u0189\u0193"+ - "\u00036\u001b\u0000\u018a\u018d\u0005\u0016\u0000\u0000\u018b\u018d\u0005"+ - "\u0017\u0000\u0000\u018c\u018a\u0001\u0000\u0000\u0000\u018c\u018b\u0001"+ - "\u0000\u0000\u0000\u018d\u018e\u0001\u0000\u0000\u0000\u018e\u018f\u0003"+ - "6\u001b\u0000\u018f\u0190\u0006\u001a\uffff\uffff\u0000\u0190\u0192\u0001"+ - "\u0000\u0000\u0000\u0191\u018c\u0001\u0000\u0000\u0000\u0192\u0195\u0001"+ - "\u0000\u0000\u0000\u0193\u0191\u0001\u0000\u0000\u0000\u0193\u0194\u0001"+ - "\u0000\u0000\u0000\u01945\u0001\u0000\u0000\u0000\u0195\u0193\u0001\u0000"+ - "\u0000\u0000\u0196\u019b\u0005 \u0000\u0000\u0197\u019b\u0005\u0015\u0000"+ - "\u0000\u0198\u019b\u0005!\u0000\u0000\u0199\u019b\u0005\"\u0000\u0000"+ - "\u019a\u0196\u0001\u0000\u0000\u0000\u019a\u0197\u0001\u0000\u0000\u0000"+ - "\u019a\u0198\u0001\u0000\u0000\u0000\u019a\u0199\u0001\u0000\u0000\u0000"+ - "\u019b\u019c\u0001\u0000\u0000\u0000\u019c\u019d\u00036\u001b\u0000\u019d"+ - "\u019e\u0006\u001b\uffff\uffff\u0000\u019e\u01a1\u0001\u0000\u0000\u0000"+ - "\u019f\u01a1\u00038\u001c\u0000\u01a0\u019a\u0001\u0000\u0000\u0000\u01a0"+ - "\u019f\u0001\u0000\u0000\u0000\u01a17\u0001\u0000\u0000\u0000\u01a2\u01a9"+ - "\u0003:\u001d\u0000\u01a3\u01a4\u0005$\u0000\u0000\u01a4\u01a5\u0003:"+ - "\u001d\u0000\u01a5\u01a6\u0006\u001c\uffff\uffff\u0000\u01a6\u01a8\u0001"+ - "\u0000\u0000\u0000\u01a7\u01a3\u0001\u0000\u0000\u0000\u01a8\u01ab\u0001"+ - "\u0000\u0000\u0000\u01a9\u01a7\u0001\u0000\u0000\u0000\u01a9\u01aa\u0001"+ - "\u0000\u0000\u0000\u01aa9\u0001\u0000\u0000\u0000\u01ab\u01a9\u0001\u0000"+ - "\u0000\u0000\u01ac\u01b4\u0003<\u001e\u0000\u01ad\u01ae\u0005+\u0000\u0000"+ - "\u01ae\u01af\u0003\n\u0005\u0000\u01af\u01b0\u0005,\u0000\u0000\u01b0"+ - "\u01b1\u0006\u001d\uffff\uffff\u0000\u01b1\u01b3\u0001\u0000\u0000\u0000"+ - "\u01b2\u01ad\u0001\u0000\u0000\u0000\u01b3\u01b6\u0001\u0000\u0000\u0000"+ - "\u01b4\u01b2\u0001\u0000\u0000\u0000\u01b4\u01b5\u0001\u0000\u0000\u0000"+ - "\u01b5\u01ba\u0001\u0000\u0000\u0000\u01b6\u01b4\u0001\u0000\u0000\u0000"+ - "\u01b7\u01b9\u0003(\u0014\u0000\u01b8\u01b7\u0001\u0000\u0000\u0000\u01b9"+ - "\u01bc\u0001\u0000\u0000\u0000\u01ba\u01b8\u0001\u0000\u0000\u0000\u01ba"+ - "\u01bb\u0001\u0000\u0000\u0000\u01bb;\u0001\u0000\u0000\u0000\u01bc\u01ba"+ - "\u0001\u0000\u0000\u0000\u01bd\u01ca\u0003@ \u0000\u01be\u01ca\u00058"+ - "\u0000\u0000\u01bf\u01ca\u0003>\u001f\u0000\u01c0\u01ca\u0003$\u0012\u0000"+ - "\u01c1\u01ca\u0003\"\u0011\u0000\u01c2\u01ca\u0003 \u0010\u0000\u01c3"+ - "\u01ca\u0003\u0014\n\u0000\u01c4\u01c6\u0005+\u0000\u0000\u01c5\u01c7"+ - "\u0003.\u0017\u0000\u01c6\u01c5\u0001\u0000\u0000\u0000\u01c6\u01c7\u0001"+ - "\u0000\u0000\u0000\u01c7\u01c8\u0001\u0000\u0000\u0000\u01c8\u01ca\u0005"+ - ",\u0000\u0000\u01c9\u01bd\u0001\u0000\u0000\u0000\u01c9\u01be\u0001\u0000"+ - "\u0000\u0000\u01c9\u01bf\u0001\u0000\u0000\u0000\u01c9\u01c0\u0001\u0000"+ - "\u0000\u0000\u01c9\u01c1\u0001\u0000\u0000\u0000\u01c9\u01c2\u0001\u0000"+ - "\u0000\u0000\u01c9\u01c3\u0001\u0000\u0000\u0000\u01c9\u01c4\u0001\u0000"+ - "\u0000\u0000\u01ca=\u0001\u0000\u0000\u0000\u01cb\u01cc\u0005)\u0000\u0000"+ - "\u01cc\u01cd\u0006\u001f\uffff\uffff\u0000\u01cd\u01ce\u0003\u0004\u0002"+ - "\u0000\u01ce\u01cf\u0005/\u0000\u0000\u01cf\u01d0\u0003,\u0016\u0000\u01d0"+ - "\u01d1\u00050\u0000\u0000\u01d1\u01d2\u0003\n\u0005\u0000\u01d2?\u0001"+ - "\u0000\u0000\u0000\u01d3\u01da\u0003D\"\u0000\u01d4\u01da\u00059\u0000"+ - "\u0000\u01d5\u01da\u00056\u0000\u0000\u01d6\u01da\u00057\u0000\u0000\u01d7"+ - "\u01da\u0003B!\u0000\u01d8\u01da\u0003F#\u0000\u01d9\u01d3\u0001\u0000"+ - "\u0000\u0000\u01d9\u01d4\u0001\u0000\u0000\u0000\u01d9\u01d5\u0001\u0000"+ - "\u0000\u0000\u01d9\u01d6\u0001\u0000\u0000\u0000\u01d9\u01d7\u0001\u0000"+ - "\u0000\u0000\u01d9\u01d8\u0001\u0000\u0000\u0000\u01daA\u0001\u0000\u0000"+ - "\u0000\u01db\u01dc\u0005-\u0000\u0000\u01dc\u01dd\u0003\n\u0005\u0000"+ - "\u01dd\u01de\u0005.\u0000\u0000\u01deC\u0001\u0000\u0000\u0000\u01df\u01e0"+ - "\u0007\u0001\u0000\u0000\u01e0E\u0001\u0000\u0000\u0000\u01e1\u01e2\u0005"+ - "\u000b\u0000\u0000\u01e2\u01e3\u0005+\u0000\u0000\u01e3\u01e4\u00054\u0000"+ - "\u0000\u01e4\u01e5\u00058\u0000\u0000\u01e5\u01e6\u0005,\u0000\u0000\u01e6"+ - "G\u0001\u0000\u0000\u0000-JL^lqs\u0084\u0096\u0099\u009e\u00ad\u00b3\u00bc"+ - "\u00c0\u00c4\u00c9\u00ed\u00f4\u00f7\u00f9\u00fd\u0113\u0119\u0128\u0139"+ - "\u0142\u0155\u015a\u015e\u0165\u016c\u0172\u0179\u017f\u0186\u018c\u0193"+ - "\u019a\u01a0\u01a9\u01b4\u01ba\u01c6\u01c9\u01d9"; + "\u0017\u0001\u0017\u0001\u0017\u0001\u0017\u0001\u0017\u0005\u0017\u0169"+ + "\b\u0017\n\u0017\f\u0017\u016c\t\u0017\u0001\u0018\u0001\u0018\u0001\u0018"+ + "\u0001\u0018\u0001\u0018\u0001\u0018\u0003\u0018\u0174\b\u0018\u0001\u0018"+ + "\u0001\u0018\u0001\u0018\u0005\u0018\u0179\b\u0018\n\u0018\f\u0018\u017c"+ + "\t\u0018\u0001\u0019\u0001\u0019\u0001\u0019\u0001\u0019\u0001\u0019\u0001"+ + "\u0019\u0001\u0019\u0001\u0019\u0003\u0019\u0186\b\u0019\u0001\u0019\u0001"+ + "\u0019\u0001\u0019\u0005\u0019\u018b\b\u0019\n\u0019\f\u0019\u018e\t\u0019"+ + "\u0001\u001a\u0001\u001a\u0001\u001a\u0001\u001a\u0001\u001a\u0001\u001a"+ + "\u0003\u001a\u0196\b\u001a\u0001\u001a\u0001\u001a\u0001\u001a\u0005\u001a"+ + "\u019b\b\u001a\n\u001a\f\u001a\u019e\t\u001a\u0001\u001b\u0001\u001b\u0001"+ + "\u001b\u0001\u001b\u0001\u001b\u0001\u001b\u0003\u001b\u01a6\b\u001b\u0001"+ + "\u001b\u0001\u001b\u0001\u001b\u0005\u001b\u01ab\b\u001b\n\u001b\f\u001b"+ + "\u01ae\t\u001b\u0001\u001c\u0001\u001c\u0001\u001c\u0001\u001c\u0003\u001c"+ + "\u01b4\b\u001c\u0001\u001c\u0001\u001c\u0001\u001c\u0001\u001c\u0003\u001c"+ + "\u01ba\b\u001c\u0001\u001d\u0001\u001d\u0001\u001d\u0001\u001d\u0001\u001d"+ + "\u0001\u001d\u0005\u001d\u01c2\b\u001d\n\u001d\f\u001d\u01c5\t\u001d\u0001"+ + "\u001d\u0005\u001d\u01c8\b\u001d\n\u001d\f\u001d\u01cb\t\u001d\u0001\u001e"+ + "\u0001\u001e\u0001\u001e\u0001\u001e\u0001\u001e\u0001\u001e\u0001\u001e"+ + "\u0001\u001e\u0001\u001e\u0003\u001e\u01d6\b\u001e\u0001\u001e\u0003\u001e"+ + "\u01d9\b\u001e\u0001\u001f\u0001\u001f\u0001\u001f\u0001\u001f\u0001\u001f"+ + "\u0001\u001f\u0001\u001f\u0001\u001f\u0001 \u0001 \u0001 \u0001 \u0001"+ + " \u0001 \u0003 \u01e9\b \u0001!\u0001!\u0001!\u0001!\u0001\"\u0001\"\u0001"+ + "#\u0001#\u0001#\u0001#\u0001#\u0001#\u0001#\u0000\u0005.0246$\u0000\u0002"+ + "\u0004\u0006\b\n\f\u000e\u0010\u0012\u0014\u0016\u0018\u001a\u001c\u001e"+ + " \"$&(*,.02468:<>@BDF\u0000\u0003\u0001\u0000\u001e\u001f\u0001\u0000"+ + "+0\u0001\u0000&\'\u0214\u0000L\u0001\u0000\u0000\u0000\u0002Q\u0001\u0000"+ + "\u0000\u0000\u0004X\u0001\u0000\u0000\u0000\u0006w\u0001\u0000\u0000\u0000"+ + "\b\u0089\u0001\u0000\u0000\u0000\n\u0099\u0001\u0000\u0000\u0000\f\u009b"+ + "\u0001\u0000\u0000\u0000\u000e\u00a2\u0001\u0000\u0000\u0000\u0010\u00c9"+ + "\u0001\u0000\u0000\u0000\u0012\u00cc\u0001\u0000\u0000\u0000\u0014\u00d3"+ + "\u0001\u0000\u0000\u0000\u0016\u00d9\u0001\u0000\u0000\u0000\u0018\u00e2"+ + "\u0001\u0000\u0000\u0000\u001a\u00f9\u0001\u0000\u0000\u0000\u001c\u00ff"+ + "\u0001\u0000\u0000\u0000\u001e\u0119\u0001\u0000\u0000\u0000 \u011b\u0001"+ + "\u0000\u0000\u0000\"\u012d\u0001\u0000\u0000\u0000$\u0139\u0001\u0000"+ + "\u0000\u0000&\u013f\u0001\u0000\u0000\u0000(\u0148\u0001\u0000\u0000\u0000"+ + "*\u0155\u0001\u0000\u0000\u0000,\u015a\u0001\u0000\u0000\u0000.\u0160"+ + "\u0001\u0000\u0000\u00000\u016d\u0001\u0000\u0000\u00002\u017d\u0001\u0000"+ + "\u0000\u00004\u018f\u0001\u0000\u0000\u00006\u019f\u0001\u0000\u0000\u0000"+ + "8\u01b9\u0001\u0000\u0000\u0000:\u01bb\u0001\u0000\u0000\u0000<\u01d8"+ + "\u0001\u0000\u0000\u0000>\u01da\u0001\u0000\u0000\u0000@\u01e8\u0001\u0000"+ + "\u0000\u0000B\u01ea\u0001\u0000\u0000\u0000D\u01ee\u0001\u0000\u0000\u0000"+ + "F\u01f0\u0001\u0000\u0000\u0000HK\u0003\u0002\u0001\u0000IK\u0003\u0006"+ + "\u0003\u0000JH\u0001\u0000\u0000\u0000JI\u0001\u0000\u0000\u0000KN\u0001"+ + "\u0000\u0000\u0000LJ\u0001\u0000\u0000\u0000LM\u0001\u0000\u0000\u0000"+ + "MO\u0001\u0000\u0000\u0000NL\u0001\u0000\u0000\u0000OP\u0003\b\u0004\u0000"+ + "P\u0001\u0001\u0000\u0000\u0000QR\u0005\u0001\u0000\u0000RS\u0005>\u0000"+ + "\u0000ST\u0006\u0001\uffff\uffff\u0000TU\u0003\u0004\u0002\u0000UV\u0003"+ + ",\u0016\u0000VW\u0005\u0002\u0000\u0000W\u0003\u0001\u0000\u0000\u0000"+ + "Xs\u00051\u0000\u0000Y^\u0005>\u0000\u0000Z[\u00057\u0000\u0000[]\u0005"+ + ">\u0000\u0000\\Z\u0001\u0000\u0000\u0000]`\u0001\u0000\u0000\u0000^\\"+ + "\u0001\u0000\u0000\u0000^_\u0001\u0000\u0000\u0000_q\u0001\u0000\u0000"+ + "\u0000`^\u0001\u0000\u0000\u0000ab\u00057\u0000\u0000bc\u00053\u0000\u0000"+ + "cd\u0005>\u0000\u0000de\u00050\u0000\u0000el\u0003.\u0017\u0000fg\u0005"+ + "7\u0000\u0000gh\u0005>\u0000\u0000hi\u00050\u0000\u0000ik\u0003.\u0017"+ + "\u0000jf\u0001\u0000\u0000\u0000kn\u0001\u0000\u0000\u0000lj\u0001\u0000"+ + "\u0000\u0000lm\u0001\u0000\u0000\u0000mo\u0001\u0000\u0000\u0000nl\u0001"+ + "\u0000\u0000\u0000op\u00054\u0000\u0000pr\u0001\u0000\u0000\u0000qa\u0001"+ + "\u0000\u0000\u0000qr\u0001\u0000\u0000\u0000rt\u0001\u0000\u0000\u0000"+ + "sY\u0001\u0000\u0000\u0000st\u0001\u0000\u0000\u0000tu\u0001\u0000\u0000"+ + "\u0000uv\u00052\u0000\u0000v\u0005\u0001\u0000\u0000\u0000wx\u0005\f\u0000"+ + "\u0000xy\u0005>\u0000\u0000yz\u0006\u0003\uffff\uffff\u0000z{\u00051\u0000"+ + "\u0000{|\u0005>\u0000\u0000|\u0084\u00052\u0000\u0000}~\u0005#\u0000\u0000"+ + "~\u007f\u0003\u0010\b\u0000\u007f\u0080\u00050\u0000\u0000\u0080\u0081"+ + "\u0003.\u0017\u0000\u0081\u0083\u0001\u0000\u0000\u0000\u0082}\u0001\u0000"+ + "\u0000\u0000\u0083\u0086\u0001\u0000\u0000\u0000\u0084\u0082\u0001\u0000"+ + "\u0000\u0000\u0084\u0085\u0001\u0000\u0000\u0000\u0085\u0087\u0001\u0000"+ + "\u0000\u0000\u0086\u0084\u0001\u0000\u0000\u0000\u0087\u0088\u0005;\u0000"+ + "\u0000\u0088\u0007\u0001\u0000\u0000\u0000\u0089\u008a\u0005\u0001\u0000"+ + "\u0000\u008a\u008b\u0005\u0003\u0000\u0000\u008b\u008c\u0006\u0004\uffff"+ + "\uffff\u0000\u008c\u008d\u00051\u0000\u0000\u008d\u008e\u00052\u0000\u0000"+ + "\u008e\u008f\u0003,\u0016\u0000\u008f\u0090\u0005\u0002\u0000\u0000\u0090"+ + "\t\u0001\u0000\u0000\u0000\u0091\u0096\u0003.\u0017\u0000\u0092\u0093"+ + "\u00057\u0000\u0000\u0093\u0095\u0003.\u0017\u0000\u0094\u0092\u0001\u0000"+ + "\u0000\u0000\u0095\u0098\u0001\u0000\u0000\u0000\u0096\u0094\u0001\u0000"+ + "\u0000\u0000\u0096\u0097\u0001\u0000\u0000\u0000\u0097\u009a\u0001\u0000"+ + "\u0000\u0000\u0098\u0096\u0001\u0000\u0000\u0000\u0099\u0091\u0001\u0000"+ + "\u0000\u0000\u0099\u009a\u0001\u0000\u0000\u0000\u009a\u000b\u0001\u0000"+ + "\u0000\u0000\u009b\u009c\u0005\u0007\u0000\u0000\u009c\u009e\u0006\u0006"+ + "\uffff\uffff\u0000\u009d\u009f\u0003.\u0017\u0000\u009e\u009d\u0001\u0000"+ + "\u0000\u0000\u009e\u009f\u0001\u0000\u0000\u0000\u009f\u00a0\u0001\u0000"+ + "\u0000\u0000\u00a0\u00a1\u0005;\u0000\u0000\u00a1\r\u0001\u0000\u0000"+ + "\u0000\u00a2\u00a3\u0005\b\u0000\u0000\u00a3\u00a4\u0006\u0007\uffff\uffff"+ + "\u0000\u00a4\u00a5\u0003\u0010\b\u0000\u00a5\u00ad\u0003,\u0016\u0000"+ + "\u00a6\u00a7\u0005\n\u0000\u0000\u00a7\u00a8\u0006\u0007\uffff\uffff\u0000"+ + "\u00a8\u00a9\u0003\u0010\b\u0000\u00a9\u00aa\u0003,\u0016\u0000\u00aa"+ + "\u00ac\u0001\u0000\u0000\u0000\u00ab\u00a6\u0001\u0000\u0000\u0000\u00ac"+ + "\u00af\u0001\u0000\u0000\u0000\u00ad\u00ab\u0001\u0000\u0000\u0000\u00ad"+ + "\u00ae\u0001\u0000\u0000\u0000\u00ae\u00b3\u0001\u0000\u0000\u0000\u00af"+ + "\u00ad\u0001\u0000\u0000\u0000\u00b0\u00b1\u0005\t\u0000\u0000\u00b1\u00b2"+ + "\u0006\u0007\uffff\uffff\u0000\u00b2\u00b4\u0003,\u0016\u0000\u00b3\u00b0"+ + "\u0001\u0000\u0000\u0000\u00b3\u00b4\u0001\u0000\u0000\u0000\u00b4\u00b5"+ + "\u0001\u0000\u0000\u0000\u00b5\u00b6\u0005\u0002\u0000\u0000\u00b6\u000f"+ + "\u0001\u0000\u0000\u0000\u00b7\u00b8\u00051\u0000\u0000\u00b8\u00b9\u0003"+ + ".\u0017\u0000\u00b9\u00c4\u00052\u0000\u0000\u00ba\u00bc\u0007\u0000\u0000"+ + "\u0000\u00bb\u00bd\u00051\u0000\u0000\u00bc\u00bb\u0001\u0000\u0000\u0000"+ + "\u00bc\u00bd\u0001\u0000\u0000\u0000\u00bd\u00be\u0001\u0000\u0000\u0000"+ + "\u00be\u00c0\u0003\u0010\b\u0000\u00bf\u00c1\u00052\u0000\u0000\u00c0"+ + "\u00bf\u0001\u0000\u0000\u0000\u00c0\u00c1\u0001\u0000\u0000\u0000\u00c1"+ + "\u00c3\u0001\u0000\u0000\u0000\u00c2\u00ba\u0001\u0000\u0000\u0000\u00c3"+ + "\u00c6\u0001\u0000\u0000\u0000\u00c4\u00c2\u0001\u0000\u0000\u0000\u00c4"+ + "\u00c5\u0001\u0000\u0000\u0000\u00c5\u00c8\u0001\u0000\u0000\u0000\u00c6"+ + "\u00c4\u0001\u0000\u0000\u0000\u00c7\u00b7\u0001\u0000\u0000\u0000\u00c8"+ + "\u00cb\u0001\u0000\u0000\u0000\u00c9\u00c7\u0001\u0000\u0000\u0000\u00c9"+ + "\u00ca\u0001\u0000\u0000\u0000\u00ca\u0011\u0001\u0000\u0000\u0000\u00cb"+ + "\u00c9\u0001\u0000\u0000\u0000\u00cc\u00cd\u0005\u0004\u0000\u0000\u00cd"+ + "\u00ce\u0006\t\uffff\uffff\u0000\u00ce\u00cf\u00051\u0000\u0000\u00cf"+ + "\u00d0\u0003.\u0017\u0000\u00d0\u00d1\u00052\u0000\u0000\u00d1\u00d2\u0005"+ + ";\u0000\u0000\u00d2\u0013\u0001\u0000\u0000\u0000\u00d3\u00d4\u0005\u0006"+ + "\u0000\u0000\u00d4\u00d5\u0006\n\uffff\uffff\u0000\u00d5\u00d6\u00051"+ + "\u0000\u0000\u00d6\u00d7\u0003.\u0017\u0000\u00d7\u00d8\u00052\u0000\u0000"+ + "\u00d8\u0015\u0001\u0000\u0000\u0000\u00d9\u00da\u0005\u0005\u0000\u0000"+ + "\u00da\u00db\u0006\u000b\uffff\uffff\u0000\u00db\u00dc\u00051\u0000\u0000"+ + "\u00dc\u00dd\u0003.\u0017\u0000\u00dd\u00de\u00057\u0000\u0000\u00de\u00df"+ + "\u0003.\u0017\u0000\u00df\u00e0\u00052\u0000\u0000\u00e0\u00e1\u0005;"+ + "\u0000\u0000\u00e1\u0017\u0001\u0000\u0000\u0000\u00e2\u00e3\u0005\u000e"+ + "\u0000\u0000\u00e3\u00e4\u0005\u0011\u0000\u0000\u00e4\u00e5\u0006\f\uffff"+ + "\uffff\u0000\u00e5\u00e6\u0003\u001a\r\u0000\u00e6\u00e7\u0005\u0002\u0000"+ + "\u0000\u00e7\u0019\u0001\u0000\u0000\u0000\u00e8\u00f8\u0003*\u0015\u0000"+ + "\u00e9\u00ea\u0005(\u0000\u0000\u00ea\u00ed\u0006\r\uffff\uffff\u0000"+ + "\u00eb\u00ec\u0005\b\u0000\u0000\u00ec\u00ee\u0003\u0010\b\u0000\u00ed"+ + "\u00eb\u0001\u0000\u0000\u0000\u00ed\u00ee\u0001\u0000\u0000\u0000\u00ee"+ + "\u00ef\u0001\u0000\u0000\u0000\u00ef\u00f8\u0005;\u0000\u0000\u00f0\u00f1"+ + "\u0005)\u0000\u0000\u00f1\u00f4\u0006\r\uffff\uffff\u0000\u00f2\u00f3"+ + "\u0005\b\u0000\u0000\u00f3\u00f5\u0003\u0010\b\u0000\u00f4\u00f2\u0001"+ + "\u0000\u0000\u0000\u00f4\u00f5\u0001\u0000\u0000\u0000\u00f5\u00f6\u0001"+ + "\u0000\u0000\u0000\u00f6\u00f8\u0005;\u0000\u0000\u00f7\u00e8\u0001\u0000"+ + "\u0000\u0000\u00f7\u00e9\u0001\u0000\u0000\u0000\u00f7\u00f0\u0001\u0000"+ + "\u0000\u0000\u00f8\u00fb\u0001\u0000\u0000\u0000\u00f9\u00f7\u0001\u0000"+ + "\u0000\u0000\u00f9\u00fa\u0001\u0000\u0000\u0000\u00fa\u00fd\u0001\u0000"+ + "\u0000\u0000\u00fb\u00f9\u0001\u0000\u0000\u0000\u00fc\u00fe\u0003\f\u0006"+ + "\u0000\u00fd\u00fc\u0001\u0000\u0000\u0000\u00fd\u00fe\u0001\u0000\u0000"+ + "\u0000\u00fe\u001b\u0001\u0000\u0000\u0000\u00ff\u0100\u0005\u000f\u0000"+ + "\u0000\u0100\u0101\u0006\u000e\uffff\uffff\u0000\u0101\u0102\u0005>\u0000"+ + "\u0000\u0102\u0103\u0005\u0010\u0000\u0000\u0103\u0104\u0003\u001e\u000f"+ + "\u0000\u0104\u0105\u0003\u001a\r\u0000\u0105\u0106\u0005\u0002\u0000\u0000"+ + "\u0106\u001d\u0001\u0000\u0000\u0000\u0107\u0108\u00051\u0000\u0000\u0108"+ + "\u0109\u0003.\u0017\u0000\u0109\u010a\u00059\u0000\u0000\u010a\u010b\u0003"+ + ".\u0017\u0000\u010b\u010c\u00052\u0000\u0000\u010c\u011a\u0001\u0000\u0000"+ + "\u0000\u010d\u010e\u00053\u0000\u0000\u010e\u0113\u0003.\u0017\u0000\u010f"+ + "\u0110\u00057\u0000\u0000\u0110\u0112\u0003.\u0017\u0000\u0111\u010f\u0001"+ + "\u0000\u0000\u0000\u0112\u0115\u0001\u0000\u0000\u0000\u0113\u0111\u0001"+ + "\u0000\u0000\u0000\u0113\u0114\u0001\u0000\u0000\u0000\u0114\u0116\u0001"+ + "\u0000\u0000\u0000\u0115\u0113\u0001\u0000\u0000\u0000\u0116\u0117\u0005"+ + "4\u0000\u0000\u0117\u011a\u0001\u0000\u0000\u0000\u0118\u011a\u0005>\u0000"+ + "\u0000\u0119\u0107\u0001\u0000\u0000\u0000\u0119\u010d\u0001\u0000\u0000"+ + "\u0000\u0119\u0118\u0001\u0000\u0000\u0000\u011a\u001f\u0001\u0000\u0000"+ + "\u0000\u011b\u011c\u0006\u0010\uffff\uffff\u0000\u011c\u011d\u00053\u0000"+ + "\u0000\u011d\u011e\u0003.\u0017\u0000\u011e\u011f\u0005$\u0000\u0000\u011f"+ + "\u0120\u0005>\u0000\u0000\u0120\u0121\u0005*\u0000\u0000\u0121\u0122\u0003"+ + "\u001e\u000f\u0000\u0122\u0123\u00057\u0000\u0000\u0123\u0128\u0003.\u0017"+ + "\u0000\u0124\u0125\u00057\u0000\u0000\u0125\u0127\u0003.\u0017\u0000\u0126"+ + "\u0124\u0001\u0000\u0000\u0000\u0127\u012a\u0001\u0000\u0000\u0000\u0128"+ + "\u0126\u0001\u0000\u0000\u0000\u0128\u0129\u0001\u0000\u0000\u0000\u0129"+ + "\u012b\u0001\u0000\u0000\u0000\u012a\u0128\u0001\u0000\u0000\u0000\u012b"+ + "\u012c\u00054\u0000\u0000\u012c!\u0001\u0000\u0000\u0000\u012d\u012e\u0006"+ + "\u0011\uffff\uffff\u0000\u012e\u012f\u0005>\u0000\u0000\u012f\u0130\u0005"+ + "8\u0000\u0000\u0130\u0131\u0005\r\u0000\u0000\u0131\u0132\u00051\u0000"+ + "\u0000\u0132\u0133\u0003.\u0017\u0000\u0133\u0134\u00052\u0000\u0000\u0134"+ + "#\u0001\u0000\u0000\u0000\u0135\u0136\u0005\u0012\u0000\u0000\u0136\u013a"+ + "\u0006\u0012\uffff\uffff\u0000\u0137\u0138\u0005\u0013\u0000\u0000\u0138"+ + "\u013a\u0006\u0012\uffff\uffff\u0000\u0139\u0135\u0001\u0000\u0000\u0000"+ + "\u0139\u0137\u0001\u0000\u0000\u0000\u013a\u013b\u0001\u0000\u0000\u0000"+ + "\u013b\u013c\u00051\u0000\u0000\u013c\u013d\u0003.\u0017\u0000\u013d\u013e"+ + "\u00052\u0000\u0000\u013e%\u0001\u0000\u0000\u0000\u013f\u0140\u0005>"+ + "\u0000\u0000\u0140\u0142\u0006\u0013\uffff\uffff\u0000\u0141\u0143\u0003"+ + "(\u0014\u0000\u0142\u0141\u0001\u0000\u0000\u0000\u0142\u0143\u0001\u0000"+ + "\u0000\u0000\u0143\u0144\u0001\u0000\u0000\u0000\u0144\u0145\u0007\u0001"+ + "\u0000\u0000\u0145\u0146\u0003.\u0017\u0000\u0146\u0147\u0005;\u0000\u0000"+ + "\u0147\'\u0001\u0000\u0000\u0000\u0148\u0149\u00053\u0000\u0000\u0149"+ + "\u014a\u0003.\u0017\u0000\u014a\u014b\u00054\u0000\u0000\u014b)\u0001"+ + "\u0000\u0000\u0000\u014c\u0156\u0003\u000e\u0007\u0000\u014d\u0156\u0003"+ + "\u0018\f\u0000\u014e\u0156\u0003\u001c\u000e\u0000\u014f\u0156\u0003\u0012"+ + "\t\u0000\u0150\u0156\u0003\u0016\u000b\u0000\u0151\u0152\u0003.\u0017"+ + "\u0000\u0152\u0153\u0005;\u0000\u0000\u0153\u0156\u0001\u0000\u0000\u0000"+ + "\u0154\u0156\u0003&\u0013\u0000\u0155\u014c\u0001\u0000\u0000\u0000\u0155"+ + "\u014d\u0001\u0000\u0000\u0000\u0155\u014e\u0001\u0000\u0000\u0000\u0155"+ + "\u014f\u0001\u0000\u0000\u0000\u0155\u0150\u0001\u0000\u0000\u0000\u0155"+ + "\u0151\u0001\u0000\u0000\u0000\u0155\u0154\u0001\u0000\u0000\u0000\u0156"+ + "+\u0001\u0000\u0000\u0000\u0157\u0159\u0003*\u0015\u0000\u0158\u0157\u0001"+ + "\u0000\u0000\u0000\u0159\u015c\u0001\u0000\u0000\u0000\u015a\u0158\u0001"+ + "\u0000\u0000\u0000\u015a\u015b\u0001\u0000\u0000\u0000\u015b\u015e\u0001"+ + "\u0000\u0000\u0000\u015c\u015a\u0001\u0000\u0000\u0000\u015d\u015f\u0003"+ + "\f\u0006\u0000\u015e\u015d\u0001\u0000\u0000\u0000\u015e\u015f\u0001\u0000"+ + "\u0000\u0000\u015f-\u0001\u0000\u0000\u0000\u0160\u0161\u0006\u0017\uffff"+ + "\uffff\u0000\u0161\u0162\u00030\u0018\u0000\u0162\u016a\u0001\u0000\u0000"+ + "\u0000\u0163\u0164\n\u0002\u0000\u0000\u0164\u0165\u0005%\u0000\u0000"+ + "\u0165\u0166\u00030\u0018\u0000\u0166\u0167\u0006\u0017\uffff\uffff\u0000"+ + "\u0167\u0169\u0001\u0000\u0000\u0000\u0168\u0163\u0001\u0000\u0000\u0000"+ + "\u0169\u016c\u0001\u0000\u0000\u0000\u016a\u0168\u0001\u0000\u0000\u0000"+ + "\u016a\u016b\u0001\u0000\u0000\u0000\u016b/\u0001\u0000\u0000\u0000\u016c"+ + "\u016a\u0001\u0000\u0000\u0000\u016d\u016e\u0006\u0018\uffff\uffff\u0000"+ + "\u016e\u016f\u00032\u0019\u0000\u016f\u017a\u0001\u0000\u0000\u0000\u0170"+ + "\u0173\n\u0002\u0000\u0000\u0171\u0174\u0005\u0018\u0000\u0000\u0172\u0174"+ + "\u0005\u0019\u0000\u0000\u0173\u0171\u0001\u0000\u0000\u0000\u0173\u0172"+ + "\u0001\u0000\u0000\u0000\u0174\u0175\u0001\u0000\u0000\u0000\u0175\u0176"+ + "\u00032\u0019\u0000\u0176\u0177\u0006\u0018\uffff\uffff\u0000\u0177\u0179"+ + "\u0001\u0000\u0000\u0000\u0178\u0170\u0001\u0000\u0000\u0000\u0179\u017c"+ + "\u0001\u0000\u0000\u0000\u017a\u0178\u0001\u0000\u0000\u0000\u017a\u017b"+ + "\u0001\u0000\u0000\u0000\u017b1\u0001\u0000\u0000\u0000\u017c\u017a\u0001"+ + "\u0000\u0000\u0000\u017d\u017e\u0006\u0019\uffff\uffff\u0000\u017e\u017f"+ + "\u00034\u001a\u0000\u017f\u018c\u0001\u0000\u0000\u0000\u0180\u0185\n"+ + "\u0002\u0000\u0000\u0181\u0186\u0005\u001c\u0000\u0000\u0182\u0186\u0005"+ + "\u001d\u0000\u0000\u0183\u0186\u0005\u001a\u0000\u0000\u0184\u0186\u0005"+ + "\u001b\u0000\u0000\u0185\u0181\u0001\u0000\u0000\u0000\u0185\u0182\u0001"+ + "\u0000\u0000\u0000\u0185\u0183\u0001\u0000\u0000\u0000\u0185\u0184\u0001"+ + "\u0000\u0000\u0000\u0186\u0187\u0001\u0000\u0000\u0000\u0187\u0188\u0003"+ + "4\u001a\u0000\u0188\u0189\u0006\u0019\uffff\uffff\u0000\u0189\u018b\u0001"+ + "\u0000\u0000\u0000\u018a\u0180\u0001\u0000\u0000\u0000\u018b\u018e\u0001"+ + "\u0000\u0000\u0000\u018c\u018a\u0001\u0000\u0000\u0000\u018c\u018d\u0001"+ + "\u0000\u0000\u0000\u018d3\u0001\u0000\u0000\u0000\u018e\u018c\u0001\u0000"+ + "\u0000\u0000\u018f\u0190\u0006\u001a\uffff\uffff\u0000\u0190\u0191\u0003"+ + "6\u001b\u0000\u0191\u019c\u0001\u0000\u0000\u0000\u0192\u0195\n\u0002"+ + "\u0000\u0000\u0193\u0196\u0005\u0014\u0000\u0000\u0194\u0196\u0005\u0015"+ + "\u0000\u0000\u0195\u0193\u0001\u0000\u0000\u0000\u0195\u0194\u0001\u0000"+ + "\u0000\u0000\u0196\u0197\u0001\u0000\u0000\u0000\u0197\u0198\u00036\u001b"+ + "\u0000\u0198\u0199\u0006\u001a\uffff\uffff\u0000\u0199\u019b\u0001\u0000"+ + "\u0000\u0000\u019a\u0192\u0001\u0000\u0000\u0000\u019b\u019e\u0001\u0000"+ + "\u0000\u0000\u019c\u019a\u0001\u0000\u0000\u0000\u019c\u019d\u0001\u0000"+ + "\u0000\u0000\u019d5\u0001\u0000\u0000\u0000\u019e\u019c\u0001\u0000\u0000"+ + "\u0000\u019f\u01a0\u0006\u001b\uffff\uffff\u0000\u01a0\u01a1\u00038\u001c"+ + "\u0000\u01a1\u01ac\u0001\u0000\u0000\u0000\u01a2\u01a5\n\u0002\u0000\u0000"+ + "\u01a3\u01a6\u0005\u0016\u0000\u0000\u01a4\u01a6\u0005\u0017\u0000\u0000"+ + "\u01a5\u01a3\u0001\u0000\u0000\u0000\u01a5\u01a4\u0001\u0000\u0000\u0000"+ + "\u01a6\u01a7\u0001\u0000\u0000\u0000\u01a7\u01a8\u00038\u001c\u0000\u01a8"+ + "\u01a9\u0006\u001b\uffff\uffff\u0000\u01a9\u01ab\u0001\u0000\u0000\u0000"+ + "\u01aa\u01a2\u0001\u0000\u0000\u0000\u01ab\u01ae\u0001\u0000\u0000\u0000"+ + "\u01ac\u01aa\u0001\u0000\u0000\u0000\u01ac\u01ad\u0001\u0000\u0000\u0000"+ + "\u01ad7\u0001\u0000\u0000\u0000\u01ae\u01ac\u0001\u0000\u0000\u0000\u01af"+ + "\u01b4\u0005 \u0000\u0000\u01b0\u01b4\u0005\u0015\u0000\u0000\u01b1\u01b4"+ + "\u0005!\u0000\u0000\u01b2\u01b4\u0005\"\u0000\u0000\u01b3\u01af\u0001"+ + "\u0000\u0000\u0000\u01b3\u01b0\u0001\u0000\u0000\u0000\u01b3\u01b1\u0001"+ + "\u0000\u0000\u0000\u01b3\u01b2\u0001\u0000\u0000\u0000\u01b4\u01b5\u0001"+ + "\u0000\u0000\u0000\u01b5\u01b6\u0003:\u001d\u0000\u01b6\u01b7\u0006\u001c"+ + "\uffff\uffff\u0000\u01b7\u01ba\u0001\u0000\u0000\u0000\u01b8\u01ba\u0003"+ + ":\u001d\u0000\u01b9\u01b3\u0001\u0000\u0000\u0000\u01b9\u01b8\u0001\u0000"+ + "\u0000\u0000\u01ba9\u0001\u0000\u0000\u0000\u01bb\u01c3\u0003<\u001e\u0000"+ + "\u01bc\u01bd\u00051\u0000\u0000\u01bd\u01be\u0006\u001d\uffff\uffff\u0000"+ + "\u01be\u01bf\u0003\n\u0005\u0000\u01bf\u01c0\u00052\u0000\u0000\u01c0"+ + "\u01c2\u0001\u0000\u0000\u0000\u01c1\u01bc\u0001\u0000\u0000\u0000\u01c2"+ + "\u01c5\u0001\u0000\u0000\u0000\u01c3\u01c1\u0001\u0000\u0000\u0000\u01c3"+ + "\u01c4\u0001\u0000\u0000\u0000\u01c4\u01c9\u0001\u0000\u0000\u0000\u01c5"+ + "\u01c3\u0001\u0000\u0000\u0000\u01c6\u01c8\u0003(\u0014\u0000\u01c7\u01c6"+ + "\u0001\u0000\u0000\u0000\u01c8\u01cb\u0001\u0000\u0000\u0000\u01c9\u01c7"+ + "\u0001\u0000\u0000\u0000\u01c9\u01ca\u0001\u0000\u0000\u0000\u01ca;\u0001"+ + "\u0000\u0000\u0000\u01cb\u01c9\u0001\u0000\u0000\u0000\u01cc\u01d9\u0003"+ + "@ \u0000\u01cd\u01d9\u0005>\u0000\u0000\u01ce\u01d9\u0003>\u001f\u0000"+ + "\u01cf\u01d9\u0003$\u0012\u0000\u01d0\u01d9\u0003\"\u0011\u0000\u01d1"+ + "\u01d9\u0003 \u0010\u0000\u01d2\u01d9\u0003\u0014\n\u0000\u01d3\u01d5"+ + "\u00051\u0000\u0000\u01d4\u01d6\u0003.\u0017\u0000\u01d5\u01d4\u0001\u0000"+ + "\u0000\u0000\u01d5\u01d6\u0001\u0000\u0000\u0000\u01d6\u01d7\u0001\u0000"+ + "\u0000\u0000\u01d7\u01d9\u00052\u0000\u0000\u01d8\u01cc\u0001\u0000\u0000"+ + "\u0000\u01d8\u01cd\u0001\u0000\u0000\u0000\u01d8\u01ce\u0001\u0000\u0000"+ + "\u0000\u01d8\u01cf\u0001\u0000\u0000\u0000\u01d8\u01d0\u0001\u0000\u0000"+ + "\u0000\u01d8\u01d1\u0001\u0000\u0000\u0000\u01d8\u01d2\u0001\u0000\u0000"+ + "\u0000\u01d8\u01d3\u0001\u0000\u0000\u0000\u01d9=\u0001\u0000\u0000\u0000"+ + "\u01da\u01db\u0005*\u0000\u0000\u01db\u01dc\u0006\u001f\uffff\uffff\u0000"+ + "\u01dc\u01dd\u0003\u0004\u0002\u0000\u01dd\u01de\u00055\u0000\u0000\u01de"+ + "\u01df\u0003,\u0016\u0000\u01df\u01e0\u00056\u0000\u0000\u01e0\u01e1\u0003"+ + "\n\u0005\u0000\u01e1?\u0001\u0000\u0000\u0000\u01e2\u01e9\u0003D\"\u0000"+ + "\u01e3\u01e9\u0005?\u0000\u0000\u01e4\u01e9\u0005<\u0000\u0000\u01e5\u01e9"+ + "\u0005=\u0000\u0000\u01e6\u01e9\u0003B!\u0000\u01e7\u01e9\u0003F#\u0000"+ + "\u01e8\u01e2\u0001\u0000\u0000\u0000\u01e8\u01e3\u0001\u0000\u0000\u0000"+ + "\u01e8\u01e4\u0001\u0000\u0000\u0000\u01e8\u01e5\u0001\u0000\u0000\u0000"+ + "\u01e8\u01e6\u0001\u0000\u0000\u0000\u01e8\u01e7\u0001\u0000\u0000\u0000"+ + "\u01e9A\u0001\u0000\u0000\u0000\u01ea\u01eb\u00053\u0000\u0000\u01eb\u01ec"+ + "\u0003\n\u0005\u0000\u01ec\u01ed\u00054\u0000\u0000\u01edC\u0001\u0000"+ + "\u0000\u0000\u01ee\u01ef\u0007\u0002\u0000\u0000\u01efE\u0001\u0000\u0000"+ + "\u0000\u01f0\u01f1\u0005\u000b\u0000\u0000\u01f1\u01f2\u00051\u0000\u0000"+ + "\u01f2\u01f3\u0005:\u0000\u0000\u01f3\u01f4\u0005>\u0000\u0000\u01f4\u01f5"+ + "\u00052\u0000\u0000\u01f5G\u0001\u0000\u0000\u0000-JL^lqs\u0084\u0096"+ + "\u0099\u009e\u00ad\u00b3\u00bc\u00c0\u00c4\u00c9\u00ed\u00f4\u00f7\u00f9"+ + "\u00fd\u0113\u0119\u0128\u0139\u0142\u0155\u015a\u015e\u016a\u0173\u017a"+ + "\u0185\u018c\u0195\u019c\u01a5\u01ac\u01b3\u01b9\u01c3\u01c9\u01d5\u01d8"+ + "\u01e8"; public static final ATN _ATN = new ATNDeserializer().deserialize(_serializedATN.toCharArray()); static { diff --git a/Phase1Template/untitled/gen/main/grammer/FunctionCraftVisitor.java b/Phase1Template/untitled/gen/main/grammer/FunctionCraftVisitor.java index 9e6c7f6..cda99f1 100644 --- a/Phase1Template/untitled/gen/main/grammer/FunctionCraftVisitor.java +++ b/Phase1Template/untitled/gen/main/grammer/FunctionCraftVisitor.java @@ -154,6 +154,12 @@ public interface FunctionCraftVisitor extends ParseTreeVisitor { * @return the visitor result */ T visitExpression(FunctionCraftParser.ExpressionContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#eqaulityExpression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitEqaulityExpression(FunctionCraftParser.EqaulityExpressionContext ctx); /** * Visit a parse tree produced by {@link FunctionCraftParser#relationalExpression}. * @param ctx the parse tree @@ -178,12 +184,6 @@ public interface FunctionCraftVisitor extends ParseTreeVisitor { * @return the visitor result */ T visitPreUnaryExpression(FunctionCraftParser.PreUnaryExpressionContext ctx); - /** - * Visit a parse tree produced by {@link FunctionCraftParser#appendExpression}. - * @param ctx the parse tree - * @return the visitor result - */ - T visitAppendExpression(FunctionCraftParser.AppendExpressionContext ctx); /** * Visit a parse tree produced by {@link FunctionCraftParser#accessExpression}. * @param ctx the parse tree diff --git a/Phase1Template/untitled/samples/2.fl b/Phase1Template/untitled/samples/2.fl index b8744b8..511f01b 100644 --- a/Phase1Template/untitled/samples/2.fl +++ b/Phase1Template/untitled/samples/2.fl @@ -1,5 +1,6 @@ def main() puts(len(a)); + a == 5; end diff --git a/Phase1Template/untitled/src/parsers/FunctionCraft.interp b/Phase1Template/untitled/src/parsers/FunctionCraft.interp new file mode 100644 index 0000000..01313b4 --- /dev/null +++ b/Phase1Template/untitled/src/parsers/FunctionCraft.interp @@ -0,0 +1,178 @@ +token literal names: +null +'def' +'end' +'main' +'puts' +'push' +'len' +'return' +'if' +'else' +'elseif' +'method' +'pattern' +'match' +'loop' +'for' +'in' +'do' +'chop' +'chomp' +'+' +'-' +'*' +'/' +'==' +'!=' +'<=' +'>=' +'>' +'<' +'&&' +'||' +'!' +'++' +'--' +' |' +'|' +'<<' +'true' +'false' +'break' +'next' +'->' +'+=' +'-=' +'*=' +'/=' +'%=' +'=' +'(' +')' +'[' +']' +'{' +'}' +',' +'.' +'..' +':' +';' +null +null +null +null +null +null + +token symbolic names: +null +DEF +END +MAIN +PUTS +PUSH +LEN +RETURN +IF +ELSE +ELSEIF +METHOD +PATTERN +MATCH +LOOP +FOR +IN +DO +CHOP +CHOMP +PLUS +MINUS +MULT +DIVIDE +EQUAL +NOT_EQUAL +LESS_EQUAL_THAN +GREATER_EQUAL_THAN +GREATER_THAN +LESS_THAN +AND +OR +NOT +INCREMENT +DECREMENT +PATTERN_MATCHING_SEPARATOR +SEPARATOR +APPEND +TRUE +FALSE +BREAK +NEXT +ARROW +PLUS_ASSIGN +MINUS_ASSIGN +MULT_ASSIGN +DIVIDE_ASSIGN +MOD_ASSIGN +ASSIGN +LPAR +RPAR +LBRACK +RBRACK +LBRACE +RBRACE +COMMA +DOT +DOUBLEDOT +COLON +SEMICOLLON +INT_VALUE +FLOAT_VALUE +IDENTIFIER +STRING_VALUE +COMMENT +WS + +rule names: +program +functionDeclaration +functionArgumentsDeclaration +patternMatching +main +functionArguments +returnStatement +ifStatement +condition +putsStatement +lenStatement +pushStatement +loopDoStatement +loopBody +forStatement +range +filterStatement +matchPatternStatement +chopStatement +chompStatement +assignment +accessList +statement +body +expression +eqaulityExpression +relationalExpression +additiveExpression +multiplicativeExpression +preUnaryExpression +accessExpression +otherExpression +lambdaFunction +values +listValue +boolValue +functionPointer + + +atn: +[4, 1, 65, 664, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 5, 0, 82, 8, 0, 10, 0, 12, 0, 85, 9, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 5, 2, 108, 8, 2, 10, 2, 12, 2, 111, 9, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 5, 2, 127, 8, 2, 10, 2, 12, 2, 130, 9, 2, 1, 2, 1, 2, 3, 2, 134, 8, 2, 3, 2, 136, 8, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 5, 3, 155, 8, 3, 10, 3, 12, 3, 158, 9, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 5, 5, 179, 8, 5, 10, 5, 12, 5, 182, 9, 5, 3, 5, 184, 8, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 191, 8, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 5, 7, 209, 8, 7, 10, 7, 12, 7, 212, 9, 7, 1, 7, 1, 7, 1, 7, 1, 7, 3, 7, 218, 8, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 230, 8, 8, 1, 8, 1, 8, 1, 8, 3, 8, 235, 8, 8, 5, 8, 237, 8, 8, 10, 8, 12, 8, 240, 9, 8, 5, 8, 242, 8, 8, 10, 8, 12, 8, 245, 9, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 284, 8, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 292, 8, 13, 1, 13, 5, 13, 295, 8, 13, 10, 13, 12, 13, 298, 9, 13, 1, 13, 1, 13, 1, 13, 3, 13, 303, 8, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 5, 15, 329, 8, 15, 10, 15, 12, 15, 332, 9, 15, 1, 15, 1, 15, 1, 15, 1, 15, 3, 15, 338, 8, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 5, 16, 354, 8, 16, 10, 16, 12, 16, 357, 9, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 387, 8, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 401, 8, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 3, 22, 434, 8, 22, 1, 23, 1, 23, 1, 23, 1, 23, 5, 23, 440, 8, 23, 10, 23, 12, 23, 443, 9, 23, 1, 23, 1, 23, 1, 23, 3, 23, 448, 8, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 5, 24, 459, 8, 24, 10, 24, 12, 24, 462, 9, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 3, 25, 474, 8, 25, 1, 25, 1, 25, 1, 25, 5, 25, 479, 8, 25, 10, 25, 12, 25, 482, 9, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 3, 26, 498, 8, 26, 1, 26, 1, 26, 1, 26, 5, 26, 503, 8, 26, 10, 26, 12, 26, 506, 9, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 3, 27, 518, 8, 27, 1, 27, 1, 27, 1, 27, 5, 27, 523, 8, 27, 10, 27, 12, 27, 526, 9, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 3, 28, 538, 8, 28, 1, 28, 1, 28, 1, 28, 5, 28, 543, 8, 28, 10, 28, 12, 28, 546, 9, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 3, 29, 557, 8, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 3, 29, 565, 8, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 5, 30, 574, 8, 30, 10, 30, 12, 30, 577, 9, 30, 1, 30, 1, 30, 1, 30, 5, 30, 582, 8, 30, 10, 30, 12, 30, 585, 9, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 3, 31, 616, 8, 31, 1, 31, 3, 31, 619, 8, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 3, 33, 644, 8, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 3, 35, 655, 8, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 0, 5, 48, 50, 52, 54, 56, 37, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 0, 1, 1, 0, 30, 31, 698, 0, 74, 1, 0, 0, 0, 2, 89, 1, 0, 0, 0, 4, 100, 1, 0, 0, 0, 6, 139, 1, 0, 0, 0, 8, 161, 1, 0, 0, 0, 10, 171, 1, 0, 0, 0, 12, 185, 1, 0, 0, 0, 14, 194, 1, 0, 0, 0, 16, 222, 1, 0, 0, 0, 18, 246, 1, 0, 0, 0, 20, 253, 1, 0, 0, 0, 22, 259, 1, 0, 0, 0, 24, 268, 1, 0, 0, 0, 26, 274, 1, 0, 0, 0, 28, 304, 1, 0, 0, 0, 30, 337, 1, 0, 0, 0, 32, 339, 1, 0, 0, 0, 34, 361, 1, 0, 0, 0, 36, 369, 1, 0, 0, 0, 38, 375, 1, 0, 0, 0, 40, 381, 1, 0, 0, 0, 42, 406, 1, 0, 0, 0, 44, 433, 1, 0, 0, 0, 46, 435, 1, 0, 0, 0, 48, 449, 1, 0, 0, 0, 50, 463, 1, 0, 0, 0, 52, 483, 1, 0, 0, 0, 54, 507, 1, 0, 0, 0, 56, 527, 1, 0, 0, 0, 58, 564, 1, 0, 0, 0, 60, 566, 1, 0, 0, 0, 62, 618, 1, 0, 0, 0, 64, 620, 1, 0, 0, 0, 66, 643, 1, 0, 0, 0, 68, 645, 1, 0, 0, 0, 70, 654, 1, 0, 0, 0, 72, 656, 1, 0, 0, 0, 74, 83, 6, 0, -1, 0, 75, 76, 3, 2, 1, 0, 76, 77, 6, 0, -1, 0, 77, 82, 1, 0, 0, 0, 78, 79, 3, 6, 3, 0, 79, 80, 6, 0, -1, 0, 80, 82, 1, 0, 0, 0, 81, 75, 1, 0, 0, 0, 81, 78, 1, 0, 0, 0, 82, 85, 1, 0, 0, 0, 83, 81, 1, 0, 0, 0, 83, 84, 1, 0, 0, 0, 84, 86, 1, 0, 0, 0, 85, 83, 1, 0, 0, 0, 86, 87, 3, 8, 4, 0, 87, 88, 6, 0, -1, 0, 88, 1, 1, 0, 0, 0, 89, 90, 6, 1, -1, 0, 90, 91, 5, 1, 0, 0, 91, 92, 6, 1, -1, 0, 92, 93, 5, 62, 0, 0, 93, 94, 6, 1, -1, 0, 94, 95, 3, 4, 2, 0, 95, 96, 6, 1, -1, 0, 96, 97, 3, 46, 23, 0, 97, 98, 6, 1, -1, 0, 98, 99, 5, 2, 0, 0, 99, 3, 1, 0, 0, 0, 100, 101, 6, 2, -1, 0, 101, 135, 5, 49, 0, 0, 102, 103, 5, 62, 0, 0, 103, 109, 6, 2, -1, 0, 104, 105, 5, 55, 0, 0, 105, 106, 5, 62, 0, 0, 106, 108, 6, 2, -1, 0, 107, 104, 1, 0, 0, 0, 108, 111, 1, 0, 0, 0, 109, 107, 1, 0, 0, 0, 109, 110, 1, 0, 0, 0, 110, 133, 1, 0, 0, 0, 111, 109, 1, 0, 0, 0, 112, 113, 5, 55, 0, 0, 113, 114, 5, 51, 0, 0, 114, 115, 5, 62, 0, 0, 115, 116, 6, 2, -1, 0, 116, 117, 5, 48, 0, 0, 117, 118, 3, 48, 24, 0, 118, 128, 6, 2, -1, 0, 119, 120, 5, 55, 0, 0, 120, 121, 5, 62, 0, 0, 121, 122, 6, 2, -1, 0, 122, 123, 5, 48, 0, 0, 123, 124, 3, 48, 24, 0, 124, 125, 6, 2, -1, 0, 125, 127, 1, 0, 0, 0, 126, 119, 1, 0, 0, 0, 127, 130, 1, 0, 0, 0, 128, 126, 1, 0, 0, 0, 128, 129, 1, 0, 0, 0, 129, 131, 1, 0, 0, 0, 130, 128, 1, 0, 0, 0, 131, 132, 5, 52, 0, 0, 132, 134, 1, 0, 0, 0, 133, 112, 1, 0, 0, 0, 133, 134, 1, 0, 0, 0, 134, 136, 1, 0, 0, 0, 135, 102, 1, 0, 0, 0, 135, 136, 1, 0, 0, 0, 136, 137, 1, 0, 0, 0, 137, 138, 5, 50, 0, 0, 138, 5, 1, 0, 0, 0, 139, 140, 5, 12, 0, 0, 140, 141, 6, 3, -1, 0, 141, 142, 5, 62, 0, 0, 142, 143, 6, 3, -1, 0, 143, 144, 5, 49, 0, 0, 144, 145, 5, 62, 0, 0, 145, 146, 6, 3, -1, 0, 146, 156, 5, 50, 0, 0, 147, 148, 5, 35, 0, 0, 148, 149, 3, 16, 8, 0, 149, 150, 6, 3, -1, 0, 150, 151, 5, 48, 0, 0, 151, 152, 3, 48, 24, 0, 152, 153, 6, 3, -1, 0, 153, 155, 1, 0, 0, 0, 154, 147, 1, 0, 0, 0, 155, 158, 1, 0, 0, 0, 156, 154, 1, 0, 0, 0, 156, 157, 1, 0, 0, 0, 157, 159, 1, 0, 0, 0, 158, 156, 1, 0, 0, 0, 159, 160, 5, 59, 0, 0, 160, 7, 1, 0, 0, 0, 161, 162, 6, 4, -1, 0, 162, 163, 5, 1, 0, 0, 163, 164, 5, 3, 0, 0, 164, 165, 6, 4, -1, 0, 165, 166, 5, 49, 0, 0, 166, 167, 5, 50, 0, 0, 167, 168, 3, 46, 23, 0, 168, 169, 6, 4, -1, 0, 169, 170, 5, 2, 0, 0, 170, 9, 1, 0, 0, 0, 171, 183, 6, 5, -1, 0, 172, 173, 3, 48, 24, 0, 173, 180, 6, 5, -1, 0, 174, 175, 5, 55, 0, 0, 175, 176, 3, 48, 24, 0, 176, 177, 6, 5, -1, 0, 177, 179, 1, 0, 0, 0, 178, 174, 1, 0, 0, 0, 179, 182, 1, 0, 0, 0, 180, 178, 1, 0, 0, 0, 180, 181, 1, 0, 0, 0, 181, 184, 1, 0, 0, 0, 182, 180, 1, 0, 0, 0, 183, 172, 1, 0, 0, 0, 183, 184, 1, 0, 0, 0, 184, 11, 1, 0, 0, 0, 185, 186, 6, 6, -1, 0, 186, 190, 5, 7, 0, 0, 187, 188, 3, 48, 24, 0, 188, 189, 6, 6, -1, 0, 189, 191, 1, 0, 0, 0, 190, 187, 1, 0, 0, 0, 190, 191, 1, 0, 0, 0, 191, 192, 1, 0, 0, 0, 192, 193, 5, 59, 0, 0, 193, 13, 1, 0, 0, 0, 194, 195, 6, 7, -1, 0, 195, 196, 5, 8, 0, 0, 196, 197, 6, 7, -1, 0, 197, 198, 3, 16, 8, 0, 198, 199, 6, 7, -1, 0, 199, 200, 3, 46, 23, 0, 200, 201, 6, 7, -1, 0, 201, 210, 6, 7, -1, 0, 202, 203, 5, 10, 0, 0, 203, 204, 3, 16, 8, 0, 204, 205, 6, 7, -1, 0, 205, 206, 3, 46, 23, 0, 206, 207, 6, 7, -1, 0, 207, 209, 1, 0, 0, 0, 208, 202, 1, 0, 0, 0, 209, 212, 1, 0, 0, 0, 210, 208, 1, 0, 0, 0, 210, 211, 1, 0, 0, 0, 211, 217, 1, 0, 0, 0, 212, 210, 1, 0, 0, 0, 213, 214, 5, 9, 0, 0, 214, 215, 3, 46, 23, 0, 215, 216, 6, 7, -1, 0, 216, 218, 1, 0, 0, 0, 217, 213, 1, 0, 0, 0, 217, 218, 1, 0, 0, 0, 218, 219, 1, 0, 0, 0, 219, 220, 6, 7, -1, 0, 220, 221, 5, 2, 0, 0, 221, 15, 1, 0, 0, 0, 222, 243, 6, 8, -1, 0, 223, 224, 5, 49, 0, 0, 224, 225, 3, 48, 24, 0, 225, 226, 6, 8, -1, 0, 226, 238, 5, 50, 0, 0, 227, 229, 7, 0, 0, 0, 228, 230, 5, 49, 0, 0, 229, 228, 1, 0, 0, 0, 229, 230, 1, 0, 0, 0, 230, 231, 1, 0, 0, 0, 231, 232, 3, 16, 8, 0, 232, 234, 6, 8, -1, 0, 233, 235, 5, 50, 0, 0, 234, 233, 1, 0, 0, 0, 234, 235, 1, 0, 0, 0, 235, 237, 1, 0, 0, 0, 236, 227, 1, 0, 0, 0, 237, 240, 1, 0, 0, 0, 238, 236, 1, 0, 0, 0, 238, 239, 1, 0, 0, 0, 239, 242, 1, 0, 0, 0, 240, 238, 1, 0, 0, 0, 241, 223, 1, 0, 0, 0, 242, 245, 1, 0, 0, 0, 243, 241, 1, 0, 0, 0, 243, 244, 1, 0, 0, 0, 244, 17, 1, 0, 0, 0, 245, 243, 1, 0, 0, 0, 246, 247, 5, 4, 0, 0, 247, 248, 5, 49, 0, 0, 248, 249, 3, 48, 24, 0, 249, 250, 6, 9, -1, 0, 250, 251, 5, 50, 0, 0, 251, 252, 5, 59, 0, 0, 252, 19, 1, 0, 0, 0, 253, 254, 5, 6, 0, 0, 254, 255, 5, 49, 0, 0, 255, 256, 3, 48, 24, 0, 256, 257, 6, 10, -1, 0, 257, 258, 5, 50, 0, 0, 258, 21, 1, 0, 0, 0, 259, 260, 5, 5, 0, 0, 260, 261, 5, 49, 0, 0, 261, 262, 3, 48, 24, 0, 262, 263, 5, 55, 0, 0, 263, 264, 3, 48, 24, 0, 264, 265, 5, 50, 0, 0, 265, 266, 5, 59, 0, 0, 266, 267, 6, 11, -1, 0, 267, 23, 1, 0, 0, 0, 268, 269, 5, 14, 0, 0, 269, 270, 5, 17, 0, 0, 270, 271, 3, 26, 13, 0, 271, 272, 6, 12, -1, 0, 272, 273, 5, 2, 0, 0, 273, 25, 1, 0, 0, 0, 274, 296, 6, 13, -1, 0, 275, 276, 3, 44, 22, 0, 276, 277, 6, 13, -1, 0, 277, 295, 1, 0, 0, 0, 278, 283, 5, 40, 0, 0, 279, 280, 5, 8, 0, 0, 280, 281, 3, 16, 8, 0, 281, 282, 6, 13, -1, 0, 282, 284, 1, 0, 0, 0, 283, 279, 1, 0, 0, 0, 283, 284, 1, 0, 0, 0, 284, 285, 1, 0, 0, 0, 285, 295, 5, 59, 0, 0, 286, 291, 5, 41, 0, 0, 287, 288, 5, 8, 0, 0, 288, 289, 3, 16, 8, 0, 289, 290, 6, 13, -1, 0, 290, 292, 1, 0, 0, 0, 291, 287, 1, 0, 0, 0, 291, 292, 1, 0, 0, 0, 292, 293, 1, 0, 0, 0, 293, 295, 5, 59, 0, 0, 294, 275, 1, 0, 0, 0, 294, 278, 1, 0, 0, 0, 294, 286, 1, 0, 0, 0, 295, 298, 1, 0, 0, 0, 296, 294, 1, 0, 0, 0, 296, 297, 1, 0, 0, 0, 297, 302, 1, 0, 0, 0, 298, 296, 1, 0, 0, 0, 299, 300, 3, 12, 6, 0, 300, 301, 6, 13, -1, 0, 301, 303, 1, 0, 0, 0, 302, 299, 1, 0, 0, 0, 302, 303, 1, 0, 0, 0, 303, 27, 1, 0, 0, 0, 304, 305, 5, 15, 0, 0, 305, 306, 5, 62, 0, 0, 306, 307, 5, 16, 0, 0, 307, 308, 3, 30, 15, 0, 308, 309, 3, 26, 13, 0, 309, 310, 5, 2, 0, 0, 310, 311, 6, 14, -1, 0, 311, 29, 1, 0, 0, 0, 312, 313, 6, 15, -1, 0, 313, 314, 5, 49, 0, 0, 314, 315, 3, 48, 24, 0, 315, 316, 6, 15, -1, 0, 316, 317, 5, 57, 0, 0, 317, 318, 3, 48, 24, 0, 318, 319, 6, 15, -1, 0, 319, 320, 5, 50, 0, 0, 320, 338, 1, 0, 0, 0, 321, 322, 5, 51, 0, 0, 322, 323, 3, 48, 24, 0, 323, 330, 6, 15, -1, 0, 324, 325, 5, 55, 0, 0, 325, 326, 3, 48, 24, 0, 326, 327, 6, 15, -1, 0, 327, 329, 1, 0, 0, 0, 328, 324, 1, 0, 0, 0, 329, 332, 1, 0, 0, 0, 330, 328, 1, 0, 0, 0, 330, 331, 1, 0, 0, 0, 331, 333, 1, 0, 0, 0, 332, 330, 1, 0, 0, 0, 333, 334, 5, 52, 0, 0, 334, 338, 1, 0, 0, 0, 335, 336, 5, 62, 0, 0, 336, 338, 6, 15, -1, 0, 337, 312, 1, 0, 0, 0, 337, 321, 1, 0, 0, 0, 337, 335, 1, 0, 0, 0, 338, 31, 1, 0, 0, 0, 339, 340, 6, 16, -1, 0, 340, 341, 5, 51, 0, 0, 341, 342, 3, 48, 24, 0, 342, 343, 5, 36, 0, 0, 343, 344, 5, 62, 0, 0, 344, 345, 5, 42, 0, 0, 345, 346, 3, 30, 15, 0, 346, 347, 5, 55, 0, 0, 347, 348, 3, 48, 24, 0, 348, 355, 6, 16, -1, 0, 349, 350, 5, 55, 0, 0, 350, 351, 3, 48, 24, 0, 351, 352, 6, 16, -1, 0, 352, 354, 1, 0, 0, 0, 353, 349, 1, 0, 0, 0, 354, 357, 1, 0, 0, 0, 355, 353, 1, 0, 0, 0, 355, 356, 1, 0, 0, 0, 356, 358, 1, 0, 0, 0, 357, 355, 1, 0, 0, 0, 358, 359, 6, 16, -1, 0, 359, 360, 5, 52, 0, 0, 360, 33, 1, 0, 0, 0, 361, 362, 5, 62, 0, 0, 362, 363, 5, 56, 0, 0, 363, 364, 5, 13, 0, 0, 364, 365, 5, 49, 0, 0, 365, 366, 3, 48, 24, 0, 366, 367, 5, 50, 0, 0, 367, 368, 6, 17, -1, 0, 368, 35, 1, 0, 0, 0, 369, 370, 5, 18, 0, 0, 370, 371, 5, 49, 0, 0, 371, 372, 3, 48, 24, 0, 372, 373, 5, 50, 0, 0, 373, 374, 6, 18, -1, 0, 374, 37, 1, 0, 0, 0, 375, 376, 5, 19, 0, 0, 376, 377, 5, 49, 0, 0, 377, 378, 3, 48, 24, 0, 378, 379, 5, 50, 0, 0, 379, 380, 6, 19, -1, 0, 380, 39, 1, 0, 0, 0, 381, 382, 6, 20, -1, 0, 382, 386, 5, 62, 0, 0, 383, 384, 3, 42, 21, 0, 384, 385, 6, 20, -1, 0, 385, 387, 1, 0, 0, 0, 386, 383, 1, 0, 0, 0, 386, 387, 1, 0, 0, 0, 387, 400, 1, 0, 0, 0, 388, 389, 5, 48, 0, 0, 389, 401, 6, 20, -1, 0, 390, 391, 5, 43, 0, 0, 391, 401, 6, 20, -1, 0, 392, 393, 5, 44, 0, 0, 393, 401, 6, 20, -1, 0, 394, 395, 5, 46, 0, 0, 395, 401, 6, 20, -1, 0, 396, 397, 5, 45, 0, 0, 397, 401, 6, 20, -1, 0, 398, 399, 5, 47, 0, 0, 399, 401, 6, 20, -1, 0, 400, 388, 1, 0, 0, 0, 400, 390, 1, 0, 0, 0, 400, 392, 1, 0, 0, 0, 400, 394, 1, 0, 0, 0, 400, 396, 1, 0, 0, 0, 400, 398, 1, 0, 0, 0, 401, 402, 1, 0, 0, 0, 402, 403, 3, 48, 24, 0, 403, 404, 5, 59, 0, 0, 404, 405, 6, 20, -1, 0, 405, 41, 1, 0, 0, 0, 406, 407, 5, 51, 0, 0, 407, 408, 3, 48, 24, 0, 408, 409, 6, 21, -1, 0, 409, 410, 5, 52, 0, 0, 410, 43, 1, 0, 0, 0, 411, 412, 3, 14, 7, 0, 412, 413, 6, 22, -1, 0, 413, 434, 1, 0, 0, 0, 414, 415, 3, 24, 12, 0, 415, 416, 6, 22, -1, 0, 416, 434, 1, 0, 0, 0, 417, 418, 3, 28, 14, 0, 418, 419, 6, 22, -1, 0, 419, 434, 1, 0, 0, 0, 420, 421, 3, 18, 9, 0, 421, 422, 6, 22, -1, 0, 422, 434, 1, 0, 0, 0, 423, 424, 3, 22, 11, 0, 424, 425, 6, 22, -1, 0, 425, 434, 1, 0, 0, 0, 426, 427, 3, 48, 24, 0, 427, 428, 6, 22, -1, 0, 428, 429, 5, 59, 0, 0, 429, 434, 1, 0, 0, 0, 430, 431, 3, 40, 20, 0, 431, 432, 6, 22, -1, 0, 432, 434, 1, 0, 0, 0, 433, 411, 1, 0, 0, 0, 433, 414, 1, 0, 0, 0, 433, 417, 1, 0, 0, 0, 433, 420, 1, 0, 0, 0, 433, 423, 1, 0, 0, 0, 433, 426, 1, 0, 0, 0, 433, 430, 1, 0, 0, 0, 434, 45, 1, 0, 0, 0, 435, 441, 6, 23, -1, 0, 436, 437, 3, 44, 22, 0, 437, 438, 6, 23, -1, 0, 438, 440, 1, 0, 0, 0, 439, 436, 1, 0, 0, 0, 440, 443, 1, 0, 0, 0, 441, 439, 1, 0, 0, 0, 441, 442, 1, 0, 0, 0, 442, 447, 1, 0, 0, 0, 443, 441, 1, 0, 0, 0, 444, 445, 3, 12, 6, 0, 445, 446, 6, 23, -1, 0, 446, 448, 1, 0, 0, 0, 447, 444, 1, 0, 0, 0, 447, 448, 1, 0, 0, 0, 448, 47, 1, 0, 0, 0, 449, 450, 6, 24, -1, 0, 450, 451, 3, 50, 25, 0, 451, 452, 6, 24, -1, 0, 452, 460, 1, 0, 0, 0, 453, 454, 10, 2, 0, 0, 454, 455, 5, 37, 0, 0, 455, 456, 3, 50, 25, 0, 456, 457, 6, 24, -1, 0, 457, 459, 1, 0, 0, 0, 458, 453, 1, 0, 0, 0, 459, 462, 1, 0, 0, 0, 460, 458, 1, 0, 0, 0, 460, 461, 1, 0, 0, 0, 461, 49, 1, 0, 0, 0, 462, 460, 1, 0, 0, 0, 463, 464, 6, 25, -1, 0, 464, 465, 3, 52, 26, 0, 465, 466, 6, 25, -1, 0, 466, 480, 1, 0, 0, 0, 467, 468, 10, 2, 0, 0, 468, 473, 6, 25, -1, 0, 469, 470, 5, 24, 0, 0, 470, 474, 6, 25, -1, 0, 471, 472, 5, 25, 0, 0, 472, 474, 6, 25, -1, 0, 473, 469, 1, 0, 0, 0, 473, 471, 1, 0, 0, 0, 474, 475, 1, 0, 0, 0, 475, 476, 3, 52, 26, 0, 476, 477, 6, 25, -1, 0, 477, 479, 1, 0, 0, 0, 478, 467, 1, 0, 0, 0, 479, 482, 1, 0, 0, 0, 480, 478, 1, 0, 0, 0, 480, 481, 1, 0, 0, 0, 481, 51, 1, 0, 0, 0, 482, 480, 1, 0, 0, 0, 483, 484, 6, 26, -1, 0, 484, 485, 3, 54, 27, 0, 485, 486, 6, 26, -1, 0, 486, 504, 1, 0, 0, 0, 487, 488, 10, 2, 0, 0, 488, 497, 6, 26, -1, 0, 489, 490, 5, 28, 0, 0, 490, 498, 6, 26, -1, 0, 491, 492, 5, 29, 0, 0, 492, 498, 6, 26, -1, 0, 493, 494, 5, 26, 0, 0, 494, 498, 6, 26, -1, 0, 495, 496, 5, 27, 0, 0, 496, 498, 6, 26, -1, 0, 497, 489, 1, 0, 0, 0, 497, 491, 1, 0, 0, 0, 497, 493, 1, 0, 0, 0, 497, 495, 1, 0, 0, 0, 498, 499, 1, 0, 0, 0, 499, 500, 3, 54, 27, 0, 500, 501, 6, 26, -1, 0, 501, 503, 1, 0, 0, 0, 502, 487, 1, 0, 0, 0, 503, 506, 1, 0, 0, 0, 504, 502, 1, 0, 0, 0, 504, 505, 1, 0, 0, 0, 505, 53, 1, 0, 0, 0, 506, 504, 1, 0, 0, 0, 507, 508, 6, 27, -1, 0, 508, 509, 3, 56, 28, 0, 509, 510, 6, 27, -1, 0, 510, 524, 1, 0, 0, 0, 511, 512, 10, 2, 0, 0, 512, 517, 6, 27, -1, 0, 513, 514, 5, 20, 0, 0, 514, 518, 6, 27, -1, 0, 515, 516, 5, 21, 0, 0, 516, 518, 6, 27, -1, 0, 517, 513, 1, 0, 0, 0, 517, 515, 1, 0, 0, 0, 518, 519, 1, 0, 0, 0, 519, 520, 3, 56, 28, 0, 520, 521, 6, 27, -1, 0, 521, 523, 1, 0, 0, 0, 522, 511, 1, 0, 0, 0, 523, 526, 1, 0, 0, 0, 524, 522, 1, 0, 0, 0, 524, 525, 1, 0, 0, 0, 525, 55, 1, 0, 0, 0, 526, 524, 1, 0, 0, 0, 527, 528, 6, 28, -1, 0, 528, 529, 3, 58, 29, 0, 529, 530, 6, 28, -1, 0, 530, 544, 1, 0, 0, 0, 531, 532, 10, 2, 0, 0, 532, 537, 6, 28, -1, 0, 533, 534, 5, 22, 0, 0, 534, 538, 6, 28, -1, 0, 535, 536, 5, 23, 0, 0, 536, 538, 6, 28, -1, 0, 537, 533, 1, 0, 0, 0, 537, 535, 1, 0, 0, 0, 538, 539, 1, 0, 0, 0, 539, 540, 3, 58, 29, 0, 540, 541, 6, 28, -1, 0, 541, 543, 1, 0, 0, 0, 542, 531, 1, 0, 0, 0, 543, 546, 1, 0, 0, 0, 544, 542, 1, 0, 0, 0, 544, 545, 1, 0, 0, 0, 545, 57, 1, 0, 0, 0, 546, 544, 1, 0, 0, 0, 547, 556, 6, 29, -1, 0, 548, 549, 5, 32, 0, 0, 549, 557, 6, 29, -1, 0, 550, 551, 5, 21, 0, 0, 551, 557, 6, 29, -1, 0, 552, 553, 5, 33, 0, 0, 553, 557, 6, 29, -1, 0, 554, 555, 5, 34, 0, 0, 555, 557, 6, 29, -1, 0, 556, 548, 1, 0, 0, 0, 556, 550, 1, 0, 0, 0, 556, 552, 1, 0, 0, 0, 556, 554, 1, 0, 0, 0, 557, 558, 1, 0, 0, 0, 558, 559, 3, 60, 30, 0, 559, 560, 6, 29, -1, 0, 560, 565, 1, 0, 0, 0, 561, 562, 3, 60, 30, 0, 562, 563, 6, 29, -1, 0, 563, 565, 1, 0, 0, 0, 564, 547, 1, 0, 0, 0, 564, 561, 1, 0, 0, 0, 565, 59, 1, 0, 0, 0, 566, 567, 6, 30, -1, 0, 567, 575, 3, 62, 31, 0, 568, 569, 5, 49, 0, 0, 569, 570, 3, 10, 5, 0, 570, 571, 6, 30, -1, 0, 571, 572, 5, 50, 0, 0, 572, 574, 1, 0, 0, 0, 573, 568, 1, 0, 0, 0, 574, 577, 1, 0, 0, 0, 575, 573, 1, 0, 0, 0, 575, 576, 1, 0, 0, 0, 576, 583, 1, 0, 0, 0, 577, 575, 1, 0, 0, 0, 578, 579, 3, 42, 21, 0, 579, 580, 6, 30, -1, 0, 580, 582, 1, 0, 0, 0, 581, 578, 1, 0, 0, 0, 582, 585, 1, 0, 0, 0, 583, 581, 1, 0, 0, 0, 583, 584, 1, 0, 0, 0, 584, 586, 1, 0, 0, 0, 585, 583, 1, 0, 0, 0, 586, 587, 6, 30, -1, 0, 587, 61, 1, 0, 0, 0, 588, 589, 3, 66, 33, 0, 589, 590, 6, 31, -1, 0, 590, 619, 1, 0, 0, 0, 591, 592, 5, 62, 0, 0, 592, 619, 6, 31, -1, 0, 593, 594, 3, 64, 32, 0, 594, 595, 6, 31, -1, 0, 595, 619, 1, 0, 0, 0, 596, 597, 3, 36, 18, 0, 597, 598, 6, 31, -1, 0, 598, 619, 1, 0, 0, 0, 599, 600, 3, 38, 19, 0, 600, 601, 6, 31, -1, 0, 601, 619, 1, 0, 0, 0, 602, 603, 3, 34, 17, 0, 603, 604, 6, 31, -1, 0, 604, 619, 1, 0, 0, 0, 605, 606, 3, 32, 16, 0, 606, 607, 6, 31, -1, 0, 607, 619, 1, 0, 0, 0, 608, 609, 3, 20, 10, 0, 609, 610, 6, 31, -1, 0, 610, 619, 1, 0, 0, 0, 611, 615, 5, 49, 0, 0, 612, 613, 3, 48, 24, 0, 613, 614, 6, 31, -1, 0, 614, 616, 1, 0, 0, 0, 615, 612, 1, 0, 0, 0, 615, 616, 1, 0, 0, 0, 616, 617, 1, 0, 0, 0, 617, 619, 5, 50, 0, 0, 618, 588, 1, 0, 0, 0, 618, 591, 1, 0, 0, 0, 618, 593, 1, 0, 0, 0, 618, 596, 1, 0, 0, 0, 618, 599, 1, 0, 0, 0, 618, 602, 1, 0, 0, 0, 618, 605, 1, 0, 0, 0, 618, 608, 1, 0, 0, 0, 618, 611, 1, 0, 0, 0, 619, 63, 1, 0, 0, 0, 620, 621, 5, 42, 0, 0, 621, 622, 3, 4, 2, 0, 622, 623, 5, 53, 0, 0, 623, 624, 3, 46, 23, 0, 624, 625, 5, 54, 0, 0, 625, 626, 3, 10, 5, 0, 626, 627, 6, 32, -1, 0, 627, 65, 1, 0, 0, 0, 628, 629, 3, 70, 35, 0, 629, 630, 6, 33, -1, 0, 630, 644, 1, 0, 0, 0, 631, 632, 5, 63, 0, 0, 632, 644, 6, 33, -1, 0, 633, 634, 5, 60, 0, 0, 634, 644, 6, 33, -1, 0, 635, 636, 5, 61, 0, 0, 636, 644, 6, 33, -1, 0, 637, 638, 3, 68, 34, 0, 638, 639, 6, 33, -1, 0, 639, 644, 1, 0, 0, 0, 640, 641, 3, 72, 36, 0, 641, 642, 6, 33, -1, 0, 642, 644, 1, 0, 0, 0, 643, 628, 1, 0, 0, 0, 643, 631, 1, 0, 0, 0, 643, 633, 1, 0, 0, 0, 643, 635, 1, 0, 0, 0, 643, 637, 1, 0, 0, 0, 643, 640, 1, 0, 0, 0, 644, 67, 1, 0, 0, 0, 645, 646, 5, 51, 0, 0, 646, 647, 3, 10, 5, 0, 647, 648, 5, 52, 0, 0, 648, 649, 6, 34, -1, 0, 649, 69, 1, 0, 0, 0, 650, 651, 5, 38, 0, 0, 651, 655, 6, 35, -1, 0, 652, 653, 5, 39, 0, 0, 653, 655, 6, 35, -1, 0, 654, 650, 1, 0, 0, 0, 654, 652, 1, 0, 0, 0, 655, 71, 1, 0, 0, 0, 656, 657, 5, 11, 0, 0, 657, 658, 5, 49, 0, 0, 658, 659, 5, 58, 0, 0, 659, 660, 5, 62, 0, 0, 660, 661, 5, 50, 0, 0, 661, 662, 6, 36, -1, 0, 662, 73, 1, 0, 0, 0, 46, 81, 83, 109, 128, 133, 135, 156, 180, 183, 190, 210, 217, 229, 234, 238, 243, 283, 291, 294, 296, 302, 330, 337, 355, 386, 400, 433, 441, 447, 460, 473, 480, 497, 504, 517, 524, 537, 544, 556, 564, 575, 583, 615, 618, 643, 654] \ No newline at end of file diff --git a/Phase1Template/untitled/src/parsers/FunctionCraft.tokens b/Phase1Template/untitled/src/parsers/FunctionCraft.tokens new file mode 100644 index 0000000..c103028 --- /dev/null +++ b/Phase1Template/untitled/src/parsers/FunctionCraft.tokens @@ -0,0 +1,124 @@ +DEF=1 +END=2 +MAIN=3 +PUTS=4 +PUSH=5 +LEN=6 +RETURN=7 +IF=8 +ELSE=9 +ELSEIF=10 +METHOD=11 +PATTERN=12 +MATCH=13 +LOOP=14 +FOR=15 +IN=16 +DO=17 +CHOP=18 +CHOMP=19 +PLUS=20 +MINUS=21 +MULT=22 +DIVIDE=23 +EQUAL=24 +NOT_EQUAL=25 +LESS_EQUAL_THAN=26 +GREATER_EQUAL_THAN=27 +GREATER_THAN=28 +LESS_THAN=29 +AND=30 +OR=31 +NOT=32 +INCREMENT=33 +DECREMENT=34 +PATTERN_MATCHING_SEPARATOR=35 +SEPARATOR=36 +APPEND=37 +TRUE=38 +FALSE=39 +BREAK=40 +NEXT=41 +ARROW=42 +PLUS_ASSIGN=43 +MINUS_ASSIGN=44 +MULT_ASSIGN=45 +DIVIDE_ASSIGN=46 +MOD_ASSIGN=47 +ASSIGN=48 +LPAR=49 +RPAR=50 +LBRACK=51 +RBRACK=52 +LBRACE=53 +RBRACE=54 +COMMA=55 +DOT=56 +DOUBLEDOT=57 +COLON=58 +SEMICOLLON=59 +INT_VALUE=60 +FLOAT_VALUE=61 +IDENTIFIER=62 +STRING_VALUE=63 +COMMENT=64 +WS=65 +'def'=1 +'end'=2 +'main'=3 +'puts'=4 +'push'=5 +'len'=6 +'return'=7 +'if'=8 +'else'=9 +'elseif'=10 +'method'=11 +'pattern'=12 +'match'=13 +'loop'=14 +'for'=15 +'in'=16 +'do'=17 +'chop'=18 +'chomp'=19 +'+'=20 +'-'=21 +'*'=22 +'/'=23 +'=='=24 +'!='=25 +'<='=26 +'>='=27 +'>'=28 +'<'=29 +'&&'=30 +'||'=31 +'!'=32 +'++'=33 +'--'=34 +' |'=35 +'|'=36 +'<<'=37 +'true'=38 +'false'=39 +'break'=40 +'next'=41 +'->'=42 +'+='=43 +'-='=44 +'*='=45 +'/='=46 +'%='=47 +'='=48 +'('=49 +')'=50 +'['=51 +']'=52 +'{'=53 +'}'=54 +','=55 +'.'=56 +'..'=57 +':'=58 +';'=59 diff --git a/Phase1Template/untitled/src/parsers/FunctionCraftBaseListener.java b/Phase1Template/untitled/src/parsers/FunctionCraftBaseListener.java new file mode 100644 index 0000000..2643eac --- /dev/null +++ b/Phase1Template/untitled/src/parsers/FunctionCraftBaseListener.java @@ -0,0 +1,493 @@ +// Generated from U:/UT/6/PLC_TA/Design-Compiler-Course-Projects/Phase2Template/Phase2/src/main/grammer/FunctionCraft.g4 by ANTLR 4.13.1 +package /parsers; + + import main.ast.node.*; + import main.ast.node.declaration.*; + import main.ast.node.statement.*; + import main.ast.node.expression.*; + import main.ast.node.expression.operators.*; + import main.ast.node.expression.value.*; + import main.ast.node.expression.primitive.*; + + +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.tree.ErrorNode; +import org.antlr.v4.runtime.tree.TerminalNode; + +/** + * This class provides an empty implementation of {@link FunctionCraftListener}, + * which can be extended to create a listener which only needs to handle a subset + * of the available methods. + */ +@SuppressWarnings("CheckReturnValue") +public class FunctionCraftBaseListener implements FunctionCraftListener { + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterProgram(FunctionCraftParser.ProgramContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitProgram(FunctionCraftParser.ProgramContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFunctionDeclaration(FunctionCraftParser.FunctionDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFunctionDeclaration(FunctionCraftParser.FunctionDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFunctionArgumentsDeclaration(FunctionCraftParser.FunctionArgumentsDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFunctionArgumentsDeclaration(FunctionCraftParser.FunctionArgumentsDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPatternMatching(FunctionCraftParser.PatternMatchingContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPatternMatching(FunctionCraftParser.PatternMatchingContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterMain(FunctionCraftParser.MainContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitMain(FunctionCraftParser.MainContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFunctionArguments(FunctionCraftParser.FunctionArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFunctionArguments(FunctionCraftParser.FunctionArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterReturnStatement(FunctionCraftParser.ReturnStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitReturnStatement(FunctionCraftParser.ReturnStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterIfStatement(FunctionCraftParser.IfStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitIfStatement(FunctionCraftParser.IfStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterCondition(FunctionCraftParser.ConditionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitCondition(FunctionCraftParser.ConditionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPutsStatement(FunctionCraftParser.PutsStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPutsStatement(FunctionCraftParser.PutsStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterLenStatement(FunctionCraftParser.LenStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitLenStatement(FunctionCraftParser.LenStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPushStatement(FunctionCraftParser.PushStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPushStatement(FunctionCraftParser.PushStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterLoopDoStatement(FunctionCraftParser.LoopDoStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitLoopDoStatement(FunctionCraftParser.LoopDoStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterLoopBody(FunctionCraftParser.LoopBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitLoopBody(FunctionCraftParser.LoopBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterForStatement(FunctionCraftParser.ForStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitForStatement(FunctionCraftParser.ForStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterRange(FunctionCraftParser.RangeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitRange(FunctionCraftParser.RangeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFilterStatement(FunctionCraftParser.FilterStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFilterStatement(FunctionCraftParser.FilterStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterMatchPatternStatement(FunctionCraftParser.MatchPatternStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitMatchPatternStatement(FunctionCraftParser.MatchPatternStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterChopStatement(FunctionCraftParser.ChopStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitChopStatement(FunctionCraftParser.ChopStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterChompStatement(FunctionCraftParser.ChompStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitChompStatement(FunctionCraftParser.ChompStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAssignment(FunctionCraftParser.AssignmentContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAssignment(FunctionCraftParser.AssignmentContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAccessList(FunctionCraftParser.AccessListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAccessList(FunctionCraftParser.AccessListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterStatement(FunctionCraftParser.StatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitStatement(FunctionCraftParser.StatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterBody(FunctionCraftParser.BodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitBody(FunctionCraftParser.BodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExpression(FunctionCraftParser.ExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExpression(FunctionCraftParser.ExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEqaulityExpression(FunctionCraftParser.EqaulityExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEqaulityExpression(FunctionCraftParser.EqaulityExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterRelationalExpression(FunctionCraftParser.RelationalExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitRelationalExpression(FunctionCraftParser.RelationalExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAdditiveExpression(FunctionCraftParser.AdditiveExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAdditiveExpression(FunctionCraftParser.AdditiveExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterMultiplicativeExpression(FunctionCraftParser.MultiplicativeExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitMultiplicativeExpression(FunctionCraftParser.MultiplicativeExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPreUnaryExpression(FunctionCraftParser.PreUnaryExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPreUnaryExpression(FunctionCraftParser.PreUnaryExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAccessExpression(FunctionCraftParser.AccessExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAccessExpression(FunctionCraftParser.AccessExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterOtherExpression(FunctionCraftParser.OtherExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitOtherExpression(FunctionCraftParser.OtherExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterLambdaFunction(FunctionCraftParser.LambdaFunctionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitLambdaFunction(FunctionCraftParser.LambdaFunctionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterValues(FunctionCraftParser.ValuesContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitValues(FunctionCraftParser.ValuesContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterListValue(FunctionCraftParser.ListValueContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitListValue(FunctionCraftParser.ListValueContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterBoolValue(FunctionCraftParser.BoolValueContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitBoolValue(FunctionCraftParser.BoolValueContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFunctionPointer(FunctionCraftParser.FunctionPointerContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFunctionPointer(FunctionCraftParser.FunctionPointerContext ctx) { } + + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEveryRule(ParserRuleContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEveryRule(ParserRuleContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void visitTerminal(TerminalNode node) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void visitErrorNode(ErrorNode node) { } +} \ No newline at end of file diff --git a/Phase1Template/untitled/src/parsers/FunctionCraftBaseVisitor.java b/Phase1Template/untitled/src/parsers/FunctionCraftBaseVisitor.java new file mode 100644 index 0000000..8bcb71c --- /dev/null +++ b/Phase1Template/untitled/src/parsers/FunctionCraftBaseVisitor.java @@ -0,0 +1,283 @@ +// Generated from U:/UT/6/PLC_TA/Design-Compiler-Course-Projects/Phase2Template/Phase2/src/main/grammer/FunctionCraft.g4 by ANTLR 4.13.1 +package /parsers; + + import main.ast.node.*; + import main.ast.node.declaration.*; + import main.ast.node.statement.*; + import main.ast.node.expression.*; + import main.ast.node.expression.operators.*; + import main.ast.node.expression.value.*; + import main.ast.node.expression.primitive.*; + +import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor; + +/** + * This class provides an empty implementation of {@link FunctionCraftVisitor}, + * which can be extended to create a visitor which only needs to handle a subset + * of the available methods. + * + * @param The return type of the visit operation. Use {@link Void} for + * operations with no return type. + */ +@SuppressWarnings("CheckReturnValue") +public class FunctionCraftBaseVisitor extends AbstractParseTreeVisitor implements FunctionCraftVisitor { + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitProgram(FunctionCraftParser.ProgramContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitFunctionDeclaration(FunctionCraftParser.FunctionDeclarationContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitFunctionArgumentsDeclaration(FunctionCraftParser.FunctionArgumentsDeclarationContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitPatternMatching(FunctionCraftParser.PatternMatchingContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitMain(FunctionCraftParser.MainContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitFunctionArguments(FunctionCraftParser.FunctionArgumentsContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitReturnStatement(FunctionCraftParser.ReturnStatementContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitIfStatement(FunctionCraftParser.IfStatementContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitCondition(FunctionCraftParser.ConditionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitPutsStatement(FunctionCraftParser.PutsStatementContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitLenStatement(FunctionCraftParser.LenStatementContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitPushStatement(FunctionCraftParser.PushStatementContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitLoopDoStatement(FunctionCraftParser.LoopDoStatementContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitLoopBody(FunctionCraftParser.LoopBodyContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitForStatement(FunctionCraftParser.ForStatementContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitRange(FunctionCraftParser.RangeContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitFilterStatement(FunctionCraftParser.FilterStatementContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitMatchPatternStatement(FunctionCraftParser.MatchPatternStatementContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitChopStatement(FunctionCraftParser.ChopStatementContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitChompStatement(FunctionCraftParser.ChompStatementContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitAssignment(FunctionCraftParser.AssignmentContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitAccessList(FunctionCraftParser.AccessListContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitStatement(FunctionCraftParser.StatementContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitBody(FunctionCraftParser.BodyContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitExpression(FunctionCraftParser.ExpressionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitEqaulityExpression(FunctionCraftParser.EqaulityExpressionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitRelationalExpression(FunctionCraftParser.RelationalExpressionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitAdditiveExpression(FunctionCraftParser.AdditiveExpressionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitMultiplicativeExpression(FunctionCraftParser.MultiplicativeExpressionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitPreUnaryExpression(FunctionCraftParser.PreUnaryExpressionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitAccessExpression(FunctionCraftParser.AccessExpressionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitOtherExpression(FunctionCraftParser.OtherExpressionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitLambdaFunction(FunctionCraftParser.LambdaFunctionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitValues(FunctionCraftParser.ValuesContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitListValue(FunctionCraftParser.ListValueContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitBoolValue(FunctionCraftParser.BoolValueContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitFunctionPointer(FunctionCraftParser.FunctionPointerContext ctx) { return visitChildren(ctx); } +} \ No newline at end of file diff --git a/Phase1Template/untitled/src/parsers/FunctionCraftLexer.interp b/Phase1Template/untitled/src/parsers/FunctionCraftLexer.interp new file mode 100644 index 0000000..6d42009 --- /dev/null +++ b/Phase1Template/untitled/src/parsers/FunctionCraftLexer.interp @@ -0,0 +1,212 @@ +token literal names: +null +'def' +'end' +'main' +'puts' +'push' +'len' +'return' +'if' +'else' +'elseif' +'method' +'pattern' +'match' +'loop' +'for' +'in' +'do' +'chop' +'chomp' +'+' +'-' +'*' +'/' +'==' +'!=' +'<=' +'>=' +'>' +'<' +'&&' +'||' +'!' +'++' +'--' +' |' +'|' +'<<' +'true' +'false' +'break' +'next' +'->' +'+=' +'-=' +'*=' +'/=' +'%=' +'=' +'(' +')' +'[' +']' +'{' +'}' +',' +'.' +'..' +':' +';' +null +null +null +null +null +null + +token symbolic names: +null +DEF +END +MAIN +PUTS +PUSH +LEN +RETURN +IF +ELSE +ELSEIF +METHOD +PATTERN +MATCH +LOOP +FOR +IN +DO +CHOP +CHOMP +PLUS +MINUS +MULT +DIVIDE +EQUAL +NOT_EQUAL +LESS_EQUAL_THAN +GREATER_EQUAL_THAN +GREATER_THAN +LESS_THAN +AND +OR +NOT +INCREMENT +DECREMENT +PATTERN_MATCHING_SEPARATOR +SEPARATOR +APPEND +TRUE +FALSE +BREAK +NEXT +ARROW +PLUS_ASSIGN +MINUS_ASSIGN +MULT_ASSIGN +DIVIDE_ASSIGN +MOD_ASSIGN +ASSIGN +LPAR +RPAR +LBRACK +RBRACK +LBRACE +RBRACE +COMMA +DOT +DOUBLEDOT +COLON +SEMICOLLON +INT_VALUE +FLOAT_VALUE +IDENTIFIER +STRING_VALUE +COMMENT +WS + +rule names: +DEF +END +MAIN +PUTS +PUSH +LEN +RETURN +IF +ELSE +ELSEIF +METHOD +PATTERN +MATCH +LOOP +FOR +IN +DO +CHOP +CHOMP +PLUS +MINUS +MULT +DIVIDE +EQUAL +NOT_EQUAL +LESS_EQUAL_THAN +GREATER_EQUAL_THAN +GREATER_THAN +LESS_THAN +AND +OR +NOT +INCREMENT +DECREMENT +PATTERN_MATCHING_SEPARATOR +SEPARATOR +APPEND +TRUE +FALSE +BREAK +NEXT +ARROW +PLUS_ASSIGN +MINUS_ASSIGN +MULT_ASSIGN +DIVIDE_ASSIGN +MOD_ASSIGN +ASSIGN +LPAR +RPAR +LBRACK +RBRACK +LBRACE +RBRACE +COMMA +DOT +DOUBLEDOT +COLON +SEMICOLLON +INT_VALUE +FLOAT_VALUE +IDENTIFIER +STRING_VALUE +COMMENT +WS + +channel names: +DEFAULT_TOKEN_CHANNEL +HIDDEN + +mode names: +DEFAULT_MODE + +atn: +[4, 0, 65, 411, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 20, 1, 20, 1, 21, 1, 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, 47, 1, 47, 1, 48, 1, 48, 1, 49, 1, 49, 1, 50, 1, 50, 1, 51, 1, 51, 1, 52, 1, 52, 1, 53, 1, 53, 1, 54, 1, 54, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 5, 59, 345, 8, 59, 10, 59, 12, 59, 348, 9, 59, 3, 59, 350, 8, 59, 1, 60, 5, 60, 353, 8, 60, 10, 60, 12, 60, 356, 9, 60, 1, 60, 1, 60, 4, 60, 360, 8, 60, 11, 60, 12, 60, 361, 1, 61, 1, 61, 5, 61, 366, 8, 61, 10, 61, 12, 61, 369, 9, 61, 1, 62, 1, 62, 5, 62, 373, 8, 62, 10, 62, 12, 62, 376, 9, 62, 1, 62, 1, 62, 1, 63, 1, 63, 5, 63, 382, 8, 63, 10, 63, 12, 63, 385, 9, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 5, 63, 395, 8, 63, 10, 63, 12, 63, 398, 9, 63, 1, 63, 1, 63, 1, 63, 1, 63, 3, 63, 404, 8, 63, 1, 63, 1, 63, 1, 64, 1, 64, 1, 64, 1, 64, 1, 396, 0, 65, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 47, 95, 48, 97, 49, 99, 50, 101, 51, 103, 52, 105, 53, 107, 54, 109, 55, 111, 56, 113, 57, 115, 58, 117, 59, 119, 60, 121, 61, 123, 62, 125, 63, 127, 64, 129, 65, 1, 0, 7, 1, 0, 49, 57, 1, 0, 48, 57, 3, 0, 65, 90, 95, 95, 97, 122, 4, 0, 48, 57, 65, 90, 95, 95, 97, 122, 1, 0, 34, 34, 2, 0, 10, 10, 13, 13, 3, 0, 9, 10, 13, 13, 32, 32, 419, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, 0, 0, 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 119, 1, 0, 0, 0, 0, 121, 1, 0, 0, 0, 0, 123, 1, 0, 0, 0, 0, 125, 1, 0, 0, 0, 0, 127, 1, 0, 0, 0, 0, 129, 1, 0, 0, 0, 1, 131, 1, 0, 0, 0, 3, 135, 1, 0, 0, 0, 5, 139, 1, 0, 0, 0, 7, 144, 1, 0, 0, 0, 9, 149, 1, 0, 0, 0, 11, 154, 1, 0, 0, 0, 13, 158, 1, 0, 0, 0, 15, 165, 1, 0, 0, 0, 17, 168, 1, 0, 0, 0, 19, 173, 1, 0, 0, 0, 21, 180, 1, 0, 0, 0, 23, 187, 1, 0, 0, 0, 25, 195, 1, 0, 0, 0, 27, 201, 1, 0, 0, 0, 29, 206, 1, 0, 0, 0, 31, 210, 1, 0, 0, 0, 33, 213, 1, 0, 0, 0, 35, 216, 1, 0, 0, 0, 37, 221, 1, 0, 0, 0, 39, 227, 1, 0, 0, 0, 41, 229, 1, 0, 0, 0, 43, 231, 1, 0, 0, 0, 45, 233, 1, 0, 0, 0, 47, 235, 1, 0, 0, 0, 49, 238, 1, 0, 0, 0, 51, 241, 1, 0, 0, 0, 53, 244, 1, 0, 0, 0, 55, 247, 1, 0, 0, 0, 57, 249, 1, 0, 0, 0, 59, 251, 1, 0, 0, 0, 61, 254, 1, 0, 0, 0, 63, 257, 1, 0, 0, 0, 65, 259, 1, 0, 0, 0, 67, 262, 1, 0, 0, 0, 69, 265, 1, 0, 0, 0, 71, 271, 1, 0, 0, 0, 73, 273, 1, 0, 0, 0, 75, 276, 1, 0, 0, 0, 77, 281, 1, 0, 0, 0, 79, 287, 1, 0, 0, 0, 81, 293, 1, 0, 0, 0, 83, 298, 1, 0, 0, 0, 85, 301, 1, 0, 0, 0, 87, 304, 1, 0, 0, 0, 89, 307, 1, 0, 0, 0, 91, 310, 1, 0, 0, 0, 93, 313, 1, 0, 0, 0, 95, 316, 1, 0, 0, 0, 97, 318, 1, 0, 0, 0, 99, 320, 1, 0, 0, 0, 101, 322, 1, 0, 0, 0, 103, 324, 1, 0, 0, 0, 105, 326, 1, 0, 0, 0, 107, 328, 1, 0, 0, 0, 109, 330, 1, 0, 0, 0, 111, 332, 1, 0, 0, 0, 113, 334, 1, 0, 0, 0, 115, 337, 1, 0, 0, 0, 117, 339, 1, 0, 0, 0, 119, 349, 1, 0, 0, 0, 121, 354, 1, 0, 0, 0, 123, 363, 1, 0, 0, 0, 125, 370, 1, 0, 0, 0, 127, 403, 1, 0, 0, 0, 129, 407, 1, 0, 0, 0, 131, 132, 5, 100, 0, 0, 132, 133, 5, 101, 0, 0, 133, 134, 5, 102, 0, 0, 134, 2, 1, 0, 0, 0, 135, 136, 5, 101, 0, 0, 136, 137, 5, 110, 0, 0, 137, 138, 5, 100, 0, 0, 138, 4, 1, 0, 0, 0, 139, 140, 5, 109, 0, 0, 140, 141, 5, 97, 0, 0, 141, 142, 5, 105, 0, 0, 142, 143, 5, 110, 0, 0, 143, 6, 1, 0, 0, 0, 144, 145, 5, 112, 0, 0, 145, 146, 5, 117, 0, 0, 146, 147, 5, 116, 0, 0, 147, 148, 5, 115, 0, 0, 148, 8, 1, 0, 0, 0, 149, 150, 5, 112, 0, 0, 150, 151, 5, 117, 0, 0, 151, 152, 5, 115, 0, 0, 152, 153, 5, 104, 0, 0, 153, 10, 1, 0, 0, 0, 154, 155, 5, 108, 0, 0, 155, 156, 5, 101, 0, 0, 156, 157, 5, 110, 0, 0, 157, 12, 1, 0, 0, 0, 158, 159, 5, 114, 0, 0, 159, 160, 5, 101, 0, 0, 160, 161, 5, 116, 0, 0, 161, 162, 5, 117, 0, 0, 162, 163, 5, 114, 0, 0, 163, 164, 5, 110, 0, 0, 164, 14, 1, 0, 0, 0, 165, 166, 5, 105, 0, 0, 166, 167, 5, 102, 0, 0, 167, 16, 1, 0, 0, 0, 168, 169, 5, 101, 0, 0, 169, 170, 5, 108, 0, 0, 170, 171, 5, 115, 0, 0, 171, 172, 5, 101, 0, 0, 172, 18, 1, 0, 0, 0, 173, 174, 5, 101, 0, 0, 174, 175, 5, 108, 0, 0, 175, 176, 5, 115, 0, 0, 176, 177, 5, 101, 0, 0, 177, 178, 5, 105, 0, 0, 178, 179, 5, 102, 0, 0, 179, 20, 1, 0, 0, 0, 180, 181, 5, 109, 0, 0, 181, 182, 5, 101, 0, 0, 182, 183, 5, 116, 0, 0, 183, 184, 5, 104, 0, 0, 184, 185, 5, 111, 0, 0, 185, 186, 5, 100, 0, 0, 186, 22, 1, 0, 0, 0, 187, 188, 5, 112, 0, 0, 188, 189, 5, 97, 0, 0, 189, 190, 5, 116, 0, 0, 190, 191, 5, 116, 0, 0, 191, 192, 5, 101, 0, 0, 192, 193, 5, 114, 0, 0, 193, 194, 5, 110, 0, 0, 194, 24, 1, 0, 0, 0, 195, 196, 5, 109, 0, 0, 196, 197, 5, 97, 0, 0, 197, 198, 5, 116, 0, 0, 198, 199, 5, 99, 0, 0, 199, 200, 5, 104, 0, 0, 200, 26, 1, 0, 0, 0, 201, 202, 5, 108, 0, 0, 202, 203, 5, 111, 0, 0, 203, 204, 5, 111, 0, 0, 204, 205, 5, 112, 0, 0, 205, 28, 1, 0, 0, 0, 206, 207, 5, 102, 0, 0, 207, 208, 5, 111, 0, 0, 208, 209, 5, 114, 0, 0, 209, 30, 1, 0, 0, 0, 210, 211, 5, 105, 0, 0, 211, 212, 5, 110, 0, 0, 212, 32, 1, 0, 0, 0, 213, 214, 5, 100, 0, 0, 214, 215, 5, 111, 0, 0, 215, 34, 1, 0, 0, 0, 216, 217, 5, 99, 0, 0, 217, 218, 5, 104, 0, 0, 218, 219, 5, 111, 0, 0, 219, 220, 5, 112, 0, 0, 220, 36, 1, 0, 0, 0, 221, 222, 5, 99, 0, 0, 222, 223, 5, 104, 0, 0, 223, 224, 5, 111, 0, 0, 224, 225, 5, 109, 0, 0, 225, 226, 5, 112, 0, 0, 226, 38, 1, 0, 0, 0, 227, 228, 5, 43, 0, 0, 228, 40, 1, 0, 0, 0, 229, 230, 5, 45, 0, 0, 230, 42, 1, 0, 0, 0, 231, 232, 5, 42, 0, 0, 232, 44, 1, 0, 0, 0, 233, 234, 5, 47, 0, 0, 234, 46, 1, 0, 0, 0, 235, 236, 5, 61, 0, 0, 236, 237, 5, 61, 0, 0, 237, 48, 1, 0, 0, 0, 238, 239, 5, 33, 0, 0, 239, 240, 5, 61, 0, 0, 240, 50, 1, 0, 0, 0, 241, 242, 5, 60, 0, 0, 242, 243, 5, 61, 0, 0, 243, 52, 1, 0, 0, 0, 244, 245, 5, 62, 0, 0, 245, 246, 5, 61, 0, 0, 246, 54, 1, 0, 0, 0, 247, 248, 5, 62, 0, 0, 248, 56, 1, 0, 0, 0, 249, 250, 5, 60, 0, 0, 250, 58, 1, 0, 0, 0, 251, 252, 5, 38, 0, 0, 252, 253, 5, 38, 0, 0, 253, 60, 1, 0, 0, 0, 254, 255, 5, 124, 0, 0, 255, 256, 5, 124, 0, 0, 256, 62, 1, 0, 0, 0, 257, 258, 5, 33, 0, 0, 258, 64, 1, 0, 0, 0, 259, 260, 5, 43, 0, 0, 260, 261, 5, 43, 0, 0, 261, 66, 1, 0, 0, 0, 262, 263, 5, 45, 0, 0, 263, 264, 5, 45, 0, 0, 264, 68, 1, 0, 0, 0, 265, 266, 5, 32, 0, 0, 266, 267, 5, 32, 0, 0, 267, 268, 5, 32, 0, 0, 268, 269, 5, 32, 0, 0, 269, 270, 5, 124, 0, 0, 270, 70, 1, 0, 0, 0, 271, 272, 5, 124, 0, 0, 272, 72, 1, 0, 0, 0, 273, 274, 5, 60, 0, 0, 274, 275, 5, 60, 0, 0, 275, 74, 1, 0, 0, 0, 276, 277, 5, 116, 0, 0, 277, 278, 5, 114, 0, 0, 278, 279, 5, 117, 0, 0, 279, 280, 5, 101, 0, 0, 280, 76, 1, 0, 0, 0, 281, 282, 5, 102, 0, 0, 282, 283, 5, 97, 0, 0, 283, 284, 5, 108, 0, 0, 284, 285, 5, 115, 0, 0, 285, 286, 5, 101, 0, 0, 286, 78, 1, 0, 0, 0, 287, 288, 5, 98, 0, 0, 288, 289, 5, 114, 0, 0, 289, 290, 5, 101, 0, 0, 290, 291, 5, 97, 0, 0, 291, 292, 5, 107, 0, 0, 292, 80, 1, 0, 0, 0, 293, 294, 5, 110, 0, 0, 294, 295, 5, 101, 0, 0, 295, 296, 5, 120, 0, 0, 296, 297, 5, 116, 0, 0, 297, 82, 1, 0, 0, 0, 298, 299, 5, 45, 0, 0, 299, 300, 5, 62, 0, 0, 300, 84, 1, 0, 0, 0, 301, 302, 5, 43, 0, 0, 302, 303, 5, 61, 0, 0, 303, 86, 1, 0, 0, 0, 304, 305, 5, 45, 0, 0, 305, 306, 5, 61, 0, 0, 306, 88, 1, 0, 0, 0, 307, 308, 5, 42, 0, 0, 308, 309, 5, 61, 0, 0, 309, 90, 1, 0, 0, 0, 310, 311, 5, 47, 0, 0, 311, 312, 5, 61, 0, 0, 312, 92, 1, 0, 0, 0, 313, 314, 5, 37, 0, 0, 314, 315, 5, 61, 0, 0, 315, 94, 1, 0, 0, 0, 316, 317, 5, 61, 0, 0, 317, 96, 1, 0, 0, 0, 318, 319, 5, 40, 0, 0, 319, 98, 1, 0, 0, 0, 320, 321, 5, 41, 0, 0, 321, 100, 1, 0, 0, 0, 322, 323, 5, 91, 0, 0, 323, 102, 1, 0, 0, 0, 324, 325, 5, 93, 0, 0, 325, 104, 1, 0, 0, 0, 326, 327, 5, 123, 0, 0, 327, 106, 1, 0, 0, 0, 328, 329, 5, 125, 0, 0, 329, 108, 1, 0, 0, 0, 330, 331, 5, 44, 0, 0, 331, 110, 1, 0, 0, 0, 332, 333, 5, 46, 0, 0, 333, 112, 1, 0, 0, 0, 334, 335, 5, 46, 0, 0, 335, 336, 5, 46, 0, 0, 336, 114, 1, 0, 0, 0, 337, 338, 5, 58, 0, 0, 338, 116, 1, 0, 0, 0, 339, 340, 5, 59, 0, 0, 340, 118, 1, 0, 0, 0, 341, 350, 5, 48, 0, 0, 342, 346, 7, 0, 0, 0, 343, 345, 7, 1, 0, 0, 344, 343, 1, 0, 0, 0, 345, 348, 1, 0, 0, 0, 346, 344, 1, 0, 0, 0, 346, 347, 1, 0, 0, 0, 347, 350, 1, 0, 0, 0, 348, 346, 1, 0, 0, 0, 349, 341, 1, 0, 0, 0, 349, 342, 1, 0, 0, 0, 350, 120, 1, 0, 0, 0, 351, 353, 7, 1, 0, 0, 352, 351, 1, 0, 0, 0, 353, 356, 1, 0, 0, 0, 354, 352, 1, 0, 0, 0, 354, 355, 1, 0, 0, 0, 355, 357, 1, 0, 0, 0, 356, 354, 1, 0, 0, 0, 357, 359, 5, 46, 0, 0, 358, 360, 7, 1, 0, 0, 359, 358, 1, 0, 0, 0, 360, 361, 1, 0, 0, 0, 361, 359, 1, 0, 0, 0, 361, 362, 1, 0, 0, 0, 362, 122, 1, 0, 0, 0, 363, 367, 7, 2, 0, 0, 364, 366, 7, 3, 0, 0, 365, 364, 1, 0, 0, 0, 366, 369, 1, 0, 0, 0, 367, 365, 1, 0, 0, 0, 367, 368, 1, 0, 0, 0, 368, 124, 1, 0, 0, 0, 369, 367, 1, 0, 0, 0, 370, 374, 5, 34, 0, 0, 371, 373, 8, 4, 0, 0, 372, 371, 1, 0, 0, 0, 373, 376, 1, 0, 0, 0, 374, 372, 1, 0, 0, 0, 374, 375, 1, 0, 0, 0, 375, 377, 1, 0, 0, 0, 376, 374, 1, 0, 0, 0, 377, 378, 5, 34, 0, 0, 378, 126, 1, 0, 0, 0, 379, 383, 5, 35, 0, 0, 380, 382, 8, 5, 0, 0, 381, 380, 1, 0, 0, 0, 382, 385, 1, 0, 0, 0, 383, 381, 1, 0, 0, 0, 383, 384, 1, 0, 0, 0, 384, 404, 1, 0, 0, 0, 385, 383, 1, 0, 0, 0, 386, 387, 5, 61, 0, 0, 387, 388, 5, 98, 0, 0, 388, 389, 5, 101, 0, 0, 389, 390, 5, 103, 0, 0, 390, 391, 5, 105, 0, 0, 391, 392, 5, 110, 0, 0, 392, 396, 1, 0, 0, 0, 393, 395, 9, 0, 0, 0, 394, 393, 1, 0, 0, 0, 395, 398, 1, 0, 0, 0, 396, 397, 1, 0, 0, 0, 396, 394, 1, 0, 0, 0, 397, 399, 1, 0, 0, 0, 398, 396, 1, 0, 0, 0, 399, 400, 5, 61, 0, 0, 400, 401, 5, 101, 0, 0, 401, 402, 5, 110, 0, 0, 402, 404, 5, 100, 0, 0, 403, 379, 1, 0, 0, 0, 403, 386, 1, 0, 0, 0, 404, 405, 1, 0, 0, 0, 405, 406, 6, 63, 0, 0, 406, 128, 1, 0, 0, 0, 407, 408, 7, 6, 0, 0, 408, 409, 1, 0, 0, 0, 409, 410, 6, 64, 0, 0, 410, 130, 1, 0, 0, 0, 10, 0, 346, 349, 354, 361, 367, 374, 383, 396, 403, 1, 6, 0, 0] \ No newline at end of file diff --git a/Phase1Template/untitled/src/parsers/FunctionCraftLexer.java b/Phase1Template/untitled/src/parsers/FunctionCraftLexer.java new file mode 100644 index 0000000..4c279d2 --- /dev/null +++ b/Phase1Template/untitled/src/parsers/FunctionCraftLexer.java @@ -0,0 +1,403 @@ +// Generated from U:/UT/6/PLC_TA/Design-Compiler-Course-Projects/Phase2Template/Phase2/src/main/grammer/FunctionCraft.g4 by ANTLR 4.13.1 +package /parsers; + + import main.ast.node.*; + import main.ast.node.declaration.*; + import main.ast.node.statement.*; + import main.ast.node.expression.*; + import main.ast.node.expression.operators.*; + import main.ast.node.expression.value.*; + import main.ast.node.expression.primitive.*; + +import org.antlr.v4.runtime.Lexer; +import org.antlr.v4.runtime.CharStream; +import org.antlr.v4.runtime.Token; +import org.antlr.v4.runtime.TokenStream; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.misc.*; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast", "CheckReturnValue", "this-escape"}) +public class FunctionCraftLexer extends Lexer { + static { RuntimeMetaData.checkVersion("4.13.1", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + DEF=1, END=2, MAIN=3, PUTS=4, PUSH=5, LEN=6, RETURN=7, IF=8, ELSE=9, ELSEIF=10, + METHOD=11, PATTERN=12, MATCH=13, LOOP=14, FOR=15, IN=16, DO=17, CHOP=18, + CHOMP=19, PLUS=20, MINUS=21, MULT=22, DIVIDE=23, EQUAL=24, NOT_EQUAL=25, + LESS_EQUAL_THAN=26, GREATER_EQUAL_THAN=27, GREATER_THAN=28, LESS_THAN=29, + AND=30, OR=31, NOT=32, INCREMENT=33, DECREMENT=34, PATTERN_MATCHING_SEPARATOR=35, + SEPARATOR=36, APPEND=37, TRUE=38, FALSE=39, BREAK=40, NEXT=41, ARROW=42, + PLUS_ASSIGN=43, MINUS_ASSIGN=44, MULT_ASSIGN=45, DIVIDE_ASSIGN=46, MOD_ASSIGN=47, + ASSIGN=48, LPAR=49, RPAR=50, LBRACK=51, RBRACK=52, LBRACE=53, RBRACE=54, + COMMA=55, DOT=56, DOUBLEDOT=57, COLON=58, SEMICOLLON=59, INT_VALUE=60, + FLOAT_VALUE=61, IDENTIFIER=62, STRING_VALUE=63, COMMENT=64, WS=65; + public static String[] channelNames = { + "DEFAULT_TOKEN_CHANNEL", "HIDDEN" + }; + + public static String[] modeNames = { + "DEFAULT_MODE" + }; + + private static String[] makeRuleNames() { + return new String[] { + "DEF", "END", "MAIN", "PUTS", "PUSH", "LEN", "RETURN", "IF", "ELSE", + "ELSEIF", "METHOD", "PATTERN", "MATCH", "LOOP", "FOR", "IN", "DO", "CHOP", + "CHOMP", "PLUS", "MINUS", "MULT", "DIVIDE", "EQUAL", "NOT_EQUAL", "LESS_EQUAL_THAN", + "GREATER_EQUAL_THAN", "GREATER_THAN", "LESS_THAN", "AND", "OR", "NOT", + "INCREMENT", "DECREMENT", "PATTERN_MATCHING_SEPARATOR", "SEPARATOR", + "APPEND", "TRUE", "FALSE", "BREAK", "NEXT", "ARROW", "PLUS_ASSIGN", "MINUS_ASSIGN", + "MULT_ASSIGN", "DIVIDE_ASSIGN", "MOD_ASSIGN", "ASSIGN", "LPAR", "RPAR", + "LBRACK", "RBRACK", "LBRACE", "RBRACE", "COMMA", "DOT", "DOUBLEDOT", + "COLON", "SEMICOLLON", "INT_VALUE", "FLOAT_VALUE", "IDENTIFIER", "STRING_VALUE", + "COMMENT", "WS" + }; + } + public static final String[] ruleNames = makeRuleNames(); + + private static String[] makeLiteralNames() { + return new String[] { + null, "'def'", "'end'", "'main'", "'puts'", "'push'", "'len'", "'return'", + "'if'", "'else'", "'elseif'", "'method'", "'pattern'", "'match'", "'loop'", + "'for'", "'in'", "'do'", "'chop'", "'chomp'", "'+'", "'-'", "'*'", "'/'", + "'=='", "'!='", "'<='", "'>='", "'>'", "'<'", "'&&'", "'||'", "'!'", + "'++'", "'--'", "' |'", "'|'", "'<<'", "'true'", "'false'", "'break'", + "'next'", "'->'", "'+='", "'-='", "'*='", "'/='", "'%='", "'='", "'('", + "')'", "'['", "']'", "'{'", "'}'", "','", "'.'", "'..'", "':'", "';'" + }; + } + private static final String[] _LITERAL_NAMES = makeLiteralNames(); + private static String[] makeSymbolicNames() { + return new String[] { + null, "DEF", "END", "MAIN", "PUTS", "PUSH", "LEN", "RETURN", "IF", "ELSE", + "ELSEIF", "METHOD", "PATTERN", "MATCH", "LOOP", "FOR", "IN", "DO", "CHOP", + "CHOMP", "PLUS", "MINUS", "MULT", "DIVIDE", "EQUAL", "NOT_EQUAL", "LESS_EQUAL_THAN", + "GREATER_EQUAL_THAN", "GREATER_THAN", "LESS_THAN", "AND", "OR", "NOT", + "INCREMENT", "DECREMENT", "PATTERN_MATCHING_SEPARATOR", "SEPARATOR", + "APPEND", "TRUE", "FALSE", "BREAK", "NEXT", "ARROW", "PLUS_ASSIGN", "MINUS_ASSIGN", + "MULT_ASSIGN", "DIVIDE_ASSIGN", "MOD_ASSIGN", "ASSIGN", "LPAR", "RPAR", + "LBRACK", "RBRACK", "LBRACE", "RBRACE", "COMMA", "DOT", "DOUBLEDOT", + "COLON", "SEMICOLLON", "INT_VALUE", "FLOAT_VALUE", "IDENTIFIER", "STRING_VALUE", + "COMMENT", "WS" + }; + } + private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames(); + public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); + + /** + * @deprecated Use {@link #VOCABULARY} instead. + */ + @Deprecated + public static final String[] tokenNames; + static { + tokenNames = new String[_SYMBOLIC_NAMES.length]; + for (int i = 0; i < tokenNames.length; i++) { + tokenNames[i] = VOCABULARY.getLiteralName(i); + if (tokenNames[i] == null) { + tokenNames[i] = VOCABULARY.getSymbolicName(i); + } + + if (tokenNames[i] == null) { + tokenNames[i] = ""; + } + } + } + + @Override + @Deprecated + public String[] getTokenNames() { + return tokenNames; + } + + @Override + + public Vocabulary getVocabulary() { + return VOCABULARY; + } + + + public FunctionCraftLexer(CharStream input) { + super(input); + _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + + @Override + public String getGrammarFileName() { return "FunctionCraft.g4"; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public String[] getChannelNames() { return channelNames; } + + @Override + public String[] getModeNames() { return modeNames; } + + @Override + public ATN getATN() { return _ATN; } + + public static final String _serializedATN = + "\u0004\u0000A\u019b\u0006\uffff\uffff\u0002\u0000\u0007\u0000\u0002\u0001"+ + "\u0007\u0001\u0002\u0002\u0007\u0002\u0002\u0003\u0007\u0003\u0002\u0004"+ + "\u0007\u0004\u0002\u0005\u0007\u0005\u0002\u0006\u0007\u0006\u0002\u0007"+ + "\u0007\u0007\u0002\b\u0007\b\u0002\t\u0007\t\u0002\n\u0007\n\u0002\u000b"+ + "\u0007\u000b\u0002\f\u0007\f\u0002\r\u0007\r\u0002\u000e\u0007\u000e\u0002"+ + "\u000f\u0007\u000f\u0002\u0010\u0007\u0010\u0002\u0011\u0007\u0011\u0002"+ + "\u0012\u0007\u0012\u0002\u0013\u0007\u0013\u0002\u0014\u0007\u0014\u0002"+ + "\u0015\u0007\u0015\u0002\u0016\u0007\u0016\u0002\u0017\u0007\u0017\u0002"+ + "\u0018\u0007\u0018\u0002\u0019\u0007\u0019\u0002\u001a\u0007\u001a\u0002"+ + "\u001b\u0007\u001b\u0002\u001c\u0007\u001c\u0002\u001d\u0007\u001d\u0002"+ + "\u001e\u0007\u001e\u0002\u001f\u0007\u001f\u0002 \u0007 \u0002!\u0007"+ + "!\u0002\"\u0007\"\u0002#\u0007#\u0002$\u0007$\u0002%\u0007%\u0002&\u0007"+ + "&\u0002\'\u0007\'\u0002(\u0007(\u0002)\u0007)\u0002*\u0007*\u0002+\u0007"+ + "+\u0002,\u0007,\u0002-\u0007-\u0002.\u0007.\u0002/\u0007/\u00020\u0007"+ + "0\u00021\u00071\u00022\u00072\u00023\u00073\u00024\u00074\u00025\u0007"+ + "5\u00026\u00076\u00027\u00077\u00028\u00078\u00029\u00079\u0002:\u0007"+ + ":\u0002;\u0007;\u0002<\u0007<\u0002=\u0007=\u0002>\u0007>\u0002?\u0007"+ + "?\u0002@\u0007@\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0000\u0001"+ + "\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0002\u0001\u0002\u0001"+ + "\u0002\u0001\u0002\u0001\u0002\u0001\u0003\u0001\u0003\u0001\u0003\u0001"+ + "\u0003\u0001\u0003\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001"+ + "\u0004\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0006\u0001"+ + "\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001"+ + "\u0007\u0001\u0007\u0001\u0007\u0001\b\u0001\b\u0001\b\u0001\b\u0001\b"+ + "\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\n\u0001"+ + "\n\u0001\n\u0001\n\u0001\n\u0001\n\u0001\n\u0001\u000b\u0001\u000b\u0001"+ + "\u000b\u0001\u000b\u0001\u000b\u0001\u000b\u0001\u000b\u0001\u000b\u0001"+ + "\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\r\u0001\r\u0001\r\u0001"+ + "\r\u0001\r\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000f"+ + "\u0001\u000f\u0001\u000f\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0011"+ + "\u0001\u0011\u0001\u0011\u0001\u0011\u0001\u0011\u0001\u0012\u0001\u0012"+ + "\u0001\u0012\u0001\u0012\u0001\u0012\u0001\u0012\u0001\u0013\u0001\u0013"+ + "\u0001\u0014\u0001\u0014\u0001\u0015\u0001\u0015\u0001\u0016\u0001\u0016"+ + "\u0001\u0017\u0001\u0017\u0001\u0017\u0001\u0018\u0001\u0018\u0001\u0018"+ + "\u0001\u0019\u0001\u0019\u0001\u0019\u0001\u001a\u0001\u001a\u0001\u001a"+ + "\u0001\u001b\u0001\u001b\u0001\u001c\u0001\u001c\u0001\u001d\u0001\u001d"+ + "\u0001\u001d\u0001\u001e\u0001\u001e\u0001\u001e\u0001\u001f\u0001\u001f"+ + "\u0001 \u0001 \u0001 \u0001!\u0001!\u0001!\u0001\"\u0001\"\u0001\"\u0001"+ + "\"\u0001\"\u0001\"\u0001#\u0001#\u0001$\u0001$\u0001$\u0001%\u0001%\u0001"+ + "%\u0001%\u0001%\u0001&\u0001&\u0001&\u0001&\u0001&\u0001&\u0001\'\u0001"+ + "\'\u0001\'\u0001\'\u0001\'\u0001\'\u0001(\u0001(\u0001(\u0001(\u0001("+ + "\u0001)\u0001)\u0001)\u0001*\u0001*\u0001*\u0001+\u0001+\u0001+\u0001"+ + ",\u0001,\u0001,\u0001-\u0001-\u0001-\u0001.\u0001.\u0001.\u0001/\u0001"+ + "/\u00010\u00010\u00011\u00011\u00012\u00012\u00013\u00013\u00014\u0001"+ + "4\u00015\u00015\u00016\u00016\u00017\u00017\u00018\u00018\u00018\u0001"+ + "9\u00019\u0001:\u0001:\u0001;\u0001;\u0001;\u0005;\u0159\b;\n;\f;\u015c"+ + "\t;\u0003;\u015e\b;\u0001<\u0005<\u0161\b<\n<\f<\u0164\t<\u0001<\u0001"+ + "<\u0004<\u0168\b<\u000b<\f<\u0169\u0001=\u0001=\u0005=\u016e\b=\n=\f="+ + "\u0171\t=\u0001>\u0001>\u0005>\u0175\b>\n>\f>\u0178\t>\u0001>\u0001>\u0001"+ + "?\u0001?\u0005?\u017e\b?\n?\f?\u0181\t?\u0001?\u0001?\u0001?\u0001?\u0001"+ + "?\u0001?\u0001?\u0001?\u0005?\u018b\b?\n?\f?\u018e\t?\u0001?\u0001?\u0001"+ + "?\u0001?\u0003?\u0194\b?\u0001?\u0001?\u0001@\u0001@\u0001@\u0001@\u0001"+ + "\u018c\u0000A\u0001\u0001\u0003\u0002\u0005\u0003\u0007\u0004\t\u0005"+ + "\u000b\u0006\r\u0007\u000f\b\u0011\t\u0013\n\u0015\u000b\u0017\f\u0019"+ + "\r\u001b\u000e\u001d\u000f\u001f\u0010!\u0011#\u0012%\u0013\'\u0014)\u0015"+ + "+\u0016-\u0017/\u00181\u00193\u001a5\u001b7\u001c9\u001d;\u001e=\u001f"+ + "? A!C\"E#G$I%K&M\'O(Q)S*U+W,Y-[.]/_0a1c2e3g4i5k6m7o8q9s:u;w}?\u007f"+ + "@\u0081A\u0001\u0000\u0007\u0001\u000019\u0001\u000009\u0003\u0000AZ_"+ + "_az\u0004\u000009AZ__az\u0001\u0000\"\"\u0002\u0000\n\n\r\r\u0003\u0000"+ + "\t\n\r\r \u01a3\u0000\u0001\u0001\u0000\u0000\u0000\u0000\u0003\u0001"+ + "\u0000\u0000\u0000\u0000\u0005\u0001\u0000\u0000\u0000\u0000\u0007\u0001"+ + "\u0000\u0000\u0000\u0000\t\u0001\u0000\u0000\u0000\u0000\u000b\u0001\u0000"+ + "\u0000\u0000\u0000\r\u0001\u0000\u0000\u0000\u0000\u000f\u0001\u0000\u0000"+ + "\u0000\u0000\u0011\u0001\u0000\u0000\u0000\u0000\u0013\u0001\u0000\u0000"+ + "\u0000\u0000\u0015\u0001\u0000\u0000\u0000\u0000\u0017\u0001\u0000\u0000"+ + "\u0000\u0000\u0019\u0001\u0000\u0000\u0000\u0000\u001b\u0001\u0000\u0000"+ + "\u0000\u0000\u001d\u0001\u0000\u0000\u0000\u0000\u001f\u0001\u0000\u0000"+ + "\u0000\u0000!\u0001\u0000\u0000\u0000\u0000#\u0001\u0000\u0000\u0000\u0000"+ + "%\u0001\u0000\u0000\u0000\u0000\'\u0001\u0000\u0000\u0000\u0000)\u0001"+ + "\u0000\u0000\u0000\u0000+\u0001\u0000\u0000\u0000\u0000-\u0001\u0000\u0000"+ + "\u0000\u0000/\u0001\u0000\u0000\u0000\u00001\u0001\u0000\u0000\u0000\u0000"+ + "3\u0001\u0000\u0000\u0000\u00005\u0001\u0000\u0000\u0000\u00007\u0001"+ + "\u0000\u0000\u0000\u00009\u0001\u0000\u0000\u0000\u0000;\u0001\u0000\u0000"+ + "\u0000\u0000=\u0001\u0000\u0000\u0000\u0000?\u0001\u0000\u0000\u0000\u0000"+ + "A\u0001\u0000\u0000\u0000\u0000C\u0001\u0000\u0000\u0000\u0000E\u0001"+ + "\u0000\u0000\u0000\u0000G\u0001\u0000\u0000\u0000\u0000I\u0001\u0000\u0000"+ + "\u0000\u0000K\u0001\u0000\u0000\u0000\u0000M\u0001\u0000\u0000\u0000\u0000"+ + "O\u0001\u0000\u0000\u0000\u0000Q\u0001\u0000\u0000\u0000\u0000S\u0001"+ + "\u0000\u0000\u0000\u0000U\u0001\u0000\u0000\u0000\u0000W\u0001\u0000\u0000"+ + "\u0000\u0000Y\u0001\u0000\u0000\u0000\u0000[\u0001\u0000\u0000\u0000\u0000"+ + "]\u0001\u0000\u0000\u0000\u0000_\u0001\u0000\u0000\u0000\u0000a\u0001"+ + "\u0000\u0000\u0000\u0000c\u0001\u0000\u0000\u0000\u0000e\u0001\u0000\u0000"+ + "\u0000\u0000g\u0001\u0000\u0000\u0000\u0000i\u0001\u0000\u0000\u0000\u0000"+ + "k\u0001\u0000\u0000\u0000\u0000m\u0001\u0000\u0000\u0000\u0000o\u0001"+ + "\u0000\u0000\u0000\u0000q\u0001\u0000\u0000\u0000\u0000s\u0001\u0000\u0000"+ + "\u0000\u0000u\u0001\u0000\u0000\u0000\u0000w\u0001\u0000\u0000\u0000\u0000"+ + "y\u0001\u0000\u0000\u0000\u0000{\u0001\u0000\u0000\u0000\u0000}\u0001"+ + "\u0000\u0000\u0000\u0000\u007f\u0001\u0000\u0000\u0000\u0000\u0081\u0001"+ + "\u0000\u0000\u0000\u0001\u0083\u0001\u0000\u0000\u0000\u0003\u0087\u0001"+ + "\u0000\u0000\u0000\u0005\u008b\u0001\u0000\u0000\u0000\u0007\u0090\u0001"+ + "\u0000\u0000\u0000\t\u0095\u0001\u0000\u0000\u0000\u000b\u009a\u0001\u0000"+ + "\u0000\u0000\r\u009e\u0001\u0000\u0000\u0000\u000f\u00a5\u0001\u0000\u0000"+ + "\u0000\u0011\u00a8\u0001\u0000\u0000\u0000\u0013\u00ad\u0001\u0000\u0000"+ + "\u0000\u0015\u00b4\u0001\u0000\u0000\u0000\u0017\u00bb\u0001\u0000\u0000"+ + "\u0000\u0019\u00c3\u0001\u0000\u0000\u0000\u001b\u00c9\u0001\u0000\u0000"+ + "\u0000\u001d\u00ce\u0001\u0000\u0000\u0000\u001f\u00d2\u0001\u0000\u0000"+ + "\u0000!\u00d5\u0001\u0000\u0000\u0000#\u00d8\u0001\u0000\u0000\u0000%"+ + "\u00dd\u0001\u0000\u0000\u0000\'\u00e3\u0001\u0000\u0000\u0000)\u00e5"+ + "\u0001\u0000\u0000\u0000+\u00e7\u0001\u0000\u0000\u0000-\u00e9\u0001\u0000"+ + "\u0000\u0000/\u00eb\u0001\u0000\u0000\u00001\u00ee\u0001\u0000\u0000\u0000"+ + "3\u00f1\u0001\u0000\u0000\u00005\u00f4\u0001\u0000\u0000\u00007\u00f7"+ + "\u0001\u0000\u0000\u00009\u00f9\u0001\u0000\u0000\u0000;\u00fb\u0001\u0000"+ + "\u0000\u0000=\u00fe\u0001\u0000\u0000\u0000?\u0101\u0001\u0000\u0000\u0000"+ + "A\u0103\u0001\u0000\u0000\u0000C\u0106\u0001\u0000\u0000\u0000E\u0109"+ + "\u0001\u0000\u0000\u0000G\u010f\u0001\u0000\u0000\u0000I\u0111\u0001\u0000"+ + "\u0000\u0000K\u0114\u0001\u0000\u0000\u0000M\u0119\u0001\u0000\u0000\u0000"+ + "O\u011f\u0001\u0000\u0000\u0000Q\u0125\u0001\u0000\u0000\u0000S\u012a"+ + "\u0001\u0000\u0000\u0000U\u012d\u0001\u0000\u0000\u0000W\u0130\u0001\u0000"+ + "\u0000\u0000Y\u0133\u0001\u0000\u0000\u0000[\u0136\u0001\u0000\u0000\u0000"+ + "]\u0139\u0001\u0000\u0000\u0000_\u013c\u0001\u0000\u0000\u0000a\u013e"+ + "\u0001\u0000\u0000\u0000c\u0140\u0001\u0000\u0000\u0000e\u0142\u0001\u0000"+ + "\u0000\u0000g\u0144\u0001\u0000\u0000\u0000i\u0146\u0001\u0000\u0000\u0000"+ + "k\u0148\u0001\u0000\u0000\u0000m\u014a\u0001\u0000\u0000\u0000o\u014c"+ + "\u0001\u0000\u0000\u0000q\u014e\u0001\u0000\u0000\u0000s\u0151\u0001\u0000"+ + "\u0000\u0000u\u0153\u0001\u0000\u0000\u0000w\u015d\u0001\u0000\u0000\u0000"+ + "y\u0162\u0001\u0000\u0000\u0000{\u016b\u0001\u0000\u0000\u0000}\u0172"+ + "\u0001\u0000\u0000\u0000\u007f\u0193\u0001\u0000\u0000\u0000\u0081\u0197"+ + "\u0001\u0000\u0000\u0000\u0083\u0084\u0005d\u0000\u0000\u0084\u0085\u0005"+ + "e\u0000\u0000\u0085\u0086\u0005f\u0000\u0000\u0086\u0002\u0001\u0000\u0000"+ + "\u0000\u0087\u0088\u0005e\u0000\u0000\u0088\u0089\u0005n\u0000\u0000\u0089"+ + "\u008a\u0005d\u0000\u0000\u008a\u0004\u0001\u0000\u0000\u0000\u008b\u008c"+ + "\u0005m\u0000\u0000\u008c\u008d\u0005a\u0000\u0000\u008d\u008e\u0005i"+ + "\u0000\u0000\u008e\u008f\u0005n\u0000\u0000\u008f\u0006\u0001\u0000\u0000"+ + "\u0000\u0090\u0091\u0005p\u0000\u0000\u0091\u0092\u0005u\u0000\u0000\u0092"+ + "\u0093\u0005t\u0000\u0000\u0093\u0094\u0005s\u0000\u0000\u0094\b\u0001"+ + "\u0000\u0000\u0000\u0095\u0096\u0005p\u0000\u0000\u0096\u0097\u0005u\u0000"+ + "\u0000\u0097\u0098\u0005s\u0000\u0000\u0098\u0099\u0005h\u0000\u0000\u0099"+ + "\n\u0001\u0000\u0000\u0000\u009a\u009b\u0005l\u0000\u0000\u009b\u009c"+ + "\u0005e\u0000\u0000\u009c\u009d\u0005n\u0000\u0000\u009d\f\u0001\u0000"+ + "\u0000\u0000\u009e\u009f\u0005r\u0000\u0000\u009f\u00a0\u0005e\u0000\u0000"+ + "\u00a0\u00a1\u0005t\u0000\u0000\u00a1\u00a2\u0005u\u0000\u0000\u00a2\u00a3"+ + "\u0005r\u0000\u0000\u00a3\u00a4\u0005n\u0000\u0000\u00a4\u000e\u0001\u0000"+ + "\u0000\u0000\u00a5\u00a6\u0005i\u0000\u0000\u00a6\u00a7\u0005f\u0000\u0000"+ + "\u00a7\u0010\u0001\u0000\u0000\u0000\u00a8\u00a9\u0005e\u0000\u0000\u00a9"+ + "\u00aa\u0005l\u0000\u0000\u00aa\u00ab\u0005s\u0000\u0000\u00ab\u00ac\u0005"+ + "e\u0000\u0000\u00ac\u0012\u0001\u0000\u0000\u0000\u00ad\u00ae\u0005e\u0000"+ + "\u0000\u00ae\u00af\u0005l\u0000\u0000\u00af\u00b0\u0005s\u0000\u0000\u00b0"+ + "\u00b1\u0005e\u0000\u0000\u00b1\u00b2\u0005i\u0000\u0000\u00b2\u00b3\u0005"+ + "f\u0000\u0000\u00b3\u0014\u0001\u0000\u0000\u0000\u00b4\u00b5\u0005m\u0000"+ + "\u0000\u00b5\u00b6\u0005e\u0000\u0000\u00b6\u00b7\u0005t\u0000\u0000\u00b7"+ + "\u00b8\u0005h\u0000\u0000\u00b8\u00b9\u0005o\u0000\u0000\u00b9\u00ba\u0005"+ + "d\u0000\u0000\u00ba\u0016\u0001\u0000\u0000\u0000\u00bb\u00bc\u0005p\u0000"+ + "\u0000\u00bc\u00bd\u0005a\u0000\u0000\u00bd\u00be\u0005t\u0000\u0000\u00be"+ + "\u00bf\u0005t\u0000\u0000\u00bf\u00c0\u0005e\u0000\u0000\u00c0\u00c1\u0005"+ + "r\u0000\u0000\u00c1\u00c2\u0005n\u0000\u0000\u00c2\u0018\u0001\u0000\u0000"+ + "\u0000\u00c3\u00c4\u0005m\u0000\u0000\u00c4\u00c5\u0005a\u0000\u0000\u00c5"+ + "\u00c6\u0005t\u0000\u0000\u00c6\u00c7\u0005c\u0000\u0000\u00c7\u00c8\u0005"+ + "h\u0000\u0000\u00c8\u001a\u0001\u0000\u0000\u0000\u00c9\u00ca\u0005l\u0000"+ + "\u0000\u00ca\u00cb\u0005o\u0000\u0000\u00cb\u00cc\u0005o\u0000\u0000\u00cc"+ + "\u00cd\u0005p\u0000\u0000\u00cd\u001c\u0001\u0000\u0000\u0000\u00ce\u00cf"+ + "\u0005f\u0000\u0000\u00cf\u00d0\u0005o\u0000\u0000\u00d0\u00d1\u0005r"+ + "\u0000\u0000\u00d1\u001e\u0001\u0000\u0000\u0000\u00d2\u00d3\u0005i\u0000"+ + "\u0000\u00d3\u00d4\u0005n\u0000\u0000\u00d4 \u0001\u0000\u0000\u0000\u00d5"+ + "\u00d6\u0005d\u0000\u0000\u00d6\u00d7\u0005o\u0000\u0000\u00d7\"\u0001"+ + "\u0000\u0000\u0000\u00d8\u00d9\u0005c\u0000\u0000\u00d9\u00da\u0005h\u0000"+ + "\u0000\u00da\u00db\u0005o\u0000\u0000\u00db\u00dc\u0005p\u0000\u0000\u00dc"+ + "$\u0001\u0000\u0000\u0000\u00dd\u00de\u0005c\u0000\u0000\u00de\u00df\u0005"+ + "h\u0000\u0000\u00df\u00e0\u0005o\u0000\u0000\u00e0\u00e1\u0005m\u0000"+ + "\u0000\u00e1\u00e2\u0005p\u0000\u0000\u00e2&\u0001\u0000\u0000\u0000\u00e3"+ + "\u00e4\u0005+\u0000\u0000\u00e4(\u0001\u0000\u0000\u0000\u00e5\u00e6\u0005"+ + "-\u0000\u0000\u00e6*\u0001\u0000\u0000\u0000\u00e7\u00e8\u0005*\u0000"+ + "\u0000\u00e8,\u0001\u0000\u0000\u0000\u00e9\u00ea\u0005/\u0000\u0000\u00ea"+ + ".\u0001\u0000\u0000\u0000\u00eb\u00ec\u0005=\u0000\u0000\u00ec\u00ed\u0005"+ + "=\u0000\u0000\u00ed0\u0001\u0000\u0000\u0000\u00ee\u00ef\u0005!\u0000"+ + "\u0000\u00ef\u00f0\u0005=\u0000\u0000\u00f02\u0001\u0000\u0000\u0000\u00f1"+ + "\u00f2\u0005<\u0000\u0000\u00f2\u00f3\u0005=\u0000\u0000\u00f34\u0001"+ + "\u0000\u0000\u0000\u00f4\u00f5\u0005>\u0000\u0000\u00f5\u00f6\u0005=\u0000"+ + "\u0000\u00f66\u0001\u0000\u0000\u0000\u00f7\u00f8\u0005>\u0000\u0000\u00f8"+ + "8\u0001\u0000\u0000\u0000\u00f9\u00fa\u0005<\u0000\u0000\u00fa:\u0001"+ + "\u0000\u0000\u0000\u00fb\u00fc\u0005&\u0000\u0000\u00fc\u00fd\u0005&\u0000"+ + "\u0000\u00fd<\u0001\u0000\u0000\u0000\u00fe\u00ff\u0005|\u0000\u0000\u00ff"+ + "\u0100\u0005|\u0000\u0000\u0100>\u0001\u0000\u0000\u0000\u0101\u0102\u0005"+ + "!\u0000\u0000\u0102@\u0001\u0000\u0000\u0000\u0103\u0104\u0005+\u0000"+ + "\u0000\u0104\u0105\u0005+\u0000\u0000\u0105B\u0001\u0000\u0000\u0000\u0106"+ + "\u0107\u0005-\u0000\u0000\u0107\u0108\u0005-\u0000\u0000\u0108D\u0001"+ + "\u0000\u0000\u0000\u0109\u010a\u0005 \u0000\u0000\u010a\u010b\u0005 \u0000"+ + "\u0000\u010b\u010c\u0005 \u0000\u0000\u010c\u010d\u0005 \u0000\u0000\u010d"+ + "\u010e\u0005|\u0000\u0000\u010eF\u0001\u0000\u0000\u0000\u010f\u0110\u0005"+ + "|\u0000\u0000\u0110H\u0001\u0000\u0000\u0000\u0111\u0112\u0005<\u0000"+ + "\u0000\u0112\u0113\u0005<\u0000\u0000\u0113J\u0001\u0000\u0000\u0000\u0114"+ + "\u0115\u0005t\u0000\u0000\u0115\u0116\u0005r\u0000\u0000\u0116\u0117\u0005"+ + "u\u0000\u0000\u0117\u0118\u0005e\u0000\u0000\u0118L\u0001\u0000\u0000"+ + "\u0000\u0119\u011a\u0005f\u0000\u0000\u011a\u011b\u0005a\u0000\u0000\u011b"+ + "\u011c\u0005l\u0000\u0000\u011c\u011d\u0005s\u0000\u0000\u011d\u011e\u0005"+ + "e\u0000\u0000\u011eN\u0001\u0000\u0000\u0000\u011f\u0120\u0005b\u0000"+ + "\u0000\u0120\u0121\u0005r\u0000\u0000\u0121\u0122\u0005e\u0000\u0000\u0122"+ + "\u0123\u0005a\u0000\u0000\u0123\u0124\u0005k\u0000\u0000\u0124P\u0001"+ + "\u0000\u0000\u0000\u0125\u0126\u0005n\u0000\u0000\u0126\u0127\u0005e\u0000"+ + "\u0000\u0127\u0128\u0005x\u0000\u0000\u0128\u0129\u0005t\u0000\u0000\u0129"+ + "R\u0001\u0000\u0000\u0000\u012a\u012b\u0005-\u0000\u0000\u012b\u012c\u0005"+ + ">\u0000\u0000\u012cT\u0001\u0000\u0000\u0000\u012d\u012e\u0005+\u0000"+ + "\u0000\u012e\u012f\u0005=\u0000\u0000\u012fV\u0001\u0000\u0000\u0000\u0130"+ + "\u0131\u0005-\u0000\u0000\u0131\u0132\u0005=\u0000\u0000\u0132X\u0001"+ + "\u0000\u0000\u0000\u0133\u0134\u0005*\u0000\u0000\u0134\u0135\u0005=\u0000"+ + "\u0000\u0135Z\u0001\u0000\u0000\u0000\u0136\u0137\u0005/\u0000\u0000\u0137"+ + "\u0138\u0005=\u0000\u0000\u0138\\\u0001\u0000\u0000\u0000\u0139\u013a"+ + "\u0005%\u0000\u0000\u013a\u013b\u0005=\u0000\u0000\u013b^\u0001\u0000"+ + "\u0000\u0000\u013c\u013d\u0005=\u0000\u0000\u013d`\u0001\u0000\u0000\u0000"+ + "\u013e\u013f\u0005(\u0000\u0000\u013fb\u0001\u0000\u0000\u0000\u0140\u0141"+ + "\u0005)\u0000\u0000\u0141d\u0001\u0000\u0000\u0000\u0142\u0143\u0005["+ + "\u0000\u0000\u0143f\u0001\u0000\u0000\u0000\u0144\u0145\u0005]\u0000\u0000"+ + "\u0145h\u0001\u0000\u0000\u0000\u0146\u0147\u0005{\u0000\u0000\u0147j"+ + "\u0001\u0000\u0000\u0000\u0148\u0149\u0005}\u0000\u0000\u0149l\u0001\u0000"+ + "\u0000\u0000\u014a\u014b\u0005,\u0000\u0000\u014bn\u0001\u0000\u0000\u0000"+ + "\u014c\u014d\u0005.\u0000\u0000\u014dp\u0001\u0000\u0000\u0000\u014e\u014f"+ + "\u0005.\u0000\u0000\u014f\u0150\u0005.\u0000\u0000\u0150r\u0001\u0000"+ + "\u0000\u0000\u0151\u0152\u0005:\u0000\u0000\u0152t\u0001\u0000\u0000\u0000"+ + "\u0153\u0154\u0005;\u0000\u0000\u0154v\u0001\u0000\u0000\u0000\u0155\u015e"+ + "\u00050\u0000\u0000\u0156\u015a\u0007\u0000\u0000\u0000\u0157\u0159\u0007"+ + "\u0001\u0000\u0000\u0158\u0157\u0001\u0000\u0000\u0000\u0159\u015c\u0001"+ + "\u0000\u0000\u0000\u015a\u0158\u0001\u0000\u0000\u0000\u015a\u015b\u0001"+ + "\u0000\u0000\u0000\u015b\u015e\u0001\u0000\u0000\u0000\u015c\u015a\u0001"+ + "\u0000\u0000\u0000\u015d\u0155\u0001\u0000\u0000\u0000\u015d\u0156\u0001"+ + "\u0000\u0000\u0000\u015ex\u0001\u0000\u0000\u0000\u015f\u0161\u0007\u0001"+ + "\u0000\u0000\u0160\u015f\u0001\u0000\u0000\u0000\u0161\u0164\u0001\u0000"+ + "\u0000\u0000\u0162\u0160\u0001\u0000\u0000\u0000\u0162\u0163\u0001\u0000"+ + "\u0000\u0000\u0163\u0165\u0001\u0000\u0000\u0000\u0164\u0162\u0001\u0000"+ + "\u0000\u0000\u0165\u0167\u0005.\u0000\u0000\u0166\u0168\u0007\u0001\u0000"+ + "\u0000\u0167\u0166\u0001\u0000\u0000\u0000\u0168\u0169\u0001\u0000\u0000"+ + "\u0000\u0169\u0167\u0001\u0000\u0000\u0000\u0169\u016a\u0001\u0000\u0000"+ + "\u0000\u016az\u0001\u0000\u0000\u0000\u016b\u016f\u0007\u0002\u0000\u0000"+ + "\u016c\u016e\u0007\u0003\u0000\u0000\u016d\u016c\u0001\u0000\u0000\u0000"+ + "\u016e\u0171\u0001\u0000\u0000\u0000\u016f\u016d\u0001\u0000\u0000\u0000"+ + "\u016f\u0170\u0001\u0000\u0000\u0000\u0170|\u0001\u0000\u0000\u0000\u0171"+ + "\u016f\u0001\u0000\u0000\u0000\u0172\u0176\u0005\"\u0000\u0000\u0173\u0175"+ + "\b\u0004\u0000\u0000\u0174\u0173\u0001\u0000\u0000\u0000\u0175\u0178\u0001"+ + "\u0000\u0000\u0000\u0176\u0174\u0001\u0000\u0000\u0000\u0176\u0177\u0001"+ + "\u0000\u0000\u0000\u0177\u0179\u0001\u0000\u0000\u0000\u0178\u0176\u0001"+ + "\u0000\u0000\u0000\u0179\u017a\u0005\"\u0000\u0000\u017a~\u0001\u0000"+ + "\u0000\u0000\u017b\u017f\u0005#\u0000\u0000\u017c\u017e\b\u0005\u0000"+ + "\u0000\u017d\u017c\u0001\u0000\u0000\u0000\u017e\u0181\u0001\u0000\u0000"+ + "\u0000\u017f\u017d\u0001\u0000\u0000\u0000\u017f\u0180\u0001\u0000\u0000"+ + "\u0000\u0180\u0194\u0001\u0000\u0000\u0000\u0181\u017f\u0001\u0000\u0000"+ + "\u0000\u0182\u0183\u0005=\u0000\u0000\u0183\u0184\u0005b\u0000\u0000\u0184"+ + "\u0185\u0005e\u0000\u0000\u0185\u0186\u0005g\u0000\u0000\u0186\u0187\u0005"+ + "i\u0000\u0000\u0187\u0188\u0005n\u0000\u0000\u0188\u018c\u0001\u0000\u0000"+ + "\u0000\u0189\u018b\t\u0000\u0000\u0000\u018a\u0189\u0001\u0000\u0000\u0000"+ + "\u018b\u018e\u0001\u0000\u0000\u0000\u018c\u018d\u0001\u0000\u0000\u0000"+ + "\u018c\u018a\u0001\u0000\u0000\u0000\u018d\u018f\u0001\u0000\u0000\u0000"+ + "\u018e\u018c\u0001\u0000\u0000\u0000\u018f\u0190\u0005=\u0000\u0000\u0190"+ + "\u0191\u0005e\u0000\u0000\u0191\u0192\u0005n\u0000\u0000\u0192\u0194\u0005"+ + "d\u0000\u0000\u0193\u017b\u0001\u0000\u0000\u0000\u0193\u0182\u0001\u0000"+ + "\u0000\u0000\u0194\u0195\u0001\u0000\u0000\u0000\u0195\u0196\u0006?\u0000"+ + "\u0000\u0196\u0080\u0001\u0000\u0000\u0000\u0197\u0198\u0007\u0006\u0000"+ + "\u0000\u0198\u0199\u0001\u0000\u0000\u0000\u0199\u019a\u0006@\u0000\u0000"+ + "\u019a\u0082\u0001\u0000\u0000\u0000\n\u0000\u015a\u015d\u0162\u0169\u016f"+ + "\u0176\u017f\u018c\u0193\u0001\u0006\u0000\u0000"; + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} \ No newline at end of file diff --git a/Phase1Template/untitled/src/parsers/FunctionCraftLexer.tokens b/Phase1Template/untitled/src/parsers/FunctionCraftLexer.tokens new file mode 100644 index 0000000..c103028 --- /dev/null +++ b/Phase1Template/untitled/src/parsers/FunctionCraftLexer.tokens @@ -0,0 +1,124 @@ +DEF=1 +END=2 +MAIN=3 +PUTS=4 +PUSH=5 +LEN=6 +RETURN=7 +IF=8 +ELSE=9 +ELSEIF=10 +METHOD=11 +PATTERN=12 +MATCH=13 +LOOP=14 +FOR=15 +IN=16 +DO=17 +CHOP=18 +CHOMP=19 +PLUS=20 +MINUS=21 +MULT=22 +DIVIDE=23 +EQUAL=24 +NOT_EQUAL=25 +LESS_EQUAL_THAN=26 +GREATER_EQUAL_THAN=27 +GREATER_THAN=28 +LESS_THAN=29 +AND=30 +OR=31 +NOT=32 +INCREMENT=33 +DECREMENT=34 +PATTERN_MATCHING_SEPARATOR=35 +SEPARATOR=36 +APPEND=37 +TRUE=38 +FALSE=39 +BREAK=40 +NEXT=41 +ARROW=42 +PLUS_ASSIGN=43 +MINUS_ASSIGN=44 +MULT_ASSIGN=45 +DIVIDE_ASSIGN=46 +MOD_ASSIGN=47 +ASSIGN=48 +LPAR=49 +RPAR=50 +LBRACK=51 +RBRACK=52 +LBRACE=53 +RBRACE=54 +COMMA=55 +DOT=56 +DOUBLEDOT=57 +COLON=58 +SEMICOLLON=59 +INT_VALUE=60 +FLOAT_VALUE=61 +IDENTIFIER=62 +STRING_VALUE=63 +COMMENT=64 +WS=65 +'def'=1 +'end'=2 +'main'=3 +'puts'=4 +'push'=5 +'len'=6 +'return'=7 +'if'=8 +'else'=9 +'elseif'=10 +'method'=11 +'pattern'=12 +'match'=13 +'loop'=14 +'for'=15 +'in'=16 +'do'=17 +'chop'=18 +'chomp'=19 +'+'=20 +'-'=21 +'*'=22 +'/'=23 +'=='=24 +'!='=25 +'<='=26 +'>='=27 +'>'=28 +'<'=29 +'&&'=30 +'||'=31 +'!'=32 +'++'=33 +'--'=34 +' |'=35 +'|'=36 +'<<'=37 +'true'=38 +'false'=39 +'break'=40 +'next'=41 +'->'=42 +'+='=43 +'-='=44 +'*='=45 +'/='=46 +'%='=47 +'='=48 +'('=49 +')'=50 +'['=51 +']'=52 +'{'=53 +'}'=54 +','=55 +'.'=56 +'..'=57 +':'=58 +';'=59 diff --git a/Phase1Template/untitled/src/parsers/FunctionCraftListener.java b/Phase1Template/untitled/src/parsers/FunctionCraftListener.java new file mode 100644 index 0000000..b3efcdd --- /dev/null +++ b/Phase1Template/untitled/src/parsers/FunctionCraftListener.java @@ -0,0 +1,389 @@ +// Generated from U:/UT/6/PLC_TA/Design-Compiler-Course-Projects/Phase2Template/Phase2/src/main/grammer/FunctionCraft.g4 by ANTLR 4.13.1 +package /parsers; + + import main.ast.node.*; + import main.ast.node.declaration.*; + import main.ast.node.statement.*; + import main.ast.node.expression.*; + import main.ast.node.expression.operators.*; + import main.ast.node.expression.value.*; + import main.ast.node.expression.primitive.*; + +import org.antlr.v4.runtime.tree.ParseTreeListener; + +/** + * This interface defines a complete listener for a parse tree produced by + * {@link FunctionCraftParser}. + */ +public interface FunctionCraftListener extends ParseTreeListener { + /** + * Enter a parse tree produced by {@link FunctionCraftParser#program}. + * @param ctx the parse tree + */ + void enterProgram(FunctionCraftParser.ProgramContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#program}. + * @param ctx the parse tree + */ + void exitProgram(FunctionCraftParser.ProgramContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#functionDeclaration}. + * @param ctx the parse tree + */ + void enterFunctionDeclaration(FunctionCraftParser.FunctionDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#functionDeclaration}. + * @param ctx the parse tree + */ + void exitFunctionDeclaration(FunctionCraftParser.FunctionDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#functionArgumentsDeclaration}. + * @param ctx the parse tree + */ + void enterFunctionArgumentsDeclaration(FunctionCraftParser.FunctionArgumentsDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#functionArgumentsDeclaration}. + * @param ctx the parse tree + */ + void exitFunctionArgumentsDeclaration(FunctionCraftParser.FunctionArgumentsDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#patternMatching}. + * @param ctx the parse tree + */ + void enterPatternMatching(FunctionCraftParser.PatternMatchingContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#patternMatching}. + * @param ctx the parse tree + */ + void exitPatternMatching(FunctionCraftParser.PatternMatchingContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#main}. + * @param ctx the parse tree + */ + void enterMain(FunctionCraftParser.MainContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#main}. + * @param ctx the parse tree + */ + void exitMain(FunctionCraftParser.MainContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#functionArguments}. + * @param ctx the parse tree + */ + void enterFunctionArguments(FunctionCraftParser.FunctionArgumentsContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#functionArguments}. + * @param ctx the parse tree + */ + void exitFunctionArguments(FunctionCraftParser.FunctionArgumentsContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#returnStatement}. + * @param ctx the parse tree + */ + void enterReturnStatement(FunctionCraftParser.ReturnStatementContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#returnStatement}. + * @param ctx the parse tree + */ + void exitReturnStatement(FunctionCraftParser.ReturnStatementContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#ifStatement}. + * @param ctx the parse tree + */ + void enterIfStatement(FunctionCraftParser.IfStatementContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#ifStatement}. + * @param ctx the parse tree + */ + void exitIfStatement(FunctionCraftParser.IfStatementContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#condition}. + * @param ctx the parse tree + */ + void enterCondition(FunctionCraftParser.ConditionContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#condition}. + * @param ctx the parse tree + */ + void exitCondition(FunctionCraftParser.ConditionContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#putsStatement}. + * @param ctx the parse tree + */ + void enterPutsStatement(FunctionCraftParser.PutsStatementContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#putsStatement}. + * @param ctx the parse tree + */ + void exitPutsStatement(FunctionCraftParser.PutsStatementContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#lenStatement}. + * @param ctx the parse tree + */ + void enterLenStatement(FunctionCraftParser.LenStatementContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#lenStatement}. + * @param ctx the parse tree + */ + void exitLenStatement(FunctionCraftParser.LenStatementContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#pushStatement}. + * @param ctx the parse tree + */ + void enterPushStatement(FunctionCraftParser.PushStatementContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#pushStatement}. + * @param ctx the parse tree + */ + void exitPushStatement(FunctionCraftParser.PushStatementContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#loopDoStatement}. + * @param ctx the parse tree + */ + void enterLoopDoStatement(FunctionCraftParser.LoopDoStatementContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#loopDoStatement}. + * @param ctx the parse tree + */ + void exitLoopDoStatement(FunctionCraftParser.LoopDoStatementContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#loopBody}. + * @param ctx the parse tree + */ + void enterLoopBody(FunctionCraftParser.LoopBodyContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#loopBody}. + * @param ctx the parse tree + */ + void exitLoopBody(FunctionCraftParser.LoopBodyContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#forStatement}. + * @param ctx the parse tree + */ + void enterForStatement(FunctionCraftParser.ForStatementContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#forStatement}. + * @param ctx the parse tree + */ + void exitForStatement(FunctionCraftParser.ForStatementContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#range}. + * @param ctx the parse tree + */ + void enterRange(FunctionCraftParser.RangeContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#range}. + * @param ctx the parse tree + */ + void exitRange(FunctionCraftParser.RangeContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#filterStatement}. + * @param ctx the parse tree + */ + void enterFilterStatement(FunctionCraftParser.FilterStatementContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#filterStatement}. + * @param ctx the parse tree + */ + void exitFilterStatement(FunctionCraftParser.FilterStatementContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#matchPatternStatement}. + * @param ctx the parse tree + */ + void enterMatchPatternStatement(FunctionCraftParser.MatchPatternStatementContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#matchPatternStatement}. + * @param ctx the parse tree + */ + void exitMatchPatternStatement(FunctionCraftParser.MatchPatternStatementContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#chopStatement}. + * @param ctx the parse tree + */ + void enterChopStatement(FunctionCraftParser.ChopStatementContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#chopStatement}. + * @param ctx the parse tree + */ + void exitChopStatement(FunctionCraftParser.ChopStatementContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#chompStatement}. + * @param ctx the parse tree + */ + void enterChompStatement(FunctionCraftParser.ChompStatementContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#chompStatement}. + * @param ctx the parse tree + */ + void exitChompStatement(FunctionCraftParser.ChompStatementContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#assignment}. + * @param ctx the parse tree + */ + void enterAssignment(FunctionCraftParser.AssignmentContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#assignment}. + * @param ctx the parse tree + */ + void exitAssignment(FunctionCraftParser.AssignmentContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#accessList}. + * @param ctx the parse tree + */ + void enterAccessList(FunctionCraftParser.AccessListContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#accessList}. + * @param ctx the parse tree + */ + void exitAccessList(FunctionCraftParser.AccessListContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#statement}. + * @param ctx the parse tree + */ + void enterStatement(FunctionCraftParser.StatementContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#statement}. + * @param ctx the parse tree + */ + void exitStatement(FunctionCraftParser.StatementContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#body}. + * @param ctx the parse tree + */ + void enterBody(FunctionCraftParser.BodyContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#body}. + * @param ctx the parse tree + */ + void exitBody(FunctionCraftParser.BodyContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#expression}. + * @param ctx the parse tree + */ + void enterExpression(FunctionCraftParser.ExpressionContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#expression}. + * @param ctx the parse tree + */ + void exitExpression(FunctionCraftParser.ExpressionContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#eqaulityExpression}. + * @param ctx the parse tree + */ + void enterEqaulityExpression(FunctionCraftParser.EqaulityExpressionContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#eqaulityExpression}. + * @param ctx the parse tree + */ + void exitEqaulityExpression(FunctionCraftParser.EqaulityExpressionContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#relationalExpression}. + * @param ctx the parse tree + */ + void enterRelationalExpression(FunctionCraftParser.RelationalExpressionContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#relationalExpression}. + * @param ctx the parse tree + */ + void exitRelationalExpression(FunctionCraftParser.RelationalExpressionContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#additiveExpression}. + * @param ctx the parse tree + */ + void enterAdditiveExpression(FunctionCraftParser.AdditiveExpressionContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#additiveExpression}. + * @param ctx the parse tree + */ + void exitAdditiveExpression(FunctionCraftParser.AdditiveExpressionContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#multiplicativeExpression}. + * @param ctx the parse tree + */ + void enterMultiplicativeExpression(FunctionCraftParser.MultiplicativeExpressionContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#multiplicativeExpression}. + * @param ctx the parse tree + */ + void exitMultiplicativeExpression(FunctionCraftParser.MultiplicativeExpressionContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#preUnaryExpression}. + * @param ctx the parse tree + */ + void enterPreUnaryExpression(FunctionCraftParser.PreUnaryExpressionContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#preUnaryExpression}. + * @param ctx the parse tree + */ + void exitPreUnaryExpression(FunctionCraftParser.PreUnaryExpressionContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#accessExpression}. + * @param ctx the parse tree + */ + void enterAccessExpression(FunctionCraftParser.AccessExpressionContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#accessExpression}. + * @param ctx the parse tree + */ + void exitAccessExpression(FunctionCraftParser.AccessExpressionContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#otherExpression}. + * @param ctx the parse tree + */ + void enterOtherExpression(FunctionCraftParser.OtherExpressionContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#otherExpression}. + * @param ctx the parse tree + */ + void exitOtherExpression(FunctionCraftParser.OtherExpressionContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#lambdaFunction}. + * @param ctx the parse tree + */ + void enterLambdaFunction(FunctionCraftParser.LambdaFunctionContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#lambdaFunction}. + * @param ctx the parse tree + */ + void exitLambdaFunction(FunctionCraftParser.LambdaFunctionContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#values}. + * @param ctx the parse tree + */ + void enterValues(FunctionCraftParser.ValuesContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#values}. + * @param ctx the parse tree + */ + void exitValues(FunctionCraftParser.ValuesContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#listValue}. + * @param ctx the parse tree + */ + void enterListValue(FunctionCraftParser.ListValueContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#listValue}. + * @param ctx the parse tree + */ + void exitListValue(FunctionCraftParser.ListValueContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#boolValue}. + * @param ctx the parse tree + */ + void enterBoolValue(FunctionCraftParser.BoolValueContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#boolValue}. + * @param ctx the parse tree + */ + void exitBoolValue(FunctionCraftParser.BoolValueContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#functionPointer}. + * @param ctx the parse tree + */ + void enterFunctionPointer(FunctionCraftParser.FunctionPointerContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#functionPointer}. + * @param ctx the parse tree + */ + void exitFunctionPointer(FunctionCraftParser.FunctionPointerContext ctx); +} \ No newline at end of file diff --git a/Phase1Template/untitled/src/parsers/FunctionCraftParser.java b/Phase1Template/untitled/src/parsers/FunctionCraftParser.java new file mode 100644 index 0000000..6ee277f --- /dev/null +++ b/Phase1Template/untitled/src/parsers/FunctionCraftParser.java @@ -0,0 +1,4363 @@ +// Generated from U:/UT/6/PLC_TA/Design-Compiler-Course-Projects/Phase2Template/Phase2/src/main/grammer/FunctionCraft.g4 by ANTLR 4.13.1 +package /parsers; + + import main.ast.node.*; + import main.ast.node.declaration.*; + import main.ast.node.statement.*; + import main.ast.node.expression.*; + import main.ast.node.expression.operators.*; + import main.ast.node.expression.value.*; + import main.ast.node.expression.primitive.*; + +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.misc.*; +import org.antlr.v4.runtime.tree.*; +import java.util.List; +import java.util.Iterator; +import java.util.ArrayList; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast", "CheckReturnValue"}) +public class FunctionCraftParser extends Parser { + static { RuntimeMetaData.checkVersion("4.13.1", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + DEF=1, END=2, MAIN=3, PUTS=4, PUSH=5, LEN=6, RETURN=7, IF=8, ELSE=9, ELSEIF=10, + METHOD=11, PATTERN=12, MATCH=13, LOOP=14, FOR=15, IN=16, DO=17, CHOP=18, + CHOMP=19, PLUS=20, MINUS=21, MULT=22, DIVIDE=23, EQUAL=24, NOT_EQUAL=25, + LESS_EQUAL_THAN=26, GREATER_EQUAL_THAN=27, GREATER_THAN=28, LESS_THAN=29, + AND=30, OR=31, NOT=32, INCREMENT=33, DECREMENT=34, PATTERN_MATCHING_SEPARATOR=35, + SEPARATOR=36, APPEND=37, TRUE=38, FALSE=39, BREAK=40, NEXT=41, ARROW=42, + PLUS_ASSIGN=43, MINUS_ASSIGN=44, MULT_ASSIGN=45, DIVIDE_ASSIGN=46, MOD_ASSIGN=47, + ASSIGN=48, LPAR=49, RPAR=50, LBRACK=51, RBRACK=52, LBRACE=53, RBRACE=54, + COMMA=55, DOT=56, DOUBLEDOT=57, COLON=58, SEMICOLLON=59, INT_VALUE=60, + FLOAT_VALUE=61, IDENTIFIER=62, STRING_VALUE=63, COMMENT=64, WS=65; + public static final int + RULE_program = 0, RULE_functionDeclaration = 1, RULE_functionArgumentsDeclaration = 2, + RULE_patternMatching = 3, RULE_main = 4, RULE_functionArguments = 5, RULE_returnStatement = 6, + RULE_ifStatement = 7, RULE_condition = 8, RULE_putsStatement = 9, RULE_lenStatement = 10, + RULE_pushStatement = 11, RULE_loopDoStatement = 12, RULE_loopBody = 13, + RULE_forStatement = 14, RULE_range = 15, RULE_filterStatement = 16, RULE_matchPatternStatement = 17, + RULE_chopStatement = 18, RULE_chompStatement = 19, RULE_assignment = 20, + RULE_accessList = 21, RULE_statement = 22, RULE_body = 23, RULE_expression = 24, + RULE_eqaulityExpression = 25, RULE_relationalExpression = 26, RULE_additiveExpression = 27, + RULE_multiplicativeExpression = 28, RULE_preUnaryExpression = 29, RULE_accessExpression = 30, + RULE_otherExpression = 31, RULE_lambdaFunction = 32, RULE_values = 33, + RULE_listValue = 34, RULE_boolValue = 35, RULE_functionPointer = 36; + private static String[] makeRuleNames() { + return new String[] { + "program", "functionDeclaration", "functionArgumentsDeclaration", "patternMatching", + "main", "functionArguments", "returnStatement", "ifStatement", "condition", + "putsStatement", "lenStatement", "pushStatement", "loopDoStatement", + "loopBody", "forStatement", "range", "filterStatement", "matchPatternStatement", + "chopStatement", "chompStatement", "assignment", "accessList", "statement", + "body", "expression", "eqaulityExpression", "relationalExpression", "additiveExpression", + "multiplicativeExpression", "preUnaryExpression", "accessExpression", + "otherExpression", "lambdaFunction", "values", "listValue", "boolValue", + "functionPointer" + }; + } + public static final String[] ruleNames = makeRuleNames(); + + private static String[] makeLiteralNames() { + return new String[] { + null, "'def'", "'end'", "'main'", "'puts'", "'push'", "'len'", "'return'", + "'if'", "'else'", "'elseif'", "'method'", "'pattern'", "'match'", "'loop'", + "'for'", "'in'", "'do'", "'chop'", "'chomp'", "'+'", "'-'", "'*'", "'/'", + "'=='", "'!='", "'<='", "'>='", "'>'", "'<'", "'&&'", "'||'", "'!'", + "'++'", "'--'", "' |'", "'|'", "'<<'", "'true'", "'false'", "'break'", + "'next'", "'->'", "'+='", "'-='", "'*='", "'/='", "'%='", "'='", "'('", + "')'", "'['", "']'", "'{'", "'}'", "','", "'.'", "'..'", "':'", "';'" + }; + } + private static final String[] _LITERAL_NAMES = makeLiteralNames(); + private static String[] makeSymbolicNames() { + return new String[] { + null, "DEF", "END", "MAIN", "PUTS", "PUSH", "LEN", "RETURN", "IF", "ELSE", + "ELSEIF", "METHOD", "PATTERN", "MATCH", "LOOP", "FOR", "IN", "DO", "CHOP", + "CHOMP", "PLUS", "MINUS", "MULT", "DIVIDE", "EQUAL", "NOT_EQUAL", "LESS_EQUAL_THAN", + "GREATER_EQUAL_THAN", "GREATER_THAN", "LESS_THAN", "AND", "OR", "NOT", + "INCREMENT", "DECREMENT", "PATTERN_MATCHING_SEPARATOR", "SEPARATOR", + "APPEND", "TRUE", "FALSE", "BREAK", "NEXT", "ARROW", "PLUS_ASSIGN", "MINUS_ASSIGN", + "MULT_ASSIGN", "DIVIDE_ASSIGN", "MOD_ASSIGN", "ASSIGN", "LPAR", "RPAR", + "LBRACK", "RBRACK", "LBRACE", "RBRACE", "COMMA", "DOT", "DOUBLEDOT", + "COLON", "SEMICOLLON", "INT_VALUE", "FLOAT_VALUE", "IDENTIFIER", "STRING_VALUE", + "COMMENT", "WS" + }; + } + private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames(); + public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); + + /** + * @deprecated Use {@link #VOCABULARY} instead. + */ + @Deprecated + public static final String[] tokenNames; + static { + tokenNames = new String[_SYMBOLIC_NAMES.length]; + for (int i = 0; i < tokenNames.length; i++) { + tokenNames[i] = VOCABULARY.getLiteralName(i); + if (tokenNames[i] == null) { + tokenNames[i] = VOCABULARY.getSymbolicName(i); + } + + if (tokenNames[i] == null) { + tokenNames[i] = ""; + } + } + } + + @Override + @Deprecated + public String[] getTokenNames() { + return tokenNames; + } + + @Override + + public Vocabulary getVocabulary() { + return VOCABULARY; + } + + @Override + public String getGrammarFileName() { return "FunctionCraft.g4"; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public ATN getATN() { return _ATN; } + + public FunctionCraftParser(TokenStream input) { + super(input); + _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + + @SuppressWarnings("CheckReturnValue") + public static class ProgramContext extends ParserRuleContext { + public Program flProgram; + public FunctionDeclarationContext f; + public PatternMatchingContext p; + public MainContext m; + public MainContext main() { + return getRuleContext(MainContext.class,0); + } + public List functionDeclaration() { + return getRuleContexts(FunctionDeclarationContext.class); + } + public FunctionDeclarationContext functionDeclaration(int i) { + return getRuleContext(FunctionDeclarationContext.class,i); + } + public List patternMatching() { + return getRuleContexts(PatternMatchingContext.class); + } + public PatternMatchingContext patternMatching(int i) { + return getRuleContext(PatternMatchingContext.class,i); + } + public ProgramContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_program; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterProgram(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitProgram(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitProgram(this); + else return visitor.visitChildren(this); + } + } + + public final ProgramContext program() throws RecognitionException { + ProgramContext _localctx = new ProgramContext(_ctx, getState()); + enterRule(_localctx, 0, RULE_program); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + + ((ProgramContext)_localctx).flProgram = new Program(); + _localctx.flProgram.setLine(1); + + setState(83); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,1,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + setState(81); + _errHandler.sync(this); + switch (_input.LA(1)) { + case DEF: + { + setState(75); + ((ProgramContext)_localctx).f = functionDeclaration(); + _localctx.flProgram.addFunctionDeclaration(((ProgramContext)_localctx).f.functionDeclarationRet); + } + break; + case PATTERN: + { + setState(78); + ((ProgramContext)_localctx).p = patternMatching(); + _localctx.flProgram.addPatternDeclaration(((ProgramContext)_localctx).p.patternRet); + } + break; + default: + throw new NoViableAltException(this); + } + } + } + setState(85); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,1,_ctx); + } + setState(86); + ((ProgramContext)_localctx).m = main(); + _localctx.flProgram.setMain(((ProgramContext)_localctx).m.mainRet); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class FunctionDeclarationContext extends ParserRuleContext { + public FunctionDeclaration functionDeclarationRet; + public Token def; + public Token id; + public FunctionArgumentsDeclarationContext f; + public BodyContext b; + public TerminalNode END() { return getToken(FunctionCraftParser.END, 0); } + public TerminalNode DEF() { return getToken(FunctionCraftParser.DEF, 0); } + public TerminalNode IDENTIFIER() { return getToken(FunctionCraftParser.IDENTIFIER, 0); } + public FunctionArgumentsDeclarationContext functionArgumentsDeclaration() { + return getRuleContext(FunctionArgumentsDeclarationContext.class,0); + } + public BodyContext body() { + return getRuleContext(BodyContext.class,0); + } + public FunctionDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_functionDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterFunctionDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitFunctionDeclaration(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitFunctionDeclaration(this); + else return visitor.visitChildren(this); + } + } + + public final FunctionDeclarationContext functionDeclaration() throws RecognitionException { + FunctionDeclarationContext _localctx = new FunctionDeclarationContext(_ctx, getState()); + enterRule(_localctx, 2, RULE_functionDeclaration); + try { + enterOuterAlt(_localctx, 1); + { + + ((FunctionDeclarationContext)_localctx).functionDeclarationRet = new FunctionDeclaration(); + + setState(90); + ((FunctionDeclarationContext)_localctx).def = match(DEF); + _localctx.functionDeclarationRet.setLine((((FunctionDeclarationContext)_localctx).def!=null?((FunctionDeclarationContext)_localctx).def.getLine():0)); + setState(92); + ((FunctionDeclarationContext)_localctx).id = match(IDENTIFIER); + + Identifier id_ = new Identifier((((FunctionDeclarationContext)_localctx).id!=null?((FunctionDeclarationContext)_localctx).id.getText():null)); + id_.setLine((((FunctionDeclarationContext)_localctx).id!=null?((FunctionDeclarationContext)_localctx).id.getLine():0)); + _localctx.functionDeclarationRet.setFunctionName(id_); + + setState(94); + ((FunctionDeclarationContext)_localctx).f = functionArgumentsDeclaration(); + _localctx.functionDeclarationRet.setArgs(((FunctionDeclarationContext)_localctx).f.argRet); + setState(96); + ((FunctionDeclarationContext)_localctx).b = body(); + _localctx.functionDeclarationRet.setBody(((FunctionDeclarationContext)_localctx).b.bodyRet); + setState(98); + match(END); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class FunctionArgumentsDeclarationContext extends ParserRuleContext { + public ArrayList argRet; + public Token id1; + public Token id2; + public Token id3; + public ExpressionContext e1; + public Token id4; + public ExpressionContext e2; + public TerminalNode LPAR() { return getToken(FunctionCraftParser.LPAR, 0); } + public TerminalNode RPAR() { return getToken(FunctionCraftParser.RPAR, 0); } + public List IDENTIFIER() { return getTokens(FunctionCraftParser.IDENTIFIER); } + public TerminalNode IDENTIFIER(int i) { + return getToken(FunctionCraftParser.IDENTIFIER, i); + } + public List COMMA() { return getTokens(FunctionCraftParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(FunctionCraftParser.COMMA, i); + } + public TerminalNode LBRACK() { return getToken(FunctionCraftParser.LBRACK, 0); } + public List ASSIGN() { return getTokens(FunctionCraftParser.ASSIGN); } + public TerminalNode ASSIGN(int i) { + return getToken(FunctionCraftParser.ASSIGN, i); + } + public TerminalNode RBRACK() { return getToken(FunctionCraftParser.RBRACK, 0); } + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public FunctionArgumentsDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_functionArgumentsDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterFunctionArgumentsDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitFunctionArgumentsDeclaration(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitFunctionArgumentsDeclaration(this); + else return visitor.visitChildren(this); + } + } + + public final FunctionArgumentsDeclarationContext functionArgumentsDeclaration() throws RecognitionException { + FunctionArgumentsDeclarationContext _localctx = new FunctionArgumentsDeclarationContext(_ctx, getState()); + enterRule(_localctx, 4, RULE_functionArgumentsDeclaration); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + + ((FunctionArgumentsDeclarationContext)_localctx).argRet = new ArrayList(); + + setState(101); + match(LPAR); + setState(135); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==IDENTIFIER) { + { + setState(102); + ((FunctionArgumentsDeclarationContext)_localctx).id1 = match(IDENTIFIER); + + Identifier id_ = new Identifier(id1.text); + id_.setLine((((FunctionArgumentsDeclarationContext)_localctx).id1!=null?((FunctionArgumentsDeclarationContext)_localctx).id1.getLine():0)); + VarDeclaration = newVarDec(id_); + _localctx.argRet.add(newVarDec); + + setState(109); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,2,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(104); + match(COMMA); + setState(105); + ((FunctionArgumentsDeclarationContext)_localctx).id2 = match(IDENTIFIER); + + Identifier id_ = new Identifier(id2.text); + id_.setLine((((FunctionArgumentsDeclarationContext)_localctx).id2!=null?((FunctionArgumentsDeclarationContext)_localctx).id2.getLine():0)); + VarDeclaration = newVarDec(id_); + _localctx.argRet.add(newVarDec); + + } + } + } + setState(111); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,2,_ctx); + } + setState(133); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(112); + match(COMMA); + setState(113); + match(LBRACK); + setState(114); + ((FunctionArgumentsDeclarationContext)_localctx).id3 = match(IDENTIFIER); + + Identifier id_ = new Identifier(id3.text); + id_.setLine((((FunctionArgumentsDeclarationContext)_localctx).id3!=null?((FunctionArgumentsDeclarationContext)_localctx).id3.getLine():0)); + VarDeclaration = newVarDec(id_); + + setState(116); + match(ASSIGN); + setState(117); + ((FunctionArgumentsDeclarationContext)_localctx).e1 = expression(0); + + newVarDec.setDefaultVal(e1.expRet); + _localctx.argRet.add(newVarDec); + + setState(128); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(119); + match(COMMA); + setState(120); + ((FunctionArgumentsDeclarationContext)_localctx).id4 = match(IDENTIFIER); + + Identifier id_ = new Identifier(id4.text); + id_.setLine((((FunctionArgumentsDeclarationContext)_localctx).id4!=null?((FunctionArgumentsDeclarationContext)_localctx).id4.getLine():0)); + VarDeclaration = newVarDec(id_); + + setState(122); + match(ASSIGN); + setState(123); + ((FunctionArgumentsDeclarationContext)_localctx).e2 = expression(0); + + newVarDec.setDefaultVal(e2.expRet); + _localctx.argRet.add(newVarDec); + + } + } + setState(130); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(131); + match(RBRACK); + } + } + + } + } + + setState(137); + match(RPAR); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class PatternMatchingContext extends ParserRuleContext { + public PatternDeclaration patternRet; + public Token pat; + public Token patternName; + public Token targetVar; + public ConditionContext c; + public ExpressionContext e; + public TerminalNode LPAR() { return getToken(FunctionCraftParser.LPAR, 0); } + public TerminalNode RPAR() { return getToken(FunctionCraftParser.RPAR, 0); } + public TerminalNode SEMICOLLON() { return getToken(FunctionCraftParser.SEMICOLLON, 0); } + public TerminalNode PATTERN() { return getToken(FunctionCraftParser.PATTERN, 0); } + public List IDENTIFIER() { return getTokens(FunctionCraftParser.IDENTIFIER); } + public TerminalNode IDENTIFIER(int i) { + return getToken(FunctionCraftParser.IDENTIFIER, i); + } + public List PATTERN_MATCHING_SEPARATOR() { return getTokens(FunctionCraftParser.PATTERN_MATCHING_SEPARATOR); } + public TerminalNode PATTERN_MATCHING_SEPARATOR(int i) { + return getToken(FunctionCraftParser.PATTERN_MATCHING_SEPARATOR, i); + } + public List ASSIGN() { return getTokens(FunctionCraftParser.ASSIGN); } + public TerminalNode ASSIGN(int i) { + return getToken(FunctionCraftParser.ASSIGN, i); + } + public List condition() { + return getRuleContexts(ConditionContext.class); + } + public ConditionContext condition(int i) { + return getRuleContext(ConditionContext.class,i); + } + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public PatternMatchingContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_patternMatching; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterPatternMatching(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitPatternMatching(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitPatternMatching(this); + else return visitor.visitChildren(this); + } + } + + public final PatternMatchingContext patternMatching() throws RecognitionException { + PatternMatchingContext _localctx = new PatternMatchingContext(_ctx, getState()); + enterRule(_localctx, 6, RULE_patternMatching); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(139); + ((PatternMatchingContext)_localctx).pat = match(PATTERN); + + int patternLine = (((PatternMatchingContext)_localctx).pat!=null?((PatternMatchingContext)_localctx).pat.getLine():0); + + setState(141); + ((PatternMatchingContext)_localctx).patternName = match(IDENTIFIER); + + Identifier patternNameId = new Identifier((((PatternMatchingContext)_localctx).patternName!=null?((PatternMatchingContext)_localctx).patternName.getText():null)); + patternNameId.setLine((((PatternMatchingContext)_localctx).patternName!=null?((PatternMatchingContext)_localctx).patternName.getLine():0)); + + setState(143); + match(LPAR); + setState(144); + ((PatternMatchingContext)_localctx).targetVar = match(IDENTIFIER); + + Identifier targetVariable = new Identifier((((PatternMatchingContext)_localctx).targetVar!=null?((PatternMatchingContext)_localctx).targetVar.getText():null)); + targetVariable.setLine((((PatternMatchingContext)_localctx).targetVar!=null?((PatternMatchingContext)_localctx).targetVar.getLine():0)); + ((PatternMatchingContext)_localctx).patternRet = new PatternDeclaration(patternNameId, targetVariable); + _localctx.patternRet.setLine(patternLine); + + setState(146); + match(RPAR); + setState(156); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==PATTERN_MATCHING_SEPARATOR) { + { + { + setState(147); + match(PATTERN_MATCHING_SEPARATOR); + setState(148); + ((PatternMatchingContext)_localctx).c = condition(); + + _localctx.patternRet.setConditions(((PatternMatchingContext)_localctx).c.conditionRet); + + setState(150); + match(ASSIGN); + setState(151); + ((PatternMatchingContext)_localctx).e = expression(0); + + _localctx.patternRet.addReturnExp(((PatternMatchingContext)_localctx).e.expRet); + + } + } + setState(158); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(159); + match(SEMICOLLON); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class MainContext extends ParserRuleContext { + public MainDeclaration mainRet; + public Token m; + public BodyContext b; + public TerminalNode DEF() { return getToken(FunctionCraftParser.DEF, 0); } + public TerminalNode LPAR() { return getToken(FunctionCraftParser.LPAR, 0); } + public TerminalNode RPAR() { return getToken(FunctionCraftParser.RPAR, 0); } + public TerminalNode END() { return getToken(FunctionCraftParser.END, 0); } + public TerminalNode MAIN() { return getToken(FunctionCraftParser.MAIN, 0); } + public BodyContext body() { + return getRuleContext(BodyContext.class,0); + } + public MainContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_main; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterMain(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitMain(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitMain(this); + else return visitor.visitChildren(this); + } + } + + public final MainContext main() throws RecognitionException { + MainContext _localctx = new MainContext(_ctx, getState()); + enterRule(_localctx, 8, RULE_main); + try { + enterOuterAlt(_localctx, 1); + { + + ((MainContext)_localctx).mainRet = new MainDeclaration(); + + setState(162); + match(DEF); + setState(163); + ((MainContext)_localctx).m = match(MAIN); + + _localctx.mainRet.setLine((((MainContext)_localctx).m!=null?((MainContext)_localctx).m.getLine():0)); + + setState(165); + match(LPAR); + setState(166); + match(RPAR); + setState(167); + ((MainContext)_localctx).b = body(); + _localctx.mainRet.setBody(((MainContext)_localctx).b.bodyRet); + setState(169); + match(END); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class FunctionArgumentsContext extends ParserRuleContext { + public ArrayList funcArgsRet; + public ExpressionContext e1; + public ExpressionContext e2; + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public List COMMA() { return getTokens(FunctionCraftParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(FunctionCraftParser.COMMA, i); + } + public FunctionArgumentsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_functionArguments; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterFunctionArguments(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitFunctionArguments(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitFunctionArguments(this); + else return visitor.visitChildren(this); + } + } + + public final FunctionArgumentsContext functionArguments() throws RecognitionException { + FunctionArgumentsContext _localctx = new FunctionArgumentsContext(_ctx, getState()); + enterRule(_localctx, 10, RULE_functionArguments); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + + ((FunctionArgumentsContext)_localctx).funcArgsRet = new ArrayList(); + + setState(183); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,8,_ctx) ) { + case 1: + { + setState(172); + ((FunctionArgumentsContext)_localctx).e1 = expression(0); + + _localctx.funcArgsRet.add(((FunctionArgumentsContext)_localctx).e1.expRet); + + setState(180); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,7,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(174); + match(COMMA); + setState(175); + ((FunctionArgumentsContext)_localctx).e2 = expression(0); + + _localctx.funcArgsRet.add(((FunctionArgumentsContext)_localctx).e2.expRet); + + } + } + } + setState(182); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,7,_ctx); + } + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class ReturnStatementContext extends ParserRuleContext { + public ReturnStatement returnStmtRet; + public ExpressionContext e; + public TerminalNode RETURN() { return getToken(FunctionCraftParser.RETURN, 0); } + public TerminalNode SEMICOLLON() { return getToken(FunctionCraftParser.SEMICOLLON, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public ReturnStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_returnStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterReturnStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitReturnStatement(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitReturnStatement(this); + else return visitor.visitChildren(this); + } + } + + public final ReturnStatementContext returnStatement() throws RecognitionException { + ReturnStatementContext _localctx = new ReturnStatementContext(_ctx, getState()); + enterRule(_localctx, 12, RULE_returnStatement); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + + ((ReturnStatementContext)_localctx).returnStmtRet = new ReturnStatement(); + + setState(186); + match(RETURN); + setState(190); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & -1150101502091851712L) != 0)) { + { + setState(187); + ((ReturnStatementContext)_localctx).e = expression(0); + _localctx.returnStmtRet.setReturnExp(e.expRet); + } + } + + setState(192); + match(SEMICOLLON); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class IfStatementContext extends ParserRuleContext { + public IfStatement ifRet; + public Token if_; + public ConditionContext c1; + public BodyContext b; + public ConditionContext c2; + public BodyContext b1; + public BodyContext b2; + public TerminalNode END() { return getToken(FunctionCraftParser.END, 0); } + public TerminalNode IF() { return getToken(FunctionCraftParser.IF, 0); } + public List condition() { + return getRuleContexts(ConditionContext.class); + } + public ConditionContext condition(int i) { + return getRuleContext(ConditionContext.class,i); + } + public List body() { + return getRuleContexts(BodyContext.class); + } + public BodyContext body(int i) { + return getRuleContext(BodyContext.class,i); + } + public List ELSEIF() { return getTokens(FunctionCraftParser.ELSEIF); } + public TerminalNode ELSEIF(int i) { + return getToken(FunctionCraftParser.ELSEIF, i); + } + public TerminalNode ELSE() { return getToken(FunctionCraftParser.ELSE, 0); } + public IfStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_ifStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterIfStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitIfStatement(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitIfStatement(this); + else return visitor.visitChildren(this); + } + } + + public final IfStatementContext ifStatement() throws RecognitionException { + IfStatementContext _localctx = new IfStatementContext(_ctx, getState()); + enterRule(_localctx, 14, RULE_ifStatement); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + + ((IfStatementContext)_localctx).ifRet = new IfStatement(); + + setState(195); + ((IfStatementContext)_localctx).if_ = match(IF); + + _localctx.ifRet.setLine((((IfStatementContext)_localctx).if!=null?((IfStatementContext)_localctx).if.getLine():0)); + + setState(197); + ((IfStatementContext)_localctx).c1 = condition(); + _localctx.ifRet.addCondition(((IfStatementContext)_localctx).c1.conditionRet); + setState(199); + ((IfStatementContext)_localctx).b = body(); + _localctx.ifRet.setThenBody(((IfStatementContext)_localctx).b.bodyRet); + + ArrayList tempArray = new ArrayList(); + + setState(210); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==ELSEIF) { + { + { + setState(202); + match(ELSEIF); + setState(203); + ((IfStatementContext)_localctx).c2 = condition(); + + _localctx.ifRet.addCondition(((IfStatementContext)_localctx).c2.conditionRet); + + setState(205); + ((IfStatementContext)_localctx).b1 = body(); + + tempArray.addAll(((IfStatementContext)_localctx).b1.bodyRet); + + } + } + setState(212); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(217); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==ELSE) { + { + setState(213); + match(ELSE); + setState(214); + ((IfStatementContext)_localctx).b2 = body(); + + tempArray.addAll(((IfStatementContext)_localctx).b2.bodyRet); + + } + } + + + _localctx.ifRet.setElseBody(tempArray); + + setState(220); + match(END); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class ConditionContext extends ParserRuleContext { + public ArrayList conditionRet; + public ExpressionContext e; + public ConditionContext c; + public List LPAR() { return getTokens(FunctionCraftParser.LPAR); } + public TerminalNode LPAR(int i) { + return getToken(FunctionCraftParser.LPAR, i); + } + public List RPAR() { return getTokens(FunctionCraftParser.RPAR); } + public TerminalNode RPAR(int i) { + return getToken(FunctionCraftParser.RPAR, i); + } + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public List AND() { return getTokens(FunctionCraftParser.AND); } + public TerminalNode AND(int i) { + return getToken(FunctionCraftParser.AND, i); + } + public List OR() { return getTokens(FunctionCraftParser.OR); } + public TerminalNode OR(int i) { + return getToken(FunctionCraftParser.OR, i); + } + public List condition() { + return getRuleContexts(ConditionContext.class); + } + public ConditionContext condition(int i) { + return getRuleContext(ConditionContext.class,i); + } + public ConditionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_condition; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterCondition(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitCondition(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitCondition(this); + else return visitor.visitChildren(this); + } + } + + public final ConditionContext condition() throws RecognitionException { + ConditionContext _localctx = new ConditionContext(_ctx, getState()); + enterRule(_localctx, 16, RULE_condition); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + + ((ConditionContext)_localctx).conditionRet = new ArrayList(); + + setState(243); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,15,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(223); + match(LPAR); + setState(224); + ((ConditionContext)_localctx).e = expression(0); + _localctx.conditionRet.add(((ConditionContext)_localctx).e.expRet); + setState(226); + match(RPAR); + setState(238); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,14,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(227); + _la = _input.LA(1); + if ( !(_la==AND || _la==OR) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(229); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,12,_ctx) ) { + case 1: + { + setState(228); + match(LPAR); + } + break; + } + setState(231); + ((ConditionContext)_localctx).c = condition(); + + _localctx.conditionRet.addAll(((ConditionContext)_localctx).c.conditionRet); + + setState(234); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,13,_ctx) ) { + case 1: + { + setState(233); + match(RPAR); + } + break; + } + } + } + } + setState(240); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,14,_ctx); + } + } + } + } + setState(245); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,15,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class PutsStatementContext extends ParserRuleContext { + public PutStatement putRet; + public Token p; + public ExpressionContext e; + public TerminalNode LPAR() { return getToken(FunctionCraftParser.LPAR, 0); } + public TerminalNode RPAR() { return getToken(FunctionCraftParser.RPAR, 0); } + public TerminalNode SEMICOLLON() { return getToken(FunctionCraftParser.SEMICOLLON, 0); } + public TerminalNode PUTS() { return getToken(FunctionCraftParser.PUTS, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public PutsStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_putsStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterPutsStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitPutsStatement(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitPutsStatement(this); + else return visitor.visitChildren(this); + } + } + + public final PutsStatementContext putsStatement() throws RecognitionException { + PutsStatementContext _localctx = new PutsStatementContext(_ctx, getState()); + enterRule(_localctx, 18, RULE_putsStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(246); + ((PutsStatementContext)_localctx).p = match(PUTS); + setState(247); + match(LPAR); + setState(248); + ((PutsStatementContext)_localctx).e = expression(0); + + ((PutsStatementContext)_localctx).putRet = new PutStatement(((PutsStatementContext)_localctx).e.expRet); + _localctx.putRet.setLine((((PutsStatementContext)_localctx).p!=null?((PutsStatementContext)_localctx).p.getLine():0)); + + setState(250); + match(RPAR); + setState(251); + match(SEMICOLLON); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class LenStatementContext extends ParserRuleContext { + public LenStatement lenRet; + public Token l; + public ExpressionContext e; + public TerminalNode LPAR() { return getToken(FunctionCraftParser.LPAR, 0); } + public TerminalNode RPAR() { return getToken(FunctionCraftParser.RPAR, 0); } + public TerminalNode LEN() { return getToken(FunctionCraftParser.LEN, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public LenStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_lenStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterLenStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitLenStatement(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitLenStatement(this); + else return visitor.visitChildren(this); + } + } + + public final LenStatementContext lenStatement() throws RecognitionException { + LenStatementContext _localctx = new LenStatementContext(_ctx, getState()); + enterRule(_localctx, 20, RULE_lenStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(253); + ((LenStatementContext)_localctx).l = match(LEN); + setState(254); + match(LPAR); + setState(255); + ((LenStatementContext)_localctx).e = expression(0); + + ((LenStatementContext)_localctx).lenRet = new LenStatement(((LenStatementContext)_localctx).e.expRet); + _localctx.lenRet.setLine((((LenStatementContext)_localctx).l!=null?((LenStatementContext)_localctx).l.getLine():0)); + + setState(257); + match(RPAR); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class PushStatementContext extends ParserRuleContext { + public PushStatement pushRet; + public Token p; + public ExpressionContext e1; + public ExpressionContext e2; + public TerminalNode LPAR() { return getToken(FunctionCraftParser.LPAR, 0); } + public TerminalNode COMMA() { return getToken(FunctionCraftParser.COMMA, 0); } + public TerminalNode RPAR() { return getToken(FunctionCraftParser.RPAR, 0); } + public TerminalNode SEMICOLLON() { return getToken(FunctionCraftParser.SEMICOLLON, 0); } + public TerminalNode PUSH() { return getToken(FunctionCraftParser.PUSH, 0); } + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public PushStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_pushStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterPushStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitPushStatement(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitPushStatement(this); + else return visitor.visitChildren(this); + } + } + + public final PushStatementContext pushStatement() throws RecognitionException { + PushStatementContext _localctx = new PushStatementContext(_ctx, getState()); + enterRule(_localctx, 22, RULE_pushStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(259); + ((PushStatementContext)_localctx).p = match(PUSH); + setState(260); + match(LPAR); + setState(261); + ((PushStatementContext)_localctx).e1 = expression(0); + setState(262); + match(COMMA); + setState(263); + ((PushStatementContext)_localctx).e2 = expression(0); + setState(264); + match(RPAR); + setState(265); + match(SEMICOLLON); + + ((PushStatementContext)_localctx).pushRet = new PushStatement(((PushStatementContext)_localctx).e1.expRet, ((PushStatementContext)_localctx).e2.expRet); + _localctx.pushRet.setLine((((PushStatementContext)_localctx).p!=null?((PushStatementContext)_localctx).p.getLine():0)); + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class LoopDoStatementContext extends ParserRuleContext { + public LoopDoStatement loopDoRet; + public Token l1; + public LoopBodyContext l2; + public TerminalNode DO() { return getToken(FunctionCraftParser.DO, 0); } + public TerminalNode END() { return getToken(FunctionCraftParser.END, 0); } + public TerminalNode LOOP() { return getToken(FunctionCraftParser.LOOP, 0); } + public LoopBodyContext loopBody() { + return getRuleContext(LoopBodyContext.class,0); + } + public LoopDoStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_loopDoStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterLoopDoStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitLoopDoStatement(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitLoopDoStatement(this); + else return visitor.visitChildren(this); + } + } + + public final LoopDoStatementContext loopDoStatement() throws RecognitionException { + LoopDoStatementContext _localctx = new LoopDoStatementContext(_ctx, getState()); + enterRule(_localctx, 24, RULE_loopDoStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(268); + ((LoopDoStatementContext)_localctx).l1 = match(LOOP); + setState(269); + match(DO); + setState(270); + ((LoopDoStatementContext)_localctx).l2 = loopBody(); + + ((LoopDoStatementContext)_localctx).loopDoRet = new LoopDoStatement(l2.loopStmts, l2.loopExps, l2.loopRetStmt); + _localctx.loopDoRet.setLine((((LoopDoStatementContext)_localctx).l1!=null?((LoopDoStatementContext)_localctx).l1.getLine():0)); + + setState(272); + match(END); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class LoopBodyContext extends ParserRuleContext { + public ArrayList loopStmts; + public ArrayList loopExps; + public ReturnStatement loopRetStmt; + public StatementContext s; + public ConditionContext c1; + public ConditionContext c2; + public ReturnStatementContext r; + public List BREAK() { return getTokens(FunctionCraftParser.BREAK); } + public TerminalNode BREAK(int i) { + return getToken(FunctionCraftParser.BREAK, i); + } + public List SEMICOLLON() { return getTokens(FunctionCraftParser.SEMICOLLON); } + public TerminalNode SEMICOLLON(int i) { + return getToken(FunctionCraftParser.SEMICOLLON, i); + } + public List NEXT() { return getTokens(FunctionCraftParser.NEXT); } + public TerminalNode NEXT(int i) { + return getToken(FunctionCraftParser.NEXT, i); + } + public List statement() { + return getRuleContexts(StatementContext.class); + } + public StatementContext statement(int i) { + return getRuleContext(StatementContext.class,i); + } + public ReturnStatementContext returnStatement() { + return getRuleContext(ReturnStatementContext.class,0); + } + public List IF() { return getTokens(FunctionCraftParser.IF); } + public TerminalNode IF(int i) { + return getToken(FunctionCraftParser.IF, i); + } + public List condition() { + return getRuleContexts(ConditionContext.class); + } + public ConditionContext condition(int i) { + return getRuleContext(ConditionContext.class,i); + } + public LoopBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_loopBody; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterLoopBody(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitLoopBody(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitLoopBody(this); + else return visitor.visitChildren(this); + } + } + + public final LoopBodyContext loopBody() throws RecognitionException { + LoopBodyContext _localctx = new LoopBodyContext(_ctx, getState()); + enterRule(_localctx, 26, RULE_loopBody); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + + ((LoopBodyContext)_localctx).loopStmts = new ArrayList(); + ((LoopBodyContext)_localctx).loopExps = new ArrayList(); + ((LoopBodyContext)_localctx).loopRetStmt = new ReturnStatement(); + + setState(296); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & -1150098203556918928L) != 0)) { + { + setState(294); + _errHandler.sync(this); + switch (_input.LA(1)) { + case PUTS: + case PUSH: + case LEN: + case IF: + case METHOD: + case LOOP: + case FOR: + case CHOP: + case CHOMP: + case MINUS: + case NOT: + case INCREMENT: + case DECREMENT: + case TRUE: + case FALSE: + case ARROW: + case LPAR: + case LBRACK: + case INT_VALUE: + case FLOAT_VALUE: + case IDENTIFIER: + case STRING_VALUE: + { + setState(275); + ((LoopBodyContext)_localctx).s = statement(); + _localctx.loopStmts.add(((LoopBodyContext)_localctx).s.stmtRet); + } + break; + case BREAK: + { + setState(278); + match(BREAK); + setState(283); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==IF) { + { + setState(279); + match(IF); + setState(280); + ((LoopBodyContext)_localctx).c1 = condition(); + _localctx.loopExps.addAll(((LoopBodyContext)_localctx).c1.conditionRet); + } + } + + setState(285); + match(SEMICOLLON); + } + break; + case NEXT: + { + setState(286); + match(NEXT); + setState(291); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==IF) { + { + setState(287); + match(IF); + setState(288); + ((LoopBodyContext)_localctx).c2 = condition(); + _localctx.loopExps.addAll(((LoopBodyContext)_localctx).c2.conditionRet); + } + } + + setState(293); + match(SEMICOLLON); + } + break; + default: + throw new NoViableAltException(this); + } + } + setState(298); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(302); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==RETURN) { + { + setState(299); + ((LoopBodyContext)_localctx).r = returnStatement(); + ((LoopBodyContext)_localctx).loopRetStmt = ((LoopBodyContext)_localctx).r.returnStmtRet; + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class ForStatementContext extends ParserRuleContext { + public ForStatement forStRet; + public Token f; + public Token id; + public RangeContext r; + public LoopBodyContext l; + public TerminalNode IN() { return getToken(FunctionCraftParser.IN, 0); } + public TerminalNode END() { return getToken(FunctionCraftParser.END, 0); } + public TerminalNode FOR() { return getToken(FunctionCraftParser.FOR, 0); } + public TerminalNode IDENTIFIER() { return getToken(FunctionCraftParser.IDENTIFIER, 0); } + public RangeContext range() { + return getRuleContext(RangeContext.class,0); + } + public LoopBodyContext loopBody() { + return getRuleContext(LoopBodyContext.class,0); + } + public ForStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_forStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterForStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitForStatement(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitForStatement(this); + else return visitor.visitChildren(this); + } + } + + public final ForStatementContext forStatement() throws RecognitionException { + ForStatementContext _localctx = new ForStatementContext(_ctx, getState()); + enterRule(_localctx, 28, RULE_forStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(304); + ((ForStatementContext)_localctx).f = match(FOR); + setState(305); + ((ForStatementContext)_localctx).id = match(IDENTIFIER); + setState(306); + match(IN); + setState(307); + ((ForStatementContext)_localctx).r = range(); + setState(308); + ((ForStatementContext)_localctx).l = loopBody(); + setState(309); + match(END); + + ((ForStatementContext)_localctx).forStRet = new ForStatement(new Identifier((((ForStatementContext)_localctx).id!=null?((ForStatementContext)_localctx).id.getText():null)), + ((ForStatementContext)_localctx).r.rangeRet, ((ForStatementContext)_localctx).l.loopExps, ((ForStatementContext)_localctx).l.loopStmts, + ((ForStatementContext)_localctx).l.loopRetStmt); + _localctx.forStRet.setLine((((ForStatementContext)_localctx).f!=null?((ForStatementContext)_localctx).f.getLine():0)); + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class RangeContext extends ParserRuleContext { + public ArrayList rangeRet; + public ExpressionContext e1; + public ExpressionContext e2; + public ExpressionContext e3; + public ExpressionContext e4; + public Token id; + public TerminalNode LPAR() { return getToken(FunctionCraftParser.LPAR, 0); } + public TerminalNode DOUBLEDOT() { return getToken(FunctionCraftParser.DOUBLEDOT, 0); } + public TerminalNode RPAR() { return getToken(FunctionCraftParser.RPAR, 0); } + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public TerminalNode LBRACK() { return getToken(FunctionCraftParser.LBRACK, 0); } + public TerminalNode RBRACK() { return getToken(FunctionCraftParser.RBRACK, 0); } + public List COMMA() { return getTokens(FunctionCraftParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(FunctionCraftParser.COMMA, i); + } + public TerminalNode IDENTIFIER() { return getToken(FunctionCraftParser.IDENTIFIER, 0); } + public RangeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_range; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterRange(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitRange(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitRange(this); + else return visitor.visitChildren(this); + } + } + + public final RangeContext range() throws RecognitionException { + RangeContext _localctx = new RangeContext(_ctx, getState()); + enterRule(_localctx, 30, RULE_range); + int _la; + try { + setState(337); + _errHandler.sync(this); + switch (_input.LA(1)) { + case LPAR: + enterOuterAlt(_localctx, 1); + { + + ((RangeContext)_localctx).rangeRet = new ArrayList(); + + { + setState(313); + match(LPAR); + setState(314); + ((RangeContext)_localctx).e1 = expression(0); + + _localctx.rangeRet.add(((RangeContext)_localctx).e1.expRet); + + setState(316); + match(DOUBLEDOT); + setState(317); + ((RangeContext)_localctx).e2 = expression(0); + + _localctx.rangeRet.add(((RangeContext)_localctx).e2.expRet); + + setState(319); + match(RPAR); + } + } + break; + case LBRACK: + enterOuterAlt(_localctx, 2); + { + { + setState(321); + match(LBRACK); + { + setState(322); + ((RangeContext)_localctx).e3 = expression(0); + + _localctx.rangeRet.add(((RangeContext)_localctx).e3.expRet); + + setState(330); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(324); + match(COMMA); + setState(325); + ((RangeContext)_localctx).e4 = expression(0); + + _localctx.rangeRet.add(((RangeContext)_localctx).e4.expRet); + + } + } + setState(332); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + setState(333); + match(RBRACK); + } + } + break; + case IDENTIFIER: + enterOuterAlt(_localctx, 3); + { + setState(335); + ((RangeContext)_localctx).id = match(IDENTIFIER); + + Identifier id_ = new Identifier((((RangeContext)_localctx).id!=null?((RangeContext)_localctx).id.getText():null)); + _localctx.rangeRet.add(id_); + + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class FilterStatementContext extends ParserRuleContext { + public FilterStatement filterStatementRet; + public Token brack; + public ExpressionContext e1; + public Token id; + public RangeContext r; + public ExpressionContext e2; + public ExpressionContext e3; + public TerminalNode SEPARATOR() { return getToken(FunctionCraftParser.SEPARATOR, 0); } + public TerminalNode ARROW() { return getToken(FunctionCraftParser.ARROW, 0); } + public List COMMA() { return getTokens(FunctionCraftParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(FunctionCraftParser.COMMA, i); + } + public TerminalNode RBRACK() { return getToken(FunctionCraftParser.RBRACK, 0); } + public TerminalNode LBRACK() { return getToken(FunctionCraftParser.LBRACK, 0); } + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public TerminalNode IDENTIFIER() { return getToken(FunctionCraftParser.IDENTIFIER, 0); } + public RangeContext range() { + return getRuleContext(RangeContext.class,0); + } + public FilterStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_filterStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterFilterStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitFilterStatement(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitFilterStatement(this); + else return visitor.visitChildren(this); + } + } + + public final FilterStatementContext filterStatement() throws RecognitionException { + FilterStatementContext _localctx = new FilterStatementContext(_ctx, getState()); + enterRule(_localctx, 32, RULE_filterStatement); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + + ArrayList conditionExps = new ArrayList(); + + setState(340); + ((FilterStatementContext)_localctx).brack = match(LBRACK); + setState(341); + ((FilterStatementContext)_localctx).e1 = expression(0); + setState(342); + match(SEPARATOR); + setState(343); + ((FilterStatementContext)_localctx).id = match(IDENTIFIER); + setState(344); + match(ARROW); + setState(345); + ((FilterStatementContext)_localctx).r = range(); + setState(346); + match(COMMA); + setState(347); + ((FilterStatementContext)_localctx).e2 = expression(0); + + conditionExps.add(((FilterStatementContext)_localctx).e2.expRet); + + setState(355); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(349); + match(COMMA); + setState(350); + ((FilterStatementContext)_localctx).e3 = expression(0); + + conditionExps.add(((FilterStatementContext)_localctx).e3.expRet); + + } + } + setState(357); + _errHandler.sync(this); + _la = _input.LA(1); + } + + Identifier id_ = new Identifier((((FilterStatementContext)_localctx).id!=null?((FilterStatementContext)_localctx).id.getText():null)); + id_.setLine((((FilterStatementContext)_localctx).id!=null?((FilterStatementContext)_localctx).id.getLine():0)); + ((FilterStatementContext)_localctx).filterStatementRet = new FilterStatement(id_, ((FilterStatementContext)_localctx).e1.expRet, + conditionExps, ((FilterStatementContext)_localctx).r.rangeRet); + _localctx.filterStatementRet.setLine((((FilterStatementContext)_localctx).brack!=null?((FilterStatementContext)_localctx).brack.getLine():0)); + + setState(359); + match(RBRACK); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class MatchPatternStatementContext extends ParserRuleContext { + public MatchPatternStatement matchPatRet; + public Token id; + public Token m; + public ExpressionContext e; + public TerminalNode DOT() { return getToken(FunctionCraftParser.DOT, 0); } + public TerminalNode LPAR() { return getToken(FunctionCraftParser.LPAR, 0); } + public TerminalNode RPAR() { return getToken(FunctionCraftParser.RPAR, 0); } + public TerminalNode IDENTIFIER() { return getToken(FunctionCraftParser.IDENTIFIER, 0); } + public TerminalNode MATCH() { return getToken(FunctionCraftParser.MATCH, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public MatchPatternStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_matchPatternStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterMatchPatternStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitMatchPatternStatement(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitMatchPatternStatement(this); + else return visitor.visitChildren(this); + } + } + + public final MatchPatternStatementContext matchPatternStatement() throws RecognitionException { + MatchPatternStatementContext _localctx = new MatchPatternStatementContext(_ctx, getState()); + enterRule(_localctx, 34, RULE_matchPatternStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(361); + ((MatchPatternStatementContext)_localctx).id = match(IDENTIFIER); + setState(362); + match(DOT); + setState(363); + ((MatchPatternStatementContext)_localctx).m = match(MATCH); + setState(364); + match(LPAR); + setState(365); + ((MatchPatternStatementContext)_localctx).e = expression(0); + setState(366); + match(RPAR); + + Identifier id_ = new Identifier((((MatchPatternStatementContext)_localctx).id!=null?((MatchPatternStatementContext)_localctx).id.getText():null)); + ((MatchPatternStatementContext)_localctx).matchPatRet = new MatchPatternStatement(id_, ((MatchPatternStatementContext)_localctx).e.expRet); + _localctx.matchPatRet.setLine((((MatchPatternStatementContext)_localctx).m!=null?((MatchPatternStatementContext)_localctx).m.getLine():0)); + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class ChopStatementContext extends ParserRuleContext { + public ChopStatement chopRet; + public Token c; + public ExpressionContext e; + public TerminalNode LPAR() { return getToken(FunctionCraftParser.LPAR, 0); } + public TerminalNode RPAR() { return getToken(FunctionCraftParser.RPAR, 0); } + public TerminalNode CHOP() { return getToken(FunctionCraftParser.CHOP, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public ChopStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_chopStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterChopStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitChopStatement(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitChopStatement(this); + else return visitor.visitChildren(this); + } + } + + public final ChopStatementContext chopStatement() throws RecognitionException { + ChopStatementContext _localctx = new ChopStatementContext(_ctx, getState()); + enterRule(_localctx, 36, RULE_chopStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(369); + ((ChopStatementContext)_localctx).c = match(CHOP); + setState(370); + match(LPAR); + setState(371); + ((ChopStatementContext)_localctx).e = expression(0); + setState(372); + match(RPAR); + + ((ChopStatementContext)_localctx).chopRet = new ChopStatement(((ChopStatementContext)_localctx).e.expRet); + _localctx.chopRet.setLine((((ChopStatementContext)_localctx).c!=null?((ChopStatementContext)_localctx).c.getLine():0)); + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class ChompStatementContext extends ParserRuleContext { + public ChompStatement chompRet; + public Token c; + public ExpressionContext e; + public TerminalNode LPAR() { return getToken(FunctionCraftParser.LPAR, 0); } + public TerminalNode RPAR() { return getToken(FunctionCraftParser.RPAR, 0); } + public TerminalNode CHOMP() { return getToken(FunctionCraftParser.CHOMP, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public ChompStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_chompStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterChompStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitChompStatement(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitChompStatement(this); + else return visitor.visitChildren(this); + } + } + + public final ChompStatementContext chompStatement() throws RecognitionException { + ChompStatementContext _localctx = new ChompStatementContext(_ctx, getState()); + enterRule(_localctx, 38, RULE_chompStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(375); + ((ChompStatementContext)_localctx).c = match(CHOMP); + setState(376); + match(LPAR); + setState(377); + ((ChompStatementContext)_localctx).e = expression(0); + setState(378); + match(RPAR); + + ((ChompStatementContext)_localctx).chompRet = new ChompStatement(((ChompStatementContext)_localctx).e.expRet); + _localctx.chompRet.setLine((((ChompStatementContext)_localctx).c!=null?((ChompStatementContext)_localctx).c.getLine():0)); + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class AssignmentContext extends ParserRuleContext { + public AssignStatement assignRet; + public Token id; + public AccessListContext a; + public Token as; + public Token pl; + public Token mi; + public Token di; + public Token mu; + public Token mo; + public ExpressionContext e; + public TerminalNode SEMICOLLON() { return getToken(FunctionCraftParser.SEMICOLLON, 0); } + public TerminalNode IDENTIFIER() { return getToken(FunctionCraftParser.IDENTIFIER, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public TerminalNode ASSIGN() { return getToken(FunctionCraftParser.ASSIGN, 0); } + public TerminalNode PLUS_ASSIGN() { return getToken(FunctionCraftParser.PLUS_ASSIGN, 0); } + public TerminalNode MINUS_ASSIGN() { return getToken(FunctionCraftParser.MINUS_ASSIGN, 0); } + public TerminalNode DIVIDE_ASSIGN() { return getToken(FunctionCraftParser.DIVIDE_ASSIGN, 0); } + public TerminalNode MULT_ASSIGN() { return getToken(FunctionCraftParser.MULT_ASSIGN, 0); } + public TerminalNode MOD_ASSIGN() { return getToken(FunctionCraftParser.MOD_ASSIGN, 0); } + public AccessListContext accessList() { + return getRuleContext(AccessListContext.class,0); + } + public AssignmentContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_assignment; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterAssignment(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitAssignment(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitAssignment(this); + else return visitor.visitChildren(this); + } + } + + public final AssignmentContext assignment() throws RecognitionException { + AssignmentContext _localctx = new AssignmentContext(_ctx, getState()); + enterRule(_localctx, 40, RULE_assignment); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + + boolean access = false; + int line; + AssignOperator op; + + setState(382); + ((AssignmentContext)_localctx).id = match(IDENTIFIER); + setState(386); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==LBRACK) { + { + setState(383); + ((AssignmentContext)_localctx).a = accessList(); + access = true; + } + } + + setState(400); + _errHandler.sync(this); + switch (_input.LA(1)) { + case ASSIGN: + { + setState(388); + ((AssignmentContext)_localctx).as = match(ASSIGN); + op = AssignOperator.ASSIGN;line = (((AssignmentContext)_localctx).as!=null?((AssignmentContext)_localctx).as.getLine():0); + } + break; + case PLUS_ASSIGN: + { + setState(390); + ((AssignmentContext)_localctx).pl = match(PLUS_ASSIGN); + op = AssignOperator.PLUS_ASSIGN;line = (((AssignmentContext)_localctx).pl!=null?((AssignmentContext)_localctx).pl.getLine():0); + } + break; + case MINUS_ASSIGN: + { + setState(392); + ((AssignmentContext)_localctx).mi = match(MINUS_ASSIGN); + op = AssignOperator.MINUS_ASSIGN;line = (((AssignmentContext)_localctx).mi!=null?((AssignmentContext)_localctx).mi.getLine():0); + } + break; + case DIVIDE_ASSIGN: + { + setState(394); + ((AssignmentContext)_localctx).di = match(DIVIDE_ASSIGN); + op = AssignOperator.DIVIDE_ASSIGN;line = (((AssignmentContext)_localctx).di!=null?((AssignmentContext)_localctx).di.getLine():0); + } + break; + case MULT_ASSIGN: + { + setState(396); + ((AssignmentContext)_localctx).mu = match(MULT_ASSIGN); + op = AssignOperator.MULT_ASSIGN;line = (((AssignmentContext)_localctx).mu!=null?((AssignmentContext)_localctx).mu.getLine():0); + } + break; + case MOD_ASSIGN: + { + setState(398); + ((AssignmentContext)_localctx).mo = match(MOD_ASSIGN); + op = AssignOperator.MOD_ASSIGN;line = (((AssignmentContext)_localctx).mo!=null?((AssignmentContext)_localctx).mo.getLine():0); + } + break; + default: + throw new NoViableAltException(this); + } + setState(402); + ((AssignmentContext)_localctx).e = expression(0); + setState(403); + match(SEMICOLLON); + + Identifier id_ = new Identifier((((AssignmentContext)_localctx).id!=null?((AssignmentContext)_localctx).id.getText():null)); + id_.setLine((((AssignmentContext)_localctx).id!=null?((AssignmentContext)_localctx).id.getLine():0)); + ((AssignmentContext)_localctx).assignRet = new AssignStatement(access, id_, ((AssignmentContext)_localctx).e.expRet, op); + if(access){ + _localctx.assignRet.setAccessListExpression(((AssignmentContext)_localctx).a.accessListExp); + } + _localctx.assignRet.setLine(line); + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class AccessListContext extends ParserRuleContext { + public Expression accessListExp; + public ExpressionContext e; + public TerminalNode LBRACK() { return getToken(FunctionCraftParser.LBRACK, 0); } + public TerminalNode RBRACK() { return getToken(FunctionCraftParser.RBRACK, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public AccessListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_accessList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterAccessList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitAccessList(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitAccessList(this); + else return visitor.visitChildren(this); + } + } + + public final AccessListContext accessList() throws RecognitionException { + AccessListContext _localctx = new AccessListContext(_ctx, getState()); + enterRule(_localctx, 42, RULE_accessList); + try { + enterOuterAlt(_localctx, 1); + { + setState(406); + match(LBRACK); + setState(407); + ((AccessListContext)_localctx).e = expression(0); + ((AccessListContext)_localctx).accessListExp = ((AccessListContext)_localctx).e.expRet; + setState(409); + match(RBRACK); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class StatementContext extends ParserRuleContext { + public Statement stmtRet; + public IfStatementContext if_; + public LoopDoStatementContext loop; + public ForStatementContext for_; + public PutsStatementContext puts; + public PushStatementContext push; + public ExpressionContext e; + public AssignmentContext as; + public IfStatementContext ifStatement() { + return getRuleContext(IfStatementContext.class,0); + } + public LoopDoStatementContext loopDoStatement() { + return getRuleContext(LoopDoStatementContext.class,0); + } + public ForStatementContext forStatement() { + return getRuleContext(ForStatementContext.class,0); + } + public PutsStatementContext putsStatement() { + return getRuleContext(PutsStatementContext.class,0); + } + public PushStatementContext pushStatement() { + return getRuleContext(PushStatementContext.class,0); + } + public TerminalNode SEMICOLLON() { return getToken(FunctionCraftParser.SEMICOLLON, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public AssignmentContext assignment() { + return getRuleContext(AssignmentContext.class,0); + } + public StatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_statement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitStatement(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitStatement(this); + else return visitor.visitChildren(this); + } + } + + public final StatementContext statement() throws RecognitionException { + StatementContext _localctx = new StatementContext(_ctx, getState()); + enterRule(_localctx, 44, RULE_statement); + try { + setState(433); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,26,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(411); + ((StatementContext)_localctx).if_ = ifStatement(); + ((StatementContext)_localctx).stmtRet = ((StatementContext)_localctx).if.ifRet; + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(414); + ((StatementContext)_localctx).loop = loopDoStatement(); + ((StatementContext)_localctx).stmtRet = ((StatementContext)_localctx).loop.loopDoRet; + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(417); + ((StatementContext)_localctx).for_ = forStatement(); + ((StatementContext)_localctx).stmtRet = ((StatementContext)_localctx).for.forStRet; + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(420); + ((StatementContext)_localctx).puts = putsStatement(); + ((StatementContext)_localctx).stmtRet = ((StatementContext)_localctx).puts.putRet; + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(423); + ((StatementContext)_localctx).push = pushStatement(); + ((StatementContext)_localctx).stmtRet = ((StatementContext)_localctx).push.pushRet; + } + break; + case 6: + enterOuterAlt(_localctx, 6); + { + setState(426); + ((StatementContext)_localctx).e = expression(0); + + ExpressionStatement expStmt = new ExpressionStatement(((StatementContext)_localctx).e.expRet); + ((StatementContext)_localctx).stmtRet = expStmt; + _localctx.stmtRet.setLine(((StatementContext)_localctx).e.expRet.getLine()); + + setState(428); + match(SEMICOLLON); + } + break; + case 7: + enterOuterAlt(_localctx, 7); + { + setState(430); + ((StatementContext)_localctx).as = assignment(); + ((StatementContext)_localctx).stmtRet = ((StatementContext)_localctx).as.assignRet; + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class BodyContext extends ParserRuleContext { + public ArrayList bodyRet; + public StatementContext s; + public ReturnStatementContext r; + public List statement() { + return getRuleContexts(StatementContext.class); + } + public StatementContext statement(int i) { + return getRuleContext(StatementContext.class,i); + } + public ReturnStatementContext returnStatement() { + return getRuleContext(ReturnStatementContext.class,0); + } + public BodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_body; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterBody(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitBody(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitBody(this); + else return visitor.visitChildren(this); + } + } + + public final BodyContext body() throws RecognitionException { + BodyContext _localctx = new BodyContext(_ctx, getState()); + enterRule(_localctx, 46, RULE_body); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + + ((BodyContext)_localctx).bodyRet = new ArrayList(); + + setState(441); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & -1150101502091802256L) != 0)) { + { + { + setState(436); + ((BodyContext)_localctx).s = statement(); + _localctx.bodyRet.add(((BodyContext)_localctx).s.stmtRet); + } + } + setState(443); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(447); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==RETURN) { + { + setState(444); + ((BodyContext)_localctx).r = returnStatement(); + _localctx.bodyRet.add(((BodyContext)_localctx).r.returnStmtRet); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class ExpressionContext extends ParserRuleContext { + public Expression expRet; + public ExpressionContext e1; + public EqaulityExpressionContext e3; + public Token a; + public EqaulityExpressionContext e2; + public EqaulityExpressionContext eqaulityExpression() { + return getRuleContext(EqaulityExpressionContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public TerminalNode APPEND() { return getToken(FunctionCraftParser.APPEND, 0); } + public ExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_expression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitExpression(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitExpression(this); + else return visitor.visitChildren(this); + } + } + + public final ExpressionContext expression() throws RecognitionException { + return expression(0); + } + + private ExpressionContext expression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + ExpressionContext _localctx = new ExpressionContext(_ctx, _parentState); + ExpressionContext _prevctx = _localctx; + int _startState = 48; + enterRecursionRule(_localctx, 48, RULE_expression, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(450); + ((ExpressionContext)_localctx).e3 = eqaulityExpression(0); + ((ExpressionContext)_localctx).expRet = ((ExpressionContext)_localctx).e3.expRet; + } + _ctx.stop = _input.LT(-1); + setState(460); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,29,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new ExpressionContext(_parentctx, _parentState); + _localctx.e1 = _prevctx; + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(453); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + setState(454); + ((ExpressionContext)_localctx).a = match(APPEND); + setState(455); + ((ExpressionContext)_localctx).e2 = eqaulityExpression(0); + + if(!(((ExpressionContext)_localctx).e1.expRet instanceof AppendExpression)){ + ((ExpressionContext)_localctx).expRet = new AppendExpression(((ExpressionContext)_localctx).e1.expRet); + _localctx.expRet.setLine((((ExpressionContext)_localctx).a!=null?((ExpressionContext)_localctx).a.getLine():0)); + } + else{ + ((ExpressionContext)_localctx).e1.expRet.addAppendedExpression(((ExpressionContext)_localctx).e2.expRet) + ((ExpressionContext)_localctx).expRet = ((ExpressionContext)_localctx).e1.expRet; + } + + } + } + } + setState(462); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,29,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class EqaulityExpressionContext extends ParserRuleContext { + public Expression expRet; + public EqaulityExpressionContext e1; + public RelationalExpressionContext r2; + public Token op1; + public Token op2; + public RelationalExpressionContext r1; + public RelationalExpressionContext relationalExpression() { + return getRuleContext(RelationalExpressionContext.class,0); + } + public EqaulityExpressionContext eqaulityExpression() { + return getRuleContext(EqaulityExpressionContext.class,0); + } + public TerminalNode EQUAL() { return getToken(FunctionCraftParser.EQUAL, 0); } + public TerminalNode NOT_EQUAL() { return getToken(FunctionCraftParser.NOT_EQUAL, 0); } + public EqaulityExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_eqaulityExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterEqaulityExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitEqaulityExpression(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitEqaulityExpression(this); + else return visitor.visitChildren(this); + } + } + + public final EqaulityExpressionContext eqaulityExpression() throws RecognitionException { + return eqaulityExpression(0); + } + + private EqaulityExpressionContext eqaulityExpression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + EqaulityExpressionContext _localctx = new EqaulityExpressionContext(_ctx, _parentState); + EqaulityExpressionContext _prevctx = _localctx; + int _startState = 50; + enterRecursionRule(_localctx, 50, RULE_eqaulityExpression, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(464); + ((EqaulityExpressionContext)_localctx).r2 = relationalExpression(0); + ((EqaulityExpressionContext)_localctx).expRet = ((EqaulityExpressionContext)_localctx).r2.expRet; + } + _ctx.stop = _input.LT(-1); + setState(480); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,31,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new EqaulityExpressionContext(_parentctx, _parentState); + _localctx.e1 = _prevctx; + pushNewRecursionContext(_localctx, _startState, RULE_eqaulityExpression); + setState(467); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + + BinaryOperator op; + + setState(473); + _errHandler.sync(this); + switch (_input.LA(1)) { + case EQUAL: + { + setState(469); + ((EqaulityExpressionContext)_localctx).op1 = match(EQUAL); + op = BinaryOperator.EQUAL; + } + break; + case NOT_EQUAL: + { + setState(471); + ((EqaulityExpressionContext)_localctx).op2 = match(NOT_EQUAL); + op = BinaryOperator.NOT_EQUAL; + } + break; + default: + throw new NoViableAltException(this); + } + setState(475); + ((EqaulityExpressionContext)_localctx).r1 = relationalExpression(0); + ((EqaulityExpressionContext)_localctx).expRet = new BinaryExpression(((EqaulityExpressionContext)_localctx).e1.expRet, ((EqaulityExpressionContext)_localctx).r1.expRet, op); + } + } + } + setState(482); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,31,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class RelationalExpressionContext extends ParserRuleContext { + public Expression expRet; + public RelationalExpressionContext r1; + public AdditiveExpressionContext a2; + public Token op; + public AdditiveExpressionContext a1; + public AdditiveExpressionContext additiveExpression() { + return getRuleContext(AdditiveExpressionContext.class,0); + } + public RelationalExpressionContext relationalExpression() { + return getRuleContext(RelationalExpressionContext.class,0); + } + public TerminalNode LESS_THAN() { return getToken(FunctionCraftParser.LESS_THAN, 0); } + public TerminalNode LESS_EQUAL_THAN() { return getToken(FunctionCraftParser.LESS_EQUAL_THAN, 0); } + public TerminalNode GREATER_EQUAL_THAN() { return getToken(FunctionCraftParser.GREATER_EQUAL_THAN, 0); } + public TerminalNode GREATER_THAN() { return getToken(FunctionCraftParser.GREATER_THAN, 0); } + public RelationalExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_relationalExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterRelationalExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitRelationalExpression(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitRelationalExpression(this); + else return visitor.visitChildren(this); + } + } + + public final RelationalExpressionContext relationalExpression() throws RecognitionException { + return relationalExpression(0); + } + + private RelationalExpressionContext relationalExpression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + RelationalExpressionContext _localctx = new RelationalExpressionContext(_ctx, _parentState); + RelationalExpressionContext _prevctx = _localctx; + int _startState = 52; + enterRecursionRule(_localctx, 52, RULE_relationalExpression, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(484); + ((RelationalExpressionContext)_localctx).a2 = additiveExpression(0); + ((RelationalExpressionContext)_localctx).expRet = ((RelationalExpressionContext)_localctx).a2.expRet; + } + _ctx.stop = _input.LT(-1); + setState(504); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,33,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new RelationalExpressionContext(_parentctx, _parentState); + _localctx.r1 = _prevctx; + pushNewRecursionContext(_localctx, _startState, RULE_relationalExpression); + setState(487); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + + BinaryOperator op; + + setState(497); + _errHandler.sync(this); + switch (_input.LA(1)) { + case GREATER_THAN: + { + setState(489); + ((RelationalExpressionContext)_localctx).op = match(GREATER_THAN); + op = BinaryOperator.GREATER_THAN; + } + break; + case LESS_THAN: + { + setState(491); + match(LESS_THAN); + op = BinaryOperator.LESS_THAN; + } + break; + case LESS_EQUAL_THAN: + { + setState(493); + match(LESS_EQUAL_THAN); + op = BinaryOperator.LESS_EQUAL_THAN; + } + break; + case GREATER_EQUAL_THAN: + { + setState(495); + match(GREATER_EQUAL_THAN); + op = BinaryOperator.GREATER_EQUAL_THAN; + } + break; + default: + throw new NoViableAltException(this); + } + setState(499); + ((RelationalExpressionContext)_localctx).a1 = additiveExpression(0); + ((RelationalExpressionContext)_localctx).expRet = new BinaryExpression(((RelationalExpressionContext)_localctx).r1.expRet, ((RelationalExpressionContext)_localctx).a1.expRet, op); + } + } + } + setState(506); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,33,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class AdditiveExpressionContext extends ParserRuleContext { + public Expression expRet; + public AdditiveExpressionContext a1; + public MultiplicativeExpressionContext m2; + public MultiplicativeExpressionContext m1; + public MultiplicativeExpressionContext multiplicativeExpression() { + return getRuleContext(MultiplicativeExpressionContext.class,0); + } + public AdditiveExpressionContext additiveExpression() { + return getRuleContext(AdditiveExpressionContext.class,0); + } + public TerminalNode PLUS() { return getToken(FunctionCraftParser.PLUS, 0); } + public TerminalNode MINUS() { return getToken(FunctionCraftParser.MINUS, 0); } + public AdditiveExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_additiveExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterAdditiveExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitAdditiveExpression(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitAdditiveExpression(this); + else return visitor.visitChildren(this); + } + } + + public final AdditiveExpressionContext additiveExpression() throws RecognitionException { + return additiveExpression(0); + } + + private AdditiveExpressionContext additiveExpression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + AdditiveExpressionContext _localctx = new AdditiveExpressionContext(_ctx, _parentState); + AdditiveExpressionContext _prevctx = _localctx; + int _startState = 54; + enterRecursionRule(_localctx, 54, RULE_additiveExpression, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(508); + ((AdditiveExpressionContext)_localctx).m2 = multiplicativeExpression(0); + + ((AdditiveExpressionContext)_localctx).expRet = ((AdditiveExpressionContext)_localctx).m2.expRet; + + } + _ctx.stop = _input.LT(-1); + setState(524); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,35,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new AdditiveExpressionContext(_parentctx, _parentState); + _localctx.a1 = _prevctx; + pushNewRecursionContext(_localctx, _startState, RULE_additiveExpression); + setState(511); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + + BinaryOperator op; + + setState(517); + _errHandler.sync(this); + switch (_input.LA(1)) { + case PLUS: + { + setState(513); + match(PLUS); + op = BinaryOperator.PLUS; + } + break; + case MINUS: + { + setState(515); + match(MINUS); + op = BinaryOperator.MINUS; + } + break; + default: + throw new NoViableAltException(this); + } + setState(519); + ((AdditiveExpressionContext)_localctx).m1 = multiplicativeExpression(0); + ((AdditiveExpressionContext)_localctx).expRet = new BinaryExpression(((AdditiveExpressionContext)_localctx).a1.expRet, ((AdditiveExpressionContext)_localctx).m1.expRet, op); + } + } + } + setState(526); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,35,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class MultiplicativeExpressionContext extends ParserRuleContext { + public Expression expRet; + public MultiplicativeExpressionContext m1; + public PreUnaryExpressionContext p2; + public PreUnaryExpressionContext p1; + public PreUnaryExpressionContext preUnaryExpression() { + return getRuleContext(PreUnaryExpressionContext.class,0); + } + public MultiplicativeExpressionContext multiplicativeExpression() { + return getRuleContext(MultiplicativeExpressionContext.class,0); + } + public TerminalNode MULT() { return getToken(FunctionCraftParser.MULT, 0); } + public TerminalNode DIVIDE() { return getToken(FunctionCraftParser.DIVIDE, 0); } + public MultiplicativeExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_multiplicativeExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterMultiplicativeExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitMultiplicativeExpression(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitMultiplicativeExpression(this); + else return visitor.visitChildren(this); + } + } + + public final MultiplicativeExpressionContext multiplicativeExpression() throws RecognitionException { + return multiplicativeExpression(0); + } + + private MultiplicativeExpressionContext multiplicativeExpression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + MultiplicativeExpressionContext _localctx = new MultiplicativeExpressionContext(_ctx, _parentState); + MultiplicativeExpressionContext _prevctx = _localctx; + int _startState = 56; + enterRecursionRule(_localctx, 56, RULE_multiplicativeExpression, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(528); + ((MultiplicativeExpressionContext)_localctx).p2 = preUnaryExpression(); + ((MultiplicativeExpressionContext)_localctx).expRet = ((MultiplicativeExpressionContext)_localctx).p2.expRet; + } + _ctx.stop = _input.LT(-1); + setState(544); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,37,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new MultiplicativeExpressionContext(_parentctx, _parentState); + _localctx.m1 = _prevctx; + pushNewRecursionContext(_localctx, _startState, RULE_multiplicativeExpression); + setState(531); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + + BinaryOperator op; + + setState(537); + _errHandler.sync(this); + switch (_input.LA(1)) { + case MULT: + { + setState(533); + match(MULT); + op = BinaryOperator.MULT; + } + break; + case DIVIDE: + { + setState(535); + match(DIVIDE); + op = BinaryOperator.DIVIDE; + } + break; + default: + throw new NoViableAltException(this); + } + setState(539); + ((MultiplicativeExpressionContext)_localctx).p1 = preUnaryExpression(); + ((MultiplicativeExpressionContext)_localctx).expRet = new BinaryExpression(((MultiplicativeExpressionContext)_localctx).m1.expRet, ((MultiplicativeExpressionContext)_localctx).p1.expRet, op); + } + } + } + setState(546); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,37,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class PreUnaryExpressionContext extends ParserRuleContext { + public Expression expRet; + public AccessExpressionContext a1; + public AccessExpressionContext a2; + public AccessExpressionContext accessExpression() { + return getRuleContext(AccessExpressionContext.class,0); + } + public TerminalNode NOT() { return getToken(FunctionCraftParser.NOT, 0); } + public TerminalNode MINUS() { return getToken(FunctionCraftParser.MINUS, 0); } + public TerminalNode INCREMENT() { return getToken(FunctionCraftParser.INCREMENT, 0); } + public TerminalNode DECREMENT() { return getToken(FunctionCraftParser.DECREMENT, 0); } + public PreUnaryExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_preUnaryExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterPreUnaryExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitPreUnaryExpression(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitPreUnaryExpression(this); + else return visitor.visitChildren(this); + } + } + + public final PreUnaryExpressionContext preUnaryExpression() throws RecognitionException { + PreUnaryExpressionContext _localctx = new PreUnaryExpressionContext(_ctx, getState()); + enterRule(_localctx, 58, RULE_preUnaryExpression); + try { + setState(564); + _errHandler.sync(this); + switch (_input.LA(1)) { + case MINUS: + case NOT: + case INCREMENT: + case DECREMENT: + enterOuterAlt(_localctx, 1); + { + + UnaryOperator op; + + setState(556); + _errHandler.sync(this); + switch (_input.LA(1)) { + case NOT: + { + setState(548); + match(NOT); + op = UnaryOperator.NOT; + } + break; + case MINUS: + { + setState(550); + match(MINUS); + op = UnaryOperator.MINUS; + } + break; + case INCREMENT: + { + setState(552); + match(INCREMENT); + op = UnaryOperator.INC; + } + break; + case DECREMENT: + { + setState(554); + match(DECREMENT); + op = UnaryOperator.DEC; + } + break; + default: + throw new NoViableAltException(this); + } + setState(558); + ((PreUnaryExpressionContext)_localctx).a1 = accessExpression(); + ((PreUnaryExpressionContext)_localctx).expRet = new UnaryExpression(((PreUnaryExpressionContext)_localctx).a1.expRet, op); + } + break; + case LEN: + case METHOD: + case CHOP: + case CHOMP: + case TRUE: + case FALSE: + case ARROW: + case LPAR: + case LBRACK: + case INT_VALUE: + case FLOAT_VALUE: + case IDENTIFIER: + case STRING_VALUE: + enterOuterAlt(_localctx, 2); + { + setState(561); + ((PreUnaryExpressionContext)_localctx).a2 = accessExpression(); + ((PreUnaryExpressionContext)_localctx).expRet = ((PreUnaryExpressionContext)_localctx).a2.expRet; + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class AccessExpressionContext extends ParserRuleContext { + public Expression expRet; + public OtherExpressionContext o; + public FunctionArgumentsContext f; + public AccessListContext a; + public OtherExpressionContext otherExpression() { + return getRuleContext(OtherExpressionContext.class,0); + } + public List LPAR() { return getTokens(FunctionCraftParser.LPAR); } + public TerminalNode LPAR(int i) { + return getToken(FunctionCraftParser.LPAR, i); + } + public List RPAR() { return getTokens(FunctionCraftParser.RPAR); } + public TerminalNode RPAR(int i) { + return getToken(FunctionCraftParser.RPAR, i); + } + public List functionArguments() { + return getRuleContexts(FunctionArgumentsContext.class); + } + public FunctionArgumentsContext functionArguments(int i) { + return getRuleContext(FunctionArgumentsContext.class,i); + } + public List accessList() { + return getRuleContexts(AccessListContext.class); + } + public AccessListContext accessList(int i) { + return getRuleContext(AccessListContext.class,i); + } + public AccessExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_accessExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterAccessExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitAccessExpression(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitAccessExpression(this); + else return visitor.visitChildren(this); + } + } + + public final AccessExpressionContext accessExpression() throws RecognitionException { + AccessExpressionContext _localctx = new AccessExpressionContext(_ctx, getState()); + enterRule(_localctx, 60, RULE_accessExpression); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + + boolean isAccessExpression = false; + boolean isMultiDimentional = false; + ArrayList args = new ArrayList(); + ArrayList dimentions = new ArrayList(); + + setState(567); + ((AccessExpressionContext)_localctx).o = otherExpression(); + setState(575); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,40,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(568); + match(LPAR); + setState(569); + ((AccessExpressionContext)_localctx).f = functionArguments(); + + isAccessExpression = true; + args.addAll(((AccessExpressionContext)_localctx).f.funcArgsRet); + + setState(571); + match(RPAR); + } + } + } + setState(577); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,40,_ctx); + } + setState(583); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,41,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(578); + ((AccessExpressionContext)_localctx).a = accessList(); + + isMultiDimentional = true; + dimentions.add(((AccessExpressionContext)_localctx).a.accessListExp); + + } + } + } + setState(585); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,41,_ctx); + } + + if(!isAccessExpression){ + ((AccessExpressionContext)_localctx).expRet = ((AccessExpressionContext)_localctx).o.expRet; + } + else{ + ((AccessExpressionContext)_localctx).expRet = new AccessExpression(((AccessExpressionContext)_localctx).o.expRet, args); + if(isMultiDimentional){ + _localctx.expRet.setDimentionalAccess(dimentions); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class OtherExpressionContext extends ParserRuleContext { + public Expression expRet; + public ValuesContext v; + public Token id; + public LambdaFunctionContext lambda; + public ChopStatementContext chop; + public ChompStatementContext chomp; + public MatchPatternStatementContext match; + public FilterStatementContext f; + public LenStatementContext len; + public ExpressionContext e; + public ValuesContext values() { + return getRuleContext(ValuesContext.class,0); + } + public TerminalNode IDENTIFIER() { return getToken(FunctionCraftParser.IDENTIFIER, 0); } + public LambdaFunctionContext lambdaFunction() { + return getRuleContext(LambdaFunctionContext.class,0); + } + public ChopStatementContext chopStatement() { + return getRuleContext(ChopStatementContext.class,0); + } + public ChompStatementContext chompStatement() { + return getRuleContext(ChompStatementContext.class,0); + } + public MatchPatternStatementContext matchPatternStatement() { + return getRuleContext(MatchPatternStatementContext.class,0); + } + public FilterStatementContext filterStatement() { + return getRuleContext(FilterStatementContext.class,0); + } + public LenStatementContext lenStatement() { + return getRuleContext(LenStatementContext.class,0); + } + public TerminalNode LPAR() { return getToken(FunctionCraftParser.LPAR, 0); } + public TerminalNode RPAR() { return getToken(FunctionCraftParser.RPAR, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public OtherExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_otherExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterOtherExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitOtherExpression(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitOtherExpression(this); + else return visitor.visitChildren(this); + } + } + + public final OtherExpressionContext otherExpression() throws RecognitionException { + OtherExpressionContext _localctx = new OtherExpressionContext(_ctx, getState()); + enterRule(_localctx, 62, RULE_otherExpression); + int _la; + try { + setState(618); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,43,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(588); + ((OtherExpressionContext)_localctx).v = values(); + ((OtherExpressionContext)_localctx).expRet = ((OtherExpressionContext)_localctx).v.valRet; + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(591); + ((OtherExpressionContext)_localctx).id = match(IDENTIFIER); + + ((OtherExpressionContext)_localctx).expRet = new Identifier((((OtherExpressionContext)_localctx).id!=null?((OtherExpressionContext)_localctx).id.getText():null)); + _localctx.expRet.setLine((((OtherExpressionContext)_localctx).id!=null?((OtherExpressionContext)_localctx).id.getLine():0)); + + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(593); + ((OtherExpressionContext)_localctx).lambda = lambdaFunction(); + ((OtherExpressionContext)_localctx).expRet = ((OtherExpressionContext)_localctx).lambda.lambdaRet; + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(596); + ((OtherExpressionContext)_localctx).chop = chopStatement(); + ((OtherExpressionContext)_localctx).expRet = ((OtherExpressionContext)_localctx).chop.chopRet; + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(599); + ((OtherExpressionContext)_localctx).chomp = chompStatement(); + ((OtherExpressionContext)_localctx).expRet = chomp.chompRet; + } + break; + case 6: + enterOuterAlt(_localctx, 6); + { + setState(602); + ((OtherExpressionContext)_localctx).match = matchPatternStatement(); + ((OtherExpressionContext)_localctx).expRet = ((OtherExpressionContext)_localctx).match.matchPatRet; + } + break; + case 7: + enterOuterAlt(_localctx, 7); + { + setState(605); + ((OtherExpressionContext)_localctx).f = filterStatement(); + ((OtherExpressionContext)_localctx).expRet = ((OtherExpressionContext)_localctx).f.filterStatementRet; + } + break; + case 8: + enterOuterAlt(_localctx, 8); + { + setState(608); + ((OtherExpressionContext)_localctx).len = lenStatement(); + ((OtherExpressionContext)_localctx).expRet = ((OtherExpressionContext)_localctx).len.lenRet; + } + break; + case 9: + enterOuterAlt(_localctx, 9); + { + setState(611); + match(LPAR); + setState(615); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & -1150101502091851712L) != 0)) { + { + setState(612); + ((OtherExpressionContext)_localctx).e = expression(0); + ((OtherExpressionContext)_localctx).expRet = ((OtherExpressionContext)_localctx).e.expRet; + } + } + + setState(617); + match(RPAR); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class LambdaFunctionContext extends ParserRuleContext { + public Expression lambdaRet; + public Token a; + public FunctionArgumentsDeclarationContext fd; + public BodyContext b; + public FunctionArgumentsContext fa; + public TerminalNode LBRACE() { return getToken(FunctionCraftParser.LBRACE, 0); } + public TerminalNode RBRACE() { return getToken(FunctionCraftParser.RBRACE, 0); } + public TerminalNode ARROW() { return getToken(FunctionCraftParser.ARROW, 0); } + public FunctionArgumentsDeclarationContext functionArgumentsDeclaration() { + return getRuleContext(FunctionArgumentsDeclarationContext.class,0); + } + public BodyContext body() { + return getRuleContext(BodyContext.class,0); + } + public FunctionArgumentsContext functionArguments() { + return getRuleContext(FunctionArgumentsContext.class,0); + } + public LambdaFunctionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_lambdaFunction; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterLambdaFunction(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitLambdaFunction(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitLambdaFunction(this); + else return visitor.visitChildren(this); + } + } + + public final LambdaFunctionContext lambdaFunction() throws RecognitionException { + LambdaFunctionContext _localctx = new LambdaFunctionContext(_ctx, getState()); + enterRule(_localctx, 64, RULE_lambdaFunction); + try { + enterOuterAlt(_localctx, 1); + { + setState(620); + ((LambdaFunctionContext)_localctx).a = match(ARROW); + setState(621); + ((LambdaFunctionContext)_localctx).fd = functionArgumentsDeclaration(); + setState(622); + match(LBRACE); + setState(623); + ((LambdaFunctionContext)_localctx).b = body(); + setState(624); + match(RBRACE); + setState(625); + ((LambdaFunctionContext)_localctx).fa = functionArguments(); + + ((LambdaFunctionContext)_localctx).lambdaRet = new LambdaExpression(((LambdaFunctionContext)_localctx).fd.argRet, ((LambdaFunctionContext)_localctx).b.bodyRet, ((LambdaFunctionContext)_localctx).fa.funcArgsRet); + _localctx.lambdaRet.setLine((((LambdaFunctionContext)_localctx).a!=null?((LambdaFunctionContext)_localctx).a.getLine():0)); + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class ValuesContext extends ParserRuleContext { + public Value valRet; + public BoolValueContext b; + public Token s; + public Token i; + public Token float_; + public ListValueContext l; + public FunctionPointerContext f; + public BoolValueContext boolValue() { + return getRuleContext(BoolValueContext.class,0); + } + public TerminalNode STRING_VALUE() { return getToken(FunctionCraftParser.STRING_VALUE, 0); } + public TerminalNode INT_VALUE() { return getToken(FunctionCraftParser.INT_VALUE, 0); } + public TerminalNode FLOAT_VALUE() { return getToken(FunctionCraftParser.FLOAT_VALUE, 0); } + public ListValueContext listValue() { + return getRuleContext(ListValueContext.class,0); + } + public FunctionPointerContext functionPointer() { + return getRuleContext(FunctionPointerContext.class,0); + } + public ValuesContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_values; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterValues(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitValues(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitValues(this); + else return visitor.visitChildren(this); + } + } + + public final ValuesContext values() throws RecognitionException { + ValuesContext _localctx = new ValuesContext(_ctx, getState()); + enterRule(_localctx, 66, RULE_values); + try { + setState(643); + _errHandler.sync(this); + switch (_input.LA(1)) { + case TRUE: + case FALSE: + enterOuterAlt(_localctx, 1); + { + setState(628); + ((ValuesContext)_localctx).b = boolValue(); + ((ValuesContext)_localctx).valRet = ((ValuesContext)_localctx).b.boolValRet; + } + break; + case STRING_VALUE: + enterOuterAlt(_localctx, 2); + { + setState(631); + ((ValuesContext)_localctx).s = match(STRING_VALUE); + ((ValuesContext)_localctx).valRet = new StringValue((((ValuesContext)_localctx).s!=null?((ValuesContext)_localctx).s.getText():null)); _localctx.valRet.setLine((((ValuesContext)_localctx).s!=null?((ValuesContext)_localctx).s.getLine():0)); + } + break; + case INT_VALUE: + enterOuterAlt(_localctx, 3); + { + setState(633); + ((ValuesContext)_localctx).i = match(INT_VALUE); + ((ValuesContext)_localctx).valRet = new IntValue((((ValuesContext)_localctx).i!=null?Integer.valueOf(((ValuesContext)_localctx).i.getText()):0));_localctx.valRet.setLine((((ValuesContext)_localctx).i!=null?((ValuesContext)_localctx).i.getLine():0)); + } + break; + case FLOAT_VALUE: + enterOuterAlt(_localctx, 4); + { + setState(635); + ((ValuesContext)_localctx).float_ = match(FLOAT_VALUE); + ((ValuesContext)_localctx).valRet = new FloatValue(Float.parseFloat((((ValuesContext)_localctx).float!=null?((ValuesContext)_localctx).float.getText():null)));_localctx.valRet.setLine((((ValuesContext)_localctx).float!=null?((ValuesContext)_localctx).float.getLine():0)); + } + break; + case LBRACK: + enterOuterAlt(_localctx, 5); + { + setState(637); + ((ValuesContext)_localctx).l = listValue(); + ((ValuesContext)_localctx).valRet = ((ValuesContext)_localctx).l.listValRet; + } + break; + case METHOD: + enterOuterAlt(_localctx, 6); + { + setState(640); + ((ValuesContext)_localctx).f = functionPointer(); + ((ValuesContext)_localctx).valRet = ((ValuesContext)_localctx).f.fpRet; + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class ListValueContext extends ParserRuleContext { + public ListValue listValRet; + public Token l; + public FunctionArgumentsContext f; + public TerminalNode RBRACK() { return getToken(FunctionCraftParser.RBRACK, 0); } + public TerminalNode LBRACK() { return getToken(FunctionCraftParser.LBRACK, 0); } + public FunctionArgumentsContext functionArguments() { + return getRuleContext(FunctionArgumentsContext.class,0); + } + public ListValueContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_listValue; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterListValue(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitListValue(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitListValue(this); + else return visitor.visitChildren(this); + } + } + + public final ListValueContext listValue() throws RecognitionException { + ListValueContext _localctx = new ListValueContext(_ctx, getState()); + enterRule(_localctx, 68, RULE_listValue); + try { + enterOuterAlt(_localctx, 1); + { + setState(645); + ((ListValueContext)_localctx).l = match(LBRACK); + setState(646); + ((ListValueContext)_localctx).f = functionArguments(); + setState(647); + match(RBRACK); + + ((ListValueContext)_localctx).listValRet = new ListValue(((ListValueContext)_localctx).f.funcArgsRet); + _localctx.listValRet.setLine((((ListValueContext)_localctx).l!=null?((ListValueContext)_localctx).l.getLine():0)); + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class BoolValueContext extends ParserRuleContext { + public BoolValue boolValRet; + public Token t; + public Token f; + public TerminalNode TRUE() { return getToken(FunctionCraftParser.TRUE, 0); } + public TerminalNode FALSE() { return getToken(FunctionCraftParser.FALSE, 0); } + public BoolValueContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_boolValue; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterBoolValue(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitBoolValue(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitBoolValue(this); + else return visitor.visitChildren(this); + } + } + + public final BoolValueContext boolValue() throws RecognitionException { + BoolValueContext _localctx = new BoolValueContext(_ctx, getState()); + enterRule(_localctx, 70, RULE_boolValue); + try { + setState(654); + _errHandler.sync(this); + switch (_input.LA(1)) { + case TRUE: + enterOuterAlt(_localctx, 1); + { + setState(650); + ((BoolValueContext)_localctx).t = match(TRUE); + ((BoolValueContext)_localctx).boolValRet = new BoolValue(true); _localctx.boolValRet.setLine((((BoolValueContext)_localctx).t!=null?((BoolValueContext)_localctx).t.getLine():0)); + } + break; + case FALSE: + enterOuterAlt(_localctx, 2); + { + setState(652); + ((BoolValueContext)_localctx).f = match(FALSE); + ((BoolValueContext)_localctx).boolValRet = new BoolValue(false); _localctx.boolValRet.setLine((((BoolValueContext)_localctx).f!=null?((BoolValueContext)_localctx).f.getLine():0)); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class FunctionPointerContext extends ParserRuleContext { + public FunctionPointer fpRet; + public Token m; + public Token id; + public TerminalNode LPAR() { return getToken(FunctionCraftParser.LPAR, 0); } + public TerminalNode COLON() { return getToken(FunctionCraftParser.COLON, 0); } + public TerminalNode RPAR() { return getToken(FunctionCraftParser.RPAR, 0); } + public TerminalNode METHOD() { return getToken(FunctionCraftParser.METHOD, 0); } + public TerminalNode IDENTIFIER() { return getToken(FunctionCraftParser.IDENTIFIER, 0); } + public FunctionPointerContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_functionPointer; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterFunctionPointer(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitFunctionPointer(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitFunctionPointer(this); + else return visitor.visitChildren(this); + } + } + + public final FunctionPointerContext functionPointer() throws RecognitionException { + FunctionPointerContext _localctx = new FunctionPointerContext(_ctx, getState()); + enterRule(_localctx, 72, RULE_functionPointer); + try { + enterOuterAlt(_localctx, 1); + { + setState(656); + ((FunctionPointerContext)_localctx).m = match(METHOD); + setState(657); + match(LPAR); + setState(658); + match(COLON); + setState(659); + ((FunctionPointerContext)_localctx).id = match(IDENTIFIER); + setState(660); + match(RPAR); + + Identifier id_ = new Identifier((((FunctionPointerContext)_localctx).id!=null?((FunctionPointerContext)_localctx).id.getText():null)); + id_.setLine((((FunctionPointerContext)_localctx).id!=null?((FunctionPointerContext)_localctx).id.getLine():0)); + ((FunctionPointerContext)_localctx).fpRet = new FunctionPointer(id_); + _localctx.fpRet.setLine((((FunctionPointerContext)_localctx).m!=null?((FunctionPointerContext)_localctx).m.getLine():0)); + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) { + switch (ruleIndex) { + case 24: + return expression_sempred((ExpressionContext)_localctx, predIndex); + case 25: + return eqaulityExpression_sempred((EqaulityExpressionContext)_localctx, predIndex); + case 26: + return relationalExpression_sempred((RelationalExpressionContext)_localctx, predIndex); + case 27: + return additiveExpression_sempred((AdditiveExpressionContext)_localctx, predIndex); + case 28: + return multiplicativeExpression_sempred((MultiplicativeExpressionContext)_localctx, predIndex); + } + return true; + } + private boolean expression_sempred(ExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 0: + return precpred(_ctx, 2); + } + return true; + } + private boolean eqaulityExpression_sempred(EqaulityExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 1: + return precpred(_ctx, 2); + } + return true; + } + private boolean relationalExpression_sempred(RelationalExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 2: + return precpred(_ctx, 2); + } + return true; + } + private boolean additiveExpression_sempred(AdditiveExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 3: + return precpred(_ctx, 2); + } + return true; + } + private boolean multiplicativeExpression_sempred(MultiplicativeExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 4: + return precpred(_ctx, 2); + } + return true; + } + + public static final String _serializedATN = + "\u0004\u0001A\u0298\u0002\u0000\u0007\u0000\u0002\u0001\u0007\u0001\u0002"+ + "\u0002\u0007\u0002\u0002\u0003\u0007\u0003\u0002\u0004\u0007\u0004\u0002"+ + "\u0005\u0007\u0005\u0002\u0006\u0007\u0006\u0002\u0007\u0007\u0007\u0002"+ + "\b\u0007\b\u0002\t\u0007\t\u0002\n\u0007\n\u0002\u000b\u0007\u000b\u0002"+ + "\f\u0007\f\u0002\r\u0007\r\u0002\u000e\u0007\u000e\u0002\u000f\u0007\u000f"+ + "\u0002\u0010\u0007\u0010\u0002\u0011\u0007\u0011\u0002\u0012\u0007\u0012"+ + "\u0002\u0013\u0007\u0013\u0002\u0014\u0007\u0014\u0002\u0015\u0007\u0015"+ + "\u0002\u0016\u0007\u0016\u0002\u0017\u0007\u0017\u0002\u0018\u0007\u0018"+ + "\u0002\u0019\u0007\u0019\u0002\u001a\u0007\u001a\u0002\u001b\u0007\u001b"+ + "\u0002\u001c\u0007\u001c\u0002\u001d\u0007\u001d\u0002\u001e\u0007\u001e"+ + "\u0002\u001f\u0007\u001f\u0002 \u0007 \u0002!\u0007!\u0002\"\u0007\"\u0002"+ + "#\u0007#\u0002$\u0007$\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0000"+ + "\u0001\u0000\u0001\u0000\u0001\u0000\u0005\u0000R\b\u0000\n\u0000\f\u0000"+ + "U\t\u0000\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0001\u0001\u0001"+ + "\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001"+ + "\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0002\u0001\u0002\u0001\u0002"+ + "\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0005\u0002l\b\u0002"+ + "\n\u0002\f\u0002o\t\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002"+ + "\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002"+ + "\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0005\u0002\u007f\b\u0002"+ + "\n\u0002\f\u0002\u0082\t\u0002\u0001\u0002\u0001\u0002\u0003\u0002\u0086"+ + "\b\u0002\u0003\u0002\u0088\b\u0002\u0001\u0002\u0001\u0002\u0001\u0003"+ + "\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003"+ + "\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003"+ + "\u0001\u0003\u0001\u0003\u0005\u0003\u009b\b\u0003\n\u0003\f\u0003\u009e"+ + "\t\u0003\u0001\u0003\u0001\u0003\u0001\u0004\u0001\u0004\u0001\u0004\u0001"+ + "\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001"+ + "\u0004\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0001"+ + "\u0005\u0001\u0005\u0005\u0005\u00b3\b\u0005\n\u0005\f\u0005\u00b6\t\u0005"+ + "\u0003\u0005\u00b8\b\u0005\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006"+ + "\u0001\u0006\u0003\u0006\u00bf\b\u0006\u0001\u0006\u0001\u0006\u0001\u0007"+ + "\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007"+ + "\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007"+ + "\u0001\u0007\u0005\u0007\u00d1\b\u0007\n\u0007\f\u0007\u00d4\t\u0007\u0001"+ + "\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0003\u0007\u00da\b\u0007\u0001"+ + "\u0007\u0001\u0007\u0001\u0007\u0001\b\u0001\b\u0001\b\u0001\b\u0001\b"+ + "\u0001\b\u0001\b\u0003\b\u00e6\b\b\u0001\b\u0001\b\u0001\b\u0003\b\u00eb"+ + "\b\b\u0005\b\u00ed\b\b\n\b\f\b\u00f0\t\b\u0005\b\u00f2\b\b\n\b\f\b\u00f5"+ + "\t\b\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\n\u0001"+ + "\n\u0001\n\u0001\n\u0001\n\u0001\n\u0001\u000b\u0001\u000b\u0001\u000b"+ + "\u0001\u000b\u0001\u000b\u0001\u000b\u0001\u000b\u0001\u000b\u0001\u000b"+ + "\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\r\u0001\r\u0001"+ + "\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0003\r\u011c\b\r\u0001"+ + "\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0003\r\u0124\b\r\u0001\r\u0005"+ + "\r\u0127\b\r\n\r\f\r\u012a\t\r\u0001\r\u0001\r\u0001\r\u0003\r\u012f\b"+ + "\r\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e"+ + "\u0001\u000e\u0001\u000e\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f"+ + "\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f"+ + "\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f"+ + "\u0005\u000f\u0149\b\u000f\n\u000f\f\u000f\u014c\t\u000f\u0001\u000f\u0001"+ + "\u000f\u0001\u000f\u0001\u000f\u0003\u000f\u0152\b\u000f\u0001\u0010\u0001"+ + "\u0010\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0010\u0001"+ + "\u0010\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0010\u0001"+ + "\u0010\u0005\u0010\u0162\b\u0010\n\u0010\f\u0010\u0165\t\u0010\u0001\u0010"+ + "\u0001\u0010\u0001\u0010\u0001\u0011\u0001\u0011\u0001\u0011\u0001\u0011"+ + "\u0001\u0011\u0001\u0011\u0001\u0011\u0001\u0011\u0001\u0012\u0001\u0012"+ + "\u0001\u0012\u0001\u0012\u0001\u0012\u0001\u0012\u0001\u0013\u0001\u0013"+ + "\u0001\u0013\u0001\u0013\u0001\u0013\u0001\u0013\u0001\u0014\u0001\u0014"+ + "\u0001\u0014\u0001\u0014\u0001\u0014\u0003\u0014\u0183\b\u0014\u0001\u0014"+ + "\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0014"+ + "\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0014\u0003\u0014"+ + "\u0191\b\u0014\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0015"+ + "\u0001\u0015\u0001\u0015\u0001\u0015\u0001\u0015\u0001\u0016\u0001\u0016"+ + "\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0016"+ + "\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0016"+ + "\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0016"+ + "\u0001\u0016\u0001\u0016\u0003\u0016\u01b2\b\u0016\u0001\u0017\u0001\u0017"+ + "\u0001\u0017\u0001\u0017\u0005\u0017\u01b8\b\u0017\n\u0017\f\u0017\u01bb"+ + "\t\u0017\u0001\u0017\u0001\u0017\u0001\u0017\u0003\u0017\u01c0\b\u0017"+ + "\u0001\u0018\u0001\u0018\u0001\u0018\u0001\u0018\u0001\u0018\u0001\u0018"+ + "\u0001\u0018\u0001\u0018\u0001\u0018\u0005\u0018\u01cb\b\u0018\n\u0018"+ + "\f\u0018\u01ce\t\u0018\u0001\u0019\u0001\u0019\u0001\u0019\u0001\u0019"+ + "\u0001\u0019\u0001\u0019\u0001\u0019\u0001\u0019\u0001\u0019\u0001\u0019"+ + "\u0003\u0019\u01da\b\u0019\u0001\u0019\u0001\u0019\u0001\u0019\u0005\u0019"+ + "\u01df\b\u0019\n\u0019\f\u0019\u01e2\t\u0019\u0001\u001a\u0001\u001a\u0001"+ + "\u001a\u0001\u001a\u0001\u001a\u0001\u001a\u0001\u001a\u0001\u001a\u0001"+ + "\u001a\u0001\u001a\u0001\u001a\u0001\u001a\u0001\u001a\u0001\u001a\u0003"+ + "\u001a\u01f2\b\u001a\u0001\u001a\u0001\u001a\u0001\u001a\u0005\u001a\u01f7"+ + "\b\u001a\n\u001a\f\u001a\u01fa\t\u001a\u0001\u001b\u0001\u001b\u0001\u001b"+ + "\u0001\u001b\u0001\u001b\u0001\u001b\u0001\u001b\u0001\u001b\u0001\u001b"+ + "\u0001\u001b\u0003\u001b\u0206\b\u001b\u0001\u001b\u0001\u001b\u0001\u001b"+ + "\u0005\u001b\u020b\b\u001b\n\u001b\f\u001b\u020e\t\u001b\u0001\u001c\u0001"+ + "\u001c\u0001\u001c\u0001\u001c\u0001\u001c\u0001\u001c\u0001\u001c\u0001"+ + "\u001c\u0001\u001c\u0001\u001c\u0003\u001c\u021a\b\u001c\u0001\u001c\u0001"+ + "\u001c\u0001\u001c\u0005\u001c\u021f\b\u001c\n\u001c\f\u001c\u0222\t\u001c"+ + "\u0001\u001d\u0001\u001d\u0001\u001d\u0001\u001d\u0001\u001d\u0001\u001d"+ + "\u0001\u001d\u0001\u001d\u0001\u001d\u0003\u001d\u022d\b\u001d\u0001\u001d"+ + "\u0001\u001d\u0001\u001d\u0001\u001d\u0001\u001d\u0001\u001d\u0003\u001d"+ + "\u0235\b\u001d\u0001\u001e\u0001\u001e\u0001\u001e\u0001\u001e\u0001\u001e"+ + "\u0001\u001e\u0001\u001e\u0005\u001e\u023e\b\u001e\n\u001e\f\u001e\u0241"+ + "\t\u001e\u0001\u001e\u0001\u001e\u0001\u001e\u0005\u001e\u0246\b\u001e"+ + "\n\u001e\f\u001e\u0249\t\u001e\u0001\u001e\u0001\u001e\u0001\u001f\u0001"+ + "\u001f\u0001\u001f\u0001\u001f\u0001\u001f\u0001\u001f\u0001\u001f\u0001"+ + "\u001f\u0001\u001f\u0001\u001f\u0001\u001f\u0001\u001f\u0001\u001f\u0001"+ + "\u001f\u0001\u001f\u0001\u001f\u0001\u001f\u0001\u001f\u0001\u001f\u0001"+ + "\u001f\u0001\u001f\u0001\u001f\u0001\u001f\u0001\u001f\u0001\u001f\u0001"+ + "\u001f\u0001\u001f\u0003\u001f\u0268\b\u001f\u0001\u001f\u0003\u001f\u026b"+ + "\b\u001f\u0001 \u0001 \u0001 \u0001 \u0001 \u0001 \u0001 \u0001 \u0001"+ + "!\u0001!\u0001!\u0001!\u0001!\u0001!\u0001!\u0001!\u0001!\u0001!\u0001"+ + "!\u0001!\u0001!\u0001!\u0001!\u0003!\u0284\b!\u0001\"\u0001\"\u0001\""+ + "\u0001\"\u0001\"\u0001#\u0001#\u0001#\u0001#\u0003#\u028f\b#\u0001$\u0001"+ + "$\u0001$\u0001$\u0001$\u0001$\u0001$\u0001$\u0000\u000502468%\u0000\u0002"+ + "\u0004\u0006\b\n\f\u000e\u0010\u0012\u0014\u0016\u0018\u001a\u001c\u001e"+ + " \"$&(*,.02468:<>@BDFH\u0000\u0001\u0001\u0000\u001e\u001f\u02ba\u0000"+ + "J\u0001\u0000\u0000\u0000\u0002Y\u0001\u0000\u0000\u0000\u0004d\u0001"+ + "\u0000\u0000\u0000\u0006\u008b\u0001\u0000\u0000\u0000\b\u00a1\u0001\u0000"+ + "\u0000\u0000\n\u00ab\u0001\u0000\u0000\u0000\f\u00b9\u0001\u0000\u0000"+ + "\u0000\u000e\u00c2\u0001\u0000\u0000\u0000\u0010\u00de\u0001\u0000\u0000"+ + "\u0000\u0012\u00f6\u0001\u0000\u0000\u0000\u0014\u00fd\u0001\u0000\u0000"+ + "\u0000\u0016\u0103\u0001\u0000\u0000\u0000\u0018\u010c\u0001\u0000\u0000"+ + "\u0000\u001a\u0112\u0001\u0000\u0000\u0000\u001c\u0130\u0001\u0000\u0000"+ + "\u0000\u001e\u0151\u0001\u0000\u0000\u0000 \u0153\u0001\u0000\u0000\u0000"+ + "\"\u0169\u0001\u0000\u0000\u0000$\u0171\u0001\u0000\u0000\u0000&\u0177"+ + "\u0001\u0000\u0000\u0000(\u017d\u0001\u0000\u0000\u0000*\u0196\u0001\u0000"+ + "\u0000\u0000,\u01b1\u0001\u0000\u0000\u0000.\u01b3\u0001\u0000\u0000\u0000"+ + "0\u01c1\u0001\u0000\u0000\u00002\u01cf\u0001\u0000\u0000\u00004\u01e3"+ + "\u0001\u0000\u0000\u00006\u01fb\u0001\u0000\u0000\u00008\u020f\u0001\u0000"+ + "\u0000\u0000:\u0234\u0001\u0000\u0000\u0000<\u0236\u0001\u0000\u0000\u0000"+ + ">\u026a\u0001\u0000\u0000\u0000@\u026c\u0001\u0000\u0000\u0000B\u0283"+ + "\u0001\u0000\u0000\u0000D\u0285\u0001\u0000\u0000\u0000F\u028e\u0001\u0000"+ + "\u0000\u0000H\u0290\u0001\u0000\u0000\u0000JS\u0006\u0000\uffff\uffff"+ + "\u0000KL\u0003\u0002\u0001\u0000LM\u0006\u0000\uffff\uffff\u0000MR\u0001"+ + "\u0000\u0000\u0000NO\u0003\u0006\u0003\u0000OP\u0006\u0000\uffff\uffff"+ + "\u0000PR\u0001\u0000\u0000\u0000QK\u0001\u0000\u0000\u0000QN\u0001\u0000"+ + "\u0000\u0000RU\u0001\u0000\u0000\u0000SQ\u0001\u0000\u0000\u0000ST\u0001"+ + "\u0000\u0000\u0000TV\u0001\u0000\u0000\u0000US\u0001\u0000\u0000\u0000"+ + "VW\u0003\b\u0004\u0000WX\u0006\u0000\uffff\uffff\u0000X\u0001\u0001\u0000"+ + "\u0000\u0000YZ\u0006\u0001\uffff\uffff\u0000Z[\u0005\u0001\u0000\u0000"+ + "[\\\u0006\u0001\uffff\uffff\u0000\\]\u0005>\u0000\u0000]^\u0006\u0001"+ + "\uffff\uffff\u0000^_\u0003\u0004\u0002\u0000_`\u0006\u0001\uffff\uffff"+ + "\u0000`a\u0003.\u0017\u0000ab\u0006\u0001\uffff\uffff\u0000bc\u0005\u0002"+ + "\u0000\u0000c\u0003\u0001\u0000\u0000\u0000de\u0006\u0002\uffff\uffff"+ + "\u0000e\u0087\u00051\u0000\u0000fg\u0005>\u0000\u0000gm\u0006\u0002\uffff"+ + "\uffff\u0000hi\u00057\u0000\u0000ij\u0005>\u0000\u0000jl\u0006\u0002\uffff"+ + "\uffff\u0000kh\u0001\u0000\u0000\u0000lo\u0001\u0000\u0000\u0000mk\u0001"+ + "\u0000\u0000\u0000mn\u0001\u0000\u0000\u0000n\u0085\u0001\u0000\u0000"+ + "\u0000om\u0001\u0000\u0000\u0000pq\u00057\u0000\u0000qr\u00053\u0000\u0000"+ + "rs\u0005>\u0000\u0000st\u0006\u0002\uffff\uffff\u0000tu\u00050\u0000\u0000"+ + "uv\u00030\u0018\u0000v\u0080\u0006\u0002\uffff\uffff\u0000wx\u00057\u0000"+ + "\u0000xy\u0005>\u0000\u0000yz\u0006\u0002\uffff\uffff\u0000z{\u00050\u0000"+ + "\u0000{|\u00030\u0018\u0000|}\u0006\u0002\uffff\uffff\u0000}\u007f\u0001"+ + "\u0000\u0000\u0000~w\u0001\u0000\u0000\u0000\u007f\u0082\u0001\u0000\u0000"+ + "\u0000\u0080~\u0001\u0000\u0000\u0000\u0080\u0081\u0001\u0000\u0000\u0000"+ + "\u0081\u0083\u0001\u0000\u0000\u0000\u0082\u0080\u0001\u0000\u0000\u0000"+ + "\u0083\u0084\u00054\u0000\u0000\u0084\u0086\u0001\u0000\u0000\u0000\u0085"+ + "p\u0001\u0000\u0000\u0000\u0085\u0086\u0001\u0000\u0000\u0000\u0086\u0088"+ + "\u0001\u0000\u0000\u0000\u0087f\u0001\u0000\u0000\u0000\u0087\u0088\u0001"+ + "\u0000\u0000\u0000\u0088\u0089\u0001\u0000\u0000\u0000\u0089\u008a\u0005"+ + "2\u0000\u0000\u008a\u0005\u0001\u0000\u0000\u0000\u008b\u008c\u0005\f"+ + "\u0000\u0000\u008c\u008d\u0006\u0003\uffff\uffff\u0000\u008d\u008e\u0005"+ + ">\u0000\u0000\u008e\u008f\u0006\u0003\uffff\uffff\u0000\u008f\u0090\u0005"+ + "1\u0000\u0000\u0090\u0091\u0005>\u0000\u0000\u0091\u0092\u0006\u0003\uffff"+ + "\uffff\u0000\u0092\u009c\u00052\u0000\u0000\u0093\u0094\u0005#\u0000\u0000"+ + "\u0094\u0095\u0003\u0010\b\u0000\u0095\u0096\u0006\u0003\uffff\uffff\u0000"+ + "\u0096\u0097\u00050\u0000\u0000\u0097\u0098\u00030\u0018\u0000\u0098\u0099"+ + "\u0006\u0003\uffff\uffff\u0000\u0099\u009b\u0001\u0000\u0000\u0000\u009a"+ + "\u0093\u0001\u0000\u0000\u0000\u009b\u009e\u0001\u0000\u0000\u0000\u009c"+ + "\u009a\u0001\u0000\u0000\u0000\u009c\u009d\u0001\u0000\u0000\u0000\u009d"+ + "\u009f\u0001\u0000\u0000\u0000\u009e\u009c\u0001\u0000\u0000\u0000\u009f"+ + "\u00a0\u0005;\u0000\u0000\u00a0\u0007\u0001\u0000\u0000\u0000\u00a1\u00a2"+ + "\u0006\u0004\uffff\uffff\u0000\u00a2\u00a3\u0005\u0001\u0000\u0000\u00a3"+ + "\u00a4\u0005\u0003\u0000\u0000\u00a4\u00a5\u0006\u0004\uffff\uffff\u0000"+ + "\u00a5\u00a6\u00051\u0000\u0000\u00a6\u00a7\u00052\u0000\u0000\u00a7\u00a8"+ + "\u0003.\u0017\u0000\u00a8\u00a9\u0006\u0004\uffff\uffff\u0000\u00a9\u00aa"+ + "\u0005\u0002\u0000\u0000\u00aa\t\u0001\u0000\u0000\u0000\u00ab\u00b7\u0006"+ + "\u0005\uffff\uffff\u0000\u00ac\u00ad\u00030\u0018\u0000\u00ad\u00b4\u0006"+ + "\u0005\uffff\uffff\u0000\u00ae\u00af\u00057\u0000\u0000\u00af\u00b0\u0003"+ + "0\u0018\u0000\u00b0\u00b1\u0006\u0005\uffff\uffff\u0000\u00b1\u00b3\u0001"+ + "\u0000\u0000\u0000\u00b2\u00ae\u0001\u0000\u0000\u0000\u00b3\u00b6\u0001"+ + "\u0000\u0000\u0000\u00b4\u00b2\u0001\u0000\u0000\u0000\u00b4\u00b5\u0001"+ + "\u0000\u0000\u0000\u00b5\u00b8\u0001\u0000\u0000\u0000\u00b6\u00b4\u0001"+ + "\u0000\u0000\u0000\u00b7\u00ac\u0001\u0000\u0000\u0000\u00b7\u00b8\u0001"+ + "\u0000\u0000\u0000\u00b8\u000b\u0001\u0000\u0000\u0000\u00b9\u00ba\u0006"+ + "\u0006\uffff\uffff\u0000\u00ba\u00be\u0005\u0007\u0000\u0000\u00bb\u00bc"+ + "\u00030\u0018\u0000\u00bc\u00bd\u0006\u0006\uffff\uffff\u0000\u00bd\u00bf"+ + "\u0001\u0000\u0000\u0000\u00be\u00bb\u0001\u0000\u0000\u0000\u00be\u00bf"+ + "\u0001\u0000\u0000\u0000\u00bf\u00c0\u0001\u0000\u0000\u0000\u00c0\u00c1"+ + "\u0005;\u0000\u0000\u00c1\r\u0001\u0000\u0000\u0000\u00c2\u00c3\u0006"+ + "\u0007\uffff\uffff\u0000\u00c3\u00c4\u0005\b\u0000\u0000\u00c4\u00c5\u0006"+ + "\u0007\uffff\uffff\u0000\u00c5\u00c6\u0003\u0010\b\u0000\u00c6\u00c7\u0006"+ + "\u0007\uffff\uffff\u0000\u00c7\u00c8\u0003.\u0017\u0000\u00c8\u00c9\u0006"+ + "\u0007\uffff\uffff\u0000\u00c9\u00d2\u0006\u0007\uffff\uffff\u0000\u00ca"+ + "\u00cb\u0005\n\u0000\u0000\u00cb\u00cc\u0003\u0010\b\u0000\u00cc\u00cd"+ + "\u0006\u0007\uffff\uffff\u0000\u00cd\u00ce\u0003.\u0017\u0000\u00ce\u00cf"+ + "\u0006\u0007\uffff\uffff\u0000\u00cf\u00d1\u0001\u0000\u0000\u0000\u00d0"+ + "\u00ca\u0001\u0000\u0000\u0000\u00d1\u00d4\u0001\u0000\u0000\u0000\u00d2"+ + "\u00d0\u0001\u0000\u0000\u0000\u00d2\u00d3\u0001\u0000\u0000\u0000\u00d3"+ + "\u00d9\u0001\u0000\u0000\u0000\u00d4\u00d2\u0001\u0000\u0000\u0000\u00d5"+ + "\u00d6\u0005\t\u0000\u0000\u00d6\u00d7\u0003.\u0017\u0000\u00d7\u00d8"+ + "\u0006\u0007\uffff\uffff\u0000\u00d8\u00da\u0001\u0000\u0000\u0000\u00d9"+ + "\u00d5\u0001\u0000\u0000\u0000\u00d9\u00da\u0001\u0000\u0000\u0000\u00da"+ + "\u00db\u0001\u0000\u0000\u0000\u00db\u00dc\u0006\u0007\uffff\uffff\u0000"+ + "\u00dc\u00dd\u0005\u0002\u0000\u0000\u00dd\u000f\u0001\u0000\u0000\u0000"+ + "\u00de\u00f3\u0006\b\uffff\uffff\u0000\u00df\u00e0\u00051\u0000\u0000"+ + "\u00e0\u00e1\u00030\u0018\u0000\u00e1\u00e2\u0006\b\uffff\uffff\u0000"+ + "\u00e2\u00ee\u00052\u0000\u0000\u00e3\u00e5\u0007\u0000\u0000\u0000\u00e4"+ + "\u00e6\u00051\u0000\u0000\u00e5\u00e4\u0001\u0000\u0000\u0000\u00e5\u00e6"+ + "\u0001\u0000\u0000\u0000\u00e6\u00e7\u0001\u0000\u0000\u0000\u00e7\u00e8"+ + "\u0003\u0010\b\u0000\u00e8\u00ea\u0006\b\uffff\uffff\u0000\u00e9\u00eb"+ + "\u00052\u0000\u0000\u00ea\u00e9\u0001\u0000\u0000\u0000\u00ea\u00eb\u0001"+ + "\u0000\u0000\u0000\u00eb\u00ed\u0001\u0000\u0000\u0000\u00ec\u00e3\u0001"+ + "\u0000\u0000\u0000\u00ed\u00f0\u0001\u0000\u0000\u0000\u00ee\u00ec\u0001"+ + "\u0000\u0000\u0000\u00ee\u00ef\u0001\u0000\u0000\u0000\u00ef\u00f2\u0001"+ + "\u0000\u0000\u0000\u00f0\u00ee\u0001\u0000\u0000\u0000\u00f1\u00df\u0001"+ + "\u0000\u0000\u0000\u00f2\u00f5\u0001\u0000\u0000\u0000\u00f3\u00f1\u0001"+ + "\u0000\u0000\u0000\u00f3\u00f4\u0001\u0000\u0000\u0000\u00f4\u0011\u0001"+ + "\u0000\u0000\u0000\u00f5\u00f3\u0001\u0000\u0000\u0000\u00f6\u00f7\u0005"+ + "\u0004\u0000\u0000\u00f7\u00f8\u00051\u0000\u0000\u00f8\u00f9\u00030\u0018"+ + "\u0000\u00f9\u00fa\u0006\t\uffff\uffff\u0000\u00fa\u00fb\u00052\u0000"+ + "\u0000\u00fb\u00fc\u0005;\u0000\u0000\u00fc\u0013\u0001\u0000\u0000\u0000"+ + "\u00fd\u00fe\u0005\u0006\u0000\u0000\u00fe\u00ff\u00051\u0000\u0000\u00ff"+ + "\u0100\u00030\u0018\u0000\u0100\u0101\u0006\n\uffff\uffff\u0000\u0101"+ + "\u0102\u00052\u0000\u0000\u0102\u0015\u0001\u0000\u0000\u0000\u0103\u0104"+ + "\u0005\u0005\u0000\u0000\u0104\u0105\u00051\u0000\u0000\u0105\u0106\u0003"+ + "0\u0018\u0000\u0106\u0107\u00057\u0000\u0000\u0107\u0108\u00030\u0018"+ + "\u0000\u0108\u0109\u00052\u0000\u0000\u0109\u010a\u0005;\u0000\u0000\u010a"+ + "\u010b\u0006\u000b\uffff\uffff\u0000\u010b\u0017\u0001\u0000\u0000\u0000"+ + "\u010c\u010d\u0005\u000e\u0000\u0000\u010d\u010e\u0005\u0011\u0000\u0000"+ + "\u010e\u010f\u0003\u001a\r\u0000\u010f\u0110\u0006\f\uffff\uffff\u0000"+ + "\u0110\u0111\u0005\u0002\u0000\u0000\u0111\u0019\u0001\u0000\u0000\u0000"+ + "\u0112\u0128\u0006\r\uffff\uffff\u0000\u0113\u0114\u0003,\u0016\u0000"+ + "\u0114\u0115\u0006\r\uffff\uffff\u0000\u0115\u0127\u0001\u0000\u0000\u0000"+ + "\u0116\u011b\u0005(\u0000\u0000\u0117\u0118\u0005\b\u0000\u0000\u0118"+ + "\u0119\u0003\u0010\b\u0000\u0119\u011a\u0006\r\uffff\uffff\u0000\u011a"+ + "\u011c\u0001\u0000\u0000\u0000\u011b\u0117\u0001\u0000\u0000\u0000\u011b"+ + "\u011c\u0001\u0000\u0000\u0000\u011c\u011d\u0001\u0000\u0000\u0000\u011d"+ + "\u0127\u0005;\u0000\u0000\u011e\u0123\u0005)\u0000\u0000\u011f\u0120\u0005"+ + "\b\u0000\u0000\u0120\u0121\u0003\u0010\b\u0000\u0121\u0122\u0006\r\uffff"+ + "\uffff\u0000\u0122\u0124\u0001\u0000\u0000\u0000\u0123\u011f\u0001\u0000"+ + "\u0000\u0000\u0123\u0124\u0001\u0000\u0000\u0000\u0124\u0125\u0001\u0000"+ + "\u0000\u0000\u0125\u0127\u0005;\u0000\u0000\u0126\u0113\u0001\u0000\u0000"+ + "\u0000\u0126\u0116\u0001\u0000\u0000\u0000\u0126\u011e\u0001\u0000\u0000"+ + "\u0000\u0127\u012a\u0001\u0000\u0000\u0000\u0128\u0126\u0001\u0000\u0000"+ + "\u0000\u0128\u0129\u0001\u0000\u0000\u0000\u0129\u012e\u0001\u0000\u0000"+ + "\u0000\u012a\u0128\u0001\u0000\u0000\u0000\u012b\u012c\u0003\f\u0006\u0000"+ + "\u012c\u012d\u0006\r\uffff\uffff\u0000\u012d\u012f\u0001\u0000\u0000\u0000"+ + "\u012e\u012b\u0001\u0000\u0000\u0000\u012e\u012f\u0001\u0000\u0000\u0000"+ + "\u012f\u001b\u0001\u0000\u0000\u0000\u0130\u0131\u0005\u000f\u0000\u0000"+ + "\u0131\u0132\u0005>\u0000\u0000\u0132\u0133\u0005\u0010\u0000\u0000\u0133"+ + "\u0134\u0003\u001e\u000f\u0000\u0134\u0135\u0003\u001a\r\u0000\u0135\u0136"+ + "\u0005\u0002\u0000\u0000\u0136\u0137\u0006\u000e\uffff\uffff\u0000\u0137"+ + "\u001d\u0001\u0000\u0000\u0000\u0138\u0139\u0006\u000f\uffff\uffff\u0000"+ + "\u0139\u013a\u00051\u0000\u0000\u013a\u013b\u00030\u0018\u0000\u013b\u013c"+ + "\u0006\u000f\uffff\uffff\u0000\u013c\u013d\u00059\u0000\u0000\u013d\u013e"+ + "\u00030\u0018\u0000\u013e\u013f\u0006\u000f\uffff\uffff\u0000\u013f\u0140"+ + "\u00052\u0000\u0000\u0140\u0152\u0001\u0000\u0000\u0000\u0141\u0142\u0005"+ + "3\u0000\u0000\u0142\u0143\u00030\u0018\u0000\u0143\u014a\u0006\u000f\uffff"+ + "\uffff\u0000\u0144\u0145\u00057\u0000\u0000\u0145\u0146\u00030\u0018\u0000"+ + "\u0146\u0147\u0006\u000f\uffff\uffff\u0000\u0147\u0149\u0001\u0000\u0000"+ + "\u0000\u0148\u0144\u0001\u0000\u0000\u0000\u0149\u014c\u0001\u0000\u0000"+ + "\u0000\u014a\u0148\u0001\u0000\u0000\u0000\u014a\u014b\u0001\u0000\u0000"+ + "\u0000\u014b\u014d\u0001\u0000\u0000\u0000\u014c\u014a\u0001\u0000\u0000"+ + "\u0000\u014d\u014e\u00054\u0000\u0000\u014e\u0152\u0001\u0000\u0000\u0000"+ + "\u014f\u0150\u0005>\u0000\u0000\u0150\u0152\u0006\u000f\uffff\uffff\u0000"+ + "\u0151\u0138\u0001\u0000\u0000\u0000\u0151\u0141\u0001\u0000\u0000\u0000"+ + "\u0151\u014f\u0001\u0000\u0000\u0000\u0152\u001f\u0001\u0000\u0000\u0000"+ + "\u0153\u0154\u0006\u0010\uffff\uffff\u0000\u0154\u0155\u00053\u0000\u0000"+ + "\u0155\u0156\u00030\u0018\u0000\u0156\u0157\u0005$\u0000\u0000\u0157\u0158"+ + "\u0005>\u0000\u0000\u0158\u0159\u0005*\u0000\u0000\u0159\u015a\u0003\u001e"+ + "\u000f\u0000\u015a\u015b\u00057\u0000\u0000\u015b\u015c\u00030\u0018\u0000"+ + "\u015c\u0163\u0006\u0010\uffff\uffff\u0000\u015d\u015e\u00057\u0000\u0000"+ + "\u015e\u015f\u00030\u0018\u0000\u015f\u0160\u0006\u0010\uffff\uffff\u0000"+ + "\u0160\u0162\u0001\u0000\u0000\u0000\u0161\u015d\u0001\u0000\u0000\u0000"+ + "\u0162\u0165\u0001\u0000\u0000\u0000\u0163\u0161\u0001\u0000\u0000\u0000"+ + "\u0163\u0164\u0001\u0000\u0000\u0000\u0164\u0166\u0001\u0000\u0000\u0000"+ + "\u0165\u0163\u0001\u0000\u0000\u0000\u0166\u0167\u0006\u0010\uffff\uffff"+ + "\u0000\u0167\u0168\u00054\u0000\u0000\u0168!\u0001\u0000\u0000\u0000\u0169"+ + "\u016a\u0005>\u0000\u0000\u016a\u016b\u00058\u0000\u0000\u016b\u016c\u0005"+ + "\r\u0000\u0000\u016c\u016d\u00051\u0000\u0000\u016d\u016e\u00030\u0018"+ + "\u0000\u016e\u016f\u00052\u0000\u0000\u016f\u0170\u0006\u0011\uffff\uffff"+ + "\u0000\u0170#\u0001\u0000\u0000\u0000\u0171\u0172\u0005\u0012\u0000\u0000"+ + "\u0172\u0173\u00051\u0000\u0000\u0173\u0174\u00030\u0018\u0000\u0174\u0175"+ + "\u00052\u0000\u0000\u0175\u0176\u0006\u0012\uffff\uffff\u0000\u0176%\u0001"+ + "\u0000\u0000\u0000\u0177\u0178\u0005\u0013\u0000\u0000\u0178\u0179\u0005"+ + "1\u0000\u0000\u0179\u017a\u00030\u0018\u0000\u017a\u017b\u00052\u0000"+ + "\u0000\u017b\u017c\u0006\u0013\uffff\uffff\u0000\u017c\'\u0001\u0000\u0000"+ + "\u0000\u017d\u017e\u0006\u0014\uffff\uffff\u0000\u017e\u0182\u0005>\u0000"+ + "\u0000\u017f\u0180\u0003*\u0015\u0000\u0180\u0181\u0006\u0014\uffff\uffff"+ + "\u0000\u0181\u0183\u0001\u0000\u0000\u0000\u0182\u017f\u0001\u0000\u0000"+ + "\u0000\u0182\u0183\u0001\u0000\u0000\u0000\u0183\u0190\u0001\u0000\u0000"+ + "\u0000\u0184\u0185\u00050\u0000\u0000\u0185\u0191\u0006\u0014\uffff\uffff"+ + "\u0000\u0186\u0187\u0005+\u0000\u0000\u0187\u0191\u0006\u0014\uffff\uffff"+ + "\u0000\u0188\u0189\u0005,\u0000\u0000\u0189\u0191\u0006\u0014\uffff\uffff"+ + "\u0000\u018a\u018b\u0005.\u0000\u0000\u018b\u0191\u0006\u0014\uffff\uffff"+ + "\u0000\u018c\u018d\u0005-\u0000\u0000\u018d\u0191\u0006\u0014\uffff\uffff"+ + "\u0000\u018e\u018f\u0005/\u0000\u0000\u018f\u0191\u0006\u0014\uffff\uffff"+ + "\u0000\u0190\u0184\u0001\u0000\u0000\u0000\u0190\u0186\u0001\u0000\u0000"+ + "\u0000\u0190\u0188\u0001\u0000\u0000\u0000\u0190\u018a\u0001\u0000\u0000"+ + "\u0000\u0190\u018c\u0001\u0000\u0000\u0000\u0190\u018e\u0001\u0000\u0000"+ + "\u0000\u0191\u0192\u0001\u0000\u0000\u0000\u0192\u0193\u00030\u0018\u0000"+ + "\u0193\u0194\u0005;\u0000\u0000\u0194\u0195\u0006\u0014\uffff\uffff\u0000"+ + "\u0195)\u0001\u0000\u0000\u0000\u0196\u0197\u00053\u0000\u0000\u0197\u0198"+ + "\u00030\u0018\u0000\u0198\u0199\u0006\u0015\uffff\uffff\u0000\u0199\u019a"+ + "\u00054\u0000\u0000\u019a+\u0001\u0000\u0000\u0000\u019b\u019c\u0003\u000e"+ + "\u0007\u0000\u019c\u019d\u0006\u0016\uffff\uffff\u0000\u019d\u01b2\u0001"+ + "\u0000\u0000\u0000\u019e\u019f\u0003\u0018\f\u0000\u019f\u01a0\u0006\u0016"+ + "\uffff\uffff\u0000\u01a0\u01b2\u0001\u0000\u0000\u0000\u01a1\u01a2\u0003"+ + "\u001c\u000e\u0000\u01a2\u01a3\u0006\u0016\uffff\uffff\u0000\u01a3\u01b2"+ + "\u0001\u0000\u0000\u0000\u01a4\u01a5\u0003\u0012\t\u0000\u01a5\u01a6\u0006"+ + "\u0016\uffff\uffff\u0000\u01a6\u01b2\u0001\u0000\u0000\u0000\u01a7\u01a8"+ + "\u0003\u0016\u000b\u0000\u01a8\u01a9\u0006\u0016\uffff\uffff\u0000\u01a9"+ + "\u01b2\u0001\u0000\u0000\u0000\u01aa\u01ab\u00030\u0018\u0000\u01ab\u01ac"+ + "\u0006\u0016\uffff\uffff\u0000\u01ac\u01ad\u0005;\u0000\u0000\u01ad\u01b2"+ + "\u0001\u0000\u0000\u0000\u01ae\u01af\u0003(\u0014\u0000\u01af\u01b0\u0006"+ + "\u0016\uffff\uffff\u0000\u01b0\u01b2\u0001\u0000\u0000\u0000\u01b1\u019b"+ + "\u0001\u0000\u0000\u0000\u01b1\u019e\u0001\u0000\u0000\u0000\u01b1\u01a1"+ + "\u0001\u0000\u0000\u0000\u01b1\u01a4\u0001\u0000\u0000\u0000\u01b1\u01a7"+ + "\u0001\u0000\u0000\u0000\u01b1\u01aa\u0001\u0000\u0000\u0000\u01b1\u01ae"+ + "\u0001\u0000\u0000\u0000\u01b2-\u0001\u0000\u0000\u0000\u01b3\u01b9\u0006"+ + "\u0017\uffff\uffff\u0000\u01b4\u01b5\u0003,\u0016\u0000\u01b5\u01b6\u0006"+ + "\u0017\uffff\uffff\u0000\u01b6\u01b8\u0001\u0000\u0000\u0000\u01b7\u01b4"+ + "\u0001\u0000\u0000\u0000\u01b8\u01bb\u0001\u0000\u0000\u0000\u01b9\u01b7"+ + "\u0001\u0000\u0000\u0000\u01b9\u01ba\u0001\u0000\u0000\u0000\u01ba\u01bf"+ + "\u0001\u0000\u0000\u0000\u01bb\u01b9\u0001\u0000\u0000\u0000\u01bc\u01bd"+ + "\u0003\f\u0006\u0000\u01bd\u01be\u0006\u0017\uffff\uffff\u0000\u01be\u01c0"+ + "\u0001\u0000\u0000\u0000\u01bf\u01bc\u0001\u0000\u0000\u0000\u01bf\u01c0"+ + "\u0001\u0000\u0000\u0000\u01c0/\u0001\u0000\u0000\u0000\u01c1\u01c2\u0006"+ + "\u0018\uffff\uffff\u0000\u01c2\u01c3\u00032\u0019\u0000\u01c3\u01c4\u0006"+ + "\u0018\uffff\uffff\u0000\u01c4\u01cc\u0001\u0000\u0000\u0000\u01c5\u01c6"+ + "\n\u0002\u0000\u0000\u01c6\u01c7\u0005%\u0000\u0000\u01c7\u01c8\u0003"+ + "2\u0019\u0000\u01c8\u01c9\u0006\u0018\uffff\uffff\u0000\u01c9\u01cb\u0001"+ + "\u0000\u0000\u0000\u01ca\u01c5\u0001\u0000\u0000\u0000\u01cb\u01ce\u0001"+ + "\u0000\u0000\u0000\u01cc\u01ca\u0001\u0000\u0000\u0000\u01cc\u01cd\u0001"+ + "\u0000\u0000\u0000\u01cd1\u0001\u0000\u0000\u0000\u01ce\u01cc\u0001\u0000"+ + "\u0000\u0000\u01cf\u01d0\u0006\u0019\uffff\uffff\u0000\u01d0\u01d1\u0003"+ + "4\u001a\u0000\u01d1\u01d2\u0006\u0019\uffff\uffff\u0000\u01d2\u01e0\u0001"+ + "\u0000\u0000\u0000\u01d3\u01d4\n\u0002\u0000\u0000\u01d4\u01d9\u0006\u0019"+ + "\uffff\uffff\u0000\u01d5\u01d6\u0005\u0018\u0000\u0000\u01d6\u01da\u0006"+ + "\u0019\uffff\uffff\u0000\u01d7\u01d8\u0005\u0019\u0000\u0000\u01d8\u01da"+ + "\u0006\u0019\uffff\uffff\u0000\u01d9\u01d5\u0001\u0000\u0000\u0000\u01d9"+ + "\u01d7\u0001\u0000\u0000\u0000\u01da\u01db\u0001\u0000\u0000\u0000\u01db"+ + "\u01dc\u00034\u001a\u0000\u01dc\u01dd\u0006\u0019\uffff\uffff\u0000\u01dd"+ + "\u01df\u0001\u0000\u0000\u0000\u01de\u01d3\u0001\u0000\u0000\u0000\u01df"+ + "\u01e2\u0001\u0000\u0000\u0000\u01e0\u01de\u0001\u0000\u0000\u0000\u01e0"+ + "\u01e1\u0001\u0000\u0000\u0000\u01e13\u0001\u0000\u0000\u0000\u01e2\u01e0"+ + "\u0001\u0000\u0000\u0000\u01e3\u01e4\u0006\u001a\uffff\uffff\u0000\u01e4"+ + "\u01e5\u00036\u001b\u0000\u01e5\u01e6\u0006\u001a\uffff\uffff\u0000\u01e6"+ + "\u01f8\u0001\u0000\u0000\u0000\u01e7\u01e8\n\u0002\u0000\u0000\u01e8\u01f1"+ + "\u0006\u001a\uffff\uffff\u0000\u01e9\u01ea\u0005\u001c\u0000\u0000\u01ea"+ + "\u01f2\u0006\u001a\uffff\uffff\u0000\u01eb\u01ec\u0005\u001d\u0000\u0000"+ + "\u01ec\u01f2\u0006\u001a\uffff\uffff\u0000\u01ed\u01ee\u0005\u001a\u0000"+ + "\u0000\u01ee\u01f2\u0006\u001a\uffff\uffff\u0000\u01ef\u01f0\u0005\u001b"+ + "\u0000\u0000\u01f0\u01f2\u0006\u001a\uffff\uffff\u0000\u01f1\u01e9\u0001"+ + "\u0000\u0000\u0000\u01f1\u01eb\u0001\u0000\u0000\u0000\u01f1\u01ed\u0001"+ + "\u0000\u0000\u0000\u01f1\u01ef\u0001\u0000\u0000\u0000\u01f2\u01f3\u0001"+ + "\u0000\u0000\u0000\u01f3\u01f4\u00036\u001b\u0000\u01f4\u01f5\u0006\u001a"+ + "\uffff\uffff\u0000\u01f5\u01f7\u0001\u0000\u0000\u0000\u01f6\u01e7\u0001"+ + "\u0000\u0000\u0000\u01f7\u01fa\u0001\u0000\u0000\u0000\u01f8\u01f6\u0001"+ + "\u0000\u0000\u0000\u01f8\u01f9\u0001\u0000\u0000\u0000\u01f95\u0001\u0000"+ + "\u0000\u0000\u01fa\u01f8\u0001\u0000\u0000\u0000\u01fb\u01fc\u0006\u001b"+ + "\uffff\uffff\u0000\u01fc\u01fd\u00038\u001c\u0000\u01fd\u01fe\u0006\u001b"+ + "\uffff\uffff\u0000\u01fe\u020c\u0001\u0000\u0000\u0000\u01ff\u0200\n\u0002"+ + "\u0000\u0000\u0200\u0205\u0006\u001b\uffff\uffff\u0000\u0201\u0202\u0005"+ + "\u0014\u0000\u0000\u0202\u0206\u0006\u001b\uffff\uffff\u0000\u0203\u0204"+ + "\u0005\u0015\u0000\u0000\u0204\u0206\u0006\u001b\uffff\uffff\u0000\u0205"+ + "\u0201\u0001\u0000\u0000\u0000\u0205\u0203\u0001\u0000\u0000\u0000\u0206"+ + "\u0207\u0001\u0000\u0000\u0000\u0207\u0208\u00038\u001c\u0000\u0208\u0209"+ + "\u0006\u001b\uffff\uffff\u0000\u0209\u020b\u0001\u0000\u0000\u0000\u020a"+ + "\u01ff\u0001\u0000\u0000\u0000\u020b\u020e\u0001\u0000\u0000\u0000\u020c"+ + "\u020a\u0001\u0000\u0000\u0000\u020c\u020d\u0001\u0000\u0000\u0000\u020d"+ + "7\u0001\u0000\u0000\u0000\u020e\u020c\u0001\u0000\u0000\u0000\u020f\u0210"+ + "\u0006\u001c\uffff\uffff\u0000\u0210\u0211\u0003:\u001d\u0000\u0211\u0212"+ + "\u0006\u001c\uffff\uffff\u0000\u0212\u0220\u0001\u0000\u0000\u0000\u0213"+ + "\u0214\n\u0002\u0000\u0000\u0214\u0219\u0006\u001c\uffff\uffff\u0000\u0215"+ + "\u0216\u0005\u0016\u0000\u0000\u0216\u021a\u0006\u001c\uffff\uffff\u0000"+ + "\u0217\u0218\u0005\u0017\u0000\u0000\u0218\u021a\u0006\u001c\uffff\uffff"+ + "\u0000\u0219\u0215\u0001\u0000\u0000\u0000\u0219\u0217\u0001\u0000\u0000"+ + "\u0000\u021a\u021b\u0001\u0000\u0000\u0000\u021b\u021c\u0003:\u001d\u0000"+ + "\u021c\u021d\u0006\u001c\uffff\uffff\u0000\u021d\u021f\u0001\u0000\u0000"+ + "\u0000\u021e\u0213\u0001\u0000\u0000\u0000\u021f\u0222\u0001\u0000\u0000"+ + "\u0000\u0220\u021e\u0001\u0000\u0000\u0000\u0220\u0221\u0001\u0000\u0000"+ + "\u0000\u02219\u0001\u0000\u0000\u0000\u0222\u0220\u0001\u0000\u0000\u0000"+ + "\u0223\u022c\u0006\u001d\uffff\uffff\u0000\u0224\u0225\u0005 \u0000\u0000"+ + "\u0225\u022d\u0006\u001d\uffff\uffff\u0000\u0226\u0227\u0005\u0015\u0000"+ + "\u0000\u0227\u022d\u0006\u001d\uffff\uffff\u0000\u0228\u0229\u0005!\u0000"+ + "\u0000\u0229\u022d\u0006\u001d\uffff\uffff\u0000\u022a\u022b\u0005\"\u0000"+ + "\u0000\u022b\u022d\u0006\u001d\uffff\uffff\u0000\u022c\u0224\u0001\u0000"+ + "\u0000\u0000\u022c\u0226\u0001\u0000\u0000\u0000\u022c\u0228\u0001\u0000"+ + "\u0000\u0000\u022c\u022a\u0001\u0000\u0000\u0000\u022d\u022e\u0001\u0000"+ + "\u0000\u0000\u022e\u022f\u0003<\u001e\u0000\u022f\u0230\u0006\u001d\uffff"+ + "\uffff\u0000\u0230\u0235\u0001\u0000\u0000\u0000\u0231\u0232\u0003<\u001e"+ + "\u0000\u0232\u0233\u0006\u001d\uffff\uffff\u0000\u0233\u0235\u0001\u0000"+ + "\u0000\u0000\u0234\u0223\u0001\u0000\u0000\u0000\u0234\u0231\u0001\u0000"+ + "\u0000\u0000\u0235;\u0001\u0000\u0000\u0000\u0236\u0237\u0006\u001e\uffff"+ + "\uffff\u0000\u0237\u023f\u0003>\u001f\u0000\u0238\u0239\u00051\u0000\u0000"+ + "\u0239\u023a\u0003\n\u0005\u0000\u023a\u023b\u0006\u001e\uffff\uffff\u0000"+ + "\u023b\u023c\u00052\u0000\u0000\u023c\u023e\u0001\u0000\u0000\u0000\u023d"+ + "\u0238\u0001\u0000\u0000\u0000\u023e\u0241\u0001\u0000\u0000\u0000\u023f"+ + "\u023d\u0001\u0000\u0000\u0000\u023f\u0240\u0001\u0000\u0000\u0000\u0240"+ + "\u0247\u0001\u0000\u0000\u0000\u0241\u023f\u0001\u0000\u0000\u0000\u0242"+ + "\u0243\u0003*\u0015\u0000\u0243\u0244\u0006\u001e\uffff\uffff\u0000\u0244"+ + "\u0246\u0001\u0000\u0000\u0000\u0245\u0242\u0001\u0000\u0000\u0000\u0246"+ + "\u0249\u0001\u0000\u0000\u0000\u0247\u0245\u0001\u0000\u0000\u0000\u0247"+ + "\u0248\u0001\u0000\u0000\u0000\u0248\u024a\u0001\u0000\u0000\u0000\u0249"+ + "\u0247\u0001\u0000\u0000\u0000\u024a\u024b\u0006\u001e\uffff\uffff\u0000"+ + "\u024b=\u0001\u0000\u0000\u0000\u024c\u024d\u0003B!\u0000\u024d\u024e"+ + "\u0006\u001f\uffff\uffff\u0000\u024e\u026b\u0001\u0000\u0000\u0000\u024f"+ + "\u0250\u0005>\u0000\u0000\u0250\u026b\u0006\u001f\uffff\uffff\u0000\u0251"+ + "\u0252\u0003@ \u0000\u0252\u0253\u0006\u001f\uffff\uffff\u0000\u0253\u026b"+ + "\u0001\u0000\u0000\u0000\u0254\u0255\u0003$\u0012\u0000\u0255\u0256\u0006"+ + "\u001f\uffff\uffff\u0000\u0256\u026b\u0001\u0000\u0000\u0000\u0257\u0258"+ + "\u0003&\u0013\u0000\u0258\u0259\u0006\u001f\uffff\uffff\u0000\u0259\u026b"+ + "\u0001\u0000\u0000\u0000\u025a\u025b\u0003\"\u0011\u0000\u025b\u025c\u0006"+ + "\u001f\uffff\uffff\u0000\u025c\u026b\u0001\u0000\u0000\u0000\u025d\u025e"+ + "\u0003 \u0010\u0000\u025e\u025f\u0006\u001f\uffff\uffff\u0000\u025f\u026b"+ + "\u0001\u0000\u0000\u0000\u0260\u0261\u0003\u0014\n\u0000\u0261\u0262\u0006"+ + "\u001f\uffff\uffff\u0000\u0262\u026b\u0001\u0000\u0000\u0000\u0263\u0267"+ + "\u00051\u0000\u0000\u0264\u0265\u00030\u0018\u0000\u0265\u0266\u0006\u001f"+ + "\uffff\uffff\u0000\u0266\u0268\u0001\u0000\u0000\u0000\u0267\u0264\u0001"+ + "\u0000\u0000\u0000\u0267\u0268\u0001\u0000\u0000\u0000\u0268\u0269\u0001"+ + "\u0000\u0000\u0000\u0269\u026b\u00052\u0000\u0000\u026a\u024c\u0001\u0000"+ + "\u0000\u0000\u026a\u024f\u0001\u0000\u0000\u0000\u026a\u0251\u0001\u0000"+ + "\u0000\u0000\u026a\u0254\u0001\u0000\u0000\u0000\u026a\u0257\u0001\u0000"+ + "\u0000\u0000\u026a\u025a\u0001\u0000\u0000\u0000\u026a\u025d\u0001\u0000"+ + "\u0000\u0000\u026a\u0260\u0001\u0000\u0000\u0000\u026a\u0263\u0001\u0000"+ + "\u0000\u0000\u026b?\u0001\u0000\u0000\u0000\u026c\u026d\u0005*\u0000\u0000"+ + "\u026d\u026e\u0003\u0004\u0002\u0000\u026e\u026f\u00055\u0000\u0000\u026f"+ + "\u0270\u0003.\u0017\u0000\u0270\u0271\u00056\u0000\u0000\u0271\u0272\u0003"+ + "\n\u0005\u0000\u0272\u0273\u0006 \uffff\uffff\u0000\u0273A\u0001\u0000"+ + "\u0000\u0000\u0274\u0275\u0003F#\u0000\u0275\u0276\u0006!\uffff\uffff"+ + "\u0000\u0276\u0284\u0001\u0000\u0000\u0000\u0277\u0278\u0005?\u0000\u0000"+ + "\u0278\u0284\u0006!\uffff\uffff\u0000\u0279\u027a\u0005<\u0000\u0000\u027a"+ + "\u0284\u0006!\uffff\uffff\u0000\u027b\u027c\u0005=\u0000\u0000\u027c\u0284"+ + "\u0006!\uffff\uffff\u0000\u027d\u027e\u0003D\"\u0000\u027e\u027f\u0006"+ + "!\uffff\uffff\u0000\u027f\u0284\u0001\u0000\u0000\u0000\u0280\u0281\u0003"+ + "H$\u0000\u0281\u0282\u0006!\uffff\uffff\u0000\u0282\u0284\u0001\u0000"+ + "\u0000\u0000\u0283\u0274\u0001\u0000\u0000\u0000\u0283\u0277\u0001\u0000"+ + "\u0000\u0000\u0283\u0279\u0001\u0000\u0000\u0000\u0283\u027b\u0001\u0000"+ + "\u0000\u0000\u0283\u027d\u0001\u0000\u0000\u0000\u0283\u0280\u0001\u0000"+ + "\u0000\u0000\u0284C\u0001\u0000\u0000\u0000\u0285\u0286\u00053\u0000\u0000"+ + "\u0286\u0287\u0003\n\u0005\u0000\u0287\u0288\u00054\u0000\u0000\u0288"+ + "\u0289\u0006\"\uffff\uffff\u0000\u0289E\u0001\u0000\u0000\u0000\u028a"+ + "\u028b\u0005&\u0000\u0000\u028b\u028f\u0006#\uffff\uffff\u0000\u028c\u028d"+ + "\u0005\'\u0000\u0000\u028d\u028f\u0006#\uffff\uffff\u0000\u028e\u028a"+ + "\u0001\u0000\u0000\u0000\u028e\u028c\u0001\u0000\u0000\u0000\u028fG\u0001"+ + "\u0000\u0000\u0000\u0290\u0291\u0005\u000b\u0000\u0000\u0291\u0292\u0005"+ + "1\u0000\u0000\u0292\u0293\u0005:\u0000\u0000\u0293\u0294\u0005>\u0000"+ + "\u0000\u0294\u0295\u00052\u0000\u0000\u0295\u0296\u0006$\uffff\uffff\u0000"+ + "\u0296I\u0001\u0000\u0000\u0000.QSm\u0080\u0085\u0087\u009c\u00b4\u00b7"+ + "\u00be\u00d2\u00d9\u00e5\u00ea\u00ee\u00f3\u011b\u0123\u0126\u0128\u012e"+ + "\u014a\u0151\u0163\u0182\u0190\u01b1\u01b9\u01bf\u01cc\u01d9\u01e0\u01f1"+ + "\u01f8\u0205\u020c\u0219\u0220\u022c\u0234\u023f\u0247\u0267\u026a\u0283"+ + "\u028e"; + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} \ No newline at end of file diff --git a/Phase1Template/untitled/src/parsers/FunctionCraftVisitor.java b/Phase1Template/untitled/src/parsers/FunctionCraftVisitor.java new file mode 100644 index 0000000..776a2ad --- /dev/null +++ b/Phase1Template/untitled/src/parsers/FunctionCraftVisitor.java @@ -0,0 +1,244 @@ +// Generated from U:/UT/6/PLC_TA/Design-Compiler-Course-Projects/Phase2Template/Phase2/src/main/grammer/FunctionCraft.g4 by ANTLR 4.13.1 +package /parsers; + + import main.ast.node.*; + import main.ast.node.declaration.*; + import main.ast.node.statement.*; + import main.ast.node.expression.*; + import main.ast.node.expression.operators.*; + import main.ast.node.expression.value.*; + import main.ast.node.expression.primitive.*; + +import org.antlr.v4.runtime.tree.ParseTreeVisitor; + +/** + * This interface defines a complete generic visitor for a parse tree produced + * by {@link FunctionCraftParser}. + * + * @param The return type of the visit operation. Use {@link Void} for + * operations with no return type. + */ +public interface FunctionCraftVisitor extends ParseTreeVisitor { + /** + * Visit a parse tree produced by {@link FunctionCraftParser#program}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitProgram(FunctionCraftParser.ProgramContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#functionDeclaration}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitFunctionDeclaration(FunctionCraftParser.FunctionDeclarationContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#functionArgumentsDeclaration}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitFunctionArgumentsDeclaration(FunctionCraftParser.FunctionArgumentsDeclarationContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#patternMatching}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitPatternMatching(FunctionCraftParser.PatternMatchingContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#main}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitMain(FunctionCraftParser.MainContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#functionArguments}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitFunctionArguments(FunctionCraftParser.FunctionArgumentsContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#returnStatement}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitReturnStatement(FunctionCraftParser.ReturnStatementContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#ifStatement}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitIfStatement(FunctionCraftParser.IfStatementContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#condition}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitCondition(FunctionCraftParser.ConditionContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#putsStatement}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitPutsStatement(FunctionCraftParser.PutsStatementContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#lenStatement}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitLenStatement(FunctionCraftParser.LenStatementContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#pushStatement}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitPushStatement(FunctionCraftParser.PushStatementContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#loopDoStatement}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitLoopDoStatement(FunctionCraftParser.LoopDoStatementContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#loopBody}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitLoopBody(FunctionCraftParser.LoopBodyContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#forStatement}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitForStatement(FunctionCraftParser.ForStatementContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#range}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitRange(FunctionCraftParser.RangeContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#filterStatement}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitFilterStatement(FunctionCraftParser.FilterStatementContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#matchPatternStatement}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitMatchPatternStatement(FunctionCraftParser.MatchPatternStatementContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#chopStatement}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitChopStatement(FunctionCraftParser.ChopStatementContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#chompStatement}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitChompStatement(FunctionCraftParser.ChompStatementContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#assignment}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitAssignment(FunctionCraftParser.AssignmentContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#accessList}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitAccessList(FunctionCraftParser.AccessListContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#statement}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitStatement(FunctionCraftParser.StatementContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#body}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitBody(FunctionCraftParser.BodyContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#expression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitExpression(FunctionCraftParser.ExpressionContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#eqaulityExpression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitEqaulityExpression(FunctionCraftParser.EqaulityExpressionContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#relationalExpression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitRelationalExpression(FunctionCraftParser.RelationalExpressionContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#additiveExpression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitAdditiveExpression(FunctionCraftParser.AdditiveExpressionContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#multiplicativeExpression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitMultiplicativeExpression(FunctionCraftParser.MultiplicativeExpressionContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#preUnaryExpression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitPreUnaryExpression(FunctionCraftParser.PreUnaryExpressionContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#accessExpression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitAccessExpression(FunctionCraftParser.AccessExpressionContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#otherExpression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitOtherExpression(FunctionCraftParser.OtherExpressionContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#lambdaFunction}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitLambdaFunction(FunctionCraftParser.LambdaFunctionContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#values}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitValues(FunctionCraftParser.ValuesContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#listValue}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitListValue(FunctionCraftParser.ListValueContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#boolValue}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitBoolValue(FunctionCraftParser.BoolValueContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#functionPointer}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitFunctionPointer(FunctionCraftParser.FunctionPointerContext ctx); +} \ No newline at end of file diff --git a/Phase2/Jepeto-Compiler-main/.idea/misc.xml b/Phase2/Jepeto-Compiler-main/.idea/misc.xml index c8c822e..a256553 100644 --- a/Phase2/Jepeto-Compiler-main/.idea/misc.xml +++ b/Phase2/Jepeto-Compiler-main/.idea/misc.xml @@ -1,3 +1,4 @@ + - + \ No newline at end of file diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/Jepeto.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/Jepeto.class index 0b05bd6..2c606bb 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/Jepeto.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/Jepeto.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/JepetoCompiler.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/JepetoCompiler.class index c1dc003..35075df 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/JepetoCompiler.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/JepetoCompiler.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/Node.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/Node.class index bc53763..2e9bc9e 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/Node.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/Node.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/Program.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/Program.class index 23200cd..18fa84d 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/Program.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/Program.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/declaration/Declaration.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/declaration/Declaration.class index 9f1a75b..5ad92d4 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/declaration/Declaration.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/declaration/Declaration.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/declaration/FunctionDeclaration.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/declaration/FunctionDeclaration.class index e06ecd0..6f6ac1a 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/declaration/FunctionDeclaration.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/declaration/FunctionDeclaration.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/declaration/MainDeclaration.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/declaration/MainDeclaration.class index 797ee9f..cd4750d 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/declaration/MainDeclaration.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/declaration/MainDeclaration.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/AnonymousFunction.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/AnonymousFunction.class index a54a24a..1af10e1 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/AnonymousFunction.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/AnonymousFunction.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/BinaryExpression.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/BinaryExpression.class index 2ffe8ac..2228c6c 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/BinaryExpression.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/BinaryExpression.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/Expression.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/Expression.class index aaccfdc..dc65ad1 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/Expression.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/Expression.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/FunctionCall.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/FunctionCall.class index 5aeb9b5..c82959a 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/FunctionCall.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/FunctionCall.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/Identifier.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/Identifier.class index bcaa2ea..59d5822 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/Identifier.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/Identifier.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/ListAccessByIndex.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/ListAccessByIndex.class index 4e07333..fdaf939 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/ListAccessByIndex.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/ListAccessByIndex.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/ListSize.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/ListSize.class index 4a16ea0..9a66dd9 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/ListSize.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/ListSize.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/UnaryExpression.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/UnaryExpression.class index 37bd9aa..9f59617 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/UnaryExpression.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/UnaryExpression.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/operators/BinaryOperator.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/operators/BinaryOperator.class index a6ec3d7..35b6f76 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/operators/BinaryOperator.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/operators/BinaryOperator.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/operators/UnaryOperator.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/operators/UnaryOperator.class index 76aad39..5d46235 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/operators/UnaryOperator.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/operators/UnaryOperator.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/values/ListValue.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/values/ListValue.class index 8759769..795847c 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/values/ListValue.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/values/ListValue.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/values/Value.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/values/Value.class index 4fd690f..932c05e 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/values/Value.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/values/Value.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/values/VoidValue.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/values/VoidValue.class index 42072e4..ded218b 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/values/VoidValue.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/values/VoidValue.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/values/primitive/BoolValue.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/values/primitive/BoolValue.class index 484be92..5753848 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/values/primitive/BoolValue.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/values/primitive/BoolValue.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/values/primitive/IntValue.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/values/primitive/IntValue.class index 0c03ccb..79af5a0 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/values/primitive/IntValue.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/values/primitive/IntValue.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/values/primitive/StringValue.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/values/primitive/StringValue.class index be23378..143f596 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/values/primitive/StringValue.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/expression/values/primitive/StringValue.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/statement/BlockStmt.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/statement/BlockStmt.class index da0b952..bbb857a 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/statement/BlockStmt.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/statement/BlockStmt.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/statement/ConditionalStmt.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/statement/ConditionalStmt.class index ac46018..186f759 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/statement/ConditionalStmt.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/statement/ConditionalStmt.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/statement/FunctionCallStmt.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/statement/FunctionCallStmt.class index 65a83a7..9f0291e 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/statement/FunctionCallStmt.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/statement/FunctionCallStmt.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/statement/PrintStmt.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/statement/PrintStmt.class index 311e611..825d8cb 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/statement/PrintStmt.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/statement/PrintStmt.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/statement/ReturnStmt.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/statement/ReturnStmt.class index 26c4949..405bbde 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/statement/ReturnStmt.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/statement/ReturnStmt.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/statement/Statement.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/statement/Statement.class index 8ba85ad..75a6d6c 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/statement/Statement.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/ast/nodes/statement/Statement.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/compileErrors/CompileError.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/compileErrors/CompileError.class index ce0c855..e9a467f 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/compileErrors/CompileError.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/compileErrors/CompileError.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/compileErrors/nameErrors/ArgumentNotDeclared.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/compileErrors/nameErrors/ArgumentNotDeclared.class index 21d9c5c..8ba038c 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/compileErrors/nameErrors/ArgumentNotDeclared.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/compileErrors/nameErrors/ArgumentNotDeclared.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/compileErrors/nameErrors/DuplicateArgument.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/compileErrors/nameErrors/DuplicateArgument.class index e9c1bd1..dba5707 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/compileErrors/nameErrors/DuplicateArgument.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/compileErrors/nameErrors/DuplicateArgument.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/compileErrors/nameErrors/DuplicateFunction.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/compileErrors/nameErrors/DuplicateFunction.class index a547bf8..33a4098 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/compileErrors/nameErrors/DuplicateFunction.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/compileErrors/nameErrors/DuplicateFunction.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/compileErrors/nameErrors/FunctionNotDeclared.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/compileErrors/nameErrors/FunctionNotDeclared.class index 01a6df8..f0c2e8b 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/compileErrors/nameErrors/FunctionNotDeclared.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/compileErrors/nameErrors/FunctionNotDeclared.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/compileErrors/nameErrors/NameConflict.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/compileErrors/nameErrors/NameConflict.class index fdbabfa..b5058d5 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/compileErrors/nameErrors/NameConflict.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/compileErrors/nameErrors/NameConflict.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/compileErrors/nameErrors/VariableNotDeclared.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/compileErrors/nameErrors/VariableNotDeclared.class index 2c8d548..9396613 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/compileErrors/nameErrors/VariableNotDeclared.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/compileErrors/nameErrors/VariableNotDeclared.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/symbolTable/SymbolTable.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/symbolTable/SymbolTable.class index 5f7a248..1947c6c 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/symbolTable/SymbolTable.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/symbolTable/SymbolTable.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/symbolTable/exceptions/ItemAlreadyExistsException.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/symbolTable/exceptions/ItemAlreadyExistsException.class index 66152a8..1e817be 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/symbolTable/exceptions/ItemAlreadyExistsException.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/symbolTable/exceptions/ItemAlreadyExistsException.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/symbolTable/exceptions/ItemNotFoundException.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/symbolTable/exceptions/ItemNotFoundException.class index dac83f5..5100e5d 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/symbolTable/exceptions/ItemNotFoundException.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/symbolTable/exceptions/ItemNotFoundException.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/symbolTable/items/FunctionSymbolTableItem.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/symbolTable/items/FunctionSymbolTableItem.class index 52ee1f9..8e9f682 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/symbolTable/items/FunctionSymbolTableItem.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/symbolTable/items/FunctionSymbolTableItem.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/symbolTable/items/SymbolTableItem.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/symbolTable/items/SymbolTableItem.class index 67d1172..d7d25b1 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/symbolTable/items/SymbolTableItem.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/symbolTable/items/SymbolTableItem.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/symbolTable/items/VariableSymbolTableItem.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/symbolTable/items/VariableSymbolTableItem.class index 86454ab..df85902 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/symbolTable/items/VariableSymbolTableItem.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/symbolTable/items/VariableSymbolTableItem.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/symbolTable/utils/Stack.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/symbolTable/utils/Stack.class index c51e662..e46a4f2 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/symbolTable/utils/Stack.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/symbolTable/utils/Stack.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/visitor/ASTErrorDetector.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/visitor/ASTErrorDetector.class index 7e337e3..0d1b2fb 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/visitor/ASTErrorDetector.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/visitor/ASTErrorDetector.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/visitor/ASTTreePrinter.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/visitor/ASTTreePrinter.class index 45e360b..a2723fc 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/visitor/ASTTreePrinter.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/visitor/ASTTreePrinter.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/visitor/IVisitor.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/visitor/IVisitor.class index 64918f3..973fe98 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/visitor/IVisitor.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/visitor/IVisitor.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/visitor/Visitor.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/visitor/Visitor.class index ad7957d..6a63dec 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/visitor/Visitor.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/main/visitor/Visitor.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoBaseListener.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoBaseListener.class index 43c7590..df74a7d 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoBaseListener.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoBaseListener.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoBaseVisitor.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoBaseVisitor.class index 3eeeb18..844aef8 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoBaseVisitor.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoBaseVisitor.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoLexer.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoLexer.class index dd27b8b..ba7c611 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoLexer.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoLexer.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoListener.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoListener.class index 2849708..048f3b6 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoListener.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoListener.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$AccessExpressionContext.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$AccessExpressionContext.class index 7078542..7eda56d 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$AccessExpressionContext.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$AccessExpressionContext.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$AdditiveExpressionContext.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$AdditiveExpressionContext.class index 8b77217..ba1a90b 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$AdditiveExpressionContext.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$AdditiveExpressionContext.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$AndExpressionContext.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$AndExpressionContext.class index 0b45132..6492991 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$AndExpressionContext.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$AndExpressionContext.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$AnonymousFunctionContext.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$AnonymousFunctionContext.class index c5ac0f1..6753ce3 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$AnonymousFunctionContext.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$AnonymousFunctionContext.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$AppendExpressionContext.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$AppendExpressionContext.class index 6afbf5a..8404e69 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$AppendExpressionContext.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$AppendExpressionContext.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$BlockContext.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$BlockContext.class index c97ceb1..eca8be9 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$BlockContext.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$BlockContext.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$BodyContext.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$BodyContext.class index e3d1d1c..dcef8fc 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$BodyContext.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$BodyContext.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$BoolValueContext.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$BoolValueContext.class index 8da0e00..776e4cb 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$BoolValueContext.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$BoolValueContext.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$ConditionBodyContext.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$ConditionBodyContext.class index 0327a8b..6873968 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$ConditionBodyContext.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$ConditionBodyContext.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$EqualityExpressionContext.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$EqualityExpressionContext.class index 9de5a4a..7998710 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$EqualityExpressionContext.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$EqualityExpressionContext.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$ExpressionContext.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$ExpressionContext.class index 8e393a0..c3c5666 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$ExpressionContext.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$ExpressionContext.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$FunctionArgumentsContext.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$FunctionArgumentsContext.class index daa153e..6cc81a7 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$FunctionArgumentsContext.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$FunctionArgumentsContext.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$FunctionArgumentsDeclarationContext.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$FunctionArgumentsDeclarationContext.class index 2809f4c..74b26f9 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$FunctionArgumentsDeclarationContext.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$FunctionArgumentsDeclarationContext.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$FunctionCallContext.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$FunctionCallContext.class index 8ac129e..41a4101 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$FunctionCallContext.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$FunctionCallContext.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$FunctionCallStatementContext.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$FunctionCallStatementContext.class index 7f61c20..e7763ca 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$FunctionCallStatementContext.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$FunctionCallStatementContext.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$FunctionDeclarationContext.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$FunctionDeclarationContext.class index ee38216..a05e7a6 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$FunctionDeclarationContext.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$FunctionDeclarationContext.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$IdentifierContext.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$IdentifierContext.class index df7a7dc..5493112 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$IdentifierContext.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$IdentifierContext.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$IfStatementContext.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$IfStatementContext.class index ccb1efd..b3a1602 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$IfStatementContext.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$IfStatementContext.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$IfStatementWithReturnContext.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$IfStatementWithReturnContext.class index b495324..61efbb0 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$IfStatementWithReturnContext.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$IfStatementWithReturnContext.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$JepetoContext.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$JepetoContext.class index ea875d0..e8eb5a9 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$JepetoContext.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$JepetoContext.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$ListValueContext.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$ListValueContext.class index 9d0ba3e..5f1e568 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$ListValueContext.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$ListValueContext.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$MainContext.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$MainContext.class index fa5cd58..9bcbe6c 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$MainContext.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$MainContext.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$MultiplicativeExpressionContext.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$MultiplicativeExpressionContext.class index 686ebb8..2ea9704 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$MultiplicativeExpressionContext.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$MultiplicativeExpressionContext.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$OtherExpressionContext.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$OtherExpressionContext.class index 59b0c68..6fa1a61 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$OtherExpressionContext.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$OtherExpressionContext.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$PreUnaryExpressionContext.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$PreUnaryExpressionContext.class index 3deec59..c48b892 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$PreUnaryExpressionContext.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$PreUnaryExpressionContext.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$PrintStatementContext.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$PrintStatementContext.class index b694ea2..d3bf8dc 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$PrintStatementContext.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$PrintStatementContext.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$ProgramContext.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$ProgramContext.class index 39edba1..3222ae4 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$ProgramContext.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$ProgramContext.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$RelationalExpressionContext.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$RelationalExpressionContext.class index 5c2d098..0a10460 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$RelationalExpressionContext.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$RelationalExpressionContext.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$ReturnStatementContext.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$ReturnStatementContext.class index 807433c..4ed1897 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$ReturnStatementContext.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$ReturnStatementContext.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$SingleStatementContext.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$SingleStatementContext.class index dc52cdf..6701363 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$SingleStatementContext.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$SingleStatementContext.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$SizeExpressionContext.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$SizeExpressionContext.class index 3a3061e..8f0801b 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$SizeExpressionContext.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$SizeExpressionContext.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$SplitedExpressionsWithCommaAndKeyContext.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$SplitedExpressionsWithCommaAndKeyContext.class index 3fc9961..083f7f1 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$SplitedExpressionsWithCommaAndKeyContext.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$SplitedExpressionsWithCommaAndKeyContext.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$SplitedExpressionsWithCommaContext.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$SplitedExpressionsWithCommaContext.class index c19d25f..454a4c2 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$SplitedExpressionsWithCommaContext.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$SplitedExpressionsWithCommaContext.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$StatementContext.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$StatementContext.class index 7f6de88..7e5a656 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$StatementContext.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$StatementContext.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$ValuesContext.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$ValuesContext.class index 6ee6571..78e770f 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$ValuesContext.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$ValuesContext.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$VoidValueContext.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$VoidValueContext.class index 6b03318..83cad2f 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$VoidValueContext.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser$VoidValueContext.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser.class index 22a4dac..7dd0229 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoParser.class differ diff --git a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoVisitor.class b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoVisitor.class index 2008902..22c7937 100644 Binary files a/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoVisitor.class and b/Phase2/Jepeto-Compiler-main/out/production/Jepeto-Phase2/parsers/JepetoVisitor.class differ diff --git a/Phase2/Jepeto-Compiler-main/samples/sample1.jp b/Phase2/Jepeto-Compiler-main/samples/sample1.jp index 815a662..fab0904 100644 --- a/Phase2/Jepeto-Compiler-main/samples/sample1.jp +++ b/Phase2/Jepeto-Compiler-main/samples/sample1.jp @@ -1,17 +1,77 @@ -main : f1(a = 2, b = "stign"); +main: f(a = 1, + c = 2); +func f(a, + b):{ + return dd; + if a > + b: + return + d; + else: + return + e; -func f1(b, a, c) : { - print(a + b); - if (c) : - { + return + f; + print( + g()); +} + +func f(a, + c): +{ + return a; + print( + h(a = 1, + b = 2)); +} + +func f(x, + y): + return + x; + +func g(a, b, c, + a, b, + b):{ + return a; + return f(x = 1, + y = 2); } - f2(a::b::(c or ~c)::a.size); +func plc(): return - void; + plc(); + +func PLC(plc, + os, + db): + return plc + + os + + db * + a + + CN; + +func CN(a, aa, + aaa, aaaa):{ + print(a + + aa + + + aa); + return Cn(1, + + 2, + + 3); } -func f2() : - return (a, b) -> {return a + f4();}; +func conflict(f, + + +PLC): + return + + Cn(a = 50); +func abbas(a):{return cos(a);} \ No newline at end of file diff --git a/Phase2/Jepeto-Compiler-main/src/main/visitor/ASTErrorDetector.java b/Phase2/Jepeto-Compiler-main/src/main/visitor/ASTErrorDetector.java index 8d4c925..9d49f34 100644 --- a/Phase2/Jepeto-Compiler-main/src/main/visitor/ASTErrorDetector.java +++ b/Phase2/Jepeto-Compiler-main/src/main/visitor/ASTErrorDetector.java @@ -131,17 +131,17 @@ public Boolean visit(FunctionDeclaration funcDeclaration) { System.out.println(error_msg); } } -// try { -// String key = "Function_" + funcDeclaration.getFunctionName().getName(); -// FunctionSymbolTableItem functionSymbolTableItem = (FunctionSymbolTableItem) SymbolTable.root.getItem(key); -// SymbolTable hello = functionSymbolTableItem.getFunctionSymbolTable(); -// functionSymbolTableItem.setFunctionSymbolTable(functionSymbolTable); -// } catch (ItemNotFoundException ignored) { -// -// } -// SymbolTable.push(functionSymbolTable); + try { + String key = "Function_" + funcDeclaration.getFunctionName().getName(); + FunctionSymbolTableItem functionSymbolTableItem = (FunctionSymbolTableItem) SymbolTable.root.getItem(key); + SymbolTable hello = functionSymbolTableItem.getFunctionSymbolTable(); + functionSymbolTableItem.setFunctionSymbolTable(functionSymbolTable); + } catch (ItemNotFoundException ignored) { + + } + SymbolTable.push(functionSymbolTable); funcDeclaration.getBody().accept(this); -// SymbolTable.pop(); + SymbolTable.pop(); return null; } diff --git a/Phase2Template/.idea/.gitignore b/Phase2Template/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/Phase2Template/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/Phase2Template/.idea/libraries/antlr_4_13_1_complete.xml b/Phase2Template/.idea/libraries/antlr_4_13_1_complete.xml new file mode 100644 index 0000000..c1a2632 --- /dev/null +++ b/Phase2Template/.idea/libraries/antlr_4_13_1_complete.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/Phase2Template/.idea/misc.xml b/Phase2Template/.idea/misc.xml new file mode 100644 index 0000000..3d8f1a6 --- /dev/null +++ b/Phase2Template/.idea/misc.xml @@ -0,0 +1,32 @@ + + + + + + + + + \ No newline at end of file diff --git a/Phase2Template/.idea/modules.xml b/Phase2Template/.idea/modules.xml new file mode 100644 index 0000000..22a3745 --- /dev/null +++ b/Phase2Template/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/Phase2Template/.idea/uiDesigner.xml b/Phase2Template/.idea/uiDesigner.xml new file mode 100644 index 0000000..2b63946 --- /dev/null +++ b/Phase2Template/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Phase2Template/.idea/vcs.xml b/Phase2Template/.idea/vcs.xml new file mode 100644 index 0000000..6c0b863 --- /dev/null +++ b/Phase2Template/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Phase2Template/Phase2/.gitignore b/Phase2Template/Phase2/.gitignore new file mode 100644 index 0000000..f68d109 --- /dev/null +++ b/Phase2Template/Phase2/.gitignore @@ -0,0 +1,29 @@ +### IntelliJ IDEA ### +out/ +!**/src/main/**/out/ +!**/src/test/**/out/ + +### Eclipse ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache +bin/ +!**/src/main/**/bin/ +!**/src/test/**/bin/ + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ + +### VS Code ### +.vscode/ + +### Mac OS ### +.DS_Store \ No newline at end of file diff --git a/Phase2Template/Phase2/.idea/.gitignore b/Phase2Template/Phase2/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/Phase2Template/Phase2/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/Phase2Template/Phase2/.idea/misc.xml b/Phase2Template/Phase2/.idea/misc.xml new file mode 100644 index 0000000..e717da3 --- /dev/null +++ b/Phase2Template/Phase2/.idea/misc.xml @@ -0,0 +1,22 @@ + + + + + + + + + \ No newline at end of file diff --git a/Phase2Template/Phase2/.idea/modules.xml b/Phase2Template/Phase2/.idea/modules.xml new file mode 100644 index 0000000..0dc8126 --- /dev/null +++ b/Phase2Template/Phase2/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/Phase2Template/Phase2/.idea/uiDesigner.xml b/Phase2Template/Phase2/.idea/uiDesigner.xml new file mode 100644 index 0000000..2b63946 --- /dev/null +++ b/Phase2Template/Phase2/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Phase2Template/Phase2/.idea/vcs.xml b/Phase2Template/Phase2/.idea/vcs.xml new file mode 100644 index 0000000..b2bdec2 --- /dev/null +++ b/Phase2Template/Phase2/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Phase2Template/Phase2/Phase2.iml b/Phase2Template/Phase2/Phase2.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/Phase2Template/Phase2/Phase2.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Phase2Template/Phase2/samples/all.fl b/Phase2Template/Phase2/samples/all.fl new file mode 100644 index 0000000..fd02041 --- /dev/null +++ b/Phase2Template/Phase2/samples/all.fl @@ -0,0 +1,50 @@ + +def y() + return z(); +end + +def z() + return hh(); +end + +def hh() + y(); +end + +def f() + g(); +end + +def g() + return f(); +end + +def h() + a = 1; + b = 2; + return myfunc2(a, b); +end + + +def myfunc2(a, b, [c=1]) + return; +end + +def myfunc2() + return; +end + + +def aa(a, b, c) + return a+b+c; +end + +def main() + a = 5; + b = 6; + puts("salam"); + myFunc(c, b); + myfunc2(a, b); + ali(a); + aa(a, b); +end \ No newline at end of file diff --git a/Phase2Template/Phase2/samples/all.txt b/Phase2Template/Phase2/samples/all.txt new file mode 100644 index 0000000..793c3d8 --- /dev/null +++ b/Phase2Template/Phase2/samples/all.txt @@ -0,0 +1,9 @@ +Line:28-> target variable a has same name with pattern +Line:33-> argument myFunc has same name with function +Line:33-> argument a is duplicated +Line:45-> variable c is not declared +Line:45-> number of arguments provided for function myFunc does not match with its declaration +Line:47-> function ali is not declared +Line:47-> number of arguments provided for function ali does not match with its declaration +*-> defenition of functions hh, z, y contains circular dependency +*-> defenition of functions f, \ No newline at end of file diff --git a/Phase2Template/Phase2/samples/in1.fl b/Phase2Template/Phase2/samples/in1.fl new file mode 100644 index 0000000..53bda76 --- /dev/null +++ b/Phase2Template/Phase2/samples/in1.fl @@ -0,0 +1,58 @@ + +def f() + return g(); +end + + +def g() + return h(); +end + +def get_size(i) + return len(g()[i]); +end + + +def getList() + return [[1, 2]]; +end + +def h() + a = 5; + b = 2; + if (a>b) + return; + elseif (ab) + return; + else + return; + end +end + +def foo() + return ->(arg1, arg2){return arg1+arg2;}(1, 2); +end + +def main() + a = 5; + b = 10; + c = 5; + puts("HELLO" << " " << "WORLD"); + list = [1, 2, 3]; + for num in (1..10) + next if(num/2 == 1); + puts(num); + end + list << a << b << c; + loop do + if (a>b) + break; + elseif ((b==0) && (a>2)) + next; + else + return 0; + end + end + puts(get_size(0)); + ->(arg1, arg2){return arg1+arg2;}(1, 2); +end \ No newline at end of file diff --git a/Phase2Template/Phase2/samples/in10.fl b/Phase2Template/Phase2/samples/in10.fl new file mode 100644 index 0000000..0205bee --- /dev/null +++ b/Phase2Template/Phase2/samples/in10.fl @@ -0,0 +1,20 @@ +def f() + return g(); +end + + +def g() + return h(); +end + +def h() + return y(); +end + +def y() + return f(); +end + +def main() + puts(get_size(1)); +end \ No newline at end of file diff --git a/Phase2Template/Phase2/samples/in11.fl b/Phase2Template/Phase2/samples/in11.fl new file mode 100644 index 0000000..32137be --- /dev/null +++ b/Phase2Template/Phase2/samples/in11.fl @@ -0,0 +1,19 @@ +def f(a, b, [c = 2]) + return a + b + c; +end + + +def g(a, b, c) + f(a, b); + return a + b + c; +end + + +def main() + a = 1; + b = 2; + f(a, b, c); + f(b); + f(a, b); + g(a, b); +end \ No newline at end of file diff --git a/Phase2Template/Phase2/samples/in2.fl b/Phase2Template/Phase2/samples/in2.fl new file mode 100644 index 0000000..3cc2317 --- /dev/null +++ b/Phase2Template/Phase2/samples/in2.fl @@ -0,0 +1,20 @@ +def compare() + if (a > b) + if(b > c) + puts(a); + return a; + else + return c; + end + else + if (c > b) + return c; + else + return b; + end + end +end + +def main() + puts("salam"); +end \ No newline at end of file diff --git a/Phase2Template/Phase2/samples/in20.fl b/Phase2Template/Phase2/samples/in20.fl new file mode 100644 index 0000000..c5f1c80 --- /dev/null +++ b/Phase2Template/Phase2/samples/in20.fl @@ -0,0 +1,31 @@ + +def f() + return g(); +end + +def g() + for i in (1..10) + f(); + end +end + +def h(i) + a = 5; + return f(); +end + + + + +def main() + l = [1, 2, 3]; + for i in (1..10) + b = i+2; + end + a = 10; + c = 15; + loop do + ab = 5; + end + puts(ab); +end \ No newline at end of file diff --git a/Phase2Template/Phase2/samples/in3.fl b/Phase2Template/Phase2/samples/in3.fl new file mode 100644 index 0000000..e8430bd --- /dev/null +++ b/Phase2Template/Phase2/samples/in3.fl @@ -0,0 +1,11 @@ +def compare(a, b, compare) + if (a > b) + return "true"; + else + return false; + end +end + +def main() + puts("salam"); +end \ No newline at end of file diff --git a/Phase2Template/Phase2/samples/in4.fl b/Phase2Template/Phase2/samples/in4.fl new file mode 100644 index 0000000..c01992e --- /dev/null +++ b/Phase2Template/Phase2/samples/in4.fl @@ -0,0 +1,9 @@ +pattern fib(n) + | (n == 0) = 1 + | (n == 1) = 1 + | (n > 2) = fib.match(n-1) + fib.match(n-2) +; + +def main() + fib_5 = fib_.match(5); +end diff --git a/Phase2Template/Phase2/samples/in5.fl b/Phase2Template/Phase2/samples/in5.fl new file mode 100644 index 0000000..8024264 --- /dev/null +++ b/Phase2Template/Phase2/samples/in5.fl @@ -0,0 +1,9 @@ +pattern fib(fib) + | (n == 0) = 1 + | (n == 1) = 1 + | (n > 2) = fib.match(n-1) + fib.match(n-2) +; + +def main() + fib_5 = fib_.match(5); +end diff --git a/Phase2Template/Phase2/samples/in6.fl b/Phase2Template/Phase2/samples/in6.fl new file mode 100644 index 0000000..bea4932 --- /dev/null +++ b/Phase2Template/Phase2/samples/in6.fl @@ -0,0 +1,15 @@ +pattern fib(n) + | (n == 0) = 1 + | (n == 1) = 1 + | (n > 2) = fib.match(n-1) + fib.match(n-2) +; + +pattern fib(n) + | (n == 0) = 2 + | (n == 1) = 3 + | (n > 2) = fib.match(n-1) + fib.match(n-2) +; + +def main() + fib_5 = fib.match(5); +end diff --git a/Phase2Template/Phase2/samples/in7.fl b/Phase2Template/Phase2/samples/in7.fl new file mode 100644 index 0000000..058c1ec --- /dev/null +++ b/Phase2Template/Phase2/samples/in7.fl @@ -0,0 +1,13 @@ +def f() + puts(f()); + puts([1,2,3,4]); + puts(true); + puts(false); +end + +def f() +end + +def main() + puts("salam"); +end diff --git a/Phase2Template/Phase2/samples/in8.fl b/Phase2Template/Phase2/samples/in8.fl new file mode 100644 index 0000000..a915a43 --- /dev/null +++ b/Phase2Template/Phase2/samples/in8.fl @@ -0,0 +1,11 @@ +def get_size(get_size) + return len(g()[get_size]); +end + +def g() + return [[1, 2]]; +end + +def main() + puts(get_size(1)); +end diff --git a/Phase2Template/Phase2/samples/in9.fl b/Phase2Template/Phase2/samples/in9.fl new file mode 100644 index 0000000..f651d32 --- /dev/null +++ b/Phase2Template/Phase2/samples/in9.fl @@ -0,0 +1,16 @@ +def get_size(get_size) + return len(g()[get_size]); +end + +def g() + return [[1, 2]]; +end + + +def f(a, b, a) + return compare(a, b); +end + +def main() + puts(get_size(1)); +end diff --git a/Phase2Template/Phase2/samples/out1.txt b/Phase2Template/Phase2/samples/out1.txt new file mode 100644 index 0000000..2fa46ab --- /dev/null +++ b/Phase2Template/Phase2/samples/out1.txt @@ -0,0 +1,4 @@ +Line:2-> variable a is not declared +Line:3-> variable a is not declared +Line:3-> variable c is not declared +Line:4-> variable a is not declared \ No newline at end of file diff --git a/Phase2Template/Phase2/samples/out10.txt b/Phase2Template/Phase2/samples/out10.txt new file mode 100644 index 0000000..56f281c --- /dev/null +++ b/Phase2Template/Phase2/samples/out10.txt @@ -0,0 +1,2 @@ +Line:19-> function get_size is not declared +*-> defenition of functions f, y, h, g contains circular dependency \ No newline at end of file diff --git a/Phase2Template/Phase2/samples/out11.txt b/Phase2Template/Phase2/samples/out11.txt new file mode 100644 index 0000000..e69de29 diff --git a/Phase2Template/Phase2/samples/out2.txt b/Phase2Template/Phase2/samples/out2.txt new file mode 100644 index 0000000..8fc80ea --- /dev/null +++ b/Phase2Template/Phase2/samples/out2.txt @@ -0,0 +1,11 @@ +Line:2-> variable a is not declared +Line:2-> variable b is not declared +Line:3-> variable b is not declared +Line:3-> variable c is not declared +Line:4-> variable a is not declared +Line:5-> variable a is not declared +Line:7-> variable c is not declared +Line:10-> variable c is not declared +Line:10-> variable b is not declared +Line:11-> variable c is not declared +Line:13-> variable b is not declared \ No newline at end of file diff --git a/Phase2Template/Phase2/samples/out3.txt b/Phase2Template/Phase2/samples/out3.txt new file mode 100644 index 0000000..088d07d --- /dev/null +++ b/Phase2Template/Phase2/samples/out3.txt @@ -0,0 +1 @@ +Line:1-> argument compare has same name with function \ No newline at end of file diff --git a/Phase2Template/Phase2/samples/out4.txt b/Phase2Template/Phase2/samples/out4.txt new file mode 100644 index 0000000..976fcce --- /dev/null +++ b/Phase2Template/Phase2/samples/out4.txt @@ -0,0 +1 @@ +Line:8-> pattern fib_ is not declared \ No newline at end of file diff --git a/Phase2Template/Phase2/samples/out5.txt b/Phase2Template/Phase2/samples/out5.txt new file mode 100644 index 0000000..c7bac8b --- /dev/null +++ b/Phase2Template/Phase2/samples/out5.txt @@ -0,0 +1,5 @@ +Line:1-> target variable fib has same name with pattern +Line:4-> variable n is not declared +Line:4-> variable n is not declared +Line:4-> variable n is not declared +Line:8-> pattern fib_ is not declared \ No newline at end of file diff --git a/Phase2Template/Phase2/samples/out6.txt b/Phase2Template/Phase2/samples/out6.txt new file mode 100644 index 0000000..c600ddc --- /dev/null +++ b/Phase2Template/Phase2/samples/out6.txt @@ -0,0 +1 @@ +Line:7-> Redefinition of pattern fib \ No newline at end of file diff --git a/Phase2Template/Phase2/samples/out7.txt b/Phase2Template/Phase2/samples/out7.txt new file mode 100644 index 0000000..d7963ad --- /dev/null +++ b/Phase2Template/Phase2/samples/out7.txt @@ -0,0 +1 @@ +Line:8-> Redefinition of function f \ No newline at end of file diff --git a/Phase2Template/Phase2/samples/out8.txt b/Phase2Template/Phase2/samples/out8.txt new file mode 100644 index 0000000..c262686 --- /dev/null +++ b/Phase2Template/Phase2/samples/out8.txt @@ -0,0 +1 @@ +Line:1-> argument get_size has same name with function \ No newline at end of file diff --git a/Phase2Template/Phase2/samples/out9.txt b/Phase2Template/Phase2/samples/out9.txt new file mode 100644 index 0000000..6a98dae --- /dev/null +++ b/Phase2Template/Phase2/samples/out9.txt @@ -0,0 +1,3 @@ +Line:1-> argument get_size has same name with function +Line:10-> argument a is duplicated +Line:11-> function compare is not declared \ No newline at end of file diff --git a/Phase2Template/Phase2/samples/testCases.zip b/Phase2Template/Phase2/samples/testCases.zip new file mode 100644 index 0000000..468a766 Binary files /dev/null and b/Phase2Template/Phase2/samples/testCases.zip differ diff --git a/Phase2Template/Phase2/src/main/FunctionCraft.java b/Phase2Template/Phase2/src/main/FunctionCraft.java new file mode 100644 index 0000000..54a7bc7 --- /dev/null +++ b/Phase2Template/Phase2/src/main/FunctionCraft.java @@ -0,0 +1,50 @@ +package main; + + + +import main.ast.nodes.Program; +import main.compileError.CompileError; +import main.visitor.astPrinter.AstPrinter; +import main.visitor.nameAnalyzer.DependencyDetector; +import main.visitor.nameAnalyzer.NameAnalyzer; +import org.antlr.v4.runtime.CharStream; +import org.antlr.v4.runtime.CharStreams; +import org.antlr.v4.runtime.CommonTokenStream; +import parsers.FunctionCraftLexer; +import parsers.FunctionCraftParser; + + +import java.io.FileWriter; +import java.io.IOException; +import java.io.PrintWriter; +import java.util.*; + +public class FunctionCraft { + public static void main(String[] args) throws IOException{ + CharStream reader = CharStreams.fromFileName(args[0]); + FunctionCraftLexer flLexer = new FunctionCraftLexer(reader); + CommonTokenStream tokens = new CommonTokenStream(flLexer); + FunctionCraftParser flParser = new FunctionCraftParser(tokens); + Program program = flParser.program().flProgram; + NameAnalyzer nameAnalyzer = new NameAnalyzer(); + nameAnalyzer.visit(program); + nameAnalyzer.nameErrors.sort(Comparator.comparingInt(CompileError::getLine)); + FileWriter fileWriter = new FileWriter("samples/out11.txt"); + PrintWriter printWriter = new PrintWriter(fileWriter); + for(CompileError compileError : nameAnalyzer.nameErrors){ + printWriter.println(compileError.getErrorMessage()); + System.out.println(compileError.getErrorMessage()); + } + DependencyDetector dependencyDetector = new DependencyDetector(); + dependencyDetector.visit(program); + dependencyDetector.findDependency(); + for(CompileError circularDependency : dependencyDetector.dependencyError){ + printWriter.println(circularDependency.getErrorMessage()); + System.out.println(circularDependency.getErrorMessage()); + } + if(nameAnalyzer.nameErrors.size() + dependencyDetector.dependencyError.size() == 0){ + AstPrinter astPrinter = new AstPrinter(); + astPrinter.visit(program); + } + } +} diff --git a/Phase2Template/Phase2/src/main/ast/nodes/Node.java b/Phase2Template/Phase2/src/main/ast/nodes/Node.java new file mode 100644 index 0000000..617a9e8 --- /dev/null +++ b/Phase2Template/Phase2/src/main/ast/nodes/Node.java @@ -0,0 +1,15 @@ +package main.ast.nodes; + +import main.compileError.CompileError; +import main.visitor.IVisitor; + +import java.util.ArrayList; + +public abstract class Node { + private int line; + + public void setLine(int line){this.line = line;} + public int getLine(){return this.line;} + public abstract String toString(); + public abstract T accept(IVisitor visitor); +} diff --git a/Phase2Template/Phase2/src/main/ast/nodes/Program.java b/Phase2Template/Phase2/src/main/ast/nodes/Program.java new file mode 100644 index 0000000..e7fb829 --- /dev/null +++ b/Phase2Template/Phase2/src/main/ast/nodes/Program.java @@ -0,0 +1,46 @@ +package main.ast.nodes; + +import com.sun.tools.javac.Main; +import main.ast.nodes.declaration.FunctionDeclaration; +import main.ast.nodes.declaration.PatternDeclaration; +import main.ast.nodes.declaration.MainDeclaration; +import main.visitor.IVisitor; + + +import java.util.ArrayList; + +public class Program extends Node{ + private ArrayList functionDeclarations = new ArrayList<>(); + private ArrayList patternDeclarations = new ArrayList<>(); + private MainDeclaration main = new MainDeclaration(); + + public ArrayList getFunctionDeclarations(){return this.functionDeclarations;} + public void setFunctionDeclarations(ArrayList functionDeclarations){ + this.functionDeclarations =functionDeclarations; + } + public void addFunctionDeclaration(FunctionDeclaration functionDeclaration){ + this.functionDeclarations.add(functionDeclaration); + } + + public ArrayList getPatternDeclarations(){return this.patternDeclarations;} + public void setPatternDeclarations(ArrayListpatternDeclarations){ + this.patternDeclarations = patternDeclarations; + } + public void addPatternDeclaration(PatternDeclaration patternDeclaration){ + this.patternDeclarations.add(patternDeclaration); + } + + + public MainDeclaration getMain(){return this.main;} + public void setMain(MainDeclaration mainDeclaration){this.main = mainDeclaration;} + + + + + + @Override + public String toString(){return "FLProgram";} + @Override + public T accept(IVisitor visitor){return visitor.visit(this);} + +} diff --git a/Phase2Template/Phase2/src/main/ast/nodes/declaration/Declaration.java b/Phase2Template/Phase2/src/main/ast/nodes/declaration/Declaration.java new file mode 100644 index 0000000..dfbcc1c --- /dev/null +++ b/Phase2Template/Phase2/src/main/ast/nodes/declaration/Declaration.java @@ -0,0 +1,6 @@ +package main.ast.nodes.declaration; + +import main.ast.nodes.Node; + +public abstract class Declaration extends Node { +} diff --git a/Phase2Template/Phase2/src/main/ast/nodes/declaration/FunctionDeclaration.java b/Phase2Template/Phase2/src/main/ast/nodes/declaration/FunctionDeclaration.java new file mode 100644 index 0000000..6facf7b --- /dev/null +++ b/Phase2Template/Phase2/src/main/ast/nodes/declaration/FunctionDeclaration.java @@ -0,0 +1,28 @@ +package main.ast.nodes.declaration; + +import main.ast.nodes.expression.Identifier; +import main.ast.nodes.statement.Statement; +import main.visitor.IVisitor; + +import java.util.ArrayList; + +public class FunctionDeclaration extends Declaration{ + private Identifier functionName; + private ArrayList args = new ArrayList<>(); + private ArrayList body = new ArrayList<>(); + + public Identifier getFunctionName(){return this.functionName;} + public void setFunctionName(Identifier functionName){this.functionName = functionName;} + + public ArrayList getArgs(){return this.args;} + public void setArgs(ArrayList args){this.args = args;} + public void addArg(VarDeclaration arg){this.args.add(arg);} + + public ArrayList getBody(){return this.body;} + public void setBody(ArrayList body){this.body = body;} + public void addStmt(Statement stmt){this.body.add(stmt);} + @Override + public String toString(){return "FunctionDeclaration:" + this.functionName.getName();} + @Override + public T accept(IVisitor visitor){return visitor.visit(this);} +} diff --git a/Phase2Template/Phase2/src/main/ast/nodes/declaration/MainDeclaration.java b/Phase2Template/Phase2/src/main/ast/nodes/declaration/MainDeclaration.java new file mode 100644 index 0000000..65bc6a5 --- /dev/null +++ b/Phase2Template/Phase2/src/main/ast/nodes/declaration/MainDeclaration.java @@ -0,0 +1,17 @@ +package main.ast.nodes.declaration; + +import main.ast.nodes.statement.Statement; +import main.visitor.IVisitor; + +import java.util.ArrayList; + +public class MainDeclaration extends Declaration{ + private ArrayList body = new ArrayList<>(); + public ArrayList getBody() {return this.body;} + public void setBody(ArrayListbody){this.body = body;} + public void addBody(Statement stmt){this.body.add(stmt);} + @Override + public String toString(){return "MainDeclaration";} + @Override + public T accept(IVisitor visitor){return visitor.visit(this);} +} diff --git a/Phase2Template/Phase2/src/main/ast/nodes/declaration/PatternDeclaration.java b/Phase2Template/Phase2/src/main/ast/nodes/declaration/PatternDeclaration.java new file mode 100644 index 0000000..d6f9754 --- /dev/null +++ b/Phase2Template/Phase2/src/main/ast/nodes/declaration/PatternDeclaration.java @@ -0,0 +1,36 @@ +package main.ast.nodes.declaration; + +import main.ast.nodes.expression.Expression; +import main.ast.nodes.expression.Identifier; +import main.visitor.IVisitor; + +import java.util.ArrayList; + +public class PatternDeclaration extends Declaration{ + private Identifier patternName; + private Identifier targetVariable; + private ArrayList conditions = new ArrayList<>(); + private ArrayList returnExp = new ArrayList<>(); + public PatternDeclaration(Identifier name, Identifier targetVariable){ + this.patternName = name; + this.targetVariable = targetVariable; + } + public void setPatternName(Identifier name){this.patternName = name;} + public Identifier getPatternName(){return this.patternName;} + + public void setTargetVariable(Identifier targetVariable){this.targetVariable = targetVariable;} + public Identifier getTargetVariable(){return this.targetVariable;} + + public ArrayList getConditions(){return this.conditions;} + public void setConditions(ArrayList conditions){this.conditions.addAll((conditions));} + public void addCondition(Expression condition){this.conditions.add(condition);} + + public ArrayList getReturnExp(){return this.returnExp;} + public void setReturnExp(ArrayList returnExp){this.returnExp = returnExp;} + public void addReturnExp(Expression returnExp){this.returnExp.add(returnExp);} + @Override + public String toString(){return "PatternDeclaration:" + patternName + " on variable:" + targetVariable.getName();} + @Override + public T accept(IVisitorvisitor){return visitor.visit(this);} + +} diff --git a/Phase2Template/Phase2/src/main/ast/nodes/declaration/VarDeclaration.java b/Phase2Template/Phase2/src/main/ast/nodes/declaration/VarDeclaration.java new file mode 100644 index 0000000..2053d2a --- /dev/null +++ b/Phase2Template/Phase2/src/main/ast/nodes/declaration/VarDeclaration.java @@ -0,0 +1,23 @@ +package main.ast.nodes.declaration; + +import main.ast.nodes.expression.Expression; +import main.ast.nodes.expression.Identifier; +import main.visitor.IVisitor; + +public class VarDeclaration extends Declaration{ + private Identifier name; + private Expression defaultVal; + + public VarDeclaration(Identifier name){ + this.name = name; + this.defaultVal = null; + } + public Identifier getName(){return this.name;} + public void setName(Identifier name){this.name = name;} + public Expression getDefaultVal(){return this.defaultVal;} + public void setDefaultVal(Expression defaultVal){this.defaultVal = defaultVal;} + @Override + public String toString(){return "VarDeclaration:" + this.name;} + @Override + publicT accept(IVisitor visitor){return visitor.visit(this);} +} diff --git a/Phase2Template/Phase2/src/main/ast/nodes/expression/AccessExpression.java b/Phase2Template/Phase2/src/main/ast/nodes/expression/AccessExpression.java new file mode 100644 index 0000000..044df49 --- /dev/null +++ b/Phase2Template/Phase2/src/main/ast/nodes/expression/AccessExpression.java @@ -0,0 +1,51 @@ +package main.ast.nodes.expression; + +import main.visitor.IVisitor; + +import java.util.ArrayList; + +public class AccessExpression extends Expression{ + private Expression accessedExpression; + private boolean isFunctionCall; + private ArrayList arguments = new ArrayList<>(); + private ArrayList dimentionalAccess = new ArrayList<>(); + public void setIsFunctionCall(boolean isFunctionCall){this.isFunctionCall = isFunctionCall;} + + public boolean isFunctionCall() { + return isFunctionCall; + } + + public AccessExpression(Expression accessedExpression, ArrayList arguments){ + this.accessedExpression = accessedExpression; + this.arguments = arguments; + this.isFunctionCall = false; + } + + public Expression getAccessedExpression() { + return accessedExpression; + } + + public ArrayList getDimentionalAccess() { + return dimentionalAccess; + } + + public ArrayList getArguments() { + return arguments; + } + + public void setAccessedExpression(Expression accessedExpression) { + this.accessedExpression = accessedExpression; + } + + public void setArguments(ArrayList arguments) { + this.arguments = arguments; + } + + public void setDimentionalAccess(ArrayList dimentionalAccess) { + this.dimentionalAccess = dimentionalAccess; + } + @Override + public String toString(){return "AccessExpression";} + @Override + public T accept(IVisitor visitor){return visitor.visit(this);} +} diff --git a/Phase2Template/Phase2/src/main/ast/nodes/expression/AppendExpression.java b/Phase2Template/Phase2/src/main/ast/nodes/expression/AppendExpression.java new file mode 100644 index 0000000..0d87894 --- /dev/null +++ b/Phase2Template/Phase2/src/main/ast/nodes/expression/AppendExpression.java @@ -0,0 +1,27 @@ +package main.ast.nodes.expression; + +import main.visitor.IVisitor; + +import java.lang.reflect.Array; +import java.util.ArrayList; + +public class AppendExpression extends Expression{ + private Expression appendee; + private ArrayList appendeds = new ArrayList<>(); + public AppendExpression(Expression appendee){this.appendee = appendee;} + public void addAppendedExpression(Expression expression){this.appendeds.add(expression);} + public Expression getAppendee(){return this.appendee;} + public ArrayList getAppendeds(){return this.appendeds;} + + public void setAppendee(Expression appendee) { + this.appendee = appendee; + } + + public void setAppendeds(ArrayList appendeds) { + this.appendeds = appendeds; + } + @Override + public String toString(){return "AppendExpression";} + @Override + public T accept(IVisitor visitor){return visitor.visit(this);} +} diff --git a/Phase2Template/Phase2/src/main/ast/nodes/expression/BinaryExpression.java b/Phase2Template/Phase2/src/main/ast/nodes/expression/BinaryExpression.java new file mode 100644 index 0000000..8aa07df --- /dev/null +++ b/Phase2Template/Phase2/src/main/ast/nodes/expression/BinaryExpression.java @@ -0,0 +1,44 @@ +package main.ast.nodes.expression; + +import main.ast.nodes.expression.operators.BinaryOperator; +import main.visitor.IVisitor; + +public class BinaryExpression extends Expression{ + private Expression firstOperand; + private Expression secondOperand; + private BinaryOperator binaryOperator; + public BinaryExpression(Expression firstOperand, Expression secondOperand, + BinaryOperator binaryOperator){ + this.firstOperand = firstOperand; + this.secondOperand = secondOperand; + this.binaryOperator = binaryOperator; + } + + public BinaryOperator getBinaryOperator() { + return binaryOperator; + } + + public Expression getFirstOperand() { + return firstOperand; + } + + public Expression getSecondOperand() { + return secondOperand; + } + + public void setBinaryOperator(BinaryOperator binaryOperator) { + this.binaryOperator = binaryOperator; + } + + public void setFirstOperand(Expression firstOperand) { + this.firstOperand = firstOperand; + } + + public void setSecondOperand(Expression secondOperand) { + this.secondOperand = secondOperand; + } + @Override + public String toString(){return "BinaryOperation:" + this.binaryOperator.name();} + @Override + public T accept(IVisitor visitor){return visitor.visit(this);} +} diff --git a/Phase2Template/Phase2/src/main/ast/nodes/expression/ChompStatement.java b/Phase2Template/Phase2/src/main/ast/nodes/expression/ChompStatement.java new file mode 100644 index 0000000..13bcb6c --- /dev/null +++ b/Phase2Template/Phase2/src/main/ast/nodes/expression/ChompStatement.java @@ -0,0 +1,20 @@ +package main.ast.nodes.expression; + +import main.visitor.IVisitor; + +public class ChompStatement extends Expression{ + private Expression chompExpression; + public ChompStatement(Expression chompExpression){this.chompExpression = chompExpression;} + + public Expression getChompExpression() { + return chompExpression; + } + + public void setChompExpression(Expression chompExpression) { + this.chompExpression = chompExpression; + } + @Override + public String toString(){return "ChompStatement";} + @Override + public T accept(IVisitor visitor){return visitor.visit(this);} +} diff --git a/Phase2Template/Phase2/src/main/ast/nodes/expression/ChopStatement.java b/Phase2Template/Phase2/src/main/ast/nodes/expression/ChopStatement.java new file mode 100644 index 0000000..c38d03e --- /dev/null +++ b/Phase2Template/Phase2/src/main/ast/nodes/expression/ChopStatement.java @@ -0,0 +1,14 @@ +package main.ast.nodes.expression; + +import main.visitor.IVisitor; + +public class ChopStatement extends Expression{ + private Expression chopExpression; + public ChopStatement(Expression chopExpression){this.chopExpression = chopExpression;} + public void setChopExpression(Expression chopExpression){this.chopExpression = chopExpression;} + public Expression getChopExpression(){return this.chopExpression;} + @Override + public String toString(){return "ChopStatement";} + @Override + public T accept(IVisitor visitor){return visitor.visit(this);} +} diff --git a/Phase2Template/Phase2/src/main/ast/nodes/expression/Expression.java b/Phase2Template/Phase2/src/main/ast/nodes/expression/Expression.java new file mode 100644 index 0000000..c45980b --- /dev/null +++ b/Phase2Template/Phase2/src/main/ast/nodes/expression/Expression.java @@ -0,0 +1,6 @@ +package main.ast.nodes.expression; + +import main.ast.nodes.Node; + +public abstract class Expression extends Node { +} diff --git a/Phase2Template/Phase2/src/main/ast/nodes/expression/FilterStatement.java b/Phase2Template/Phase2/src/main/ast/nodes/expression/FilterStatement.java new file mode 100644 index 0000000..ac2fde2 --- /dev/null +++ b/Phase2Template/Phase2/src/main/ast/nodes/expression/FilterStatement.java @@ -0,0 +1,56 @@ +package main.ast.nodes.expression; + +import main.visitor.IVisitor; + +import java.util.ArrayList; + +public class FilterStatement extends Expression{ + private Identifier iteratorId; + private Expression filterExpression; + private ArrayList conditionalExpressions = new ArrayList<>(); + private ArrayList rangeExpressions = new ArrayList<>(); + public FilterStatement(Identifier iteratorId, Expression filterExpression, + ArrayList conditionalExpressions, + ArrayList rangeExpressions){ + this.iteratorId = iteratorId; + this.filterExpression =filterExpression; + this.conditionalExpressions = conditionalExpressions; + this.rangeExpressions = rangeExpressions; + } + + public void setRangeExpressions(ArrayList rangeExpressions) { + this.rangeExpressions = rangeExpressions; + } + + public void setIteratorId(Identifier iteratorId) { + this.iteratorId = iteratorId; + } + + public void setConditionalExpressions(ArrayList conditionalExpressions) { + this.conditionalExpressions = conditionalExpressions; + } + + public void setFilterExpression(Expression filterExpression) { + this.filterExpression = filterExpression; + } + + public Identifier getIteratorId() { + return iteratorId; + } + + public ArrayList getRangeExpressions() { + return rangeExpressions; + } + + public Expression getFilterExpression() { + return filterExpression; + } + + public ArrayList getConditionalExpressions() { + return conditionalExpressions; + } + @Override + public String toString(){return "FilterOn:" + this.iteratorId.getName();} + @Override + public T accept(IVisitor visitor){return visitor.visit(this);} +} diff --git a/Phase2Template/Phase2/src/main/ast/nodes/expression/Identifier.java b/Phase2Template/Phase2/src/main/ast/nodes/expression/Identifier.java new file mode 100644 index 0000000..13b2dc7 --- /dev/null +++ b/Phase2Template/Phase2/src/main/ast/nodes/expression/Identifier.java @@ -0,0 +1,14 @@ +package main.ast.nodes.expression; + +import main.visitor.IVisitor; + +public class Identifier extends Expression{ + private String name; + public Identifier(String name){this.name = name;} + public void setName(String name) {this.name = name;} + public String getName(){return this.name;} + @Override + public String toString(){return "Identifier:" + this.name;} + @Override + public T accept(IVisitor visitor){return visitor.visit(this);} +} diff --git a/Phase2Template/Phase2/src/main/ast/nodes/expression/LambdaExpression.java b/Phase2Template/Phase2/src/main/ast/nodes/expression/LambdaExpression.java new file mode 100644 index 0000000..ceb9b5a --- /dev/null +++ b/Phase2Template/Phase2/src/main/ast/nodes/expression/LambdaExpression.java @@ -0,0 +1,47 @@ +package main.ast.nodes.expression; + +import main.ast.nodes.declaration.VarDeclaration; +import main.ast.nodes.statement.Statement; +import main.visitor.IVisitor; + +import java.util.ArrayList; + +public class LambdaExpression extends Expression{ + ArrayList declarationArgs = new ArrayList<>(); + ArrayList body = new ArrayList<>(); +// ArrayList args = new ArrayList<>(); + public LambdaExpression(ArrayList declarationArgs, ArrayList body + ){ + this.declarationArgs = declarationArgs; +// this.args = args; + this.body = body; + } + +// public void setArgs(ArrayList args) { +// this.args = args; +// } + + public void setBody(ArrayList body) { + this.body = body; + } + + public void setDeclarationArgs(ArrayList declarationArgs) { + this.declarationArgs = declarationArgs; + } + +// public ArrayList getArgs() { +// return args; +// } + + public ArrayList getBody() { + return body; + } + + public ArrayList getDeclarationArgs() { + return declarationArgs; + } + @Override + public String toString(){return "LambdaExpression";} + @Override + public T accept(IVisitor visitor){return visitor.visit(this);} +} diff --git a/Phase2Template/Phase2/src/main/ast/nodes/expression/LenStatement.java b/Phase2Template/Phase2/src/main/ast/nodes/expression/LenStatement.java new file mode 100644 index 0000000..790c745 --- /dev/null +++ b/Phase2Template/Phase2/src/main/ast/nodes/expression/LenStatement.java @@ -0,0 +1,14 @@ +package main.ast.nodes.expression; + +import main.visitor.IVisitor; + +public class LenStatement extends Expression{ + private Expression expression; + public LenStatement(Expression expression){this.expression = expression;} + public Expression getExpression(){return this.expression;} + public void setExpression(Expression expression){this.expression = expression;} + @Override + public String toString(){return "LenStatement";} + @Override + public T accept(IVisitor visitor){return visitor.visit(this);} +} diff --git a/Phase2Template/Phase2/src/main/ast/nodes/expression/MatchPatternStatement.java b/Phase2Template/Phase2/src/main/ast/nodes/expression/MatchPatternStatement.java new file mode 100644 index 0000000..bfd66e4 --- /dev/null +++ b/Phase2Template/Phase2/src/main/ast/nodes/expression/MatchPatternStatement.java @@ -0,0 +1,31 @@ +package main.ast.nodes.expression; + +import main.visitor.IVisitor; + +public class MatchPatternStatement extends Expression{ + private Identifier patternId; + Expression matchArgument; + public MatchPatternStatement(Identifier patternId, Expression matchArgument){ + this.matchArgument = matchArgument; + this.patternId = patternId; + } + public void setPatternId(Identifier patternId){ + this.patternId = patternId; + } + + public void setMatchArgument(Expression matchArgument) { + this.matchArgument = matchArgument; + } + + public Identifier getPatternId() { + return patternId; + } + + public Expression getMatchArgument() { + return matchArgument; + } + @Override + public String toString(){return "MatchPattern:"+patternId.getName();} + @Override + public T accept(IVisitor visitor){return visitor.visit(this);} +} diff --git a/Phase2Template/Phase2/src/main/ast/nodes/expression/UnaryExpression.java b/Phase2Template/Phase2/src/main/ast/nodes/expression/UnaryExpression.java new file mode 100644 index 0000000..c4c9a53 --- /dev/null +++ b/Phase2Template/Phase2/src/main/ast/nodes/expression/UnaryExpression.java @@ -0,0 +1,33 @@ +package main.ast.nodes.expression; + +import main.ast.nodes.expression.operators.UnaryOperator; +import main.visitor.IVisitor; + +public class UnaryExpression extends Expression{ + private Expression expression; + private UnaryOperator op; + public UnaryExpression(Expression expression, UnaryOperator op){ + this.expression = expression; + this.op = op; + } + + public void setExpression(Expression expression) { + this.expression = expression; + } + + public Expression getExpression() { + return expression; + } + + public UnaryOperator getOp() { + return op; + } + + public void setOp(UnaryOperator op) { + this.op = op; + } + @Override + public String toString(){return "UnaryExpression_" + op.name();} + @Override + public T accept(IVisitor visitor){return visitor.visit(this);} +} diff --git a/Phase2Template/Phase2/src/main/ast/nodes/expression/operators/BinaryOperator.java b/Phase2Template/Phase2/src/main/ast/nodes/expression/operators/BinaryOperator.java new file mode 100644 index 0000000..07bc825 --- /dev/null +++ b/Phase2Template/Phase2/src/main/ast/nodes/expression/operators/BinaryOperator.java @@ -0,0 +1,5 @@ +package main.ast.nodes.expression.operators; + +public enum BinaryOperator { + EQUAL, NOT_EQUAL, GREATER_THAN, LESS_THAN, LESS_EQUAL_THAN, GREATER_EQUAL_THAN, PLUS, MINUS, MULT, DIVIDE +} diff --git a/Phase2Template/Phase2/src/main/ast/nodes/expression/operators/UnaryOperator.java b/Phase2Template/Phase2/src/main/ast/nodes/expression/operators/UnaryOperator.java new file mode 100644 index 0000000..93d1529 --- /dev/null +++ b/Phase2Template/Phase2/src/main/ast/nodes/expression/operators/UnaryOperator.java @@ -0,0 +1,5 @@ +package main.ast.nodes.expression.operators; + +public enum UnaryOperator { + NOT, MINUS, INC, DEC +} diff --git a/Phase2Template/Phase2/src/main/ast/nodes/expression/value/FunctionPointer.java b/Phase2Template/Phase2/src/main/ast/nodes/expression/value/FunctionPointer.java new file mode 100644 index 0000000..47e3c1f --- /dev/null +++ b/Phase2Template/Phase2/src/main/ast/nodes/expression/value/FunctionPointer.java @@ -0,0 +1,21 @@ +package main.ast.nodes.expression.value; + +import main.ast.nodes.expression.Identifier; +import main.visitor.IVisitor; + +public class FunctionPointer extends Value{ + private Identifier id; + public FunctionPointer(Identifier id){this.id = id;} + + public Identifier getId() { + return id; + } + + public void setId(Identifier id) { + this.id = id; + } + @Override + public String toString(){return "FunctionPointer:" + this.id.getName();} + @Override + public T accept(IVisitor visitor){return visitor.visit(this);} +} diff --git a/Phase2Template/Phase2/src/main/ast/nodes/expression/value/ListValue.java b/Phase2Template/Phase2/src/main/ast/nodes/expression/value/ListValue.java new file mode 100644 index 0000000..de9d3ea --- /dev/null +++ b/Phase2Template/Phase2/src/main/ast/nodes/expression/value/ListValue.java @@ -0,0 +1,23 @@ +package main.ast.nodes.expression.value; + +import main.ast.nodes.expression.Expression; +import main.visitor.IVisitor; + +import java.util.ArrayList; + +public class ListValue extends Value{ + private ArrayList elements; + public ListValue(ArrayList elements){this.elements = elements;} + + public ArrayList getElements() { + return elements; + } + + public void setElements(ArrayList elements) { + this.elements = elements; + } + @Override + public String toString(){return "ListValue";} + @Override + public T accept(IVisitor visitor){return visitor.visit(this);} +} diff --git a/Phase2Template/Phase2/src/main/ast/nodes/expression/value/Value.java b/Phase2Template/Phase2/src/main/ast/nodes/expression/value/Value.java new file mode 100644 index 0000000..de6e4bf --- /dev/null +++ b/Phase2Template/Phase2/src/main/ast/nodes/expression/value/Value.java @@ -0,0 +1,6 @@ +package main.ast.nodes.expression.value; + +import main.ast.nodes.expression.Expression; + +public abstract class Value extends Expression { +} diff --git a/Phase2Template/Phase2/src/main/ast/nodes/expression/value/primitive/BoolValue.java b/Phase2Template/Phase2/src/main/ast/nodes/expression/value/primitive/BoolValue.java new file mode 100644 index 0000000..1df7150 --- /dev/null +++ b/Phase2Template/Phase2/src/main/ast/nodes/expression/value/primitive/BoolValue.java @@ -0,0 +1,21 @@ +package main.ast.nodes.expression.value.primitive; + +import main.ast.nodes.expression.value.Value; +import main.visitor.IVisitor; + +public class BoolValue extends Value { + private Boolean bool; + public BoolValue(Boolean bool){this.bool = bool;} + + public Boolean getBool() { + return bool; + } + + public void setBool(Boolean bool) { + this.bool = bool; + } + @Override + public String toString(){return "BoolValue:" + this.bool;} + @Override + public T accept(IVisitor visitor){return visitor.visit(this);} +} diff --git a/Phase2Template/Phase2/src/main/ast/nodes/expression/value/primitive/FloatValue.java b/Phase2Template/Phase2/src/main/ast/nodes/expression/value/primitive/FloatValue.java new file mode 100644 index 0000000..2092fda --- /dev/null +++ b/Phase2Template/Phase2/src/main/ast/nodes/expression/value/primitive/FloatValue.java @@ -0,0 +1,23 @@ +package main.ast.nodes.expression.value.primitive; + +import main.ast.nodes.expression.value.Value; +import main.visitor.IVisitor; + +public class FloatValue extends Value { + private float flt; + public FloatValue(float flt){ + this.flt = flt; + } + + public float getFlt() { + return flt; + } + + public void setFlt(float flt) { + this.flt = flt; + } + @Override + public String toString(){return "FLoatValue:" + String.valueOf(this.flt);} + @Override + public T accept(IVisitor visitor){return visitor.visit(this);} +} diff --git a/Phase2Template/Phase2/src/main/ast/nodes/expression/value/primitive/IntValue.java b/Phase2Template/Phase2/src/main/ast/nodes/expression/value/primitive/IntValue.java new file mode 100644 index 0000000..f720b01 --- /dev/null +++ b/Phase2Template/Phase2/src/main/ast/nodes/expression/value/primitive/IntValue.java @@ -0,0 +1,21 @@ +package main.ast.nodes.expression.value.primitive; + +import main.ast.nodes.expression.value.Value; +import main.visitor.IVisitor; + +public class IntValue extends Value { + private int intVal; + public IntValue(int intVal){this.intVal = intVal;} + + public int getIntVal() { + return intVal; + } + + public void setIntVal(int intVal) { + this.intVal = intVal; + } + @Override + public String toString(){return "IntValue:" + String.valueOf(this.intVal);} + @Override + public T accept(IVisitor visitor){return visitor.visit(this);} +} diff --git a/Phase2Template/Phase2/src/main/ast/nodes/expression/value/primitive/StringValue.java b/Phase2Template/Phase2/src/main/ast/nodes/expression/value/primitive/StringValue.java new file mode 100644 index 0000000..6b65ef8 --- /dev/null +++ b/Phase2Template/Phase2/src/main/ast/nodes/expression/value/primitive/StringValue.java @@ -0,0 +1,21 @@ +package main.ast.nodes.expression.value.primitive; + +import main.ast.nodes.expression.value.Value; +import main.visitor.IVisitor; + +public class StringValue extends Value { + private String str; + public StringValue(String str){this.str = str;} + + public String getStr() { + return str; + } + + public void setStr(String str) { + this.str = str; + } + @Override + public String toString(){return "StringValue:"+this.str;} + @Override + public T accept(IVisitor visitor){return visitor.visit(this);} +} diff --git a/Phase2Template/Phase2/src/main/ast/nodes/statement/AssignOperator.java b/Phase2Template/Phase2/src/main/ast/nodes/statement/AssignOperator.java new file mode 100644 index 0000000..ca7be02 --- /dev/null +++ b/Phase2Template/Phase2/src/main/ast/nodes/statement/AssignOperator.java @@ -0,0 +1,5 @@ +package main.ast.nodes.statement; + +public enum AssignOperator { + ASSIGN, PLUS_ASSIGN, MINUS_ASSIGN, DIVIDE_ASSIGN, MULT_ASSIGN, MOD_ASSIGN +} diff --git a/Phase2Template/Phase2/src/main/ast/nodes/statement/AssignStatement.java b/Phase2Template/Phase2/src/main/ast/nodes/statement/AssignStatement.java new file mode 100644 index 0000000..6d86a25 --- /dev/null +++ b/Phase2Template/Phase2/src/main/ast/nodes/statement/AssignStatement.java @@ -0,0 +1,66 @@ +package main.ast.nodes.statement; + +import main.ast.nodes.expression.Expression; +import main.ast.nodes.expression.Identifier; +import main.visitor.IVisitor; + + +public class AssignStatement extends Statement{ + private boolean accessList; + private Identifier assignedId; + private Expression assignExpression; + private Expression accessListExpression; + private AssignOperator assignOperator; + public AssignStatement(boolean accessList, Identifier assignedId, Expression assignExpression, + AssignOperator assignOperator){ + this.accessList = accessList; + this.assignedId = assignedId; + this.assignExpression = assignExpression; + this.assignOperator = assignOperator; + } + + public void setAccessList(boolean accessList) { + this.accessList = accessList; + } + + public void setAssignedId(Identifier assignedId) { + this.assignedId = assignedId; + } + + public void setAccessListExpression(Expression accessListExpression) { + this.accessListExpression = accessListExpression; + } + + public void setAssignExpression(Expression assignExpression) { + this.assignExpression = assignExpression; + } + + public void setAssignOperator(AssignOperator assignOperator) { + this.assignOperator = assignOperator; + } + + public AssignOperator getAssignOperator() { + return assignOperator; + } + + public boolean isAccessList() { + return accessList; + } + + public Expression getAccessListExpression() { + return accessListExpression; + } + + public Identifier getAssignedId() { + return assignedId; + } + + public Expression getAssignExpression() { + return assignExpression; + } + @Override + public String toString(){return "AssignTo:"+ this.assignedId.toString();} + @Override + public T accept(IVisitor visitor){return visitor.visit(this);} +} + diff --git a/Phase2Template/Phase2/src/main/ast/nodes/statement/ExpressionStatement.java b/Phase2Template/Phase2/src/main/ast/nodes/statement/ExpressionStatement.java new file mode 100644 index 0000000..623db06 --- /dev/null +++ b/Phase2Template/Phase2/src/main/ast/nodes/statement/ExpressionStatement.java @@ -0,0 +1,21 @@ +package main.ast.nodes.statement; + +import main.ast.nodes.expression.Expression; +import main.visitor.IVisitor; + +public class ExpressionStatement extends Statement{ + private Expression expression; + public ExpressionStatement(Expression expression){this.expression = expression;} + + public Expression getExpression() { + return expression; + } + + public void setExpression(Expression expression) { + this.expression = expression; + } + @Override + public String toString(){return "ExpressionStatement";} + @Override + public T accept(IVisitor visitor){return visitor.visit(this);} +} diff --git a/Phase2Template/Phase2/src/main/ast/nodes/statement/ForStatement.java b/Phase2Template/Phase2/src/main/ast/nodes/statement/ForStatement.java new file mode 100644 index 0000000..cd88a2a --- /dev/null +++ b/Phase2Template/Phase2/src/main/ast/nodes/statement/ForStatement.java @@ -0,0 +1,71 @@ +package main.ast.nodes.statement; + + +import main.ast.nodes.expression.Expression; +import main.ast.nodes.expression.Identifier; +import main.visitor.IVisitor; + +import java.util.ArrayList; + +public class ForStatement extends Statement{ + private Identifier iteratorId; + private ArrayList rangeExpressions = new ArrayList<>(); + private ArrayList loopBodyExpressions = new ArrayList<>(); + private ArrayList loopBody = new ArrayList<>(); + private ReturnStatement returnStatement; + public ForStatement(Identifier identifierId, ArrayList rangeExpressions + , ArrayList loopBodyExpressions, ArrayList loopBody + , ReturnStatement returnStatement){ + this.iteratorId = identifierId; + this.rangeExpressions = rangeExpressions; + this.loopBodyExpressions = loopBodyExpressions; + this.loopBody = loopBody; + this.returnStatement = returnStatement; + + } + public ArrayList getLoopBodyExpressions() { + return loopBodyExpressions; + } + + public ReturnStatement getReturnStatement() { + return returnStatement; + } + + public ArrayList getRangeExpressions() { + return rangeExpressions; + } + + public ArrayList getLoopBody() { + return loopBody; + } + + public Identifier getIteratorId() { + return iteratorId; + } + + public void setIteratorId(Identifier iteratorId) { + this.iteratorId = iteratorId; + } + + public void setLoopBody(ArrayList loopBody) { + this.loopBody = loopBody; + } + + public void setLoopBodyExpressions(ArrayList loopBodyExpressions) { + this.loopBodyExpressions = loopBodyExpressions; + } + + public void setRangeExpressions(ArrayList rangeExpressions) { + this.rangeExpressions = rangeExpressions; + } + + public void setReturnStatement(ReturnStatement returnStatement) { + this.returnStatement = returnStatement; + } + + @Override + public String toString(){return "ForLoop:"+iteratorId.getName();} + @Override + public T accept(IVisitor visitor){return visitor.visit(this);} + +} diff --git a/Phase2Template/Phase2/src/main/ast/nodes/statement/IfStatement.java b/Phase2Template/Phase2/src/main/ast/nodes/statement/IfStatement.java new file mode 100644 index 0000000..765ca60 --- /dev/null +++ b/Phase2Template/Phase2/src/main/ast/nodes/statement/IfStatement.java @@ -0,0 +1,24 @@ +package main.ast.nodes.statement; + +import main.ast.nodes.expression.Expression; +import main.visitor.IVisitor; + +import java.lang.reflect.Array; +import java.util.ArrayList; + +public class IfStatement extends Statement{ + private ArrayList conditions = new ArrayList<>(); + private ArrayList thenBody = new ArrayList<>(); + private ArrayList elseBody = new ArrayList<>(); + + public void addCondition(ArrayList condition){this.conditions.addAll(condition);} + public void setThenBody(ArrayListthenBody){this.thenBody = thenBody;} + public void setElseBody(ArrayListelseBody){this.elseBody = elseBody;} + public ArrayList getConditions(){return this.conditions;} + public ArrayList getThenBody(){return this.thenBody;} + public ArrayList getElseBody(){return this.elseBody;} + @Override + public String toString(){return "IfStatement";} + @Override + public T accept(IVisitor visitor){return visitor.visit(this);} +} diff --git a/Phase2Template/Phase2/src/main/ast/nodes/statement/LoopDoStatement.java b/Phase2Template/Phase2/src/main/ast/nodes/statement/LoopDoStatement.java new file mode 100644 index 0000000..e218cc1 --- /dev/null +++ b/Phase2Template/Phase2/src/main/ast/nodes/statement/LoopDoStatement.java @@ -0,0 +1,30 @@ +package main.ast.nodes.statement; + +import main.ast.nodes.expression.Expression; +import main.visitor.IVisitor; + +import java.util.ArrayList; + +public class LoopDoStatement extends Statement{ + private ArrayList loopBodyStmts = new ArrayList<>(); + private ArrayList loopConditions = new ArrayList<>(); + private ReturnStatement loopRetStmt; + + public LoopDoStatement(ArrayListloopBodyStmts, ArrayListloopConditions, + ReturnStatement loopRetStmt){ + this.loopBodyStmts = loopBodyStmts; + this.loopConditions = loopConditions; + this.loopRetStmt = loopRetStmt; + } + public void setLoopBodyStmts(ArrayListloopBodyStmts){this.loopBodyStmts = loopBodyStmts;} + public void setLoopConditions(ArrayListloopConditions){this.loopConditions = loopConditions;} + public void setLoopRetStmt(ReturnStatement loopRetStmt){this.loopRetStmt = loopRetStmt;} + public ArrayList getLoopBodyStmts(){return this.loopBodyStmts;} + public ArrayList getLoopConditions(){return this.loopConditions;} + public ReturnStatement getLoopRetStmt(){return this.loopRetStmt;} + + @Override + public String toString(){return "LoopDoStatement";} + @Override + public T accept(IVisitorvisitor){return visitor.visit(this);} +} diff --git a/Phase2Template/Phase2/src/main/ast/nodes/statement/PushStatement.java b/Phase2Template/Phase2/src/main/ast/nodes/statement/PushStatement.java new file mode 100644 index 0000000..1406efe --- /dev/null +++ b/Phase2Template/Phase2/src/main/ast/nodes/statement/PushStatement.java @@ -0,0 +1,22 @@ +package main.ast.nodes.statement; + +import main.ast.nodes.expression.Expression; +import main.visitor.IVisitor; + +public class PushStatement extends Statement{ + private Expression initial; + private Expression toBeAdded; + public PushStatement(Expression initial, Expression toBeAdded){ + this.initial = initial; + this.toBeAdded = toBeAdded; + } + public Expression getInitial(){return this.initial;} + public Expression getToBeAdded(){return this.toBeAdded;} + public void setInitial(Expression initial){this.initial = initial;} + public void setToBeAdded(Expression toBeAdded){this.toBeAdded = toBeAdded;} + @Override + public String toString(){return "PushStatement";} + @Override + public T accept(IVisitor visitor){return visitor.visit(this);} + +} diff --git a/Phase2Template/Phase2/src/main/ast/nodes/statement/PutStatement.java b/Phase2Template/Phase2/src/main/ast/nodes/statement/PutStatement.java new file mode 100644 index 0000000..ae4982b --- /dev/null +++ b/Phase2Template/Phase2/src/main/ast/nodes/statement/PutStatement.java @@ -0,0 +1,15 @@ +package main.ast.nodes.statement; + +import main.ast.nodes.expression.Expression; +import main.visitor.IVisitor; + +public class PutStatement extends Statement{ + private Expression expression; + public PutStatement(Expression expression){this.expression = expression;} + public Expression getExpression(){return this.expression;} + public void setExpression(Expression expression){this.expression = expression;} + @Override + public String toString(){return "PutStatement";} + @Override + public T accept(IVisitor visitor){return visitor.visit(this);} +} diff --git a/Phase2Template/Phase2/src/main/ast/nodes/statement/ReturnStatement.java b/Phase2Template/Phase2/src/main/ast/nodes/statement/ReturnStatement.java new file mode 100644 index 0000000..9828475 --- /dev/null +++ b/Phase2Template/Phase2/src/main/ast/nodes/statement/ReturnStatement.java @@ -0,0 +1,20 @@ +package main.ast.nodes.statement; + +import main.ast.nodes.expression.Expression; +import main.visitor.IVisitor; + +public class ReturnStatement extends Statement{ + private Expression returnExp; + private boolean hasRetExp; + public ReturnStatement(){this.hasRetExp = false;} + public Expression getReturnExp(){return returnExp;} + public void setReturnExp(Expression returnExp){ + this.returnExp = returnExp; + this.hasRetExp = true; + } + public boolean hasRetExpression(){return hasRetExp;} + @Override + public String toString(){return "ReturnStatement";} + @Override + public T accept(IVisitor visitor){return visitor.visit(this);} +} diff --git a/Phase2Template/Phase2/src/main/ast/nodes/statement/Statement.java b/Phase2Template/Phase2/src/main/ast/nodes/statement/Statement.java new file mode 100644 index 0000000..8355fc9 --- /dev/null +++ b/Phase2Template/Phase2/src/main/ast/nodes/statement/Statement.java @@ -0,0 +1,7 @@ +package main.ast.nodes.statement; + +import main.ast.nodes.Node; + +public abstract class Statement extends Node{ + +} diff --git a/Phase2Template/Phase2/src/main/compileError/CompileError.java b/Phase2Template/Phase2/src/main/compileError/CompileError.java new file mode 100644 index 0000000..d062f25 --- /dev/null +++ b/Phase2Template/Phase2/src/main/compileError/CompileError.java @@ -0,0 +1,12 @@ +package main.compileError; + +public abstract class CompileError{ + protected int line; + public abstract String getErrorMessage(); + + public int getLine() { + return line; + } + + +} diff --git a/Phase2Template/Phase2/src/main/compileError/nameErrors/ArgMisMatch.java b/Phase2Template/Phase2/src/main/compileError/nameErrors/ArgMisMatch.java new file mode 100644 index 0000000..f9184ea --- /dev/null +++ b/Phase2Template/Phase2/src/main/compileError/nameErrors/ArgMisMatch.java @@ -0,0 +1,12 @@ +package main.compileError.nameErrors; + +import main.compileError.CompileError; + +public class ArgMisMatch extends CompileError { + String functionName; + public ArgMisMatch(int line, String functionName){ + this.line = line; + this.functionName = functionName; + } + public String getErrorMessage(){return "Line:" + this.line + "-> number of arguments provided for function " + this.functionName + " does not match with its declaration";} +} diff --git a/Phase2Template/Phase2/src/main/compileError/nameErrors/CircularDependency.java b/Phase2Template/Phase2/src/main/compileError/nameErrors/CircularDependency.java new file mode 100644 index 0000000..ebd75a8 --- /dev/null +++ b/Phase2Template/Phase2/src/main/compileError/nameErrors/CircularDependency.java @@ -0,0 +1,27 @@ +package main.compileError.nameErrors; + +import main.compileError.CompileError; + +import java.util.List; + +public class CircularDependency extends CompileError { + private List nodes; + private String functions; + public CircularDependency(List nodes){ + this.nodes = nodes; + String s = ""; + int nodeIndex = 0; + int finalIndex = nodes.size()-1; + for(String x : nodes){ + if(nodeIndex != finalIndex){ + s = s.concat(x + ", "); + } + else{ + s = s.concat(x); + } + nodeIndex += 1; + } + this.functions = s; + } + public String getErrorMessage(){return "*-> defenition of functions " + this.functions + " contains circular dependency";} +} diff --git a/Phase2Template/Phase2/src/main/compileError/nameErrors/DuplicateArg.java b/Phase2Template/Phase2/src/main/compileError/nameErrors/DuplicateArg.java new file mode 100644 index 0000000..28a021c --- /dev/null +++ b/Phase2Template/Phase2/src/main/compileError/nameErrors/DuplicateArg.java @@ -0,0 +1,12 @@ +package main.compileError.nameErrors; + +import main.compileError.CompileError; + +public class DuplicateArg extends CompileError { + private String name; + public DuplicateArg(int line, String name){ + this.line = line; + this.name = name; + } + public String getErrorMessage(){return "Line:" + this.line + "-> argument " + this.name + " is duplicated";} +} diff --git a/Phase2Template/Phase2/src/main/compileError/nameErrors/FunctionNotDeclared.java b/Phase2Template/Phase2/src/main/compileError/nameErrors/FunctionNotDeclared.java new file mode 100644 index 0000000..9851da9 --- /dev/null +++ b/Phase2Template/Phase2/src/main/compileError/nameErrors/FunctionNotDeclared.java @@ -0,0 +1,12 @@ +package main.compileError.nameErrors; + +import main.compileError.CompileError; + +public class FunctionNotDeclared extends CompileError { + private String name; + public FunctionNotDeclared(int line, String name){ + this.line = line; + this.name = name; + } + public String getErrorMessage(){return "Line:" + this.line + "-> function " + this.name + " is not declared";} +} diff --git a/Phase2Template/Phase2/src/main/compileError/nameErrors/IdenticalArgFunctionName.java b/Phase2Template/Phase2/src/main/compileError/nameErrors/IdenticalArgFunctionName.java new file mode 100644 index 0000000..e1bb288 --- /dev/null +++ b/Phase2Template/Phase2/src/main/compileError/nameErrors/IdenticalArgFunctionName.java @@ -0,0 +1,12 @@ +package main.compileError.nameErrors; + +import main.compileError.CompileError; + +public class IdenticalArgFunctionName extends CompileError { + private String name; + public IdenticalArgFunctionName(int line, String name){ + this.line = line; + this.name = name; + } + public String getErrorMessage(){return "Line:" + this.line + "-> argument " + this.name + " has same name with function";} +} diff --git a/Phase2Template/Phase2/src/main/compileError/nameErrors/IdenticalArgPatternName.java b/Phase2Template/Phase2/src/main/compileError/nameErrors/IdenticalArgPatternName.java new file mode 100644 index 0000000..6b67d03 --- /dev/null +++ b/Phase2Template/Phase2/src/main/compileError/nameErrors/IdenticalArgPatternName.java @@ -0,0 +1,12 @@ +package main.compileError.nameErrors; + +import main.compileError.CompileError; + +public class IdenticalArgPatternName extends CompileError { + private String name; + public IdenticalArgPatternName(int line, String name){ + this.line = line; + this.name = name; + } + public String getErrorMessage(){return "Line:" + this.line + "-> target variable " + this.name + " has same name with pattern";} +} diff --git a/Phase2Template/Phase2/src/main/compileError/nameErrors/PatternNotDeclared.java b/Phase2Template/Phase2/src/main/compileError/nameErrors/PatternNotDeclared.java new file mode 100644 index 0000000..3b00dce --- /dev/null +++ b/Phase2Template/Phase2/src/main/compileError/nameErrors/PatternNotDeclared.java @@ -0,0 +1,13 @@ +package main.compileError.nameErrors; + +import main.compileError.CompileError; +import main.symbolTable.item.PatternItem; + +public class PatternNotDeclared extends CompileError { + private String name; + public PatternNotDeclared(int line, String name){ + this.line = line; + this.name = name; + } + public String getErrorMessage(){return "Line:" + this.line + "-> pattern " + this.name + " is not declared";} +} diff --git a/Phase2Template/Phase2/src/main/compileError/nameErrors/RedefinitionOfFunction.java b/Phase2Template/Phase2/src/main/compileError/nameErrors/RedefinitionOfFunction.java new file mode 100644 index 0000000..174d81a --- /dev/null +++ b/Phase2Template/Phase2/src/main/compileError/nameErrors/RedefinitionOfFunction.java @@ -0,0 +1,12 @@ +package main.compileError.nameErrors; + +import main.compileError.CompileError; + +public class RedefinitionOfFunction extends CompileError { + String name; + public RedefinitionOfFunction(int line, String name){ + this.line = line; + this.name = name; + } + public String getErrorMessage(){return "Line:" + this.line + "-> Redefinition of function " + this.name;} +} diff --git a/Phase2Template/Phase2/src/main/compileError/nameErrors/RedefinitionOfPattern.java b/Phase2Template/Phase2/src/main/compileError/nameErrors/RedefinitionOfPattern.java new file mode 100644 index 0000000..cee0052 --- /dev/null +++ b/Phase2Template/Phase2/src/main/compileError/nameErrors/RedefinitionOfPattern.java @@ -0,0 +1,13 @@ +package main.compileError.nameErrors; + +import main.compileError.CompileError; + +public class RedefinitionOfPattern extends CompileError { + String name; + public RedefinitionOfPattern(int line, String name){ + this.line = line; + this.name = name; + } + public String getErrorMessage(){return "Line:" + this.line + "-> Redefinition of pattern " + this.name;} +} + diff --git a/Phase2Template/Phase2/src/main/compileError/nameErrors/VariableNotDeclared.java b/Phase2Template/Phase2/src/main/compileError/nameErrors/VariableNotDeclared.java new file mode 100644 index 0000000..7977a0d --- /dev/null +++ b/Phase2Template/Phase2/src/main/compileError/nameErrors/VariableNotDeclared.java @@ -0,0 +1,12 @@ +package main.compileError.nameErrors; + +import main.compileError.CompileError; + +public class VariableNotDeclared extends CompileError { + private String name; + public VariableNotDeclared(int line, String name){ + this.line = line; + this.name = name; + } + public String getErrorMessage(){return "Line:" + this.line + "-> variable " + this.name + " is not declared";} +} diff --git a/Phase2Template/Phase2/src/main/grammar/FunctionCraft.g4 b/Phase2Template/Phase2/src/main/grammar/FunctionCraft.g4 new file mode 100644 index 0000000..9a157a0 --- /dev/null +++ b/Phase2Template/Phase2/src/main/grammar/FunctionCraft.g4 @@ -0,0 +1,687 @@ +grammar FunctionCraft; + +@header{ + import main.ast.nodes.*; + import main.ast.nodes.declaration.*; + import main.ast.nodes.statement.*; + import main.ast.nodes.expression.*; + import main.ast.nodes.expression.operators.*; + import main.ast.nodes.expression.value.*; + import main.ast.nodes.expression.value.primitive.*; +} + + +program returns [Program flProgram]: + { + $flProgram = new Program(); + $flProgram.setLine(1); + } + ( + f = functionDeclaration{$flProgram.addFunctionDeclaration($f.functionDeclarationRet);} + | p = patternMatching{$flProgram.addPatternDeclaration($p.patternRet);} + )* + m = main{$flProgram.setMain($m.mainRet);}; + +functionDeclaration returns [FunctionDeclaration functionDeclarationRet]: + { + $functionDeclarationRet = new FunctionDeclaration(); + } + def = DEF {$functionDeclarationRet.setLine($def.line);} id = IDENTIFIER { + Identifier id_ = new Identifier($id.text); + id_.setLine($id.line); + $functionDeclarationRet.setFunctionName(id_); + $functionDeclarationRet.setLine($def.line); + } + f = functionArgumentsDeclaration {$functionDeclarationRet.setArgs($f.argRet);} + b = body {$functionDeclarationRet.setBody($b.bodyRet);} + END + ; + +functionArgumentsDeclaration returns [ArrayList argRet]: + { + $argRet = new ArrayList(); + } + LPAR + (id1 = IDENTIFIER + { + Identifier id_ = new Identifier($id1.text); + id_.setLine($id1.line); + VarDeclaration newVarDec = new VarDeclaration(id_); + newVarDec.setLine($id1.line); + $argRet.add(newVarDec); + } + (COMMA id2 = IDENTIFIER + { + Identifier id_2 = new Identifier($id2.text); + id_2.setLine($id2.line); + VarDeclaration newVarDec2 = new VarDeclaration(id_2); + newVarDec2.setLine($id2.line); + $argRet.add(newVarDec2); + } + )* + ( + COMMA LBRACK id3 = IDENTIFIER + { + Identifier id_3 = new Identifier($id3.text); + id_3.setLine($id3.line); + VarDeclaration newVarDec3 = new VarDeclaration(id_3); + newVarDec3.setLine($id3.line); + } + ASSIGN e1 = expression + { + newVarDec3.setDefaultVal($e1.expRet); + $argRet.add(newVarDec3); + } + (COMMA id4 = IDENTIFIER + { + Identifier id_4 = new Identifier($id4.text); + id_4.setLine($id4.line); + VarDeclaration newVarDec4 = new VarDeclaration(id_4); + newVarDec4.setLine($id4.line); + } + ASSIGN e2 = expression + { + newVarDec4.setDefaultVal($e2.expRet); + $argRet.add(newVarDec4); + } + )* RBRACK + )? + )? RPAR; + +patternMatching returns [PatternDeclaration patternRet]: + pat = PATTERN + { + int patternLine = $pat.line; + } + patternName = IDENTIFIER + { + Identifier patternNameId = new Identifier($patternName.text); + patternNameId.setLine($patternName.line); + } + LPAR targetVar = IDENTIFIER + { + Identifier targetVariable = new Identifier($targetVar.text); + targetVariable.setLine($targetVar.line); + $patternRet = new PatternDeclaration(patternNameId, targetVariable); + $patternRet.setLine(patternLine); + } + RPAR + (PATTERN_MATCHING_SEPARATOR c = condition + { + $patternRet.setConditions($c.conditionRet); + } + ASSIGN e = expression + { + $patternRet.addReturnExp($e.expRet); + } + )* + SEMICOLLON; + +main returns [MainDeclaration mainRet]: + { + $mainRet = new MainDeclaration(); + } + DEF m = MAIN + { + $mainRet.setLine($m.line); + } + LPAR RPAR + b = body + {$mainRet.setBody($b.bodyRet);} + END; + +functionArguments returns [ArrayList funcArgsRet]: + { + $funcArgsRet = new ArrayList(); + } + (e1 = expression + { + $funcArgsRet.add($e1.expRet); + } + (COMMA e2 = expression + { + $funcArgsRet.add($e2.expRet); + } + )* )?; + + +returnStatement returns [ReturnStatement returnStmtRet]: + { + $returnStmtRet = new ReturnStatement(); + } + r = RETURN (e = expression{ + $returnStmtRet.setReturnExp($e.expRet); + })? {$returnStmtRet.setLine($r.line);} SEMICOLLON; + +ifStatement returns[IfStatement ifRet]: + { + $ifRet = new IfStatement(); + ArrayList tempThenStmts = new ArrayList<>(); + ArrayList tempElseStmts = new ArrayList<>(); + } + i = IF + { + $ifRet.setLine($i.line); + } + (c1 = condition {$ifRet.addCondition($c1.conditionRet);} | LPAR c2 = condition RPAR {$ifRet.addCondition($c2.conditionRet);}) + + b = loopBody + { + tempThenStmts.addAll($b.loopStmts); + $ifRet.addCondition($b.loopExps); + if($b.loopRetStmt != null){ + tempThenStmts.add($b.loopRetStmt); + } + } + (ELSEIF (LPAR c2 = condition RPAR | c2 = condition) + { + $ifRet.addCondition($c2.conditionRet); + } + b1 = loopBody + { + tempElseStmts.addAll($b1.loopStmts); + $ifRet.addCondition($b1.loopExps); + if($b1.loopRetStmt != null){ + tempThenStmts.add($b1.loopRetStmt); + } + } + )* + (ELSE b2 = loopBody + { + tempElseStmts.addAll($b2.loopStmts); + $ifRet.addCondition($b2.loopExps); + if($b2.loopRetStmt != null){ + tempThenStmts.add($b2.loopRetStmt); + } + } + )? + { + $ifRet.setThenBody(tempThenStmts); + $ifRet.setElseBody(tempElseStmts); + } + END; + +condition returns [ArrayList conditionRet]: + { + $conditionRet = new ArrayList(); + } + (LPAR e = expression + {$conditionRet.add($e.expRet);} + RPAR ((AND | OR) (LPAR)? c = condition + { + $conditionRet.addAll($c.conditionRet); + } + (RPAR)?)*)*; + +putsStatement returns [PutStatement putRet]: + p = PUTS LPAR e = expression + { + $putRet = new PutStatement($e.expRet); + $putRet.setLine($p.line); + } + RPAR SEMICOLLON; + +lenStatement returns [LenStatement lenRet]: + l = LEN LPAR e = expression + { + $lenRet = new LenStatement($e.expRet); + $lenRet.setLine($l.line); + } + RPAR; + +pushStatement returns [PushStatement pushRet]: + p = PUSH LPAR e1 = expression COMMA e2 = expression RPAR SEMICOLLON + { + $pushRet = new PushStatement($e1.expRet, $e2.expRet); + $pushRet.setLine($p.line); + } + ; + +loopDoStatement returns [LoopDoStatement loopDoRet]: + l1 = LOOP DO + l2 = loopBody + { + $loopDoRet = new LoopDoStatement($l2.loopStmts, $l2.loopExps, $l2.loopRetStmt); + $loopDoRet.setLine($l1.line); + } + END; + +loopBody returns [ArrayList loopStmts, ArrayList loopExps, ReturnStatement loopRetStmt]: + { + $loopStmts = new ArrayList(); + $loopExps = new ArrayList(); + $loopRetStmt = null; + } + (s = statement {$loopStmts.add($s.stmtRet);} + | BREAK (IF c1 = condition{$loopExps.addAll($c1.conditionRet);})? SEMICOLLON + | NEXT (IF c2 = condition{$loopExps.addAll($c2.conditionRet);})? SEMICOLLON + )* + ( + r = returnStatement {$loopRetStmt = $r.returnStmtRet;$loopRetStmt.setLine($r.returnStmtRet.getLine());} + )?; + +forStatement returns [ForStatement forStRet]: + f = FOR id = IDENTIFIER IN r = range + l = loopBody + END + { + $forStRet = new ForStatement(new Identifier($id.text), + $r.rangeRet, $l.loopExps, $l.loopStmts, + $l.loopRetStmt); + $forStRet.setLine($f.line); + } + ; + +range returns [ArrayList rangeRet]: + { + $rangeRet = new ArrayList(); + } + (LPAR e1 = expression + { + $rangeRet.add($e1.expRet); + } + DOUBLEDOT e2 = expression + { + $rangeRet.add($e2.expRet); + } + RPAR) + | + { + $rangeRet = new ArrayList(); + } + (LBRACK (e3 = expression + { + $rangeRet.add($e3.expRet); + } + (COMMA e4 = expression + { + $rangeRet.add($e4.expRet); + } + )*) RBRACK) + | + { + $rangeRet = new ArrayList(); + } + id = IDENTIFIER + { + Identifier id_ = new Identifier($id.text); + id_.setLine($id.line); + $rangeRet.add(id_); + } + ; + +filterStatement returns [FilterStatement filterStatementRet]: + { + ArrayList conditionExps = new ArrayList(); + } + brack = LBRACK e1 = expression SEPARATOR id = IDENTIFIER + ARROW r = range COMMA e2 = expression + { + conditionExps.add($e2.expRet); + } + (COMMA e3 = expression + { + conditionExps.add($e3.expRet); + } + )* + { + Identifier id_ = new Identifier($id.text); + id_.setLine($id.line); + $filterStatementRet = new FilterStatement(id_, $e1.expRet, + conditionExps, $r.rangeRet); + $filterStatementRet.setLine($brack.line); + } + RBRACK; + +matchPatternStatement returns [MatchPatternStatement matchPatRet]: + id = IDENTIFIER DOT m = MATCH LPAR e = expression RPAR + { + Identifier id_ = new Identifier($id.text); + id_.setLine($id.line); + $matchPatRet = new MatchPatternStatement(id_, $e.expRet); + $matchPatRet.setLine($m.line); + } + ; + +chopStatement returns [ChopStatement chopRet]: + + c = CHOP LPAR e = expression RPAR + { + $chopRet = new ChopStatement($e.expRet); + $chopRet.setLine($c.line); + } + ; +chompStatement returns [ChompStatement chompRet]: + c = CHOMP LPAR e = expression RPAR + { + $chompRet = new ChompStatement($e.expRet); + $chompRet.setLine($c.line); + } + ; + +assignment returns [AssignStatement assignRet]: + { + boolean access = false; + int line; + AssignOperator op; + } + id = IDENTIFIER (a = accessList {access = true;})? + (as = ASSIGN {op = AssignOperator.ASSIGN;line = $as.line;} + | pl = PLUS_ASSIGN {op = AssignOperator.PLUS_ASSIGN;line = $pl.line;} + | mi = MINUS_ASSIGN {op = AssignOperator.MINUS_ASSIGN;line = $mi.line;} + | di = DIVIDE_ASSIGN {op = AssignOperator.DIVIDE_ASSIGN;line = $di.line;} + | mu = MULT_ASSIGN {op = AssignOperator.MULT_ASSIGN;line = $mu.line;} + | mo = MOD_ASSIGN {op = AssignOperator.MOD_ASSIGN;line = $mo.line;}) + e = expression SEMICOLLON + { + Identifier id_ = new Identifier($id.text); + id_.setLine($id.line); + $assignRet = new AssignStatement(access, id_, $e.expRet, op); + if(access){ + $assignRet.setAccessListExpression($a.accessListExp); + } + $assignRet.setLine(line); + }; + +accessList returns [Expression accessListExp]: + LBRACK e = expression {$accessListExp = $e.expRet;} RBRACK; + +statement returns [Statement stmtRet]: + i = ifStatement {$stmtRet = $i.ifRet;} + | loop = loopDoStatement {$stmtRet = $loop.loopDoRet;} + | f = forStatement {$stmtRet = $f.forStRet;} + | puts = putsStatement {$stmtRet = $puts.putRet;} + | push = pushStatement {$stmtRet = $push.pushRet;} + | e = expression {$stmtRet = new ExpressionStatement($e.expRet);} + { + ExpressionStatement expStmt = new ExpressionStatement($e.expRet); + $stmtRet = expStmt; + $stmtRet.setLine($e.expRet.getLine()); + } + SEMICOLLON + | as = assignment {$stmtRet = $as.assignRet;} + ; + + +body returns [ArrayList bodyRet]: + { + $bodyRet = new ArrayList(); + } + (s = statement {$bodyRet.add($s.stmtRet);})* + ( + r = returnStatement {$bodyRet.add($r.returnStmtRet);} + )?; + + +expression returns [Expression expRet]: + e1 = expression a = APPEND e2 = eqaulityExpression + { + if(!($e1.expRet instanceof AppendExpression)){ + $expRet = new AppendExpression($e1.expRet); + $expRet.setLine($a.line); + } + else{ + AppendExpression appendExp = (AppendExpression) $e1.expRet; + appendExp.addAppendedExpression($e2.expRet); + $expRet = appendExp; + } + } + | e3 = eqaulityExpression {$expRet = $e3.expRet;}; + + +eqaulityExpression returns[Expression expRet]: + e1 = relationalExpression + { + BinaryOperator op; + int line; + } + (op1 = EQUAL {op = BinaryOperator.EQUAL;line = $op1.line;} + | op2 = NOT_EQUAL {op = BinaryOperator.NOT_EQUAL;line = $op2.line;} + ) r1 = relationalExpression {$expRet = new BinaryExpression($e1.expRet, $r1.expRet, op);$expRet.setLine(line);} + | r2 = relationalExpression {$expRet = $r2.expRet;}; + +relationalExpression returns [Expression expRet]: + r1 = relationalExpression + { + BinaryOperator op; + int line; + } + (gt = GREATER_THAN {op = BinaryOperator.GREATER_THAN;line = $gt.line;} + | lt = LESS_THAN {op = BinaryOperator.LESS_THAN;line = $lt.line;} + | let = LESS_EQUAL_THAN {op = BinaryOperator.LESS_EQUAL_THAN;line = $let.line;} + | get = GREATER_EQUAL_THAN {op = BinaryOperator.GREATER_EQUAL_THAN;line = $get.line;} + ) a1 = additiveExpression {$expRet = new BinaryExpression($r1.expRet, $a1.expRet, op);$expRet.setLine(line);} + | a2 = additiveExpression {$expRet = $a2.expRet;}; + + +additiveExpression returns [Expression expRet]: + a1 = additiveExpression + { + BinaryOperator op; + int line; + } + (p = PLUS {op = BinaryOperator.PLUS;line = $p.line;} + | m = MINUS {op = BinaryOperator.MINUS;line = $m.line;} + ) m1 = multiplicativeExpression {$expRet = new BinaryExpression($a1.expRet, $m1.expRet, op);$expRet.setLine(line);} + | m2 = multiplicativeExpression + { + $expRet = $m2.expRet; + } + ; + + +multiplicativeExpression returns [Expression expRet]: + m1 = multiplicativeExpression + { + BinaryOperator op; + int line; + } + (m = MULT {op = BinaryOperator.MULT;line = $m.line;} + |d = DIVIDE {op = BinaryOperator.DIVIDE;line = $d.line;} + ) p1 = preUnaryExpression {$expRet = new BinaryExpression($m1.expRet, $p1.expRet, op);$expRet.setLine(line);} + | p2 = preUnaryExpression {$expRet = $p2.expRet;}; + + +preUnaryExpression returns [Expression expRet]: + { + UnaryOperator op; + int line; + } + (n = NOT {op = UnaryOperator.NOT;line = $n.line;} + |m = MINUS {op = UnaryOperator.MINUS;line = $m.line;} + |i = INCREMENT {op = UnaryOperator.INC;line = $i.line;} + |d = DECREMENT {op = UnaryOperator.DEC;line = $d.line;} + ) a1 = accessExpression {$expRet = new UnaryExpression($a1.expRet, op);$expRet.setLine(line);} + | a2 = accessExpression {$expRet = $a2.expRet;}; + + +accessExpression returns [Expression expRet]: + { + boolean isAccessExpression = false; + boolean isMultiDimentional = false; + boolean isFunctionCall = false; + ArrayList args = new ArrayList(); + ArrayList dimentions = new ArrayList(); + } + o = otherExpression + (LPAR f = functionArguments //arrayList of expression + { + isAccessExpression = true; + isFunctionCall =true; + args.addAll($f.funcArgsRet); + } + RPAR)* + (a = accessList //single expression + { + isMultiDimentional = true; + isAccessExpression = true; + dimentions.add($a.accessListExp); + } + )* + { + if(!isAccessExpression){ + $expRet = $o.expRet; + } + else{ + AccessExpression accessExp = new AccessExpression($o.expRet, args); + accessExp.setIsFunctionCall(isFunctionCall); + if(isMultiDimentional){ + + accessExp.setDimentionalAccess(dimentions); + } + $expRet = accessExp; + $expRet.setLine($o.expRet.getLine()); + + } + } + ; + +otherExpression returns [Expression expRet]: + v = values {$expRet = $v.valRet;} + | id = IDENTIFIER + { + $expRet = new Identifier($id.text); + $expRet.setLine($id.line); + } + | lambda = lambdaFunction {$expRet = $lambda.lambdaRet;} + | chop = chopStatement {$expRet = $chop.chopRet;} + | chomp = chompStatement {$expRet = $chomp.chompRet;} + | match = matchPatternStatement {$expRet = $match.matchPatRet;} + | f = filterStatement {$expRet = $f.filterStatementRet;} + | len_ = lenStatement {$expRet = $len_.lenRet;} + | LPAR (e = expression {$expRet = $e.expRet;})? RPAR; + + + +//lambdaFunction returns [Expression lambdaRet]: +// a = ARROW fd = functionArgumentsDeclaration +// LBRACE b = body RBRACE fa = functionArguments +// { +// $lambdaRet = new LambdaExpression($fd.argRet, $b.bodyRet, $fa.funcArgsRet); +// $lambdaRet.setLine($a.line); +// } +// ; + +lambdaFunction returns [Expression lambdaRet]: + a = ARROW fd = functionArgumentsDeclaration + LBRACE b = body RBRACE + { + $lambdaRet = new LambdaExpression($fd.argRet, $b.bodyRet); + $lambdaRet.setLine($a.line); + } + ; + +values returns [Value valRet]: + b = boolValue {$valRet = $b.boolValRet;} + | s = STRING_VALUE {$valRet = new StringValue($s.text); $valRet.setLine($s.line);} + | i = INT_VALUE {$valRet = new IntValue($i.int);$valRet.setLine($i.line);} + | float_ = FLOAT_VALUE {$valRet = new FloatValue(Float.parseFloat($float_.text));$valRet.setLine($float_.line);} + | l = listValue {$valRet = $l.listValRet;} + | f = functionPointer {$valRet = $f.fpRet;}; + +listValue returns [ListValue listValRet]: + l = LBRACK f = functionArguments + RBRACK + { + $listValRet = new ListValue($f.funcArgsRet); + $listValRet.setLine($l.line); + } + ; + +boolValue returns [BoolValue boolValRet]: + t = TRUE {$boolValRet = new BoolValue(true); $boolValRet.setLine($t.line);} + | f = FALSE {$boolValRet = new BoolValue(false); $boolValRet.setLine($f.line);} + ; + +functionPointer returns [FunctionPointer fpRet]: + m = METHOD LPAR COLON id = IDENTIFIER RPAR + { + Identifier id_ = new Identifier($id.text); + id_.setLine($id.line); + $fpRet = new FunctionPointer(id_); + $fpRet.setLine($m.line); + } + ; + + +DEF: 'def'; +END: 'end'; +MAIN: 'main'; + +PUTS: 'puts'; +PUSH: 'push'; +LEN: 'len'; +RETURN: 'return'; + +IF: 'if'; +ELSE: 'else'; +ELSEIF: 'elseif'; + +METHOD: 'method'; + +PATTERN: 'pattern'; +MATCH: 'match'; +LOOP: 'loop'; +FOR: 'for'; +IN: 'in'; +DO: 'do'; + +CHOP: 'chop'; +CHOMP: 'chomp'; + +PLUS: '+'; +MINUS: '-'; +MULT: '*'; +DIVIDE: '/'; + +EQUAL: '=='; +NOT_EQUAL: '!='; +LESS_EQUAL_THAN: '<='; +GREATER_EQUAL_THAN: '>='; +GREATER_THAN: '>'; +LESS_THAN: '<'; + +AND: '&&'; +OR: '||'; +NOT: '!'; +INCREMENT: '++'; +DECREMENT: '--'; + +PATTERN_MATCHING_SEPARATOR: ' |'; +SEPARATOR: '|'; +APPEND: '<<'; + +TRUE: 'true'; +FALSE: 'false'; + +BREAK: 'break'; +NEXT: 'next'; + +ARROW: '->'; + +PLUS_ASSIGN: '+='; +MINUS_ASSIGN: '-='; +MULT_ASSIGN: '*='; +DIVIDE_ASSIGN: '/='; +MOD_ASSIGN: '%='; +ASSIGN: '='; + +LPAR: '('; +RPAR: ')'; +LBRACK: '['; +RBRACK: ']'; +LBRACE: '{'; +RBRACE: '}'; + +COMMA: ','; +DOT: '.'; +DOUBLEDOT: '..'; +COLON: ':'; +SEMICOLLON: ';'; + +INT_VALUE: '0' | [1-9][0-9]*; +FLOAT_VALUE: [0-9]* '.' [0-9]+; +IDENTIFIER: [a-zA-Z_][A-Za-z0-9_]*; +STRING_VALUE: '"'~["]*'"'; +COMMENT: ('#' ~( '\r' | '\n')* | ('=begin' .*? '=end')) -> skip; +WS: ([ \t\n\r]) -> skip; \ No newline at end of file diff --git a/Phase2Template/Phase2/src/main/symbolTable/SymbolTable.java b/Phase2Template/Phase2/src/main/symbolTable/SymbolTable.java new file mode 100644 index 0000000..b78dfdb --- /dev/null +++ b/Phase2Template/Phase2/src/main/symbolTable/SymbolTable.java @@ -0,0 +1,45 @@ +package main.symbolTable; + +import main.symbolTable.exceptions.ItemAlreadyExists; +import main.symbolTable.exceptions.ItemNotFound; +import main.symbolTable.item.SymbolTableItem; +import main.symbolTable.utils.Stack; + +import java.util.HashMap; +import java.util.Map; + +public class SymbolTable { + public static SymbolTable top; + public static SymbolTable root; + private static Stack stack = new Stack<>(); + private Map items; + public static void push(SymbolTable symbolTable) { + if (top != null) + stack.push(top); + top = symbolTable; + } + public static void pop() { + top = stack.pop(); + } + public SymbolTable() { + this.items = new HashMap<>(); + } + public void put(SymbolTableItem item) throws ItemAlreadyExists { + if (items.containsKey(item.getKey())) + throw new ItemAlreadyExists(); + items.put(item.getKey(), item); + } + public SymbolTableItem getItem(String key) throws ItemNotFound { + SymbolTableItem symbolTableItem = this.items.get(key); + if( symbolTableItem != null ){ + return symbolTableItem; + } + throw new ItemNotFound(); + } + public SymbolTable copy() { + SymbolTable newSymbolTable = new SymbolTable(); + newSymbolTable.items.putAll(this.items); + return newSymbolTable; + } + +} diff --git a/Phase2Template/Phase2/src/main/symbolTable/exceptions/ItemAlreadyExists.java b/Phase2Template/Phase2/src/main/symbolTable/exceptions/ItemAlreadyExists.java new file mode 100644 index 0000000..af72af5 --- /dev/null +++ b/Phase2Template/Phase2/src/main/symbolTable/exceptions/ItemAlreadyExists.java @@ -0,0 +1,4 @@ +package main.symbolTable.exceptions; + +public class ItemAlreadyExists extends Exception{ +} diff --git a/Phase2Template/Phase2/src/main/symbolTable/exceptions/ItemNotFound.java b/Phase2Template/Phase2/src/main/symbolTable/exceptions/ItemNotFound.java new file mode 100644 index 0000000..1be6f1c --- /dev/null +++ b/Phase2Template/Phase2/src/main/symbolTable/exceptions/ItemNotFound.java @@ -0,0 +1,4 @@ +package main.symbolTable.exceptions; + +public class ItemNotFound extends Exception{ +} diff --git a/Phase2Template/Phase2/src/main/symbolTable/item/FunctionItem.java b/Phase2Template/Phase2/src/main/symbolTable/item/FunctionItem.java new file mode 100644 index 0000000..5e41e90 --- /dev/null +++ b/Phase2Template/Phase2/src/main/symbolTable/item/FunctionItem.java @@ -0,0 +1,34 @@ +package main.symbolTable.item; + +import main.ast.nodes.declaration.FunctionDeclaration; +import main.symbolTable.SymbolTable; + +public class FunctionItem extends SymbolTableItem{ + public static final String START_KEY = "Function:"; + private SymbolTable functionSymbolTable; + private FunctionDeclaration functionDeclaration; + + public FunctionItem(FunctionDeclaration functionDeclaration){ + this.functionDeclaration = functionDeclaration; + this.name = this.functionDeclaration.getFunctionName().getName(); + } + + public SymbolTable getFunctionSymbolTable() { + return functionSymbolTable; + } + + public void setFunctionSymbolTable(SymbolTable functionSymbolTable) { + this.functionSymbolTable = functionSymbolTable; + } + + public FunctionDeclaration getFunctionDeclaration() { + return functionDeclaration; + } + + public void setFunctionDeclaration(FunctionDeclaration functionDeclaration) { + this.functionDeclaration = functionDeclaration; + } + @Override + public String getKey() {return START_KEY + this.name;} + +} diff --git a/Phase2Template/Phase2/src/main/symbolTable/item/PatternItem.java b/Phase2Template/Phase2/src/main/symbolTable/item/PatternItem.java new file mode 100644 index 0000000..27fcf90 --- /dev/null +++ b/Phase2Template/Phase2/src/main/symbolTable/item/PatternItem.java @@ -0,0 +1,32 @@ +package main.symbolTable.item; + +import main.ast.nodes.declaration.PatternDeclaration; +import main.symbolTable.SymbolTable; + +public class PatternItem extends SymbolTableItem{ + public static final String START_KEY = "Pattern:"; + private SymbolTable patternSymbolTable; + private PatternDeclaration patternDeclaration; + public PatternItem(PatternDeclaration patternDeclaration){ + this.patternDeclaration = patternDeclaration; + this.name = this.patternDeclaration.getPatternName().getName(); + } + + public SymbolTable getPatternSymbolTable() { + return patternSymbolTable; + } + + public PatternDeclaration getPatternDeclaration() { + return patternDeclaration; + } + + public void setPatternDeclaration(PatternDeclaration patternDeclaration) { + this.patternDeclaration = patternDeclaration; + } + + public void setPatternSymbolTable(SymbolTable patternSymbolTable) { + this.patternSymbolTable = patternSymbolTable; + } + @Override + public String getKey(){return START_KEY + this.name;} +} diff --git a/Phase2Template/Phase2/src/main/symbolTable/item/SymbolTableItem.java b/Phase2Template/Phase2/src/main/symbolTable/item/SymbolTableItem.java new file mode 100644 index 0000000..cca7cf1 --- /dev/null +++ b/Phase2Template/Phase2/src/main/symbolTable/item/SymbolTableItem.java @@ -0,0 +1,14 @@ +package main.symbolTable.item; + +public abstract class SymbolTableItem { + protected String name; + public abstract String getKey(); + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/Phase2Template/Phase2/src/main/symbolTable/item/VarItem.java b/Phase2Template/Phase2/src/main/symbolTable/item/VarItem.java new file mode 100644 index 0000000..cef8b61 --- /dev/null +++ b/Phase2Template/Phase2/src/main/symbolTable/item/VarItem.java @@ -0,0 +1,12 @@ +package main.symbolTable.item; + +import main.ast.nodes.expression.Identifier; + +public class VarItem extends SymbolTableItem{ + public static String START_KEY = "VAR:"; + public VarItem(Identifier identifier){ + this.name = identifier.getName(); + } + @Override + public String getKey(){return START_KEY + this.name;} +} diff --git a/Phase2Template/Phase2/src/main/symbolTable/utils/Graph.java b/Phase2Template/Phase2/src/main/symbolTable/utils/Graph.java new file mode 100644 index 0000000..706e955 --- /dev/null +++ b/Phase2Template/Phase2/src/main/symbolTable/utils/Graph.java @@ -0,0 +1,64 @@ +package main.symbolTable.utils; + +import java.util.*; + +public class Graph { + private final Map> adjacencyList; + + public Graph() { + adjacencyList = new HashMap<>(); + } + + public void addEdge(String a, String b) { + adjacencyList.computeIfAbsent(a, k -> new ArrayList<>()).add(b); + } + + public ArrayList> findCycles() { + Set visited = new HashSet<>(); + Set beingVisited = new HashSet<>(); + ArrayList> cycles = new ArrayList<>(); + + for (String vertex : adjacencyList.keySet()) { + if (!visited.contains(vertex)) { + List result = new ArrayList<>(); + if (hasCycle(vertex, visited, beingVisited, result)) { + cycles.add(result); + } + } + } + + return cycles; + } + + private boolean hasCycle(String vertex, Set visited, Set beingVisited, List result) { + visited.add(vertex); + beingVisited.add(vertex); + + for (String neighbor : adjacencyList.getOrDefault(vertex, Collections.emptyList())) { + if (beingVisited.contains(neighbor)) { + result.add(neighbor); + return true; + } + if (!visited.contains(neighbor) && hasCycle(neighbor, visited, beingVisited, result)) { + result.add(neighbor); + return true; + } + } + + beingVisited.remove(vertex); + return false; + } + public Void printGraph(){ + for(String vertex : adjacencyList.keySet()){ + System.out.println(vertex + "----"); + for(String adj : adjacencyList.get(vertex)){ + System.out.println(adj); + } + System.out.println("--------"); + } + return null; + } + + +} + diff --git a/Phase2Template/Phase2/src/main/symbolTable/utils/Stack.java b/Phase2Template/Phase2/src/main/symbolTable/utils/Stack.java new file mode 100644 index 0000000..48bfd82 --- /dev/null +++ b/Phase2Template/Phase2/src/main/symbolTable/utils/Stack.java @@ -0,0 +1,25 @@ +package main.symbolTable.utils; + +import java.util.ArrayList; + +public class Stack { + private int top; + private ArrayList elements; + public Stack(){ + this.top = -1; + elements = new ArrayList<>(); + } + public void push(T toBePushed){ + this.elements.add(toBePushed); + ++this.top; + } + public T pop(){ + if(this.top == -1){ + return null; + } + --this.top; + T popped = elements.get(this.top + 1); + elements.remove(this.top + 1); + return popped; + } +} diff --git a/Phase2Template/Phase2/src/main/visitor/IVisitor.java b/Phase2Template/Phase2/src/main/visitor/IVisitor.java new file mode 100644 index 0000000..ae04ce5 --- /dev/null +++ b/Phase2Template/Phase2/src/main/visitor/IVisitor.java @@ -0,0 +1,48 @@ +package main.visitor; + +import main.ast.nodes.Program; +import main.ast.nodes.declaration.FunctionDeclaration; +import main.ast.nodes.declaration.MainDeclaration; +import main.ast.nodes.declaration.PatternDeclaration; +import main.ast.nodes.declaration.VarDeclaration; +import main.ast.nodes.expression.*; +import main.ast.nodes.expression.value.FunctionPointer; +import main.ast.nodes.expression.value.ListValue; +import main.ast.nodes.expression.value.primitive.BoolValue; +import main.ast.nodes.expression.value.primitive.FloatValue; +import main.ast.nodes.expression.value.primitive.IntValue; +import main.ast.nodes.expression.value.primitive.StringValue; +import main.ast.nodes.statement.*; + +public interface IVisitor { + T visit(Program program); + T visit(Identifier identifier); + T visit(VarDeclaration varDeclaration); + T visit(FunctionDeclaration functionDeclaration); + T visit(PatternDeclaration patternDeclaration); + T visit(MainDeclaration mainDeclaration); + T visit(ReturnStatement returnStatement); + T visit(IfStatement ifStatement); + T visit(PutStatement putStatement); + T visit(LenStatement lenStatement); + T visit(PushStatement pushStatement); + T visit(LoopDoStatement loopDoStatement); + T visit(ForStatement forStatement); + T visit(FilterStatement filterStatement); + T visit(MatchPatternStatement matchPatternStatement); + T visit(ChopStatement chopStatement); + T visit(ChompStatement chompStatement); + T visit(AssignStatement assignStatement); + T visit(ExpressionStatement expressionStatement); + T visit(AppendExpression appendExpression); + T visit(BinaryExpression binaryExpression); + T visit(UnaryExpression unaryExpression); + T visit(AccessExpression accessExpression); + T visit(LambdaExpression lambdaExpression); + T visit(ListValue listValue); + T visit(FunctionPointer functionPointer); + T visit(BoolValue boolValue); + T visit(IntValue intValue); + T visit(StringValue stringValue); + T visit(FloatValue floatValue); +} diff --git a/Phase2Template/Phase2/src/main/visitor/Visitor.java b/Phase2Template/Phase2/src/main/visitor/Visitor.java new file mode 100644 index 0000000..0f3b09e --- /dev/null +++ b/Phase2Template/Phase2/src/main/visitor/Visitor.java @@ -0,0 +1,78 @@ +package main.visitor; + +import main.ast.nodes.Program; +import main.ast.nodes.declaration.FunctionDeclaration; +import main.ast.nodes.declaration.MainDeclaration; +import main.ast.nodes.declaration.PatternDeclaration; +import main.ast.nodes.declaration.VarDeclaration; +import main.ast.nodes.expression.*; +import main.ast.nodes.expression.value.FunctionPointer; +import main.ast.nodes.expression.value.ListValue; +import main.ast.nodes.expression.value.primitive.BoolValue; +import main.ast.nodes.expression.value.primitive.FloatValue; +import main.ast.nodes.expression.value.primitive.IntValue; +import main.ast.nodes.expression.value.primitive.StringValue; +import main.ast.nodes.statement.*; + +public class Visitor implements IVisitor { + @Override + public T visit(Program program){return null;} + @Override + public T visit(Identifier identifier){return null;} + @Override + public T visit(VarDeclaration varDeclaration){return null;} + @Override + public T visit(FunctionDeclaration functionDeclaration){return null;} + @Override + public T visit(PatternDeclaration patternDeclaration){return null;} + @Override + public T visit(MainDeclaration mainDeclaration){return null;} + @Override + public T visit(ReturnStatement returnStatement){return null;} + @Override + public T visit(IfStatement ifStatement){return null;} + @Override + public T visit(PutStatement putStatement){return null;} + @Override + public T visit(LenStatement lenStatement){return null;} + @Override + public T visit(PushStatement pushStatement){return null;} + @Override + public T visit(LoopDoStatement loopDoStatement){return null;} + @Override + public T visit(ForStatement forStatement){return null;} + @Override + public T visit(FilterStatement filterStatement){return null;} + @Override + public T visit(MatchPatternStatement matchPatternStatement){return null;} + @Override + public T visit(ChopStatement chopStatement){return null;} + @Override + public T visit(ChompStatement chompStatement){return null;} + @Override + public T visit(AssignStatement assignStatement){return null;} + @Override + public T visit(ExpressionStatement expressionStatement){return null;} + @Override + public T visit(AppendExpression appendExpression){return null;} + @Override + public T visit(BinaryExpression binaryExpression){return null;} + @Override + public T visit(UnaryExpression unaryExpression){return null;} + @Override + public T visit(AccessExpression accessExpression){return null;} + @Override + public T visit(LambdaExpression lambdaExpression){return null;} + @Override + public T visit(ListValue listValue){return null;} + @Override + public T visit(FunctionPointer functionPointer){return null;} + @Override + public T visit(BoolValue boolValue){return null;} + @Override + public T visit(IntValue intValue){return null;} + @Override + public T visit(StringValue stringValue){return null;} + @Override + public T visit(FloatValue floatValue){return null;} +} diff --git a/Phase2Template/Phase2/src/main/visitor/astPrinter/AstPrinter.java b/Phase2Template/Phase2/src/main/visitor/astPrinter/AstPrinter.java new file mode 100644 index 0000000..1a2874a --- /dev/null +++ b/Phase2Template/Phase2/src/main/visitor/astPrinter/AstPrinter.java @@ -0,0 +1,277 @@ +package main.visitor.astPrinter; + +import main.ast.nodes.Program; +import main.ast.nodes.declaration.FunctionDeclaration; +import main.ast.nodes.declaration.MainDeclaration; +import main.ast.nodes.declaration.PatternDeclaration; +import main.ast.nodes.declaration.VarDeclaration; +import main.ast.nodes.expression.*; +import main.ast.nodes.expression.value.FunctionPointer; +import main.ast.nodes.expression.value.ListValue; +import main.ast.nodes.expression.value.primitive.BoolValue; +import main.ast.nodes.expression.value.primitive.FloatValue; +import main.ast.nodes.expression.value.primitive.IntValue; +import main.ast.nodes.expression.value.primitive.StringValue; +import main.ast.nodes.statement.*; +import main.visitor.Visitor; + +public class AstPrinter extends Visitor { + public void printMessage(int line, String message){ + System.out.println("line:" + String.valueOf(line) + "->" + message); + } + + @Override + public Void visit(Program program) { + printMessage(program.getLine(), program.toString()); + for(FunctionDeclaration functionDeclaration : program.getFunctionDeclarations()){ + functionDeclaration.accept(this); + } + for(PatternDeclaration patternDeclaration : program.getPatternDeclarations()){ + patternDeclaration.accept(this); + } + program.getMain().accept(this); + return null; + } + @Override + public Void visit(Identifier identifier){ + printMessage(identifier.getLine(), identifier.toString()); + return null; + } + @Override + public Void visit(VarDeclaration varDeclaration){ + printMessage(varDeclaration.getLine(), varDeclaration.toString()); + if(varDeclaration.getDefaultVal() != null){ + varDeclaration.getDefaultVal().accept(this); + } + return null; + } + @Override + public Void visit(FunctionDeclaration functionDeclaration){ + printMessage(functionDeclaration.getLine(), functionDeclaration.toString()); + for(VarDeclaration varDeclaration : functionDeclaration.getArgs()){ + varDeclaration.accept(this); + } + for(Statement statement : functionDeclaration.getBody()){ + statement.accept(this); + } + return null; + } + @Override + public Void visit(PatternDeclaration patternDeclaration){ + printMessage(patternDeclaration.getLine(), patternDeclaration.toString()); + for(Expression expression:patternDeclaration.getConditions()){ + expression.accept(this); + } + for(Expression expression:patternDeclaration.getReturnExp()){ + expression.accept(this); + } + return null; + } + @Override + public Void visit(MainDeclaration mainDeclaration){ + printMessage(mainDeclaration.getLine(), mainDeclaration.toString()); + for(Statement statement : mainDeclaration.getBody()){ + statement.accept(this); + } + return null; + } + @Override + public Void visit(ReturnStatement returnStatement){ + printMessage(returnStatement.getLine(), returnStatement.toString()); + if(returnStatement.hasRetExpression()){ + returnStatement.getReturnExp().accept(this); + } + return null; + } + @Override + public Void visit(IfStatement ifStatement){ + printMessage(ifStatement.getLine(), ifStatement.toString()); + for(Expression expression: ifStatement.getConditions()){ + expression.accept(this); + } + for(Statement statement: ifStatement.getThenBody()){ + statement.accept(this); + } + for(Statement statement: ifStatement.getElseBody()){ + statement.accept(this); + } + return null; + } + @Override + public Void visit(PutStatement putStatement){ + printMessage(putStatement.getLine(), putStatement.toString()); + putStatement.getExpression().accept(this); + return null; + } + @Override + public Void visit(LenStatement lenStatement){ + printMessage(lenStatement.getLine(), lenStatement.toString()); + lenStatement.getExpression().accept(this); + return null; + } + @Override + public Void visit(PushStatement pushStatement){ + printMessage(pushStatement.getLine(), pushStatement.toString()); + pushStatement.getInitial().accept(this); + pushStatement.getToBeAdded().accept(this); + return null; + } + @Override + public Void visit(LoopDoStatement loopDoStatement){ + printMessage(loopDoStatement.getLine(), loopDoStatement.toString()); + for(Statement statement: loopDoStatement.getLoopBodyStmts()){ + statement.accept(this); + } + for(Expression expression : loopDoStatement.getLoopConditions()){ + expression.accept(this); + } + if(loopDoStatement.getLoopRetStmt() != null) { + loopDoStatement.getLoopRetStmt().accept(this); + } + return null; + } + @Override + public Void visit(ForStatement forStatement){ + printMessage(forStatement.getLine(), forStatement.toString()); + for(Expression expression: forStatement.getRangeExpressions()){ + expression.accept(this); + } + for(Statement statement: forStatement.getLoopBody()){ + statement.accept(this); + } + for(Expression expression: forStatement.getLoopBodyExpressions()){ + expression.accept(this); + } + if(forStatement.getReturnStatement() != null){ + forStatement.getReturnStatement().accept(this); + } + return null; + } + + @Override + public Void visit(FilterStatement filterStatement){ + printMessage(filterStatement.getLine(), filterStatement.toString()); + filterStatement.getFilterExpression().accept(this); + for(Expression expression: filterStatement.getConditionalExpressions()){ + expression.accept(this); + } + for(Expression expression: filterStatement.getRangeExpressions()){ + expression.accept(this); + } + return null; + } + @Override + public Void visit(MatchPatternStatement matchPatternStatement){ + printMessage(matchPatternStatement.getLine(), matchPatternStatement.toString()); + matchPatternStatement.getMatchArgument().accept(this); + return null; + } + @Override + public Void visit(ChopStatement chopStatement){ + printMessage(chopStatement.getLine(), chopStatement.toString()); + chopStatement.getChopExpression().accept(this); + return null; + } + @Override + public Void visit(ChompStatement chompStatement){ + printMessage(chompStatement.getLine(), chompStatement.toString()); + chompStatement.getChompExpression().accept(this); + return null; + } + @Override + public Void visit(AssignStatement assignStatement){ + printMessage(assignStatement.getLine(), assignStatement.toString()); + if(assignStatement.isAccessList()){ + assignStatement.getAccessListExpression().accept(this); + } + assignStatement.getAssignExpression().accept(this); + return null; + } + @Override + public Void visit(ExpressionStatement expressionStatement){ + printMessage(expressionStatement.getLine(), expressionStatement.toString()); + expressionStatement.getExpression().accept(this); + return null; + } + @Override + public Void visit(AppendExpression appendExpression){ + printMessage(appendExpression.getLine(), appendExpression.toString()); + appendExpression.getAppendee().accept(this); + for(Expression expression : appendExpression.getAppendeds()){ + expression.accept(this); + } + return null; + } + @Override + public Void visit(BinaryExpression binaryExpression){ + printMessage(binaryExpression.getLine(), binaryExpression.toString()); + binaryExpression.getFirstOperand().accept(this); + binaryExpression.getSecondOperand().accept(this); + return null; + } + @Override + public Void visit(UnaryExpression unaryExpression){ + printMessage(unaryExpression.getLine(), unaryExpression.toString()); + unaryExpression.getExpression().accept(this); + return null; + } + @Override + public Void visit(AccessExpression accessExpression){ + printMessage(accessExpression.getLine(), accessExpression.toString()); + accessExpression.getAccessedExpression().accept(this); + for(Expression expression : accessExpression.getArguments()){ + expression.accept(this); + } + for(Expression expression: accessExpression.getDimentionalAccess()){ + expression.accept(this); + } + return null; + } + @Override + public Void visit(LambdaExpression lambdaExpression){ + printMessage(lambdaExpression.getLine(), lambdaExpression.toString()); + for(VarDeclaration varDeclaration : lambdaExpression.getDeclarationArgs()){ + varDeclaration.accept(this); + } + for(Statement statement : lambdaExpression.getBody()){ + statement.accept(this); + } +// for(Expression expression: lambdaExpression.getArgs()){ +// expression.accept(this); +// } + return null; + } + @Override + public Void visit(ListValue listValue){ + printMessage(listValue.getLine(), listValue.toString()); + for(Expression expression : listValue.getElements()){ + expression.accept(this); + } + return null; + } + @Override + public Void visit(FunctionPointer functionPointer){ + printMessage(functionPointer.getLine(), functionPointer.toString()); + return null; + } + @Override + public Void visit(BoolValue boolValue){ + printMessage(boolValue.getLine(), boolValue.toString()); + return null; + } + @Override + public Void visit(IntValue intValue){ + printMessage(intValue.getLine(), intValue.toString()); + return null; + } + @Override + public Void visit(StringValue stringValue){ + printMessage(stringValue.getLine(), stringValue.toString()); + return null; + } + @Override + public Void visit(FloatValue floatValue){ + printMessage(floatValue.getLine(), floatValue.toString()); + return null; + } +} diff --git a/Phase2Template/Phase2/src/main/visitor/nameAnalyzer/DependencyDetector.java b/Phase2Template/Phase2/src/main/visitor/nameAnalyzer/DependencyDetector.java new file mode 100644 index 0000000..62e5f8b --- /dev/null +++ b/Phase2Template/Phase2/src/main/visitor/nameAnalyzer/DependencyDetector.java @@ -0,0 +1,145 @@ +package main.visitor.nameAnalyzer; + +import main.ast.nodes.Program; +import main.ast.nodes.declaration.FunctionDeclaration; +import main.ast.nodes.expression.*; +import main.ast.nodes.statement.*; +import main.compileError.CompileError; +import main.compileError.nameErrors.CircularDependency; +import main.visitor.Visitor; +import main.symbolTable.utils.Graph; + +import javax.swing.plaf.nimbus.State; +import java.util.ArrayList; +import java.util.List; + +public class DependencyDetector extends Visitor { + public ArrayList dependencyError = new ArrayList<>(); + String currentParent; + private Graph dependencyGraph = new Graph(); + @Override + public Void visit(Program program){ + for(FunctionDeclaration functionDeclaration : program.getFunctionDeclarations()){ + currentParent = functionDeclaration.getFunctionName().getName(); + functionDeclaration.accept(this); + } + + return null; + } + @Override + public Void visit(FunctionDeclaration functionDeclaration){ + for(Statement statement : functionDeclaration.getBody()) { + statement.accept(this); + } + return null; + } + public Void visit(AssignStatement assignStatement){ + if(assignStatement.isAccessList()){ + assignStatement.getAccessListExpression().accept(this); + } + assignStatement.getAssignExpression().accept(this); + return null; + } + public Void visit(ExpressionStatement expressionStatement){ + expressionStatement.accept(this); + return null; + } + public Void visit(ForStatement forStatement){ + for(Expression expression:forStatement.getLoopBodyExpressions()){ + expression.accept(this); + } + for(Expression expression: forStatement.getRangeExpressions()){ + expression.accept(this); + } + for(Statement statement: forStatement.getLoopBody()){ + statement.accept(this); + } + return null; + } + public Void visit(IfStatement ifStatement){ + for(Expression expression: ifStatement.getConditions()){ + expression.accept(this); + } + for(Statement statement: ifStatement.getThenBody()){ + statement.accept(this); + } + for(Statement statement: ifStatement.getElseBody()){ + statement.accept(this); + } + return null; + } + public Void visit(LoopDoStatement loopDoStatement){ + for(Statement statement : loopDoStatement.getLoopBodyStmts()){ + statement.accept(this); + } + for(Expression expression : loopDoStatement.getLoopConditions()){ + expression.accept(this); + } + if(loopDoStatement.getLoopRetStmt() != null){ + loopDoStatement.getLoopRetStmt().accept(this); + } + return null; + } + public Void visit(PushStatement pushStatement){ + pushStatement.getToBeAdded().accept(this); + return null; + } + public Void visit(PutStatement putStatement){ + putStatement.getExpression().accept(this); + return null; + } + public Void visit(ReturnStatement returnStatement){ + if(returnStatement.hasRetExpression()){ + returnStatement.getReturnExp().accept(this); + } + return null; + } + public Void visit(AccessExpression accessExpression){ + if(accessExpression.isFunctionCall()){ +// dependencyGraph.addEdge(currentParent, accessExpression.getAccessedExpression().toString()); + accessExpression.getAccessedExpression().accept(this); + } + return null; + } + public Void visit(Identifier identifier){ + dependencyGraph.addEdge(currentParent, identifier.getName()); + return null; + } + public Void visit(AppendExpression appendExpression){ + appendExpression.getAppendee().accept(this); + for(Expression expression: appendExpression.getAppendeds()){ + expression.accept(this); + } + return null; + } + public Void visit(BinaryExpression binaryExpression){ + binaryExpression.getFirstOperand().accept(this); + binaryExpression.getSecondOperand().accept(this); + return null; + } + public Void visit(ChopStatement chopStatement){ + chopStatement.getChopExpression().accept(this); + return null; + } + public Void visit(ChompStatement chompStatement){ + chompStatement.getChompExpression().accept(this); + return null; + } + public Void visit(LenStatement lenStatement){ + lenStatement.getExpression().accept(this); + return null; + } + public Void visit(UnaryExpression unaryExpression){ + unaryExpression.getExpression().accept(this); + return null; + } + public Void findDependency(){ +// ArrayList> cycles = dependencyGraph.findCycles(); +// for(List cycle : cycles){ +// dependencyError.add(new CircularDependency(cycle)); +// } + dependencyGraph.printGraph(); + return null; + } + +} diff --git a/Phase2Template/Phase2/src/main/visitor/nameAnalyzer/NameAnalyzer.java b/Phase2Template/Phase2/src/main/visitor/nameAnalyzer/NameAnalyzer.java new file mode 100644 index 0000000..d436d55 --- /dev/null +++ b/Phase2Template/Phase2/src/main/visitor/nameAnalyzer/NameAnalyzer.java @@ -0,0 +1,459 @@ +package main.visitor.nameAnalyzer; + +import main.ast.nodes.Program; +import main.ast.nodes.declaration.FunctionDeclaration; +import main.ast.nodes.declaration.MainDeclaration; +import main.ast.nodes.declaration.PatternDeclaration; +import main.ast.nodes.declaration.VarDeclaration; +import main.ast.nodes.expression.*; +import main.ast.nodes.expression.value.FunctionPointer; +import main.ast.nodes.expression.value.ListValue; +import main.ast.nodes.expression.value.primitive.BoolValue; +import main.ast.nodes.expression.value.primitive.FloatValue; +import main.ast.nodes.expression.value.primitive.IntValue; +import main.ast.nodes.expression.value.primitive.StringValue; +import main.ast.nodes.statement.*; +import main.compileError.CompileError; +import main.compileError.nameErrors.*; +import main.symbolTable.SymbolTable; +import main.symbolTable.exceptions.ItemAlreadyExists; +import main.symbolTable.exceptions.ItemNotFound; +import main.symbolTable.item.FunctionItem; +import main.symbolTable.item.PatternItem; +import main.symbolTable.item.SymbolTableItem; +import main.symbolTable.item.VarItem; +import main.visitor.Visitor; + +import java.util.ArrayList; +import java.util.Map; + +public class NameAnalyzer extends Visitor { + public ArrayList nameErrors = new ArrayList<>(); + boolean isFunctionCallId = false; + boolean isPatternMatchId = false; + boolean isLambdaAccess = false; + @Override + public Void visit(Program program){ + SymbolTable.root = new SymbolTable(); + SymbolTable.top = new SymbolTable(); + + //addFunctions + ArrayList functionItems = new ArrayList<>(); + int duplicateFunctionId = 0; + for(FunctionDeclaration functionDeclaration: program.getFunctionDeclarations()){ + FunctionItem functionItem = new FunctionItem(functionDeclaration); + try { + SymbolTable.root.put(functionItem); + functionItems.add(functionItem); + }catch (ItemAlreadyExists e){ + nameErrors.add(new RedefinitionOfFunction(functionDeclaration.getLine(), + functionDeclaration.getFunctionName().getName())); + duplicateFunctionId += 1; + String freshName = functionItem.getName() + "#" + String.valueOf(duplicateFunctionId); + Identifier newId = functionDeclaration.getFunctionName(); + newId.setName(freshName); + functionDeclaration.setFunctionName(newId); + FunctionItem newItem = new FunctionItem(functionDeclaration); + functionItems.add(newItem); + try { + SymbolTable.root.put(newItem); + }catch (ItemAlreadyExists ignored){} + } + } + //addPatterns + int duplicatePatternId = 0; + ArrayList patternItems = new ArrayList<>(); + for(PatternDeclaration patternDeclaration : program.getPatternDeclarations()){ + PatternItem patternItem = new PatternItem(patternDeclaration); + try{ + SymbolTable.root.put(patternItem); + patternItems.add(patternItem); + }catch (ItemAlreadyExists e){ + nameErrors.add(new RedefinitionOfPattern(patternDeclaration.getLine(), + patternDeclaration.getPatternName().getName())); + duplicatePatternId += 1; + String freshName = patternItem.getName() + "#" + String.valueOf(duplicatePatternId); + Identifier newId = patternDeclaration.getPatternName(); + newId.setName(freshName); + patternDeclaration.setPatternName(newId); + PatternItem newItem = new PatternItem(patternDeclaration); + patternItems.add(newItem); + try{ + SymbolTable.root.put(newItem); + }catch (ItemAlreadyExists ignored){} + } + } + //visitFunctions + int visitingFunctionIndex = 0; + for(FunctionDeclaration functionDeclaration : program.getFunctionDeclarations()){ + FunctionItem functionItem = functionItems.get(visitingFunctionIndex); + SymbolTable functionSymboleTable = new SymbolTable(); + functionItem.setFunctionSymbolTable(functionSymboleTable); + SymbolTable.push(functionSymboleTable); + functionDeclaration.accept(this); + SymbolTable.pop(); + visitingFunctionIndex += 1; + } + //visitPatterns + int visitingPatternIndex = 0; + for(PatternDeclaration patternDeclaration : program.getPatternDeclarations()){ + PatternItem patternItem = patternItems.get(visitingPatternIndex); + SymbolTable patternSymbolTable = new SymbolTable(); + patternItem.setPatternSymbolTable(patternSymbolTable); + SymbolTable.push(patternSymbolTable); + patternDeclaration.accept(this); + SymbolTable.pop(); + visitingPatternIndex += 1; + } + //visitMain + program.getMain().accept(this); + return null; + } + @Override + public Void visit(Identifier identifier){ + if(isFunctionCallId && !isLambdaAccess){ + try{ + SymbolTable.root.getItem(FunctionItem.START_KEY + identifier.getName()); + }catch (ItemNotFound e){ + nameErrors.add(new FunctionNotDeclared(identifier.getLine(), identifier.getName())); + } + } else if (isPatternMatchId) { + try{ + SymbolTable.root.getItem(PatternItem.START_KEY + identifier.getName()); + }catch (ItemNotFound e){ + nameErrors.add(new PatternNotDeclared(identifier.getLine(), identifier.getName())); + } + + } else{ + try{ + SymbolTable.top.getItem(VarItem.START_KEY + identifier.getName()); + }catch (ItemNotFound e){ + nameErrors.add(new VariableNotDeclared(identifier.getLine(), identifier.getName())); + } + } + isFunctionCallId = false; + isPatternMatchId = false; + return null; + } + @Override + public Void visit(VarDeclaration varDeclaration){ + SymbolTable currentScopeSymbolTable = SymbolTable.top; + VarItem varItem = new VarItem(varDeclaration.getName()); + try{ + currentScopeSymbolTable.put(varItem); + }catch (ItemAlreadyExists ignored){ + + } + return null; + } + @Override + public Void visit(FunctionDeclaration functionDeclaration){ + SymbolTable currentScopeSymbolTable = SymbolTable.top; + for(VarDeclaration varDeclaration : functionDeclaration.getArgs()){ + if(varDeclaration.getName().getName().equals(functionDeclaration.getFunctionName().getName())){ + nameErrors.add(new IdenticalArgFunctionName(varDeclaration.getLine(), varDeclaration.getName().getName())); + } + VarItem varItem = new VarItem(varDeclaration.getName()); + try{ + currentScopeSymbolTable.put(varItem); + }catch (ItemAlreadyExists e){ + nameErrors.add(new DuplicateArg(varDeclaration.getLine(), varDeclaration.getName().getName())); + } + } + SymbolTable.push(currentScopeSymbolTable); + for(Statement statement : functionDeclaration.getBody()){ + statement.accept(this); + } + SymbolTable.pop(); + return null; + } + @Override + public Void visit(PatternDeclaration patternDeclaration){ + SymbolTable currentScopeSymbolTable = SymbolTable.top; + if(patternDeclaration.getPatternName().getName().equals(patternDeclaration.getTargetVariable().getName())){ + nameErrors.add(new IdenticalArgPatternName(patternDeclaration.getTargetVariable().getLine(), + patternDeclaration.getTargetVariable().getName())); + } + VarItem varItem = new VarItem(patternDeclaration.getTargetVariable()); + try{ + currentScopeSymbolTable.put(varItem); + } + catch (ItemAlreadyExists ignored){ + + } + SymbolTable.push(currentScopeSymbolTable); + for(Expression expression : patternDeclaration.getConditions()){ + expression.accept(this); + } + for(Expression expression : patternDeclaration.getReturnExp()){ + expression.accept(this); + } + SymbolTable.pop(); + return null; + } + @Override + public Void visit(MainDeclaration mainDeclaration){ + for(Statement statement : mainDeclaration.getBody()){ + statement.accept(this); + } + return null; + } + @Override + public Void visit(ReturnStatement returnStatement){ + if(returnStatement.hasRetExpression()){ + returnStatement.getReturnExp().accept(this); + } + return null; + } + @Override + public Void visit(IfStatement ifStatement){ + SymbolTable currentSymbolTable = SymbolTable.top.copy(); + SymbolTable.push(currentSymbolTable); + for(Expression expression : ifStatement.getConditions()){ + expression.accept(this); + } + for(Statement statement : ifStatement.getThenBody()){ + statement.accept(this); + } + for(Statement statement : ifStatement.getElseBody()){ + statement.accept(this); + } + SymbolTable.pop(); + return null; + } + @Override + public Void visit(PutStatement putStatement){ + putStatement.getExpression().accept(this); + return null; + } + @Override + public Void visit(PushStatement pushStatement){ + pushStatement.getInitial().accept(this); + pushStatement.getToBeAdded().accept(this); + return null; + } + @Override + public Void visit(LenStatement lenStatement){ + lenStatement.getExpression().accept(this); + return null; + } + @Override + public Void visit(LoopDoStatement loopDoStatement){ + SymbolTable currentSymbolTable = SymbolTable.top.copy(); + SymbolTable.push(currentSymbolTable); + for(Statement statement : loopDoStatement.getLoopBodyStmts()){ + statement.accept(this); + } + for(Expression expression : loopDoStatement.getLoopConditions()){ + expression.accept(this); + } + if(loopDoStatement.getLoopRetStmt() != null){ + loopDoStatement.getLoopRetStmt().accept(this); + } + SymbolTable.pop(); + return null; + } + @Override + public Void visit(ForStatement forStatement){ + SymbolTable currenctScopeSymbolTable = SymbolTable.top.copy(); + VarItem varItem = new VarItem(forStatement.getIteratorId()); + try{ + currenctScopeSymbolTable.put(varItem); + }catch (ItemAlreadyExists ignored){ + + } + SymbolTable.push(currenctScopeSymbolTable); + for(Expression expression : forStatement.getRangeExpressions()){ + expression.accept(this); + } + for(Statement statement : forStatement.getLoopBody()){ + statement.accept(this); + } + for(Expression expression : forStatement.getLoopBodyExpressions()){ + expression.accept(this); + } + if(forStatement.getReturnStatement() != null){ + forStatement.getReturnStatement().accept(this); + } + SymbolTable.pop(); + return null; + } + @Override + public Void visit(FilterStatement filterStatement){ + SymbolTable currentScopeSymbolTable = SymbolTable.top; + VarItem varItem = new VarItem(filterStatement.getIteratorId()); + try{ + currentScopeSymbolTable.put(varItem); + }catch (ItemAlreadyExists ignored){ + + } + SymbolTable.push(currentScopeSymbolTable); + filterStatement.getFilterExpression().accept(this); + for(Expression expression : filterStatement.getRangeExpressions()){ + expression.accept(this); + } + for(Expression expression : filterStatement.getConditionalExpressions()){ + expression.accept(this); + } + SymbolTable.pop(); + return null; + } + @Override + public Void visit(MatchPatternStatement matchPatternStatement){ + isPatternMatchId = true; + matchPatternStatement.getPatternId().accept(this); + matchPatternStatement.getMatchArgument().accept(this); + return null; + } + @Override + public Void visit(ChompStatement chompStatement){ + chompStatement.getChompExpression().accept(this); + return null; + } + @Override + public Void visit(ChopStatement chopStatement){ + chopStatement.getChopExpression().accept(this); + return null; + } + @Override + public Void visit(AssignStatement assignStatement){ + SymbolTable currentScopeSymbolTable = SymbolTable.top; + VarItem varItem = new VarItem(assignStatement.getAssignedId()); + try{ + currentScopeSymbolTable.put(varItem); + }catch (ItemAlreadyExists ignored){ + + } + SymbolTable.push(currentScopeSymbolTable); + assignStatement.getAssignExpression().accept(this); + if(assignStatement.isAccessList()){ + assignStatement.getAccessListExpression().accept(this); + } + SymbolTable.pop(); + return null; + } + @Override + public Void visit(ExpressionStatement expressionStatement){ + expressionStatement.getExpression().accept(this); + return null; + } + @Override + public Void visit(AppendExpression appendExpression){ + appendExpression.getAppendee().accept(this); + for(Expression expression : appendExpression.getAppendeds()){ + expression.accept(this); + } + return null; + } + @Override + public Void visit(BinaryExpression binaryExpression){ + binaryExpression.getFirstOperand().accept(this); + binaryExpression.getSecondOperand().accept(this); + return null; + } + @Override + public Void visit(UnaryExpression unaryExpression){ + unaryExpression.getExpression().accept(this); + return null; + } + @Override + public Void visit(AccessExpression accessExpression){ + int minArgRequired = 0; + int maxArgRequired = 0; + boolean functionNotDeclared = false; + if(accessExpression.isFunctionCall()){ + isFunctionCallId = true; + accessExpression.getAccessedExpression().accept(this); + if(!isLambdaAccess) { + Identifier functionName = (Identifier) accessExpression.getAccessedExpression(); + try { + FunctionItem functionItem = (FunctionItem) SymbolTable.root.getItem(FunctionItem.START_KEY + functionName.getName()); + maxArgRequired = functionItem.getFunctionDeclaration().getArgs().size(); + for (VarDeclaration varDeclaration : functionItem.getFunctionDeclaration().getArgs()) { + if (varDeclaration.getDefaultVal() != null) { + minArgRequired += 1; + } + } + minArgRequired = maxArgRequired - minArgRequired; + } catch (ItemNotFound ignored) { + functionNotDeclared = true; + } + } + + } + else{ + accessExpression.getAccessedExpression().accept(this); + } + int numberOfProvidedArgs = 0; + for(Expression expression : accessExpression.getArguments()){ + numberOfProvidedArgs += 1; + expression.accept(this); + } + if(!functionNotDeclared && ((numberOfProvidedArgs < minArgRequired) || (numberOfProvidedArgs > maxArgRequired))){ + if(!isLambdaAccess) { + Identifier functionName = (Identifier) accessExpression.getAccessedExpression(); + nameErrors.add(new ArgMisMatch(accessExpression.getLine(), functionName.getName())); + } + } + isLambdaAccess = false; + for(Expression expression : accessExpression.getDimentionalAccess()){ + expression.accept(this); + } + + return null; + } + @Override + public Void visit(LambdaExpression lambdaExpression){ + SymbolTable currentScopeSymbolTable = SymbolTable.top; + for(VarDeclaration varDeclaration : lambdaExpression.getDeclarationArgs()){ + VarItem varItem = new VarItem(varDeclaration.getName()); + try{ + currentScopeSymbolTable.put(varItem); + }catch (ItemAlreadyExists e){ + nameErrors.add(new DuplicateArg(varDeclaration.getLine(), varDeclaration.getName().getName())); + } + } + SymbolTable.push(currentScopeSymbolTable); + isLambdaAccess = true; + for(Statement statement : lambdaExpression.getBody()){ + statement.accept(this); + } + +// for(Expression expression : lambdaExpression.getArgs()){ +// expression.accept(this); +// } + SymbolTable.pop(); + return null; + } + @Override + public Void visit(ListValue listValue){ + for(Expression expression : listValue.getElements()){ + expression.accept(this); + } + return null; + } + @Override + public Void visit(FunctionPointer functionPointer){ + SymbolTable currentScopeSymbolTable = SymbolTable.top; + VarItem varItem = new VarItem(functionPointer.getId()); + try { + currentScopeSymbolTable.put(varItem); + }catch (ItemAlreadyExists ignored){ + + } + return null; + } + @Override + public Void visit(BoolValue boolValue){ + return null; + } + @Override + public Void visit(IntValue intValue){ + return null; + } + @Override + public Void visit(StringValue stringValue){return null;} + @Override + public Void visit(FloatValue floatValue){return null;} + +} diff --git a/Phase2Template/Phase2/src/parsers/FunctionCraft.interp b/Phase2Template/Phase2/src/parsers/FunctionCraft.interp new file mode 100644 index 0000000..c5704fe --- /dev/null +++ b/Phase2Template/Phase2/src/parsers/FunctionCraft.interp @@ -0,0 +1,178 @@ +token literal names: +null +'def' +'end' +'main' +'puts' +'push' +'len' +'return' +'if' +'else' +'elseif' +'method' +'pattern' +'match' +'loop' +'for' +'in' +'do' +'chop' +'chomp' +'+' +'-' +'*' +'/' +'==' +'!=' +'<=' +'>=' +'>' +'<' +'&&' +'||' +'!' +'++' +'--' +' |' +'|' +'<<' +'true' +'false' +'break' +'next' +'->' +'+=' +'-=' +'*=' +'/=' +'%=' +'=' +'(' +')' +'[' +']' +'{' +'}' +',' +'.' +'..' +':' +';' +null +null +null +null +null +null + +token symbolic names: +null +DEF +END +MAIN +PUTS +PUSH +LEN +RETURN +IF +ELSE +ELSEIF +METHOD +PATTERN +MATCH +LOOP +FOR +IN +DO +CHOP +CHOMP +PLUS +MINUS +MULT +DIVIDE +EQUAL +NOT_EQUAL +LESS_EQUAL_THAN +GREATER_EQUAL_THAN +GREATER_THAN +LESS_THAN +AND +OR +NOT +INCREMENT +DECREMENT +PATTERN_MATCHING_SEPARATOR +SEPARATOR +APPEND +TRUE +FALSE +BREAK +NEXT +ARROW +PLUS_ASSIGN +MINUS_ASSIGN +MULT_ASSIGN +DIVIDE_ASSIGN +MOD_ASSIGN +ASSIGN +LPAR +RPAR +LBRACK +RBRACK +LBRACE +RBRACE +COMMA +DOT +DOUBLEDOT +COLON +SEMICOLLON +INT_VALUE +FLOAT_VALUE +IDENTIFIER +STRING_VALUE +COMMENT +WS + +rule names: +program +functionDeclaration +functionArgumentsDeclaration +patternMatching +main +functionArguments +returnStatement +ifStatement +condition +putsStatement +lenStatement +pushStatement +loopDoStatement +loopBody +forStatement +range +filterStatement +matchPatternStatement +chopStatement +chompStatement +assignment +accessList +statement +body +expression +eqaulityExpression +relationalExpression +additiveExpression +multiplicativeExpression +preUnaryExpression +accessExpression +otherExpression +lambdaFunction +values +listValue +boolValue +functionPointer + + +atn: +[4, 1, 65, 676, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 5, 0, 82, 8, 0, 10, 0, 12, 0, 85, 9, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 5, 2, 108, 8, 2, 10, 2, 12, 2, 111, 9, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 5, 2, 127, 8, 2, 10, 2, 12, 2, 130, 9, 2, 1, 2, 1, 2, 3, 2, 134, 8, 2, 3, 2, 136, 8, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 5, 3, 155, 8, 3, 10, 3, 12, 3, 158, 9, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 5, 5, 179, 8, 5, 10, 5, 12, 5, 182, 9, 5, 3, 5, 184, 8, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 191, 8, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 3, 7, 207, 8, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 3, 7, 217, 8, 7, 1, 7, 1, 7, 1, 7, 1, 7, 5, 7, 223, 8, 7, 10, 7, 12, 7, 226, 9, 7, 1, 7, 1, 7, 1, 7, 1, 7, 3, 7, 232, 8, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 244, 8, 8, 1, 8, 1, 8, 1, 8, 3, 8, 249, 8, 8, 5, 8, 251, 8, 8, 10, 8, 12, 8, 254, 9, 8, 5, 8, 256, 8, 8, 10, 8, 12, 8, 259, 9, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 298, 8, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 306, 8, 13, 1, 13, 5, 13, 309, 8, 13, 10, 13, 12, 13, 312, 9, 13, 1, 13, 1, 13, 1, 13, 3, 13, 317, 8, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 5, 15, 344, 8, 15, 10, 15, 12, 15, 347, 9, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 3, 15, 354, 8, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 5, 16, 370, 8, 16, 10, 16, 12, 16, 373, 9, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 403, 8, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 417, 8, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 3, 22, 451, 8, 22, 1, 23, 1, 23, 1, 23, 1, 23, 5, 23, 457, 8, 23, 10, 23, 12, 23, 460, 9, 23, 1, 23, 1, 23, 1, 23, 3, 23, 465, 8, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 5, 24, 476, 8, 24, 10, 24, 12, 24, 479, 9, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 3, 25, 487, 8, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 3, 25, 495, 8, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 3, 26, 511, 8, 26, 1, 26, 1, 26, 1, 26, 5, 26, 516, 8, 26, 10, 26, 12, 26, 519, 9, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 3, 27, 531, 8, 27, 1, 27, 1, 27, 1, 27, 5, 27, 536, 8, 27, 10, 27, 12, 27, 539, 9, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 3, 28, 551, 8, 28, 1, 28, 1, 28, 1, 28, 5, 28, 556, 8, 28, 10, 28, 12, 28, 559, 9, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 3, 29, 570, 8, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 3, 29, 578, 8, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 5, 30, 587, 8, 30, 10, 30, 12, 30, 590, 9, 30, 1, 30, 1, 30, 1, 30, 5, 30, 595, 8, 30, 10, 30, 12, 30, 598, 9, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 3, 31, 629, 8, 31, 1, 31, 3, 31, 632, 8, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 3, 33, 656, 8, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 3, 35, 667, 8, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 0, 4, 48, 52, 54, 56, 37, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 0, 1, 1, 0, 30, 31, 712, 0, 74, 1, 0, 0, 0, 2, 89, 1, 0, 0, 0, 4, 100, 1, 0, 0, 0, 6, 139, 1, 0, 0, 0, 8, 161, 1, 0, 0, 0, 10, 171, 1, 0, 0, 0, 12, 185, 1, 0, 0, 0, 14, 195, 1, 0, 0, 0, 16, 236, 1, 0, 0, 0, 18, 260, 1, 0, 0, 0, 20, 267, 1, 0, 0, 0, 22, 273, 1, 0, 0, 0, 24, 282, 1, 0, 0, 0, 26, 288, 1, 0, 0, 0, 28, 318, 1, 0, 0, 0, 30, 353, 1, 0, 0, 0, 32, 355, 1, 0, 0, 0, 34, 377, 1, 0, 0, 0, 36, 385, 1, 0, 0, 0, 38, 391, 1, 0, 0, 0, 40, 397, 1, 0, 0, 0, 42, 422, 1, 0, 0, 0, 44, 450, 1, 0, 0, 0, 46, 452, 1, 0, 0, 0, 48, 466, 1, 0, 0, 0, 50, 494, 1, 0, 0, 0, 52, 496, 1, 0, 0, 0, 54, 520, 1, 0, 0, 0, 56, 540, 1, 0, 0, 0, 58, 577, 1, 0, 0, 0, 60, 579, 1, 0, 0, 0, 62, 631, 1, 0, 0, 0, 64, 633, 1, 0, 0, 0, 66, 655, 1, 0, 0, 0, 68, 657, 1, 0, 0, 0, 70, 666, 1, 0, 0, 0, 72, 668, 1, 0, 0, 0, 74, 83, 6, 0, -1, 0, 75, 76, 3, 2, 1, 0, 76, 77, 6, 0, -1, 0, 77, 82, 1, 0, 0, 0, 78, 79, 3, 6, 3, 0, 79, 80, 6, 0, -1, 0, 80, 82, 1, 0, 0, 0, 81, 75, 1, 0, 0, 0, 81, 78, 1, 0, 0, 0, 82, 85, 1, 0, 0, 0, 83, 81, 1, 0, 0, 0, 83, 84, 1, 0, 0, 0, 84, 86, 1, 0, 0, 0, 85, 83, 1, 0, 0, 0, 86, 87, 3, 8, 4, 0, 87, 88, 6, 0, -1, 0, 88, 1, 1, 0, 0, 0, 89, 90, 6, 1, -1, 0, 90, 91, 5, 1, 0, 0, 91, 92, 6, 1, -1, 0, 92, 93, 5, 62, 0, 0, 93, 94, 6, 1, -1, 0, 94, 95, 3, 4, 2, 0, 95, 96, 6, 1, -1, 0, 96, 97, 3, 46, 23, 0, 97, 98, 6, 1, -1, 0, 98, 99, 5, 2, 0, 0, 99, 3, 1, 0, 0, 0, 100, 101, 6, 2, -1, 0, 101, 135, 5, 49, 0, 0, 102, 103, 5, 62, 0, 0, 103, 109, 6, 2, -1, 0, 104, 105, 5, 55, 0, 0, 105, 106, 5, 62, 0, 0, 106, 108, 6, 2, -1, 0, 107, 104, 1, 0, 0, 0, 108, 111, 1, 0, 0, 0, 109, 107, 1, 0, 0, 0, 109, 110, 1, 0, 0, 0, 110, 133, 1, 0, 0, 0, 111, 109, 1, 0, 0, 0, 112, 113, 5, 55, 0, 0, 113, 114, 5, 51, 0, 0, 114, 115, 5, 62, 0, 0, 115, 116, 6, 2, -1, 0, 116, 117, 5, 48, 0, 0, 117, 118, 3, 48, 24, 0, 118, 128, 6, 2, -1, 0, 119, 120, 5, 55, 0, 0, 120, 121, 5, 62, 0, 0, 121, 122, 6, 2, -1, 0, 122, 123, 5, 48, 0, 0, 123, 124, 3, 48, 24, 0, 124, 125, 6, 2, -1, 0, 125, 127, 1, 0, 0, 0, 126, 119, 1, 0, 0, 0, 127, 130, 1, 0, 0, 0, 128, 126, 1, 0, 0, 0, 128, 129, 1, 0, 0, 0, 129, 131, 1, 0, 0, 0, 130, 128, 1, 0, 0, 0, 131, 132, 5, 52, 0, 0, 132, 134, 1, 0, 0, 0, 133, 112, 1, 0, 0, 0, 133, 134, 1, 0, 0, 0, 134, 136, 1, 0, 0, 0, 135, 102, 1, 0, 0, 0, 135, 136, 1, 0, 0, 0, 136, 137, 1, 0, 0, 0, 137, 138, 5, 50, 0, 0, 138, 5, 1, 0, 0, 0, 139, 140, 5, 12, 0, 0, 140, 141, 6, 3, -1, 0, 141, 142, 5, 62, 0, 0, 142, 143, 6, 3, -1, 0, 143, 144, 5, 49, 0, 0, 144, 145, 5, 62, 0, 0, 145, 146, 6, 3, -1, 0, 146, 156, 5, 50, 0, 0, 147, 148, 5, 35, 0, 0, 148, 149, 3, 16, 8, 0, 149, 150, 6, 3, -1, 0, 150, 151, 5, 48, 0, 0, 151, 152, 3, 48, 24, 0, 152, 153, 6, 3, -1, 0, 153, 155, 1, 0, 0, 0, 154, 147, 1, 0, 0, 0, 155, 158, 1, 0, 0, 0, 156, 154, 1, 0, 0, 0, 156, 157, 1, 0, 0, 0, 157, 159, 1, 0, 0, 0, 158, 156, 1, 0, 0, 0, 159, 160, 5, 59, 0, 0, 160, 7, 1, 0, 0, 0, 161, 162, 6, 4, -1, 0, 162, 163, 5, 1, 0, 0, 163, 164, 5, 3, 0, 0, 164, 165, 6, 4, -1, 0, 165, 166, 5, 49, 0, 0, 166, 167, 5, 50, 0, 0, 167, 168, 3, 46, 23, 0, 168, 169, 6, 4, -1, 0, 169, 170, 5, 2, 0, 0, 170, 9, 1, 0, 0, 0, 171, 183, 6, 5, -1, 0, 172, 173, 3, 48, 24, 0, 173, 180, 6, 5, -1, 0, 174, 175, 5, 55, 0, 0, 175, 176, 3, 48, 24, 0, 176, 177, 6, 5, -1, 0, 177, 179, 1, 0, 0, 0, 178, 174, 1, 0, 0, 0, 179, 182, 1, 0, 0, 0, 180, 178, 1, 0, 0, 0, 180, 181, 1, 0, 0, 0, 181, 184, 1, 0, 0, 0, 182, 180, 1, 0, 0, 0, 183, 172, 1, 0, 0, 0, 183, 184, 1, 0, 0, 0, 184, 11, 1, 0, 0, 0, 185, 186, 6, 6, -1, 0, 186, 190, 5, 7, 0, 0, 187, 188, 3, 48, 24, 0, 188, 189, 6, 6, -1, 0, 189, 191, 1, 0, 0, 0, 190, 187, 1, 0, 0, 0, 190, 191, 1, 0, 0, 0, 191, 192, 1, 0, 0, 0, 192, 193, 6, 6, -1, 0, 193, 194, 5, 59, 0, 0, 194, 13, 1, 0, 0, 0, 195, 196, 6, 7, -1, 0, 196, 197, 5, 8, 0, 0, 197, 206, 6, 7, -1, 0, 198, 199, 3, 16, 8, 0, 199, 200, 6, 7, -1, 0, 200, 207, 1, 0, 0, 0, 201, 202, 5, 49, 0, 0, 202, 203, 3, 16, 8, 0, 203, 204, 5, 50, 0, 0, 204, 205, 6, 7, -1, 0, 205, 207, 1, 0, 0, 0, 206, 198, 1, 0, 0, 0, 206, 201, 1, 0, 0, 0, 207, 208, 1, 0, 0, 0, 208, 209, 3, 26, 13, 0, 209, 224, 6, 7, -1, 0, 210, 216, 5, 10, 0, 0, 211, 212, 5, 49, 0, 0, 212, 213, 3, 16, 8, 0, 213, 214, 5, 50, 0, 0, 214, 217, 1, 0, 0, 0, 215, 217, 3, 16, 8, 0, 216, 211, 1, 0, 0, 0, 216, 215, 1, 0, 0, 0, 217, 218, 1, 0, 0, 0, 218, 219, 6, 7, -1, 0, 219, 220, 3, 26, 13, 0, 220, 221, 6, 7, -1, 0, 221, 223, 1, 0, 0, 0, 222, 210, 1, 0, 0, 0, 223, 226, 1, 0, 0, 0, 224, 222, 1, 0, 0, 0, 224, 225, 1, 0, 0, 0, 225, 231, 1, 0, 0, 0, 226, 224, 1, 0, 0, 0, 227, 228, 5, 9, 0, 0, 228, 229, 3, 26, 13, 0, 229, 230, 6, 7, -1, 0, 230, 232, 1, 0, 0, 0, 231, 227, 1, 0, 0, 0, 231, 232, 1, 0, 0, 0, 232, 233, 1, 0, 0, 0, 233, 234, 6, 7, -1, 0, 234, 235, 5, 2, 0, 0, 235, 15, 1, 0, 0, 0, 236, 257, 6, 8, -1, 0, 237, 238, 5, 49, 0, 0, 238, 239, 3, 48, 24, 0, 239, 240, 6, 8, -1, 0, 240, 252, 5, 50, 0, 0, 241, 243, 7, 0, 0, 0, 242, 244, 5, 49, 0, 0, 243, 242, 1, 0, 0, 0, 243, 244, 1, 0, 0, 0, 244, 245, 1, 0, 0, 0, 245, 246, 3, 16, 8, 0, 246, 248, 6, 8, -1, 0, 247, 249, 5, 50, 0, 0, 248, 247, 1, 0, 0, 0, 248, 249, 1, 0, 0, 0, 249, 251, 1, 0, 0, 0, 250, 241, 1, 0, 0, 0, 251, 254, 1, 0, 0, 0, 252, 250, 1, 0, 0, 0, 252, 253, 1, 0, 0, 0, 253, 256, 1, 0, 0, 0, 254, 252, 1, 0, 0, 0, 255, 237, 1, 0, 0, 0, 256, 259, 1, 0, 0, 0, 257, 255, 1, 0, 0, 0, 257, 258, 1, 0, 0, 0, 258, 17, 1, 0, 0, 0, 259, 257, 1, 0, 0, 0, 260, 261, 5, 4, 0, 0, 261, 262, 5, 49, 0, 0, 262, 263, 3, 48, 24, 0, 263, 264, 6, 9, -1, 0, 264, 265, 5, 50, 0, 0, 265, 266, 5, 59, 0, 0, 266, 19, 1, 0, 0, 0, 267, 268, 5, 6, 0, 0, 268, 269, 5, 49, 0, 0, 269, 270, 3, 48, 24, 0, 270, 271, 6, 10, -1, 0, 271, 272, 5, 50, 0, 0, 272, 21, 1, 0, 0, 0, 273, 274, 5, 5, 0, 0, 274, 275, 5, 49, 0, 0, 275, 276, 3, 48, 24, 0, 276, 277, 5, 55, 0, 0, 277, 278, 3, 48, 24, 0, 278, 279, 5, 50, 0, 0, 279, 280, 5, 59, 0, 0, 280, 281, 6, 11, -1, 0, 281, 23, 1, 0, 0, 0, 282, 283, 5, 14, 0, 0, 283, 284, 5, 17, 0, 0, 284, 285, 3, 26, 13, 0, 285, 286, 6, 12, -1, 0, 286, 287, 5, 2, 0, 0, 287, 25, 1, 0, 0, 0, 288, 310, 6, 13, -1, 0, 289, 290, 3, 44, 22, 0, 290, 291, 6, 13, -1, 0, 291, 309, 1, 0, 0, 0, 292, 297, 5, 40, 0, 0, 293, 294, 5, 8, 0, 0, 294, 295, 3, 16, 8, 0, 295, 296, 6, 13, -1, 0, 296, 298, 1, 0, 0, 0, 297, 293, 1, 0, 0, 0, 297, 298, 1, 0, 0, 0, 298, 299, 1, 0, 0, 0, 299, 309, 5, 59, 0, 0, 300, 305, 5, 41, 0, 0, 301, 302, 5, 8, 0, 0, 302, 303, 3, 16, 8, 0, 303, 304, 6, 13, -1, 0, 304, 306, 1, 0, 0, 0, 305, 301, 1, 0, 0, 0, 305, 306, 1, 0, 0, 0, 306, 307, 1, 0, 0, 0, 307, 309, 5, 59, 0, 0, 308, 289, 1, 0, 0, 0, 308, 292, 1, 0, 0, 0, 308, 300, 1, 0, 0, 0, 309, 312, 1, 0, 0, 0, 310, 308, 1, 0, 0, 0, 310, 311, 1, 0, 0, 0, 311, 316, 1, 0, 0, 0, 312, 310, 1, 0, 0, 0, 313, 314, 3, 12, 6, 0, 314, 315, 6, 13, -1, 0, 315, 317, 1, 0, 0, 0, 316, 313, 1, 0, 0, 0, 316, 317, 1, 0, 0, 0, 317, 27, 1, 0, 0, 0, 318, 319, 5, 15, 0, 0, 319, 320, 5, 62, 0, 0, 320, 321, 5, 16, 0, 0, 321, 322, 3, 30, 15, 0, 322, 323, 3, 26, 13, 0, 323, 324, 5, 2, 0, 0, 324, 325, 6, 14, -1, 0, 325, 29, 1, 0, 0, 0, 326, 327, 6, 15, -1, 0, 327, 328, 5, 49, 0, 0, 328, 329, 3, 48, 24, 0, 329, 330, 6, 15, -1, 0, 330, 331, 5, 57, 0, 0, 331, 332, 3, 48, 24, 0, 332, 333, 6, 15, -1, 0, 333, 334, 5, 50, 0, 0, 334, 354, 1, 0, 0, 0, 335, 336, 6, 15, -1, 0, 336, 337, 5, 51, 0, 0, 337, 338, 3, 48, 24, 0, 338, 345, 6, 15, -1, 0, 339, 340, 5, 55, 0, 0, 340, 341, 3, 48, 24, 0, 341, 342, 6, 15, -1, 0, 342, 344, 1, 0, 0, 0, 343, 339, 1, 0, 0, 0, 344, 347, 1, 0, 0, 0, 345, 343, 1, 0, 0, 0, 345, 346, 1, 0, 0, 0, 346, 348, 1, 0, 0, 0, 347, 345, 1, 0, 0, 0, 348, 349, 5, 52, 0, 0, 349, 354, 1, 0, 0, 0, 350, 351, 6, 15, -1, 0, 351, 352, 5, 62, 0, 0, 352, 354, 6, 15, -1, 0, 353, 326, 1, 0, 0, 0, 353, 335, 1, 0, 0, 0, 353, 350, 1, 0, 0, 0, 354, 31, 1, 0, 0, 0, 355, 356, 6, 16, -1, 0, 356, 357, 5, 51, 0, 0, 357, 358, 3, 48, 24, 0, 358, 359, 5, 36, 0, 0, 359, 360, 5, 62, 0, 0, 360, 361, 5, 42, 0, 0, 361, 362, 3, 30, 15, 0, 362, 363, 5, 55, 0, 0, 363, 364, 3, 48, 24, 0, 364, 371, 6, 16, -1, 0, 365, 366, 5, 55, 0, 0, 366, 367, 3, 48, 24, 0, 367, 368, 6, 16, -1, 0, 368, 370, 1, 0, 0, 0, 369, 365, 1, 0, 0, 0, 370, 373, 1, 0, 0, 0, 371, 369, 1, 0, 0, 0, 371, 372, 1, 0, 0, 0, 372, 374, 1, 0, 0, 0, 373, 371, 1, 0, 0, 0, 374, 375, 6, 16, -1, 0, 375, 376, 5, 52, 0, 0, 376, 33, 1, 0, 0, 0, 377, 378, 5, 62, 0, 0, 378, 379, 5, 56, 0, 0, 379, 380, 5, 13, 0, 0, 380, 381, 5, 49, 0, 0, 381, 382, 3, 48, 24, 0, 382, 383, 5, 50, 0, 0, 383, 384, 6, 17, -1, 0, 384, 35, 1, 0, 0, 0, 385, 386, 5, 18, 0, 0, 386, 387, 5, 49, 0, 0, 387, 388, 3, 48, 24, 0, 388, 389, 5, 50, 0, 0, 389, 390, 6, 18, -1, 0, 390, 37, 1, 0, 0, 0, 391, 392, 5, 19, 0, 0, 392, 393, 5, 49, 0, 0, 393, 394, 3, 48, 24, 0, 394, 395, 5, 50, 0, 0, 395, 396, 6, 19, -1, 0, 396, 39, 1, 0, 0, 0, 397, 398, 6, 20, -1, 0, 398, 402, 5, 62, 0, 0, 399, 400, 3, 42, 21, 0, 400, 401, 6, 20, -1, 0, 401, 403, 1, 0, 0, 0, 402, 399, 1, 0, 0, 0, 402, 403, 1, 0, 0, 0, 403, 416, 1, 0, 0, 0, 404, 405, 5, 48, 0, 0, 405, 417, 6, 20, -1, 0, 406, 407, 5, 43, 0, 0, 407, 417, 6, 20, -1, 0, 408, 409, 5, 44, 0, 0, 409, 417, 6, 20, -1, 0, 410, 411, 5, 46, 0, 0, 411, 417, 6, 20, -1, 0, 412, 413, 5, 45, 0, 0, 413, 417, 6, 20, -1, 0, 414, 415, 5, 47, 0, 0, 415, 417, 6, 20, -1, 0, 416, 404, 1, 0, 0, 0, 416, 406, 1, 0, 0, 0, 416, 408, 1, 0, 0, 0, 416, 410, 1, 0, 0, 0, 416, 412, 1, 0, 0, 0, 416, 414, 1, 0, 0, 0, 417, 418, 1, 0, 0, 0, 418, 419, 3, 48, 24, 0, 419, 420, 5, 59, 0, 0, 420, 421, 6, 20, -1, 0, 421, 41, 1, 0, 0, 0, 422, 423, 5, 51, 0, 0, 423, 424, 3, 48, 24, 0, 424, 425, 6, 21, -1, 0, 425, 426, 5, 52, 0, 0, 426, 43, 1, 0, 0, 0, 427, 428, 3, 14, 7, 0, 428, 429, 6, 22, -1, 0, 429, 451, 1, 0, 0, 0, 430, 431, 3, 24, 12, 0, 431, 432, 6, 22, -1, 0, 432, 451, 1, 0, 0, 0, 433, 434, 3, 28, 14, 0, 434, 435, 6, 22, -1, 0, 435, 451, 1, 0, 0, 0, 436, 437, 3, 18, 9, 0, 437, 438, 6, 22, -1, 0, 438, 451, 1, 0, 0, 0, 439, 440, 3, 22, 11, 0, 440, 441, 6, 22, -1, 0, 441, 451, 1, 0, 0, 0, 442, 443, 3, 48, 24, 0, 443, 444, 6, 22, -1, 0, 444, 445, 6, 22, -1, 0, 445, 446, 5, 59, 0, 0, 446, 451, 1, 0, 0, 0, 447, 448, 3, 40, 20, 0, 448, 449, 6, 22, -1, 0, 449, 451, 1, 0, 0, 0, 450, 427, 1, 0, 0, 0, 450, 430, 1, 0, 0, 0, 450, 433, 1, 0, 0, 0, 450, 436, 1, 0, 0, 0, 450, 439, 1, 0, 0, 0, 450, 442, 1, 0, 0, 0, 450, 447, 1, 0, 0, 0, 451, 45, 1, 0, 0, 0, 452, 458, 6, 23, -1, 0, 453, 454, 3, 44, 22, 0, 454, 455, 6, 23, -1, 0, 455, 457, 1, 0, 0, 0, 456, 453, 1, 0, 0, 0, 457, 460, 1, 0, 0, 0, 458, 456, 1, 0, 0, 0, 458, 459, 1, 0, 0, 0, 459, 464, 1, 0, 0, 0, 460, 458, 1, 0, 0, 0, 461, 462, 3, 12, 6, 0, 462, 463, 6, 23, -1, 0, 463, 465, 1, 0, 0, 0, 464, 461, 1, 0, 0, 0, 464, 465, 1, 0, 0, 0, 465, 47, 1, 0, 0, 0, 466, 467, 6, 24, -1, 0, 467, 468, 3, 50, 25, 0, 468, 469, 6, 24, -1, 0, 469, 477, 1, 0, 0, 0, 470, 471, 10, 2, 0, 0, 471, 472, 5, 37, 0, 0, 472, 473, 3, 50, 25, 0, 473, 474, 6, 24, -1, 0, 474, 476, 1, 0, 0, 0, 475, 470, 1, 0, 0, 0, 476, 479, 1, 0, 0, 0, 477, 475, 1, 0, 0, 0, 477, 478, 1, 0, 0, 0, 478, 49, 1, 0, 0, 0, 479, 477, 1, 0, 0, 0, 480, 481, 3, 52, 26, 0, 481, 486, 6, 25, -1, 0, 482, 483, 5, 24, 0, 0, 483, 487, 6, 25, -1, 0, 484, 485, 5, 25, 0, 0, 485, 487, 6, 25, -1, 0, 486, 482, 1, 0, 0, 0, 486, 484, 1, 0, 0, 0, 487, 488, 1, 0, 0, 0, 488, 489, 3, 52, 26, 0, 489, 490, 6, 25, -1, 0, 490, 495, 1, 0, 0, 0, 491, 492, 3, 52, 26, 0, 492, 493, 6, 25, -1, 0, 493, 495, 1, 0, 0, 0, 494, 480, 1, 0, 0, 0, 494, 491, 1, 0, 0, 0, 495, 51, 1, 0, 0, 0, 496, 497, 6, 26, -1, 0, 497, 498, 3, 54, 27, 0, 498, 499, 6, 26, -1, 0, 499, 517, 1, 0, 0, 0, 500, 501, 10, 2, 0, 0, 501, 510, 6, 26, -1, 0, 502, 503, 5, 28, 0, 0, 503, 511, 6, 26, -1, 0, 504, 505, 5, 29, 0, 0, 505, 511, 6, 26, -1, 0, 506, 507, 5, 26, 0, 0, 507, 511, 6, 26, -1, 0, 508, 509, 5, 27, 0, 0, 509, 511, 6, 26, -1, 0, 510, 502, 1, 0, 0, 0, 510, 504, 1, 0, 0, 0, 510, 506, 1, 0, 0, 0, 510, 508, 1, 0, 0, 0, 511, 512, 1, 0, 0, 0, 512, 513, 3, 54, 27, 0, 513, 514, 6, 26, -1, 0, 514, 516, 1, 0, 0, 0, 515, 500, 1, 0, 0, 0, 516, 519, 1, 0, 0, 0, 517, 515, 1, 0, 0, 0, 517, 518, 1, 0, 0, 0, 518, 53, 1, 0, 0, 0, 519, 517, 1, 0, 0, 0, 520, 521, 6, 27, -1, 0, 521, 522, 3, 56, 28, 0, 522, 523, 6, 27, -1, 0, 523, 537, 1, 0, 0, 0, 524, 525, 10, 2, 0, 0, 525, 530, 6, 27, -1, 0, 526, 527, 5, 20, 0, 0, 527, 531, 6, 27, -1, 0, 528, 529, 5, 21, 0, 0, 529, 531, 6, 27, -1, 0, 530, 526, 1, 0, 0, 0, 530, 528, 1, 0, 0, 0, 531, 532, 1, 0, 0, 0, 532, 533, 3, 56, 28, 0, 533, 534, 6, 27, -1, 0, 534, 536, 1, 0, 0, 0, 535, 524, 1, 0, 0, 0, 536, 539, 1, 0, 0, 0, 537, 535, 1, 0, 0, 0, 537, 538, 1, 0, 0, 0, 538, 55, 1, 0, 0, 0, 539, 537, 1, 0, 0, 0, 540, 541, 6, 28, -1, 0, 541, 542, 3, 58, 29, 0, 542, 543, 6, 28, -1, 0, 543, 557, 1, 0, 0, 0, 544, 545, 10, 2, 0, 0, 545, 550, 6, 28, -1, 0, 546, 547, 5, 22, 0, 0, 547, 551, 6, 28, -1, 0, 548, 549, 5, 23, 0, 0, 549, 551, 6, 28, -1, 0, 550, 546, 1, 0, 0, 0, 550, 548, 1, 0, 0, 0, 551, 552, 1, 0, 0, 0, 552, 553, 3, 58, 29, 0, 553, 554, 6, 28, -1, 0, 554, 556, 1, 0, 0, 0, 555, 544, 1, 0, 0, 0, 556, 559, 1, 0, 0, 0, 557, 555, 1, 0, 0, 0, 557, 558, 1, 0, 0, 0, 558, 57, 1, 0, 0, 0, 559, 557, 1, 0, 0, 0, 560, 569, 6, 29, -1, 0, 561, 562, 5, 32, 0, 0, 562, 570, 6, 29, -1, 0, 563, 564, 5, 21, 0, 0, 564, 570, 6, 29, -1, 0, 565, 566, 5, 33, 0, 0, 566, 570, 6, 29, -1, 0, 567, 568, 5, 34, 0, 0, 568, 570, 6, 29, -1, 0, 569, 561, 1, 0, 0, 0, 569, 563, 1, 0, 0, 0, 569, 565, 1, 0, 0, 0, 569, 567, 1, 0, 0, 0, 570, 571, 1, 0, 0, 0, 571, 572, 3, 60, 30, 0, 572, 573, 6, 29, -1, 0, 573, 578, 1, 0, 0, 0, 574, 575, 3, 60, 30, 0, 575, 576, 6, 29, -1, 0, 576, 578, 1, 0, 0, 0, 577, 560, 1, 0, 0, 0, 577, 574, 1, 0, 0, 0, 578, 59, 1, 0, 0, 0, 579, 580, 6, 30, -1, 0, 580, 588, 3, 62, 31, 0, 581, 582, 5, 49, 0, 0, 582, 583, 3, 10, 5, 0, 583, 584, 6, 30, -1, 0, 584, 585, 5, 50, 0, 0, 585, 587, 1, 0, 0, 0, 586, 581, 1, 0, 0, 0, 587, 590, 1, 0, 0, 0, 588, 586, 1, 0, 0, 0, 588, 589, 1, 0, 0, 0, 589, 596, 1, 0, 0, 0, 590, 588, 1, 0, 0, 0, 591, 592, 3, 42, 21, 0, 592, 593, 6, 30, -1, 0, 593, 595, 1, 0, 0, 0, 594, 591, 1, 0, 0, 0, 595, 598, 1, 0, 0, 0, 596, 594, 1, 0, 0, 0, 596, 597, 1, 0, 0, 0, 597, 599, 1, 0, 0, 0, 598, 596, 1, 0, 0, 0, 599, 600, 6, 30, -1, 0, 600, 61, 1, 0, 0, 0, 601, 602, 3, 66, 33, 0, 602, 603, 6, 31, -1, 0, 603, 632, 1, 0, 0, 0, 604, 605, 5, 62, 0, 0, 605, 632, 6, 31, -1, 0, 606, 607, 3, 64, 32, 0, 607, 608, 6, 31, -1, 0, 608, 632, 1, 0, 0, 0, 609, 610, 3, 36, 18, 0, 610, 611, 6, 31, -1, 0, 611, 632, 1, 0, 0, 0, 612, 613, 3, 38, 19, 0, 613, 614, 6, 31, -1, 0, 614, 632, 1, 0, 0, 0, 615, 616, 3, 34, 17, 0, 616, 617, 6, 31, -1, 0, 617, 632, 1, 0, 0, 0, 618, 619, 3, 32, 16, 0, 619, 620, 6, 31, -1, 0, 620, 632, 1, 0, 0, 0, 621, 622, 3, 20, 10, 0, 622, 623, 6, 31, -1, 0, 623, 632, 1, 0, 0, 0, 624, 628, 5, 49, 0, 0, 625, 626, 3, 48, 24, 0, 626, 627, 6, 31, -1, 0, 627, 629, 1, 0, 0, 0, 628, 625, 1, 0, 0, 0, 628, 629, 1, 0, 0, 0, 629, 630, 1, 0, 0, 0, 630, 632, 5, 50, 0, 0, 631, 601, 1, 0, 0, 0, 631, 604, 1, 0, 0, 0, 631, 606, 1, 0, 0, 0, 631, 609, 1, 0, 0, 0, 631, 612, 1, 0, 0, 0, 631, 615, 1, 0, 0, 0, 631, 618, 1, 0, 0, 0, 631, 621, 1, 0, 0, 0, 631, 624, 1, 0, 0, 0, 632, 63, 1, 0, 0, 0, 633, 634, 5, 42, 0, 0, 634, 635, 3, 4, 2, 0, 635, 636, 5, 53, 0, 0, 636, 637, 3, 46, 23, 0, 637, 638, 5, 54, 0, 0, 638, 639, 6, 32, -1, 0, 639, 65, 1, 0, 0, 0, 640, 641, 3, 70, 35, 0, 641, 642, 6, 33, -1, 0, 642, 656, 1, 0, 0, 0, 643, 644, 5, 63, 0, 0, 644, 656, 6, 33, -1, 0, 645, 646, 5, 60, 0, 0, 646, 656, 6, 33, -1, 0, 647, 648, 5, 61, 0, 0, 648, 656, 6, 33, -1, 0, 649, 650, 3, 68, 34, 0, 650, 651, 6, 33, -1, 0, 651, 656, 1, 0, 0, 0, 652, 653, 3, 72, 36, 0, 653, 654, 6, 33, -1, 0, 654, 656, 1, 0, 0, 0, 655, 640, 1, 0, 0, 0, 655, 643, 1, 0, 0, 0, 655, 645, 1, 0, 0, 0, 655, 647, 1, 0, 0, 0, 655, 649, 1, 0, 0, 0, 655, 652, 1, 0, 0, 0, 656, 67, 1, 0, 0, 0, 657, 658, 5, 51, 0, 0, 658, 659, 3, 10, 5, 0, 659, 660, 5, 52, 0, 0, 660, 661, 6, 34, -1, 0, 661, 69, 1, 0, 0, 0, 662, 663, 5, 38, 0, 0, 663, 667, 6, 35, -1, 0, 664, 665, 5, 39, 0, 0, 665, 667, 6, 35, -1, 0, 666, 662, 1, 0, 0, 0, 666, 664, 1, 0, 0, 0, 667, 71, 1, 0, 0, 0, 668, 669, 5, 11, 0, 0, 669, 670, 5, 49, 0, 0, 670, 671, 5, 58, 0, 0, 671, 672, 5, 62, 0, 0, 672, 673, 5, 50, 0, 0, 673, 674, 6, 36, -1, 0, 674, 73, 1, 0, 0, 0, 48, 81, 83, 109, 128, 133, 135, 156, 180, 183, 190, 206, 216, 224, 231, 243, 248, 252, 257, 297, 305, 308, 310, 316, 345, 353, 371, 402, 416, 450, 458, 464, 477, 486, 494, 510, 517, 530, 537, 550, 557, 569, 577, 588, 596, 628, 631, 655, 666] \ No newline at end of file diff --git a/Phase2Template/Phase2/src/parsers/FunctionCraft.tokens b/Phase2Template/Phase2/src/parsers/FunctionCraft.tokens new file mode 100644 index 0000000..c103028 --- /dev/null +++ b/Phase2Template/Phase2/src/parsers/FunctionCraft.tokens @@ -0,0 +1,124 @@ +DEF=1 +END=2 +MAIN=3 +PUTS=4 +PUSH=5 +LEN=6 +RETURN=7 +IF=8 +ELSE=9 +ELSEIF=10 +METHOD=11 +PATTERN=12 +MATCH=13 +LOOP=14 +FOR=15 +IN=16 +DO=17 +CHOP=18 +CHOMP=19 +PLUS=20 +MINUS=21 +MULT=22 +DIVIDE=23 +EQUAL=24 +NOT_EQUAL=25 +LESS_EQUAL_THAN=26 +GREATER_EQUAL_THAN=27 +GREATER_THAN=28 +LESS_THAN=29 +AND=30 +OR=31 +NOT=32 +INCREMENT=33 +DECREMENT=34 +PATTERN_MATCHING_SEPARATOR=35 +SEPARATOR=36 +APPEND=37 +TRUE=38 +FALSE=39 +BREAK=40 +NEXT=41 +ARROW=42 +PLUS_ASSIGN=43 +MINUS_ASSIGN=44 +MULT_ASSIGN=45 +DIVIDE_ASSIGN=46 +MOD_ASSIGN=47 +ASSIGN=48 +LPAR=49 +RPAR=50 +LBRACK=51 +RBRACK=52 +LBRACE=53 +RBRACE=54 +COMMA=55 +DOT=56 +DOUBLEDOT=57 +COLON=58 +SEMICOLLON=59 +INT_VALUE=60 +FLOAT_VALUE=61 +IDENTIFIER=62 +STRING_VALUE=63 +COMMENT=64 +WS=65 +'def'=1 +'end'=2 +'main'=3 +'puts'=4 +'push'=5 +'len'=6 +'return'=7 +'if'=8 +'else'=9 +'elseif'=10 +'method'=11 +'pattern'=12 +'match'=13 +'loop'=14 +'for'=15 +'in'=16 +'do'=17 +'chop'=18 +'chomp'=19 +'+'=20 +'-'=21 +'*'=22 +'/'=23 +'=='=24 +'!='=25 +'<='=26 +'>='=27 +'>'=28 +'<'=29 +'&&'=30 +'||'=31 +'!'=32 +'++'=33 +'--'=34 +' |'=35 +'|'=36 +'<<'=37 +'true'=38 +'false'=39 +'break'=40 +'next'=41 +'->'=42 +'+='=43 +'-='=44 +'*='=45 +'/='=46 +'%='=47 +'='=48 +'('=49 +')'=50 +'['=51 +']'=52 +'{'=53 +'}'=54 +','=55 +'.'=56 +'..'=57 +':'=58 +';'=59 diff --git a/Phase2Template/Phase2/src/parsers/FunctionCraftBaseListener.java b/Phase2Template/Phase2/src/parsers/FunctionCraftBaseListener.java new file mode 100644 index 0000000..f46dacd --- /dev/null +++ b/Phase2Template/Phase2/src/parsers/FunctionCraftBaseListener.java @@ -0,0 +1,493 @@ +// Generated from U:/UT/6/PLC_TA/Design-Compiler-Course-Projects/Phase2Template/Phase2/src/main/grammar/FunctionCraft.g4 by ANTLR 4.13.1 +package parsers; + + import main.ast.nodes.*; + import main.ast.nodes.declaration.*; + import main.ast.nodes.statement.*; + import main.ast.nodes.expression.*; + import main.ast.nodes.expression.operators.*; + import main.ast.nodes.expression.value.*; + import main.ast.nodes.expression.value.primitive.*; + + +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.tree.ErrorNode; +import org.antlr.v4.runtime.tree.TerminalNode; + +/** + * This class provides an empty implementation of {@link FunctionCraftListener}, + * which can be extended to create a listener which only needs to handle a subset + * of the available methods. + */ +@SuppressWarnings("CheckReturnValue") +public class FunctionCraftBaseListener implements FunctionCraftListener { + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterProgram(FunctionCraftParser.ProgramContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitProgram(FunctionCraftParser.ProgramContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFunctionDeclaration(FunctionCraftParser.FunctionDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFunctionDeclaration(FunctionCraftParser.FunctionDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFunctionArgumentsDeclaration(FunctionCraftParser.FunctionArgumentsDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFunctionArgumentsDeclaration(FunctionCraftParser.FunctionArgumentsDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPatternMatching(FunctionCraftParser.PatternMatchingContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPatternMatching(FunctionCraftParser.PatternMatchingContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterMain(FunctionCraftParser.MainContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitMain(FunctionCraftParser.MainContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFunctionArguments(FunctionCraftParser.FunctionArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFunctionArguments(FunctionCraftParser.FunctionArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterReturnStatement(FunctionCraftParser.ReturnStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitReturnStatement(FunctionCraftParser.ReturnStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterIfStatement(FunctionCraftParser.IfStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitIfStatement(FunctionCraftParser.IfStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterCondition(FunctionCraftParser.ConditionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitCondition(FunctionCraftParser.ConditionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPutsStatement(FunctionCraftParser.PutsStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPutsStatement(FunctionCraftParser.PutsStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterLenStatement(FunctionCraftParser.LenStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitLenStatement(FunctionCraftParser.LenStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPushStatement(FunctionCraftParser.PushStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPushStatement(FunctionCraftParser.PushStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterLoopDoStatement(FunctionCraftParser.LoopDoStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitLoopDoStatement(FunctionCraftParser.LoopDoStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterLoopBody(FunctionCraftParser.LoopBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitLoopBody(FunctionCraftParser.LoopBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterForStatement(FunctionCraftParser.ForStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitForStatement(FunctionCraftParser.ForStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterRange(FunctionCraftParser.RangeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitRange(FunctionCraftParser.RangeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFilterStatement(FunctionCraftParser.FilterStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFilterStatement(FunctionCraftParser.FilterStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterMatchPatternStatement(FunctionCraftParser.MatchPatternStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitMatchPatternStatement(FunctionCraftParser.MatchPatternStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterChopStatement(FunctionCraftParser.ChopStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitChopStatement(FunctionCraftParser.ChopStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterChompStatement(FunctionCraftParser.ChompStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitChompStatement(FunctionCraftParser.ChompStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAssignment(FunctionCraftParser.AssignmentContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAssignment(FunctionCraftParser.AssignmentContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAccessList(FunctionCraftParser.AccessListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAccessList(FunctionCraftParser.AccessListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterStatement(FunctionCraftParser.StatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitStatement(FunctionCraftParser.StatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterBody(FunctionCraftParser.BodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitBody(FunctionCraftParser.BodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExpression(FunctionCraftParser.ExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExpression(FunctionCraftParser.ExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEqaulityExpression(FunctionCraftParser.EqaulityExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEqaulityExpression(FunctionCraftParser.EqaulityExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterRelationalExpression(FunctionCraftParser.RelationalExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitRelationalExpression(FunctionCraftParser.RelationalExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAdditiveExpression(FunctionCraftParser.AdditiveExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAdditiveExpression(FunctionCraftParser.AdditiveExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterMultiplicativeExpression(FunctionCraftParser.MultiplicativeExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitMultiplicativeExpression(FunctionCraftParser.MultiplicativeExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPreUnaryExpression(FunctionCraftParser.PreUnaryExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPreUnaryExpression(FunctionCraftParser.PreUnaryExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAccessExpression(FunctionCraftParser.AccessExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAccessExpression(FunctionCraftParser.AccessExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterOtherExpression(FunctionCraftParser.OtherExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitOtherExpression(FunctionCraftParser.OtherExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterLambdaFunction(FunctionCraftParser.LambdaFunctionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitLambdaFunction(FunctionCraftParser.LambdaFunctionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterValues(FunctionCraftParser.ValuesContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitValues(FunctionCraftParser.ValuesContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterListValue(FunctionCraftParser.ListValueContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitListValue(FunctionCraftParser.ListValueContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterBoolValue(FunctionCraftParser.BoolValueContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitBoolValue(FunctionCraftParser.BoolValueContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFunctionPointer(FunctionCraftParser.FunctionPointerContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFunctionPointer(FunctionCraftParser.FunctionPointerContext ctx) { } + + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEveryRule(ParserRuleContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEveryRule(ParserRuleContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void visitTerminal(TerminalNode node) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void visitErrorNode(ErrorNode node) { } +} \ No newline at end of file diff --git a/Phase2Template/Phase2/src/parsers/FunctionCraftBaseVisitor.java b/Phase2Template/Phase2/src/parsers/FunctionCraftBaseVisitor.java new file mode 100644 index 0000000..f6819b5 --- /dev/null +++ b/Phase2Template/Phase2/src/parsers/FunctionCraftBaseVisitor.java @@ -0,0 +1,283 @@ +// Generated from U:/UT/6/PLC_TA/Design-Compiler-Course-Projects/Phase2Template/Phase2/src/main/grammar/FunctionCraft.g4 by ANTLR 4.13.1 +package parsers; + + import main.ast.nodes.*; + import main.ast.nodes.declaration.*; + import main.ast.nodes.statement.*; + import main.ast.nodes.expression.*; + import main.ast.nodes.expression.operators.*; + import main.ast.nodes.expression.value.*; + import main.ast.nodes.expression.value.primitive.*; + +import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor; + +/** + * This class provides an empty implementation of {@link FunctionCraftVisitor}, + * which can be extended to create a visitor which only needs to handle a subset + * of the available methods. + * + * @param The return type of the visit operation. Use {@link Void} for + * operations with no return type. + */ +@SuppressWarnings("CheckReturnValue") +public class FunctionCraftBaseVisitor extends AbstractParseTreeVisitor implements FunctionCraftVisitor { + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitProgram(FunctionCraftParser.ProgramContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitFunctionDeclaration(FunctionCraftParser.FunctionDeclarationContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitFunctionArgumentsDeclaration(FunctionCraftParser.FunctionArgumentsDeclarationContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitPatternMatching(FunctionCraftParser.PatternMatchingContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitMain(FunctionCraftParser.MainContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitFunctionArguments(FunctionCraftParser.FunctionArgumentsContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitReturnStatement(FunctionCraftParser.ReturnStatementContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitIfStatement(FunctionCraftParser.IfStatementContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitCondition(FunctionCraftParser.ConditionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitPutsStatement(FunctionCraftParser.PutsStatementContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitLenStatement(FunctionCraftParser.LenStatementContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitPushStatement(FunctionCraftParser.PushStatementContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitLoopDoStatement(FunctionCraftParser.LoopDoStatementContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitLoopBody(FunctionCraftParser.LoopBodyContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitForStatement(FunctionCraftParser.ForStatementContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitRange(FunctionCraftParser.RangeContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitFilterStatement(FunctionCraftParser.FilterStatementContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitMatchPatternStatement(FunctionCraftParser.MatchPatternStatementContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitChopStatement(FunctionCraftParser.ChopStatementContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitChompStatement(FunctionCraftParser.ChompStatementContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitAssignment(FunctionCraftParser.AssignmentContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitAccessList(FunctionCraftParser.AccessListContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitStatement(FunctionCraftParser.StatementContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitBody(FunctionCraftParser.BodyContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitExpression(FunctionCraftParser.ExpressionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitEqaulityExpression(FunctionCraftParser.EqaulityExpressionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitRelationalExpression(FunctionCraftParser.RelationalExpressionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitAdditiveExpression(FunctionCraftParser.AdditiveExpressionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitMultiplicativeExpression(FunctionCraftParser.MultiplicativeExpressionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitPreUnaryExpression(FunctionCraftParser.PreUnaryExpressionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitAccessExpression(FunctionCraftParser.AccessExpressionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitOtherExpression(FunctionCraftParser.OtherExpressionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitLambdaFunction(FunctionCraftParser.LambdaFunctionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitValues(FunctionCraftParser.ValuesContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitListValue(FunctionCraftParser.ListValueContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitBoolValue(FunctionCraftParser.BoolValueContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitFunctionPointer(FunctionCraftParser.FunctionPointerContext ctx) { return visitChildren(ctx); } +} \ No newline at end of file diff --git a/Phase2Template/Phase2/src/parsers/FunctionCraftLexer.interp b/Phase2Template/Phase2/src/parsers/FunctionCraftLexer.interp new file mode 100644 index 0000000..6d42009 --- /dev/null +++ b/Phase2Template/Phase2/src/parsers/FunctionCraftLexer.interp @@ -0,0 +1,212 @@ +token literal names: +null +'def' +'end' +'main' +'puts' +'push' +'len' +'return' +'if' +'else' +'elseif' +'method' +'pattern' +'match' +'loop' +'for' +'in' +'do' +'chop' +'chomp' +'+' +'-' +'*' +'/' +'==' +'!=' +'<=' +'>=' +'>' +'<' +'&&' +'||' +'!' +'++' +'--' +' |' +'|' +'<<' +'true' +'false' +'break' +'next' +'->' +'+=' +'-=' +'*=' +'/=' +'%=' +'=' +'(' +')' +'[' +']' +'{' +'}' +',' +'.' +'..' +':' +';' +null +null +null +null +null +null + +token symbolic names: +null +DEF +END +MAIN +PUTS +PUSH +LEN +RETURN +IF +ELSE +ELSEIF +METHOD +PATTERN +MATCH +LOOP +FOR +IN +DO +CHOP +CHOMP +PLUS +MINUS +MULT +DIVIDE +EQUAL +NOT_EQUAL +LESS_EQUAL_THAN +GREATER_EQUAL_THAN +GREATER_THAN +LESS_THAN +AND +OR +NOT +INCREMENT +DECREMENT +PATTERN_MATCHING_SEPARATOR +SEPARATOR +APPEND +TRUE +FALSE +BREAK +NEXT +ARROW +PLUS_ASSIGN +MINUS_ASSIGN +MULT_ASSIGN +DIVIDE_ASSIGN +MOD_ASSIGN +ASSIGN +LPAR +RPAR +LBRACK +RBRACK +LBRACE +RBRACE +COMMA +DOT +DOUBLEDOT +COLON +SEMICOLLON +INT_VALUE +FLOAT_VALUE +IDENTIFIER +STRING_VALUE +COMMENT +WS + +rule names: +DEF +END +MAIN +PUTS +PUSH +LEN +RETURN +IF +ELSE +ELSEIF +METHOD +PATTERN +MATCH +LOOP +FOR +IN +DO +CHOP +CHOMP +PLUS +MINUS +MULT +DIVIDE +EQUAL +NOT_EQUAL +LESS_EQUAL_THAN +GREATER_EQUAL_THAN +GREATER_THAN +LESS_THAN +AND +OR +NOT +INCREMENT +DECREMENT +PATTERN_MATCHING_SEPARATOR +SEPARATOR +APPEND +TRUE +FALSE +BREAK +NEXT +ARROW +PLUS_ASSIGN +MINUS_ASSIGN +MULT_ASSIGN +DIVIDE_ASSIGN +MOD_ASSIGN +ASSIGN +LPAR +RPAR +LBRACK +RBRACK +LBRACE +RBRACE +COMMA +DOT +DOUBLEDOT +COLON +SEMICOLLON +INT_VALUE +FLOAT_VALUE +IDENTIFIER +STRING_VALUE +COMMENT +WS + +channel names: +DEFAULT_TOKEN_CHANNEL +HIDDEN + +mode names: +DEFAULT_MODE + +atn: +[4, 0, 65, 411, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 20, 1, 20, 1, 21, 1, 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, 47, 1, 47, 1, 48, 1, 48, 1, 49, 1, 49, 1, 50, 1, 50, 1, 51, 1, 51, 1, 52, 1, 52, 1, 53, 1, 53, 1, 54, 1, 54, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 5, 59, 345, 8, 59, 10, 59, 12, 59, 348, 9, 59, 3, 59, 350, 8, 59, 1, 60, 5, 60, 353, 8, 60, 10, 60, 12, 60, 356, 9, 60, 1, 60, 1, 60, 4, 60, 360, 8, 60, 11, 60, 12, 60, 361, 1, 61, 1, 61, 5, 61, 366, 8, 61, 10, 61, 12, 61, 369, 9, 61, 1, 62, 1, 62, 5, 62, 373, 8, 62, 10, 62, 12, 62, 376, 9, 62, 1, 62, 1, 62, 1, 63, 1, 63, 5, 63, 382, 8, 63, 10, 63, 12, 63, 385, 9, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 5, 63, 395, 8, 63, 10, 63, 12, 63, 398, 9, 63, 1, 63, 1, 63, 1, 63, 1, 63, 3, 63, 404, 8, 63, 1, 63, 1, 63, 1, 64, 1, 64, 1, 64, 1, 64, 1, 396, 0, 65, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 47, 95, 48, 97, 49, 99, 50, 101, 51, 103, 52, 105, 53, 107, 54, 109, 55, 111, 56, 113, 57, 115, 58, 117, 59, 119, 60, 121, 61, 123, 62, 125, 63, 127, 64, 129, 65, 1, 0, 7, 1, 0, 49, 57, 1, 0, 48, 57, 3, 0, 65, 90, 95, 95, 97, 122, 4, 0, 48, 57, 65, 90, 95, 95, 97, 122, 1, 0, 34, 34, 2, 0, 10, 10, 13, 13, 3, 0, 9, 10, 13, 13, 32, 32, 419, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, 0, 0, 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 119, 1, 0, 0, 0, 0, 121, 1, 0, 0, 0, 0, 123, 1, 0, 0, 0, 0, 125, 1, 0, 0, 0, 0, 127, 1, 0, 0, 0, 0, 129, 1, 0, 0, 0, 1, 131, 1, 0, 0, 0, 3, 135, 1, 0, 0, 0, 5, 139, 1, 0, 0, 0, 7, 144, 1, 0, 0, 0, 9, 149, 1, 0, 0, 0, 11, 154, 1, 0, 0, 0, 13, 158, 1, 0, 0, 0, 15, 165, 1, 0, 0, 0, 17, 168, 1, 0, 0, 0, 19, 173, 1, 0, 0, 0, 21, 180, 1, 0, 0, 0, 23, 187, 1, 0, 0, 0, 25, 195, 1, 0, 0, 0, 27, 201, 1, 0, 0, 0, 29, 206, 1, 0, 0, 0, 31, 210, 1, 0, 0, 0, 33, 213, 1, 0, 0, 0, 35, 216, 1, 0, 0, 0, 37, 221, 1, 0, 0, 0, 39, 227, 1, 0, 0, 0, 41, 229, 1, 0, 0, 0, 43, 231, 1, 0, 0, 0, 45, 233, 1, 0, 0, 0, 47, 235, 1, 0, 0, 0, 49, 238, 1, 0, 0, 0, 51, 241, 1, 0, 0, 0, 53, 244, 1, 0, 0, 0, 55, 247, 1, 0, 0, 0, 57, 249, 1, 0, 0, 0, 59, 251, 1, 0, 0, 0, 61, 254, 1, 0, 0, 0, 63, 257, 1, 0, 0, 0, 65, 259, 1, 0, 0, 0, 67, 262, 1, 0, 0, 0, 69, 265, 1, 0, 0, 0, 71, 271, 1, 0, 0, 0, 73, 273, 1, 0, 0, 0, 75, 276, 1, 0, 0, 0, 77, 281, 1, 0, 0, 0, 79, 287, 1, 0, 0, 0, 81, 293, 1, 0, 0, 0, 83, 298, 1, 0, 0, 0, 85, 301, 1, 0, 0, 0, 87, 304, 1, 0, 0, 0, 89, 307, 1, 0, 0, 0, 91, 310, 1, 0, 0, 0, 93, 313, 1, 0, 0, 0, 95, 316, 1, 0, 0, 0, 97, 318, 1, 0, 0, 0, 99, 320, 1, 0, 0, 0, 101, 322, 1, 0, 0, 0, 103, 324, 1, 0, 0, 0, 105, 326, 1, 0, 0, 0, 107, 328, 1, 0, 0, 0, 109, 330, 1, 0, 0, 0, 111, 332, 1, 0, 0, 0, 113, 334, 1, 0, 0, 0, 115, 337, 1, 0, 0, 0, 117, 339, 1, 0, 0, 0, 119, 349, 1, 0, 0, 0, 121, 354, 1, 0, 0, 0, 123, 363, 1, 0, 0, 0, 125, 370, 1, 0, 0, 0, 127, 403, 1, 0, 0, 0, 129, 407, 1, 0, 0, 0, 131, 132, 5, 100, 0, 0, 132, 133, 5, 101, 0, 0, 133, 134, 5, 102, 0, 0, 134, 2, 1, 0, 0, 0, 135, 136, 5, 101, 0, 0, 136, 137, 5, 110, 0, 0, 137, 138, 5, 100, 0, 0, 138, 4, 1, 0, 0, 0, 139, 140, 5, 109, 0, 0, 140, 141, 5, 97, 0, 0, 141, 142, 5, 105, 0, 0, 142, 143, 5, 110, 0, 0, 143, 6, 1, 0, 0, 0, 144, 145, 5, 112, 0, 0, 145, 146, 5, 117, 0, 0, 146, 147, 5, 116, 0, 0, 147, 148, 5, 115, 0, 0, 148, 8, 1, 0, 0, 0, 149, 150, 5, 112, 0, 0, 150, 151, 5, 117, 0, 0, 151, 152, 5, 115, 0, 0, 152, 153, 5, 104, 0, 0, 153, 10, 1, 0, 0, 0, 154, 155, 5, 108, 0, 0, 155, 156, 5, 101, 0, 0, 156, 157, 5, 110, 0, 0, 157, 12, 1, 0, 0, 0, 158, 159, 5, 114, 0, 0, 159, 160, 5, 101, 0, 0, 160, 161, 5, 116, 0, 0, 161, 162, 5, 117, 0, 0, 162, 163, 5, 114, 0, 0, 163, 164, 5, 110, 0, 0, 164, 14, 1, 0, 0, 0, 165, 166, 5, 105, 0, 0, 166, 167, 5, 102, 0, 0, 167, 16, 1, 0, 0, 0, 168, 169, 5, 101, 0, 0, 169, 170, 5, 108, 0, 0, 170, 171, 5, 115, 0, 0, 171, 172, 5, 101, 0, 0, 172, 18, 1, 0, 0, 0, 173, 174, 5, 101, 0, 0, 174, 175, 5, 108, 0, 0, 175, 176, 5, 115, 0, 0, 176, 177, 5, 101, 0, 0, 177, 178, 5, 105, 0, 0, 178, 179, 5, 102, 0, 0, 179, 20, 1, 0, 0, 0, 180, 181, 5, 109, 0, 0, 181, 182, 5, 101, 0, 0, 182, 183, 5, 116, 0, 0, 183, 184, 5, 104, 0, 0, 184, 185, 5, 111, 0, 0, 185, 186, 5, 100, 0, 0, 186, 22, 1, 0, 0, 0, 187, 188, 5, 112, 0, 0, 188, 189, 5, 97, 0, 0, 189, 190, 5, 116, 0, 0, 190, 191, 5, 116, 0, 0, 191, 192, 5, 101, 0, 0, 192, 193, 5, 114, 0, 0, 193, 194, 5, 110, 0, 0, 194, 24, 1, 0, 0, 0, 195, 196, 5, 109, 0, 0, 196, 197, 5, 97, 0, 0, 197, 198, 5, 116, 0, 0, 198, 199, 5, 99, 0, 0, 199, 200, 5, 104, 0, 0, 200, 26, 1, 0, 0, 0, 201, 202, 5, 108, 0, 0, 202, 203, 5, 111, 0, 0, 203, 204, 5, 111, 0, 0, 204, 205, 5, 112, 0, 0, 205, 28, 1, 0, 0, 0, 206, 207, 5, 102, 0, 0, 207, 208, 5, 111, 0, 0, 208, 209, 5, 114, 0, 0, 209, 30, 1, 0, 0, 0, 210, 211, 5, 105, 0, 0, 211, 212, 5, 110, 0, 0, 212, 32, 1, 0, 0, 0, 213, 214, 5, 100, 0, 0, 214, 215, 5, 111, 0, 0, 215, 34, 1, 0, 0, 0, 216, 217, 5, 99, 0, 0, 217, 218, 5, 104, 0, 0, 218, 219, 5, 111, 0, 0, 219, 220, 5, 112, 0, 0, 220, 36, 1, 0, 0, 0, 221, 222, 5, 99, 0, 0, 222, 223, 5, 104, 0, 0, 223, 224, 5, 111, 0, 0, 224, 225, 5, 109, 0, 0, 225, 226, 5, 112, 0, 0, 226, 38, 1, 0, 0, 0, 227, 228, 5, 43, 0, 0, 228, 40, 1, 0, 0, 0, 229, 230, 5, 45, 0, 0, 230, 42, 1, 0, 0, 0, 231, 232, 5, 42, 0, 0, 232, 44, 1, 0, 0, 0, 233, 234, 5, 47, 0, 0, 234, 46, 1, 0, 0, 0, 235, 236, 5, 61, 0, 0, 236, 237, 5, 61, 0, 0, 237, 48, 1, 0, 0, 0, 238, 239, 5, 33, 0, 0, 239, 240, 5, 61, 0, 0, 240, 50, 1, 0, 0, 0, 241, 242, 5, 60, 0, 0, 242, 243, 5, 61, 0, 0, 243, 52, 1, 0, 0, 0, 244, 245, 5, 62, 0, 0, 245, 246, 5, 61, 0, 0, 246, 54, 1, 0, 0, 0, 247, 248, 5, 62, 0, 0, 248, 56, 1, 0, 0, 0, 249, 250, 5, 60, 0, 0, 250, 58, 1, 0, 0, 0, 251, 252, 5, 38, 0, 0, 252, 253, 5, 38, 0, 0, 253, 60, 1, 0, 0, 0, 254, 255, 5, 124, 0, 0, 255, 256, 5, 124, 0, 0, 256, 62, 1, 0, 0, 0, 257, 258, 5, 33, 0, 0, 258, 64, 1, 0, 0, 0, 259, 260, 5, 43, 0, 0, 260, 261, 5, 43, 0, 0, 261, 66, 1, 0, 0, 0, 262, 263, 5, 45, 0, 0, 263, 264, 5, 45, 0, 0, 264, 68, 1, 0, 0, 0, 265, 266, 5, 32, 0, 0, 266, 267, 5, 32, 0, 0, 267, 268, 5, 32, 0, 0, 268, 269, 5, 32, 0, 0, 269, 270, 5, 124, 0, 0, 270, 70, 1, 0, 0, 0, 271, 272, 5, 124, 0, 0, 272, 72, 1, 0, 0, 0, 273, 274, 5, 60, 0, 0, 274, 275, 5, 60, 0, 0, 275, 74, 1, 0, 0, 0, 276, 277, 5, 116, 0, 0, 277, 278, 5, 114, 0, 0, 278, 279, 5, 117, 0, 0, 279, 280, 5, 101, 0, 0, 280, 76, 1, 0, 0, 0, 281, 282, 5, 102, 0, 0, 282, 283, 5, 97, 0, 0, 283, 284, 5, 108, 0, 0, 284, 285, 5, 115, 0, 0, 285, 286, 5, 101, 0, 0, 286, 78, 1, 0, 0, 0, 287, 288, 5, 98, 0, 0, 288, 289, 5, 114, 0, 0, 289, 290, 5, 101, 0, 0, 290, 291, 5, 97, 0, 0, 291, 292, 5, 107, 0, 0, 292, 80, 1, 0, 0, 0, 293, 294, 5, 110, 0, 0, 294, 295, 5, 101, 0, 0, 295, 296, 5, 120, 0, 0, 296, 297, 5, 116, 0, 0, 297, 82, 1, 0, 0, 0, 298, 299, 5, 45, 0, 0, 299, 300, 5, 62, 0, 0, 300, 84, 1, 0, 0, 0, 301, 302, 5, 43, 0, 0, 302, 303, 5, 61, 0, 0, 303, 86, 1, 0, 0, 0, 304, 305, 5, 45, 0, 0, 305, 306, 5, 61, 0, 0, 306, 88, 1, 0, 0, 0, 307, 308, 5, 42, 0, 0, 308, 309, 5, 61, 0, 0, 309, 90, 1, 0, 0, 0, 310, 311, 5, 47, 0, 0, 311, 312, 5, 61, 0, 0, 312, 92, 1, 0, 0, 0, 313, 314, 5, 37, 0, 0, 314, 315, 5, 61, 0, 0, 315, 94, 1, 0, 0, 0, 316, 317, 5, 61, 0, 0, 317, 96, 1, 0, 0, 0, 318, 319, 5, 40, 0, 0, 319, 98, 1, 0, 0, 0, 320, 321, 5, 41, 0, 0, 321, 100, 1, 0, 0, 0, 322, 323, 5, 91, 0, 0, 323, 102, 1, 0, 0, 0, 324, 325, 5, 93, 0, 0, 325, 104, 1, 0, 0, 0, 326, 327, 5, 123, 0, 0, 327, 106, 1, 0, 0, 0, 328, 329, 5, 125, 0, 0, 329, 108, 1, 0, 0, 0, 330, 331, 5, 44, 0, 0, 331, 110, 1, 0, 0, 0, 332, 333, 5, 46, 0, 0, 333, 112, 1, 0, 0, 0, 334, 335, 5, 46, 0, 0, 335, 336, 5, 46, 0, 0, 336, 114, 1, 0, 0, 0, 337, 338, 5, 58, 0, 0, 338, 116, 1, 0, 0, 0, 339, 340, 5, 59, 0, 0, 340, 118, 1, 0, 0, 0, 341, 350, 5, 48, 0, 0, 342, 346, 7, 0, 0, 0, 343, 345, 7, 1, 0, 0, 344, 343, 1, 0, 0, 0, 345, 348, 1, 0, 0, 0, 346, 344, 1, 0, 0, 0, 346, 347, 1, 0, 0, 0, 347, 350, 1, 0, 0, 0, 348, 346, 1, 0, 0, 0, 349, 341, 1, 0, 0, 0, 349, 342, 1, 0, 0, 0, 350, 120, 1, 0, 0, 0, 351, 353, 7, 1, 0, 0, 352, 351, 1, 0, 0, 0, 353, 356, 1, 0, 0, 0, 354, 352, 1, 0, 0, 0, 354, 355, 1, 0, 0, 0, 355, 357, 1, 0, 0, 0, 356, 354, 1, 0, 0, 0, 357, 359, 5, 46, 0, 0, 358, 360, 7, 1, 0, 0, 359, 358, 1, 0, 0, 0, 360, 361, 1, 0, 0, 0, 361, 359, 1, 0, 0, 0, 361, 362, 1, 0, 0, 0, 362, 122, 1, 0, 0, 0, 363, 367, 7, 2, 0, 0, 364, 366, 7, 3, 0, 0, 365, 364, 1, 0, 0, 0, 366, 369, 1, 0, 0, 0, 367, 365, 1, 0, 0, 0, 367, 368, 1, 0, 0, 0, 368, 124, 1, 0, 0, 0, 369, 367, 1, 0, 0, 0, 370, 374, 5, 34, 0, 0, 371, 373, 8, 4, 0, 0, 372, 371, 1, 0, 0, 0, 373, 376, 1, 0, 0, 0, 374, 372, 1, 0, 0, 0, 374, 375, 1, 0, 0, 0, 375, 377, 1, 0, 0, 0, 376, 374, 1, 0, 0, 0, 377, 378, 5, 34, 0, 0, 378, 126, 1, 0, 0, 0, 379, 383, 5, 35, 0, 0, 380, 382, 8, 5, 0, 0, 381, 380, 1, 0, 0, 0, 382, 385, 1, 0, 0, 0, 383, 381, 1, 0, 0, 0, 383, 384, 1, 0, 0, 0, 384, 404, 1, 0, 0, 0, 385, 383, 1, 0, 0, 0, 386, 387, 5, 61, 0, 0, 387, 388, 5, 98, 0, 0, 388, 389, 5, 101, 0, 0, 389, 390, 5, 103, 0, 0, 390, 391, 5, 105, 0, 0, 391, 392, 5, 110, 0, 0, 392, 396, 1, 0, 0, 0, 393, 395, 9, 0, 0, 0, 394, 393, 1, 0, 0, 0, 395, 398, 1, 0, 0, 0, 396, 397, 1, 0, 0, 0, 396, 394, 1, 0, 0, 0, 397, 399, 1, 0, 0, 0, 398, 396, 1, 0, 0, 0, 399, 400, 5, 61, 0, 0, 400, 401, 5, 101, 0, 0, 401, 402, 5, 110, 0, 0, 402, 404, 5, 100, 0, 0, 403, 379, 1, 0, 0, 0, 403, 386, 1, 0, 0, 0, 404, 405, 1, 0, 0, 0, 405, 406, 6, 63, 0, 0, 406, 128, 1, 0, 0, 0, 407, 408, 7, 6, 0, 0, 408, 409, 1, 0, 0, 0, 409, 410, 6, 64, 0, 0, 410, 130, 1, 0, 0, 0, 10, 0, 346, 349, 354, 361, 367, 374, 383, 396, 403, 1, 6, 0, 0] \ No newline at end of file diff --git a/Phase2Template/Phase2/src/parsers/FunctionCraftLexer.java b/Phase2Template/Phase2/src/parsers/FunctionCraftLexer.java new file mode 100644 index 0000000..a91f536 --- /dev/null +++ b/Phase2Template/Phase2/src/parsers/FunctionCraftLexer.java @@ -0,0 +1,403 @@ +// Generated from U:/UT/6/PLC_TA/Design-Compiler-Course-Projects/Phase2Template/Phase2/src/main/grammar/FunctionCraft.g4 by ANTLR 4.13.1 +package parsers; + + import main.ast.nodes.*; + import main.ast.nodes.declaration.*; + import main.ast.nodes.statement.*; + import main.ast.nodes.expression.*; + import main.ast.nodes.expression.operators.*; + import main.ast.nodes.expression.value.*; + import main.ast.nodes.expression.value.primitive.*; + +import org.antlr.v4.runtime.Lexer; +import org.antlr.v4.runtime.CharStream; +import org.antlr.v4.runtime.Token; +import org.antlr.v4.runtime.TokenStream; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.misc.*; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast", "CheckReturnValue", "this-escape"}) +public class FunctionCraftLexer extends Lexer { + static { RuntimeMetaData.checkVersion("4.13.1", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + DEF=1, END=2, MAIN=3, PUTS=4, PUSH=5, LEN=6, RETURN=7, IF=8, ELSE=9, ELSEIF=10, + METHOD=11, PATTERN=12, MATCH=13, LOOP=14, FOR=15, IN=16, DO=17, CHOP=18, + CHOMP=19, PLUS=20, MINUS=21, MULT=22, DIVIDE=23, EQUAL=24, NOT_EQUAL=25, + LESS_EQUAL_THAN=26, GREATER_EQUAL_THAN=27, GREATER_THAN=28, LESS_THAN=29, + AND=30, OR=31, NOT=32, INCREMENT=33, DECREMENT=34, PATTERN_MATCHING_SEPARATOR=35, + SEPARATOR=36, APPEND=37, TRUE=38, FALSE=39, BREAK=40, NEXT=41, ARROW=42, + PLUS_ASSIGN=43, MINUS_ASSIGN=44, MULT_ASSIGN=45, DIVIDE_ASSIGN=46, MOD_ASSIGN=47, + ASSIGN=48, LPAR=49, RPAR=50, LBRACK=51, RBRACK=52, LBRACE=53, RBRACE=54, + COMMA=55, DOT=56, DOUBLEDOT=57, COLON=58, SEMICOLLON=59, INT_VALUE=60, + FLOAT_VALUE=61, IDENTIFIER=62, STRING_VALUE=63, COMMENT=64, WS=65; + public static String[] channelNames = { + "DEFAULT_TOKEN_CHANNEL", "HIDDEN" + }; + + public static String[] modeNames = { + "DEFAULT_MODE" + }; + + private static String[] makeRuleNames() { + return new String[] { + "DEF", "END", "MAIN", "PUTS", "PUSH", "LEN", "RETURN", "IF", "ELSE", + "ELSEIF", "METHOD", "PATTERN", "MATCH", "LOOP", "FOR", "IN", "DO", "CHOP", + "CHOMP", "PLUS", "MINUS", "MULT", "DIVIDE", "EQUAL", "NOT_EQUAL", "LESS_EQUAL_THAN", + "GREATER_EQUAL_THAN", "GREATER_THAN", "LESS_THAN", "AND", "OR", "NOT", + "INCREMENT", "DECREMENT", "PATTERN_MATCHING_SEPARATOR", "SEPARATOR", + "APPEND", "TRUE", "FALSE", "BREAK", "NEXT", "ARROW", "PLUS_ASSIGN", "MINUS_ASSIGN", + "MULT_ASSIGN", "DIVIDE_ASSIGN", "MOD_ASSIGN", "ASSIGN", "LPAR", "RPAR", + "LBRACK", "RBRACK", "LBRACE", "RBRACE", "COMMA", "DOT", "DOUBLEDOT", + "COLON", "SEMICOLLON", "INT_VALUE", "FLOAT_VALUE", "IDENTIFIER", "STRING_VALUE", + "COMMENT", "WS" + }; + } + public static final String[] ruleNames = makeRuleNames(); + + private static String[] makeLiteralNames() { + return new String[] { + null, "'def'", "'end'", "'main'", "'puts'", "'push'", "'len'", "'return'", + "'if'", "'else'", "'elseif'", "'method'", "'pattern'", "'match'", "'loop'", + "'for'", "'in'", "'do'", "'chop'", "'chomp'", "'+'", "'-'", "'*'", "'/'", + "'=='", "'!='", "'<='", "'>='", "'>'", "'<'", "'&&'", "'||'", "'!'", + "'++'", "'--'", "' |'", "'|'", "'<<'", "'true'", "'false'", "'break'", + "'next'", "'->'", "'+='", "'-='", "'*='", "'/='", "'%='", "'='", "'('", + "')'", "'['", "']'", "'{'", "'}'", "','", "'.'", "'..'", "':'", "';'" + }; + } + private static final String[] _LITERAL_NAMES = makeLiteralNames(); + private static String[] makeSymbolicNames() { + return new String[] { + null, "DEF", "END", "MAIN", "PUTS", "PUSH", "LEN", "RETURN", "IF", "ELSE", + "ELSEIF", "METHOD", "PATTERN", "MATCH", "LOOP", "FOR", "IN", "DO", "CHOP", + "CHOMP", "PLUS", "MINUS", "MULT", "DIVIDE", "EQUAL", "NOT_EQUAL", "LESS_EQUAL_THAN", + "GREATER_EQUAL_THAN", "GREATER_THAN", "LESS_THAN", "AND", "OR", "NOT", + "INCREMENT", "DECREMENT", "PATTERN_MATCHING_SEPARATOR", "SEPARATOR", + "APPEND", "TRUE", "FALSE", "BREAK", "NEXT", "ARROW", "PLUS_ASSIGN", "MINUS_ASSIGN", + "MULT_ASSIGN", "DIVIDE_ASSIGN", "MOD_ASSIGN", "ASSIGN", "LPAR", "RPAR", + "LBRACK", "RBRACK", "LBRACE", "RBRACE", "COMMA", "DOT", "DOUBLEDOT", + "COLON", "SEMICOLLON", "INT_VALUE", "FLOAT_VALUE", "IDENTIFIER", "STRING_VALUE", + "COMMENT", "WS" + }; + } + private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames(); + public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); + + /** + * @deprecated Use {@link #VOCABULARY} instead. + */ + @Deprecated + public static final String[] tokenNames; + static { + tokenNames = new String[_SYMBOLIC_NAMES.length]; + for (int i = 0; i < tokenNames.length; i++) { + tokenNames[i] = VOCABULARY.getLiteralName(i); + if (tokenNames[i] == null) { + tokenNames[i] = VOCABULARY.getSymbolicName(i); + } + + if (tokenNames[i] == null) { + tokenNames[i] = ""; + } + } + } + + @Override + @Deprecated + public String[] getTokenNames() { + return tokenNames; + } + + @Override + + public Vocabulary getVocabulary() { + return VOCABULARY; + } + + + public FunctionCraftLexer(CharStream input) { + super(input); + _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + + @Override + public String getGrammarFileName() { return "FunctionCraft.g4"; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public String[] getChannelNames() { return channelNames; } + + @Override + public String[] getModeNames() { return modeNames; } + + @Override + public ATN getATN() { return _ATN; } + + public static final String _serializedATN = + "\u0004\u0000A\u019b\u0006\uffff\uffff\u0002\u0000\u0007\u0000\u0002\u0001"+ + "\u0007\u0001\u0002\u0002\u0007\u0002\u0002\u0003\u0007\u0003\u0002\u0004"+ + "\u0007\u0004\u0002\u0005\u0007\u0005\u0002\u0006\u0007\u0006\u0002\u0007"+ + "\u0007\u0007\u0002\b\u0007\b\u0002\t\u0007\t\u0002\n\u0007\n\u0002\u000b"+ + "\u0007\u000b\u0002\f\u0007\f\u0002\r\u0007\r\u0002\u000e\u0007\u000e\u0002"+ + "\u000f\u0007\u000f\u0002\u0010\u0007\u0010\u0002\u0011\u0007\u0011\u0002"+ + "\u0012\u0007\u0012\u0002\u0013\u0007\u0013\u0002\u0014\u0007\u0014\u0002"+ + "\u0015\u0007\u0015\u0002\u0016\u0007\u0016\u0002\u0017\u0007\u0017\u0002"+ + "\u0018\u0007\u0018\u0002\u0019\u0007\u0019\u0002\u001a\u0007\u001a\u0002"+ + "\u001b\u0007\u001b\u0002\u001c\u0007\u001c\u0002\u001d\u0007\u001d\u0002"+ + "\u001e\u0007\u001e\u0002\u001f\u0007\u001f\u0002 \u0007 \u0002!\u0007"+ + "!\u0002\"\u0007\"\u0002#\u0007#\u0002$\u0007$\u0002%\u0007%\u0002&\u0007"+ + "&\u0002\'\u0007\'\u0002(\u0007(\u0002)\u0007)\u0002*\u0007*\u0002+\u0007"+ + "+\u0002,\u0007,\u0002-\u0007-\u0002.\u0007.\u0002/\u0007/\u00020\u0007"+ + "0\u00021\u00071\u00022\u00072\u00023\u00073\u00024\u00074\u00025\u0007"+ + "5\u00026\u00076\u00027\u00077\u00028\u00078\u00029\u00079\u0002:\u0007"+ + ":\u0002;\u0007;\u0002<\u0007<\u0002=\u0007=\u0002>\u0007>\u0002?\u0007"+ + "?\u0002@\u0007@\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0000\u0001"+ + "\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0002\u0001\u0002\u0001"+ + "\u0002\u0001\u0002\u0001\u0002\u0001\u0003\u0001\u0003\u0001\u0003\u0001"+ + "\u0003\u0001\u0003\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001"+ + "\u0004\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0006\u0001"+ + "\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001"+ + "\u0007\u0001\u0007\u0001\u0007\u0001\b\u0001\b\u0001\b\u0001\b\u0001\b"+ + "\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\n\u0001"+ + "\n\u0001\n\u0001\n\u0001\n\u0001\n\u0001\n\u0001\u000b\u0001\u000b\u0001"+ + "\u000b\u0001\u000b\u0001\u000b\u0001\u000b\u0001\u000b\u0001\u000b\u0001"+ + "\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\r\u0001\r\u0001\r\u0001"+ + "\r\u0001\r\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000f"+ + "\u0001\u000f\u0001\u000f\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0011"+ + "\u0001\u0011\u0001\u0011\u0001\u0011\u0001\u0011\u0001\u0012\u0001\u0012"+ + "\u0001\u0012\u0001\u0012\u0001\u0012\u0001\u0012\u0001\u0013\u0001\u0013"+ + "\u0001\u0014\u0001\u0014\u0001\u0015\u0001\u0015\u0001\u0016\u0001\u0016"+ + "\u0001\u0017\u0001\u0017\u0001\u0017\u0001\u0018\u0001\u0018\u0001\u0018"+ + "\u0001\u0019\u0001\u0019\u0001\u0019\u0001\u001a\u0001\u001a\u0001\u001a"+ + "\u0001\u001b\u0001\u001b\u0001\u001c\u0001\u001c\u0001\u001d\u0001\u001d"+ + "\u0001\u001d\u0001\u001e\u0001\u001e\u0001\u001e\u0001\u001f\u0001\u001f"+ + "\u0001 \u0001 \u0001 \u0001!\u0001!\u0001!\u0001\"\u0001\"\u0001\"\u0001"+ + "\"\u0001\"\u0001\"\u0001#\u0001#\u0001$\u0001$\u0001$\u0001%\u0001%\u0001"+ + "%\u0001%\u0001%\u0001&\u0001&\u0001&\u0001&\u0001&\u0001&\u0001\'\u0001"+ + "\'\u0001\'\u0001\'\u0001\'\u0001\'\u0001(\u0001(\u0001(\u0001(\u0001("+ + "\u0001)\u0001)\u0001)\u0001*\u0001*\u0001*\u0001+\u0001+\u0001+\u0001"+ + ",\u0001,\u0001,\u0001-\u0001-\u0001-\u0001.\u0001.\u0001.\u0001/\u0001"+ + "/\u00010\u00010\u00011\u00011\u00012\u00012\u00013\u00013\u00014\u0001"+ + "4\u00015\u00015\u00016\u00016\u00017\u00017\u00018\u00018\u00018\u0001"+ + "9\u00019\u0001:\u0001:\u0001;\u0001;\u0001;\u0005;\u0159\b;\n;\f;\u015c"+ + "\t;\u0003;\u015e\b;\u0001<\u0005<\u0161\b<\n<\f<\u0164\t<\u0001<\u0001"+ + "<\u0004<\u0168\b<\u000b<\f<\u0169\u0001=\u0001=\u0005=\u016e\b=\n=\f="+ + "\u0171\t=\u0001>\u0001>\u0005>\u0175\b>\n>\f>\u0178\t>\u0001>\u0001>\u0001"+ + "?\u0001?\u0005?\u017e\b?\n?\f?\u0181\t?\u0001?\u0001?\u0001?\u0001?\u0001"+ + "?\u0001?\u0001?\u0001?\u0005?\u018b\b?\n?\f?\u018e\t?\u0001?\u0001?\u0001"+ + "?\u0001?\u0003?\u0194\b?\u0001?\u0001?\u0001@\u0001@\u0001@\u0001@\u0001"+ + "\u018c\u0000A\u0001\u0001\u0003\u0002\u0005\u0003\u0007\u0004\t\u0005"+ + "\u000b\u0006\r\u0007\u000f\b\u0011\t\u0013\n\u0015\u000b\u0017\f\u0019"+ + "\r\u001b\u000e\u001d\u000f\u001f\u0010!\u0011#\u0012%\u0013\'\u0014)\u0015"+ + "+\u0016-\u0017/\u00181\u00193\u001a5\u001b7\u001c9\u001d;\u001e=\u001f"+ + "? A!C\"E#G$I%K&M\'O(Q)S*U+W,Y-[.]/_0a1c2e3g4i5k6m7o8q9s:u;w}?\u007f"+ + "@\u0081A\u0001\u0000\u0007\u0001\u000019\u0001\u000009\u0003\u0000AZ_"+ + "_az\u0004\u000009AZ__az\u0001\u0000\"\"\u0002\u0000\n\n\r\r\u0003\u0000"+ + "\t\n\r\r \u01a3\u0000\u0001\u0001\u0000\u0000\u0000\u0000\u0003\u0001"+ + "\u0000\u0000\u0000\u0000\u0005\u0001\u0000\u0000\u0000\u0000\u0007\u0001"+ + "\u0000\u0000\u0000\u0000\t\u0001\u0000\u0000\u0000\u0000\u000b\u0001\u0000"+ + "\u0000\u0000\u0000\r\u0001\u0000\u0000\u0000\u0000\u000f\u0001\u0000\u0000"+ + "\u0000\u0000\u0011\u0001\u0000\u0000\u0000\u0000\u0013\u0001\u0000\u0000"+ + "\u0000\u0000\u0015\u0001\u0000\u0000\u0000\u0000\u0017\u0001\u0000\u0000"+ + "\u0000\u0000\u0019\u0001\u0000\u0000\u0000\u0000\u001b\u0001\u0000\u0000"+ + "\u0000\u0000\u001d\u0001\u0000\u0000\u0000\u0000\u001f\u0001\u0000\u0000"+ + "\u0000\u0000!\u0001\u0000\u0000\u0000\u0000#\u0001\u0000\u0000\u0000\u0000"+ + "%\u0001\u0000\u0000\u0000\u0000\'\u0001\u0000\u0000\u0000\u0000)\u0001"+ + "\u0000\u0000\u0000\u0000+\u0001\u0000\u0000\u0000\u0000-\u0001\u0000\u0000"+ + "\u0000\u0000/\u0001\u0000\u0000\u0000\u00001\u0001\u0000\u0000\u0000\u0000"+ + "3\u0001\u0000\u0000\u0000\u00005\u0001\u0000\u0000\u0000\u00007\u0001"+ + "\u0000\u0000\u0000\u00009\u0001\u0000\u0000\u0000\u0000;\u0001\u0000\u0000"+ + "\u0000\u0000=\u0001\u0000\u0000\u0000\u0000?\u0001\u0000\u0000\u0000\u0000"+ + "A\u0001\u0000\u0000\u0000\u0000C\u0001\u0000\u0000\u0000\u0000E\u0001"+ + "\u0000\u0000\u0000\u0000G\u0001\u0000\u0000\u0000\u0000I\u0001\u0000\u0000"+ + "\u0000\u0000K\u0001\u0000\u0000\u0000\u0000M\u0001\u0000\u0000\u0000\u0000"+ + "O\u0001\u0000\u0000\u0000\u0000Q\u0001\u0000\u0000\u0000\u0000S\u0001"+ + "\u0000\u0000\u0000\u0000U\u0001\u0000\u0000\u0000\u0000W\u0001\u0000\u0000"+ + "\u0000\u0000Y\u0001\u0000\u0000\u0000\u0000[\u0001\u0000\u0000\u0000\u0000"+ + "]\u0001\u0000\u0000\u0000\u0000_\u0001\u0000\u0000\u0000\u0000a\u0001"+ + "\u0000\u0000\u0000\u0000c\u0001\u0000\u0000\u0000\u0000e\u0001\u0000\u0000"+ + "\u0000\u0000g\u0001\u0000\u0000\u0000\u0000i\u0001\u0000\u0000\u0000\u0000"+ + "k\u0001\u0000\u0000\u0000\u0000m\u0001\u0000\u0000\u0000\u0000o\u0001"+ + "\u0000\u0000\u0000\u0000q\u0001\u0000\u0000\u0000\u0000s\u0001\u0000\u0000"+ + "\u0000\u0000u\u0001\u0000\u0000\u0000\u0000w\u0001\u0000\u0000\u0000\u0000"+ + "y\u0001\u0000\u0000\u0000\u0000{\u0001\u0000\u0000\u0000\u0000}\u0001"+ + "\u0000\u0000\u0000\u0000\u007f\u0001\u0000\u0000\u0000\u0000\u0081\u0001"+ + "\u0000\u0000\u0000\u0001\u0083\u0001\u0000\u0000\u0000\u0003\u0087\u0001"+ + "\u0000\u0000\u0000\u0005\u008b\u0001\u0000\u0000\u0000\u0007\u0090\u0001"+ + "\u0000\u0000\u0000\t\u0095\u0001\u0000\u0000\u0000\u000b\u009a\u0001\u0000"+ + "\u0000\u0000\r\u009e\u0001\u0000\u0000\u0000\u000f\u00a5\u0001\u0000\u0000"+ + "\u0000\u0011\u00a8\u0001\u0000\u0000\u0000\u0013\u00ad\u0001\u0000\u0000"+ + "\u0000\u0015\u00b4\u0001\u0000\u0000\u0000\u0017\u00bb\u0001\u0000\u0000"+ + "\u0000\u0019\u00c3\u0001\u0000\u0000\u0000\u001b\u00c9\u0001\u0000\u0000"+ + "\u0000\u001d\u00ce\u0001\u0000\u0000\u0000\u001f\u00d2\u0001\u0000\u0000"+ + "\u0000!\u00d5\u0001\u0000\u0000\u0000#\u00d8\u0001\u0000\u0000\u0000%"+ + "\u00dd\u0001\u0000\u0000\u0000\'\u00e3\u0001\u0000\u0000\u0000)\u00e5"+ + "\u0001\u0000\u0000\u0000+\u00e7\u0001\u0000\u0000\u0000-\u00e9\u0001\u0000"+ + "\u0000\u0000/\u00eb\u0001\u0000\u0000\u00001\u00ee\u0001\u0000\u0000\u0000"+ + "3\u00f1\u0001\u0000\u0000\u00005\u00f4\u0001\u0000\u0000\u00007\u00f7"+ + "\u0001\u0000\u0000\u00009\u00f9\u0001\u0000\u0000\u0000;\u00fb\u0001\u0000"+ + "\u0000\u0000=\u00fe\u0001\u0000\u0000\u0000?\u0101\u0001\u0000\u0000\u0000"+ + "A\u0103\u0001\u0000\u0000\u0000C\u0106\u0001\u0000\u0000\u0000E\u0109"+ + "\u0001\u0000\u0000\u0000G\u010f\u0001\u0000\u0000\u0000I\u0111\u0001\u0000"+ + "\u0000\u0000K\u0114\u0001\u0000\u0000\u0000M\u0119\u0001\u0000\u0000\u0000"+ + "O\u011f\u0001\u0000\u0000\u0000Q\u0125\u0001\u0000\u0000\u0000S\u012a"+ + "\u0001\u0000\u0000\u0000U\u012d\u0001\u0000\u0000\u0000W\u0130\u0001\u0000"+ + "\u0000\u0000Y\u0133\u0001\u0000\u0000\u0000[\u0136\u0001\u0000\u0000\u0000"+ + "]\u0139\u0001\u0000\u0000\u0000_\u013c\u0001\u0000\u0000\u0000a\u013e"+ + "\u0001\u0000\u0000\u0000c\u0140\u0001\u0000\u0000\u0000e\u0142\u0001\u0000"+ + "\u0000\u0000g\u0144\u0001\u0000\u0000\u0000i\u0146\u0001\u0000\u0000\u0000"+ + "k\u0148\u0001\u0000\u0000\u0000m\u014a\u0001\u0000\u0000\u0000o\u014c"+ + "\u0001\u0000\u0000\u0000q\u014e\u0001\u0000\u0000\u0000s\u0151\u0001\u0000"+ + "\u0000\u0000u\u0153\u0001\u0000\u0000\u0000w\u015d\u0001\u0000\u0000\u0000"+ + "y\u0162\u0001\u0000\u0000\u0000{\u016b\u0001\u0000\u0000\u0000}\u0172"+ + "\u0001\u0000\u0000\u0000\u007f\u0193\u0001\u0000\u0000\u0000\u0081\u0197"+ + "\u0001\u0000\u0000\u0000\u0083\u0084\u0005d\u0000\u0000\u0084\u0085\u0005"+ + "e\u0000\u0000\u0085\u0086\u0005f\u0000\u0000\u0086\u0002\u0001\u0000\u0000"+ + "\u0000\u0087\u0088\u0005e\u0000\u0000\u0088\u0089\u0005n\u0000\u0000\u0089"+ + "\u008a\u0005d\u0000\u0000\u008a\u0004\u0001\u0000\u0000\u0000\u008b\u008c"+ + "\u0005m\u0000\u0000\u008c\u008d\u0005a\u0000\u0000\u008d\u008e\u0005i"+ + "\u0000\u0000\u008e\u008f\u0005n\u0000\u0000\u008f\u0006\u0001\u0000\u0000"+ + "\u0000\u0090\u0091\u0005p\u0000\u0000\u0091\u0092\u0005u\u0000\u0000\u0092"+ + "\u0093\u0005t\u0000\u0000\u0093\u0094\u0005s\u0000\u0000\u0094\b\u0001"+ + "\u0000\u0000\u0000\u0095\u0096\u0005p\u0000\u0000\u0096\u0097\u0005u\u0000"+ + "\u0000\u0097\u0098\u0005s\u0000\u0000\u0098\u0099\u0005h\u0000\u0000\u0099"+ + "\n\u0001\u0000\u0000\u0000\u009a\u009b\u0005l\u0000\u0000\u009b\u009c"+ + "\u0005e\u0000\u0000\u009c\u009d\u0005n\u0000\u0000\u009d\f\u0001\u0000"+ + "\u0000\u0000\u009e\u009f\u0005r\u0000\u0000\u009f\u00a0\u0005e\u0000\u0000"+ + "\u00a0\u00a1\u0005t\u0000\u0000\u00a1\u00a2\u0005u\u0000\u0000\u00a2\u00a3"+ + "\u0005r\u0000\u0000\u00a3\u00a4\u0005n\u0000\u0000\u00a4\u000e\u0001\u0000"+ + "\u0000\u0000\u00a5\u00a6\u0005i\u0000\u0000\u00a6\u00a7\u0005f\u0000\u0000"+ + "\u00a7\u0010\u0001\u0000\u0000\u0000\u00a8\u00a9\u0005e\u0000\u0000\u00a9"+ + "\u00aa\u0005l\u0000\u0000\u00aa\u00ab\u0005s\u0000\u0000\u00ab\u00ac\u0005"+ + "e\u0000\u0000\u00ac\u0012\u0001\u0000\u0000\u0000\u00ad\u00ae\u0005e\u0000"+ + "\u0000\u00ae\u00af\u0005l\u0000\u0000\u00af\u00b0\u0005s\u0000\u0000\u00b0"+ + "\u00b1\u0005e\u0000\u0000\u00b1\u00b2\u0005i\u0000\u0000\u00b2\u00b3\u0005"+ + "f\u0000\u0000\u00b3\u0014\u0001\u0000\u0000\u0000\u00b4\u00b5\u0005m\u0000"+ + "\u0000\u00b5\u00b6\u0005e\u0000\u0000\u00b6\u00b7\u0005t\u0000\u0000\u00b7"+ + "\u00b8\u0005h\u0000\u0000\u00b8\u00b9\u0005o\u0000\u0000\u00b9\u00ba\u0005"+ + "d\u0000\u0000\u00ba\u0016\u0001\u0000\u0000\u0000\u00bb\u00bc\u0005p\u0000"+ + "\u0000\u00bc\u00bd\u0005a\u0000\u0000\u00bd\u00be\u0005t\u0000\u0000\u00be"+ + "\u00bf\u0005t\u0000\u0000\u00bf\u00c0\u0005e\u0000\u0000\u00c0\u00c1\u0005"+ + "r\u0000\u0000\u00c1\u00c2\u0005n\u0000\u0000\u00c2\u0018\u0001\u0000\u0000"+ + "\u0000\u00c3\u00c4\u0005m\u0000\u0000\u00c4\u00c5\u0005a\u0000\u0000\u00c5"+ + "\u00c6\u0005t\u0000\u0000\u00c6\u00c7\u0005c\u0000\u0000\u00c7\u00c8\u0005"+ + "h\u0000\u0000\u00c8\u001a\u0001\u0000\u0000\u0000\u00c9\u00ca\u0005l\u0000"+ + "\u0000\u00ca\u00cb\u0005o\u0000\u0000\u00cb\u00cc\u0005o\u0000\u0000\u00cc"+ + "\u00cd\u0005p\u0000\u0000\u00cd\u001c\u0001\u0000\u0000\u0000\u00ce\u00cf"+ + "\u0005f\u0000\u0000\u00cf\u00d0\u0005o\u0000\u0000\u00d0\u00d1\u0005r"+ + "\u0000\u0000\u00d1\u001e\u0001\u0000\u0000\u0000\u00d2\u00d3\u0005i\u0000"+ + "\u0000\u00d3\u00d4\u0005n\u0000\u0000\u00d4 \u0001\u0000\u0000\u0000\u00d5"+ + "\u00d6\u0005d\u0000\u0000\u00d6\u00d7\u0005o\u0000\u0000\u00d7\"\u0001"+ + "\u0000\u0000\u0000\u00d8\u00d9\u0005c\u0000\u0000\u00d9\u00da\u0005h\u0000"+ + "\u0000\u00da\u00db\u0005o\u0000\u0000\u00db\u00dc\u0005p\u0000\u0000\u00dc"+ + "$\u0001\u0000\u0000\u0000\u00dd\u00de\u0005c\u0000\u0000\u00de\u00df\u0005"+ + "h\u0000\u0000\u00df\u00e0\u0005o\u0000\u0000\u00e0\u00e1\u0005m\u0000"+ + "\u0000\u00e1\u00e2\u0005p\u0000\u0000\u00e2&\u0001\u0000\u0000\u0000\u00e3"+ + "\u00e4\u0005+\u0000\u0000\u00e4(\u0001\u0000\u0000\u0000\u00e5\u00e6\u0005"+ + "-\u0000\u0000\u00e6*\u0001\u0000\u0000\u0000\u00e7\u00e8\u0005*\u0000"+ + "\u0000\u00e8,\u0001\u0000\u0000\u0000\u00e9\u00ea\u0005/\u0000\u0000\u00ea"+ + ".\u0001\u0000\u0000\u0000\u00eb\u00ec\u0005=\u0000\u0000\u00ec\u00ed\u0005"+ + "=\u0000\u0000\u00ed0\u0001\u0000\u0000\u0000\u00ee\u00ef\u0005!\u0000"+ + "\u0000\u00ef\u00f0\u0005=\u0000\u0000\u00f02\u0001\u0000\u0000\u0000\u00f1"+ + "\u00f2\u0005<\u0000\u0000\u00f2\u00f3\u0005=\u0000\u0000\u00f34\u0001"+ + "\u0000\u0000\u0000\u00f4\u00f5\u0005>\u0000\u0000\u00f5\u00f6\u0005=\u0000"+ + "\u0000\u00f66\u0001\u0000\u0000\u0000\u00f7\u00f8\u0005>\u0000\u0000\u00f8"+ + "8\u0001\u0000\u0000\u0000\u00f9\u00fa\u0005<\u0000\u0000\u00fa:\u0001"+ + "\u0000\u0000\u0000\u00fb\u00fc\u0005&\u0000\u0000\u00fc\u00fd\u0005&\u0000"+ + "\u0000\u00fd<\u0001\u0000\u0000\u0000\u00fe\u00ff\u0005|\u0000\u0000\u00ff"+ + "\u0100\u0005|\u0000\u0000\u0100>\u0001\u0000\u0000\u0000\u0101\u0102\u0005"+ + "!\u0000\u0000\u0102@\u0001\u0000\u0000\u0000\u0103\u0104\u0005+\u0000"+ + "\u0000\u0104\u0105\u0005+\u0000\u0000\u0105B\u0001\u0000\u0000\u0000\u0106"+ + "\u0107\u0005-\u0000\u0000\u0107\u0108\u0005-\u0000\u0000\u0108D\u0001"+ + "\u0000\u0000\u0000\u0109\u010a\u0005 \u0000\u0000\u010a\u010b\u0005 \u0000"+ + "\u0000\u010b\u010c\u0005 \u0000\u0000\u010c\u010d\u0005 \u0000\u0000\u010d"+ + "\u010e\u0005|\u0000\u0000\u010eF\u0001\u0000\u0000\u0000\u010f\u0110\u0005"+ + "|\u0000\u0000\u0110H\u0001\u0000\u0000\u0000\u0111\u0112\u0005<\u0000"+ + "\u0000\u0112\u0113\u0005<\u0000\u0000\u0113J\u0001\u0000\u0000\u0000\u0114"+ + "\u0115\u0005t\u0000\u0000\u0115\u0116\u0005r\u0000\u0000\u0116\u0117\u0005"+ + "u\u0000\u0000\u0117\u0118\u0005e\u0000\u0000\u0118L\u0001\u0000\u0000"+ + "\u0000\u0119\u011a\u0005f\u0000\u0000\u011a\u011b\u0005a\u0000\u0000\u011b"+ + "\u011c\u0005l\u0000\u0000\u011c\u011d\u0005s\u0000\u0000\u011d\u011e\u0005"+ + "e\u0000\u0000\u011eN\u0001\u0000\u0000\u0000\u011f\u0120\u0005b\u0000"+ + "\u0000\u0120\u0121\u0005r\u0000\u0000\u0121\u0122\u0005e\u0000\u0000\u0122"+ + "\u0123\u0005a\u0000\u0000\u0123\u0124\u0005k\u0000\u0000\u0124P\u0001"+ + "\u0000\u0000\u0000\u0125\u0126\u0005n\u0000\u0000\u0126\u0127\u0005e\u0000"+ + "\u0000\u0127\u0128\u0005x\u0000\u0000\u0128\u0129\u0005t\u0000\u0000\u0129"+ + "R\u0001\u0000\u0000\u0000\u012a\u012b\u0005-\u0000\u0000\u012b\u012c\u0005"+ + ">\u0000\u0000\u012cT\u0001\u0000\u0000\u0000\u012d\u012e\u0005+\u0000"+ + "\u0000\u012e\u012f\u0005=\u0000\u0000\u012fV\u0001\u0000\u0000\u0000\u0130"+ + "\u0131\u0005-\u0000\u0000\u0131\u0132\u0005=\u0000\u0000\u0132X\u0001"+ + "\u0000\u0000\u0000\u0133\u0134\u0005*\u0000\u0000\u0134\u0135\u0005=\u0000"+ + "\u0000\u0135Z\u0001\u0000\u0000\u0000\u0136\u0137\u0005/\u0000\u0000\u0137"+ + "\u0138\u0005=\u0000\u0000\u0138\\\u0001\u0000\u0000\u0000\u0139\u013a"+ + "\u0005%\u0000\u0000\u013a\u013b\u0005=\u0000\u0000\u013b^\u0001\u0000"+ + "\u0000\u0000\u013c\u013d\u0005=\u0000\u0000\u013d`\u0001\u0000\u0000\u0000"+ + "\u013e\u013f\u0005(\u0000\u0000\u013fb\u0001\u0000\u0000\u0000\u0140\u0141"+ + "\u0005)\u0000\u0000\u0141d\u0001\u0000\u0000\u0000\u0142\u0143\u0005["+ + "\u0000\u0000\u0143f\u0001\u0000\u0000\u0000\u0144\u0145\u0005]\u0000\u0000"+ + "\u0145h\u0001\u0000\u0000\u0000\u0146\u0147\u0005{\u0000\u0000\u0147j"+ + "\u0001\u0000\u0000\u0000\u0148\u0149\u0005}\u0000\u0000\u0149l\u0001\u0000"+ + "\u0000\u0000\u014a\u014b\u0005,\u0000\u0000\u014bn\u0001\u0000\u0000\u0000"+ + "\u014c\u014d\u0005.\u0000\u0000\u014dp\u0001\u0000\u0000\u0000\u014e\u014f"+ + "\u0005.\u0000\u0000\u014f\u0150\u0005.\u0000\u0000\u0150r\u0001\u0000"+ + "\u0000\u0000\u0151\u0152\u0005:\u0000\u0000\u0152t\u0001\u0000\u0000\u0000"+ + "\u0153\u0154\u0005;\u0000\u0000\u0154v\u0001\u0000\u0000\u0000\u0155\u015e"+ + "\u00050\u0000\u0000\u0156\u015a\u0007\u0000\u0000\u0000\u0157\u0159\u0007"+ + "\u0001\u0000\u0000\u0158\u0157\u0001\u0000\u0000\u0000\u0159\u015c\u0001"+ + "\u0000\u0000\u0000\u015a\u0158\u0001\u0000\u0000\u0000\u015a\u015b\u0001"+ + "\u0000\u0000\u0000\u015b\u015e\u0001\u0000\u0000\u0000\u015c\u015a\u0001"+ + "\u0000\u0000\u0000\u015d\u0155\u0001\u0000\u0000\u0000\u015d\u0156\u0001"+ + "\u0000\u0000\u0000\u015ex\u0001\u0000\u0000\u0000\u015f\u0161\u0007\u0001"+ + "\u0000\u0000\u0160\u015f\u0001\u0000\u0000\u0000\u0161\u0164\u0001\u0000"+ + "\u0000\u0000\u0162\u0160\u0001\u0000\u0000\u0000\u0162\u0163\u0001\u0000"+ + "\u0000\u0000\u0163\u0165\u0001\u0000\u0000\u0000\u0164\u0162\u0001\u0000"+ + "\u0000\u0000\u0165\u0167\u0005.\u0000\u0000\u0166\u0168\u0007\u0001\u0000"+ + "\u0000\u0167\u0166\u0001\u0000\u0000\u0000\u0168\u0169\u0001\u0000\u0000"+ + "\u0000\u0169\u0167\u0001\u0000\u0000\u0000\u0169\u016a\u0001\u0000\u0000"+ + "\u0000\u016az\u0001\u0000\u0000\u0000\u016b\u016f\u0007\u0002\u0000\u0000"+ + "\u016c\u016e\u0007\u0003\u0000\u0000\u016d\u016c\u0001\u0000\u0000\u0000"+ + "\u016e\u0171\u0001\u0000\u0000\u0000\u016f\u016d\u0001\u0000\u0000\u0000"+ + "\u016f\u0170\u0001\u0000\u0000\u0000\u0170|\u0001\u0000\u0000\u0000\u0171"+ + "\u016f\u0001\u0000\u0000\u0000\u0172\u0176\u0005\"\u0000\u0000\u0173\u0175"+ + "\b\u0004\u0000\u0000\u0174\u0173\u0001\u0000\u0000\u0000\u0175\u0178\u0001"+ + "\u0000\u0000\u0000\u0176\u0174\u0001\u0000\u0000\u0000\u0176\u0177\u0001"+ + "\u0000\u0000\u0000\u0177\u0179\u0001\u0000\u0000\u0000\u0178\u0176\u0001"+ + "\u0000\u0000\u0000\u0179\u017a\u0005\"\u0000\u0000\u017a~\u0001\u0000"+ + "\u0000\u0000\u017b\u017f\u0005#\u0000\u0000\u017c\u017e\b\u0005\u0000"+ + "\u0000\u017d\u017c\u0001\u0000\u0000\u0000\u017e\u0181\u0001\u0000\u0000"+ + "\u0000\u017f\u017d\u0001\u0000\u0000\u0000\u017f\u0180\u0001\u0000\u0000"+ + "\u0000\u0180\u0194\u0001\u0000\u0000\u0000\u0181\u017f\u0001\u0000\u0000"+ + "\u0000\u0182\u0183\u0005=\u0000\u0000\u0183\u0184\u0005b\u0000\u0000\u0184"+ + "\u0185\u0005e\u0000\u0000\u0185\u0186\u0005g\u0000\u0000\u0186\u0187\u0005"+ + "i\u0000\u0000\u0187\u0188\u0005n\u0000\u0000\u0188\u018c\u0001\u0000\u0000"+ + "\u0000\u0189\u018b\t\u0000\u0000\u0000\u018a\u0189\u0001\u0000\u0000\u0000"+ + "\u018b\u018e\u0001\u0000\u0000\u0000\u018c\u018d\u0001\u0000\u0000\u0000"+ + "\u018c\u018a\u0001\u0000\u0000\u0000\u018d\u018f\u0001\u0000\u0000\u0000"+ + "\u018e\u018c\u0001\u0000\u0000\u0000\u018f\u0190\u0005=\u0000\u0000\u0190"+ + "\u0191\u0005e\u0000\u0000\u0191\u0192\u0005n\u0000\u0000\u0192\u0194\u0005"+ + "d\u0000\u0000\u0193\u017b\u0001\u0000\u0000\u0000\u0193\u0182\u0001\u0000"+ + "\u0000\u0000\u0194\u0195\u0001\u0000\u0000\u0000\u0195\u0196\u0006?\u0000"+ + "\u0000\u0196\u0080\u0001\u0000\u0000\u0000\u0197\u0198\u0007\u0006\u0000"+ + "\u0000\u0198\u0199\u0001\u0000\u0000\u0000\u0199\u019a\u0006@\u0000\u0000"+ + "\u019a\u0082\u0001\u0000\u0000\u0000\n\u0000\u015a\u015d\u0162\u0169\u016f"+ + "\u0176\u017f\u018c\u0193\u0001\u0006\u0000\u0000"; + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} \ No newline at end of file diff --git a/Phase2Template/Phase2/src/parsers/FunctionCraftLexer.tokens b/Phase2Template/Phase2/src/parsers/FunctionCraftLexer.tokens new file mode 100644 index 0000000..c103028 --- /dev/null +++ b/Phase2Template/Phase2/src/parsers/FunctionCraftLexer.tokens @@ -0,0 +1,124 @@ +DEF=1 +END=2 +MAIN=3 +PUTS=4 +PUSH=5 +LEN=6 +RETURN=7 +IF=8 +ELSE=9 +ELSEIF=10 +METHOD=11 +PATTERN=12 +MATCH=13 +LOOP=14 +FOR=15 +IN=16 +DO=17 +CHOP=18 +CHOMP=19 +PLUS=20 +MINUS=21 +MULT=22 +DIVIDE=23 +EQUAL=24 +NOT_EQUAL=25 +LESS_EQUAL_THAN=26 +GREATER_EQUAL_THAN=27 +GREATER_THAN=28 +LESS_THAN=29 +AND=30 +OR=31 +NOT=32 +INCREMENT=33 +DECREMENT=34 +PATTERN_MATCHING_SEPARATOR=35 +SEPARATOR=36 +APPEND=37 +TRUE=38 +FALSE=39 +BREAK=40 +NEXT=41 +ARROW=42 +PLUS_ASSIGN=43 +MINUS_ASSIGN=44 +MULT_ASSIGN=45 +DIVIDE_ASSIGN=46 +MOD_ASSIGN=47 +ASSIGN=48 +LPAR=49 +RPAR=50 +LBRACK=51 +RBRACK=52 +LBRACE=53 +RBRACE=54 +COMMA=55 +DOT=56 +DOUBLEDOT=57 +COLON=58 +SEMICOLLON=59 +INT_VALUE=60 +FLOAT_VALUE=61 +IDENTIFIER=62 +STRING_VALUE=63 +COMMENT=64 +WS=65 +'def'=1 +'end'=2 +'main'=3 +'puts'=4 +'push'=5 +'len'=6 +'return'=7 +'if'=8 +'else'=9 +'elseif'=10 +'method'=11 +'pattern'=12 +'match'=13 +'loop'=14 +'for'=15 +'in'=16 +'do'=17 +'chop'=18 +'chomp'=19 +'+'=20 +'-'=21 +'*'=22 +'/'=23 +'=='=24 +'!='=25 +'<='=26 +'>='=27 +'>'=28 +'<'=29 +'&&'=30 +'||'=31 +'!'=32 +'++'=33 +'--'=34 +' |'=35 +'|'=36 +'<<'=37 +'true'=38 +'false'=39 +'break'=40 +'next'=41 +'->'=42 +'+='=43 +'-='=44 +'*='=45 +'/='=46 +'%='=47 +'='=48 +'('=49 +')'=50 +'['=51 +']'=52 +'{'=53 +'}'=54 +','=55 +'.'=56 +'..'=57 +':'=58 +';'=59 diff --git a/Phase2Template/Phase2/src/parsers/FunctionCraftListener.java b/Phase2Template/Phase2/src/parsers/FunctionCraftListener.java new file mode 100644 index 0000000..ef8b386 --- /dev/null +++ b/Phase2Template/Phase2/src/parsers/FunctionCraftListener.java @@ -0,0 +1,389 @@ +// Generated from U:/UT/6/PLC_TA/Design-Compiler-Course-Projects/Phase2Template/Phase2/src/main/grammar/FunctionCraft.g4 by ANTLR 4.13.1 +package parsers; + + import main.ast.nodes.*; + import main.ast.nodes.declaration.*; + import main.ast.nodes.statement.*; + import main.ast.nodes.expression.*; + import main.ast.nodes.expression.operators.*; + import main.ast.nodes.expression.value.*; + import main.ast.nodes.expression.value.primitive.*; + +import org.antlr.v4.runtime.tree.ParseTreeListener; + +/** + * This interface defines a complete listener for a parse tree produced by + * {@link FunctionCraftParser}. + */ +public interface FunctionCraftListener extends ParseTreeListener { + /** + * Enter a parse tree produced by {@link FunctionCraftParser#program}. + * @param ctx the parse tree + */ + void enterProgram(FunctionCraftParser.ProgramContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#program}. + * @param ctx the parse tree + */ + void exitProgram(FunctionCraftParser.ProgramContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#functionDeclaration}. + * @param ctx the parse tree + */ + void enterFunctionDeclaration(FunctionCraftParser.FunctionDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#functionDeclaration}. + * @param ctx the parse tree + */ + void exitFunctionDeclaration(FunctionCraftParser.FunctionDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#functionArgumentsDeclaration}. + * @param ctx the parse tree + */ + void enterFunctionArgumentsDeclaration(FunctionCraftParser.FunctionArgumentsDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#functionArgumentsDeclaration}. + * @param ctx the parse tree + */ + void exitFunctionArgumentsDeclaration(FunctionCraftParser.FunctionArgumentsDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#patternMatching}. + * @param ctx the parse tree + */ + void enterPatternMatching(FunctionCraftParser.PatternMatchingContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#patternMatching}. + * @param ctx the parse tree + */ + void exitPatternMatching(FunctionCraftParser.PatternMatchingContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#main}. + * @param ctx the parse tree + */ + void enterMain(FunctionCraftParser.MainContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#main}. + * @param ctx the parse tree + */ + void exitMain(FunctionCraftParser.MainContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#functionArguments}. + * @param ctx the parse tree + */ + void enterFunctionArguments(FunctionCraftParser.FunctionArgumentsContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#functionArguments}. + * @param ctx the parse tree + */ + void exitFunctionArguments(FunctionCraftParser.FunctionArgumentsContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#returnStatement}. + * @param ctx the parse tree + */ + void enterReturnStatement(FunctionCraftParser.ReturnStatementContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#returnStatement}. + * @param ctx the parse tree + */ + void exitReturnStatement(FunctionCraftParser.ReturnStatementContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#ifStatement}. + * @param ctx the parse tree + */ + void enterIfStatement(FunctionCraftParser.IfStatementContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#ifStatement}. + * @param ctx the parse tree + */ + void exitIfStatement(FunctionCraftParser.IfStatementContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#condition}. + * @param ctx the parse tree + */ + void enterCondition(FunctionCraftParser.ConditionContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#condition}. + * @param ctx the parse tree + */ + void exitCondition(FunctionCraftParser.ConditionContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#putsStatement}. + * @param ctx the parse tree + */ + void enterPutsStatement(FunctionCraftParser.PutsStatementContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#putsStatement}. + * @param ctx the parse tree + */ + void exitPutsStatement(FunctionCraftParser.PutsStatementContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#lenStatement}. + * @param ctx the parse tree + */ + void enterLenStatement(FunctionCraftParser.LenStatementContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#lenStatement}. + * @param ctx the parse tree + */ + void exitLenStatement(FunctionCraftParser.LenStatementContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#pushStatement}. + * @param ctx the parse tree + */ + void enterPushStatement(FunctionCraftParser.PushStatementContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#pushStatement}. + * @param ctx the parse tree + */ + void exitPushStatement(FunctionCraftParser.PushStatementContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#loopDoStatement}. + * @param ctx the parse tree + */ + void enterLoopDoStatement(FunctionCraftParser.LoopDoStatementContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#loopDoStatement}. + * @param ctx the parse tree + */ + void exitLoopDoStatement(FunctionCraftParser.LoopDoStatementContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#loopBody}. + * @param ctx the parse tree + */ + void enterLoopBody(FunctionCraftParser.LoopBodyContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#loopBody}. + * @param ctx the parse tree + */ + void exitLoopBody(FunctionCraftParser.LoopBodyContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#forStatement}. + * @param ctx the parse tree + */ + void enterForStatement(FunctionCraftParser.ForStatementContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#forStatement}. + * @param ctx the parse tree + */ + void exitForStatement(FunctionCraftParser.ForStatementContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#range}. + * @param ctx the parse tree + */ + void enterRange(FunctionCraftParser.RangeContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#range}. + * @param ctx the parse tree + */ + void exitRange(FunctionCraftParser.RangeContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#filterStatement}. + * @param ctx the parse tree + */ + void enterFilterStatement(FunctionCraftParser.FilterStatementContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#filterStatement}. + * @param ctx the parse tree + */ + void exitFilterStatement(FunctionCraftParser.FilterStatementContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#matchPatternStatement}. + * @param ctx the parse tree + */ + void enterMatchPatternStatement(FunctionCraftParser.MatchPatternStatementContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#matchPatternStatement}. + * @param ctx the parse tree + */ + void exitMatchPatternStatement(FunctionCraftParser.MatchPatternStatementContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#chopStatement}. + * @param ctx the parse tree + */ + void enterChopStatement(FunctionCraftParser.ChopStatementContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#chopStatement}. + * @param ctx the parse tree + */ + void exitChopStatement(FunctionCraftParser.ChopStatementContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#chompStatement}. + * @param ctx the parse tree + */ + void enterChompStatement(FunctionCraftParser.ChompStatementContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#chompStatement}. + * @param ctx the parse tree + */ + void exitChompStatement(FunctionCraftParser.ChompStatementContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#assignment}. + * @param ctx the parse tree + */ + void enterAssignment(FunctionCraftParser.AssignmentContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#assignment}. + * @param ctx the parse tree + */ + void exitAssignment(FunctionCraftParser.AssignmentContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#accessList}. + * @param ctx the parse tree + */ + void enterAccessList(FunctionCraftParser.AccessListContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#accessList}. + * @param ctx the parse tree + */ + void exitAccessList(FunctionCraftParser.AccessListContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#statement}. + * @param ctx the parse tree + */ + void enterStatement(FunctionCraftParser.StatementContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#statement}. + * @param ctx the parse tree + */ + void exitStatement(FunctionCraftParser.StatementContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#body}. + * @param ctx the parse tree + */ + void enterBody(FunctionCraftParser.BodyContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#body}. + * @param ctx the parse tree + */ + void exitBody(FunctionCraftParser.BodyContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#expression}. + * @param ctx the parse tree + */ + void enterExpression(FunctionCraftParser.ExpressionContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#expression}. + * @param ctx the parse tree + */ + void exitExpression(FunctionCraftParser.ExpressionContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#eqaulityExpression}. + * @param ctx the parse tree + */ + void enterEqaulityExpression(FunctionCraftParser.EqaulityExpressionContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#eqaulityExpression}. + * @param ctx the parse tree + */ + void exitEqaulityExpression(FunctionCraftParser.EqaulityExpressionContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#relationalExpression}. + * @param ctx the parse tree + */ + void enterRelationalExpression(FunctionCraftParser.RelationalExpressionContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#relationalExpression}. + * @param ctx the parse tree + */ + void exitRelationalExpression(FunctionCraftParser.RelationalExpressionContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#additiveExpression}. + * @param ctx the parse tree + */ + void enterAdditiveExpression(FunctionCraftParser.AdditiveExpressionContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#additiveExpression}. + * @param ctx the parse tree + */ + void exitAdditiveExpression(FunctionCraftParser.AdditiveExpressionContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#multiplicativeExpression}. + * @param ctx the parse tree + */ + void enterMultiplicativeExpression(FunctionCraftParser.MultiplicativeExpressionContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#multiplicativeExpression}. + * @param ctx the parse tree + */ + void exitMultiplicativeExpression(FunctionCraftParser.MultiplicativeExpressionContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#preUnaryExpression}. + * @param ctx the parse tree + */ + void enterPreUnaryExpression(FunctionCraftParser.PreUnaryExpressionContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#preUnaryExpression}. + * @param ctx the parse tree + */ + void exitPreUnaryExpression(FunctionCraftParser.PreUnaryExpressionContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#accessExpression}. + * @param ctx the parse tree + */ + void enterAccessExpression(FunctionCraftParser.AccessExpressionContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#accessExpression}. + * @param ctx the parse tree + */ + void exitAccessExpression(FunctionCraftParser.AccessExpressionContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#otherExpression}. + * @param ctx the parse tree + */ + void enterOtherExpression(FunctionCraftParser.OtherExpressionContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#otherExpression}. + * @param ctx the parse tree + */ + void exitOtherExpression(FunctionCraftParser.OtherExpressionContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#lambdaFunction}. + * @param ctx the parse tree + */ + void enterLambdaFunction(FunctionCraftParser.LambdaFunctionContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#lambdaFunction}. + * @param ctx the parse tree + */ + void exitLambdaFunction(FunctionCraftParser.LambdaFunctionContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#values}. + * @param ctx the parse tree + */ + void enterValues(FunctionCraftParser.ValuesContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#values}. + * @param ctx the parse tree + */ + void exitValues(FunctionCraftParser.ValuesContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#listValue}. + * @param ctx the parse tree + */ + void enterListValue(FunctionCraftParser.ListValueContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#listValue}. + * @param ctx the parse tree + */ + void exitListValue(FunctionCraftParser.ListValueContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#boolValue}. + * @param ctx the parse tree + */ + void enterBoolValue(FunctionCraftParser.BoolValueContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#boolValue}. + * @param ctx the parse tree + */ + void exitBoolValue(FunctionCraftParser.BoolValueContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#functionPointer}. + * @param ctx the parse tree + */ + void enterFunctionPointer(FunctionCraftParser.FunctionPointerContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#functionPointer}. + * @param ctx the parse tree + */ + void exitFunctionPointer(FunctionCraftParser.FunctionPointerContext ctx); +} \ No newline at end of file diff --git a/Phase2Template/Phase2/src/parsers/FunctionCraftParser.java b/Phase2Template/Phase2/src/parsers/FunctionCraftParser.java new file mode 100644 index 0000000..af773b7 --- /dev/null +++ b/Phase2Template/Phase2/src/parsers/FunctionCraftParser.java @@ -0,0 +1,4437 @@ +// Generated from U:/UT/6/PLC_TA/Design-Compiler-Course-Projects/Phase2Template/Phase2/src/main/grammar/FunctionCraft.g4 by ANTLR 4.13.1 +package parsers; + + import main.ast.nodes.*; + import main.ast.nodes.declaration.*; + import main.ast.nodes.statement.*; + import main.ast.nodes.expression.*; + import main.ast.nodes.expression.operators.*; + import main.ast.nodes.expression.value.*; + import main.ast.nodes.expression.value.primitive.*; + +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.misc.*; +import org.antlr.v4.runtime.tree.*; +import java.util.List; +import java.util.Iterator; +import java.util.ArrayList; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast", "CheckReturnValue"}) +public class FunctionCraftParser extends Parser { + static { RuntimeMetaData.checkVersion("4.13.1", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + DEF=1, END=2, MAIN=3, PUTS=4, PUSH=5, LEN=6, RETURN=7, IF=8, ELSE=9, ELSEIF=10, + METHOD=11, PATTERN=12, MATCH=13, LOOP=14, FOR=15, IN=16, DO=17, CHOP=18, + CHOMP=19, PLUS=20, MINUS=21, MULT=22, DIVIDE=23, EQUAL=24, NOT_EQUAL=25, + LESS_EQUAL_THAN=26, GREATER_EQUAL_THAN=27, GREATER_THAN=28, LESS_THAN=29, + AND=30, OR=31, NOT=32, INCREMENT=33, DECREMENT=34, PATTERN_MATCHING_SEPARATOR=35, + SEPARATOR=36, APPEND=37, TRUE=38, FALSE=39, BREAK=40, NEXT=41, ARROW=42, + PLUS_ASSIGN=43, MINUS_ASSIGN=44, MULT_ASSIGN=45, DIVIDE_ASSIGN=46, MOD_ASSIGN=47, + ASSIGN=48, LPAR=49, RPAR=50, LBRACK=51, RBRACK=52, LBRACE=53, RBRACE=54, + COMMA=55, DOT=56, DOUBLEDOT=57, COLON=58, SEMICOLLON=59, INT_VALUE=60, + FLOAT_VALUE=61, IDENTIFIER=62, STRING_VALUE=63, COMMENT=64, WS=65; + public static final int + RULE_program = 0, RULE_functionDeclaration = 1, RULE_functionArgumentsDeclaration = 2, + RULE_patternMatching = 3, RULE_main = 4, RULE_functionArguments = 5, RULE_returnStatement = 6, + RULE_ifStatement = 7, RULE_condition = 8, RULE_putsStatement = 9, RULE_lenStatement = 10, + RULE_pushStatement = 11, RULE_loopDoStatement = 12, RULE_loopBody = 13, + RULE_forStatement = 14, RULE_range = 15, RULE_filterStatement = 16, RULE_matchPatternStatement = 17, + RULE_chopStatement = 18, RULE_chompStatement = 19, RULE_assignment = 20, + RULE_accessList = 21, RULE_statement = 22, RULE_body = 23, RULE_expression = 24, + RULE_eqaulityExpression = 25, RULE_relationalExpression = 26, RULE_additiveExpression = 27, + RULE_multiplicativeExpression = 28, RULE_preUnaryExpression = 29, RULE_accessExpression = 30, + RULE_otherExpression = 31, RULE_lambdaFunction = 32, RULE_values = 33, + RULE_listValue = 34, RULE_boolValue = 35, RULE_functionPointer = 36; + private static String[] makeRuleNames() { + return new String[] { + "program", "functionDeclaration", "functionArgumentsDeclaration", "patternMatching", + "main", "functionArguments", "returnStatement", "ifStatement", "condition", + "putsStatement", "lenStatement", "pushStatement", "loopDoStatement", + "loopBody", "forStatement", "range", "filterStatement", "matchPatternStatement", + "chopStatement", "chompStatement", "assignment", "accessList", "statement", + "body", "expression", "eqaulityExpression", "relationalExpression", "additiveExpression", + "multiplicativeExpression", "preUnaryExpression", "accessExpression", + "otherExpression", "lambdaFunction", "values", "listValue", "boolValue", + "functionPointer" + }; + } + public static final String[] ruleNames = makeRuleNames(); + + private static String[] makeLiteralNames() { + return new String[] { + null, "'def'", "'end'", "'main'", "'puts'", "'push'", "'len'", "'return'", + "'if'", "'else'", "'elseif'", "'method'", "'pattern'", "'match'", "'loop'", + "'for'", "'in'", "'do'", "'chop'", "'chomp'", "'+'", "'-'", "'*'", "'/'", + "'=='", "'!='", "'<='", "'>='", "'>'", "'<'", "'&&'", "'||'", "'!'", + "'++'", "'--'", "' |'", "'|'", "'<<'", "'true'", "'false'", "'break'", + "'next'", "'->'", "'+='", "'-='", "'*='", "'/='", "'%='", "'='", "'('", + "')'", "'['", "']'", "'{'", "'}'", "','", "'.'", "'..'", "':'", "';'" + }; + } + private static final String[] _LITERAL_NAMES = makeLiteralNames(); + private static String[] makeSymbolicNames() { + return new String[] { + null, "DEF", "END", "MAIN", "PUTS", "PUSH", "LEN", "RETURN", "IF", "ELSE", + "ELSEIF", "METHOD", "PATTERN", "MATCH", "LOOP", "FOR", "IN", "DO", "CHOP", + "CHOMP", "PLUS", "MINUS", "MULT", "DIVIDE", "EQUAL", "NOT_EQUAL", "LESS_EQUAL_THAN", + "GREATER_EQUAL_THAN", "GREATER_THAN", "LESS_THAN", "AND", "OR", "NOT", + "INCREMENT", "DECREMENT", "PATTERN_MATCHING_SEPARATOR", "SEPARATOR", + "APPEND", "TRUE", "FALSE", "BREAK", "NEXT", "ARROW", "PLUS_ASSIGN", "MINUS_ASSIGN", + "MULT_ASSIGN", "DIVIDE_ASSIGN", "MOD_ASSIGN", "ASSIGN", "LPAR", "RPAR", + "LBRACK", "RBRACK", "LBRACE", "RBRACE", "COMMA", "DOT", "DOUBLEDOT", + "COLON", "SEMICOLLON", "INT_VALUE", "FLOAT_VALUE", "IDENTIFIER", "STRING_VALUE", + "COMMENT", "WS" + }; + } + private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames(); + public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); + + /** + * @deprecated Use {@link #VOCABULARY} instead. + */ + @Deprecated + public static final String[] tokenNames; + static { + tokenNames = new String[_SYMBOLIC_NAMES.length]; + for (int i = 0; i < tokenNames.length; i++) { + tokenNames[i] = VOCABULARY.getLiteralName(i); + if (tokenNames[i] == null) { + tokenNames[i] = VOCABULARY.getSymbolicName(i); + } + + if (tokenNames[i] == null) { + tokenNames[i] = ""; + } + } + } + + @Override + @Deprecated + public String[] getTokenNames() { + return tokenNames; + } + + @Override + + public Vocabulary getVocabulary() { + return VOCABULARY; + } + + @Override + public String getGrammarFileName() { return "FunctionCraft.g4"; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public ATN getATN() { return _ATN; } + + public FunctionCraftParser(TokenStream input) { + super(input); + _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + + @SuppressWarnings("CheckReturnValue") + public static class ProgramContext extends ParserRuleContext { + public Program flProgram; + public FunctionDeclarationContext f; + public PatternMatchingContext p; + public MainContext m; + public MainContext main() { + return getRuleContext(MainContext.class,0); + } + public List functionDeclaration() { + return getRuleContexts(FunctionDeclarationContext.class); + } + public FunctionDeclarationContext functionDeclaration(int i) { + return getRuleContext(FunctionDeclarationContext.class,i); + } + public List patternMatching() { + return getRuleContexts(PatternMatchingContext.class); + } + public PatternMatchingContext patternMatching(int i) { + return getRuleContext(PatternMatchingContext.class,i); + } + public ProgramContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_program; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterProgram(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitProgram(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitProgram(this); + else return visitor.visitChildren(this); + } + } + + public final ProgramContext program() throws RecognitionException { + ProgramContext _localctx = new ProgramContext(_ctx, getState()); + enterRule(_localctx, 0, RULE_program); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + + ((ProgramContext)_localctx).flProgram = new Program(); + _localctx.flProgram.setLine(1); + + setState(83); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,1,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + setState(81); + _errHandler.sync(this); + switch (_input.LA(1)) { + case DEF: + { + setState(75); + ((ProgramContext)_localctx).f = functionDeclaration(); + _localctx.flProgram.addFunctionDeclaration(((ProgramContext)_localctx).f.functionDeclarationRet); + } + break; + case PATTERN: + { + setState(78); + ((ProgramContext)_localctx).p = patternMatching(); + _localctx.flProgram.addPatternDeclaration(((ProgramContext)_localctx).p.patternRet); + } + break; + default: + throw new NoViableAltException(this); + } + } + } + setState(85); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,1,_ctx); + } + setState(86); + ((ProgramContext)_localctx).m = main(); + _localctx.flProgram.setMain(((ProgramContext)_localctx).m.mainRet); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class FunctionDeclarationContext extends ParserRuleContext { + public FunctionDeclaration functionDeclarationRet; + public Token def; + public Token id; + public FunctionArgumentsDeclarationContext f; + public BodyContext b; + public TerminalNode END() { return getToken(FunctionCraftParser.END, 0); } + public TerminalNode DEF() { return getToken(FunctionCraftParser.DEF, 0); } + public TerminalNode IDENTIFIER() { return getToken(FunctionCraftParser.IDENTIFIER, 0); } + public FunctionArgumentsDeclarationContext functionArgumentsDeclaration() { + return getRuleContext(FunctionArgumentsDeclarationContext.class,0); + } + public BodyContext body() { + return getRuleContext(BodyContext.class,0); + } + public FunctionDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_functionDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterFunctionDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitFunctionDeclaration(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitFunctionDeclaration(this); + else return visitor.visitChildren(this); + } + } + + public final FunctionDeclarationContext functionDeclaration() throws RecognitionException { + FunctionDeclarationContext _localctx = new FunctionDeclarationContext(_ctx, getState()); + enterRule(_localctx, 2, RULE_functionDeclaration); + try { + enterOuterAlt(_localctx, 1); + { + + ((FunctionDeclarationContext)_localctx).functionDeclarationRet = new FunctionDeclaration(); + + setState(90); + ((FunctionDeclarationContext)_localctx).def = match(DEF); + _localctx.functionDeclarationRet.setLine((((FunctionDeclarationContext)_localctx).def!=null?((FunctionDeclarationContext)_localctx).def.getLine():0)); + setState(92); + ((FunctionDeclarationContext)_localctx).id = match(IDENTIFIER); + + Identifier id_ = new Identifier((((FunctionDeclarationContext)_localctx).id!=null?((FunctionDeclarationContext)_localctx).id.getText():null)); + id_.setLine((((FunctionDeclarationContext)_localctx).id!=null?((FunctionDeclarationContext)_localctx).id.getLine():0)); + _localctx.functionDeclarationRet.setFunctionName(id_); + _localctx.functionDeclarationRet.setLine((((FunctionDeclarationContext)_localctx).def!=null?((FunctionDeclarationContext)_localctx).def.getLine():0)); + + setState(94); + ((FunctionDeclarationContext)_localctx).f = functionArgumentsDeclaration(); + _localctx.functionDeclarationRet.setArgs(((FunctionDeclarationContext)_localctx).f.argRet); + setState(96); + ((FunctionDeclarationContext)_localctx).b = body(); + _localctx.functionDeclarationRet.setBody(((FunctionDeclarationContext)_localctx).b.bodyRet); + setState(98); + match(END); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class FunctionArgumentsDeclarationContext extends ParserRuleContext { + public ArrayList argRet; + public Token id1; + public Token id2; + public Token id3; + public ExpressionContext e1; + public Token id4; + public ExpressionContext e2; + public TerminalNode LPAR() { return getToken(FunctionCraftParser.LPAR, 0); } + public TerminalNode RPAR() { return getToken(FunctionCraftParser.RPAR, 0); } + public List IDENTIFIER() { return getTokens(FunctionCraftParser.IDENTIFIER); } + public TerminalNode IDENTIFIER(int i) { + return getToken(FunctionCraftParser.IDENTIFIER, i); + } + public List COMMA() { return getTokens(FunctionCraftParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(FunctionCraftParser.COMMA, i); + } + public TerminalNode LBRACK() { return getToken(FunctionCraftParser.LBRACK, 0); } + public List ASSIGN() { return getTokens(FunctionCraftParser.ASSIGN); } + public TerminalNode ASSIGN(int i) { + return getToken(FunctionCraftParser.ASSIGN, i); + } + public TerminalNode RBRACK() { return getToken(FunctionCraftParser.RBRACK, 0); } + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public FunctionArgumentsDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_functionArgumentsDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterFunctionArgumentsDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitFunctionArgumentsDeclaration(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitFunctionArgumentsDeclaration(this); + else return visitor.visitChildren(this); + } + } + + public final FunctionArgumentsDeclarationContext functionArgumentsDeclaration() throws RecognitionException { + FunctionArgumentsDeclarationContext _localctx = new FunctionArgumentsDeclarationContext(_ctx, getState()); + enterRule(_localctx, 4, RULE_functionArgumentsDeclaration); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + + ((FunctionArgumentsDeclarationContext)_localctx).argRet = new ArrayList(); + + setState(101); + match(LPAR); + setState(135); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==IDENTIFIER) { + { + setState(102); + ((FunctionArgumentsDeclarationContext)_localctx).id1 = match(IDENTIFIER); + + Identifier id_ = new Identifier((((FunctionArgumentsDeclarationContext)_localctx).id1!=null?((FunctionArgumentsDeclarationContext)_localctx).id1.getText():null)); + id_.setLine((((FunctionArgumentsDeclarationContext)_localctx).id1!=null?((FunctionArgumentsDeclarationContext)_localctx).id1.getLine():0)); + VarDeclaration newVarDec = new VarDeclaration(id_); + newVarDec.setLine((((FunctionArgumentsDeclarationContext)_localctx).id1!=null?((FunctionArgumentsDeclarationContext)_localctx).id1.getLine():0)); + _localctx.argRet.add(newVarDec); + + setState(109); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,2,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(104); + match(COMMA); + setState(105); + ((FunctionArgumentsDeclarationContext)_localctx).id2 = match(IDENTIFIER); + + Identifier id_2 = new Identifier((((FunctionArgumentsDeclarationContext)_localctx).id2!=null?((FunctionArgumentsDeclarationContext)_localctx).id2.getText():null)); + id_2.setLine((((FunctionArgumentsDeclarationContext)_localctx).id2!=null?((FunctionArgumentsDeclarationContext)_localctx).id2.getLine():0)); + VarDeclaration newVarDec2 = new VarDeclaration(id_2); + newVarDec2.setLine((((FunctionArgumentsDeclarationContext)_localctx).id2!=null?((FunctionArgumentsDeclarationContext)_localctx).id2.getLine():0)); + _localctx.argRet.add(newVarDec2); + + } + } + } + setState(111); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,2,_ctx); + } + setState(133); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(112); + match(COMMA); + setState(113); + match(LBRACK); + setState(114); + ((FunctionArgumentsDeclarationContext)_localctx).id3 = match(IDENTIFIER); + + Identifier id_3 = new Identifier((((FunctionArgumentsDeclarationContext)_localctx).id3!=null?((FunctionArgumentsDeclarationContext)_localctx).id3.getText():null)); + id_3.setLine((((FunctionArgumentsDeclarationContext)_localctx).id3!=null?((FunctionArgumentsDeclarationContext)_localctx).id3.getLine():0)); + VarDeclaration newVarDec3 = new VarDeclaration(id_3); + newVarDec3.setLine((((FunctionArgumentsDeclarationContext)_localctx).id3!=null?((FunctionArgumentsDeclarationContext)_localctx).id3.getLine():0)); + + setState(116); + match(ASSIGN); + setState(117); + ((FunctionArgumentsDeclarationContext)_localctx).e1 = expression(0); + + newVarDec3.setDefaultVal(((FunctionArgumentsDeclarationContext)_localctx).e1.expRet); + _localctx.argRet.add(newVarDec3); + + setState(128); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(119); + match(COMMA); + setState(120); + ((FunctionArgumentsDeclarationContext)_localctx).id4 = match(IDENTIFIER); + + Identifier id_4 = new Identifier((((FunctionArgumentsDeclarationContext)_localctx).id4!=null?((FunctionArgumentsDeclarationContext)_localctx).id4.getText():null)); + id_4.setLine((((FunctionArgumentsDeclarationContext)_localctx).id4!=null?((FunctionArgumentsDeclarationContext)_localctx).id4.getLine():0)); + VarDeclaration newVarDec4 = new VarDeclaration(id_4); + newVarDec4.setLine((((FunctionArgumentsDeclarationContext)_localctx).id4!=null?((FunctionArgumentsDeclarationContext)_localctx).id4.getLine():0)); + + setState(122); + match(ASSIGN); + setState(123); + ((FunctionArgumentsDeclarationContext)_localctx).e2 = expression(0); + + newVarDec4.setDefaultVal(((FunctionArgumentsDeclarationContext)_localctx).e2.expRet); + _localctx.argRet.add(newVarDec4); + + } + } + setState(130); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(131); + match(RBRACK); + } + } + + } + } + + setState(137); + match(RPAR); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class PatternMatchingContext extends ParserRuleContext { + public PatternDeclaration patternRet; + public Token pat; + public Token patternName; + public Token targetVar; + public ConditionContext c; + public ExpressionContext e; + public TerminalNode LPAR() { return getToken(FunctionCraftParser.LPAR, 0); } + public TerminalNode RPAR() { return getToken(FunctionCraftParser.RPAR, 0); } + public TerminalNode SEMICOLLON() { return getToken(FunctionCraftParser.SEMICOLLON, 0); } + public TerminalNode PATTERN() { return getToken(FunctionCraftParser.PATTERN, 0); } + public List IDENTIFIER() { return getTokens(FunctionCraftParser.IDENTIFIER); } + public TerminalNode IDENTIFIER(int i) { + return getToken(FunctionCraftParser.IDENTIFIER, i); + } + public List PATTERN_MATCHING_SEPARATOR() { return getTokens(FunctionCraftParser.PATTERN_MATCHING_SEPARATOR); } + public TerminalNode PATTERN_MATCHING_SEPARATOR(int i) { + return getToken(FunctionCraftParser.PATTERN_MATCHING_SEPARATOR, i); + } + public List ASSIGN() { return getTokens(FunctionCraftParser.ASSIGN); } + public TerminalNode ASSIGN(int i) { + return getToken(FunctionCraftParser.ASSIGN, i); + } + public List condition() { + return getRuleContexts(ConditionContext.class); + } + public ConditionContext condition(int i) { + return getRuleContext(ConditionContext.class,i); + } + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public PatternMatchingContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_patternMatching; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterPatternMatching(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitPatternMatching(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitPatternMatching(this); + else return visitor.visitChildren(this); + } + } + + public final PatternMatchingContext patternMatching() throws RecognitionException { + PatternMatchingContext _localctx = new PatternMatchingContext(_ctx, getState()); + enterRule(_localctx, 6, RULE_patternMatching); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(139); + ((PatternMatchingContext)_localctx).pat = match(PATTERN); + + int patternLine = (((PatternMatchingContext)_localctx).pat!=null?((PatternMatchingContext)_localctx).pat.getLine():0); + + setState(141); + ((PatternMatchingContext)_localctx).patternName = match(IDENTIFIER); + + Identifier patternNameId = new Identifier((((PatternMatchingContext)_localctx).patternName!=null?((PatternMatchingContext)_localctx).patternName.getText():null)); + patternNameId.setLine((((PatternMatchingContext)_localctx).patternName!=null?((PatternMatchingContext)_localctx).patternName.getLine():0)); + + setState(143); + match(LPAR); + setState(144); + ((PatternMatchingContext)_localctx).targetVar = match(IDENTIFIER); + + Identifier targetVariable = new Identifier((((PatternMatchingContext)_localctx).targetVar!=null?((PatternMatchingContext)_localctx).targetVar.getText():null)); + targetVariable.setLine((((PatternMatchingContext)_localctx).targetVar!=null?((PatternMatchingContext)_localctx).targetVar.getLine():0)); + ((PatternMatchingContext)_localctx).patternRet = new PatternDeclaration(patternNameId, targetVariable); + _localctx.patternRet.setLine(patternLine); + + setState(146); + match(RPAR); + setState(156); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==PATTERN_MATCHING_SEPARATOR) { + { + { + setState(147); + match(PATTERN_MATCHING_SEPARATOR); + setState(148); + ((PatternMatchingContext)_localctx).c = condition(); + + _localctx.patternRet.setConditions(((PatternMatchingContext)_localctx).c.conditionRet); + + setState(150); + match(ASSIGN); + setState(151); + ((PatternMatchingContext)_localctx).e = expression(0); + + _localctx.patternRet.addReturnExp(((PatternMatchingContext)_localctx).e.expRet); + + } + } + setState(158); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(159); + match(SEMICOLLON); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class MainContext extends ParserRuleContext { + public MainDeclaration mainRet; + public Token m; + public BodyContext b; + public TerminalNode DEF() { return getToken(FunctionCraftParser.DEF, 0); } + public TerminalNode LPAR() { return getToken(FunctionCraftParser.LPAR, 0); } + public TerminalNode RPAR() { return getToken(FunctionCraftParser.RPAR, 0); } + public TerminalNode END() { return getToken(FunctionCraftParser.END, 0); } + public TerminalNode MAIN() { return getToken(FunctionCraftParser.MAIN, 0); } + public BodyContext body() { + return getRuleContext(BodyContext.class,0); + } + public MainContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_main; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterMain(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitMain(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitMain(this); + else return visitor.visitChildren(this); + } + } + + public final MainContext main() throws RecognitionException { + MainContext _localctx = new MainContext(_ctx, getState()); + enterRule(_localctx, 8, RULE_main); + try { + enterOuterAlt(_localctx, 1); + { + + ((MainContext)_localctx).mainRet = new MainDeclaration(); + + setState(162); + match(DEF); + setState(163); + ((MainContext)_localctx).m = match(MAIN); + + _localctx.mainRet.setLine((((MainContext)_localctx).m!=null?((MainContext)_localctx).m.getLine():0)); + + setState(165); + match(LPAR); + setState(166); + match(RPAR); + setState(167); + ((MainContext)_localctx).b = body(); + _localctx.mainRet.setBody(((MainContext)_localctx).b.bodyRet); + setState(169); + match(END); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class FunctionArgumentsContext extends ParserRuleContext { + public ArrayList funcArgsRet; + public ExpressionContext e1; + public ExpressionContext e2; + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public List COMMA() { return getTokens(FunctionCraftParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(FunctionCraftParser.COMMA, i); + } + public FunctionArgumentsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_functionArguments; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterFunctionArguments(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitFunctionArguments(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitFunctionArguments(this); + else return visitor.visitChildren(this); + } + } + + public final FunctionArgumentsContext functionArguments() throws RecognitionException { + FunctionArgumentsContext _localctx = new FunctionArgumentsContext(_ctx, getState()); + enterRule(_localctx, 10, RULE_functionArguments); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + + ((FunctionArgumentsContext)_localctx).funcArgsRet = new ArrayList(); + + setState(183); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & -1150101502091851712L) != 0)) { + { + setState(172); + ((FunctionArgumentsContext)_localctx).e1 = expression(0); + + _localctx.funcArgsRet.add(((FunctionArgumentsContext)_localctx).e1.expRet); + + setState(180); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(174); + match(COMMA); + setState(175); + ((FunctionArgumentsContext)_localctx).e2 = expression(0); + + _localctx.funcArgsRet.add(((FunctionArgumentsContext)_localctx).e2.expRet); + + } + } + setState(182); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class ReturnStatementContext extends ParserRuleContext { + public ReturnStatement returnStmtRet; + public Token r; + public ExpressionContext e; + public TerminalNode SEMICOLLON() { return getToken(FunctionCraftParser.SEMICOLLON, 0); } + public TerminalNode RETURN() { return getToken(FunctionCraftParser.RETURN, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public ReturnStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_returnStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterReturnStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitReturnStatement(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitReturnStatement(this); + else return visitor.visitChildren(this); + } + } + + public final ReturnStatementContext returnStatement() throws RecognitionException { + ReturnStatementContext _localctx = new ReturnStatementContext(_ctx, getState()); + enterRule(_localctx, 12, RULE_returnStatement); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + + ((ReturnStatementContext)_localctx).returnStmtRet = new ReturnStatement(); + + setState(186); + ((ReturnStatementContext)_localctx).r = match(RETURN); + setState(190); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & -1150101502091851712L) != 0)) { + { + setState(187); + ((ReturnStatementContext)_localctx).e = expression(0); + + _localctx.returnStmtRet.setReturnExp(((ReturnStatementContext)_localctx).e.expRet); + + } + } + + _localctx.returnStmtRet.setLine((((ReturnStatementContext)_localctx).r!=null?((ReturnStatementContext)_localctx).r.getLine():0)); + setState(193); + match(SEMICOLLON); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class IfStatementContext extends ParserRuleContext { + public IfStatement ifRet; + public Token i; + public ConditionContext c1; + public ConditionContext c2; + public LoopBodyContext b; + public LoopBodyContext b1; + public LoopBodyContext b2; + public TerminalNode END() { return getToken(FunctionCraftParser.END, 0); } + public TerminalNode IF() { return getToken(FunctionCraftParser.IF, 0); } + public List loopBody() { + return getRuleContexts(LoopBodyContext.class); + } + public LoopBodyContext loopBody(int i) { + return getRuleContext(LoopBodyContext.class,i); + } + public List LPAR() { return getTokens(FunctionCraftParser.LPAR); } + public TerminalNode LPAR(int i) { + return getToken(FunctionCraftParser.LPAR, i); + } + public List RPAR() { return getTokens(FunctionCraftParser.RPAR); } + public TerminalNode RPAR(int i) { + return getToken(FunctionCraftParser.RPAR, i); + } + public List condition() { + return getRuleContexts(ConditionContext.class); + } + public ConditionContext condition(int i) { + return getRuleContext(ConditionContext.class,i); + } + public List ELSEIF() { return getTokens(FunctionCraftParser.ELSEIF); } + public TerminalNode ELSEIF(int i) { + return getToken(FunctionCraftParser.ELSEIF, i); + } + public TerminalNode ELSE() { return getToken(FunctionCraftParser.ELSE, 0); } + public IfStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_ifStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterIfStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitIfStatement(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitIfStatement(this); + else return visitor.visitChildren(this); + } + } + + public final IfStatementContext ifStatement() throws RecognitionException { + IfStatementContext _localctx = new IfStatementContext(_ctx, getState()); + enterRule(_localctx, 14, RULE_ifStatement); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + + ((IfStatementContext)_localctx).ifRet = new IfStatement(); + ArrayList tempThenStmts = new ArrayList<>(); + ArrayList tempElseStmts = new ArrayList<>(); + + setState(196); + ((IfStatementContext)_localctx).i = match(IF); + + _localctx.ifRet.setLine((((IfStatementContext)_localctx).i!=null?((IfStatementContext)_localctx).i.getLine():0)); + + setState(206); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,10,_ctx) ) { + case 1: + { + setState(198); + ((IfStatementContext)_localctx).c1 = condition(); + _localctx.ifRet.addCondition(((IfStatementContext)_localctx).c1.conditionRet); + } + break; + case 2: + { + setState(201); + match(LPAR); + setState(202); + ((IfStatementContext)_localctx).c2 = condition(); + setState(203); + match(RPAR); + _localctx.ifRet.addCondition(((IfStatementContext)_localctx).c2.conditionRet); + } + break; + } + setState(208); + ((IfStatementContext)_localctx).b = loopBody(); + + tempThenStmts.addAll(((IfStatementContext)_localctx).b.loopStmts); + _localctx.ifRet.addCondition(((IfStatementContext)_localctx).b.loopExps); + if(((IfStatementContext)_localctx).b.loopRetStmt != null){ + tempThenStmts.add(((IfStatementContext)_localctx).b.loopRetStmt); + } + + setState(224); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==ELSEIF) { + { + { + setState(210); + match(ELSEIF); + setState(216); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,11,_ctx) ) { + case 1: + { + setState(211); + match(LPAR); + setState(212); + ((IfStatementContext)_localctx).c2 = condition(); + setState(213); + match(RPAR); + } + break; + case 2: + { + setState(215); + ((IfStatementContext)_localctx).c2 = condition(); + } + break; + } + + _localctx.ifRet.addCondition(((IfStatementContext)_localctx).c2.conditionRet); + + setState(219); + ((IfStatementContext)_localctx).b1 = loopBody(); + + tempElseStmts.addAll(((IfStatementContext)_localctx).b1.loopStmts); + _localctx.ifRet.addCondition(((IfStatementContext)_localctx).b1.loopExps); + if(((IfStatementContext)_localctx).b1.loopRetStmt != null){ + tempThenStmts.add(((IfStatementContext)_localctx).b1.loopRetStmt); + } + + } + } + setState(226); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(231); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==ELSE) { + { + setState(227); + match(ELSE); + setState(228); + ((IfStatementContext)_localctx).b2 = loopBody(); + + tempElseStmts.addAll(((IfStatementContext)_localctx).b2.loopStmts); + _localctx.ifRet.addCondition(((IfStatementContext)_localctx).b2.loopExps); + if(((IfStatementContext)_localctx).b2.loopRetStmt != null){ + tempThenStmts.add(((IfStatementContext)_localctx).b2.loopRetStmt); + } + + } + } + + + _localctx.ifRet.setThenBody(tempThenStmts); + _localctx.ifRet.setElseBody(tempElseStmts); + + setState(234); + match(END); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class ConditionContext extends ParserRuleContext { + public ArrayList conditionRet; + public ExpressionContext e; + public ConditionContext c; + public List LPAR() { return getTokens(FunctionCraftParser.LPAR); } + public TerminalNode LPAR(int i) { + return getToken(FunctionCraftParser.LPAR, i); + } + public List RPAR() { return getTokens(FunctionCraftParser.RPAR); } + public TerminalNode RPAR(int i) { + return getToken(FunctionCraftParser.RPAR, i); + } + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public List AND() { return getTokens(FunctionCraftParser.AND); } + public TerminalNode AND(int i) { + return getToken(FunctionCraftParser.AND, i); + } + public List OR() { return getTokens(FunctionCraftParser.OR); } + public TerminalNode OR(int i) { + return getToken(FunctionCraftParser.OR, i); + } + public List condition() { + return getRuleContexts(ConditionContext.class); + } + public ConditionContext condition(int i) { + return getRuleContext(ConditionContext.class,i); + } + public ConditionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_condition; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterCondition(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitCondition(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitCondition(this); + else return visitor.visitChildren(this); + } + } + + public final ConditionContext condition() throws RecognitionException { + ConditionContext _localctx = new ConditionContext(_ctx, getState()); + enterRule(_localctx, 16, RULE_condition); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + + ((ConditionContext)_localctx).conditionRet = new ArrayList(); + + setState(257); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,17,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(237); + match(LPAR); + setState(238); + ((ConditionContext)_localctx).e = expression(0); + _localctx.conditionRet.add(((ConditionContext)_localctx).e.expRet); + setState(240); + match(RPAR); + setState(252); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,16,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(241); + _la = _input.LA(1); + if ( !(_la==AND || _la==OR) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(243); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,14,_ctx) ) { + case 1: + { + setState(242); + match(LPAR); + } + break; + } + setState(245); + ((ConditionContext)_localctx).c = condition(); + + _localctx.conditionRet.addAll(((ConditionContext)_localctx).c.conditionRet); + + setState(248); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,15,_ctx) ) { + case 1: + { + setState(247); + match(RPAR); + } + break; + } + } + } + } + setState(254); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,16,_ctx); + } + } + } + } + setState(259); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,17,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class PutsStatementContext extends ParserRuleContext { + public PutStatement putRet; + public Token p; + public ExpressionContext e; + public TerminalNode LPAR() { return getToken(FunctionCraftParser.LPAR, 0); } + public TerminalNode RPAR() { return getToken(FunctionCraftParser.RPAR, 0); } + public TerminalNode SEMICOLLON() { return getToken(FunctionCraftParser.SEMICOLLON, 0); } + public TerminalNode PUTS() { return getToken(FunctionCraftParser.PUTS, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public PutsStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_putsStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterPutsStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitPutsStatement(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitPutsStatement(this); + else return visitor.visitChildren(this); + } + } + + public final PutsStatementContext putsStatement() throws RecognitionException { + PutsStatementContext _localctx = new PutsStatementContext(_ctx, getState()); + enterRule(_localctx, 18, RULE_putsStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(260); + ((PutsStatementContext)_localctx).p = match(PUTS); + setState(261); + match(LPAR); + setState(262); + ((PutsStatementContext)_localctx).e = expression(0); + + ((PutsStatementContext)_localctx).putRet = new PutStatement(((PutsStatementContext)_localctx).e.expRet); + _localctx.putRet.setLine((((PutsStatementContext)_localctx).p!=null?((PutsStatementContext)_localctx).p.getLine():0)); + + setState(264); + match(RPAR); + setState(265); + match(SEMICOLLON); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class LenStatementContext extends ParserRuleContext { + public LenStatement lenRet; + public Token l; + public ExpressionContext e; + public TerminalNode LPAR() { return getToken(FunctionCraftParser.LPAR, 0); } + public TerminalNode RPAR() { return getToken(FunctionCraftParser.RPAR, 0); } + public TerminalNode LEN() { return getToken(FunctionCraftParser.LEN, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public LenStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_lenStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterLenStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitLenStatement(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitLenStatement(this); + else return visitor.visitChildren(this); + } + } + + public final LenStatementContext lenStatement() throws RecognitionException { + LenStatementContext _localctx = new LenStatementContext(_ctx, getState()); + enterRule(_localctx, 20, RULE_lenStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(267); + ((LenStatementContext)_localctx).l = match(LEN); + setState(268); + match(LPAR); + setState(269); + ((LenStatementContext)_localctx).e = expression(0); + + ((LenStatementContext)_localctx).lenRet = new LenStatement(((LenStatementContext)_localctx).e.expRet); + _localctx.lenRet.setLine((((LenStatementContext)_localctx).l!=null?((LenStatementContext)_localctx).l.getLine():0)); + + setState(271); + match(RPAR); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class PushStatementContext extends ParserRuleContext { + public PushStatement pushRet; + public Token p; + public ExpressionContext e1; + public ExpressionContext e2; + public TerminalNode LPAR() { return getToken(FunctionCraftParser.LPAR, 0); } + public TerminalNode COMMA() { return getToken(FunctionCraftParser.COMMA, 0); } + public TerminalNode RPAR() { return getToken(FunctionCraftParser.RPAR, 0); } + public TerminalNode SEMICOLLON() { return getToken(FunctionCraftParser.SEMICOLLON, 0); } + public TerminalNode PUSH() { return getToken(FunctionCraftParser.PUSH, 0); } + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public PushStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_pushStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterPushStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitPushStatement(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitPushStatement(this); + else return visitor.visitChildren(this); + } + } + + public final PushStatementContext pushStatement() throws RecognitionException { + PushStatementContext _localctx = new PushStatementContext(_ctx, getState()); + enterRule(_localctx, 22, RULE_pushStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(273); + ((PushStatementContext)_localctx).p = match(PUSH); + setState(274); + match(LPAR); + setState(275); + ((PushStatementContext)_localctx).e1 = expression(0); + setState(276); + match(COMMA); + setState(277); + ((PushStatementContext)_localctx).e2 = expression(0); + setState(278); + match(RPAR); + setState(279); + match(SEMICOLLON); + + ((PushStatementContext)_localctx).pushRet = new PushStatement(((PushStatementContext)_localctx).e1.expRet, ((PushStatementContext)_localctx).e2.expRet); + _localctx.pushRet.setLine((((PushStatementContext)_localctx).p!=null?((PushStatementContext)_localctx).p.getLine():0)); + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class LoopDoStatementContext extends ParserRuleContext { + public LoopDoStatement loopDoRet; + public Token l1; + public LoopBodyContext l2; + public TerminalNode DO() { return getToken(FunctionCraftParser.DO, 0); } + public TerminalNode END() { return getToken(FunctionCraftParser.END, 0); } + public TerminalNode LOOP() { return getToken(FunctionCraftParser.LOOP, 0); } + public LoopBodyContext loopBody() { + return getRuleContext(LoopBodyContext.class,0); + } + public LoopDoStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_loopDoStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterLoopDoStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitLoopDoStatement(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitLoopDoStatement(this); + else return visitor.visitChildren(this); + } + } + + public final LoopDoStatementContext loopDoStatement() throws RecognitionException { + LoopDoStatementContext _localctx = new LoopDoStatementContext(_ctx, getState()); + enterRule(_localctx, 24, RULE_loopDoStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(282); + ((LoopDoStatementContext)_localctx).l1 = match(LOOP); + setState(283); + match(DO); + setState(284); + ((LoopDoStatementContext)_localctx).l2 = loopBody(); + + ((LoopDoStatementContext)_localctx).loopDoRet = new LoopDoStatement(((LoopDoStatementContext)_localctx).l2.loopStmts, ((LoopDoStatementContext)_localctx).l2.loopExps, ((LoopDoStatementContext)_localctx).l2.loopRetStmt); + _localctx.loopDoRet.setLine((((LoopDoStatementContext)_localctx).l1!=null?((LoopDoStatementContext)_localctx).l1.getLine():0)); + + setState(286); + match(END); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class LoopBodyContext extends ParserRuleContext { + public ArrayList loopStmts; + public ArrayList loopExps; + public ReturnStatement loopRetStmt; + public StatementContext s; + public ConditionContext c1; + public ConditionContext c2; + public ReturnStatementContext r; + public List BREAK() { return getTokens(FunctionCraftParser.BREAK); } + public TerminalNode BREAK(int i) { + return getToken(FunctionCraftParser.BREAK, i); + } + public List SEMICOLLON() { return getTokens(FunctionCraftParser.SEMICOLLON); } + public TerminalNode SEMICOLLON(int i) { + return getToken(FunctionCraftParser.SEMICOLLON, i); + } + public List NEXT() { return getTokens(FunctionCraftParser.NEXT); } + public TerminalNode NEXT(int i) { + return getToken(FunctionCraftParser.NEXT, i); + } + public List statement() { + return getRuleContexts(StatementContext.class); + } + public StatementContext statement(int i) { + return getRuleContext(StatementContext.class,i); + } + public ReturnStatementContext returnStatement() { + return getRuleContext(ReturnStatementContext.class,0); + } + public List IF() { return getTokens(FunctionCraftParser.IF); } + public TerminalNode IF(int i) { + return getToken(FunctionCraftParser.IF, i); + } + public List condition() { + return getRuleContexts(ConditionContext.class); + } + public ConditionContext condition(int i) { + return getRuleContext(ConditionContext.class,i); + } + public LoopBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_loopBody; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterLoopBody(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitLoopBody(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitLoopBody(this); + else return visitor.visitChildren(this); + } + } + + public final LoopBodyContext loopBody() throws RecognitionException { + LoopBodyContext _localctx = new LoopBodyContext(_ctx, getState()); + enterRule(_localctx, 26, RULE_loopBody); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + + ((LoopBodyContext)_localctx).loopStmts = new ArrayList(); + ((LoopBodyContext)_localctx).loopExps = new ArrayList(); + ((LoopBodyContext)_localctx).loopRetStmt = null; + + setState(310); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & -1150098203556918928L) != 0)) { + { + setState(308); + _errHandler.sync(this); + switch (_input.LA(1)) { + case PUTS: + case PUSH: + case LEN: + case IF: + case METHOD: + case LOOP: + case FOR: + case CHOP: + case CHOMP: + case MINUS: + case NOT: + case INCREMENT: + case DECREMENT: + case TRUE: + case FALSE: + case ARROW: + case LPAR: + case LBRACK: + case INT_VALUE: + case FLOAT_VALUE: + case IDENTIFIER: + case STRING_VALUE: + { + setState(289); + ((LoopBodyContext)_localctx).s = statement(); + _localctx.loopStmts.add(((LoopBodyContext)_localctx).s.stmtRet); + } + break; + case BREAK: + { + setState(292); + match(BREAK); + setState(297); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==IF) { + { + setState(293); + match(IF); + setState(294); + ((LoopBodyContext)_localctx).c1 = condition(); + _localctx.loopExps.addAll(((LoopBodyContext)_localctx).c1.conditionRet); + } + } + + setState(299); + match(SEMICOLLON); + } + break; + case NEXT: + { + setState(300); + match(NEXT); + setState(305); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==IF) { + { + setState(301); + match(IF); + setState(302); + ((LoopBodyContext)_localctx).c2 = condition(); + _localctx.loopExps.addAll(((LoopBodyContext)_localctx).c2.conditionRet); + } + } + + setState(307); + match(SEMICOLLON); + } + break; + default: + throw new NoViableAltException(this); + } + } + setState(312); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(316); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==RETURN) { + { + setState(313); + ((LoopBodyContext)_localctx).r = returnStatement(); + ((LoopBodyContext)_localctx).loopRetStmt = ((LoopBodyContext)_localctx).r.returnStmtRet;_localctx.loopRetStmt.setLine(((LoopBodyContext)_localctx).r.returnStmtRet.getLine()); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class ForStatementContext extends ParserRuleContext { + public ForStatement forStRet; + public Token f; + public Token id; + public RangeContext r; + public LoopBodyContext l; + public TerminalNode IN() { return getToken(FunctionCraftParser.IN, 0); } + public TerminalNode END() { return getToken(FunctionCraftParser.END, 0); } + public TerminalNode FOR() { return getToken(FunctionCraftParser.FOR, 0); } + public TerminalNode IDENTIFIER() { return getToken(FunctionCraftParser.IDENTIFIER, 0); } + public RangeContext range() { + return getRuleContext(RangeContext.class,0); + } + public LoopBodyContext loopBody() { + return getRuleContext(LoopBodyContext.class,0); + } + public ForStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_forStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterForStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitForStatement(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitForStatement(this); + else return visitor.visitChildren(this); + } + } + + public final ForStatementContext forStatement() throws RecognitionException { + ForStatementContext _localctx = new ForStatementContext(_ctx, getState()); + enterRule(_localctx, 28, RULE_forStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(318); + ((ForStatementContext)_localctx).f = match(FOR); + setState(319); + ((ForStatementContext)_localctx).id = match(IDENTIFIER); + setState(320); + match(IN); + setState(321); + ((ForStatementContext)_localctx).r = range(); + setState(322); + ((ForStatementContext)_localctx).l = loopBody(); + setState(323); + match(END); + + ((ForStatementContext)_localctx).forStRet = new ForStatement(new Identifier((((ForStatementContext)_localctx).id!=null?((ForStatementContext)_localctx).id.getText():null)), + ((ForStatementContext)_localctx).r.rangeRet, ((ForStatementContext)_localctx).l.loopExps, ((ForStatementContext)_localctx).l.loopStmts, + ((ForStatementContext)_localctx).l.loopRetStmt); + _localctx.forStRet.setLine((((ForStatementContext)_localctx).f!=null?((ForStatementContext)_localctx).f.getLine():0)); + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class RangeContext extends ParserRuleContext { + public ArrayList rangeRet; + public ExpressionContext e1; + public ExpressionContext e2; + public ExpressionContext e3; + public ExpressionContext e4; + public Token id; + public TerminalNode LPAR() { return getToken(FunctionCraftParser.LPAR, 0); } + public TerminalNode DOUBLEDOT() { return getToken(FunctionCraftParser.DOUBLEDOT, 0); } + public TerminalNode RPAR() { return getToken(FunctionCraftParser.RPAR, 0); } + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public TerminalNode LBRACK() { return getToken(FunctionCraftParser.LBRACK, 0); } + public TerminalNode RBRACK() { return getToken(FunctionCraftParser.RBRACK, 0); } + public List COMMA() { return getTokens(FunctionCraftParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(FunctionCraftParser.COMMA, i); + } + public TerminalNode IDENTIFIER() { return getToken(FunctionCraftParser.IDENTIFIER, 0); } + public RangeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_range; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterRange(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitRange(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitRange(this); + else return visitor.visitChildren(this); + } + } + + public final RangeContext range() throws RecognitionException { + RangeContext _localctx = new RangeContext(_ctx, getState()); + enterRule(_localctx, 30, RULE_range); + int _la; + try { + setState(353); + _errHandler.sync(this); + switch (_input.LA(1)) { + case LPAR: + enterOuterAlt(_localctx, 1); + { + + ((RangeContext)_localctx).rangeRet = new ArrayList(); + + { + setState(327); + match(LPAR); + setState(328); + ((RangeContext)_localctx).e1 = expression(0); + + _localctx.rangeRet.add(((RangeContext)_localctx).e1.expRet); + + setState(330); + match(DOUBLEDOT); + setState(331); + ((RangeContext)_localctx).e2 = expression(0); + + _localctx.rangeRet.add(((RangeContext)_localctx).e2.expRet); + + setState(333); + match(RPAR); + } + } + break; + case LBRACK: + enterOuterAlt(_localctx, 2); + { + + ((RangeContext)_localctx).rangeRet = new ArrayList(); + + { + setState(336); + match(LBRACK); + { + setState(337); + ((RangeContext)_localctx).e3 = expression(0); + + _localctx.rangeRet.add(((RangeContext)_localctx).e3.expRet); + + setState(345); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(339); + match(COMMA); + setState(340); + ((RangeContext)_localctx).e4 = expression(0); + + _localctx.rangeRet.add(((RangeContext)_localctx).e4.expRet); + + } + } + setState(347); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + setState(348); + match(RBRACK); + } + } + break; + case IDENTIFIER: + enterOuterAlt(_localctx, 3); + { + + ((RangeContext)_localctx).rangeRet = new ArrayList(); + + setState(351); + ((RangeContext)_localctx).id = match(IDENTIFIER); + + Identifier id_ = new Identifier((((RangeContext)_localctx).id!=null?((RangeContext)_localctx).id.getText():null)); + id_.setLine((((RangeContext)_localctx).id!=null?((RangeContext)_localctx).id.getLine():0)); + _localctx.rangeRet.add(id_); + + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class FilterStatementContext extends ParserRuleContext { + public FilterStatement filterStatementRet; + public Token brack; + public ExpressionContext e1; + public Token id; + public RangeContext r; + public ExpressionContext e2; + public ExpressionContext e3; + public TerminalNode SEPARATOR() { return getToken(FunctionCraftParser.SEPARATOR, 0); } + public TerminalNode ARROW() { return getToken(FunctionCraftParser.ARROW, 0); } + public List COMMA() { return getTokens(FunctionCraftParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(FunctionCraftParser.COMMA, i); + } + public TerminalNode RBRACK() { return getToken(FunctionCraftParser.RBRACK, 0); } + public TerminalNode LBRACK() { return getToken(FunctionCraftParser.LBRACK, 0); } + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public TerminalNode IDENTIFIER() { return getToken(FunctionCraftParser.IDENTIFIER, 0); } + public RangeContext range() { + return getRuleContext(RangeContext.class,0); + } + public FilterStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_filterStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterFilterStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitFilterStatement(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitFilterStatement(this); + else return visitor.visitChildren(this); + } + } + + public final FilterStatementContext filterStatement() throws RecognitionException { + FilterStatementContext _localctx = new FilterStatementContext(_ctx, getState()); + enterRule(_localctx, 32, RULE_filterStatement); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + + ArrayList conditionExps = new ArrayList(); + + setState(356); + ((FilterStatementContext)_localctx).brack = match(LBRACK); + setState(357); + ((FilterStatementContext)_localctx).e1 = expression(0); + setState(358); + match(SEPARATOR); + setState(359); + ((FilterStatementContext)_localctx).id = match(IDENTIFIER); + setState(360); + match(ARROW); + setState(361); + ((FilterStatementContext)_localctx).r = range(); + setState(362); + match(COMMA); + setState(363); + ((FilterStatementContext)_localctx).e2 = expression(0); + + conditionExps.add(((FilterStatementContext)_localctx).e2.expRet); + + setState(371); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(365); + match(COMMA); + setState(366); + ((FilterStatementContext)_localctx).e3 = expression(0); + + conditionExps.add(((FilterStatementContext)_localctx).e3.expRet); + + } + } + setState(373); + _errHandler.sync(this); + _la = _input.LA(1); + } + + Identifier id_ = new Identifier((((FilterStatementContext)_localctx).id!=null?((FilterStatementContext)_localctx).id.getText():null)); + id_.setLine((((FilterStatementContext)_localctx).id!=null?((FilterStatementContext)_localctx).id.getLine():0)); + ((FilterStatementContext)_localctx).filterStatementRet = new FilterStatement(id_, ((FilterStatementContext)_localctx).e1.expRet, + conditionExps, ((FilterStatementContext)_localctx).r.rangeRet); + _localctx.filterStatementRet.setLine((((FilterStatementContext)_localctx).brack!=null?((FilterStatementContext)_localctx).brack.getLine():0)); + + setState(375); + match(RBRACK); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class MatchPatternStatementContext extends ParserRuleContext { + public MatchPatternStatement matchPatRet; + public Token id; + public Token m; + public ExpressionContext e; + public TerminalNode DOT() { return getToken(FunctionCraftParser.DOT, 0); } + public TerminalNode LPAR() { return getToken(FunctionCraftParser.LPAR, 0); } + public TerminalNode RPAR() { return getToken(FunctionCraftParser.RPAR, 0); } + public TerminalNode IDENTIFIER() { return getToken(FunctionCraftParser.IDENTIFIER, 0); } + public TerminalNode MATCH() { return getToken(FunctionCraftParser.MATCH, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public MatchPatternStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_matchPatternStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterMatchPatternStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitMatchPatternStatement(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitMatchPatternStatement(this); + else return visitor.visitChildren(this); + } + } + + public final MatchPatternStatementContext matchPatternStatement() throws RecognitionException { + MatchPatternStatementContext _localctx = new MatchPatternStatementContext(_ctx, getState()); + enterRule(_localctx, 34, RULE_matchPatternStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(377); + ((MatchPatternStatementContext)_localctx).id = match(IDENTIFIER); + setState(378); + match(DOT); + setState(379); + ((MatchPatternStatementContext)_localctx).m = match(MATCH); + setState(380); + match(LPAR); + setState(381); + ((MatchPatternStatementContext)_localctx).e = expression(0); + setState(382); + match(RPAR); + + Identifier id_ = new Identifier((((MatchPatternStatementContext)_localctx).id!=null?((MatchPatternStatementContext)_localctx).id.getText():null)); + id_.setLine((((MatchPatternStatementContext)_localctx).id!=null?((MatchPatternStatementContext)_localctx).id.getLine():0)); + ((MatchPatternStatementContext)_localctx).matchPatRet = new MatchPatternStatement(id_, ((MatchPatternStatementContext)_localctx).e.expRet); + _localctx.matchPatRet.setLine((((MatchPatternStatementContext)_localctx).m!=null?((MatchPatternStatementContext)_localctx).m.getLine():0)); + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class ChopStatementContext extends ParserRuleContext { + public ChopStatement chopRet; + public Token c; + public ExpressionContext e; + public TerminalNode LPAR() { return getToken(FunctionCraftParser.LPAR, 0); } + public TerminalNode RPAR() { return getToken(FunctionCraftParser.RPAR, 0); } + public TerminalNode CHOP() { return getToken(FunctionCraftParser.CHOP, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public ChopStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_chopStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterChopStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitChopStatement(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitChopStatement(this); + else return visitor.visitChildren(this); + } + } + + public final ChopStatementContext chopStatement() throws RecognitionException { + ChopStatementContext _localctx = new ChopStatementContext(_ctx, getState()); + enterRule(_localctx, 36, RULE_chopStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(385); + ((ChopStatementContext)_localctx).c = match(CHOP); + setState(386); + match(LPAR); + setState(387); + ((ChopStatementContext)_localctx).e = expression(0); + setState(388); + match(RPAR); + + ((ChopStatementContext)_localctx).chopRet = new ChopStatement(((ChopStatementContext)_localctx).e.expRet); + _localctx.chopRet.setLine((((ChopStatementContext)_localctx).c!=null?((ChopStatementContext)_localctx).c.getLine():0)); + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class ChompStatementContext extends ParserRuleContext { + public ChompStatement chompRet; + public Token c; + public ExpressionContext e; + public TerminalNode LPAR() { return getToken(FunctionCraftParser.LPAR, 0); } + public TerminalNode RPAR() { return getToken(FunctionCraftParser.RPAR, 0); } + public TerminalNode CHOMP() { return getToken(FunctionCraftParser.CHOMP, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public ChompStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_chompStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterChompStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitChompStatement(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitChompStatement(this); + else return visitor.visitChildren(this); + } + } + + public final ChompStatementContext chompStatement() throws RecognitionException { + ChompStatementContext _localctx = new ChompStatementContext(_ctx, getState()); + enterRule(_localctx, 38, RULE_chompStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(391); + ((ChompStatementContext)_localctx).c = match(CHOMP); + setState(392); + match(LPAR); + setState(393); + ((ChompStatementContext)_localctx).e = expression(0); + setState(394); + match(RPAR); + + ((ChompStatementContext)_localctx).chompRet = new ChompStatement(((ChompStatementContext)_localctx).e.expRet); + _localctx.chompRet.setLine((((ChompStatementContext)_localctx).c!=null?((ChompStatementContext)_localctx).c.getLine():0)); + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class AssignmentContext extends ParserRuleContext { + public AssignStatement assignRet; + public Token id; + public AccessListContext a; + public Token as; + public Token pl; + public Token mi; + public Token di; + public Token mu; + public Token mo; + public ExpressionContext e; + public TerminalNode SEMICOLLON() { return getToken(FunctionCraftParser.SEMICOLLON, 0); } + public TerminalNode IDENTIFIER() { return getToken(FunctionCraftParser.IDENTIFIER, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public TerminalNode ASSIGN() { return getToken(FunctionCraftParser.ASSIGN, 0); } + public TerminalNode PLUS_ASSIGN() { return getToken(FunctionCraftParser.PLUS_ASSIGN, 0); } + public TerminalNode MINUS_ASSIGN() { return getToken(FunctionCraftParser.MINUS_ASSIGN, 0); } + public TerminalNode DIVIDE_ASSIGN() { return getToken(FunctionCraftParser.DIVIDE_ASSIGN, 0); } + public TerminalNode MULT_ASSIGN() { return getToken(FunctionCraftParser.MULT_ASSIGN, 0); } + public TerminalNode MOD_ASSIGN() { return getToken(FunctionCraftParser.MOD_ASSIGN, 0); } + public AccessListContext accessList() { + return getRuleContext(AccessListContext.class,0); + } + public AssignmentContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_assignment; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterAssignment(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitAssignment(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitAssignment(this); + else return visitor.visitChildren(this); + } + } + + public final AssignmentContext assignment() throws RecognitionException { + AssignmentContext _localctx = new AssignmentContext(_ctx, getState()); + enterRule(_localctx, 40, RULE_assignment); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + + boolean access = false; + int line; + AssignOperator op; + + setState(398); + ((AssignmentContext)_localctx).id = match(IDENTIFIER); + setState(402); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==LBRACK) { + { + setState(399); + ((AssignmentContext)_localctx).a = accessList(); + access = true; + } + } + + setState(416); + _errHandler.sync(this); + switch (_input.LA(1)) { + case ASSIGN: + { + setState(404); + ((AssignmentContext)_localctx).as = match(ASSIGN); + op = AssignOperator.ASSIGN;line = (((AssignmentContext)_localctx).as!=null?((AssignmentContext)_localctx).as.getLine():0); + } + break; + case PLUS_ASSIGN: + { + setState(406); + ((AssignmentContext)_localctx).pl = match(PLUS_ASSIGN); + op = AssignOperator.PLUS_ASSIGN;line = (((AssignmentContext)_localctx).pl!=null?((AssignmentContext)_localctx).pl.getLine():0); + } + break; + case MINUS_ASSIGN: + { + setState(408); + ((AssignmentContext)_localctx).mi = match(MINUS_ASSIGN); + op = AssignOperator.MINUS_ASSIGN;line = (((AssignmentContext)_localctx).mi!=null?((AssignmentContext)_localctx).mi.getLine():0); + } + break; + case DIVIDE_ASSIGN: + { + setState(410); + ((AssignmentContext)_localctx).di = match(DIVIDE_ASSIGN); + op = AssignOperator.DIVIDE_ASSIGN;line = (((AssignmentContext)_localctx).di!=null?((AssignmentContext)_localctx).di.getLine():0); + } + break; + case MULT_ASSIGN: + { + setState(412); + ((AssignmentContext)_localctx).mu = match(MULT_ASSIGN); + op = AssignOperator.MULT_ASSIGN;line = (((AssignmentContext)_localctx).mu!=null?((AssignmentContext)_localctx).mu.getLine():0); + } + break; + case MOD_ASSIGN: + { + setState(414); + ((AssignmentContext)_localctx).mo = match(MOD_ASSIGN); + op = AssignOperator.MOD_ASSIGN;line = (((AssignmentContext)_localctx).mo!=null?((AssignmentContext)_localctx).mo.getLine():0); + } + break; + default: + throw new NoViableAltException(this); + } + setState(418); + ((AssignmentContext)_localctx).e = expression(0); + setState(419); + match(SEMICOLLON); + + Identifier id_ = new Identifier((((AssignmentContext)_localctx).id!=null?((AssignmentContext)_localctx).id.getText():null)); + id_.setLine((((AssignmentContext)_localctx).id!=null?((AssignmentContext)_localctx).id.getLine():0)); + ((AssignmentContext)_localctx).assignRet = new AssignStatement(access, id_, ((AssignmentContext)_localctx).e.expRet, op); + if(access){ + _localctx.assignRet.setAccessListExpression(((AssignmentContext)_localctx).a.accessListExp); + } + _localctx.assignRet.setLine(line); + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class AccessListContext extends ParserRuleContext { + public Expression accessListExp; + public ExpressionContext e; + public TerminalNode LBRACK() { return getToken(FunctionCraftParser.LBRACK, 0); } + public TerminalNode RBRACK() { return getToken(FunctionCraftParser.RBRACK, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public AccessListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_accessList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterAccessList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitAccessList(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitAccessList(this); + else return visitor.visitChildren(this); + } + } + + public final AccessListContext accessList() throws RecognitionException { + AccessListContext _localctx = new AccessListContext(_ctx, getState()); + enterRule(_localctx, 42, RULE_accessList); + try { + enterOuterAlt(_localctx, 1); + { + setState(422); + match(LBRACK); + setState(423); + ((AccessListContext)_localctx).e = expression(0); + ((AccessListContext)_localctx).accessListExp = ((AccessListContext)_localctx).e.expRet; + setState(425); + match(RBRACK); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class StatementContext extends ParserRuleContext { + public Statement stmtRet; + public IfStatementContext i; + public LoopDoStatementContext loop; + public ForStatementContext f; + public PutsStatementContext puts; + public PushStatementContext push; + public ExpressionContext e; + public AssignmentContext as; + public IfStatementContext ifStatement() { + return getRuleContext(IfStatementContext.class,0); + } + public LoopDoStatementContext loopDoStatement() { + return getRuleContext(LoopDoStatementContext.class,0); + } + public ForStatementContext forStatement() { + return getRuleContext(ForStatementContext.class,0); + } + public PutsStatementContext putsStatement() { + return getRuleContext(PutsStatementContext.class,0); + } + public PushStatementContext pushStatement() { + return getRuleContext(PushStatementContext.class,0); + } + public TerminalNode SEMICOLLON() { return getToken(FunctionCraftParser.SEMICOLLON, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public AssignmentContext assignment() { + return getRuleContext(AssignmentContext.class,0); + } + public StatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_statement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitStatement(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitStatement(this); + else return visitor.visitChildren(this); + } + } + + public final StatementContext statement() throws RecognitionException { + StatementContext _localctx = new StatementContext(_ctx, getState()); + enterRule(_localctx, 44, RULE_statement); + try { + setState(450); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,28,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(427); + ((StatementContext)_localctx).i = ifStatement(); + ((StatementContext)_localctx).stmtRet = ((StatementContext)_localctx).i.ifRet; + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(430); + ((StatementContext)_localctx).loop = loopDoStatement(); + ((StatementContext)_localctx).stmtRet = ((StatementContext)_localctx).loop.loopDoRet; + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(433); + ((StatementContext)_localctx).f = forStatement(); + ((StatementContext)_localctx).stmtRet = ((StatementContext)_localctx).f.forStRet; + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(436); + ((StatementContext)_localctx).puts = putsStatement(); + ((StatementContext)_localctx).stmtRet = ((StatementContext)_localctx).puts.putRet; + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(439); + ((StatementContext)_localctx).push = pushStatement(); + ((StatementContext)_localctx).stmtRet = ((StatementContext)_localctx).push.pushRet; + } + break; + case 6: + enterOuterAlt(_localctx, 6); + { + setState(442); + ((StatementContext)_localctx).e = expression(0); + ((StatementContext)_localctx).stmtRet = new ExpressionStatement(((StatementContext)_localctx).e.expRet); + + ExpressionStatement expStmt = new ExpressionStatement(((StatementContext)_localctx).e.expRet); + ((StatementContext)_localctx).stmtRet = expStmt; + _localctx.stmtRet.setLine(((StatementContext)_localctx).e.expRet.getLine()); + + setState(445); + match(SEMICOLLON); + } + break; + case 7: + enterOuterAlt(_localctx, 7); + { + setState(447); + ((StatementContext)_localctx).as = assignment(); + ((StatementContext)_localctx).stmtRet = ((StatementContext)_localctx).as.assignRet; + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class BodyContext extends ParserRuleContext { + public ArrayList bodyRet; + public StatementContext s; + public ReturnStatementContext r; + public List statement() { + return getRuleContexts(StatementContext.class); + } + public StatementContext statement(int i) { + return getRuleContext(StatementContext.class,i); + } + public ReturnStatementContext returnStatement() { + return getRuleContext(ReturnStatementContext.class,0); + } + public BodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_body; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterBody(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitBody(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitBody(this); + else return visitor.visitChildren(this); + } + } + + public final BodyContext body() throws RecognitionException { + BodyContext _localctx = new BodyContext(_ctx, getState()); + enterRule(_localctx, 46, RULE_body); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + + ((BodyContext)_localctx).bodyRet = new ArrayList(); + + setState(458); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & -1150101502091802256L) != 0)) { + { + { + setState(453); + ((BodyContext)_localctx).s = statement(); + _localctx.bodyRet.add(((BodyContext)_localctx).s.stmtRet); + } + } + setState(460); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(464); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==RETURN) { + { + setState(461); + ((BodyContext)_localctx).r = returnStatement(); + _localctx.bodyRet.add(((BodyContext)_localctx).r.returnStmtRet); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class ExpressionContext extends ParserRuleContext { + public Expression expRet; + public ExpressionContext e1; + public EqaulityExpressionContext e3; + public Token a; + public EqaulityExpressionContext e2; + public EqaulityExpressionContext eqaulityExpression() { + return getRuleContext(EqaulityExpressionContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public TerminalNode APPEND() { return getToken(FunctionCraftParser.APPEND, 0); } + public ExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_expression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitExpression(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitExpression(this); + else return visitor.visitChildren(this); + } + } + + public final ExpressionContext expression() throws RecognitionException { + return expression(0); + } + + private ExpressionContext expression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + ExpressionContext _localctx = new ExpressionContext(_ctx, _parentState); + ExpressionContext _prevctx = _localctx; + int _startState = 48; + enterRecursionRule(_localctx, 48, RULE_expression, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(467); + ((ExpressionContext)_localctx).e3 = eqaulityExpression(); + ((ExpressionContext)_localctx).expRet = ((ExpressionContext)_localctx).e3.expRet; + } + _ctx.stop = _input.LT(-1); + setState(477); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,31,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new ExpressionContext(_parentctx, _parentState); + _localctx.e1 = _prevctx; + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(470); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + setState(471); + ((ExpressionContext)_localctx).a = match(APPEND); + setState(472); + ((ExpressionContext)_localctx).e2 = eqaulityExpression(); + + if(!(((ExpressionContext)_localctx).e1.expRet instanceof AppendExpression)){ + ((ExpressionContext)_localctx).expRet = new AppendExpression(((ExpressionContext)_localctx).e1.expRet); + _localctx.expRet.setLine((((ExpressionContext)_localctx).a!=null?((ExpressionContext)_localctx).a.getLine():0)); + } + else{ + AppendExpression appendExp = (AppendExpression) ((ExpressionContext)_localctx).e1.expRet; + appendExp.addAppendedExpression(((ExpressionContext)_localctx).e2.expRet); + ((ExpressionContext)_localctx).expRet = appendExp; + } + + } + } + } + setState(479); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,31,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class EqaulityExpressionContext extends ParserRuleContext { + public Expression expRet; + public RelationalExpressionContext e1; + public Token op1; + public Token op2; + public RelationalExpressionContext r1; + public RelationalExpressionContext r2; + public List relationalExpression() { + return getRuleContexts(RelationalExpressionContext.class); + } + public RelationalExpressionContext relationalExpression(int i) { + return getRuleContext(RelationalExpressionContext.class,i); + } + public TerminalNode EQUAL() { return getToken(FunctionCraftParser.EQUAL, 0); } + public TerminalNode NOT_EQUAL() { return getToken(FunctionCraftParser.NOT_EQUAL, 0); } + public EqaulityExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_eqaulityExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterEqaulityExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitEqaulityExpression(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitEqaulityExpression(this); + else return visitor.visitChildren(this); + } + } + + public final EqaulityExpressionContext eqaulityExpression() throws RecognitionException { + EqaulityExpressionContext _localctx = new EqaulityExpressionContext(_ctx, getState()); + enterRule(_localctx, 50, RULE_eqaulityExpression); + try { + setState(494); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,33,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(480); + ((EqaulityExpressionContext)_localctx).e1 = relationalExpression(0); + + BinaryOperator op; + int line; + + setState(486); + _errHandler.sync(this); + switch (_input.LA(1)) { + case EQUAL: + { + setState(482); + ((EqaulityExpressionContext)_localctx).op1 = match(EQUAL); + op = BinaryOperator.EQUAL;line = (((EqaulityExpressionContext)_localctx).op1!=null?((EqaulityExpressionContext)_localctx).op1.getLine():0); + } + break; + case NOT_EQUAL: + { + setState(484); + ((EqaulityExpressionContext)_localctx).op2 = match(NOT_EQUAL); + op = BinaryOperator.NOT_EQUAL;line = (((EqaulityExpressionContext)_localctx).op2!=null?((EqaulityExpressionContext)_localctx).op2.getLine():0); + } + break; + default: + throw new NoViableAltException(this); + } + setState(488); + ((EqaulityExpressionContext)_localctx).r1 = relationalExpression(0); + ((EqaulityExpressionContext)_localctx).expRet = new BinaryExpression(((EqaulityExpressionContext)_localctx).e1.expRet, ((EqaulityExpressionContext)_localctx).r1.expRet, op);_localctx.expRet.setLine(line); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(491); + ((EqaulityExpressionContext)_localctx).r2 = relationalExpression(0); + ((EqaulityExpressionContext)_localctx).expRet = ((EqaulityExpressionContext)_localctx).r2.expRet; + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class RelationalExpressionContext extends ParserRuleContext { + public Expression expRet; + public RelationalExpressionContext r1; + public AdditiveExpressionContext a2; + public Token gt; + public Token lt; + public Token let; + public Token get; + public AdditiveExpressionContext a1; + public AdditiveExpressionContext additiveExpression() { + return getRuleContext(AdditiveExpressionContext.class,0); + } + public RelationalExpressionContext relationalExpression() { + return getRuleContext(RelationalExpressionContext.class,0); + } + public TerminalNode GREATER_THAN() { return getToken(FunctionCraftParser.GREATER_THAN, 0); } + public TerminalNode LESS_THAN() { return getToken(FunctionCraftParser.LESS_THAN, 0); } + public TerminalNode LESS_EQUAL_THAN() { return getToken(FunctionCraftParser.LESS_EQUAL_THAN, 0); } + public TerminalNode GREATER_EQUAL_THAN() { return getToken(FunctionCraftParser.GREATER_EQUAL_THAN, 0); } + public RelationalExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_relationalExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterRelationalExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitRelationalExpression(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitRelationalExpression(this); + else return visitor.visitChildren(this); + } + } + + public final RelationalExpressionContext relationalExpression() throws RecognitionException { + return relationalExpression(0); + } + + private RelationalExpressionContext relationalExpression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + RelationalExpressionContext _localctx = new RelationalExpressionContext(_ctx, _parentState); + RelationalExpressionContext _prevctx = _localctx; + int _startState = 52; + enterRecursionRule(_localctx, 52, RULE_relationalExpression, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(497); + ((RelationalExpressionContext)_localctx).a2 = additiveExpression(0); + ((RelationalExpressionContext)_localctx).expRet = ((RelationalExpressionContext)_localctx).a2.expRet; + } + _ctx.stop = _input.LT(-1); + setState(517); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,35,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new RelationalExpressionContext(_parentctx, _parentState); + _localctx.r1 = _prevctx; + pushNewRecursionContext(_localctx, _startState, RULE_relationalExpression); + setState(500); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + + BinaryOperator op; + int line; + + setState(510); + _errHandler.sync(this); + switch (_input.LA(1)) { + case GREATER_THAN: + { + setState(502); + ((RelationalExpressionContext)_localctx).gt = match(GREATER_THAN); + op = BinaryOperator.GREATER_THAN;line = (((RelationalExpressionContext)_localctx).gt!=null?((RelationalExpressionContext)_localctx).gt.getLine():0); + } + break; + case LESS_THAN: + { + setState(504); + ((RelationalExpressionContext)_localctx).lt = match(LESS_THAN); + op = BinaryOperator.LESS_THAN;line = (((RelationalExpressionContext)_localctx).lt!=null?((RelationalExpressionContext)_localctx).lt.getLine():0); + } + break; + case LESS_EQUAL_THAN: + { + setState(506); + ((RelationalExpressionContext)_localctx).let = match(LESS_EQUAL_THAN); + op = BinaryOperator.LESS_EQUAL_THAN;line = (((RelationalExpressionContext)_localctx).let!=null?((RelationalExpressionContext)_localctx).let.getLine():0); + } + break; + case GREATER_EQUAL_THAN: + { + setState(508); + ((RelationalExpressionContext)_localctx).get = match(GREATER_EQUAL_THAN); + op = BinaryOperator.GREATER_EQUAL_THAN;line = (((RelationalExpressionContext)_localctx).get!=null?((RelationalExpressionContext)_localctx).get.getLine():0); + } + break; + default: + throw new NoViableAltException(this); + } + setState(512); + ((RelationalExpressionContext)_localctx).a1 = additiveExpression(0); + ((RelationalExpressionContext)_localctx).expRet = new BinaryExpression(((RelationalExpressionContext)_localctx).r1.expRet, ((RelationalExpressionContext)_localctx).a1.expRet, op);_localctx.expRet.setLine(line); + } + } + } + setState(519); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,35,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class AdditiveExpressionContext extends ParserRuleContext { + public Expression expRet; + public AdditiveExpressionContext a1; + public MultiplicativeExpressionContext m2; + public Token p; + public Token m; + public MultiplicativeExpressionContext m1; + public MultiplicativeExpressionContext multiplicativeExpression() { + return getRuleContext(MultiplicativeExpressionContext.class,0); + } + public AdditiveExpressionContext additiveExpression() { + return getRuleContext(AdditiveExpressionContext.class,0); + } + public TerminalNode PLUS() { return getToken(FunctionCraftParser.PLUS, 0); } + public TerminalNode MINUS() { return getToken(FunctionCraftParser.MINUS, 0); } + public AdditiveExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_additiveExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterAdditiveExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitAdditiveExpression(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitAdditiveExpression(this); + else return visitor.visitChildren(this); + } + } + + public final AdditiveExpressionContext additiveExpression() throws RecognitionException { + return additiveExpression(0); + } + + private AdditiveExpressionContext additiveExpression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + AdditiveExpressionContext _localctx = new AdditiveExpressionContext(_ctx, _parentState); + AdditiveExpressionContext _prevctx = _localctx; + int _startState = 54; + enterRecursionRule(_localctx, 54, RULE_additiveExpression, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(521); + ((AdditiveExpressionContext)_localctx).m2 = multiplicativeExpression(0); + + ((AdditiveExpressionContext)_localctx).expRet = ((AdditiveExpressionContext)_localctx).m2.expRet; + + } + _ctx.stop = _input.LT(-1); + setState(537); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,37,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new AdditiveExpressionContext(_parentctx, _parentState); + _localctx.a1 = _prevctx; + pushNewRecursionContext(_localctx, _startState, RULE_additiveExpression); + setState(524); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + + BinaryOperator op; + int line; + + setState(530); + _errHandler.sync(this); + switch (_input.LA(1)) { + case PLUS: + { + setState(526); + ((AdditiveExpressionContext)_localctx).p = match(PLUS); + op = BinaryOperator.PLUS;line = (((AdditiveExpressionContext)_localctx).p!=null?((AdditiveExpressionContext)_localctx).p.getLine():0); + } + break; + case MINUS: + { + setState(528); + ((AdditiveExpressionContext)_localctx).m = match(MINUS); + op = BinaryOperator.MINUS;line = (((AdditiveExpressionContext)_localctx).m!=null?((AdditiveExpressionContext)_localctx).m.getLine():0); + } + break; + default: + throw new NoViableAltException(this); + } + setState(532); + ((AdditiveExpressionContext)_localctx).m1 = multiplicativeExpression(0); + ((AdditiveExpressionContext)_localctx).expRet = new BinaryExpression(((AdditiveExpressionContext)_localctx).a1.expRet, ((AdditiveExpressionContext)_localctx).m1.expRet, op);_localctx.expRet.setLine(line); + } + } + } + setState(539); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,37,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class MultiplicativeExpressionContext extends ParserRuleContext { + public Expression expRet; + public MultiplicativeExpressionContext m1; + public PreUnaryExpressionContext p2; + public Token m; + public Token d; + public PreUnaryExpressionContext p1; + public PreUnaryExpressionContext preUnaryExpression() { + return getRuleContext(PreUnaryExpressionContext.class,0); + } + public MultiplicativeExpressionContext multiplicativeExpression() { + return getRuleContext(MultiplicativeExpressionContext.class,0); + } + public TerminalNode MULT() { return getToken(FunctionCraftParser.MULT, 0); } + public TerminalNode DIVIDE() { return getToken(FunctionCraftParser.DIVIDE, 0); } + public MultiplicativeExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_multiplicativeExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterMultiplicativeExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitMultiplicativeExpression(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitMultiplicativeExpression(this); + else return visitor.visitChildren(this); + } + } + + public final MultiplicativeExpressionContext multiplicativeExpression() throws RecognitionException { + return multiplicativeExpression(0); + } + + private MultiplicativeExpressionContext multiplicativeExpression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + MultiplicativeExpressionContext _localctx = new MultiplicativeExpressionContext(_ctx, _parentState); + MultiplicativeExpressionContext _prevctx = _localctx; + int _startState = 56; + enterRecursionRule(_localctx, 56, RULE_multiplicativeExpression, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(541); + ((MultiplicativeExpressionContext)_localctx).p2 = preUnaryExpression(); + ((MultiplicativeExpressionContext)_localctx).expRet = ((MultiplicativeExpressionContext)_localctx).p2.expRet; + } + _ctx.stop = _input.LT(-1); + setState(557); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,39,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new MultiplicativeExpressionContext(_parentctx, _parentState); + _localctx.m1 = _prevctx; + pushNewRecursionContext(_localctx, _startState, RULE_multiplicativeExpression); + setState(544); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + + BinaryOperator op; + int line; + + setState(550); + _errHandler.sync(this); + switch (_input.LA(1)) { + case MULT: + { + setState(546); + ((MultiplicativeExpressionContext)_localctx).m = match(MULT); + op = BinaryOperator.MULT;line = (((MultiplicativeExpressionContext)_localctx).m!=null?((MultiplicativeExpressionContext)_localctx).m.getLine():0); + } + break; + case DIVIDE: + { + setState(548); + ((MultiplicativeExpressionContext)_localctx).d = match(DIVIDE); + op = BinaryOperator.DIVIDE;line = (((MultiplicativeExpressionContext)_localctx).d!=null?((MultiplicativeExpressionContext)_localctx).d.getLine():0); + } + break; + default: + throw new NoViableAltException(this); + } + setState(552); + ((MultiplicativeExpressionContext)_localctx).p1 = preUnaryExpression(); + ((MultiplicativeExpressionContext)_localctx).expRet = new BinaryExpression(((MultiplicativeExpressionContext)_localctx).m1.expRet, ((MultiplicativeExpressionContext)_localctx).p1.expRet, op);_localctx.expRet.setLine(line); + } + } + } + setState(559); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,39,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class PreUnaryExpressionContext extends ParserRuleContext { + public Expression expRet; + public Token n; + public Token m; + public Token i; + public Token d; + public AccessExpressionContext a1; + public AccessExpressionContext a2; + public AccessExpressionContext accessExpression() { + return getRuleContext(AccessExpressionContext.class,0); + } + public TerminalNode NOT() { return getToken(FunctionCraftParser.NOT, 0); } + public TerminalNode MINUS() { return getToken(FunctionCraftParser.MINUS, 0); } + public TerminalNode INCREMENT() { return getToken(FunctionCraftParser.INCREMENT, 0); } + public TerminalNode DECREMENT() { return getToken(FunctionCraftParser.DECREMENT, 0); } + public PreUnaryExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_preUnaryExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterPreUnaryExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitPreUnaryExpression(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitPreUnaryExpression(this); + else return visitor.visitChildren(this); + } + } + + public final PreUnaryExpressionContext preUnaryExpression() throws RecognitionException { + PreUnaryExpressionContext _localctx = new PreUnaryExpressionContext(_ctx, getState()); + enterRule(_localctx, 58, RULE_preUnaryExpression); + try { + setState(577); + _errHandler.sync(this); + switch (_input.LA(1)) { + case MINUS: + case NOT: + case INCREMENT: + case DECREMENT: + enterOuterAlt(_localctx, 1); + { + + UnaryOperator op; + int line; + + setState(569); + _errHandler.sync(this); + switch (_input.LA(1)) { + case NOT: + { + setState(561); + ((PreUnaryExpressionContext)_localctx).n = match(NOT); + op = UnaryOperator.NOT;line = (((PreUnaryExpressionContext)_localctx).n!=null?((PreUnaryExpressionContext)_localctx).n.getLine():0); + } + break; + case MINUS: + { + setState(563); + ((PreUnaryExpressionContext)_localctx).m = match(MINUS); + op = UnaryOperator.MINUS;line = (((PreUnaryExpressionContext)_localctx).m!=null?((PreUnaryExpressionContext)_localctx).m.getLine():0); + } + break; + case INCREMENT: + { + setState(565); + ((PreUnaryExpressionContext)_localctx).i = match(INCREMENT); + op = UnaryOperator.INC;line = (((PreUnaryExpressionContext)_localctx).i!=null?((PreUnaryExpressionContext)_localctx).i.getLine():0); + } + break; + case DECREMENT: + { + setState(567); + ((PreUnaryExpressionContext)_localctx).d = match(DECREMENT); + op = UnaryOperator.DEC;line = (((PreUnaryExpressionContext)_localctx).d!=null?((PreUnaryExpressionContext)_localctx).d.getLine():0); + } + break; + default: + throw new NoViableAltException(this); + } + setState(571); + ((PreUnaryExpressionContext)_localctx).a1 = accessExpression(); + ((PreUnaryExpressionContext)_localctx).expRet = new UnaryExpression(((PreUnaryExpressionContext)_localctx).a1.expRet, op);_localctx.expRet.setLine(line); + } + break; + case LEN: + case METHOD: + case CHOP: + case CHOMP: + case TRUE: + case FALSE: + case ARROW: + case LPAR: + case LBRACK: + case INT_VALUE: + case FLOAT_VALUE: + case IDENTIFIER: + case STRING_VALUE: + enterOuterAlt(_localctx, 2); + { + setState(574); + ((PreUnaryExpressionContext)_localctx).a2 = accessExpression(); + ((PreUnaryExpressionContext)_localctx).expRet = ((PreUnaryExpressionContext)_localctx).a2.expRet; + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class AccessExpressionContext extends ParserRuleContext { + public Expression expRet; + public OtherExpressionContext o; + public FunctionArgumentsContext f; + public AccessListContext a; + public OtherExpressionContext otherExpression() { + return getRuleContext(OtherExpressionContext.class,0); + } + public List LPAR() { return getTokens(FunctionCraftParser.LPAR); } + public TerminalNode LPAR(int i) { + return getToken(FunctionCraftParser.LPAR, i); + } + public List RPAR() { return getTokens(FunctionCraftParser.RPAR); } + public TerminalNode RPAR(int i) { + return getToken(FunctionCraftParser.RPAR, i); + } + public List functionArguments() { + return getRuleContexts(FunctionArgumentsContext.class); + } + public FunctionArgumentsContext functionArguments(int i) { + return getRuleContext(FunctionArgumentsContext.class,i); + } + public List accessList() { + return getRuleContexts(AccessListContext.class); + } + public AccessListContext accessList(int i) { + return getRuleContext(AccessListContext.class,i); + } + public AccessExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_accessExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterAccessExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitAccessExpression(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitAccessExpression(this); + else return visitor.visitChildren(this); + } + } + + public final AccessExpressionContext accessExpression() throws RecognitionException { + AccessExpressionContext _localctx = new AccessExpressionContext(_ctx, getState()); + enterRule(_localctx, 60, RULE_accessExpression); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + + boolean isAccessExpression = false; + boolean isMultiDimentional = false; + boolean isFunctionCall = false; + ArrayList args = new ArrayList(); + ArrayList dimentions = new ArrayList(); + + setState(580); + ((AccessExpressionContext)_localctx).o = otherExpression(); + setState(588); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,42,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(581); + match(LPAR); + setState(582); + ((AccessExpressionContext)_localctx).f = functionArguments(); + + isAccessExpression = true; + isFunctionCall =true; + args.addAll(((AccessExpressionContext)_localctx).f.funcArgsRet); + + setState(584); + match(RPAR); + } + } + } + setState(590); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,42,_ctx); + } + setState(596); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,43,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(591); + ((AccessExpressionContext)_localctx).a = accessList(); + + isMultiDimentional = true; + isAccessExpression = true; + dimentions.add(((AccessExpressionContext)_localctx).a.accessListExp); + + } + } + } + setState(598); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,43,_ctx); + } + + if(!isAccessExpression){ + ((AccessExpressionContext)_localctx).expRet = ((AccessExpressionContext)_localctx).o.expRet; + } + else{ + AccessExpression accessExp = new AccessExpression(((AccessExpressionContext)_localctx).o.expRet, args); + accessExp.setIsFunctionCall(isFunctionCall); + if(isMultiDimentional){ + + accessExp.setDimentionalAccess(dimentions); + } + ((AccessExpressionContext)_localctx).expRet = accessExp; + _localctx.expRet.setLine(((AccessExpressionContext)_localctx).o.expRet.getLine()); + + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class OtherExpressionContext extends ParserRuleContext { + public Expression expRet; + public ValuesContext v; + public Token id; + public LambdaFunctionContext lambda; + public ChopStatementContext chop; + public ChompStatementContext chomp; + public MatchPatternStatementContext match; + public FilterStatementContext f; + public LenStatementContext len_; + public ExpressionContext e; + public ValuesContext values() { + return getRuleContext(ValuesContext.class,0); + } + public TerminalNode IDENTIFIER() { return getToken(FunctionCraftParser.IDENTIFIER, 0); } + public LambdaFunctionContext lambdaFunction() { + return getRuleContext(LambdaFunctionContext.class,0); + } + public ChopStatementContext chopStatement() { + return getRuleContext(ChopStatementContext.class,0); + } + public ChompStatementContext chompStatement() { + return getRuleContext(ChompStatementContext.class,0); + } + public MatchPatternStatementContext matchPatternStatement() { + return getRuleContext(MatchPatternStatementContext.class,0); + } + public FilterStatementContext filterStatement() { + return getRuleContext(FilterStatementContext.class,0); + } + public LenStatementContext lenStatement() { + return getRuleContext(LenStatementContext.class,0); + } + public TerminalNode LPAR() { return getToken(FunctionCraftParser.LPAR, 0); } + public TerminalNode RPAR() { return getToken(FunctionCraftParser.RPAR, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public OtherExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_otherExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterOtherExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitOtherExpression(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitOtherExpression(this); + else return visitor.visitChildren(this); + } + } + + public final OtherExpressionContext otherExpression() throws RecognitionException { + OtherExpressionContext _localctx = new OtherExpressionContext(_ctx, getState()); + enterRule(_localctx, 62, RULE_otherExpression); + int _la; + try { + setState(631); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,45,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(601); + ((OtherExpressionContext)_localctx).v = values(); + ((OtherExpressionContext)_localctx).expRet = ((OtherExpressionContext)_localctx).v.valRet; + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(604); + ((OtherExpressionContext)_localctx).id = match(IDENTIFIER); + + ((OtherExpressionContext)_localctx).expRet = new Identifier((((OtherExpressionContext)_localctx).id!=null?((OtherExpressionContext)_localctx).id.getText():null)); + _localctx.expRet.setLine((((OtherExpressionContext)_localctx).id!=null?((OtherExpressionContext)_localctx).id.getLine():0)); + + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(606); + ((OtherExpressionContext)_localctx).lambda = lambdaFunction(); + ((OtherExpressionContext)_localctx).expRet = ((OtherExpressionContext)_localctx).lambda.lambdaRet; + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(609); + ((OtherExpressionContext)_localctx).chop = chopStatement(); + ((OtherExpressionContext)_localctx).expRet = ((OtherExpressionContext)_localctx).chop.chopRet; + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(612); + ((OtherExpressionContext)_localctx).chomp = chompStatement(); + ((OtherExpressionContext)_localctx).expRet = ((OtherExpressionContext)_localctx).chomp.chompRet; + } + break; + case 6: + enterOuterAlt(_localctx, 6); + { + setState(615); + ((OtherExpressionContext)_localctx).match = matchPatternStatement(); + ((OtherExpressionContext)_localctx).expRet = ((OtherExpressionContext)_localctx).match.matchPatRet; + } + break; + case 7: + enterOuterAlt(_localctx, 7); + { + setState(618); + ((OtherExpressionContext)_localctx).f = filterStatement(); + ((OtherExpressionContext)_localctx).expRet = ((OtherExpressionContext)_localctx).f.filterStatementRet; + } + break; + case 8: + enterOuterAlt(_localctx, 8); + { + setState(621); + ((OtherExpressionContext)_localctx).len_ = lenStatement(); + ((OtherExpressionContext)_localctx).expRet = ((OtherExpressionContext)_localctx).len_.lenRet; + } + break; + case 9: + enterOuterAlt(_localctx, 9); + { + setState(624); + match(LPAR); + setState(628); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & -1150101502091851712L) != 0)) { + { + setState(625); + ((OtherExpressionContext)_localctx).e = expression(0); + ((OtherExpressionContext)_localctx).expRet = ((OtherExpressionContext)_localctx).e.expRet; + } + } + + setState(630); + match(RPAR); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class LambdaFunctionContext extends ParserRuleContext { + public Expression lambdaRet; + public Token a; + public FunctionArgumentsDeclarationContext fd; + public BodyContext b; + public TerminalNode LBRACE() { return getToken(FunctionCraftParser.LBRACE, 0); } + public TerminalNode RBRACE() { return getToken(FunctionCraftParser.RBRACE, 0); } + public TerminalNode ARROW() { return getToken(FunctionCraftParser.ARROW, 0); } + public FunctionArgumentsDeclarationContext functionArgumentsDeclaration() { + return getRuleContext(FunctionArgumentsDeclarationContext.class,0); + } + public BodyContext body() { + return getRuleContext(BodyContext.class,0); + } + public LambdaFunctionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_lambdaFunction; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterLambdaFunction(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitLambdaFunction(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitLambdaFunction(this); + else return visitor.visitChildren(this); + } + } + + public final LambdaFunctionContext lambdaFunction() throws RecognitionException { + LambdaFunctionContext _localctx = new LambdaFunctionContext(_ctx, getState()); + enterRule(_localctx, 64, RULE_lambdaFunction); + try { + enterOuterAlt(_localctx, 1); + { + setState(633); + ((LambdaFunctionContext)_localctx).a = match(ARROW); + setState(634); + ((LambdaFunctionContext)_localctx).fd = functionArgumentsDeclaration(); + setState(635); + match(LBRACE); + setState(636); + ((LambdaFunctionContext)_localctx).b = body(); + setState(637); + match(RBRACE); + + ((LambdaFunctionContext)_localctx).lambdaRet = new LambdaExpression(((LambdaFunctionContext)_localctx).fd.argRet, ((LambdaFunctionContext)_localctx).b.bodyRet); + _localctx.lambdaRet.setLine((((LambdaFunctionContext)_localctx).a!=null?((LambdaFunctionContext)_localctx).a.getLine():0)); + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class ValuesContext extends ParserRuleContext { + public Value valRet; + public BoolValueContext b; + public Token s; + public Token i; + public Token float_; + public ListValueContext l; + public FunctionPointerContext f; + public BoolValueContext boolValue() { + return getRuleContext(BoolValueContext.class,0); + } + public TerminalNode STRING_VALUE() { return getToken(FunctionCraftParser.STRING_VALUE, 0); } + public TerminalNode INT_VALUE() { return getToken(FunctionCraftParser.INT_VALUE, 0); } + public TerminalNode FLOAT_VALUE() { return getToken(FunctionCraftParser.FLOAT_VALUE, 0); } + public ListValueContext listValue() { + return getRuleContext(ListValueContext.class,0); + } + public FunctionPointerContext functionPointer() { + return getRuleContext(FunctionPointerContext.class,0); + } + public ValuesContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_values; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterValues(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitValues(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitValues(this); + else return visitor.visitChildren(this); + } + } + + public final ValuesContext values() throws RecognitionException { + ValuesContext _localctx = new ValuesContext(_ctx, getState()); + enterRule(_localctx, 66, RULE_values); + try { + setState(655); + _errHandler.sync(this); + switch (_input.LA(1)) { + case TRUE: + case FALSE: + enterOuterAlt(_localctx, 1); + { + setState(640); + ((ValuesContext)_localctx).b = boolValue(); + ((ValuesContext)_localctx).valRet = ((ValuesContext)_localctx).b.boolValRet; + } + break; + case STRING_VALUE: + enterOuterAlt(_localctx, 2); + { + setState(643); + ((ValuesContext)_localctx).s = match(STRING_VALUE); + ((ValuesContext)_localctx).valRet = new StringValue((((ValuesContext)_localctx).s!=null?((ValuesContext)_localctx).s.getText():null)); _localctx.valRet.setLine((((ValuesContext)_localctx).s!=null?((ValuesContext)_localctx).s.getLine():0)); + } + break; + case INT_VALUE: + enterOuterAlt(_localctx, 3); + { + setState(645); + ((ValuesContext)_localctx).i = match(INT_VALUE); + ((ValuesContext)_localctx).valRet = new IntValue((((ValuesContext)_localctx).i!=null?Integer.valueOf(((ValuesContext)_localctx).i.getText()):0));_localctx.valRet.setLine((((ValuesContext)_localctx).i!=null?((ValuesContext)_localctx).i.getLine():0)); + } + break; + case FLOAT_VALUE: + enterOuterAlt(_localctx, 4); + { + setState(647); + ((ValuesContext)_localctx).float_ = match(FLOAT_VALUE); + ((ValuesContext)_localctx).valRet = new FloatValue(Float.parseFloat((((ValuesContext)_localctx).float_!=null?((ValuesContext)_localctx).float_.getText():null)));_localctx.valRet.setLine((((ValuesContext)_localctx).float_!=null?((ValuesContext)_localctx).float_.getLine():0)); + } + break; + case LBRACK: + enterOuterAlt(_localctx, 5); + { + setState(649); + ((ValuesContext)_localctx).l = listValue(); + ((ValuesContext)_localctx).valRet = ((ValuesContext)_localctx).l.listValRet; + } + break; + case METHOD: + enterOuterAlt(_localctx, 6); + { + setState(652); + ((ValuesContext)_localctx).f = functionPointer(); + ((ValuesContext)_localctx).valRet = ((ValuesContext)_localctx).f.fpRet; + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class ListValueContext extends ParserRuleContext { + public ListValue listValRet; + public Token l; + public FunctionArgumentsContext f; + public TerminalNode RBRACK() { return getToken(FunctionCraftParser.RBRACK, 0); } + public TerminalNode LBRACK() { return getToken(FunctionCraftParser.LBRACK, 0); } + public FunctionArgumentsContext functionArguments() { + return getRuleContext(FunctionArgumentsContext.class,0); + } + public ListValueContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_listValue; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterListValue(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitListValue(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitListValue(this); + else return visitor.visitChildren(this); + } + } + + public final ListValueContext listValue() throws RecognitionException { + ListValueContext _localctx = new ListValueContext(_ctx, getState()); + enterRule(_localctx, 68, RULE_listValue); + try { + enterOuterAlt(_localctx, 1); + { + setState(657); + ((ListValueContext)_localctx).l = match(LBRACK); + setState(658); + ((ListValueContext)_localctx).f = functionArguments(); + setState(659); + match(RBRACK); + + ((ListValueContext)_localctx).listValRet = new ListValue(((ListValueContext)_localctx).f.funcArgsRet); + _localctx.listValRet.setLine((((ListValueContext)_localctx).l!=null?((ListValueContext)_localctx).l.getLine():0)); + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class BoolValueContext extends ParserRuleContext { + public BoolValue boolValRet; + public Token t; + public Token f; + public TerminalNode TRUE() { return getToken(FunctionCraftParser.TRUE, 0); } + public TerminalNode FALSE() { return getToken(FunctionCraftParser.FALSE, 0); } + public BoolValueContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_boolValue; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterBoolValue(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitBoolValue(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitBoolValue(this); + else return visitor.visitChildren(this); + } + } + + public final BoolValueContext boolValue() throws RecognitionException { + BoolValueContext _localctx = new BoolValueContext(_ctx, getState()); + enterRule(_localctx, 70, RULE_boolValue); + try { + setState(666); + _errHandler.sync(this); + switch (_input.LA(1)) { + case TRUE: + enterOuterAlt(_localctx, 1); + { + setState(662); + ((BoolValueContext)_localctx).t = match(TRUE); + ((BoolValueContext)_localctx).boolValRet = new BoolValue(true); _localctx.boolValRet.setLine((((BoolValueContext)_localctx).t!=null?((BoolValueContext)_localctx).t.getLine():0)); + } + break; + case FALSE: + enterOuterAlt(_localctx, 2); + { + setState(664); + ((BoolValueContext)_localctx).f = match(FALSE); + ((BoolValueContext)_localctx).boolValRet = new BoolValue(false); _localctx.boolValRet.setLine((((BoolValueContext)_localctx).f!=null?((BoolValueContext)_localctx).f.getLine():0)); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class FunctionPointerContext extends ParserRuleContext { + public FunctionPointer fpRet; + public Token m; + public Token id; + public TerminalNode LPAR() { return getToken(FunctionCraftParser.LPAR, 0); } + public TerminalNode COLON() { return getToken(FunctionCraftParser.COLON, 0); } + public TerminalNode RPAR() { return getToken(FunctionCraftParser.RPAR, 0); } + public TerminalNode METHOD() { return getToken(FunctionCraftParser.METHOD, 0); } + public TerminalNode IDENTIFIER() { return getToken(FunctionCraftParser.IDENTIFIER, 0); } + public FunctionPointerContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_functionPointer; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterFunctionPointer(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitFunctionPointer(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitFunctionPointer(this); + else return visitor.visitChildren(this); + } + } + + public final FunctionPointerContext functionPointer() throws RecognitionException { + FunctionPointerContext _localctx = new FunctionPointerContext(_ctx, getState()); + enterRule(_localctx, 72, RULE_functionPointer); + try { + enterOuterAlt(_localctx, 1); + { + setState(668); + ((FunctionPointerContext)_localctx).m = match(METHOD); + setState(669); + match(LPAR); + setState(670); + match(COLON); + setState(671); + ((FunctionPointerContext)_localctx).id = match(IDENTIFIER); + setState(672); + match(RPAR); + + Identifier id_ = new Identifier((((FunctionPointerContext)_localctx).id!=null?((FunctionPointerContext)_localctx).id.getText():null)); + id_.setLine((((FunctionPointerContext)_localctx).id!=null?((FunctionPointerContext)_localctx).id.getLine():0)); + ((FunctionPointerContext)_localctx).fpRet = new FunctionPointer(id_); + _localctx.fpRet.setLine((((FunctionPointerContext)_localctx).m!=null?((FunctionPointerContext)_localctx).m.getLine():0)); + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) { + switch (ruleIndex) { + case 24: + return expression_sempred((ExpressionContext)_localctx, predIndex); + case 26: + return relationalExpression_sempred((RelationalExpressionContext)_localctx, predIndex); + case 27: + return additiveExpression_sempred((AdditiveExpressionContext)_localctx, predIndex); + case 28: + return multiplicativeExpression_sempred((MultiplicativeExpressionContext)_localctx, predIndex); + } + return true; + } + private boolean expression_sempred(ExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 0: + return precpred(_ctx, 2); + } + return true; + } + private boolean relationalExpression_sempred(RelationalExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 1: + return precpred(_ctx, 2); + } + return true; + } + private boolean additiveExpression_sempred(AdditiveExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 2: + return precpred(_ctx, 2); + } + return true; + } + private boolean multiplicativeExpression_sempred(MultiplicativeExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 3: + return precpred(_ctx, 2); + } + return true; + } + + public static final String _serializedATN = + "\u0004\u0001A\u02a4\u0002\u0000\u0007\u0000\u0002\u0001\u0007\u0001\u0002"+ + "\u0002\u0007\u0002\u0002\u0003\u0007\u0003\u0002\u0004\u0007\u0004\u0002"+ + "\u0005\u0007\u0005\u0002\u0006\u0007\u0006\u0002\u0007\u0007\u0007\u0002"+ + "\b\u0007\b\u0002\t\u0007\t\u0002\n\u0007\n\u0002\u000b\u0007\u000b\u0002"+ + "\f\u0007\f\u0002\r\u0007\r\u0002\u000e\u0007\u000e\u0002\u000f\u0007\u000f"+ + "\u0002\u0010\u0007\u0010\u0002\u0011\u0007\u0011\u0002\u0012\u0007\u0012"+ + "\u0002\u0013\u0007\u0013\u0002\u0014\u0007\u0014\u0002\u0015\u0007\u0015"+ + "\u0002\u0016\u0007\u0016\u0002\u0017\u0007\u0017\u0002\u0018\u0007\u0018"+ + "\u0002\u0019\u0007\u0019\u0002\u001a\u0007\u001a\u0002\u001b\u0007\u001b"+ + "\u0002\u001c\u0007\u001c\u0002\u001d\u0007\u001d\u0002\u001e\u0007\u001e"+ + "\u0002\u001f\u0007\u001f\u0002 \u0007 \u0002!\u0007!\u0002\"\u0007\"\u0002"+ + "#\u0007#\u0002$\u0007$\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0000"+ + "\u0001\u0000\u0001\u0000\u0001\u0000\u0005\u0000R\b\u0000\n\u0000\f\u0000"+ + "U\t\u0000\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0001\u0001\u0001"+ + "\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001"+ + "\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0002\u0001\u0002\u0001\u0002"+ + "\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0005\u0002l\b\u0002"+ + "\n\u0002\f\u0002o\t\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002"+ + "\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002"+ + "\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0005\u0002\u007f\b\u0002"+ + "\n\u0002\f\u0002\u0082\t\u0002\u0001\u0002\u0001\u0002\u0003\u0002\u0086"+ + "\b\u0002\u0003\u0002\u0088\b\u0002\u0001\u0002\u0001\u0002\u0001\u0003"+ + "\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003"+ + "\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003"+ + "\u0001\u0003\u0001\u0003\u0005\u0003\u009b\b\u0003\n\u0003\f\u0003\u009e"+ + "\t\u0003\u0001\u0003\u0001\u0003\u0001\u0004\u0001\u0004\u0001\u0004\u0001"+ + "\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001"+ + "\u0004\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0001"+ + "\u0005\u0001\u0005\u0005\u0005\u00b3\b\u0005\n\u0005\f\u0005\u00b6\t\u0005"+ + "\u0003\u0005\u00b8\b\u0005\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006"+ + "\u0001\u0006\u0003\u0006\u00bf\b\u0006\u0001\u0006\u0001\u0006\u0001\u0006"+ + "\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007"+ + "\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0003\u0007"+ + "\u00cf\b\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007"+ + "\u0001\u0007\u0001\u0007\u0001\u0007\u0003\u0007\u00d9\b\u0007\u0001\u0007"+ + "\u0001\u0007\u0001\u0007\u0001\u0007\u0005\u0007\u00df\b\u0007\n\u0007"+ + "\f\u0007\u00e2\t\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007"+ + "\u0003\u0007\u00e8\b\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\b"+ + "\u0001\b\u0001\b\u0001\b\u0001\b\u0001\b\u0001\b\u0003\b\u00f4\b\b\u0001"+ + "\b\u0001\b\u0001\b\u0003\b\u00f9\b\b\u0005\b\u00fb\b\b\n\b\f\b\u00fe\t"+ + "\b\u0005\b\u0100\b\b\n\b\f\b\u0103\t\b\u0001\t\u0001\t\u0001\t\u0001\t"+ + "\u0001\t\u0001\t\u0001\t\u0001\n\u0001\n\u0001\n\u0001\n\u0001\n\u0001"+ + "\n\u0001\u000b\u0001\u000b\u0001\u000b\u0001\u000b\u0001\u000b\u0001\u000b"+ + "\u0001\u000b\u0001\u000b\u0001\u000b\u0001\f\u0001\f\u0001\f\u0001\f\u0001"+ + "\f\u0001\f\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001"+ + "\r\u0001\r\u0003\r\u012a\b\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001"+ + "\r\u0003\r\u0132\b\r\u0001\r\u0005\r\u0135\b\r\n\r\f\r\u0138\t\r\u0001"+ + "\r\u0001\r\u0001\r\u0003\r\u013d\b\r\u0001\u000e\u0001\u000e\u0001\u000e"+ + "\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000f"+ + "\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f"+ + "\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f"+ + "\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0005\u000f\u0158\b\u000f"+ + "\n\u000f\f\u000f\u015b\t\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0001"+ + "\u000f\u0001\u000f\u0003\u000f\u0162\b\u000f\u0001\u0010\u0001\u0010\u0001"+ + "\u0010\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0010\u0001"+ + "\u0010\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0010\u0005"+ + "\u0010\u0172\b\u0010\n\u0010\f\u0010\u0175\t\u0010\u0001\u0010\u0001\u0010"+ + "\u0001\u0010\u0001\u0011\u0001\u0011\u0001\u0011\u0001\u0011\u0001\u0011"+ + "\u0001\u0011\u0001\u0011\u0001\u0011\u0001\u0012\u0001\u0012\u0001\u0012"+ + "\u0001\u0012\u0001\u0012\u0001\u0012\u0001\u0013\u0001\u0013\u0001\u0013"+ + "\u0001\u0013\u0001\u0013\u0001\u0013\u0001\u0014\u0001\u0014\u0001\u0014"+ + "\u0001\u0014\u0001\u0014\u0003\u0014\u0193\b\u0014\u0001\u0014\u0001\u0014"+ + "\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0014"+ + "\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0014\u0003\u0014\u01a1\b\u0014"+ + "\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0015\u0001\u0015"+ + "\u0001\u0015\u0001\u0015\u0001\u0015\u0001\u0016\u0001\u0016\u0001\u0016"+ + "\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0016"+ + "\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0016"+ + "\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0016"+ + "\u0001\u0016\u0001\u0016\u0003\u0016\u01c3\b\u0016\u0001\u0017\u0001\u0017"+ + "\u0001\u0017\u0001\u0017\u0005\u0017\u01c9\b\u0017\n\u0017\f\u0017\u01cc"+ + "\t\u0017\u0001\u0017\u0001\u0017\u0001\u0017\u0003\u0017\u01d1\b\u0017"+ + "\u0001\u0018\u0001\u0018\u0001\u0018\u0001\u0018\u0001\u0018\u0001\u0018"+ + "\u0001\u0018\u0001\u0018\u0001\u0018\u0005\u0018\u01dc\b\u0018\n\u0018"+ + "\f\u0018\u01df\t\u0018\u0001\u0019\u0001\u0019\u0001\u0019\u0001\u0019"+ + "\u0001\u0019\u0001\u0019\u0003\u0019\u01e7\b\u0019\u0001\u0019\u0001\u0019"+ + "\u0001\u0019\u0001\u0019\u0001\u0019\u0001\u0019\u0003\u0019\u01ef\b\u0019"+ + "\u0001\u001a\u0001\u001a\u0001\u001a\u0001\u001a\u0001\u001a\u0001\u001a"+ + "\u0001\u001a\u0001\u001a\u0001\u001a\u0001\u001a\u0001\u001a\u0001\u001a"+ + "\u0001\u001a\u0001\u001a\u0003\u001a\u01ff\b\u001a\u0001\u001a\u0001\u001a"+ + "\u0001\u001a\u0005\u001a\u0204\b\u001a\n\u001a\f\u001a\u0207\t\u001a\u0001"+ + "\u001b\u0001\u001b\u0001\u001b\u0001\u001b\u0001\u001b\u0001\u001b\u0001"+ + "\u001b\u0001\u001b\u0001\u001b\u0001\u001b\u0003\u001b\u0213\b\u001b\u0001"+ + "\u001b\u0001\u001b\u0001\u001b\u0005\u001b\u0218\b\u001b\n\u001b\f\u001b"+ + "\u021b\t\u001b\u0001\u001c\u0001\u001c\u0001\u001c\u0001\u001c\u0001\u001c"+ + "\u0001\u001c\u0001\u001c\u0001\u001c\u0001\u001c\u0001\u001c\u0003\u001c"+ + "\u0227\b\u001c\u0001\u001c\u0001\u001c\u0001\u001c\u0005\u001c\u022c\b"+ + "\u001c\n\u001c\f\u001c\u022f\t\u001c\u0001\u001d\u0001\u001d\u0001\u001d"+ + "\u0001\u001d\u0001\u001d\u0001\u001d\u0001\u001d\u0001\u001d\u0001\u001d"+ + "\u0003\u001d\u023a\b\u001d\u0001\u001d\u0001\u001d\u0001\u001d\u0001\u001d"+ + "\u0001\u001d\u0001\u001d\u0003\u001d\u0242\b\u001d\u0001\u001e\u0001\u001e"+ + "\u0001\u001e\u0001\u001e\u0001\u001e\u0001\u001e\u0001\u001e\u0005\u001e"+ + "\u024b\b\u001e\n\u001e\f\u001e\u024e\t\u001e\u0001\u001e\u0001\u001e\u0001"+ + "\u001e\u0005\u001e\u0253\b\u001e\n\u001e\f\u001e\u0256\t\u001e\u0001\u001e"+ + "\u0001\u001e\u0001\u001f\u0001\u001f\u0001\u001f\u0001\u001f\u0001\u001f"+ + "\u0001\u001f\u0001\u001f\u0001\u001f\u0001\u001f\u0001\u001f\u0001\u001f"+ + "\u0001\u001f\u0001\u001f\u0001\u001f\u0001\u001f\u0001\u001f\u0001\u001f"+ + "\u0001\u001f\u0001\u001f\u0001\u001f\u0001\u001f\u0001\u001f\u0001\u001f"+ + "\u0001\u001f\u0001\u001f\u0001\u001f\u0001\u001f\u0003\u001f\u0275\b\u001f"+ + "\u0001\u001f\u0003\u001f\u0278\b\u001f\u0001 \u0001 \u0001 \u0001 \u0001"+ + " \u0001 \u0001 \u0001!\u0001!\u0001!\u0001!\u0001!\u0001!\u0001!\u0001"+ + "!\u0001!\u0001!\u0001!\u0001!\u0001!\u0001!\u0001!\u0003!\u0290\b!\u0001"+ + "\"\u0001\"\u0001\"\u0001\"\u0001\"\u0001#\u0001#\u0001#\u0001#\u0003#"+ + "\u029b\b#\u0001$\u0001$\u0001$\u0001$\u0001$\u0001$\u0001$\u0001$\u0000"+ + "\u00040468%\u0000\u0002\u0004\u0006\b\n\f\u000e\u0010\u0012\u0014\u0016"+ + "\u0018\u001a\u001c\u001e \"$&(*,.02468:<>@BDFH\u0000\u0001\u0001\u0000"+ + "\u001e\u001f\u02c8\u0000J\u0001\u0000\u0000\u0000\u0002Y\u0001\u0000\u0000"+ + "\u0000\u0004d\u0001\u0000\u0000\u0000\u0006\u008b\u0001\u0000\u0000\u0000"+ + "\b\u00a1\u0001\u0000\u0000\u0000\n\u00ab\u0001\u0000\u0000\u0000\f\u00b9"+ + "\u0001\u0000\u0000\u0000\u000e\u00c3\u0001\u0000\u0000\u0000\u0010\u00ec"+ + "\u0001\u0000\u0000\u0000\u0012\u0104\u0001\u0000\u0000\u0000\u0014\u010b"+ + "\u0001\u0000\u0000\u0000\u0016\u0111\u0001\u0000\u0000\u0000\u0018\u011a"+ + "\u0001\u0000\u0000\u0000\u001a\u0120\u0001\u0000\u0000\u0000\u001c\u013e"+ + "\u0001\u0000\u0000\u0000\u001e\u0161\u0001\u0000\u0000\u0000 \u0163\u0001"+ + "\u0000\u0000\u0000\"\u0179\u0001\u0000\u0000\u0000$\u0181\u0001\u0000"+ + "\u0000\u0000&\u0187\u0001\u0000\u0000\u0000(\u018d\u0001\u0000\u0000\u0000"+ + "*\u01a6\u0001\u0000\u0000\u0000,\u01c2\u0001\u0000\u0000\u0000.\u01c4"+ + "\u0001\u0000\u0000\u00000\u01d2\u0001\u0000\u0000\u00002\u01ee\u0001\u0000"+ + "\u0000\u00004\u01f0\u0001\u0000\u0000\u00006\u0208\u0001\u0000\u0000\u0000"+ + "8\u021c\u0001\u0000\u0000\u0000:\u0241\u0001\u0000\u0000\u0000<\u0243"+ + "\u0001\u0000\u0000\u0000>\u0277\u0001\u0000\u0000\u0000@\u0279\u0001\u0000"+ + "\u0000\u0000B\u028f\u0001\u0000\u0000\u0000D\u0291\u0001\u0000\u0000\u0000"+ + "F\u029a\u0001\u0000\u0000\u0000H\u029c\u0001\u0000\u0000\u0000JS\u0006"+ + "\u0000\uffff\uffff\u0000KL\u0003\u0002\u0001\u0000LM\u0006\u0000\uffff"+ + "\uffff\u0000MR\u0001\u0000\u0000\u0000NO\u0003\u0006\u0003\u0000OP\u0006"+ + "\u0000\uffff\uffff\u0000PR\u0001\u0000\u0000\u0000QK\u0001\u0000\u0000"+ + "\u0000QN\u0001\u0000\u0000\u0000RU\u0001\u0000\u0000\u0000SQ\u0001\u0000"+ + "\u0000\u0000ST\u0001\u0000\u0000\u0000TV\u0001\u0000\u0000\u0000US\u0001"+ + "\u0000\u0000\u0000VW\u0003\b\u0004\u0000WX\u0006\u0000\uffff\uffff\u0000"+ + "X\u0001\u0001\u0000\u0000\u0000YZ\u0006\u0001\uffff\uffff\u0000Z[\u0005"+ + "\u0001\u0000\u0000[\\\u0006\u0001\uffff\uffff\u0000\\]\u0005>\u0000\u0000"+ + "]^\u0006\u0001\uffff\uffff\u0000^_\u0003\u0004\u0002\u0000_`\u0006\u0001"+ + "\uffff\uffff\u0000`a\u0003.\u0017\u0000ab\u0006\u0001\uffff\uffff\u0000"+ + "bc\u0005\u0002\u0000\u0000c\u0003\u0001\u0000\u0000\u0000de\u0006\u0002"+ + "\uffff\uffff\u0000e\u0087\u00051\u0000\u0000fg\u0005>\u0000\u0000gm\u0006"+ + "\u0002\uffff\uffff\u0000hi\u00057\u0000\u0000ij\u0005>\u0000\u0000jl\u0006"+ + "\u0002\uffff\uffff\u0000kh\u0001\u0000\u0000\u0000lo\u0001\u0000\u0000"+ + "\u0000mk\u0001\u0000\u0000\u0000mn\u0001\u0000\u0000\u0000n\u0085\u0001"+ + "\u0000\u0000\u0000om\u0001\u0000\u0000\u0000pq\u00057\u0000\u0000qr\u0005"+ + "3\u0000\u0000rs\u0005>\u0000\u0000st\u0006\u0002\uffff\uffff\u0000tu\u0005"+ + "0\u0000\u0000uv\u00030\u0018\u0000v\u0080\u0006\u0002\uffff\uffff\u0000"+ + "wx\u00057\u0000\u0000xy\u0005>\u0000\u0000yz\u0006\u0002\uffff\uffff\u0000"+ + "z{\u00050\u0000\u0000{|\u00030\u0018\u0000|}\u0006\u0002\uffff\uffff\u0000"+ + "}\u007f\u0001\u0000\u0000\u0000~w\u0001\u0000\u0000\u0000\u007f\u0082"+ + "\u0001\u0000\u0000\u0000\u0080~\u0001\u0000\u0000\u0000\u0080\u0081\u0001"+ + "\u0000\u0000\u0000\u0081\u0083\u0001\u0000\u0000\u0000\u0082\u0080\u0001"+ + "\u0000\u0000\u0000\u0083\u0084\u00054\u0000\u0000\u0084\u0086\u0001\u0000"+ + "\u0000\u0000\u0085p\u0001\u0000\u0000\u0000\u0085\u0086\u0001\u0000\u0000"+ + "\u0000\u0086\u0088\u0001\u0000\u0000\u0000\u0087f\u0001\u0000\u0000\u0000"+ + "\u0087\u0088\u0001\u0000\u0000\u0000\u0088\u0089\u0001\u0000\u0000\u0000"+ + "\u0089\u008a\u00052\u0000\u0000\u008a\u0005\u0001\u0000\u0000\u0000\u008b"+ + "\u008c\u0005\f\u0000\u0000\u008c\u008d\u0006\u0003\uffff\uffff\u0000\u008d"+ + "\u008e\u0005>\u0000\u0000\u008e\u008f\u0006\u0003\uffff\uffff\u0000\u008f"+ + "\u0090\u00051\u0000\u0000\u0090\u0091\u0005>\u0000\u0000\u0091\u0092\u0006"+ + "\u0003\uffff\uffff\u0000\u0092\u009c\u00052\u0000\u0000\u0093\u0094\u0005"+ + "#\u0000\u0000\u0094\u0095\u0003\u0010\b\u0000\u0095\u0096\u0006\u0003"+ + "\uffff\uffff\u0000\u0096\u0097\u00050\u0000\u0000\u0097\u0098\u00030\u0018"+ + "\u0000\u0098\u0099\u0006\u0003\uffff\uffff\u0000\u0099\u009b\u0001\u0000"+ + "\u0000\u0000\u009a\u0093\u0001\u0000\u0000\u0000\u009b\u009e\u0001\u0000"+ + "\u0000\u0000\u009c\u009a\u0001\u0000\u0000\u0000\u009c\u009d\u0001\u0000"+ + "\u0000\u0000\u009d\u009f\u0001\u0000\u0000\u0000\u009e\u009c\u0001\u0000"+ + "\u0000\u0000\u009f\u00a0\u0005;\u0000\u0000\u00a0\u0007\u0001\u0000\u0000"+ + "\u0000\u00a1\u00a2\u0006\u0004\uffff\uffff\u0000\u00a2\u00a3\u0005\u0001"+ + "\u0000\u0000\u00a3\u00a4\u0005\u0003\u0000\u0000\u00a4\u00a5\u0006\u0004"+ + "\uffff\uffff\u0000\u00a5\u00a6\u00051\u0000\u0000\u00a6\u00a7\u00052\u0000"+ + "\u0000\u00a7\u00a8\u0003.\u0017\u0000\u00a8\u00a9\u0006\u0004\uffff\uffff"+ + "\u0000\u00a9\u00aa\u0005\u0002\u0000\u0000\u00aa\t\u0001\u0000\u0000\u0000"+ + "\u00ab\u00b7\u0006\u0005\uffff\uffff\u0000\u00ac\u00ad\u00030\u0018\u0000"+ + "\u00ad\u00b4\u0006\u0005\uffff\uffff\u0000\u00ae\u00af\u00057\u0000\u0000"+ + "\u00af\u00b0\u00030\u0018\u0000\u00b0\u00b1\u0006\u0005\uffff\uffff\u0000"+ + "\u00b1\u00b3\u0001\u0000\u0000\u0000\u00b2\u00ae\u0001\u0000\u0000\u0000"+ + "\u00b3\u00b6\u0001\u0000\u0000\u0000\u00b4\u00b2\u0001\u0000\u0000\u0000"+ + "\u00b4\u00b5\u0001\u0000\u0000\u0000\u00b5\u00b8\u0001\u0000\u0000\u0000"+ + "\u00b6\u00b4\u0001\u0000\u0000\u0000\u00b7\u00ac\u0001\u0000\u0000\u0000"+ + "\u00b7\u00b8\u0001\u0000\u0000\u0000\u00b8\u000b\u0001\u0000\u0000\u0000"+ + "\u00b9\u00ba\u0006\u0006\uffff\uffff\u0000\u00ba\u00be\u0005\u0007\u0000"+ + "\u0000\u00bb\u00bc\u00030\u0018\u0000\u00bc\u00bd\u0006\u0006\uffff\uffff"+ + "\u0000\u00bd\u00bf\u0001\u0000\u0000\u0000\u00be\u00bb\u0001\u0000\u0000"+ + "\u0000\u00be\u00bf\u0001\u0000\u0000\u0000\u00bf\u00c0\u0001\u0000\u0000"+ + "\u0000\u00c0\u00c1\u0006\u0006\uffff\uffff\u0000\u00c1\u00c2\u0005;\u0000"+ + "\u0000\u00c2\r\u0001\u0000\u0000\u0000\u00c3\u00c4\u0006\u0007\uffff\uffff"+ + "\u0000\u00c4\u00c5\u0005\b\u0000\u0000\u00c5\u00ce\u0006\u0007\uffff\uffff"+ + "\u0000\u00c6\u00c7\u0003\u0010\b\u0000\u00c7\u00c8\u0006\u0007\uffff\uffff"+ + "\u0000\u00c8\u00cf\u0001\u0000\u0000\u0000\u00c9\u00ca\u00051\u0000\u0000"+ + "\u00ca\u00cb\u0003\u0010\b\u0000\u00cb\u00cc\u00052\u0000\u0000\u00cc"+ + "\u00cd\u0006\u0007\uffff\uffff\u0000\u00cd\u00cf\u0001\u0000\u0000\u0000"+ + "\u00ce\u00c6\u0001\u0000\u0000\u0000\u00ce\u00c9\u0001\u0000\u0000\u0000"+ + "\u00cf\u00d0\u0001\u0000\u0000\u0000\u00d0\u00d1\u0003\u001a\r\u0000\u00d1"+ + "\u00e0\u0006\u0007\uffff\uffff\u0000\u00d2\u00d8\u0005\n\u0000\u0000\u00d3"+ + "\u00d4\u00051\u0000\u0000\u00d4\u00d5\u0003\u0010\b\u0000\u00d5\u00d6"+ + "\u00052\u0000\u0000\u00d6\u00d9\u0001\u0000\u0000\u0000\u00d7\u00d9\u0003"+ + "\u0010\b\u0000\u00d8\u00d3\u0001\u0000\u0000\u0000\u00d8\u00d7\u0001\u0000"+ + "\u0000\u0000\u00d9\u00da\u0001\u0000\u0000\u0000\u00da\u00db\u0006\u0007"+ + "\uffff\uffff\u0000\u00db\u00dc\u0003\u001a\r\u0000\u00dc\u00dd\u0006\u0007"+ + "\uffff\uffff\u0000\u00dd\u00df\u0001\u0000\u0000\u0000\u00de\u00d2\u0001"+ + "\u0000\u0000\u0000\u00df\u00e2\u0001\u0000\u0000\u0000\u00e0\u00de\u0001"+ + "\u0000\u0000\u0000\u00e0\u00e1\u0001\u0000\u0000\u0000\u00e1\u00e7\u0001"+ + "\u0000\u0000\u0000\u00e2\u00e0\u0001\u0000\u0000\u0000\u00e3\u00e4\u0005"+ + "\t\u0000\u0000\u00e4\u00e5\u0003\u001a\r\u0000\u00e5\u00e6\u0006\u0007"+ + "\uffff\uffff\u0000\u00e6\u00e8\u0001\u0000\u0000\u0000\u00e7\u00e3\u0001"+ + "\u0000\u0000\u0000\u00e7\u00e8\u0001\u0000\u0000\u0000\u00e8\u00e9\u0001"+ + "\u0000\u0000\u0000\u00e9\u00ea\u0006\u0007\uffff\uffff\u0000\u00ea\u00eb"+ + "\u0005\u0002\u0000\u0000\u00eb\u000f\u0001\u0000\u0000\u0000\u00ec\u0101"+ + "\u0006\b\uffff\uffff\u0000\u00ed\u00ee\u00051\u0000\u0000\u00ee\u00ef"+ + "\u00030\u0018\u0000\u00ef\u00f0\u0006\b\uffff\uffff\u0000\u00f0\u00fc"+ + "\u00052\u0000\u0000\u00f1\u00f3\u0007\u0000\u0000\u0000\u00f2\u00f4\u0005"+ + "1\u0000\u0000\u00f3\u00f2\u0001\u0000\u0000\u0000\u00f3\u00f4\u0001\u0000"+ + "\u0000\u0000\u00f4\u00f5\u0001\u0000\u0000\u0000\u00f5\u00f6\u0003\u0010"+ + "\b\u0000\u00f6\u00f8\u0006\b\uffff\uffff\u0000\u00f7\u00f9\u00052\u0000"+ + "\u0000\u00f8\u00f7\u0001\u0000\u0000\u0000\u00f8\u00f9\u0001\u0000\u0000"+ + "\u0000\u00f9\u00fb\u0001\u0000\u0000\u0000\u00fa\u00f1\u0001\u0000\u0000"+ + "\u0000\u00fb\u00fe\u0001\u0000\u0000\u0000\u00fc\u00fa\u0001\u0000\u0000"+ + "\u0000\u00fc\u00fd\u0001\u0000\u0000\u0000\u00fd\u0100\u0001\u0000\u0000"+ + "\u0000\u00fe\u00fc\u0001\u0000\u0000\u0000\u00ff\u00ed\u0001\u0000\u0000"+ + "\u0000\u0100\u0103\u0001\u0000\u0000\u0000\u0101\u00ff\u0001\u0000\u0000"+ + "\u0000\u0101\u0102\u0001\u0000\u0000\u0000\u0102\u0011\u0001\u0000\u0000"+ + "\u0000\u0103\u0101\u0001\u0000\u0000\u0000\u0104\u0105\u0005\u0004\u0000"+ + "\u0000\u0105\u0106\u00051\u0000\u0000\u0106\u0107\u00030\u0018\u0000\u0107"+ + "\u0108\u0006\t\uffff\uffff\u0000\u0108\u0109\u00052\u0000\u0000\u0109"+ + "\u010a\u0005;\u0000\u0000\u010a\u0013\u0001\u0000\u0000\u0000\u010b\u010c"+ + "\u0005\u0006\u0000\u0000\u010c\u010d\u00051\u0000\u0000\u010d\u010e\u0003"+ + "0\u0018\u0000\u010e\u010f\u0006\n\uffff\uffff\u0000\u010f\u0110\u0005"+ + "2\u0000\u0000\u0110\u0015\u0001\u0000\u0000\u0000\u0111\u0112\u0005\u0005"+ + "\u0000\u0000\u0112\u0113\u00051\u0000\u0000\u0113\u0114\u00030\u0018\u0000"+ + "\u0114\u0115\u00057\u0000\u0000\u0115\u0116\u00030\u0018\u0000\u0116\u0117"+ + "\u00052\u0000\u0000\u0117\u0118\u0005;\u0000\u0000\u0118\u0119\u0006\u000b"+ + "\uffff\uffff\u0000\u0119\u0017\u0001\u0000\u0000\u0000\u011a\u011b\u0005"+ + "\u000e\u0000\u0000\u011b\u011c\u0005\u0011\u0000\u0000\u011c\u011d\u0003"+ + "\u001a\r\u0000\u011d\u011e\u0006\f\uffff\uffff\u0000\u011e\u011f\u0005"+ + "\u0002\u0000\u0000\u011f\u0019\u0001\u0000\u0000\u0000\u0120\u0136\u0006"+ + "\r\uffff\uffff\u0000\u0121\u0122\u0003,\u0016\u0000\u0122\u0123\u0006"+ + "\r\uffff\uffff\u0000\u0123\u0135\u0001\u0000\u0000\u0000\u0124\u0129\u0005"+ + "(\u0000\u0000\u0125\u0126\u0005\b\u0000\u0000\u0126\u0127\u0003\u0010"+ + "\b\u0000\u0127\u0128\u0006\r\uffff\uffff\u0000\u0128\u012a\u0001\u0000"+ + "\u0000\u0000\u0129\u0125\u0001\u0000\u0000\u0000\u0129\u012a\u0001\u0000"+ + "\u0000\u0000\u012a\u012b\u0001\u0000\u0000\u0000\u012b\u0135\u0005;\u0000"+ + "\u0000\u012c\u0131\u0005)\u0000\u0000\u012d\u012e\u0005\b\u0000\u0000"+ + "\u012e\u012f\u0003\u0010\b\u0000\u012f\u0130\u0006\r\uffff\uffff\u0000"+ + "\u0130\u0132\u0001\u0000\u0000\u0000\u0131\u012d\u0001\u0000\u0000\u0000"+ + "\u0131\u0132\u0001\u0000\u0000\u0000\u0132\u0133\u0001\u0000\u0000\u0000"+ + "\u0133\u0135\u0005;\u0000\u0000\u0134\u0121\u0001\u0000\u0000\u0000\u0134"+ + "\u0124\u0001\u0000\u0000\u0000\u0134\u012c\u0001\u0000\u0000\u0000\u0135"+ + "\u0138\u0001\u0000\u0000\u0000\u0136\u0134\u0001\u0000\u0000\u0000\u0136"+ + "\u0137\u0001\u0000\u0000\u0000\u0137\u013c\u0001\u0000\u0000\u0000\u0138"+ + "\u0136\u0001\u0000\u0000\u0000\u0139\u013a\u0003\f\u0006\u0000\u013a\u013b"+ + "\u0006\r\uffff\uffff\u0000\u013b\u013d\u0001\u0000\u0000\u0000\u013c\u0139"+ + "\u0001\u0000\u0000\u0000\u013c\u013d\u0001\u0000\u0000\u0000\u013d\u001b"+ + "\u0001\u0000\u0000\u0000\u013e\u013f\u0005\u000f\u0000\u0000\u013f\u0140"+ + "\u0005>\u0000\u0000\u0140\u0141\u0005\u0010\u0000\u0000\u0141\u0142\u0003"+ + "\u001e\u000f\u0000\u0142\u0143\u0003\u001a\r\u0000\u0143\u0144\u0005\u0002"+ + "\u0000\u0000\u0144\u0145\u0006\u000e\uffff\uffff\u0000\u0145\u001d\u0001"+ + "\u0000\u0000\u0000\u0146\u0147\u0006\u000f\uffff\uffff\u0000\u0147\u0148"+ + "\u00051\u0000\u0000\u0148\u0149\u00030\u0018\u0000\u0149\u014a\u0006\u000f"+ + "\uffff\uffff\u0000\u014a\u014b\u00059\u0000\u0000\u014b\u014c\u00030\u0018"+ + "\u0000\u014c\u014d\u0006\u000f\uffff\uffff\u0000\u014d\u014e\u00052\u0000"+ + "\u0000\u014e\u0162\u0001\u0000\u0000\u0000\u014f\u0150\u0006\u000f\uffff"+ + "\uffff\u0000\u0150\u0151\u00053\u0000\u0000\u0151\u0152\u00030\u0018\u0000"+ + "\u0152\u0159\u0006\u000f\uffff\uffff\u0000\u0153\u0154\u00057\u0000\u0000"+ + "\u0154\u0155\u00030\u0018\u0000\u0155\u0156\u0006\u000f\uffff\uffff\u0000"+ + "\u0156\u0158\u0001\u0000\u0000\u0000\u0157\u0153\u0001\u0000\u0000\u0000"+ + "\u0158\u015b\u0001\u0000\u0000\u0000\u0159\u0157\u0001\u0000\u0000\u0000"+ + "\u0159\u015a\u0001\u0000\u0000\u0000\u015a\u015c\u0001\u0000\u0000\u0000"+ + "\u015b\u0159\u0001\u0000\u0000\u0000\u015c\u015d\u00054\u0000\u0000\u015d"+ + "\u0162\u0001\u0000\u0000\u0000\u015e\u015f\u0006\u000f\uffff\uffff\u0000"+ + "\u015f\u0160\u0005>\u0000\u0000\u0160\u0162\u0006\u000f\uffff\uffff\u0000"+ + "\u0161\u0146\u0001\u0000\u0000\u0000\u0161\u014f\u0001\u0000\u0000\u0000"+ + "\u0161\u015e\u0001\u0000\u0000\u0000\u0162\u001f\u0001\u0000\u0000\u0000"+ + "\u0163\u0164\u0006\u0010\uffff\uffff\u0000\u0164\u0165\u00053\u0000\u0000"+ + "\u0165\u0166\u00030\u0018\u0000\u0166\u0167\u0005$\u0000\u0000\u0167\u0168"+ + "\u0005>\u0000\u0000\u0168\u0169\u0005*\u0000\u0000\u0169\u016a\u0003\u001e"+ + "\u000f\u0000\u016a\u016b\u00057\u0000\u0000\u016b\u016c\u00030\u0018\u0000"+ + "\u016c\u0173\u0006\u0010\uffff\uffff\u0000\u016d\u016e\u00057\u0000\u0000"+ + "\u016e\u016f\u00030\u0018\u0000\u016f\u0170\u0006\u0010\uffff\uffff\u0000"+ + "\u0170\u0172\u0001\u0000\u0000\u0000\u0171\u016d\u0001\u0000\u0000\u0000"+ + "\u0172\u0175\u0001\u0000\u0000\u0000\u0173\u0171\u0001\u0000\u0000\u0000"+ + "\u0173\u0174\u0001\u0000\u0000\u0000\u0174\u0176\u0001\u0000\u0000\u0000"+ + "\u0175\u0173\u0001\u0000\u0000\u0000\u0176\u0177\u0006\u0010\uffff\uffff"+ + "\u0000\u0177\u0178\u00054\u0000\u0000\u0178!\u0001\u0000\u0000\u0000\u0179"+ + "\u017a\u0005>\u0000\u0000\u017a\u017b\u00058\u0000\u0000\u017b\u017c\u0005"+ + "\r\u0000\u0000\u017c\u017d\u00051\u0000\u0000\u017d\u017e\u00030\u0018"+ + "\u0000\u017e\u017f\u00052\u0000\u0000\u017f\u0180\u0006\u0011\uffff\uffff"+ + "\u0000\u0180#\u0001\u0000\u0000\u0000\u0181\u0182\u0005\u0012\u0000\u0000"+ + "\u0182\u0183\u00051\u0000\u0000\u0183\u0184\u00030\u0018\u0000\u0184\u0185"+ + "\u00052\u0000\u0000\u0185\u0186\u0006\u0012\uffff\uffff\u0000\u0186%\u0001"+ + "\u0000\u0000\u0000\u0187\u0188\u0005\u0013\u0000\u0000\u0188\u0189\u0005"+ + "1\u0000\u0000\u0189\u018a\u00030\u0018\u0000\u018a\u018b\u00052\u0000"+ + "\u0000\u018b\u018c\u0006\u0013\uffff\uffff\u0000\u018c\'\u0001\u0000\u0000"+ + "\u0000\u018d\u018e\u0006\u0014\uffff\uffff\u0000\u018e\u0192\u0005>\u0000"+ + "\u0000\u018f\u0190\u0003*\u0015\u0000\u0190\u0191\u0006\u0014\uffff\uffff"+ + "\u0000\u0191\u0193\u0001\u0000\u0000\u0000\u0192\u018f\u0001\u0000\u0000"+ + "\u0000\u0192\u0193\u0001\u0000\u0000\u0000\u0193\u01a0\u0001\u0000\u0000"+ + "\u0000\u0194\u0195\u00050\u0000\u0000\u0195\u01a1\u0006\u0014\uffff\uffff"+ + "\u0000\u0196\u0197\u0005+\u0000\u0000\u0197\u01a1\u0006\u0014\uffff\uffff"+ + "\u0000\u0198\u0199\u0005,\u0000\u0000\u0199\u01a1\u0006\u0014\uffff\uffff"+ + "\u0000\u019a\u019b\u0005.\u0000\u0000\u019b\u01a1\u0006\u0014\uffff\uffff"+ + "\u0000\u019c\u019d\u0005-\u0000\u0000\u019d\u01a1\u0006\u0014\uffff\uffff"+ + "\u0000\u019e\u019f\u0005/\u0000\u0000\u019f\u01a1\u0006\u0014\uffff\uffff"+ + "\u0000\u01a0\u0194\u0001\u0000\u0000\u0000\u01a0\u0196\u0001\u0000\u0000"+ + "\u0000\u01a0\u0198\u0001\u0000\u0000\u0000\u01a0\u019a\u0001\u0000\u0000"+ + "\u0000\u01a0\u019c\u0001\u0000\u0000\u0000\u01a0\u019e\u0001\u0000\u0000"+ + "\u0000\u01a1\u01a2\u0001\u0000\u0000\u0000\u01a2\u01a3\u00030\u0018\u0000"+ + "\u01a3\u01a4\u0005;\u0000\u0000\u01a4\u01a5\u0006\u0014\uffff\uffff\u0000"+ + "\u01a5)\u0001\u0000\u0000\u0000\u01a6\u01a7\u00053\u0000\u0000\u01a7\u01a8"+ + "\u00030\u0018\u0000\u01a8\u01a9\u0006\u0015\uffff\uffff\u0000\u01a9\u01aa"+ + "\u00054\u0000\u0000\u01aa+\u0001\u0000\u0000\u0000\u01ab\u01ac\u0003\u000e"+ + "\u0007\u0000\u01ac\u01ad\u0006\u0016\uffff\uffff\u0000\u01ad\u01c3\u0001"+ + "\u0000\u0000\u0000\u01ae\u01af\u0003\u0018\f\u0000\u01af\u01b0\u0006\u0016"+ + "\uffff\uffff\u0000\u01b0\u01c3\u0001\u0000\u0000\u0000\u01b1\u01b2\u0003"+ + "\u001c\u000e\u0000\u01b2\u01b3\u0006\u0016\uffff\uffff\u0000\u01b3\u01c3"+ + "\u0001\u0000\u0000\u0000\u01b4\u01b5\u0003\u0012\t\u0000\u01b5\u01b6\u0006"+ + "\u0016\uffff\uffff\u0000\u01b6\u01c3\u0001\u0000\u0000\u0000\u01b7\u01b8"+ + "\u0003\u0016\u000b\u0000\u01b8\u01b9\u0006\u0016\uffff\uffff\u0000\u01b9"+ + "\u01c3\u0001\u0000\u0000\u0000\u01ba\u01bb\u00030\u0018\u0000\u01bb\u01bc"+ + "\u0006\u0016\uffff\uffff\u0000\u01bc\u01bd\u0006\u0016\uffff\uffff\u0000"+ + "\u01bd\u01be\u0005;\u0000\u0000\u01be\u01c3\u0001\u0000\u0000\u0000\u01bf"+ + "\u01c0\u0003(\u0014\u0000\u01c0\u01c1\u0006\u0016\uffff\uffff\u0000\u01c1"+ + "\u01c3\u0001\u0000\u0000\u0000\u01c2\u01ab\u0001\u0000\u0000\u0000\u01c2"+ + "\u01ae\u0001\u0000\u0000\u0000\u01c2\u01b1\u0001\u0000\u0000\u0000\u01c2"+ + "\u01b4\u0001\u0000\u0000\u0000\u01c2\u01b7\u0001\u0000\u0000\u0000\u01c2"+ + "\u01ba\u0001\u0000\u0000\u0000\u01c2\u01bf\u0001\u0000\u0000\u0000\u01c3"+ + "-\u0001\u0000\u0000\u0000\u01c4\u01ca\u0006\u0017\uffff\uffff\u0000\u01c5"+ + "\u01c6\u0003,\u0016\u0000\u01c6\u01c7\u0006\u0017\uffff\uffff\u0000\u01c7"+ + "\u01c9\u0001\u0000\u0000\u0000\u01c8\u01c5\u0001\u0000\u0000\u0000\u01c9"+ + "\u01cc\u0001\u0000\u0000\u0000\u01ca\u01c8\u0001\u0000\u0000\u0000\u01ca"+ + "\u01cb\u0001\u0000\u0000\u0000\u01cb\u01d0\u0001\u0000\u0000\u0000\u01cc"+ + "\u01ca\u0001\u0000\u0000\u0000\u01cd\u01ce\u0003\f\u0006\u0000\u01ce\u01cf"+ + "\u0006\u0017\uffff\uffff\u0000\u01cf\u01d1\u0001\u0000\u0000\u0000\u01d0"+ + "\u01cd\u0001\u0000\u0000\u0000\u01d0\u01d1\u0001\u0000\u0000\u0000\u01d1"+ + "/\u0001\u0000\u0000\u0000\u01d2\u01d3\u0006\u0018\uffff\uffff\u0000\u01d3"+ + "\u01d4\u00032\u0019\u0000\u01d4\u01d5\u0006\u0018\uffff\uffff\u0000\u01d5"+ + "\u01dd\u0001\u0000\u0000\u0000\u01d6\u01d7\n\u0002\u0000\u0000\u01d7\u01d8"+ + "\u0005%\u0000\u0000\u01d8\u01d9\u00032\u0019\u0000\u01d9\u01da\u0006\u0018"+ + "\uffff\uffff\u0000\u01da\u01dc\u0001\u0000\u0000\u0000\u01db\u01d6\u0001"+ + "\u0000\u0000\u0000\u01dc\u01df\u0001\u0000\u0000\u0000\u01dd\u01db\u0001"+ + "\u0000\u0000\u0000\u01dd\u01de\u0001\u0000\u0000\u0000\u01de1\u0001\u0000"+ + "\u0000\u0000\u01df\u01dd\u0001\u0000\u0000\u0000\u01e0\u01e1\u00034\u001a"+ + "\u0000\u01e1\u01e6\u0006\u0019\uffff\uffff\u0000\u01e2\u01e3\u0005\u0018"+ + "\u0000\u0000\u01e3\u01e7\u0006\u0019\uffff\uffff\u0000\u01e4\u01e5\u0005"+ + "\u0019\u0000\u0000\u01e5\u01e7\u0006\u0019\uffff\uffff\u0000\u01e6\u01e2"+ + "\u0001\u0000\u0000\u0000\u01e6\u01e4\u0001\u0000\u0000\u0000\u01e7\u01e8"+ + "\u0001\u0000\u0000\u0000\u01e8\u01e9\u00034\u001a\u0000\u01e9\u01ea\u0006"+ + "\u0019\uffff\uffff\u0000\u01ea\u01ef\u0001\u0000\u0000\u0000\u01eb\u01ec"+ + "\u00034\u001a\u0000\u01ec\u01ed\u0006\u0019\uffff\uffff\u0000\u01ed\u01ef"+ + "\u0001\u0000\u0000\u0000\u01ee\u01e0\u0001\u0000\u0000\u0000\u01ee\u01eb"+ + "\u0001\u0000\u0000\u0000\u01ef3\u0001\u0000\u0000\u0000\u01f0\u01f1\u0006"+ + "\u001a\uffff\uffff\u0000\u01f1\u01f2\u00036\u001b\u0000\u01f2\u01f3\u0006"+ + "\u001a\uffff\uffff\u0000\u01f3\u0205\u0001\u0000\u0000\u0000\u01f4\u01f5"+ + "\n\u0002\u0000\u0000\u01f5\u01fe\u0006\u001a\uffff\uffff\u0000\u01f6\u01f7"+ + "\u0005\u001c\u0000\u0000\u01f7\u01ff\u0006\u001a\uffff\uffff\u0000\u01f8"+ + "\u01f9\u0005\u001d\u0000\u0000\u01f9\u01ff\u0006\u001a\uffff\uffff\u0000"+ + "\u01fa\u01fb\u0005\u001a\u0000\u0000\u01fb\u01ff\u0006\u001a\uffff\uffff"+ + "\u0000\u01fc\u01fd\u0005\u001b\u0000\u0000\u01fd\u01ff\u0006\u001a\uffff"+ + "\uffff\u0000\u01fe\u01f6\u0001\u0000\u0000\u0000\u01fe\u01f8\u0001\u0000"+ + "\u0000\u0000\u01fe\u01fa\u0001\u0000\u0000\u0000\u01fe\u01fc\u0001\u0000"+ + "\u0000\u0000\u01ff\u0200\u0001\u0000\u0000\u0000\u0200\u0201\u00036\u001b"+ + "\u0000\u0201\u0202\u0006\u001a\uffff\uffff\u0000\u0202\u0204\u0001\u0000"+ + "\u0000\u0000\u0203\u01f4\u0001\u0000\u0000\u0000\u0204\u0207\u0001\u0000"+ + "\u0000\u0000\u0205\u0203\u0001\u0000\u0000\u0000\u0205\u0206\u0001\u0000"+ + "\u0000\u0000\u02065\u0001\u0000\u0000\u0000\u0207\u0205\u0001\u0000\u0000"+ + "\u0000\u0208\u0209\u0006\u001b\uffff\uffff\u0000\u0209\u020a\u00038\u001c"+ + "\u0000\u020a\u020b\u0006\u001b\uffff\uffff\u0000\u020b\u0219\u0001\u0000"+ + "\u0000\u0000\u020c\u020d\n\u0002\u0000\u0000\u020d\u0212\u0006\u001b\uffff"+ + "\uffff\u0000\u020e\u020f\u0005\u0014\u0000\u0000\u020f\u0213\u0006\u001b"+ + "\uffff\uffff\u0000\u0210\u0211\u0005\u0015\u0000\u0000\u0211\u0213\u0006"+ + "\u001b\uffff\uffff\u0000\u0212\u020e\u0001\u0000\u0000\u0000\u0212\u0210"+ + "\u0001\u0000\u0000\u0000\u0213\u0214\u0001\u0000\u0000\u0000\u0214\u0215"+ + "\u00038\u001c\u0000\u0215\u0216\u0006\u001b\uffff\uffff\u0000\u0216\u0218"+ + "\u0001\u0000\u0000\u0000\u0217\u020c\u0001\u0000\u0000\u0000\u0218\u021b"+ + "\u0001\u0000\u0000\u0000\u0219\u0217\u0001\u0000\u0000\u0000\u0219\u021a"+ + "\u0001\u0000\u0000\u0000\u021a7\u0001\u0000\u0000\u0000\u021b\u0219\u0001"+ + "\u0000\u0000\u0000\u021c\u021d\u0006\u001c\uffff\uffff\u0000\u021d\u021e"+ + "\u0003:\u001d\u0000\u021e\u021f\u0006\u001c\uffff\uffff\u0000\u021f\u022d"+ + "\u0001\u0000\u0000\u0000\u0220\u0221\n\u0002\u0000\u0000\u0221\u0226\u0006"+ + "\u001c\uffff\uffff\u0000\u0222\u0223\u0005\u0016\u0000\u0000\u0223\u0227"+ + "\u0006\u001c\uffff\uffff\u0000\u0224\u0225\u0005\u0017\u0000\u0000\u0225"+ + "\u0227\u0006\u001c\uffff\uffff\u0000\u0226\u0222\u0001\u0000\u0000\u0000"+ + "\u0226\u0224\u0001\u0000\u0000\u0000\u0227\u0228\u0001\u0000\u0000\u0000"+ + "\u0228\u0229\u0003:\u001d\u0000\u0229\u022a\u0006\u001c\uffff\uffff\u0000"+ + "\u022a\u022c\u0001\u0000\u0000\u0000\u022b\u0220\u0001\u0000\u0000\u0000"+ + "\u022c\u022f\u0001\u0000\u0000\u0000\u022d\u022b\u0001\u0000\u0000\u0000"+ + "\u022d\u022e\u0001\u0000\u0000\u0000\u022e9\u0001\u0000\u0000\u0000\u022f"+ + "\u022d\u0001\u0000\u0000\u0000\u0230\u0239\u0006\u001d\uffff\uffff\u0000"+ + "\u0231\u0232\u0005 \u0000\u0000\u0232\u023a\u0006\u001d\uffff\uffff\u0000"+ + "\u0233\u0234\u0005\u0015\u0000\u0000\u0234\u023a\u0006\u001d\uffff\uffff"+ + "\u0000\u0235\u0236\u0005!\u0000\u0000\u0236\u023a\u0006\u001d\uffff\uffff"+ + "\u0000\u0237\u0238\u0005\"\u0000\u0000\u0238\u023a\u0006\u001d\uffff\uffff"+ + "\u0000\u0239\u0231\u0001\u0000\u0000\u0000\u0239\u0233\u0001\u0000\u0000"+ + "\u0000\u0239\u0235\u0001\u0000\u0000\u0000\u0239\u0237\u0001\u0000\u0000"+ + "\u0000\u023a\u023b\u0001\u0000\u0000\u0000\u023b\u023c\u0003<\u001e\u0000"+ + "\u023c\u023d\u0006\u001d\uffff\uffff\u0000\u023d\u0242\u0001\u0000\u0000"+ + "\u0000\u023e\u023f\u0003<\u001e\u0000\u023f\u0240\u0006\u001d\uffff\uffff"+ + "\u0000\u0240\u0242\u0001\u0000\u0000\u0000\u0241\u0230\u0001\u0000\u0000"+ + "\u0000\u0241\u023e\u0001\u0000\u0000\u0000\u0242;\u0001\u0000\u0000\u0000"+ + "\u0243\u0244\u0006\u001e\uffff\uffff\u0000\u0244\u024c\u0003>\u001f\u0000"+ + "\u0245\u0246\u00051\u0000\u0000\u0246\u0247\u0003\n\u0005\u0000\u0247"+ + "\u0248\u0006\u001e\uffff\uffff\u0000\u0248\u0249\u00052\u0000\u0000\u0249"+ + "\u024b\u0001\u0000\u0000\u0000\u024a\u0245\u0001\u0000\u0000\u0000\u024b"+ + "\u024e\u0001\u0000\u0000\u0000\u024c\u024a\u0001\u0000\u0000\u0000\u024c"+ + "\u024d\u0001\u0000\u0000\u0000\u024d\u0254\u0001\u0000\u0000\u0000\u024e"+ + "\u024c\u0001\u0000\u0000\u0000\u024f\u0250\u0003*\u0015\u0000\u0250\u0251"+ + "\u0006\u001e\uffff\uffff\u0000\u0251\u0253\u0001\u0000\u0000\u0000\u0252"+ + "\u024f\u0001\u0000\u0000\u0000\u0253\u0256\u0001\u0000\u0000\u0000\u0254"+ + "\u0252\u0001\u0000\u0000\u0000\u0254\u0255\u0001\u0000\u0000\u0000\u0255"+ + "\u0257\u0001\u0000\u0000\u0000\u0256\u0254\u0001\u0000\u0000\u0000\u0257"+ + "\u0258\u0006\u001e\uffff\uffff\u0000\u0258=\u0001\u0000\u0000\u0000\u0259"+ + "\u025a\u0003B!\u0000\u025a\u025b\u0006\u001f\uffff\uffff\u0000\u025b\u0278"+ + "\u0001\u0000\u0000\u0000\u025c\u025d\u0005>\u0000\u0000\u025d\u0278\u0006"+ + "\u001f\uffff\uffff\u0000\u025e\u025f\u0003@ \u0000\u025f\u0260\u0006\u001f"+ + "\uffff\uffff\u0000\u0260\u0278\u0001\u0000\u0000\u0000\u0261\u0262\u0003"+ + "$\u0012\u0000\u0262\u0263\u0006\u001f\uffff\uffff\u0000\u0263\u0278\u0001"+ + "\u0000\u0000\u0000\u0264\u0265\u0003&\u0013\u0000\u0265\u0266\u0006\u001f"+ + "\uffff\uffff\u0000\u0266\u0278\u0001\u0000\u0000\u0000\u0267\u0268\u0003"+ + "\"\u0011\u0000\u0268\u0269\u0006\u001f\uffff\uffff\u0000\u0269\u0278\u0001"+ + "\u0000\u0000\u0000\u026a\u026b\u0003 \u0010\u0000\u026b\u026c\u0006\u001f"+ + "\uffff\uffff\u0000\u026c\u0278\u0001\u0000\u0000\u0000\u026d\u026e\u0003"+ + "\u0014\n\u0000\u026e\u026f\u0006\u001f\uffff\uffff\u0000\u026f\u0278\u0001"+ + "\u0000\u0000\u0000\u0270\u0274\u00051\u0000\u0000\u0271\u0272\u00030\u0018"+ + "\u0000\u0272\u0273\u0006\u001f\uffff\uffff\u0000\u0273\u0275\u0001\u0000"+ + "\u0000\u0000\u0274\u0271\u0001\u0000\u0000\u0000\u0274\u0275\u0001\u0000"+ + "\u0000\u0000\u0275\u0276\u0001\u0000\u0000\u0000\u0276\u0278\u00052\u0000"+ + "\u0000\u0277\u0259\u0001\u0000\u0000\u0000\u0277\u025c\u0001\u0000\u0000"+ + "\u0000\u0277\u025e\u0001\u0000\u0000\u0000\u0277\u0261\u0001\u0000\u0000"+ + "\u0000\u0277\u0264\u0001\u0000\u0000\u0000\u0277\u0267\u0001\u0000\u0000"+ + "\u0000\u0277\u026a\u0001\u0000\u0000\u0000\u0277\u026d\u0001\u0000\u0000"+ + "\u0000\u0277\u0270\u0001\u0000\u0000\u0000\u0278?\u0001\u0000\u0000\u0000"+ + "\u0279\u027a\u0005*\u0000\u0000\u027a\u027b\u0003\u0004\u0002\u0000\u027b"+ + "\u027c\u00055\u0000\u0000\u027c\u027d\u0003.\u0017\u0000\u027d\u027e\u0005"+ + "6\u0000\u0000\u027e\u027f\u0006 \uffff\uffff\u0000\u027fA\u0001\u0000"+ + "\u0000\u0000\u0280\u0281\u0003F#\u0000\u0281\u0282\u0006!\uffff\uffff"+ + "\u0000\u0282\u0290\u0001\u0000\u0000\u0000\u0283\u0284\u0005?\u0000\u0000"+ + "\u0284\u0290\u0006!\uffff\uffff\u0000\u0285\u0286\u0005<\u0000\u0000\u0286"+ + "\u0290\u0006!\uffff\uffff\u0000\u0287\u0288\u0005=\u0000\u0000\u0288\u0290"+ + "\u0006!\uffff\uffff\u0000\u0289\u028a\u0003D\"\u0000\u028a\u028b\u0006"+ + "!\uffff\uffff\u0000\u028b\u0290\u0001\u0000\u0000\u0000\u028c\u028d\u0003"+ + "H$\u0000\u028d\u028e\u0006!\uffff\uffff\u0000\u028e\u0290\u0001\u0000"+ + "\u0000\u0000\u028f\u0280\u0001\u0000\u0000\u0000\u028f\u0283\u0001\u0000"+ + "\u0000\u0000\u028f\u0285\u0001\u0000\u0000\u0000\u028f\u0287\u0001\u0000"+ + "\u0000\u0000\u028f\u0289\u0001\u0000\u0000\u0000\u028f\u028c\u0001\u0000"+ + "\u0000\u0000\u0290C\u0001\u0000\u0000\u0000\u0291\u0292\u00053\u0000\u0000"+ + "\u0292\u0293\u0003\n\u0005\u0000\u0293\u0294\u00054\u0000\u0000\u0294"+ + "\u0295\u0006\"\uffff\uffff\u0000\u0295E\u0001\u0000\u0000\u0000\u0296"+ + "\u0297\u0005&\u0000\u0000\u0297\u029b\u0006#\uffff\uffff\u0000\u0298\u0299"+ + "\u0005\'\u0000\u0000\u0299\u029b\u0006#\uffff\uffff\u0000\u029a\u0296"+ + "\u0001\u0000\u0000\u0000\u029a\u0298\u0001\u0000\u0000\u0000\u029bG\u0001"+ + "\u0000\u0000\u0000\u029c\u029d\u0005\u000b\u0000\u0000\u029d\u029e\u0005"+ + "1\u0000\u0000\u029e\u029f\u0005:\u0000\u0000\u029f\u02a0\u0005>\u0000"+ + "\u0000\u02a0\u02a1\u00052\u0000\u0000\u02a1\u02a2\u0006$\uffff\uffff\u0000"+ + "\u02a2I\u0001\u0000\u0000\u00000QSm\u0080\u0085\u0087\u009c\u00b4\u00b7"+ + "\u00be\u00ce\u00d8\u00e0\u00e7\u00f3\u00f8\u00fc\u0101\u0129\u0131\u0134"+ + "\u0136\u013c\u0159\u0161\u0173\u0192\u01a0\u01c2\u01ca\u01d0\u01dd\u01e6"+ + "\u01ee\u01fe\u0205\u0212\u0219\u0226\u022d\u0239\u0241\u024c\u0254\u0274"+ + "\u0277\u028f\u029a"; + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} \ No newline at end of file diff --git a/Phase2Template/Phase2/src/parsers/FunctionCraftVisitor.java b/Phase2Template/Phase2/src/parsers/FunctionCraftVisitor.java new file mode 100644 index 0000000..5e5dfbc --- /dev/null +++ b/Phase2Template/Phase2/src/parsers/FunctionCraftVisitor.java @@ -0,0 +1,244 @@ +// Generated from U:/UT/6/PLC_TA/Design-Compiler-Course-Projects/Phase2Template/Phase2/src/main/grammar/FunctionCraft.g4 by ANTLR 4.13.1 +package parsers; + + import main.ast.nodes.*; + import main.ast.nodes.declaration.*; + import main.ast.nodes.statement.*; + import main.ast.nodes.expression.*; + import main.ast.nodes.expression.operators.*; + import main.ast.nodes.expression.value.*; + import main.ast.nodes.expression.value.primitive.*; + +import org.antlr.v4.runtime.tree.ParseTreeVisitor; + +/** + * This interface defines a complete generic visitor for a parse tree produced + * by {@link FunctionCraftParser}. + * + * @param The return type of the visit operation. Use {@link Void} for + * operations with no return type. + */ +public interface FunctionCraftVisitor extends ParseTreeVisitor { + /** + * Visit a parse tree produced by {@link FunctionCraftParser#program}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitProgram(FunctionCraftParser.ProgramContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#functionDeclaration}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitFunctionDeclaration(FunctionCraftParser.FunctionDeclarationContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#functionArgumentsDeclaration}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitFunctionArgumentsDeclaration(FunctionCraftParser.FunctionArgumentsDeclarationContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#patternMatching}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitPatternMatching(FunctionCraftParser.PatternMatchingContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#main}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitMain(FunctionCraftParser.MainContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#functionArguments}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitFunctionArguments(FunctionCraftParser.FunctionArgumentsContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#returnStatement}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitReturnStatement(FunctionCraftParser.ReturnStatementContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#ifStatement}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitIfStatement(FunctionCraftParser.IfStatementContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#condition}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitCondition(FunctionCraftParser.ConditionContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#putsStatement}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitPutsStatement(FunctionCraftParser.PutsStatementContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#lenStatement}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitLenStatement(FunctionCraftParser.LenStatementContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#pushStatement}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitPushStatement(FunctionCraftParser.PushStatementContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#loopDoStatement}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitLoopDoStatement(FunctionCraftParser.LoopDoStatementContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#loopBody}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitLoopBody(FunctionCraftParser.LoopBodyContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#forStatement}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitForStatement(FunctionCraftParser.ForStatementContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#range}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitRange(FunctionCraftParser.RangeContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#filterStatement}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitFilterStatement(FunctionCraftParser.FilterStatementContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#matchPatternStatement}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitMatchPatternStatement(FunctionCraftParser.MatchPatternStatementContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#chopStatement}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitChopStatement(FunctionCraftParser.ChopStatementContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#chompStatement}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitChompStatement(FunctionCraftParser.ChompStatementContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#assignment}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitAssignment(FunctionCraftParser.AssignmentContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#accessList}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitAccessList(FunctionCraftParser.AccessListContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#statement}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitStatement(FunctionCraftParser.StatementContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#body}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitBody(FunctionCraftParser.BodyContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#expression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitExpression(FunctionCraftParser.ExpressionContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#eqaulityExpression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitEqaulityExpression(FunctionCraftParser.EqaulityExpressionContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#relationalExpression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitRelationalExpression(FunctionCraftParser.RelationalExpressionContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#additiveExpression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitAdditiveExpression(FunctionCraftParser.AdditiveExpressionContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#multiplicativeExpression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitMultiplicativeExpression(FunctionCraftParser.MultiplicativeExpressionContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#preUnaryExpression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitPreUnaryExpression(FunctionCraftParser.PreUnaryExpressionContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#accessExpression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitAccessExpression(FunctionCraftParser.AccessExpressionContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#otherExpression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitOtherExpression(FunctionCraftParser.OtherExpressionContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#lambdaFunction}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitLambdaFunction(FunctionCraftParser.LambdaFunctionContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#values}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitValues(FunctionCraftParser.ValuesContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#listValue}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitListValue(FunctionCraftParser.ListValueContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#boolValue}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitBoolValue(FunctionCraftParser.BoolValueContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#functionPointer}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitFunctionPointer(FunctionCraftParser.FunctionPointerContext ctx); +} \ No newline at end of file diff --git a/Phase2Template/Phase2Template.iml b/Phase2Template/Phase2Template.iml new file mode 100644 index 0000000..48b9d60 --- /dev/null +++ b/Phase2Template/Phase2Template.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/Phase2Template/gen/main/grammar/FunctionCraft.interp b/Phase2Template/gen/main/grammar/FunctionCraft.interp new file mode 100644 index 0000000..c5704fe --- /dev/null +++ b/Phase2Template/gen/main/grammar/FunctionCraft.interp @@ -0,0 +1,178 @@ +token literal names: +null +'def' +'end' +'main' +'puts' +'push' +'len' +'return' +'if' +'else' +'elseif' +'method' +'pattern' +'match' +'loop' +'for' +'in' +'do' +'chop' +'chomp' +'+' +'-' +'*' +'/' +'==' +'!=' +'<=' +'>=' +'>' +'<' +'&&' +'||' +'!' +'++' +'--' +' |' +'|' +'<<' +'true' +'false' +'break' +'next' +'->' +'+=' +'-=' +'*=' +'/=' +'%=' +'=' +'(' +')' +'[' +']' +'{' +'}' +',' +'.' +'..' +':' +';' +null +null +null +null +null +null + +token symbolic names: +null +DEF +END +MAIN +PUTS +PUSH +LEN +RETURN +IF +ELSE +ELSEIF +METHOD +PATTERN +MATCH +LOOP +FOR +IN +DO +CHOP +CHOMP +PLUS +MINUS +MULT +DIVIDE +EQUAL +NOT_EQUAL +LESS_EQUAL_THAN +GREATER_EQUAL_THAN +GREATER_THAN +LESS_THAN +AND +OR +NOT +INCREMENT +DECREMENT +PATTERN_MATCHING_SEPARATOR +SEPARATOR +APPEND +TRUE +FALSE +BREAK +NEXT +ARROW +PLUS_ASSIGN +MINUS_ASSIGN +MULT_ASSIGN +DIVIDE_ASSIGN +MOD_ASSIGN +ASSIGN +LPAR +RPAR +LBRACK +RBRACK +LBRACE +RBRACE +COMMA +DOT +DOUBLEDOT +COLON +SEMICOLLON +INT_VALUE +FLOAT_VALUE +IDENTIFIER +STRING_VALUE +COMMENT +WS + +rule names: +program +functionDeclaration +functionArgumentsDeclaration +patternMatching +main +functionArguments +returnStatement +ifStatement +condition +putsStatement +lenStatement +pushStatement +loopDoStatement +loopBody +forStatement +range +filterStatement +matchPatternStatement +chopStatement +chompStatement +assignment +accessList +statement +body +expression +eqaulityExpression +relationalExpression +additiveExpression +multiplicativeExpression +preUnaryExpression +accessExpression +otherExpression +lambdaFunction +values +listValue +boolValue +functionPointer + + +atn: +[4, 1, 65, 676, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 5, 0, 82, 8, 0, 10, 0, 12, 0, 85, 9, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 5, 2, 108, 8, 2, 10, 2, 12, 2, 111, 9, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 5, 2, 127, 8, 2, 10, 2, 12, 2, 130, 9, 2, 1, 2, 1, 2, 3, 2, 134, 8, 2, 3, 2, 136, 8, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 5, 3, 155, 8, 3, 10, 3, 12, 3, 158, 9, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 5, 5, 179, 8, 5, 10, 5, 12, 5, 182, 9, 5, 3, 5, 184, 8, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 191, 8, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 3, 7, 207, 8, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 3, 7, 217, 8, 7, 1, 7, 1, 7, 1, 7, 1, 7, 5, 7, 223, 8, 7, 10, 7, 12, 7, 226, 9, 7, 1, 7, 1, 7, 1, 7, 1, 7, 3, 7, 232, 8, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 244, 8, 8, 1, 8, 1, 8, 1, 8, 3, 8, 249, 8, 8, 5, 8, 251, 8, 8, 10, 8, 12, 8, 254, 9, 8, 5, 8, 256, 8, 8, 10, 8, 12, 8, 259, 9, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 298, 8, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 306, 8, 13, 1, 13, 5, 13, 309, 8, 13, 10, 13, 12, 13, 312, 9, 13, 1, 13, 1, 13, 1, 13, 3, 13, 317, 8, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 5, 15, 344, 8, 15, 10, 15, 12, 15, 347, 9, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 3, 15, 354, 8, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 5, 16, 370, 8, 16, 10, 16, 12, 16, 373, 9, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 403, 8, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 417, 8, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 3, 22, 451, 8, 22, 1, 23, 1, 23, 1, 23, 1, 23, 5, 23, 457, 8, 23, 10, 23, 12, 23, 460, 9, 23, 1, 23, 1, 23, 1, 23, 3, 23, 465, 8, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 5, 24, 476, 8, 24, 10, 24, 12, 24, 479, 9, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 3, 25, 487, 8, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 3, 25, 495, 8, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 3, 26, 511, 8, 26, 1, 26, 1, 26, 1, 26, 5, 26, 516, 8, 26, 10, 26, 12, 26, 519, 9, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 3, 27, 531, 8, 27, 1, 27, 1, 27, 1, 27, 5, 27, 536, 8, 27, 10, 27, 12, 27, 539, 9, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 3, 28, 551, 8, 28, 1, 28, 1, 28, 1, 28, 5, 28, 556, 8, 28, 10, 28, 12, 28, 559, 9, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 3, 29, 570, 8, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 3, 29, 578, 8, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 5, 30, 587, 8, 30, 10, 30, 12, 30, 590, 9, 30, 1, 30, 1, 30, 1, 30, 5, 30, 595, 8, 30, 10, 30, 12, 30, 598, 9, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 3, 31, 629, 8, 31, 1, 31, 3, 31, 632, 8, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 3, 33, 656, 8, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 3, 35, 667, 8, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 0, 4, 48, 52, 54, 56, 37, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 0, 1, 1, 0, 30, 31, 712, 0, 74, 1, 0, 0, 0, 2, 89, 1, 0, 0, 0, 4, 100, 1, 0, 0, 0, 6, 139, 1, 0, 0, 0, 8, 161, 1, 0, 0, 0, 10, 171, 1, 0, 0, 0, 12, 185, 1, 0, 0, 0, 14, 195, 1, 0, 0, 0, 16, 236, 1, 0, 0, 0, 18, 260, 1, 0, 0, 0, 20, 267, 1, 0, 0, 0, 22, 273, 1, 0, 0, 0, 24, 282, 1, 0, 0, 0, 26, 288, 1, 0, 0, 0, 28, 318, 1, 0, 0, 0, 30, 353, 1, 0, 0, 0, 32, 355, 1, 0, 0, 0, 34, 377, 1, 0, 0, 0, 36, 385, 1, 0, 0, 0, 38, 391, 1, 0, 0, 0, 40, 397, 1, 0, 0, 0, 42, 422, 1, 0, 0, 0, 44, 450, 1, 0, 0, 0, 46, 452, 1, 0, 0, 0, 48, 466, 1, 0, 0, 0, 50, 494, 1, 0, 0, 0, 52, 496, 1, 0, 0, 0, 54, 520, 1, 0, 0, 0, 56, 540, 1, 0, 0, 0, 58, 577, 1, 0, 0, 0, 60, 579, 1, 0, 0, 0, 62, 631, 1, 0, 0, 0, 64, 633, 1, 0, 0, 0, 66, 655, 1, 0, 0, 0, 68, 657, 1, 0, 0, 0, 70, 666, 1, 0, 0, 0, 72, 668, 1, 0, 0, 0, 74, 83, 6, 0, -1, 0, 75, 76, 3, 2, 1, 0, 76, 77, 6, 0, -1, 0, 77, 82, 1, 0, 0, 0, 78, 79, 3, 6, 3, 0, 79, 80, 6, 0, -1, 0, 80, 82, 1, 0, 0, 0, 81, 75, 1, 0, 0, 0, 81, 78, 1, 0, 0, 0, 82, 85, 1, 0, 0, 0, 83, 81, 1, 0, 0, 0, 83, 84, 1, 0, 0, 0, 84, 86, 1, 0, 0, 0, 85, 83, 1, 0, 0, 0, 86, 87, 3, 8, 4, 0, 87, 88, 6, 0, -1, 0, 88, 1, 1, 0, 0, 0, 89, 90, 6, 1, -1, 0, 90, 91, 5, 1, 0, 0, 91, 92, 6, 1, -1, 0, 92, 93, 5, 62, 0, 0, 93, 94, 6, 1, -1, 0, 94, 95, 3, 4, 2, 0, 95, 96, 6, 1, -1, 0, 96, 97, 3, 46, 23, 0, 97, 98, 6, 1, -1, 0, 98, 99, 5, 2, 0, 0, 99, 3, 1, 0, 0, 0, 100, 101, 6, 2, -1, 0, 101, 135, 5, 49, 0, 0, 102, 103, 5, 62, 0, 0, 103, 109, 6, 2, -1, 0, 104, 105, 5, 55, 0, 0, 105, 106, 5, 62, 0, 0, 106, 108, 6, 2, -1, 0, 107, 104, 1, 0, 0, 0, 108, 111, 1, 0, 0, 0, 109, 107, 1, 0, 0, 0, 109, 110, 1, 0, 0, 0, 110, 133, 1, 0, 0, 0, 111, 109, 1, 0, 0, 0, 112, 113, 5, 55, 0, 0, 113, 114, 5, 51, 0, 0, 114, 115, 5, 62, 0, 0, 115, 116, 6, 2, -1, 0, 116, 117, 5, 48, 0, 0, 117, 118, 3, 48, 24, 0, 118, 128, 6, 2, -1, 0, 119, 120, 5, 55, 0, 0, 120, 121, 5, 62, 0, 0, 121, 122, 6, 2, -1, 0, 122, 123, 5, 48, 0, 0, 123, 124, 3, 48, 24, 0, 124, 125, 6, 2, -1, 0, 125, 127, 1, 0, 0, 0, 126, 119, 1, 0, 0, 0, 127, 130, 1, 0, 0, 0, 128, 126, 1, 0, 0, 0, 128, 129, 1, 0, 0, 0, 129, 131, 1, 0, 0, 0, 130, 128, 1, 0, 0, 0, 131, 132, 5, 52, 0, 0, 132, 134, 1, 0, 0, 0, 133, 112, 1, 0, 0, 0, 133, 134, 1, 0, 0, 0, 134, 136, 1, 0, 0, 0, 135, 102, 1, 0, 0, 0, 135, 136, 1, 0, 0, 0, 136, 137, 1, 0, 0, 0, 137, 138, 5, 50, 0, 0, 138, 5, 1, 0, 0, 0, 139, 140, 5, 12, 0, 0, 140, 141, 6, 3, -1, 0, 141, 142, 5, 62, 0, 0, 142, 143, 6, 3, -1, 0, 143, 144, 5, 49, 0, 0, 144, 145, 5, 62, 0, 0, 145, 146, 6, 3, -1, 0, 146, 156, 5, 50, 0, 0, 147, 148, 5, 35, 0, 0, 148, 149, 3, 16, 8, 0, 149, 150, 6, 3, -1, 0, 150, 151, 5, 48, 0, 0, 151, 152, 3, 48, 24, 0, 152, 153, 6, 3, -1, 0, 153, 155, 1, 0, 0, 0, 154, 147, 1, 0, 0, 0, 155, 158, 1, 0, 0, 0, 156, 154, 1, 0, 0, 0, 156, 157, 1, 0, 0, 0, 157, 159, 1, 0, 0, 0, 158, 156, 1, 0, 0, 0, 159, 160, 5, 59, 0, 0, 160, 7, 1, 0, 0, 0, 161, 162, 6, 4, -1, 0, 162, 163, 5, 1, 0, 0, 163, 164, 5, 3, 0, 0, 164, 165, 6, 4, -1, 0, 165, 166, 5, 49, 0, 0, 166, 167, 5, 50, 0, 0, 167, 168, 3, 46, 23, 0, 168, 169, 6, 4, -1, 0, 169, 170, 5, 2, 0, 0, 170, 9, 1, 0, 0, 0, 171, 183, 6, 5, -1, 0, 172, 173, 3, 48, 24, 0, 173, 180, 6, 5, -1, 0, 174, 175, 5, 55, 0, 0, 175, 176, 3, 48, 24, 0, 176, 177, 6, 5, -1, 0, 177, 179, 1, 0, 0, 0, 178, 174, 1, 0, 0, 0, 179, 182, 1, 0, 0, 0, 180, 178, 1, 0, 0, 0, 180, 181, 1, 0, 0, 0, 181, 184, 1, 0, 0, 0, 182, 180, 1, 0, 0, 0, 183, 172, 1, 0, 0, 0, 183, 184, 1, 0, 0, 0, 184, 11, 1, 0, 0, 0, 185, 186, 6, 6, -1, 0, 186, 190, 5, 7, 0, 0, 187, 188, 3, 48, 24, 0, 188, 189, 6, 6, -1, 0, 189, 191, 1, 0, 0, 0, 190, 187, 1, 0, 0, 0, 190, 191, 1, 0, 0, 0, 191, 192, 1, 0, 0, 0, 192, 193, 6, 6, -1, 0, 193, 194, 5, 59, 0, 0, 194, 13, 1, 0, 0, 0, 195, 196, 6, 7, -1, 0, 196, 197, 5, 8, 0, 0, 197, 206, 6, 7, -1, 0, 198, 199, 3, 16, 8, 0, 199, 200, 6, 7, -1, 0, 200, 207, 1, 0, 0, 0, 201, 202, 5, 49, 0, 0, 202, 203, 3, 16, 8, 0, 203, 204, 5, 50, 0, 0, 204, 205, 6, 7, -1, 0, 205, 207, 1, 0, 0, 0, 206, 198, 1, 0, 0, 0, 206, 201, 1, 0, 0, 0, 207, 208, 1, 0, 0, 0, 208, 209, 3, 26, 13, 0, 209, 224, 6, 7, -1, 0, 210, 216, 5, 10, 0, 0, 211, 212, 5, 49, 0, 0, 212, 213, 3, 16, 8, 0, 213, 214, 5, 50, 0, 0, 214, 217, 1, 0, 0, 0, 215, 217, 3, 16, 8, 0, 216, 211, 1, 0, 0, 0, 216, 215, 1, 0, 0, 0, 217, 218, 1, 0, 0, 0, 218, 219, 6, 7, -1, 0, 219, 220, 3, 26, 13, 0, 220, 221, 6, 7, -1, 0, 221, 223, 1, 0, 0, 0, 222, 210, 1, 0, 0, 0, 223, 226, 1, 0, 0, 0, 224, 222, 1, 0, 0, 0, 224, 225, 1, 0, 0, 0, 225, 231, 1, 0, 0, 0, 226, 224, 1, 0, 0, 0, 227, 228, 5, 9, 0, 0, 228, 229, 3, 26, 13, 0, 229, 230, 6, 7, -1, 0, 230, 232, 1, 0, 0, 0, 231, 227, 1, 0, 0, 0, 231, 232, 1, 0, 0, 0, 232, 233, 1, 0, 0, 0, 233, 234, 6, 7, -1, 0, 234, 235, 5, 2, 0, 0, 235, 15, 1, 0, 0, 0, 236, 257, 6, 8, -1, 0, 237, 238, 5, 49, 0, 0, 238, 239, 3, 48, 24, 0, 239, 240, 6, 8, -1, 0, 240, 252, 5, 50, 0, 0, 241, 243, 7, 0, 0, 0, 242, 244, 5, 49, 0, 0, 243, 242, 1, 0, 0, 0, 243, 244, 1, 0, 0, 0, 244, 245, 1, 0, 0, 0, 245, 246, 3, 16, 8, 0, 246, 248, 6, 8, -1, 0, 247, 249, 5, 50, 0, 0, 248, 247, 1, 0, 0, 0, 248, 249, 1, 0, 0, 0, 249, 251, 1, 0, 0, 0, 250, 241, 1, 0, 0, 0, 251, 254, 1, 0, 0, 0, 252, 250, 1, 0, 0, 0, 252, 253, 1, 0, 0, 0, 253, 256, 1, 0, 0, 0, 254, 252, 1, 0, 0, 0, 255, 237, 1, 0, 0, 0, 256, 259, 1, 0, 0, 0, 257, 255, 1, 0, 0, 0, 257, 258, 1, 0, 0, 0, 258, 17, 1, 0, 0, 0, 259, 257, 1, 0, 0, 0, 260, 261, 5, 4, 0, 0, 261, 262, 5, 49, 0, 0, 262, 263, 3, 48, 24, 0, 263, 264, 6, 9, -1, 0, 264, 265, 5, 50, 0, 0, 265, 266, 5, 59, 0, 0, 266, 19, 1, 0, 0, 0, 267, 268, 5, 6, 0, 0, 268, 269, 5, 49, 0, 0, 269, 270, 3, 48, 24, 0, 270, 271, 6, 10, -1, 0, 271, 272, 5, 50, 0, 0, 272, 21, 1, 0, 0, 0, 273, 274, 5, 5, 0, 0, 274, 275, 5, 49, 0, 0, 275, 276, 3, 48, 24, 0, 276, 277, 5, 55, 0, 0, 277, 278, 3, 48, 24, 0, 278, 279, 5, 50, 0, 0, 279, 280, 5, 59, 0, 0, 280, 281, 6, 11, -1, 0, 281, 23, 1, 0, 0, 0, 282, 283, 5, 14, 0, 0, 283, 284, 5, 17, 0, 0, 284, 285, 3, 26, 13, 0, 285, 286, 6, 12, -1, 0, 286, 287, 5, 2, 0, 0, 287, 25, 1, 0, 0, 0, 288, 310, 6, 13, -1, 0, 289, 290, 3, 44, 22, 0, 290, 291, 6, 13, -1, 0, 291, 309, 1, 0, 0, 0, 292, 297, 5, 40, 0, 0, 293, 294, 5, 8, 0, 0, 294, 295, 3, 16, 8, 0, 295, 296, 6, 13, -1, 0, 296, 298, 1, 0, 0, 0, 297, 293, 1, 0, 0, 0, 297, 298, 1, 0, 0, 0, 298, 299, 1, 0, 0, 0, 299, 309, 5, 59, 0, 0, 300, 305, 5, 41, 0, 0, 301, 302, 5, 8, 0, 0, 302, 303, 3, 16, 8, 0, 303, 304, 6, 13, -1, 0, 304, 306, 1, 0, 0, 0, 305, 301, 1, 0, 0, 0, 305, 306, 1, 0, 0, 0, 306, 307, 1, 0, 0, 0, 307, 309, 5, 59, 0, 0, 308, 289, 1, 0, 0, 0, 308, 292, 1, 0, 0, 0, 308, 300, 1, 0, 0, 0, 309, 312, 1, 0, 0, 0, 310, 308, 1, 0, 0, 0, 310, 311, 1, 0, 0, 0, 311, 316, 1, 0, 0, 0, 312, 310, 1, 0, 0, 0, 313, 314, 3, 12, 6, 0, 314, 315, 6, 13, -1, 0, 315, 317, 1, 0, 0, 0, 316, 313, 1, 0, 0, 0, 316, 317, 1, 0, 0, 0, 317, 27, 1, 0, 0, 0, 318, 319, 5, 15, 0, 0, 319, 320, 5, 62, 0, 0, 320, 321, 5, 16, 0, 0, 321, 322, 3, 30, 15, 0, 322, 323, 3, 26, 13, 0, 323, 324, 5, 2, 0, 0, 324, 325, 6, 14, -1, 0, 325, 29, 1, 0, 0, 0, 326, 327, 6, 15, -1, 0, 327, 328, 5, 49, 0, 0, 328, 329, 3, 48, 24, 0, 329, 330, 6, 15, -1, 0, 330, 331, 5, 57, 0, 0, 331, 332, 3, 48, 24, 0, 332, 333, 6, 15, -1, 0, 333, 334, 5, 50, 0, 0, 334, 354, 1, 0, 0, 0, 335, 336, 6, 15, -1, 0, 336, 337, 5, 51, 0, 0, 337, 338, 3, 48, 24, 0, 338, 345, 6, 15, -1, 0, 339, 340, 5, 55, 0, 0, 340, 341, 3, 48, 24, 0, 341, 342, 6, 15, -1, 0, 342, 344, 1, 0, 0, 0, 343, 339, 1, 0, 0, 0, 344, 347, 1, 0, 0, 0, 345, 343, 1, 0, 0, 0, 345, 346, 1, 0, 0, 0, 346, 348, 1, 0, 0, 0, 347, 345, 1, 0, 0, 0, 348, 349, 5, 52, 0, 0, 349, 354, 1, 0, 0, 0, 350, 351, 6, 15, -1, 0, 351, 352, 5, 62, 0, 0, 352, 354, 6, 15, -1, 0, 353, 326, 1, 0, 0, 0, 353, 335, 1, 0, 0, 0, 353, 350, 1, 0, 0, 0, 354, 31, 1, 0, 0, 0, 355, 356, 6, 16, -1, 0, 356, 357, 5, 51, 0, 0, 357, 358, 3, 48, 24, 0, 358, 359, 5, 36, 0, 0, 359, 360, 5, 62, 0, 0, 360, 361, 5, 42, 0, 0, 361, 362, 3, 30, 15, 0, 362, 363, 5, 55, 0, 0, 363, 364, 3, 48, 24, 0, 364, 371, 6, 16, -1, 0, 365, 366, 5, 55, 0, 0, 366, 367, 3, 48, 24, 0, 367, 368, 6, 16, -1, 0, 368, 370, 1, 0, 0, 0, 369, 365, 1, 0, 0, 0, 370, 373, 1, 0, 0, 0, 371, 369, 1, 0, 0, 0, 371, 372, 1, 0, 0, 0, 372, 374, 1, 0, 0, 0, 373, 371, 1, 0, 0, 0, 374, 375, 6, 16, -1, 0, 375, 376, 5, 52, 0, 0, 376, 33, 1, 0, 0, 0, 377, 378, 5, 62, 0, 0, 378, 379, 5, 56, 0, 0, 379, 380, 5, 13, 0, 0, 380, 381, 5, 49, 0, 0, 381, 382, 3, 48, 24, 0, 382, 383, 5, 50, 0, 0, 383, 384, 6, 17, -1, 0, 384, 35, 1, 0, 0, 0, 385, 386, 5, 18, 0, 0, 386, 387, 5, 49, 0, 0, 387, 388, 3, 48, 24, 0, 388, 389, 5, 50, 0, 0, 389, 390, 6, 18, -1, 0, 390, 37, 1, 0, 0, 0, 391, 392, 5, 19, 0, 0, 392, 393, 5, 49, 0, 0, 393, 394, 3, 48, 24, 0, 394, 395, 5, 50, 0, 0, 395, 396, 6, 19, -1, 0, 396, 39, 1, 0, 0, 0, 397, 398, 6, 20, -1, 0, 398, 402, 5, 62, 0, 0, 399, 400, 3, 42, 21, 0, 400, 401, 6, 20, -1, 0, 401, 403, 1, 0, 0, 0, 402, 399, 1, 0, 0, 0, 402, 403, 1, 0, 0, 0, 403, 416, 1, 0, 0, 0, 404, 405, 5, 48, 0, 0, 405, 417, 6, 20, -1, 0, 406, 407, 5, 43, 0, 0, 407, 417, 6, 20, -1, 0, 408, 409, 5, 44, 0, 0, 409, 417, 6, 20, -1, 0, 410, 411, 5, 46, 0, 0, 411, 417, 6, 20, -1, 0, 412, 413, 5, 45, 0, 0, 413, 417, 6, 20, -1, 0, 414, 415, 5, 47, 0, 0, 415, 417, 6, 20, -1, 0, 416, 404, 1, 0, 0, 0, 416, 406, 1, 0, 0, 0, 416, 408, 1, 0, 0, 0, 416, 410, 1, 0, 0, 0, 416, 412, 1, 0, 0, 0, 416, 414, 1, 0, 0, 0, 417, 418, 1, 0, 0, 0, 418, 419, 3, 48, 24, 0, 419, 420, 5, 59, 0, 0, 420, 421, 6, 20, -1, 0, 421, 41, 1, 0, 0, 0, 422, 423, 5, 51, 0, 0, 423, 424, 3, 48, 24, 0, 424, 425, 6, 21, -1, 0, 425, 426, 5, 52, 0, 0, 426, 43, 1, 0, 0, 0, 427, 428, 3, 14, 7, 0, 428, 429, 6, 22, -1, 0, 429, 451, 1, 0, 0, 0, 430, 431, 3, 24, 12, 0, 431, 432, 6, 22, -1, 0, 432, 451, 1, 0, 0, 0, 433, 434, 3, 28, 14, 0, 434, 435, 6, 22, -1, 0, 435, 451, 1, 0, 0, 0, 436, 437, 3, 18, 9, 0, 437, 438, 6, 22, -1, 0, 438, 451, 1, 0, 0, 0, 439, 440, 3, 22, 11, 0, 440, 441, 6, 22, -1, 0, 441, 451, 1, 0, 0, 0, 442, 443, 3, 48, 24, 0, 443, 444, 6, 22, -1, 0, 444, 445, 6, 22, -1, 0, 445, 446, 5, 59, 0, 0, 446, 451, 1, 0, 0, 0, 447, 448, 3, 40, 20, 0, 448, 449, 6, 22, -1, 0, 449, 451, 1, 0, 0, 0, 450, 427, 1, 0, 0, 0, 450, 430, 1, 0, 0, 0, 450, 433, 1, 0, 0, 0, 450, 436, 1, 0, 0, 0, 450, 439, 1, 0, 0, 0, 450, 442, 1, 0, 0, 0, 450, 447, 1, 0, 0, 0, 451, 45, 1, 0, 0, 0, 452, 458, 6, 23, -1, 0, 453, 454, 3, 44, 22, 0, 454, 455, 6, 23, -1, 0, 455, 457, 1, 0, 0, 0, 456, 453, 1, 0, 0, 0, 457, 460, 1, 0, 0, 0, 458, 456, 1, 0, 0, 0, 458, 459, 1, 0, 0, 0, 459, 464, 1, 0, 0, 0, 460, 458, 1, 0, 0, 0, 461, 462, 3, 12, 6, 0, 462, 463, 6, 23, -1, 0, 463, 465, 1, 0, 0, 0, 464, 461, 1, 0, 0, 0, 464, 465, 1, 0, 0, 0, 465, 47, 1, 0, 0, 0, 466, 467, 6, 24, -1, 0, 467, 468, 3, 50, 25, 0, 468, 469, 6, 24, -1, 0, 469, 477, 1, 0, 0, 0, 470, 471, 10, 2, 0, 0, 471, 472, 5, 37, 0, 0, 472, 473, 3, 50, 25, 0, 473, 474, 6, 24, -1, 0, 474, 476, 1, 0, 0, 0, 475, 470, 1, 0, 0, 0, 476, 479, 1, 0, 0, 0, 477, 475, 1, 0, 0, 0, 477, 478, 1, 0, 0, 0, 478, 49, 1, 0, 0, 0, 479, 477, 1, 0, 0, 0, 480, 481, 3, 52, 26, 0, 481, 486, 6, 25, -1, 0, 482, 483, 5, 24, 0, 0, 483, 487, 6, 25, -1, 0, 484, 485, 5, 25, 0, 0, 485, 487, 6, 25, -1, 0, 486, 482, 1, 0, 0, 0, 486, 484, 1, 0, 0, 0, 487, 488, 1, 0, 0, 0, 488, 489, 3, 52, 26, 0, 489, 490, 6, 25, -1, 0, 490, 495, 1, 0, 0, 0, 491, 492, 3, 52, 26, 0, 492, 493, 6, 25, -1, 0, 493, 495, 1, 0, 0, 0, 494, 480, 1, 0, 0, 0, 494, 491, 1, 0, 0, 0, 495, 51, 1, 0, 0, 0, 496, 497, 6, 26, -1, 0, 497, 498, 3, 54, 27, 0, 498, 499, 6, 26, -1, 0, 499, 517, 1, 0, 0, 0, 500, 501, 10, 2, 0, 0, 501, 510, 6, 26, -1, 0, 502, 503, 5, 28, 0, 0, 503, 511, 6, 26, -1, 0, 504, 505, 5, 29, 0, 0, 505, 511, 6, 26, -1, 0, 506, 507, 5, 26, 0, 0, 507, 511, 6, 26, -1, 0, 508, 509, 5, 27, 0, 0, 509, 511, 6, 26, -1, 0, 510, 502, 1, 0, 0, 0, 510, 504, 1, 0, 0, 0, 510, 506, 1, 0, 0, 0, 510, 508, 1, 0, 0, 0, 511, 512, 1, 0, 0, 0, 512, 513, 3, 54, 27, 0, 513, 514, 6, 26, -1, 0, 514, 516, 1, 0, 0, 0, 515, 500, 1, 0, 0, 0, 516, 519, 1, 0, 0, 0, 517, 515, 1, 0, 0, 0, 517, 518, 1, 0, 0, 0, 518, 53, 1, 0, 0, 0, 519, 517, 1, 0, 0, 0, 520, 521, 6, 27, -1, 0, 521, 522, 3, 56, 28, 0, 522, 523, 6, 27, -1, 0, 523, 537, 1, 0, 0, 0, 524, 525, 10, 2, 0, 0, 525, 530, 6, 27, -1, 0, 526, 527, 5, 20, 0, 0, 527, 531, 6, 27, -1, 0, 528, 529, 5, 21, 0, 0, 529, 531, 6, 27, -1, 0, 530, 526, 1, 0, 0, 0, 530, 528, 1, 0, 0, 0, 531, 532, 1, 0, 0, 0, 532, 533, 3, 56, 28, 0, 533, 534, 6, 27, -1, 0, 534, 536, 1, 0, 0, 0, 535, 524, 1, 0, 0, 0, 536, 539, 1, 0, 0, 0, 537, 535, 1, 0, 0, 0, 537, 538, 1, 0, 0, 0, 538, 55, 1, 0, 0, 0, 539, 537, 1, 0, 0, 0, 540, 541, 6, 28, -1, 0, 541, 542, 3, 58, 29, 0, 542, 543, 6, 28, -1, 0, 543, 557, 1, 0, 0, 0, 544, 545, 10, 2, 0, 0, 545, 550, 6, 28, -1, 0, 546, 547, 5, 22, 0, 0, 547, 551, 6, 28, -1, 0, 548, 549, 5, 23, 0, 0, 549, 551, 6, 28, -1, 0, 550, 546, 1, 0, 0, 0, 550, 548, 1, 0, 0, 0, 551, 552, 1, 0, 0, 0, 552, 553, 3, 58, 29, 0, 553, 554, 6, 28, -1, 0, 554, 556, 1, 0, 0, 0, 555, 544, 1, 0, 0, 0, 556, 559, 1, 0, 0, 0, 557, 555, 1, 0, 0, 0, 557, 558, 1, 0, 0, 0, 558, 57, 1, 0, 0, 0, 559, 557, 1, 0, 0, 0, 560, 569, 6, 29, -1, 0, 561, 562, 5, 32, 0, 0, 562, 570, 6, 29, -1, 0, 563, 564, 5, 21, 0, 0, 564, 570, 6, 29, -1, 0, 565, 566, 5, 33, 0, 0, 566, 570, 6, 29, -1, 0, 567, 568, 5, 34, 0, 0, 568, 570, 6, 29, -1, 0, 569, 561, 1, 0, 0, 0, 569, 563, 1, 0, 0, 0, 569, 565, 1, 0, 0, 0, 569, 567, 1, 0, 0, 0, 570, 571, 1, 0, 0, 0, 571, 572, 3, 60, 30, 0, 572, 573, 6, 29, -1, 0, 573, 578, 1, 0, 0, 0, 574, 575, 3, 60, 30, 0, 575, 576, 6, 29, -1, 0, 576, 578, 1, 0, 0, 0, 577, 560, 1, 0, 0, 0, 577, 574, 1, 0, 0, 0, 578, 59, 1, 0, 0, 0, 579, 580, 6, 30, -1, 0, 580, 588, 3, 62, 31, 0, 581, 582, 5, 49, 0, 0, 582, 583, 3, 10, 5, 0, 583, 584, 6, 30, -1, 0, 584, 585, 5, 50, 0, 0, 585, 587, 1, 0, 0, 0, 586, 581, 1, 0, 0, 0, 587, 590, 1, 0, 0, 0, 588, 586, 1, 0, 0, 0, 588, 589, 1, 0, 0, 0, 589, 596, 1, 0, 0, 0, 590, 588, 1, 0, 0, 0, 591, 592, 3, 42, 21, 0, 592, 593, 6, 30, -1, 0, 593, 595, 1, 0, 0, 0, 594, 591, 1, 0, 0, 0, 595, 598, 1, 0, 0, 0, 596, 594, 1, 0, 0, 0, 596, 597, 1, 0, 0, 0, 597, 599, 1, 0, 0, 0, 598, 596, 1, 0, 0, 0, 599, 600, 6, 30, -1, 0, 600, 61, 1, 0, 0, 0, 601, 602, 3, 66, 33, 0, 602, 603, 6, 31, -1, 0, 603, 632, 1, 0, 0, 0, 604, 605, 5, 62, 0, 0, 605, 632, 6, 31, -1, 0, 606, 607, 3, 64, 32, 0, 607, 608, 6, 31, -1, 0, 608, 632, 1, 0, 0, 0, 609, 610, 3, 36, 18, 0, 610, 611, 6, 31, -1, 0, 611, 632, 1, 0, 0, 0, 612, 613, 3, 38, 19, 0, 613, 614, 6, 31, -1, 0, 614, 632, 1, 0, 0, 0, 615, 616, 3, 34, 17, 0, 616, 617, 6, 31, -1, 0, 617, 632, 1, 0, 0, 0, 618, 619, 3, 32, 16, 0, 619, 620, 6, 31, -1, 0, 620, 632, 1, 0, 0, 0, 621, 622, 3, 20, 10, 0, 622, 623, 6, 31, -1, 0, 623, 632, 1, 0, 0, 0, 624, 628, 5, 49, 0, 0, 625, 626, 3, 48, 24, 0, 626, 627, 6, 31, -1, 0, 627, 629, 1, 0, 0, 0, 628, 625, 1, 0, 0, 0, 628, 629, 1, 0, 0, 0, 629, 630, 1, 0, 0, 0, 630, 632, 5, 50, 0, 0, 631, 601, 1, 0, 0, 0, 631, 604, 1, 0, 0, 0, 631, 606, 1, 0, 0, 0, 631, 609, 1, 0, 0, 0, 631, 612, 1, 0, 0, 0, 631, 615, 1, 0, 0, 0, 631, 618, 1, 0, 0, 0, 631, 621, 1, 0, 0, 0, 631, 624, 1, 0, 0, 0, 632, 63, 1, 0, 0, 0, 633, 634, 5, 42, 0, 0, 634, 635, 3, 4, 2, 0, 635, 636, 5, 53, 0, 0, 636, 637, 3, 46, 23, 0, 637, 638, 5, 54, 0, 0, 638, 639, 6, 32, -1, 0, 639, 65, 1, 0, 0, 0, 640, 641, 3, 70, 35, 0, 641, 642, 6, 33, -1, 0, 642, 656, 1, 0, 0, 0, 643, 644, 5, 63, 0, 0, 644, 656, 6, 33, -1, 0, 645, 646, 5, 60, 0, 0, 646, 656, 6, 33, -1, 0, 647, 648, 5, 61, 0, 0, 648, 656, 6, 33, -1, 0, 649, 650, 3, 68, 34, 0, 650, 651, 6, 33, -1, 0, 651, 656, 1, 0, 0, 0, 652, 653, 3, 72, 36, 0, 653, 654, 6, 33, -1, 0, 654, 656, 1, 0, 0, 0, 655, 640, 1, 0, 0, 0, 655, 643, 1, 0, 0, 0, 655, 645, 1, 0, 0, 0, 655, 647, 1, 0, 0, 0, 655, 649, 1, 0, 0, 0, 655, 652, 1, 0, 0, 0, 656, 67, 1, 0, 0, 0, 657, 658, 5, 51, 0, 0, 658, 659, 3, 10, 5, 0, 659, 660, 5, 52, 0, 0, 660, 661, 6, 34, -1, 0, 661, 69, 1, 0, 0, 0, 662, 663, 5, 38, 0, 0, 663, 667, 6, 35, -1, 0, 664, 665, 5, 39, 0, 0, 665, 667, 6, 35, -1, 0, 666, 662, 1, 0, 0, 0, 666, 664, 1, 0, 0, 0, 667, 71, 1, 0, 0, 0, 668, 669, 5, 11, 0, 0, 669, 670, 5, 49, 0, 0, 670, 671, 5, 58, 0, 0, 671, 672, 5, 62, 0, 0, 672, 673, 5, 50, 0, 0, 673, 674, 6, 36, -1, 0, 674, 73, 1, 0, 0, 0, 48, 81, 83, 109, 128, 133, 135, 156, 180, 183, 190, 206, 216, 224, 231, 243, 248, 252, 257, 297, 305, 308, 310, 316, 345, 353, 371, 402, 416, 450, 458, 464, 477, 486, 494, 510, 517, 530, 537, 550, 557, 569, 577, 588, 596, 628, 631, 655, 666] \ No newline at end of file diff --git a/Phase2Template/gen/main/grammar/FunctionCraft.tokens b/Phase2Template/gen/main/grammar/FunctionCraft.tokens new file mode 100644 index 0000000..c103028 --- /dev/null +++ b/Phase2Template/gen/main/grammar/FunctionCraft.tokens @@ -0,0 +1,124 @@ +DEF=1 +END=2 +MAIN=3 +PUTS=4 +PUSH=5 +LEN=6 +RETURN=7 +IF=8 +ELSE=9 +ELSEIF=10 +METHOD=11 +PATTERN=12 +MATCH=13 +LOOP=14 +FOR=15 +IN=16 +DO=17 +CHOP=18 +CHOMP=19 +PLUS=20 +MINUS=21 +MULT=22 +DIVIDE=23 +EQUAL=24 +NOT_EQUAL=25 +LESS_EQUAL_THAN=26 +GREATER_EQUAL_THAN=27 +GREATER_THAN=28 +LESS_THAN=29 +AND=30 +OR=31 +NOT=32 +INCREMENT=33 +DECREMENT=34 +PATTERN_MATCHING_SEPARATOR=35 +SEPARATOR=36 +APPEND=37 +TRUE=38 +FALSE=39 +BREAK=40 +NEXT=41 +ARROW=42 +PLUS_ASSIGN=43 +MINUS_ASSIGN=44 +MULT_ASSIGN=45 +DIVIDE_ASSIGN=46 +MOD_ASSIGN=47 +ASSIGN=48 +LPAR=49 +RPAR=50 +LBRACK=51 +RBRACK=52 +LBRACE=53 +RBRACE=54 +COMMA=55 +DOT=56 +DOUBLEDOT=57 +COLON=58 +SEMICOLLON=59 +INT_VALUE=60 +FLOAT_VALUE=61 +IDENTIFIER=62 +STRING_VALUE=63 +COMMENT=64 +WS=65 +'def'=1 +'end'=2 +'main'=3 +'puts'=4 +'push'=5 +'len'=6 +'return'=7 +'if'=8 +'else'=9 +'elseif'=10 +'method'=11 +'pattern'=12 +'match'=13 +'loop'=14 +'for'=15 +'in'=16 +'do'=17 +'chop'=18 +'chomp'=19 +'+'=20 +'-'=21 +'*'=22 +'/'=23 +'=='=24 +'!='=25 +'<='=26 +'>='=27 +'>'=28 +'<'=29 +'&&'=30 +'||'=31 +'!'=32 +'++'=33 +'--'=34 +' |'=35 +'|'=36 +'<<'=37 +'true'=38 +'false'=39 +'break'=40 +'next'=41 +'->'=42 +'+='=43 +'-='=44 +'*='=45 +'/='=46 +'%='=47 +'='=48 +'('=49 +')'=50 +'['=51 +']'=52 +'{'=53 +'}'=54 +','=55 +'.'=56 +'..'=57 +':'=58 +';'=59 diff --git a/Phase2Template/gen/main/grammar/FunctionCraftBaseListener.java b/Phase2Template/gen/main/grammar/FunctionCraftBaseListener.java new file mode 100644 index 0000000..3debab6 --- /dev/null +++ b/Phase2Template/gen/main/grammar/FunctionCraftBaseListener.java @@ -0,0 +1,493 @@ +// Generated from U:/UT/6/PLC_TA/Design-Compiler-Course-Projects/Phase2Template/Phase2/src/main/grammar/FunctionCraft.g4 by ANTLR 4.13.1 +package main.grammar; + + import main.ast.nodes.*; + import main.ast.nodes.declaration.*; + import main.ast.nodes.statement.*; + import main.ast.nodes.expression.*; + import main.ast.nodes.expression.operators.*; + import main.ast.nodes.expression.value.*; + import main.ast.nodes.expression.value.primitive.*; + + +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.tree.ErrorNode; +import org.antlr.v4.runtime.tree.TerminalNode; + +/** + * This class provides an empty implementation of {@link FunctionCraftListener}, + * which can be extended to create a listener which only needs to handle a subset + * of the available methods. + */ +@SuppressWarnings("CheckReturnValue") +public class FunctionCraftBaseListener implements FunctionCraftListener { + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterProgram(FunctionCraftParser.ProgramContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitProgram(FunctionCraftParser.ProgramContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFunctionDeclaration(FunctionCraftParser.FunctionDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFunctionDeclaration(FunctionCraftParser.FunctionDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFunctionArgumentsDeclaration(FunctionCraftParser.FunctionArgumentsDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFunctionArgumentsDeclaration(FunctionCraftParser.FunctionArgumentsDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPatternMatching(FunctionCraftParser.PatternMatchingContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPatternMatching(FunctionCraftParser.PatternMatchingContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterMain(FunctionCraftParser.MainContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitMain(FunctionCraftParser.MainContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFunctionArguments(FunctionCraftParser.FunctionArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFunctionArguments(FunctionCraftParser.FunctionArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterReturnStatement(FunctionCraftParser.ReturnStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitReturnStatement(FunctionCraftParser.ReturnStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterIfStatement(FunctionCraftParser.IfStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitIfStatement(FunctionCraftParser.IfStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterCondition(FunctionCraftParser.ConditionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitCondition(FunctionCraftParser.ConditionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPutsStatement(FunctionCraftParser.PutsStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPutsStatement(FunctionCraftParser.PutsStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterLenStatement(FunctionCraftParser.LenStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitLenStatement(FunctionCraftParser.LenStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPushStatement(FunctionCraftParser.PushStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPushStatement(FunctionCraftParser.PushStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterLoopDoStatement(FunctionCraftParser.LoopDoStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitLoopDoStatement(FunctionCraftParser.LoopDoStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterLoopBody(FunctionCraftParser.LoopBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitLoopBody(FunctionCraftParser.LoopBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterForStatement(FunctionCraftParser.ForStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitForStatement(FunctionCraftParser.ForStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterRange(FunctionCraftParser.RangeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitRange(FunctionCraftParser.RangeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFilterStatement(FunctionCraftParser.FilterStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFilterStatement(FunctionCraftParser.FilterStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterMatchPatternStatement(FunctionCraftParser.MatchPatternStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitMatchPatternStatement(FunctionCraftParser.MatchPatternStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterChopStatement(FunctionCraftParser.ChopStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitChopStatement(FunctionCraftParser.ChopStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterChompStatement(FunctionCraftParser.ChompStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitChompStatement(FunctionCraftParser.ChompStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAssignment(FunctionCraftParser.AssignmentContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAssignment(FunctionCraftParser.AssignmentContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAccessList(FunctionCraftParser.AccessListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAccessList(FunctionCraftParser.AccessListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterStatement(FunctionCraftParser.StatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitStatement(FunctionCraftParser.StatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterBody(FunctionCraftParser.BodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitBody(FunctionCraftParser.BodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExpression(FunctionCraftParser.ExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExpression(FunctionCraftParser.ExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEqaulityExpression(FunctionCraftParser.EqaulityExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEqaulityExpression(FunctionCraftParser.EqaulityExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterRelationalExpression(FunctionCraftParser.RelationalExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitRelationalExpression(FunctionCraftParser.RelationalExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAdditiveExpression(FunctionCraftParser.AdditiveExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAdditiveExpression(FunctionCraftParser.AdditiveExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterMultiplicativeExpression(FunctionCraftParser.MultiplicativeExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitMultiplicativeExpression(FunctionCraftParser.MultiplicativeExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPreUnaryExpression(FunctionCraftParser.PreUnaryExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPreUnaryExpression(FunctionCraftParser.PreUnaryExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAccessExpression(FunctionCraftParser.AccessExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAccessExpression(FunctionCraftParser.AccessExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterOtherExpression(FunctionCraftParser.OtherExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitOtherExpression(FunctionCraftParser.OtherExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterLambdaFunction(FunctionCraftParser.LambdaFunctionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitLambdaFunction(FunctionCraftParser.LambdaFunctionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterValues(FunctionCraftParser.ValuesContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitValues(FunctionCraftParser.ValuesContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterListValue(FunctionCraftParser.ListValueContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitListValue(FunctionCraftParser.ListValueContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterBoolValue(FunctionCraftParser.BoolValueContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitBoolValue(FunctionCraftParser.BoolValueContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFunctionPointer(FunctionCraftParser.FunctionPointerContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFunctionPointer(FunctionCraftParser.FunctionPointerContext ctx) { } + + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEveryRule(ParserRuleContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEveryRule(ParserRuleContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void visitTerminal(TerminalNode node) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void visitErrorNode(ErrorNode node) { } +} \ No newline at end of file diff --git a/Phase2Template/gen/main/grammar/FunctionCraftBaseVisitor.java b/Phase2Template/gen/main/grammar/FunctionCraftBaseVisitor.java new file mode 100644 index 0000000..009af9a --- /dev/null +++ b/Phase2Template/gen/main/grammar/FunctionCraftBaseVisitor.java @@ -0,0 +1,283 @@ +// Generated from U:/UT/6/PLC_TA/Design-Compiler-Course-Projects/Phase2Template/Phase2/src/main/grammar/FunctionCraft.g4 by ANTLR 4.13.1 +package main.grammar; + + import main.ast.nodes.*; + import main.ast.nodes.declaration.*; + import main.ast.nodes.statement.*; + import main.ast.nodes.expression.*; + import main.ast.nodes.expression.operators.*; + import main.ast.nodes.expression.value.*; + import main.ast.nodes.expression.value.primitive.*; + +import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor; + +/** + * This class provides an empty implementation of {@link FunctionCraftVisitor}, + * which can be extended to create a visitor which only needs to handle a subset + * of the available methods. + * + * @param The return type of the visit operation. Use {@link Void} for + * operations with no return type. + */ +@SuppressWarnings("CheckReturnValue") +public class FunctionCraftBaseVisitor extends AbstractParseTreeVisitor implements FunctionCraftVisitor { + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitProgram(FunctionCraftParser.ProgramContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitFunctionDeclaration(FunctionCraftParser.FunctionDeclarationContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitFunctionArgumentsDeclaration(FunctionCraftParser.FunctionArgumentsDeclarationContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitPatternMatching(FunctionCraftParser.PatternMatchingContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitMain(FunctionCraftParser.MainContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitFunctionArguments(FunctionCraftParser.FunctionArgumentsContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitReturnStatement(FunctionCraftParser.ReturnStatementContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitIfStatement(FunctionCraftParser.IfStatementContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitCondition(FunctionCraftParser.ConditionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitPutsStatement(FunctionCraftParser.PutsStatementContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitLenStatement(FunctionCraftParser.LenStatementContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitPushStatement(FunctionCraftParser.PushStatementContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitLoopDoStatement(FunctionCraftParser.LoopDoStatementContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitLoopBody(FunctionCraftParser.LoopBodyContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitForStatement(FunctionCraftParser.ForStatementContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitRange(FunctionCraftParser.RangeContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitFilterStatement(FunctionCraftParser.FilterStatementContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitMatchPatternStatement(FunctionCraftParser.MatchPatternStatementContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitChopStatement(FunctionCraftParser.ChopStatementContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitChompStatement(FunctionCraftParser.ChompStatementContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitAssignment(FunctionCraftParser.AssignmentContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitAccessList(FunctionCraftParser.AccessListContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitStatement(FunctionCraftParser.StatementContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitBody(FunctionCraftParser.BodyContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitExpression(FunctionCraftParser.ExpressionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitEqaulityExpression(FunctionCraftParser.EqaulityExpressionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitRelationalExpression(FunctionCraftParser.RelationalExpressionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitAdditiveExpression(FunctionCraftParser.AdditiveExpressionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitMultiplicativeExpression(FunctionCraftParser.MultiplicativeExpressionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitPreUnaryExpression(FunctionCraftParser.PreUnaryExpressionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitAccessExpression(FunctionCraftParser.AccessExpressionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitOtherExpression(FunctionCraftParser.OtherExpressionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitLambdaFunction(FunctionCraftParser.LambdaFunctionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitValues(FunctionCraftParser.ValuesContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitListValue(FunctionCraftParser.ListValueContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitBoolValue(FunctionCraftParser.BoolValueContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitFunctionPointer(FunctionCraftParser.FunctionPointerContext ctx) { return visitChildren(ctx); } +} \ No newline at end of file diff --git a/Phase2Template/gen/main/grammar/FunctionCraftLexer.interp b/Phase2Template/gen/main/grammar/FunctionCraftLexer.interp new file mode 100644 index 0000000..6d42009 --- /dev/null +++ b/Phase2Template/gen/main/grammar/FunctionCraftLexer.interp @@ -0,0 +1,212 @@ +token literal names: +null +'def' +'end' +'main' +'puts' +'push' +'len' +'return' +'if' +'else' +'elseif' +'method' +'pattern' +'match' +'loop' +'for' +'in' +'do' +'chop' +'chomp' +'+' +'-' +'*' +'/' +'==' +'!=' +'<=' +'>=' +'>' +'<' +'&&' +'||' +'!' +'++' +'--' +' |' +'|' +'<<' +'true' +'false' +'break' +'next' +'->' +'+=' +'-=' +'*=' +'/=' +'%=' +'=' +'(' +')' +'[' +']' +'{' +'}' +',' +'.' +'..' +':' +';' +null +null +null +null +null +null + +token symbolic names: +null +DEF +END +MAIN +PUTS +PUSH +LEN +RETURN +IF +ELSE +ELSEIF +METHOD +PATTERN +MATCH +LOOP +FOR +IN +DO +CHOP +CHOMP +PLUS +MINUS +MULT +DIVIDE +EQUAL +NOT_EQUAL +LESS_EQUAL_THAN +GREATER_EQUAL_THAN +GREATER_THAN +LESS_THAN +AND +OR +NOT +INCREMENT +DECREMENT +PATTERN_MATCHING_SEPARATOR +SEPARATOR +APPEND +TRUE +FALSE +BREAK +NEXT +ARROW +PLUS_ASSIGN +MINUS_ASSIGN +MULT_ASSIGN +DIVIDE_ASSIGN +MOD_ASSIGN +ASSIGN +LPAR +RPAR +LBRACK +RBRACK +LBRACE +RBRACE +COMMA +DOT +DOUBLEDOT +COLON +SEMICOLLON +INT_VALUE +FLOAT_VALUE +IDENTIFIER +STRING_VALUE +COMMENT +WS + +rule names: +DEF +END +MAIN +PUTS +PUSH +LEN +RETURN +IF +ELSE +ELSEIF +METHOD +PATTERN +MATCH +LOOP +FOR +IN +DO +CHOP +CHOMP +PLUS +MINUS +MULT +DIVIDE +EQUAL +NOT_EQUAL +LESS_EQUAL_THAN +GREATER_EQUAL_THAN +GREATER_THAN +LESS_THAN +AND +OR +NOT +INCREMENT +DECREMENT +PATTERN_MATCHING_SEPARATOR +SEPARATOR +APPEND +TRUE +FALSE +BREAK +NEXT +ARROW +PLUS_ASSIGN +MINUS_ASSIGN +MULT_ASSIGN +DIVIDE_ASSIGN +MOD_ASSIGN +ASSIGN +LPAR +RPAR +LBRACK +RBRACK +LBRACE +RBRACE +COMMA +DOT +DOUBLEDOT +COLON +SEMICOLLON +INT_VALUE +FLOAT_VALUE +IDENTIFIER +STRING_VALUE +COMMENT +WS + +channel names: +DEFAULT_TOKEN_CHANNEL +HIDDEN + +mode names: +DEFAULT_MODE + +atn: +[4, 0, 65, 411, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 20, 1, 20, 1, 21, 1, 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, 47, 1, 47, 1, 48, 1, 48, 1, 49, 1, 49, 1, 50, 1, 50, 1, 51, 1, 51, 1, 52, 1, 52, 1, 53, 1, 53, 1, 54, 1, 54, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 5, 59, 345, 8, 59, 10, 59, 12, 59, 348, 9, 59, 3, 59, 350, 8, 59, 1, 60, 5, 60, 353, 8, 60, 10, 60, 12, 60, 356, 9, 60, 1, 60, 1, 60, 4, 60, 360, 8, 60, 11, 60, 12, 60, 361, 1, 61, 1, 61, 5, 61, 366, 8, 61, 10, 61, 12, 61, 369, 9, 61, 1, 62, 1, 62, 5, 62, 373, 8, 62, 10, 62, 12, 62, 376, 9, 62, 1, 62, 1, 62, 1, 63, 1, 63, 5, 63, 382, 8, 63, 10, 63, 12, 63, 385, 9, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 5, 63, 395, 8, 63, 10, 63, 12, 63, 398, 9, 63, 1, 63, 1, 63, 1, 63, 1, 63, 3, 63, 404, 8, 63, 1, 63, 1, 63, 1, 64, 1, 64, 1, 64, 1, 64, 1, 396, 0, 65, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 47, 95, 48, 97, 49, 99, 50, 101, 51, 103, 52, 105, 53, 107, 54, 109, 55, 111, 56, 113, 57, 115, 58, 117, 59, 119, 60, 121, 61, 123, 62, 125, 63, 127, 64, 129, 65, 1, 0, 7, 1, 0, 49, 57, 1, 0, 48, 57, 3, 0, 65, 90, 95, 95, 97, 122, 4, 0, 48, 57, 65, 90, 95, 95, 97, 122, 1, 0, 34, 34, 2, 0, 10, 10, 13, 13, 3, 0, 9, 10, 13, 13, 32, 32, 419, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, 0, 0, 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 119, 1, 0, 0, 0, 0, 121, 1, 0, 0, 0, 0, 123, 1, 0, 0, 0, 0, 125, 1, 0, 0, 0, 0, 127, 1, 0, 0, 0, 0, 129, 1, 0, 0, 0, 1, 131, 1, 0, 0, 0, 3, 135, 1, 0, 0, 0, 5, 139, 1, 0, 0, 0, 7, 144, 1, 0, 0, 0, 9, 149, 1, 0, 0, 0, 11, 154, 1, 0, 0, 0, 13, 158, 1, 0, 0, 0, 15, 165, 1, 0, 0, 0, 17, 168, 1, 0, 0, 0, 19, 173, 1, 0, 0, 0, 21, 180, 1, 0, 0, 0, 23, 187, 1, 0, 0, 0, 25, 195, 1, 0, 0, 0, 27, 201, 1, 0, 0, 0, 29, 206, 1, 0, 0, 0, 31, 210, 1, 0, 0, 0, 33, 213, 1, 0, 0, 0, 35, 216, 1, 0, 0, 0, 37, 221, 1, 0, 0, 0, 39, 227, 1, 0, 0, 0, 41, 229, 1, 0, 0, 0, 43, 231, 1, 0, 0, 0, 45, 233, 1, 0, 0, 0, 47, 235, 1, 0, 0, 0, 49, 238, 1, 0, 0, 0, 51, 241, 1, 0, 0, 0, 53, 244, 1, 0, 0, 0, 55, 247, 1, 0, 0, 0, 57, 249, 1, 0, 0, 0, 59, 251, 1, 0, 0, 0, 61, 254, 1, 0, 0, 0, 63, 257, 1, 0, 0, 0, 65, 259, 1, 0, 0, 0, 67, 262, 1, 0, 0, 0, 69, 265, 1, 0, 0, 0, 71, 271, 1, 0, 0, 0, 73, 273, 1, 0, 0, 0, 75, 276, 1, 0, 0, 0, 77, 281, 1, 0, 0, 0, 79, 287, 1, 0, 0, 0, 81, 293, 1, 0, 0, 0, 83, 298, 1, 0, 0, 0, 85, 301, 1, 0, 0, 0, 87, 304, 1, 0, 0, 0, 89, 307, 1, 0, 0, 0, 91, 310, 1, 0, 0, 0, 93, 313, 1, 0, 0, 0, 95, 316, 1, 0, 0, 0, 97, 318, 1, 0, 0, 0, 99, 320, 1, 0, 0, 0, 101, 322, 1, 0, 0, 0, 103, 324, 1, 0, 0, 0, 105, 326, 1, 0, 0, 0, 107, 328, 1, 0, 0, 0, 109, 330, 1, 0, 0, 0, 111, 332, 1, 0, 0, 0, 113, 334, 1, 0, 0, 0, 115, 337, 1, 0, 0, 0, 117, 339, 1, 0, 0, 0, 119, 349, 1, 0, 0, 0, 121, 354, 1, 0, 0, 0, 123, 363, 1, 0, 0, 0, 125, 370, 1, 0, 0, 0, 127, 403, 1, 0, 0, 0, 129, 407, 1, 0, 0, 0, 131, 132, 5, 100, 0, 0, 132, 133, 5, 101, 0, 0, 133, 134, 5, 102, 0, 0, 134, 2, 1, 0, 0, 0, 135, 136, 5, 101, 0, 0, 136, 137, 5, 110, 0, 0, 137, 138, 5, 100, 0, 0, 138, 4, 1, 0, 0, 0, 139, 140, 5, 109, 0, 0, 140, 141, 5, 97, 0, 0, 141, 142, 5, 105, 0, 0, 142, 143, 5, 110, 0, 0, 143, 6, 1, 0, 0, 0, 144, 145, 5, 112, 0, 0, 145, 146, 5, 117, 0, 0, 146, 147, 5, 116, 0, 0, 147, 148, 5, 115, 0, 0, 148, 8, 1, 0, 0, 0, 149, 150, 5, 112, 0, 0, 150, 151, 5, 117, 0, 0, 151, 152, 5, 115, 0, 0, 152, 153, 5, 104, 0, 0, 153, 10, 1, 0, 0, 0, 154, 155, 5, 108, 0, 0, 155, 156, 5, 101, 0, 0, 156, 157, 5, 110, 0, 0, 157, 12, 1, 0, 0, 0, 158, 159, 5, 114, 0, 0, 159, 160, 5, 101, 0, 0, 160, 161, 5, 116, 0, 0, 161, 162, 5, 117, 0, 0, 162, 163, 5, 114, 0, 0, 163, 164, 5, 110, 0, 0, 164, 14, 1, 0, 0, 0, 165, 166, 5, 105, 0, 0, 166, 167, 5, 102, 0, 0, 167, 16, 1, 0, 0, 0, 168, 169, 5, 101, 0, 0, 169, 170, 5, 108, 0, 0, 170, 171, 5, 115, 0, 0, 171, 172, 5, 101, 0, 0, 172, 18, 1, 0, 0, 0, 173, 174, 5, 101, 0, 0, 174, 175, 5, 108, 0, 0, 175, 176, 5, 115, 0, 0, 176, 177, 5, 101, 0, 0, 177, 178, 5, 105, 0, 0, 178, 179, 5, 102, 0, 0, 179, 20, 1, 0, 0, 0, 180, 181, 5, 109, 0, 0, 181, 182, 5, 101, 0, 0, 182, 183, 5, 116, 0, 0, 183, 184, 5, 104, 0, 0, 184, 185, 5, 111, 0, 0, 185, 186, 5, 100, 0, 0, 186, 22, 1, 0, 0, 0, 187, 188, 5, 112, 0, 0, 188, 189, 5, 97, 0, 0, 189, 190, 5, 116, 0, 0, 190, 191, 5, 116, 0, 0, 191, 192, 5, 101, 0, 0, 192, 193, 5, 114, 0, 0, 193, 194, 5, 110, 0, 0, 194, 24, 1, 0, 0, 0, 195, 196, 5, 109, 0, 0, 196, 197, 5, 97, 0, 0, 197, 198, 5, 116, 0, 0, 198, 199, 5, 99, 0, 0, 199, 200, 5, 104, 0, 0, 200, 26, 1, 0, 0, 0, 201, 202, 5, 108, 0, 0, 202, 203, 5, 111, 0, 0, 203, 204, 5, 111, 0, 0, 204, 205, 5, 112, 0, 0, 205, 28, 1, 0, 0, 0, 206, 207, 5, 102, 0, 0, 207, 208, 5, 111, 0, 0, 208, 209, 5, 114, 0, 0, 209, 30, 1, 0, 0, 0, 210, 211, 5, 105, 0, 0, 211, 212, 5, 110, 0, 0, 212, 32, 1, 0, 0, 0, 213, 214, 5, 100, 0, 0, 214, 215, 5, 111, 0, 0, 215, 34, 1, 0, 0, 0, 216, 217, 5, 99, 0, 0, 217, 218, 5, 104, 0, 0, 218, 219, 5, 111, 0, 0, 219, 220, 5, 112, 0, 0, 220, 36, 1, 0, 0, 0, 221, 222, 5, 99, 0, 0, 222, 223, 5, 104, 0, 0, 223, 224, 5, 111, 0, 0, 224, 225, 5, 109, 0, 0, 225, 226, 5, 112, 0, 0, 226, 38, 1, 0, 0, 0, 227, 228, 5, 43, 0, 0, 228, 40, 1, 0, 0, 0, 229, 230, 5, 45, 0, 0, 230, 42, 1, 0, 0, 0, 231, 232, 5, 42, 0, 0, 232, 44, 1, 0, 0, 0, 233, 234, 5, 47, 0, 0, 234, 46, 1, 0, 0, 0, 235, 236, 5, 61, 0, 0, 236, 237, 5, 61, 0, 0, 237, 48, 1, 0, 0, 0, 238, 239, 5, 33, 0, 0, 239, 240, 5, 61, 0, 0, 240, 50, 1, 0, 0, 0, 241, 242, 5, 60, 0, 0, 242, 243, 5, 61, 0, 0, 243, 52, 1, 0, 0, 0, 244, 245, 5, 62, 0, 0, 245, 246, 5, 61, 0, 0, 246, 54, 1, 0, 0, 0, 247, 248, 5, 62, 0, 0, 248, 56, 1, 0, 0, 0, 249, 250, 5, 60, 0, 0, 250, 58, 1, 0, 0, 0, 251, 252, 5, 38, 0, 0, 252, 253, 5, 38, 0, 0, 253, 60, 1, 0, 0, 0, 254, 255, 5, 124, 0, 0, 255, 256, 5, 124, 0, 0, 256, 62, 1, 0, 0, 0, 257, 258, 5, 33, 0, 0, 258, 64, 1, 0, 0, 0, 259, 260, 5, 43, 0, 0, 260, 261, 5, 43, 0, 0, 261, 66, 1, 0, 0, 0, 262, 263, 5, 45, 0, 0, 263, 264, 5, 45, 0, 0, 264, 68, 1, 0, 0, 0, 265, 266, 5, 32, 0, 0, 266, 267, 5, 32, 0, 0, 267, 268, 5, 32, 0, 0, 268, 269, 5, 32, 0, 0, 269, 270, 5, 124, 0, 0, 270, 70, 1, 0, 0, 0, 271, 272, 5, 124, 0, 0, 272, 72, 1, 0, 0, 0, 273, 274, 5, 60, 0, 0, 274, 275, 5, 60, 0, 0, 275, 74, 1, 0, 0, 0, 276, 277, 5, 116, 0, 0, 277, 278, 5, 114, 0, 0, 278, 279, 5, 117, 0, 0, 279, 280, 5, 101, 0, 0, 280, 76, 1, 0, 0, 0, 281, 282, 5, 102, 0, 0, 282, 283, 5, 97, 0, 0, 283, 284, 5, 108, 0, 0, 284, 285, 5, 115, 0, 0, 285, 286, 5, 101, 0, 0, 286, 78, 1, 0, 0, 0, 287, 288, 5, 98, 0, 0, 288, 289, 5, 114, 0, 0, 289, 290, 5, 101, 0, 0, 290, 291, 5, 97, 0, 0, 291, 292, 5, 107, 0, 0, 292, 80, 1, 0, 0, 0, 293, 294, 5, 110, 0, 0, 294, 295, 5, 101, 0, 0, 295, 296, 5, 120, 0, 0, 296, 297, 5, 116, 0, 0, 297, 82, 1, 0, 0, 0, 298, 299, 5, 45, 0, 0, 299, 300, 5, 62, 0, 0, 300, 84, 1, 0, 0, 0, 301, 302, 5, 43, 0, 0, 302, 303, 5, 61, 0, 0, 303, 86, 1, 0, 0, 0, 304, 305, 5, 45, 0, 0, 305, 306, 5, 61, 0, 0, 306, 88, 1, 0, 0, 0, 307, 308, 5, 42, 0, 0, 308, 309, 5, 61, 0, 0, 309, 90, 1, 0, 0, 0, 310, 311, 5, 47, 0, 0, 311, 312, 5, 61, 0, 0, 312, 92, 1, 0, 0, 0, 313, 314, 5, 37, 0, 0, 314, 315, 5, 61, 0, 0, 315, 94, 1, 0, 0, 0, 316, 317, 5, 61, 0, 0, 317, 96, 1, 0, 0, 0, 318, 319, 5, 40, 0, 0, 319, 98, 1, 0, 0, 0, 320, 321, 5, 41, 0, 0, 321, 100, 1, 0, 0, 0, 322, 323, 5, 91, 0, 0, 323, 102, 1, 0, 0, 0, 324, 325, 5, 93, 0, 0, 325, 104, 1, 0, 0, 0, 326, 327, 5, 123, 0, 0, 327, 106, 1, 0, 0, 0, 328, 329, 5, 125, 0, 0, 329, 108, 1, 0, 0, 0, 330, 331, 5, 44, 0, 0, 331, 110, 1, 0, 0, 0, 332, 333, 5, 46, 0, 0, 333, 112, 1, 0, 0, 0, 334, 335, 5, 46, 0, 0, 335, 336, 5, 46, 0, 0, 336, 114, 1, 0, 0, 0, 337, 338, 5, 58, 0, 0, 338, 116, 1, 0, 0, 0, 339, 340, 5, 59, 0, 0, 340, 118, 1, 0, 0, 0, 341, 350, 5, 48, 0, 0, 342, 346, 7, 0, 0, 0, 343, 345, 7, 1, 0, 0, 344, 343, 1, 0, 0, 0, 345, 348, 1, 0, 0, 0, 346, 344, 1, 0, 0, 0, 346, 347, 1, 0, 0, 0, 347, 350, 1, 0, 0, 0, 348, 346, 1, 0, 0, 0, 349, 341, 1, 0, 0, 0, 349, 342, 1, 0, 0, 0, 350, 120, 1, 0, 0, 0, 351, 353, 7, 1, 0, 0, 352, 351, 1, 0, 0, 0, 353, 356, 1, 0, 0, 0, 354, 352, 1, 0, 0, 0, 354, 355, 1, 0, 0, 0, 355, 357, 1, 0, 0, 0, 356, 354, 1, 0, 0, 0, 357, 359, 5, 46, 0, 0, 358, 360, 7, 1, 0, 0, 359, 358, 1, 0, 0, 0, 360, 361, 1, 0, 0, 0, 361, 359, 1, 0, 0, 0, 361, 362, 1, 0, 0, 0, 362, 122, 1, 0, 0, 0, 363, 367, 7, 2, 0, 0, 364, 366, 7, 3, 0, 0, 365, 364, 1, 0, 0, 0, 366, 369, 1, 0, 0, 0, 367, 365, 1, 0, 0, 0, 367, 368, 1, 0, 0, 0, 368, 124, 1, 0, 0, 0, 369, 367, 1, 0, 0, 0, 370, 374, 5, 34, 0, 0, 371, 373, 8, 4, 0, 0, 372, 371, 1, 0, 0, 0, 373, 376, 1, 0, 0, 0, 374, 372, 1, 0, 0, 0, 374, 375, 1, 0, 0, 0, 375, 377, 1, 0, 0, 0, 376, 374, 1, 0, 0, 0, 377, 378, 5, 34, 0, 0, 378, 126, 1, 0, 0, 0, 379, 383, 5, 35, 0, 0, 380, 382, 8, 5, 0, 0, 381, 380, 1, 0, 0, 0, 382, 385, 1, 0, 0, 0, 383, 381, 1, 0, 0, 0, 383, 384, 1, 0, 0, 0, 384, 404, 1, 0, 0, 0, 385, 383, 1, 0, 0, 0, 386, 387, 5, 61, 0, 0, 387, 388, 5, 98, 0, 0, 388, 389, 5, 101, 0, 0, 389, 390, 5, 103, 0, 0, 390, 391, 5, 105, 0, 0, 391, 392, 5, 110, 0, 0, 392, 396, 1, 0, 0, 0, 393, 395, 9, 0, 0, 0, 394, 393, 1, 0, 0, 0, 395, 398, 1, 0, 0, 0, 396, 397, 1, 0, 0, 0, 396, 394, 1, 0, 0, 0, 397, 399, 1, 0, 0, 0, 398, 396, 1, 0, 0, 0, 399, 400, 5, 61, 0, 0, 400, 401, 5, 101, 0, 0, 401, 402, 5, 110, 0, 0, 402, 404, 5, 100, 0, 0, 403, 379, 1, 0, 0, 0, 403, 386, 1, 0, 0, 0, 404, 405, 1, 0, 0, 0, 405, 406, 6, 63, 0, 0, 406, 128, 1, 0, 0, 0, 407, 408, 7, 6, 0, 0, 408, 409, 1, 0, 0, 0, 409, 410, 6, 64, 0, 0, 410, 130, 1, 0, 0, 0, 10, 0, 346, 349, 354, 361, 367, 374, 383, 396, 403, 1, 6, 0, 0] \ No newline at end of file diff --git a/Phase2Template/gen/main/grammar/FunctionCraftLexer.java b/Phase2Template/gen/main/grammar/FunctionCraftLexer.java new file mode 100644 index 0000000..173033b --- /dev/null +++ b/Phase2Template/gen/main/grammar/FunctionCraftLexer.java @@ -0,0 +1,403 @@ +// Generated from U:/UT/6/PLC_TA/Design-Compiler-Course-Projects/Phase2Template/Phase2/src/main/grammar/FunctionCraft.g4 by ANTLR 4.13.1 +package main.grammar; + + import main.ast.nodes.*; + import main.ast.nodes.declaration.*; + import main.ast.nodes.statement.*; + import main.ast.nodes.expression.*; + import main.ast.nodes.expression.operators.*; + import main.ast.nodes.expression.value.*; + import main.ast.nodes.expression.value.primitive.*; + +import org.antlr.v4.runtime.Lexer; +import org.antlr.v4.runtime.CharStream; +import org.antlr.v4.runtime.Token; +import org.antlr.v4.runtime.TokenStream; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.misc.*; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast", "CheckReturnValue", "this-escape"}) +public class FunctionCraftLexer extends Lexer { + static { RuntimeMetaData.checkVersion("4.13.1", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + DEF=1, END=2, MAIN=3, PUTS=4, PUSH=5, LEN=6, RETURN=7, IF=8, ELSE=9, ELSEIF=10, + METHOD=11, PATTERN=12, MATCH=13, LOOP=14, FOR=15, IN=16, DO=17, CHOP=18, + CHOMP=19, PLUS=20, MINUS=21, MULT=22, DIVIDE=23, EQUAL=24, NOT_EQUAL=25, + LESS_EQUAL_THAN=26, GREATER_EQUAL_THAN=27, GREATER_THAN=28, LESS_THAN=29, + AND=30, OR=31, NOT=32, INCREMENT=33, DECREMENT=34, PATTERN_MATCHING_SEPARATOR=35, + SEPARATOR=36, APPEND=37, TRUE=38, FALSE=39, BREAK=40, NEXT=41, ARROW=42, + PLUS_ASSIGN=43, MINUS_ASSIGN=44, MULT_ASSIGN=45, DIVIDE_ASSIGN=46, MOD_ASSIGN=47, + ASSIGN=48, LPAR=49, RPAR=50, LBRACK=51, RBRACK=52, LBRACE=53, RBRACE=54, + COMMA=55, DOT=56, DOUBLEDOT=57, COLON=58, SEMICOLLON=59, INT_VALUE=60, + FLOAT_VALUE=61, IDENTIFIER=62, STRING_VALUE=63, COMMENT=64, WS=65; + public static String[] channelNames = { + "DEFAULT_TOKEN_CHANNEL", "HIDDEN" + }; + + public static String[] modeNames = { + "DEFAULT_MODE" + }; + + private static String[] makeRuleNames() { + return new String[] { + "DEF", "END", "MAIN", "PUTS", "PUSH", "LEN", "RETURN", "IF", "ELSE", + "ELSEIF", "METHOD", "PATTERN", "MATCH", "LOOP", "FOR", "IN", "DO", "CHOP", + "CHOMP", "PLUS", "MINUS", "MULT", "DIVIDE", "EQUAL", "NOT_EQUAL", "LESS_EQUAL_THAN", + "GREATER_EQUAL_THAN", "GREATER_THAN", "LESS_THAN", "AND", "OR", "NOT", + "INCREMENT", "DECREMENT", "PATTERN_MATCHING_SEPARATOR", "SEPARATOR", + "APPEND", "TRUE", "FALSE", "BREAK", "NEXT", "ARROW", "PLUS_ASSIGN", "MINUS_ASSIGN", + "MULT_ASSIGN", "DIVIDE_ASSIGN", "MOD_ASSIGN", "ASSIGN", "LPAR", "RPAR", + "LBRACK", "RBRACK", "LBRACE", "RBRACE", "COMMA", "DOT", "DOUBLEDOT", + "COLON", "SEMICOLLON", "INT_VALUE", "FLOAT_VALUE", "IDENTIFIER", "STRING_VALUE", + "COMMENT", "WS" + }; + } + public static final String[] ruleNames = makeRuleNames(); + + private static String[] makeLiteralNames() { + return new String[] { + null, "'def'", "'end'", "'main'", "'puts'", "'push'", "'len'", "'return'", + "'if'", "'else'", "'elseif'", "'method'", "'pattern'", "'match'", "'loop'", + "'for'", "'in'", "'do'", "'chop'", "'chomp'", "'+'", "'-'", "'*'", "'/'", + "'=='", "'!='", "'<='", "'>='", "'>'", "'<'", "'&&'", "'||'", "'!'", + "'++'", "'--'", "' |'", "'|'", "'<<'", "'true'", "'false'", "'break'", + "'next'", "'->'", "'+='", "'-='", "'*='", "'/='", "'%='", "'='", "'('", + "')'", "'['", "']'", "'{'", "'}'", "','", "'.'", "'..'", "':'", "';'" + }; + } + private static final String[] _LITERAL_NAMES = makeLiteralNames(); + private static String[] makeSymbolicNames() { + return new String[] { + null, "DEF", "END", "MAIN", "PUTS", "PUSH", "LEN", "RETURN", "IF", "ELSE", + "ELSEIF", "METHOD", "PATTERN", "MATCH", "LOOP", "FOR", "IN", "DO", "CHOP", + "CHOMP", "PLUS", "MINUS", "MULT", "DIVIDE", "EQUAL", "NOT_EQUAL", "LESS_EQUAL_THAN", + "GREATER_EQUAL_THAN", "GREATER_THAN", "LESS_THAN", "AND", "OR", "NOT", + "INCREMENT", "DECREMENT", "PATTERN_MATCHING_SEPARATOR", "SEPARATOR", + "APPEND", "TRUE", "FALSE", "BREAK", "NEXT", "ARROW", "PLUS_ASSIGN", "MINUS_ASSIGN", + "MULT_ASSIGN", "DIVIDE_ASSIGN", "MOD_ASSIGN", "ASSIGN", "LPAR", "RPAR", + "LBRACK", "RBRACK", "LBRACE", "RBRACE", "COMMA", "DOT", "DOUBLEDOT", + "COLON", "SEMICOLLON", "INT_VALUE", "FLOAT_VALUE", "IDENTIFIER", "STRING_VALUE", + "COMMENT", "WS" + }; + } + private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames(); + public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); + + /** + * @deprecated Use {@link #VOCABULARY} instead. + */ + @Deprecated + public static final String[] tokenNames; + static { + tokenNames = new String[_SYMBOLIC_NAMES.length]; + for (int i = 0; i < tokenNames.length; i++) { + tokenNames[i] = VOCABULARY.getLiteralName(i); + if (tokenNames[i] == null) { + tokenNames[i] = VOCABULARY.getSymbolicName(i); + } + + if (tokenNames[i] == null) { + tokenNames[i] = ""; + } + } + } + + @Override + @Deprecated + public String[] getTokenNames() { + return tokenNames; + } + + @Override + + public Vocabulary getVocabulary() { + return VOCABULARY; + } + + + public FunctionCraftLexer(CharStream input) { + super(input); + _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + + @Override + public String getGrammarFileName() { return "FunctionCraft.g4"; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public String[] getChannelNames() { return channelNames; } + + @Override + public String[] getModeNames() { return modeNames; } + + @Override + public ATN getATN() { return _ATN; } + + public static final String _serializedATN = + "\u0004\u0000A\u019b\u0006\uffff\uffff\u0002\u0000\u0007\u0000\u0002\u0001"+ + "\u0007\u0001\u0002\u0002\u0007\u0002\u0002\u0003\u0007\u0003\u0002\u0004"+ + "\u0007\u0004\u0002\u0005\u0007\u0005\u0002\u0006\u0007\u0006\u0002\u0007"+ + "\u0007\u0007\u0002\b\u0007\b\u0002\t\u0007\t\u0002\n\u0007\n\u0002\u000b"+ + "\u0007\u000b\u0002\f\u0007\f\u0002\r\u0007\r\u0002\u000e\u0007\u000e\u0002"+ + "\u000f\u0007\u000f\u0002\u0010\u0007\u0010\u0002\u0011\u0007\u0011\u0002"+ + "\u0012\u0007\u0012\u0002\u0013\u0007\u0013\u0002\u0014\u0007\u0014\u0002"+ + "\u0015\u0007\u0015\u0002\u0016\u0007\u0016\u0002\u0017\u0007\u0017\u0002"+ + "\u0018\u0007\u0018\u0002\u0019\u0007\u0019\u0002\u001a\u0007\u001a\u0002"+ + "\u001b\u0007\u001b\u0002\u001c\u0007\u001c\u0002\u001d\u0007\u001d\u0002"+ + "\u001e\u0007\u001e\u0002\u001f\u0007\u001f\u0002 \u0007 \u0002!\u0007"+ + "!\u0002\"\u0007\"\u0002#\u0007#\u0002$\u0007$\u0002%\u0007%\u0002&\u0007"+ + "&\u0002\'\u0007\'\u0002(\u0007(\u0002)\u0007)\u0002*\u0007*\u0002+\u0007"+ + "+\u0002,\u0007,\u0002-\u0007-\u0002.\u0007.\u0002/\u0007/\u00020\u0007"+ + "0\u00021\u00071\u00022\u00072\u00023\u00073\u00024\u00074\u00025\u0007"+ + "5\u00026\u00076\u00027\u00077\u00028\u00078\u00029\u00079\u0002:\u0007"+ + ":\u0002;\u0007;\u0002<\u0007<\u0002=\u0007=\u0002>\u0007>\u0002?\u0007"+ + "?\u0002@\u0007@\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0000\u0001"+ + "\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0002\u0001\u0002\u0001"+ + "\u0002\u0001\u0002\u0001\u0002\u0001\u0003\u0001\u0003\u0001\u0003\u0001"+ + "\u0003\u0001\u0003\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001"+ + "\u0004\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0006\u0001"+ + "\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001"+ + "\u0007\u0001\u0007\u0001\u0007\u0001\b\u0001\b\u0001\b\u0001\b\u0001\b"+ + "\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\n\u0001"+ + "\n\u0001\n\u0001\n\u0001\n\u0001\n\u0001\n\u0001\u000b\u0001\u000b\u0001"+ + "\u000b\u0001\u000b\u0001\u000b\u0001\u000b\u0001\u000b\u0001\u000b\u0001"+ + "\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\r\u0001\r\u0001\r\u0001"+ + "\r\u0001\r\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000f"+ + "\u0001\u000f\u0001\u000f\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0011"+ + "\u0001\u0011\u0001\u0011\u0001\u0011\u0001\u0011\u0001\u0012\u0001\u0012"+ + "\u0001\u0012\u0001\u0012\u0001\u0012\u0001\u0012\u0001\u0013\u0001\u0013"+ + "\u0001\u0014\u0001\u0014\u0001\u0015\u0001\u0015\u0001\u0016\u0001\u0016"+ + "\u0001\u0017\u0001\u0017\u0001\u0017\u0001\u0018\u0001\u0018\u0001\u0018"+ + "\u0001\u0019\u0001\u0019\u0001\u0019\u0001\u001a\u0001\u001a\u0001\u001a"+ + "\u0001\u001b\u0001\u001b\u0001\u001c\u0001\u001c\u0001\u001d\u0001\u001d"+ + "\u0001\u001d\u0001\u001e\u0001\u001e\u0001\u001e\u0001\u001f\u0001\u001f"+ + "\u0001 \u0001 \u0001 \u0001!\u0001!\u0001!\u0001\"\u0001\"\u0001\"\u0001"+ + "\"\u0001\"\u0001\"\u0001#\u0001#\u0001$\u0001$\u0001$\u0001%\u0001%\u0001"+ + "%\u0001%\u0001%\u0001&\u0001&\u0001&\u0001&\u0001&\u0001&\u0001\'\u0001"+ + "\'\u0001\'\u0001\'\u0001\'\u0001\'\u0001(\u0001(\u0001(\u0001(\u0001("+ + "\u0001)\u0001)\u0001)\u0001*\u0001*\u0001*\u0001+\u0001+\u0001+\u0001"+ + ",\u0001,\u0001,\u0001-\u0001-\u0001-\u0001.\u0001.\u0001.\u0001/\u0001"+ + "/\u00010\u00010\u00011\u00011\u00012\u00012\u00013\u00013\u00014\u0001"+ + "4\u00015\u00015\u00016\u00016\u00017\u00017\u00018\u00018\u00018\u0001"+ + "9\u00019\u0001:\u0001:\u0001;\u0001;\u0001;\u0005;\u0159\b;\n;\f;\u015c"+ + "\t;\u0003;\u015e\b;\u0001<\u0005<\u0161\b<\n<\f<\u0164\t<\u0001<\u0001"+ + "<\u0004<\u0168\b<\u000b<\f<\u0169\u0001=\u0001=\u0005=\u016e\b=\n=\f="+ + "\u0171\t=\u0001>\u0001>\u0005>\u0175\b>\n>\f>\u0178\t>\u0001>\u0001>\u0001"+ + "?\u0001?\u0005?\u017e\b?\n?\f?\u0181\t?\u0001?\u0001?\u0001?\u0001?\u0001"+ + "?\u0001?\u0001?\u0001?\u0005?\u018b\b?\n?\f?\u018e\t?\u0001?\u0001?\u0001"+ + "?\u0001?\u0003?\u0194\b?\u0001?\u0001?\u0001@\u0001@\u0001@\u0001@\u0001"+ + "\u018c\u0000A\u0001\u0001\u0003\u0002\u0005\u0003\u0007\u0004\t\u0005"+ + "\u000b\u0006\r\u0007\u000f\b\u0011\t\u0013\n\u0015\u000b\u0017\f\u0019"+ + "\r\u001b\u000e\u001d\u000f\u001f\u0010!\u0011#\u0012%\u0013\'\u0014)\u0015"+ + "+\u0016-\u0017/\u00181\u00193\u001a5\u001b7\u001c9\u001d;\u001e=\u001f"+ + "? A!C\"E#G$I%K&M\'O(Q)S*U+W,Y-[.]/_0a1c2e3g4i5k6m7o8q9s:u;w}?\u007f"+ + "@\u0081A\u0001\u0000\u0007\u0001\u000019\u0001\u000009\u0003\u0000AZ_"+ + "_az\u0004\u000009AZ__az\u0001\u0000\"\"\u0002\u0000\n\n\r\r\u0003\u0000"+ + "\t\n\r\r \u01a3\u0000\u0001\u0001\u0000\u0000\u0000\u0000\u0003\u0001"+ + "\u0000\u0000\u0000\u0000\u0005\u0001\u0000\u0000\u0000\u0000\u0007\u0001"+ + "\u0000\u0000\u0000\u0000\t\u0001\u0000\u0000\u0000\u0000\u000b\u0001\u0000"+ + "\u0000\u0000\u0000\r\u0001\u0000\u0000\u0000\u0000\u000f\u0001\u0000\u0000"+ + "\u0000\u0000\u0011\u0001\u0000\u0000\u0000\u0000\u0013\u0001\u0000\u0000"+ + "\u0000\u0000\u0015\u0001\u0000\u0000\u0000\u0000\u0017\u0001\u0000\u0000"+ + "\u0000\u0000\u0019\u0001\u0000\u0000\u0000\u0000\u001b\u0001\u0000\u0000"+ + "\u0000\u0000\u001d\u0001\u0000\u0000\u0000\u0000\u001f\u0001\u0000\u0000"+ + "\u0000\u0000!\u0001\u0000\u0000\u0000\u0000#\u0001\u0000\u0000\u0000\u0000"+ + "%\u0001\u0000\u0000\u0000\u0000\'\u0001\u0000\u0000\u0000\u0000)\u0001"+ + "\u0000\u0000\u0000\u0000+\u0001\u0000\u0000\u0000\u0000-\u0001\u0000\u0000"+ + "\u0000\u0000/\u0001\u0000\u0000\u0000\u00001\u0001\u0000\u0000\u0000\u0000"+ + "3\u0001\u0000\u0000\u0000\u00005\u0001\u0000\u0000\u0000\u00007\u0001"+ + "\u0000\u0000\u0000\u00009\u0001\u0000\u0000\u0000\u0000;\u0001\u0000\u0000"+ + "\u0000\u0000=\u0001\u0000\u0000\u0000\u0000?\u0001\u0000\u0000\u0000\u0000"+ + "A\u0001\u0000\u0000\u0000\u0000C\u0001\u0000\u0000\u0000\u0000E\u0001"+ + "\u0000\u0000\u0000\u0000G\u0001\u0000\u0000\u0000\u0000I\u0001\u0000\u0000"+ + "\u0000\u0000K\u0001\u0000\u0000\u0000\u0000M\u0001\u0000\u0000\u0000\u0000"+ + "O\u0001\u0000\u0000\u0000\u0000Q\u0001\u0000\u0000\u0000\u0000S\u0001"+ + "\u0000\u0000\u0000\u0000U\u0001\u0000\u0000\u0000\u0000W\u0001\u0000\u0000"+ + "\u0000\u0000Y\u0001\u0000\u0000\u0000\u0000[\u0001\u0000\u0000\u0000\u0000"+ + "]\u0001\u0000\u0000\u0000\u0000_\u0001\u0000\u0000\u0000\u0000a\u0001"+ + "\u0000\u0000\u0000\u0000c\u0001\u0000\u0000\u0000\u0000e\u0001\u0000\u0000"+ + "\u0000\u0000g\u0001\u0000\u0000\u0000\u0000i\u0001\u0000\u0000\u0000\u0000"+ + "k\u0001\u0000\u0000\u0000\u0000m\u0001\u0000\u0000\u0000\u0000o\u0001"+ + "\u0000\u0000\u0000\u0000q\u0001\u0000\u0000\u0000\u0000s\u0001\u0000\u0000"+ + "\u0000\u0000u\u0001\u0000\u0000\u0000\u0000w\u0001\u0000\u0000\u0000\u0000"+ + "y\u0001\u0000\u0000\u0000\u0000{\u0001\u0000\u0000\u0000\u0000}\u0001"+ + "\u0000\u0000\u0000\u0000\u007f\u0001\u0000\u0000\u0000\u0000\u0081\u0001"+ + "\u0000\u0000\u0000\u0001\u0083\u0001\u0000\u0000\u0000\u0003\u0087\u0001"+ + "\u0000\u0000\u0000\u0005\u008b\u0001\u0000\u0000\u0000\u0007\u0090\u0001"+ + "\u0000\u0000\u0000\t\u0095\u0001\u0000\u0000\u0000\u000b\u009a\u0001\u0000"+ + "\u0000\u0000\r\u009e\u0001\u0000\u0000\u0000\u000f\u00a5\u0001\u0000\u0000"+ + "\u0000\u0011\u00a8\u0001\u0000\u0000\u0000\u0013\u00ad\u0001\u0000\u0000"+ + "\u0000\u0015\u00b4\u0001\u0000\u0000\u0000\u0017\u00bb\u0001\u0000\u0000"+ + "\u0000\u0019\u00c3\u0001\u0000\u0000\u0000\u001b\u00c9\u0001\u0000\u0000"+ + "\u0000\u001d\u00ce\u0001\u0000\u0000\u0000\u001f\u00d2\u0001\u0000\u0000"+ + "\u0000!\u00d5\u0001\u0000\u0000\u0000#\u00d8\u0001\u0000\u0000\u0000%"+ + "\u00dd\u0001\u0000\u0000\u0000\'\u00e3\u0001\u0000\u0000\u0000)\u00e5"+ + "\u0001\u0000\u0000\u0000+\u00e7\u0001\u0000\u0000\u0000-\u00e9\u0001\u0000"+ + "\u0000\u0000/\u00eb\u0001\u0000\u0000\u00001\u00ee\u0001\u0000\u0000\u0000"+ + "3\u00f1\u0001\u0000\u0000\u00005\u00f4\u0001\u0000\u0000\u00007\u00f7"+ + "\u0001\u0000\u0000\u00009\u00f9\u0001\u0000\u0000\u0000;\u00fb\u0001\u0000"+ + "\u0000\u0000=\u00fe\u0001\u0000\u0000\u0000?\u0101\u0001\u0000\u0000\u0000"+ + "A\u0103\u0001\u0000\u0000\u0000C\u0106\u0001\u0000\u0000\u0000E\u0109"+ + "\u0001\u0000\u0000\u0000G\u010f\u0001\u0000\u0000\u0000I\u0111\u0001\u0000"+ + "\u0000\u0000K\u0114\u0001\u0000\u0000\u0000M\u0119\u0001\u0000\u0000\u0000"+ + "O\u011f\u0001\u0000\u0000\u0000Q\u0125\u0001\u0000\u0000\u0000S\u012a"+ + "\u0001\u0000\u0000\u0000U\u012d\u0001\u0000\u0000\u0000W\u0130\u0001\u0000"+ + "\u0000\u0000Y\u0133\u0001\u0000\u0000\u0000[\u0136\u0001\u0000\u0000\u0000"+ + "]\u0139\u0001\u0000\u0000\u0000_\u013c\u0001\u0000\u0000\u0000a\u013e"+ + "\u0001\u0000\u0000\u0000c\u0140\u0001\u0000\u0000\u0000e\u0142\u0001\u0000"+ + "\u0000\u0000g\u0144\u0001\u0000\u0000\u0000i\u0146\u0001\u0000\u0000\u0000"+ + "k\u0148\u0001\u0000\u0000\u0000m\u014a\u0001\u0000\u0000\u0000o\u014c"+ + "\u0001\u0000\u0000\u0000q\u014e\u0001\u0000\u0000\u0000s\u0151\u0001\u0000"+ + "\u0000\u0000u\u0153\u0001\u0000\u0000\u0000w\u015d\u0001\u0000\u0000\u0000"+ + "y\u0162\u0001\u0000\u0000\u0000{\u016b\u0001\u0000\u0000\u0000}\u0172"+ + "\u0001\u0000\u0000\u0000\u007f\u0193\u0001\u0000\u0000\u0000\u0081\u0197"+ + "\u0001\u0000\u0000\u0000\u0083\u0084\u0005d\u0000\u0000\u0084\u0085\u0005"+ + "e\u0000\u0000\u0085\u0086\u0005f\u0000\u0000\u0086\u0002\u0001\u0000\u0000"+ + "\u0000\u0087\u0088\u0005e\u0000\u0000\u0088\u0089\u0005n\u0000\u0000\u0089"+ + "\u008a\u0005d\u0000\u0000\u008a\u0004\u0001\u0000\u0000\u0000\u008b\u008c"+ + "\u0005m\u0000\u0000\u008c\u008d\u0005a\u0000\u0000\u008d\u008e\u0005i"+ + "\u0000\u0000\u008e\u008f\u0005n\u0000\u0000\u008f\u0006\u0001\u0000\u0000"+ + "\u0000\u0090\u0091\u0005p\u0000\u0000\u0091\u0092\u0005u\u0000\u0000\u0092"+ + "\u0093\u0005t\u0000\u0000\u0093\u0094\u0005s\u0000\u0000\u0094\b\u0001"+ + "\u0000\u0000\u0000\u0095\u0096\u0005p\u0000\u0000\u0096\u0097\u0005u\u0000"+ + "\u0000\u0097\u0098\u0005s\u0000\u0000\u0098\u0099\u0005h\u0000\u0000\u0099"+ + "\n\u0001\u0000\u0000\u0000\u009a\u009b\u0005l\u0000\u0000\u009b\u009c"+ + "\u0005e\u0000\u0000\u009c\u009d\u0005n\u0000\u0000\u009d\f\u0001\u0000"+ + "\u0000\u0000\u009e\u009f\u0005r\u0000\u0000\u009f\u00a0\u0005e\u0000\u0000"+ + "\u00a0\u00a1\u0005t\u0000\u0000\u00a1\u00a2\u0005u\u0000\u0000\u00a2\u00a3"+ + "\u0005r\u0000\u0000\u00a3\u00a4\u0005n\u0000\u0000\u00a4\u000e\u0001\u0000"+ + "\u0000\u0000\u00a5\u00a6\u0005i\u0000\u0000\u00a6\u00a7\u0005f\u0000\u0000"+ + "\u00a7\u0010\u0001\u0000\u0000\u0000\u00a8\u00a9\u0005e\u0000\u0000\u00a9"+ + "\u00aa\u0005l\u0000\u0000\u00aa\u00ab\u0005s\u0000\u0000\u00ab\u00ac\u0005"+ + "e\u0000\u0000\u00ac\u0012\u0001\u0000\u0000\u0000\u00ad\u00ae\u0005e\u0000"+ + "\u0000\u00ae\u00af\u0005l\u0000\u0000\u00af\u00b0\u0005s\u0000\u0000\u00b0"+ + "\u00b1\u0005e\u0000\u0000\u00b1\u00b2\u0005i\u0000\u0000\u00b2\u00b3\u0005"+ + "f\u0000\u0000\u00b3\u0014\u0001\u0000\u0000\u0000\u00b4\u00b5\u0005m\u0000"+ + "\u0000\u00b5\u00b6\u0005e\u0000\u0000\u00b6\u00b7\u0005t\u0000\u0000\u00b7"+ + "\u00b8\u0005h\u0000\u0000\u00b8\u00b9\u0005o\u0000\u0000\u00b9\u00ba\u0005"+ + "d\u0000\u0000\u00ba\u0016\u0001\u0000\u0000\u0000\u00bb\u00bc\u0005p\u0000"+ + "\u0000\u00bc\u00bd\u0005a\u0000\u0000\u00bd\u00be\u0005t\u0000\u0000\u00be"+ + "\u00bf\u0005t\u0000\u0000\u00bf\u00c0\u0005e\u0000\u0000\u00c0\u00c1\u0005"+ + "r\u0000\u0000\u00c1\u00c2\u0005n\u0000\u0000\u00c2\u0018\u0001\u0000\u0000"+ + "\u0000\u00c3\u00c4\u0005m\u0000\u0000\u00c4\u00c5\u0005a\u0000\u0000\u00c5"+ + "\u00c6\u0005t\u0000\u0000\u00c6\u00c7\u0005c\u0000\u0000\u00c7\u00c8\u0005"+ + "h\u0000\u0000\u00c8\u001a\u0001\u0000\u0000\u0000\u00c9\u00ca\u0005l\u0000"+ + "\u0000\u00ca\u00cb\u0005o\u0000\u0000\u00cb\u00cc\u0005o\u0000\u0000\u00cc"+ + "\u00cd\u0005p\u0000\u0000\u00cd\u001c\u0001\u0000\u0000\u0000\u00ce\u00cf"+ + "\u0005f\u0000\u0000\u00cf\u00d0\u0005o\u0000\u0000\u00d0\u00d1\u0005r"+ + "\u0000\u0000\u00d1\u001e\u0001\u0000\u0000\u0000\u00d2\u00d3\u0005i\u0000"+ + "\u0000\u00d3\u00d4\u0005n\u0000\u0000\u00d4 \u0001\u0000\u0000\u0000\u00d5"+ + "\u00d6\u0005d\u0000\u0000\u00d6\u00d7\u0005o\u0000\u0000\u00d7\"\u0001"+ + "\u0000\u0000\u0000\u00d8\u00d9\u0005c\u0000\u0000\u00d9\u00da\u0005h\u0000"+ + "\u0000\u00da\u00db\u0005o\u0000\u0000\u00db\u00dc\u0005p\u0000\u0000\u00dc"+ + "$\u0001\u0000\u0000\u0000\u00dd\u00de\u0005c\u0000\u0000\u00de\u00df\u0005"+ + "h\u0000\u0000\u00df\u00e0\u0005o\u0000\u0000\u00e0\u00e1\u0005m\u0000"+ + "\u0000\u00e1\u00e2\u0005p\u0000\u0000\u00e2&\u0001\u0000\u0000\u0000\u00e3"+ + "\u00e4\u0005+\u0000\u0000\u00e4(\u0001\u0000\u0000\u0000\u00e5\u00e6\u0005"+ + "-\u0000\u0000\u00e6*\u0001\u0000\u0000\u0000\u00e7\u00e8\u0005*\u0000"+ + "\u0000\u00e8,\u0001\u0000\u0000\u0000\u00e9\u00ea\u0005/\u0000\u0000\u00ea"+ + ".\u0001\u0000\u0000\u0000\u00eb\u00ec\u0005=\u0000\u0000\u00ec\u00ed\u0005"+ + "=\u0000\u0000\u00ed0\u0001\u0000\u0000\u0000\u00ee\u00ef\u0005!\u0000"+ + "\u0000\u00ef\u00f0\u0005=\u0000\u0000\u00f02\u0001\u0000\u0000\u0000\u00f1"+ + "\u00f2\u0005<\u0000\u0000\u00f2\u00f3\u0005=\u0000\u0000\u00f34\u0001"+ + "\u0000\u0000\u0000\u00f4\u00f5\u0005>\u0000\u0000\u00f5\u00f6\u0005=\u0000"+ + "\u0000\u00f66\u0001\u0000\u0000\u0000\u00f7\u00f8\u0005>\u0000\u0000\u00f8"+ + "8\u0001\u0000\u0000\u0000\u00f9\u00fa\u0005<\u0000\u0000\u00fa:\u0001"+ + "\u0000\u0000\u0000\u00fb\u00fc\u0005&\u0000\u0000\u00fc\u00fd\u0005&\u0000"+ + "\u0000\u00fd<\u0001\u0000\u0000\u0000\u00fe\u00ff\u0005|\u0000\u0000\u00ff"+ + "\u0100\u0005|\u0000\u0000\u0100>\u0001\u0000\u0000\u0000\u0101\u0102\u0005"+ + "!\u0000\u0000\u0102@\u0001\u0000\u0000\u0000\u0103\u0104\u0005+\u0000"+ + "\u0000\u0104\u0105\u0005+\u0000\u0000\u0105B\u0001\u0000\u0000\u0000\u0106"+ + "\u0107\u0005-\u0000\u0000\u0107\u0108\u0005-\u0000\u0000\u0108D\u0001"+ + "\u0000\u0000\u0000\u0109\u010a\u0005 \u0000\u0000\u010a\u010b\u0005 \u0000"+ + "\u0000\u010b\u010c\u0005 \u0000\u0000\u010c\u010d\u0005 \u0000\u0000\u010d"+ + "\u010e\u0005|\u0000\u0000\u010eF\u0001\u0000\u0000\u0000\u010f\u0110\u0005"+ + "|\u0000\u0000\u0110H\u0001\u0000\u0000\u0000\u0111\u0112\u0005<\u0000"+ + "\u0000\u0112\u0113\u0005<\u0000\u0000\u0113J\u0001\u0000\u0000\u0000\u0114"+ + "\u0115\u0005t\u0000\u0000\u0115\u0116\u0005r\u0000\u0000\u0116\u0117\u0005"+ + "u\u0000\u0000\u0117\u0118\u0005e\u0000\u0000\u0118L\u0001\u0000\u0000"+ + "\u0000\u0119\u011a\u0005f\u0000\u0000\u011a\u011b\u0005a\u0000\u0000\u011b"+ + "\u011c\u0005l\u0000\u0000\u011c\u011d\u0005s\u0000\u0000\u011d\u011e\u0005"+ + "e\u0000\u0000\u011eN\u0001\u0000\u0000\u0000\u011f\u0120\u0005b\u0000"+ + "\u0000\u0120\u0121\u0005r\u0000\u0000\u0121\u0122\u0005e\u0000\u0000\u0122"+ + "\u0123\u0005a\u0000\u0000\u0123\u0124\u0005k\u0000\u0000\u0124P\u0001"+ + "\u0000\u0000\u0000\u0125\u0126\u0005n\u0000\u0000\u0126\u0127\u0005e\u0000"+ + "\u0000\u0127\u0128\u0005x\u0000\u0000\u0128\u0129\u0005t\u0000\u0000\u0129"+ + "R\u0001\u0000\u0000\u0000\u012a\u012b\u0005-\u0000\u0000\u012b\u012c\u0005"+ + ">\u0000\u0000\u012cT\u0001\u0000\u0000\u0000\u012d\u012e\u0005+\u0000"+ + "\u0000\u012e\u012f\u0005=\u0000\u0000\u012fV\u0001\u0000\u0000\u0000\u0130"+ + "\u0131\u0005-\u0000\u0000\u0131\u0132\u0005=\u0000\u0000\u0132X\u0001"+ + "\u0000\u0000\u0000\u0133\u0134\u0005*\u0000\u0000\u0134\u0135\u0005=\u0000"+ + "\u0000\u0135Z\u0001\u0000\u0000\u0000\u0136\u0137\u0005/\u0000\u0000\u0137"+ + "\u0138\u0005=\u0000\u0000\u0138\\\u0001\u0000\u0000\u0000\u0139\u013a"+ + "\u0005%\u0000\u0000\u013a\u013b\u0005=\u0000\u0000\u013b^\u0001\u0000"+ + "\u0000\u0000\u013c\u013d\u0005=\u0000\u0000\u013d`\u0001\u0000\u0000\u0000"+ + "\u013e\u013f\u0005(\u0000\u0000\u013fb\u0001\u0000\u0000\u0000\u0140\u0141"+ + "\u0005)\u0000\u0000\u0141d\u0001\u0000\u0000\u0000\u0142\u0143\u0005["+ + "\u0000\u0000\u0143f\u0001\u0000\u0000\u0000\u0144\u0145\u0005]\u0000\u0000"+ + "\u0145h\u0001\u0000\u0000\u0000\u0146\u0147\u0005{\u0000\u0000\u0147j"+ + "\u0001\u0000\u0000\u0000\u0148\u0149\u0005}\u0000\u0000\u0149l\u0001\u0000"+ + "\u0000\u0000\u014a\u014b\u0005,\u0000\u0000\u014bn\u0001\u0000\u0000\u0000"+ + "\u014c\u014d\u0005.\u0000\u0000\u014dp\u0001\u0000\u0000\u0000\u014e\u014f"+ + "\u0005.\u0000\u0000\u014f\u0150\u0005.\u0000\u0000\u0150r\u0001\u0000"+ + "\u0000\u0000\u0151\u0152\u0005:\u0000\u0000\u0152t\u0001\u0000\u0000\u0000"+ + "\u0153\u0154\u0005;\u0000\u0000\u0154v\u0001\u0000\u0000\u0000\u0155\u015e"+ + "\u00050\u0000\u0000\u0156\u015a\u0007\u0000\u0000\u0000\u0157\u0159\u0007"+ + "\u0001\u0000\u0000\u0158\u0157\u0001\u0000\u0000\u0000\u0159\u015c\u0001"+ + "\u0000\u0000\u0000\u015a\u0158\u0001\u0000\u0000\u0000\u015a\u015b\u0001"+ + "\u0000\u0000\u0000\u015b\u015e\u0001\u0000\u0000\u0000\u015c\u015a\u0001"+ + "\u0000\u0000\u0000\u015d\u0155\u0001\u0000\u0000\u0000\u015d\u0156\u0001"+ + "\u0000\u0000\u0000\u015ex\u0001\u0000\u0000\u0000\u015f\u0161\u0007\u0001"+ + "\u0000\u0000\u0160\u015f\u0001\u0000\u0000\u0000\u0161\u0164\u0001\u0000"+ + "\u0000\u0000\u0162\u0160\u0001\u0000\u0000\u0000\u0162\u0163\u0001\u0000"+ + "\u0000\u0000\u0163\u0165\u0001\u0000\u0000\u0000\u0164\u0162\u0001\u0000"+ + "\u0000\u0000\u0165\u0167\u0005.\u0000\u0000\u0166\u0168\u0007\u0001\u0000"+ + "\u0000\u0167\u0166\u0001\u0000\u0000\u0000\u0168\u0169\u0001\u0000\u0000"+ + "\u0000\u0169\u0167\u0001\u0000\u0000\u0000\u0169\u016a\u0001\u0000\u0000"+ + "\u0000\u016az\u0001\u0000\u0000\u0000\u016b\u016f\u0007\u0002\u0000\u0000"+ + "\u016c\u016e\u0007\u0003\u0000\u0000\u016d\u016c\u0001\u0000\u0000\u0000"+ + "\u016e\u0171\u0001\u0000\u0000\u0000\u016f\u016d\u0001\u0000\u0000\u0000"+ + "\u016f\u0170\u0001\u0000\u0000\u0000\u0170|\u0001\u0000\u0000\u0000\u0171"+ + "\u016f\u0001\u0000\u0000\u0000\u0172\u0176\u0005\"\u0000\u0000\u0173\u0175"+ + "\b\u0004\u0000\u0000\u0174\u0173\u0001\u0000\u0000\u0000\u0175\u0178\u0001"+ + "\u0000\u0000\u0000\u0176\u0174\u0001\u0000\u0000\u0000\u0176\u0177\u0001"+ + "\u0000\u0000\u0000\u0177\u0179\u0001\u0000\u0000\u0000\u0178\u0176\u0001"+ + "\u0000\u0000\u0000\u0179\u017a\u0005\"\u0000\u0000\u017a~\u0001\u0000"+ + "\u0000\u0000\u017b\u017f\u0005#\u0000\u0000\u017c\u017e\b\u0005\u0000"+ + "\u0000\u017d\u017c\u0001\u0000\u0000\u0000\u017e\u0181\u0001\u0000\u0000"+ + "\u0000\u017f\u017d\u0001\u0000\u0000\u0000\u017f\u0180\u0001\u0000\u0000"+ + "\u0000\u0180\u0194\u0001\u0000\u0000\u0000\u0181\u017f\u0001\u0000\u0000"+ + "\u0000\u0182\u0183\u0005=\u0000\u0000\u0183\u0184\u0005b\u0000\u0000\u0184"+ + "\u0185\u0005e\u0000\u0000\u0185\u0186\u0005g\u0000\u0000\u0186\u0187\u0005"+ + "i\u0000\u0000\u0187\u0188\u0005n\u0000\u0000\u0188\u018c\u0001\u0000\u0000"+ + "\u0000\u0189\u018b\t\u0000\u0000\u0000\u018a\u0189\u0001\u0000\u0000\u0000"+ + "\u018b\u018e\u0001\u0000\u0000\u0000\u018c\u018d\u0001\u0000\u0000\u0000"+ + "\u018c\u018a\u0001\u0000\u0000\u0000\u018d\u018f\u0001\u0000\u0000\u0000"+ + "\u018e\u018c\u0001\u0000\u0000\u0000\u018f\u0190\u0005=\u0000\u0000\u0190"+ + "\u0191\u0005e\u0000\u0000\u0191\u0192\u0005n\u0000\u0000\u0192\u0194\u0005"+ + "d\u0000\u0000\u0193\u017b\u0001\u0000\u0000\u0000\u0193\u0182\u0001\u0000"+ + "\u0000\u0000\u0194\u0195\u0001\u0000\u0000\u0000\u0195\u0196\u0006?\u0000"+ + "\u0000\u0196\u0080\u0001\u0000\u0000\u0000\u0197\u0198\u0007\u0006\u0000"+ + "\u0000\u0198\u0199\u0001\u0000\u0000\u0000\u0199\u019a\u0006@\u0000\u0000"+ + "\u019a\u0082\u0001\u0000\u0000\u0000\n\u0000\u015a\u015d\u0162\u0169\u016f"+ + "\u0176\u017f\u018c\u0193\u0001\u0006\u0000\u0000"; + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} \ No newline at end of file diff --git a/Phase2Template/gen/main/grammar/FunctionCraftLexer.tokens b/Phase2Template/gen/main/grammar/FunctionCraftLexer.tokens new file mode 100644 index 0000000..c103028 --- /dev/null +++ b/Phase2Template/gen/main/grammar/FunctionCraftLexer.tokens @@ -0,0 +1,124 @@ +DEF=1 +END=2 +MAIN=3 +PUTS=4 +PUSH=5 +LEN=6 +RETURN=7 +IF=8 +ELSE=9 +ELSEIF=10 +METHOD=11 +PATTERN=12 +MATCH=13 +LOOP=14 +FOR=15 +IN=16 +DO=17 +CHOP=18 +CHOMP=19 +PLUS=20 +MINUS=21 +MULT=22 +DIVIDE=23 +EQUAL=24 +NOT_EQUAL=25 +LESS_EQUAL_THAN=26 +GREATER_EQUAL_THAN=27 +GREATER_THAN=28 +LESS_THAN=29 +AND=30 +OR=31 +NOT=32 +INCREMENT=33 +DECREMENT=34 +PATTERN_MATCHING_SEPARATOR=35 +SEPARATOR=36 +APPEND=37 +TRUE=38 +FALSE=39 +BREAK=40 +NEXT=41 +ARROW=42 +PLUS_ASSIGN=43 +MINUS_ASSIGN=44 +MULT_ASSIGN=45 +DIVIDE_ASSIGN=46 +MOD_ASSIGN=47 +ASSIGN=48 +LPAR=49 +RPAR=50 +LBRACK=51 +RBRACK=52 +LBRACE=53 +RBRACE=54 +COMMA=55 +DOT=56 +DOUBLEDOT=57 +COLON=58 +SEMICOLLON=59 +INT_VALUE=60 +FLOAT_VALUE=61 +IDENTIFIER=62 +STRING_VALUE=63 +COMMENT=64 +WS=65 +'def'=1 +'end'=2 +'main'=3 +'puts'=4 +'push'=5 +'len'=6 +'return'=7 +'if'=8 +'else'=9 +'elseif'=10 +'method'=11 +'pattern'=12 +'match'=13 +'loop'=14 +'for'=15 +'in'=16 +'do'=17 +'chop'=18 +'chomp'=19 +'+'=20 +'-'=21 +'*'=22 +'/'=23 +'=='=24 +'!='=25 +'<='=26 +'>='=27 +'>'=28 +'<'=29 +'&&'=30 +'||'=31 +'!'=32 +'++'=33 +'--'=34 +' |'=35 +'|'=36 +'<<'=37 +'true'=38 +'false'=39 +'break'=40 +'next'=41 +'->'=42 +'+='=43 +'-='=44 +'*='=45 +'/='=46 +'%='=47 +'='=48 +'('=49 +')'=50 +'['=51 +']'=52 +'{'=53 +'}'=54 +','=55 +'.'=56 +'..'=57 +':'=58 +';'=59 diff --git a/Phase2Template/gen/main/grammar/FunctionCraftListener.java b/Phase2Template/gen/main/grammar/FunctionCraftListener.java new file mode 100644 index 0000000..b62b954 --- /dev/null +++ b/Phase2Template/gen/main/grammar/FunctionCraftListener.java @@ -0,0 +1,389 @@ +// Generated from U:/UT/6/PLC_TA/Design-Compiler-Course-Projects/Phase2Template/Phase2/src/main/grammar/FunctionCraft.g4 by ANTLR 4.13.1 +package main.grammar; + + import main.ast.nodes.*; + import main.ast.nodes.declaration.*; + import main.ast.nodes.statement.*; + import main.ast.nodes.expression.*; + import main.ast.nodes.expression.operators.*; + import main.ast.nodes.expression.value.*; + import main.ast.nodes.expression.value.primitive.*; + +import org.antlr.v4.runtime.tree.ParseTreeListener; + +/** + * This interface defines a complete listener for a parse tree produced by + * {@link FunctionCraftParser}. + */ +public interface FunctionCraftListener extends ParseTreeListener { + /** + * Enter a parse tree produced by {@link FunctionCraftParser#program}. + * @param ctx the parse tree + */ + void enterProgram(FunctionCraftParser.ProgramContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#program}. + * @param ctx the parse tree + */ + void exitProgram(FunctionCraftParser.ProgramContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#functionDeclaration}. + * @param ctx the parse tree + */ + void enterFunctionDeclaration(FunctionCraftParser.FunctionDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#functionDeclaration}. + * @param ctx the parse tree + */ + void exitFunctionDeclaration(FunctionCraftParser.FunctionDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#functionArgumentsDeclaration}. + * @param ctx the parse tree + */ + void enterFunctionArgumentsDeclaration(FunctionCraftParser.FunctionArgumentsDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#functionArgumentsDeclaration}. + * @param ctx the parse tree + */ + void exitFunctionArgumentsDeclaration(FunctionCraftParser.FunctionArgumentsDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#patternMatching}. + * @param ctx the parse tree + */ + void enterPatternMatching(FunctionCraftParser.PatternMatchingContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#patternMatching}. + * @param ctx the parse tree + */ + void exitPatternMatching(FunctionCraftParser.PatternMatchingContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#main}. + * @param ctx the parse tree + */ + void enterMain(FunctionCraftParser.MainContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#main}. + * @param ctx the parse tree + */ + void exitMain(FunctionCraftParser.MainContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#functionArguments}. + * @param ctx the parse tree + */ + void enterFunctionArguments(FunctionCraftParser.FunctionArgumentsContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#functionArguments}. + * @param ctx the parse tree + */ + void exitFunctionArguments(FunctionCraftParser.FunctionArgumentsContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#returnStatement}. + * @param ctx the parse tree + */ + void enterReturnStatement(FunctionCraftParser.ReturnStatementContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#returnStatement}. + * @param ctx the parse tree + */ + void exitReturnStatement(FunctionCraftParser.ReturnStatementContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#ifStatement}. + * @param ctx the parse tree + */ + void enterIfStatement(FunctionCraftParser.IfStatementContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#ifStatement}. + * @param ctx the parse tree + */ + void exitIfStatement(FunctionCraftParser.IfStatementContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#condition}. + * @param ctx the parse tree + */ + void enterCondition(FunctionCraftParser.ConditionContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#condition}. + * @param ctx the parse tree + */ + void exitCondition(FunctionCraftParser.ConditionContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#putsStatement}. + * @param ctx the parse tree + */ + void enterPutsStatement(FunctionCraftParser.PutsStatementContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#putsStatement}. + * @param ctx the parse tree + */ + void exitPutsStatement(FunctionCraftParser.PutsStatementContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#lenStatement}. + * @param ctx the parse tree + */ + void enterLenStatement(FunctionCraftParser.LenStatementContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#lenStatement}. + * @param ctx the parse tree + */ + void exitLenStatement(FunctionCraftParser.LenStatementContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#pushStatement}. + * @param ctx the parse tree + */ + void enterPushStatement(FunctionCraftParser.PushStatementContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#pushStatement}. + * @param ctx the parse tree + */ + void exitPushStatement(FunctionCraftParser.PushStatementContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#loopDoStatement}. + * @param ctx the parse tree + */ + void enterLoopDoStatement(FunctionCraftParser.LoopDoStatementContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#loopDoStatement}. + * @param ctx the parse tree + */ + void exitLoopDoStatement(FunctionCraftParser.LoopDoStatementContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#loopBody}. + * @param ctx the parse tree + */ + void enterLoopBody(FunctionCraftParser.LoopBodyContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#loopBody}. + * @param ctx the parse tree + */ + void exitLoopBody(FunctionCraftParser.LoopBodyContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#forStatement}. + * @param ctx the parse tree + */ + void enterForStatement(FunctionCraftParser.ForStatementContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#forStatement}. + * @param ctx the parse tree + */ + void exitForStatement(FunctionCraftParser.ForStatementContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#range}. + * @param ctx the parse tree + */ + void enterRange(FunctionCraftParser.RangeContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#range}. + * @param ctx the parse tree + */ + void exitRange(FunctionCraftParser.RangeContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#filterStatement}. + * @param ctx the parse tree + */ + void enterFilterStatement(FunctionCraftParser.FilterStatementContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#filterStatement}. + * @param ctx the parse tree + */ + void exitFilterStatement(FunctionCraftParser.FilterStatementContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#matchPatternStatement}. + * @param ctx the parse tree + */ + void enterMatchPatternStatement(FunctionCraftParser.MatchPatternStatementContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#matchPatternStatement}. + * @param ctx the parse tree + */ + void exitMatchPatternStatement(FunctionCraftParser.MatchPatternStatementContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#chopStatement}. + * @param ctx the parse tree + */ + void enterChopStatement(FunctionCraftParser.ChopStatementContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#chopStatement}. + * @param ctx the parse tree + */ + void exitChopStatement(FunctionCraftParser.ChopStatementContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#chompStatement}. + * @param ctx the parse tree + */ + void enterChompStatement(FunctionCraftParser.ChompStatementContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#chompStatement}. + * @param ctx the parse tree + */ + void exitChompStatement(FunctionCraftParser.ChompStatementContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#assignment}. + * @param ctx the parse tree + */ + void enterAssignment(FunctionCraftParser.AssignmentContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#assignment}. + * @param ctx the parse tree + */ + void exitAssignment(FunctionCraftParser.AssignmentContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#accessList}. + * @param ctx the parse tree + */ + void enterAccessList(FunctionCraftParser.AccessListContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#accessList}. + * @param ctx the parse tree + */ + void exitAccessList(FunctionCraftParser.AccessListContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#statement}. + * @param ctx the parse tree + */ + void enterStatement(FunctionCraftParser.StatementContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#statement}. + * @param ctx the parse tree + */ + void exitStatement(FunctionCraftParser.StatementContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#body}. + * @param ctx the parse tree + */ + void enterBody(FunctionCraftParser.BodyContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#body}. + * @param ctx the parse tree + */ + void exitBody(FunctionCraftParser.BodyContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#expression}. + * @param ctx the parse tree + */ + void enterExpression(FunctionCraftParser.ExpressionContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#expression}. + * @param ctx the parse tree + */ + void exitExpression(FunctionCraftParser.ExpressionContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#eqaulityExpression}. + * @param ctx the parse tree + */ + void enterEqaulityExpression(FunctionCraftParser.EqaulityExpressionContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#eqaulityExpression}. + * @param ctx the parse tree + */ + void exitEqaulityExpression(FunctionCraftParser.EqaulityExpressionContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#relationalExpression}. + * @param ctx the parse tree + */ + void enterRelationalExpression(FunctionCraftParser.RelationalExpressionContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#relationalExpression}. + * @param ctx the parse tree + */ + void exitRelationalExpression(FunctionCraftParser.RelationalExpressionContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#additiveExpression}. + * @param ctx the parse tree + */ + void enterAdditiveExpression(FunctionCraftParser.AdditiveExpressionContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#additiveExpression}. + * @param ctx the parse tree + */ + void exitAdditiveExpression(FunctionCraftParser.AdditiveExpressionContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#multiplicativeExpression}. + * @param ctx the parse tree + */ + void enterMultiplicativeExpression(FunctionCraftParser.MultiplicativeExpressionContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#multiplicativeExpression}. + * @param ctx the parse tree + */ + void exitMultiplicativeExpression(FunctionCraftParser.MultiplicativeExpressionContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#preUnaryExpression}. + * @param ctx the parse tree + */ + void enterPreUnaryExpression(FunctionCraftParser.PreUnaryExpressionContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#preUnaryExpression}. + * @param ctx the parse tree + */ + void exitPreUnaryExpression(FunctionCraftParser.PreUnaryExpressionContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#accessExpression}. + * @param ctx the parse tree + */ + void enterAccessExpression(FunctionCraftParser.AccessExpressionContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#accessExpression}. + * @param ctx the parse tree + */ + void exitAccessExpression(FunctionCraftParser.AccessExpressionContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#otherExpression}. + * @param ctx the parse tree + */ + void enterOtherExpression(FunctionCraftParser.OtherExpressionContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#otherExpression}. + * @param ctx the parse tree + */ + void exitOtherExpression(FunctionCraftParser.OtherExpressionContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#lambdaFunction}. + * @param ctx the parse tree + */ + void enterLambdaFunction(FunctionCraftParser.LambdaFunctionContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#lambdaFunction}. + * @param ctx the parse tree + */ + void exitLambdaFunction(FunctionCraftParser.LambdaFunctionContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#values}. + * @param ctx the parse tree + */ + void enterValues(FunctionCraftParser.ValuesContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#values}. + * @param ctx the parse tree + */ + void exitValues(FunctionCraftParser.ValuesContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#listValue}. + * @param ctx the parse tree + */ + void enterListValue(FunctionCraftParser.ListValueContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#listValue}. + * @param ctx the parse tree + */ + void exitListValue(FunctionCraftParser.ListValueContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#boolValue}. + * @param ctx the parse tree + */ + void enterBoolValue(FunctionCraftParser.BoolValueContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#boolValue}. + * @param ctx the parse tree + */ + void exitBoolValue(FunctionCraftParser.BoolValueContext ctx); + /** + * Enter a parse tree produced by {@link FunctionCraftParser#functionPointer}. + * @param ctx the parse tree + */ + void enterFunctionPointer(FunctionCraftParser.FunctionPointerContext ctx); + /** + * Exit a parse tree produced by {@link FunctionCraftParser#functionPointer}. + * @param ctx the parse tree + */ + void exitFunctionPointer(FunctionCraftParser.FunctionPointerContext ctx); +} \ No newline at end of file diff --git a/Phase2Template/gen/main/grammar/FunctionCraftParser.java b/Phase2Template/gen/main/grammar/FunctionCraftParser.java new file mode 100644 index 0000000..49dee5c --- /dev/null +++ b/Phase2Template/gen/main/grammar/FunctionCraftParser.java @@ -0,0 +1,4435 @@ +// Generated from U:/UT/6/PLC_TA/Design-Compiler-Course-Projects/Phase2Template/Phase2/src/main/grammar/FunctionCraft.g4 by ANTLR 4.13.1 +package main.grammar; + + import main.ast.nodes.*; + import main.ast.nodes.declaration.*; + import main.ast.nodes.statement.*; + import main.ast.nodes.expression.*; + import main.ast.nodes.expression.operators.*; + import main.ast.nodes.expression.value.*; + import main.ast.nodes.expression.value.primitive.*; + +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.misc.*; +import org.antlr.v4.runtime.tree.*; +import java.util.List; +import java.util.Iterator; +import java.util.ArrayList; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast", "CheckReturnValue"}) +public class FunctionCraftParser extends Parser { + static { RuntimeMetaData.checkVersion("4.13.1", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + DEF=1, END=2, MAIN=3, PUTS=4, PUSH=5, LEN=6, RETURN=7, IF=8, ELSE=9, ELSEIF=10, + METHOD=11, PATTERN=12, MATCH=13, LOOP=14, FOR=15, IN=16, DO=17, CHOP=18, + CHOMP=19, PLUS=20, MINUS=21, MULT=22, DIVIDE=23, EQUAL=24, NOT_EQUAL=25, + LESS_EQUAL_THAN=26, GREATER_EQUAL_THAN=27, GREATER_THAN=28, LESS_THAN=29, + AND=30, OR=31, NOT=32, INCREMENT=33, DECREMENT=34, PATTERN_MATCHING_SEPARATOR=35, + SEPARATOR=36, APPEND=37, TRUE=38, FALSE=39, BREAK=40, NEXT=41, ARROW=42, + PLUS_ASSIGN=43, MINUS_ASSIGN=44, MULT_ASSIGN=45, DIVIDE_ASSIGN=46, MOD_ASSIGN=47, + ASSIGN=48, LPAR=49, RPAR=50, LBRACK=51, RBRACK=52, LBRACE=53, RBRACE=54, + COMMA=55, DOT=56, DOUBLEDOT=57, COLON=58, SEMICOLLON=59, INT_VALUE=60, + FLOAT_VALUE=61, IDENTIFIER=62, STRING_VALUE=63, COMMENT=64, WS=65; + public static final int + RULE_program = 0, RULE_functionDeclaration = 1, RULE_functionArgumentsDeclaration = 2, + RULE_patternMatching = 3, RULE_main = 4, RULE_functionArguments = 5, RULE_returnStatement = 6, + RULE_ifStatement = 7, RULE_condition = 8, RULE_putsStatement = 9, RULE_lenStatement = 10, + RULE_pushStatement = 11, RULE_loopDoStatement = 12, RULE_loopBody = 13, + RULE_forStatement = 14, RULE_range = 15, RULE_filterStatement = 16, RULE_matchPatternStatement = 17, + RULE_chopStatement = 18, RULE_chompStatement = 19, RULE_assignment = 20, + RULE_accessList = 21, RULE_statement = 22, RULE_body = 23, RULE_expression = 24, + RULE_eqaulityExpression = 25, RULE_relationalExpression = 26, RULE_additiveExpression = 27, + RULE_multiplicativeExpression = 28, RULE_preUnaryExpression = 29, RULE_accessExpression = 30, + RULE_otherExpression = 31, RULE_lambdaFunction = 32, RULE_values = 33, + RULE_listValue = 34, RULE_boolValue = 35, RULE_functionPointer = 36; + private static String[] makeRuleNames() { + return new String[] { + "program", "functionDeclaration", "functionArgumentsDeclaration", "patternMatching", + "main", "functionArguments", "returnStatement", "ifStatement", "condition", + "putsStatement", "lenStatement", "pushStatement", "loopDoStatement", + "loopBody", "forStatement", "range", "filterStatement", "matchPatternStatement", + "chopStatement", "chompStatement", "assignment", "accessList", "statement", + "body", "expression", "eqaulityExpression", "relationalExpression", "additiveExpression", + "multiplicativeExpression", "preUnaryExpression", "accessExpression", + "otherExpression", "lambdaFunction", "values", "listValue", "boolValue", + "functionPointer" + }; + } + public static final String[] ruleNames = makeRuleNames(); + + private static String[] makeLiteralNames() { + return new String[] { + null, "'def'", "'end'", "'main'", "'puts'", "'push'", "'len'", "'return'", + "'if'", "'else'", "'elseif'", "'method'", "'pattern'", "'match'", "'loop'", + "'for'", "'in'", "'do'", "'chop'", "'chomp'", "'+'", "'-'", "'*'", "'/'", + "'=='", "'!='", "'<='", "'>='", "'>'", "'<'", "'&&'", "'||'", "'!'", + "'++'", "'--'", "' |'", "'|'", "'<<'", "'true'", "'false'", "'break'", + "'next'", "'->'", "'+='", "'-='", "'*='", "'/='", "'%='", "'='", "'('", + "')'", "'['", "']'", "'{'", "'}'", "','", "'.'", "'..'", "':'", "';'" + }; + } + private static final String[] _LITERAL_NAMES = makeLiteralNames(); + private static String[] makeSymbolicNames() { + return new String[] { + null, "DEF", "END", "MAIN", "PUTS", "PUSH", "LEN", "RETURN", "IF", "ELSE", + "ELSEIF", "METHOD", "PATTERN", "MATCH", "LOOP", "FOR", "IN", "DO", "CHOP", + "CHOMP", "PLUS", "MINUS", "MULT", "DIVIDE", "EQUAL", "NOT_EQUAL", "LESS_EQUAL_THAN", + "GREATER_EQUAL_THAN", "GREATER_THAN", "LESS_THAN", "AND", "OR", "NOT", + "INCREMENT", "DECREMENT", "PATTERN_MATCHING_SEPARATOR", "SEPARATOR", + "APPEND", "TRUE", "FALSE", "BREAK", "NEXT", "ARROW", "PLUS_ASSIGN", "MINUS_ASSIGN", + "MULT_ASSIGN", "DIVIDE_ASSIGN", "MOD_ASSIGN", "ASSIGN", "LPAR", "RPAR", + "LBRACK", "RBRACK", "LBRACE", "RBRACE", "COMMA", "DOT", "DOUBLEDOT", + "COLON", "SEMICOLLON", "INT_VALUE", "FLOAT_VALUE", "IDENTIFIER", "STRING_VALUE", + "COMMENT", "WS" + }; + } + private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames(); + public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); + + /** + * @deprecated Use {@link #VOCABULARY} instead. + */ + @Deprecated + public static final String[] tokenNames; + static { + tokenNames = new String[_SYMBOLIC_NAMES.length]; + for (int i = 0; i < tokenNames.length; i++) { + tokenNames[i] = VOCABULARY.getLiteralName(i); + if (tokenNames[i] == null) { + tokenNames[i] = VOCABULARY.getSymbolicName(i); + } + + if (tokenNames[i] == null) { + tokenNames[i] = ""; + } + } + } + + @Override + @Deprecated + public String[] getTokenNames() { + return tokenNames; + } + + @Override + + public Vocabulary getVocabulary() { + return VOCABULARY; + } + + @Override + public String getGrammarFileName() { return "FunctionCraft.g4"; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public ATN getATN() { return _ATN; } + + public FunctionCraftParser(TokenStream input) { + super(input); + _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + + @SuppressWarnings("CheckReturnValue") + public static class ProgramContext extends ParserRuleContext { + public Program flProgram; + public FunctionDeclarationContext f; + public PatternMatchingContext p; + public MainContext m; + public MainContext main() { + return getRuleContext(MainContext.class,0); + } + public List functionDeclaration() { + return getRuleContexts(FunctionDeclarationContext.class); + } + public FunctionDeclarationContext functionDeclaration(int i) { + return getRuleContext(FunctionDeclarationContext.class,i); + } + public List patternMatching() { + return getRuleContexts(PatternMatchingContext.class); + } + public PatternMatchingContext patternMatching(int i) { + return getRuleContext(PatternMatchingContext.class,i); + } + public ProgramContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_program; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterProgram(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitProgram(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitProgram(this); + else return visitor.visitChildren(this); + } + } + + public final ProgramContext program() throws RecognitionException { + ProgramContext _localctx = new ProgramContext(_ctx, getState()); + enterRule(_localctx, 0, RULE_program); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + + ((ProgramContext)_localctx).flProgram = new Program(); + _localctx.flProgram.setLine(1); + + setState(83); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,1,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + setState(81); + _errHandler.sync(this); + switch (_input.LA(1)) { + case DEF: + { + setState(75); + ((ProgramContext)_localctx).f = functionDeclaration(); + _localctx.flProgram.addFunctionDeclaration(((ProgramContext)_localctx).f.functionDeclarationRet); + } + break; + case PATTERN: + { + setState(78); + ((ProgramContext)_localctx).p = patternMatching(); + _localctx.flProgram.addPatternDeclaration(((ProgramContext)_localctx).p.patternRet); + } + break; + default: + throw new NoViableAltException(this); + } + } + } + setState(85); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,1,_ctx); + } + setState(86); + ((ProgramContext)_localctx).m = main(); + _localctx.flProgram.setMain(((ProgramContext)_localctx).m.mainRet); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class FunctionDeclarationContext extends ParserRuleContext { + public FunctionDeclaration functionDeclarationRet; + public Token def; + public Token id; + public FunctionArgumentsDeclarationContext f; + public BodyContext b; + public TerminalNode END() { return getToken(FunctionCraftParser.END, 0); } + public TerminalNode DEF() { return getToken(FunctionCraftParser.DEF, 0); } + public TerminalNode IDENTIFIER() { return getToken(FunctionCraftParser.IDENTIFIER, 0); } + public FunctionArgumentsDeclarationContext functionArgumentsDeclaration() { + return getRuleContext(FunctionArgumentsDeclarationContext.class,0); + } + public BodyContext body() { + return getRuleContext(BodyContext.class,0); + } + public FunctionDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_functionDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterFunctionDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitFunctionDeclaration(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitFunctionDeclaration(this); + else return visitor.visitChildren(this); + } + } + + public final FunctionDeclarationContext functionDeclaration() throws RecognitionException { + FunctionDeclarationContext _localctx = new FunctionDeclarationContext(_ctx, getState()); + enterRule(_localctx, 2, RULE_functionDeclaration); + try { + enterOuterAlt(_localctx, 1); + { + + ((FunctionDeclarationContext)_localctx).functionDeclarationRet = new FunctionDeclaration(); + + setState(90); + ((FunctionDeclarationContext)_localctx).def = match(DEF); + _localctx.functionDeclarationRet.setLine((((FunctionDeclarationContext)_localctx).def!=null?((FunctionDeclarationContext)_localctx).def.getLine():0)); + setState(92); + ((FunctionDeclarationContext)_localctx).id = match(IDENTIFIER); + + Identifier id_ = new Identifier((((FunctionDeclarationContext)_localctx).id!=null?((FunctionDeclarationContext)_localctx).id.getText():null)); + id_.setLine((((FunctionDeclarationContext)_localctx).id!=null?((FunctionDeclarationContext)_localctx).id.getLine():0)); + _localctx.functionDeclarationRet.setFunctionName(id_); + _localctx.functionDeclarationRet.setLine((((FunctionDeclarationContext)_localctx).def!=null?((FunctionDeclarationContext)_localctx).def.getLine():0)); + + setState(94); + ((FunctionDeclarationContext)_localctx).f = functionArgumentsDeclaration(); + _localctx.functionDeclarationRet.setArgs(((FunctionDeclarationContext)_localctx).f.argRet); + setState(96); + ((FunctionDeclarationContext)_localctx).b = body(); + _localctx.functionDeclarationRet.setBody(((FunctionDeclarationContext)_localctx).b.bodyRet); + setState(98); + match(END); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class FunctionArgumentsDeclarationContext extends ParserRuleContext { + public ArrayList argRet; + public Token id1; + public Token id2; + public Token id3; + public ExpressionContext e1; + public Token id4; + public ExpressionContext e2; + public TerminalNode LPAR() { return getToken(FunctionCraftParser.LPAR, 0); } + public TerminalNode RPAR() { return getToken(FunctionCraftParser.RPAR, 0); } + public List IDENTIFIER() { return getTokens(FunctionCraftParser.IDENTIFIER); } + public TerminalNode IDENTIFIER(int i) { + return getToken(FunctionCraftParser.IDENTIFIER, i); + } + public List COMMA() { return getTokens(FunctionCraftParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(FunctionCraftParser.COMMA, i); + } + public TerminalNode LBRACK() { return getToken(FunctionCraftParser.LBRACK, 0); } + public List ASSIGN() { return getTokens(FunctionCraftParser.ASSIGN); } + public TerminalNode ASSIGN(int i) { + return getToken(FunctionCraftParser.ASSIGN, i); + } + public TerminalNode RBRACK() { return getToken(FunctionCraftParser.RBRACK, 0); } + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public FunctionArgumentsDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_functionArgumentsDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterFunctionArgumentsDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitFunctionArgumentsDeclaration(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitFunctionArgumentsDeclaration(this); + else return visitor.visitChildren(this); + } + } + + public final FunctionArgumentsDeclarationContext functionArgumentsDeclaration() throws RecognitionException { + FunctionArgumentsDeclarationContext _localctx = new FunctionArgumentsDeclarationContext(_ctx, getState()); + enterRule(_localctx, 4, RULE_functionArgumentsDeclaration); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + + ((FunctionArgumentsDeclarationContext)_localctx).argRet = new ArrayList(); + + setState(101); + match(LPAR); + setState(135); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==IDENTIFIER) { + { + setState(102); + ((FunctionArgumentsDeclarationContext)_localctx).id1 = match(IDENTIFIER); + + Identifier id_ = new Identifier((((FunctionArgumentsDeclarationContext)_localctx).id1!=null?((FunctionArgumentsDeclarationContext)_localctx).id1.getText():null)); + id_.setLine((((FunctionArgumentsDeclarationContext)_localctx).id1!=null?((FunctionArgumentsDeclarationContext)_localctx).id1.getLine():0)); + VarDeclaration newVarDec = new VarDeclaration(id_); + newVarDec.setLine((((FunctionArgumentsDeclarationContext)_localctx).id1!=null?((FunctionArgumentsDeclarationContext)_localctx).id1.getLine():0)); + _localctx.argRet.add(newVarDec); + + setState(109); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,2,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(104); + match(COMMA); + setState(105); + ((FunctionArgumentsDeclarationContext)_localctx).id2 = match(IDENTIFIER); + + Identifier id_2 = new Identifier((((FunctionArgumentsDeclarationContext)_localctx).id2!=null?((FunctionArgumentsDeclarationContext)_localctx).id2.getText():null)); + id_2.setLine((((FunctionArgumentsDeclarationContext)_localctx).id2!=null?((FunctionArgumentsDeclarationContext)_localctx).id2.getLine():0)); + VarDeclaration newVarDec2 = new VarDeclaration(id_2); + newVarDec2.setLine((((FunctionArgumentsDeclarationContext)_localctx).id2!=null?((FunctionArgumentsDeclarationContext)_localctx).id2.getLine():0)); + _localctx.argRet.add(newVarDec2); + + } + } + } + setState(111); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,2,_ctx); + } + setState(133); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(112); + match(COMMA); + setState(113); + match(LBRACK); + setState(114); + ((FunctionArgumentsDeclarationContext)_localctx).id3 = match(IDENTIFIER); + + Identifier id_3 = new Identifier((((FunctionArgumentsDeclarationContext)_localctx).id3!=null?((FunctionArgumentsDeclarationContext)_localctx).id3.getText():null)); + id_3.setLine((((FunctionArgumentsDeclarationContext)_localctx).id3!=null?((FunctionArgumentsDeclarationContext)_localctx).id3.getLine():0)); + VarDeclaration newVarDec3 = new VarDeclaration(id_3); + newVarDec3.setLine((((FunctionArgumentsDeclarationContext)_localctx).id3!=null?((FunctionArgumentsDeclarationContext)_localctx).id3.getLine():0)); + + setState(116); + match(ASSIGN); + setState(117); + ((FunctionArgumentsDeclarationContext)_localctx).e1 = expression(0); + + newVarDec3.setDefaultVal(((FunctionArgumentsDeclarationContext)_localctx).e1.expRet); + _localctx.argRet.add(newVarDec3); + + setState(128); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(119); + match(COMMA); + setState(120); + ((FunctionArgumentsDeclarationContext)_localctx).id4 = match(IDENTIFIER); + + Identifier id_4 = new Identifier((((FunctionArgumentsDeclarationContext)_localctx).id4!=null?((FunctionArgumentsDeclarationContext)_localctx).id4.getText():null)); + id_4.setLine((((FunctionArgumentsDeclarationContext)_localctx).id4!=null?((FunctionArgumentsDeclarationContext)_localctx).id4.getLine():0)); + VarDeclaration newVarDec4 = new VarDeclaration(id_4); + newVarDec4.setLine((((FunctionArgumentsDeclarationContext)_localctx).id4!=null?((FunctionArgumentsDeclarationContext)_localctx).id4.getLine():0)); + + setState(122); + match(ASSIGN); + setState(123); + ((FunctionArgumentsDeclarationContext)_localctx).e2 = expression(0); + + newVarDec4.setDefaultVal(((FunctionArgumentsDeclarationContext)_localctx).e2.expRet); + _localctx.argRet.add(newVarDec4); + + } + } + setState(130); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(131); + match(RBRACK); + } + } + + } + } + + setState(137); + match(RPAR); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class PatternMatchingContext extends ParserRuleContext { + public PatternDeclaration patternRet; + public Token pat; + public Token patternName; + public Token targetVar; + public ConditionContext c; + public ExpressionContext e; + public TerminalNode LPAR() { return getToken(FunctionCraftParser.LPAR, 0); } + public TerminalNode RPAR() { return getToken(FunctionCraftParser.RPAR, 0); } + public TerminalNode SEMICOLLON() { return getToken(FunctionCraftParser.SEMICOLLON, 0); } + public TerminalNode PATTERN() { return getToken(FunctionCraftParser.PATTERN, 0); } + public List IDENTIFIER() { return getTokens(FunctionCraftParser.IDENTIFIER); } + public TerminalNode IDENTIFIER(int i) { + return getToken(FunctionCraftParser.IDENTIFIER, i); + } + public List PATTERN_MATCHING_SEPARATOR() { return getTokens(FunctionCraftParser.PATTERN_MATCHING_SEPARATOR); } + public TerminalNode PATTERN_MATCHING_SEPARATOR(int i) { + return getToken(FunctionCraftParser.PATTERN_MATCHING_SEPARATOR, i); + } + public List ASSIGN() { return getTokens(FunctionCraftParser.ASSIGN); } + public TerminalNode ASSIGN(int i) { + return getToken(FunctionCraftParser.ASSIGN, i); + } + public List condition() { + return getRuleContexts(ConditionContext.class); + } + public ConditionContext condition(int i) { + return getRuleContext(ConditionContext.class,i); + } + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public PatternMatchingContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_patternMatching; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterPatternMatching(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitPatternMatching(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitPatternMatching(this); + else return visitor.visitChildren(this); + } + } + + public final PatternMatchingContext patternMatching() throws RecognitionException { + PatternMatchingContext _localctx = new PatternMatchingContext(_ctx, getState()); + enterRule(_localctx, 6, RULE_patternMatching); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(139); + ((PatternMatchingContext)_localctx).pat = match(PATTERN); + + int patternLine = (((PatternMatchingContext)_localctx).pat!=null?((PatternMatchingContext)_localctx).pat.getLine():0); + + setState(141); + ((PatternMatchingContext)_localctx).patternName = match(IDENTIFIER); + + Identifier patternNameId = new Identifier((((PatternMatchingContext)_localctx).patternName!=null?((PatternMatchingContext)_localctx).patternName.getText():null)); + patternNameId.setLine((((PatternMatchingContext)_localctx).patternName!=null?((PatternMatchingContext)_localctx).patternName.getLine():0)); + + setState(143); + match(LPAR); + setState(144); + ((PatternMatchingContext)_localctx).targetVar = match(IDENTIFIER); + + Identifier targetVariable = new Identifier((((PatternMatchingContext)_localctx).targetVar!=null?((PatternMatchingContext)_localctx).targetVar.getText():null)); + targetVariable.setLine((((PatternMatchingContext)_localctx).targetVar!=null?((PatternMatchingContext)_localctx).targetVar.getLine():0)); + ((PatternMatchingContext)_localctx).patternRet = new PatternDeclaration(patternNameId, targetVariable); + _localctx.patternRet.setLine(patternLine); + + setState(146); + match(RPAR); + setState(156); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==PATTERN_MATCHING_SEPARATOR) { + { + { + setState(147); + match(PATTERN_MATCHING_SEPARATOR); + setState(148); + ((PatternMatchingContext)_localctx).c = condition(); + + _localctx.patternRet.setConditions(((PatternMatchingContext)_localctx).c.conditionRet); + + setState(150); + match(ASSIGN); + setState(151); + ((PatternMatchingContext)_localctx).e = expression(0); + + _localctx.patternRet.addReturnExp(((PatternMatchingContext)_localctx).e.expRet); + + } + } + setState(158); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(159); + match(SEMICOLLON); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class MainContext extends ParserRuleContext { + public MainDeclaration mainRet; + public Token m; + public BodyContext b; + public TerminalNode DEF() { return getToken(FunctionCraftParser.DEF, 0); } + public TerminalNode LPAR() { return getToken(FunctionCraftParser.LPAR, 0); } + public TerminalNode RPAR() { return getToken(FunctionCraftParser.RPAR, 0); } + public TerminalNode END() { return getToken(FunctionCraftParser.END, 0); } + public TerminalNode MAIN() { return getToken(FunctionCraftParser.MAIN, 0); } + public BodyContext body() { + return getRuleContext(BodyContext.class,0); + } + public MainContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_main; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterMain(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitMain(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitMain(this); + else return visitor.visitChildren(this); + } + } + + public final MainContext main() throws RecognitionException { + MainContext _localctx = new MainContext(_ctx, getState()); + enterRule(_localctx, 8, RULE_main); + try { + enterOuterAlt(_localctx, 1); + { + + ((MainContext)_localctx).mainRet = new MainDeclaration(); + + setState(162); + match(DEF); + setState(163); + ((MainContext)_localctx).m = match(MAIN); + + _localctx.mainRet.setLine((((MainContext)_localctx).m!=null?((MainContext)_localctx).m.getLine():0)); + + setState(165); + match(LPAR); + setState(166); + match(RPAR); + setState(167); + ((MainContext)_localctx).b = body(); + _localctx.mainRet.setBody(((MainContext)_localctx).b.bodyRet); + setState(169); + match(END); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class FunctionArgumentsContext extends ParserRuleContext { + public ArrayList funcArgsRet; + public ExpressionContext e1; + public ExpressionContext e2; + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public List COMMA() { return getTokens(FunctionCraftParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(FunctionCraftParser.COMMA, i); + } + public FunctionArgumentsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_functionArguments; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterFunctionArguments(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitFunctionArguments(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitFunctionArguments(this); + else return visitor.visitChildren(this); + } + } + + public final FunctionArgumentsContext functionArguments() throws RecognitionException { + FunctionArgumentsContext _localctx = new FunctionArgumentsContext(_ctx, getState()); + enterRule(_localctx, 10, RULE_functionArguments); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + + ((FunctionArgumentsContext)_localctx).funcArgsRet = new ArrayList(); + + setState(183); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & -1150101502091851712L) != 0)) { + { + setState(172); + ((FunctionArgumentsContext)_localctx).e1 = expression(0); + + _localctx.funcArgsRet.add(((FunctionArgumentsContext)_localctx).e1.expRet); + + setState(180); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(174); + match(COMMA); + setState(175); + ((FunctionArgumentsContext)_localctx).e2 = expression(0); + + _localctx.funcArgsRet.add(((FunctionArgumentsContext)_localctx).e2.expRet); + + } + } + setState(182); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class ReturnStatementContext extends ParserRuleContext { + public ReturnStatement returnStmtRet; + public Token r; + public ExpressionContext e; + public TerminalNode SEMICOLLON() { return getToken(FunctionCraftParser.SEMICOLLON, 0); } + public TerminalNode RETURN() { return getToken(FunctionCraftParser.RETURN, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public ReturnStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_returnStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterReturnStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitReturnStatement(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitReturnStatement(this); + else return visitor.visitChildren(this); + } + } + + public final ReturnStatementContext returnStatement() throws RecognitionException { + ReturnStatementContext _localctx = new ReturnStatementContext(_ctx, getState()); + enterRule(_localctx, 12, RULE_returnStatement); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + + ((ReturnStatementContext)_localctx).returnStmtRet = new ReturnStatement(); + + setState(186); + ((ReturnStatementContext)_localctx).r = match(RETURN); + setState(190); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & -1150101502091851712L) != 0)) { + { + setState(187); + ((ReturnStatementContext)_localctx).e = expression(0); + + _localctx.returnStmtRet.setReturnExp(((ReturnStatementContext)_localctx).e.expRet); + + } + } + + _localctx.returnStmtRet.setLine((((ReturnStatementContext)_localctx).r!=null?((ReturnStatementContext)_localctx).r.getLine():0)); + setState(193); + match(SEMICOLLON); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class IfStatementContext extends ParserRuleContext { + public IfStatement ifRet; + public Token i; + public ConditionContext c1; + public ConditionContext c2; + public LoopBodyContext b; + public LoopBodyContext b1; + public LoopBodyContext b2; + public TerminalNode END() { return getToken(FunctionCraftParser.END, 0); } + public TerminalNode IF() { return getToken(FunctionCraftParser.IF, 0); } + public List loopBody() { + return getRuleContexts(LoopBodyContext.class); + } + public LoopBodyContext loopBody(int i) { + return getRuleContext(LoopBodyContext.class,i); + } + public List LPAR() { return getTokens(FunctionCraftParser.LPAR); } + public TerminalNode LPAR(int i) { + return getToken(FunctionCraftParser.LPAR, i); + } + public List RPAR() { return getTokens(FunctionCraftParser.RPAR); } + public TerminalNode RPAR(int i) { + return getToken(FunctionCraftParser.RPAR, i); + } + public List condition() { + return getRuleContexts(ConditionContext.class); + } + public ConditionContext condition(int i) { + return getRuleContext(ConditionContext.class,i); + } + public List ELSEIF() { return getTokens(FunctionCraftParser.ELSEIF); } + public TerminalNode ELSEIF(int i) { + return getToken(FunctionCraftParser.ELSEIF, i); + } + public TerminalNode ELSE() { return getToken(FunctionCraftParser.ELSE, 0); } + public IfStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_ifStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterIfStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitIfStatement(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitIfStatement(this); + else return visitor.visitChildren(this); + } + } + + public final IfStatementContext ifStatement() throws RecognitionException { + IfStatementContext _localctx = new IfStatementContext(_ctx, getState()); + enterRule(_localctx, 14, RULE_ifStatement); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + + ((IfStatementContext)_localctx).ifRet = new IfStatement(); + ArrayList tempThenStmts = new ArrayList<>(); + ArrayList tempElseStmts = new ArrayList<>(); + + setState(196); + ((IfStatementContext)_localctx).i = match(IF); + + _localctx.ifRet.setLine((((IfStatementContext)_localctx).i!=null?((IfStatementContext)_localctx).i.getLine():0)); + + setState(206); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,10,_ctx) ) { + case 1: + { + setState(198); + ((IfStatementContext)_localctx).c1 = condition(); + _localctx.ifRet.addCondition(((IfStatementContext)_localctx).c1.conditionRet); + } + break; + case 2: + { + setState(201); + match(LPAR); + setState(202); + ((IfStatementContext)_localctx).c2 = condition(); + setState(203); + match(RPAR); + _localctx.ifRet.addCondition(((IfStatementContext)_localctx).c2.conditionRet); + } + break; + } + setState(208); + ((IfStatementContext)_localctx).b = loopBody(); + + tempThenStmts.addAll(((IfStatementContext)_localctx).b.loopStmts); + _localctx.ifRet.addCondition(((IfStatementContext)_localctx).b.loopExps); + if(((IfStatementContext)_localctx).b.loopRetStmt != null){ + tempThenStmts.add(((IfStatementContext)_localctx).b.loopRetStmt); + } + + setState(224); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==ELSEIF) { + { + { + setState(210); + match(ELSEIF); + setState(216); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,11,_ctx) ) { + case 1: + { + setState(211); + match(LPAR); + setState(212); + ((IfStatementContext)_localctx).c2 = condition(); + setState(213); + match(RPAR); + } + break; + case 2: + { + setState(215); + ((IfStatementContext)_localctx).c2 = condition(); + } + break; + } + + _localctx.ifRet.addCondition(((IfStatementContext)_localctx).c2.conditionRet); + + setState(219); + ((IfStatementContext)_localctx).b1 = loopBody(); + + tempElseStmts.addAll(((IfStatementContext)_localctx).b1.loopStmts); + _localctx.ifRet.addCondition(((IfStatementContext)_localctx).b1.loopExps); + if(((IfStatementContext)_localctx).b1.loopRetStmt != null){ + tempThenStmts.add(((IfStatementContext)_localctx).b1.loopRetStmt); + } + + } + } + setState(226); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(231); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==ELSE) { + { + setState(227); + match(ELSE); + setState(228); + ((IfStatementContext)_localctx).b2 = loopBody(); + + tempElseStmts.addAll(((IfStatementContext)_localctx).b2.loopStmts); + _localctx.ifRet.addCondition(((IfStatementContext)_localctx).b2.loopExps); + if(((IfStatementContext)_localctx).b2.loopRetStmt != null){ + tempThenStmts.add(((IfStatementContext)_localctx).b2.loopRetStmt); + } + + } + } + + + _localctx.ifRet.setThenBody(tempThenStmts); + _localctx.ifRet.setElseBody(tempElseStmts); + + setState(234); + match(END); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class ConditionContext extends ParserRuleContext { + public ArrayList conditionRet; + public ExpressionContext e; + public ConditionContext c; + public List LPAR() { return getTokens(FunctionCraftParser.LPAR); } + public TerminalNode LPAR(int i) { + return getToken(FunctionCraftParser.LPAR, i); + } + public List RPAR() { return getTokens(FunctionCraftParser.RPAR); } + public TerminalNode RPAR(int i) { + return getToken(FunctionCraftParser.RPAR, i); + } + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public List AND() { return getTokens(FunctionCraftParser.AND); } + public TerminalNode AND(int i) { + return getToken(FunctionCraftParser.AND, i); + } + public List OR() { return getTokens(FunctionCraftParser.OR); } + public TerminalNode OR(int i) { + return getToken(FunctionCraftParser.OR, i); + } + public List condition() { + return getRuleContexts(ConditionContext.class); + } + public ConditionContext condition(int i) { + return getRuleContext(ConditionContext.class,i); + } + public ConditionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_condition; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterCondition(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitCondition(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitCondition(this); + else return visitor.visitChildren(this); + } + } + + public final ConditionContext condition() throws RecognitionException { + ConditionContext _localctx = new ConditionContext(_ctx, getState()); + enterRule(_localctx, 16, RULE_condition); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + + ((ConditionContext)_localctx).conditionRet = new ArrayList(); + + setState(257); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,17,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(237); + match(LPAR); + setState(238); + ((ConditionContext)_localctx).e = expression(0); + _localctx.conditionRet.add(((ConditionContext)_localctx).e.expRet); + setState(240); + match(RPAR); + setState(252); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,16,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(241); + _la = _input.LA(1); + if ( !(_la==AND || _la==OR) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(243); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,14,_ctx) ) { + case 1: + { + setState(242); + match(LPAR); + } + break; + } + setState(245); + ((ConditionContext)_localctx).c = condition(); + + _localctx.conditionRet.addAll(((ConditionContext)_localctx).c.conditionRet); + + setState(248); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,15,_ctx) ) { + case 1: + { + setState(247); + match(RPAR); + } + break; + } + } + } + } + setState(254); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,16,_ctx); + } + } + } + } + setState(259); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,17,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class PutsStatementContext extends ParserRuleContext { + public PutStatement putRet; + public Token p; + public ExpressionContext e; + public TerminalNode LPAR() { return getToken(FunctionCraftParser.LPAR, 0); } + public TerminalNode RPAR() { return getToken(FunctionCraftParser.RPAR, 0); } + public TerminalNode SEMICOLLON() { return getToken(FunctionCraftParser.SEMICOLLON, 0); } + public TerminalNode PUTS() { return getToken(FunctionCraftParser.PUTS, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public PutsStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_putsStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterPutsStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitPutsStatement(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitPutsStatement(this); + else return visitor.visitChildren(this); + } + } + + public final PutsStatementContext putsStatement() throws RecognitionException { + PutsStatementContext _localctx = new PutsStatementContext(_ctx, getState()); + enterRule(_localctx, 18, RULE_putsStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(260); + ((PutsStatementContext)_localctx).p = match(PUTS); + setState(261); + match(LPAR); + setState(262); + ((PutsStatementContext)_localctx).e = expression(0); + + ((PutsStatementContext)_localctx).putRet = new PutStatement(((PutsStatementContext)_localctx).e.expRet); + _localctx.putRet.setLine((((PutsStatementContext)_localctx).p!=null?((PutsStatementContext)_localctx).p.getLine():0)); + + setState(264); + match(RPAR); + setState(265); + match(SEMICOLLON); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class LenStatementContext extends ParserRuleContext { + public LenStatement lenRet; + public Token l; + public ExpressionContext e; + public TerminalNode LPAR() { return getToken(FunctionCraftParser.LPAR, 0); } + public TerminalNode RPAR() { return getToken(FunctionCraftParser.RPAR, 0); } + public TerminalNode LEN() { return getToken(FunctionCraftParser.LEN, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public LenStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_lenStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterLenStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitLenStatement(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitLenStatement(this); + else return visitor.visitChildren(this); + } + } + + public final LenStatementContext lenStatement() throws RecognitionException { + LenStatementContext _localctx = new LenStatementContext(_ctx, getState()); + enterRule(_localctx, 20, RULE_lenStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(267); + ((LenStatementContext)_localctx).l = match(LEN); + setState(268); + match(LPAR); + setState(269); + ((LenStatementContext)_localctx).e = expression(0); + + ((LenStatementContext)_localctx).lenRet = new LenStatement(((LenStatementContext)_localctx).e.expRet); + _localctx.lenRet.setLine((((LenStatementContext)_localctx).l!=null?((LenStatementContext)_localctx).l.getLine():0)); + + setState(271); + match(RPAR); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class PushStatementContext extends ParserRuleContext { + public PushStatement pushRet; + public Token p; + public ExpressionContext e1; + public ExpressionContext e2; + public TerminalNode LPAR() { return getToken(FunctionCraftParser.LPAR, 0); } + public TerminalNode COMMA() { return getToken(FunctionCraftParser.COMMA, 0); } + public TerminalNode RPAR() { return getToken(FunctionCraftParser.RPAR, 0); } + public TerminalNode SEMICOLLON() { return getToken(FunctionCraftParser.SEMICOLLON, 0); } + public TerminalNode PUSH() { return getToken(FunctionCraftParser.PUSH, 0); } + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public PushStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_pushStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterPushStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitPushStatement(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitPushStatement(this); + else return visitor.visitChildren(this); + } + } + + public final PushStatementContext pushStatement() throws RecognitionException { + PushStatementContext _localctx = new PushStatementContext(_ctx, getState()); + enterRule(_localctx, 22, RULE_pushStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(273); + ((PushStatementContext)_localctx).p = match(PUSH); + setState(274); + match(LPAR); + setState(275); + ((PushStatementContext)_localctx).e1 = expression(0); + setState(276); + match(COMMA); + setState(277); + ((PushStatementContext)_localctx).e2 = expression(0); + setState(278); + match(RPAR); + setState(279); + match(SEMICOLLON); + + ((PushStatementContext)_localctx).pushRet = new PushStatement(((PushStatementContext)_localctx).e1.expRet, ((PushStatementContext)_localctx).e2.expRet); + _localctx.pushRet.setLine((((PushStatementContext)_localctx).p!=null?((PushStatementContext)_localctx).p.getLine():0)); + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class LoopDoStatementContext extends ParserRuleContext { + public LoopDoStatement loopDoRet; + public Token l1; + public LoopBodyContext l2; + public TerminalNode DO() { return getToken(FunctionCraftParser.DO, 0); } + public TerminalNode END() { return getToken(FunctionCraftParser.END, 0); } + public TerminalNode LOOP() { return getToken(FunctionCraftParser.LOOP, 0); } + public LoopBodyContext loopBody() { + return getRuleContext(LoopBodyContext.class,0); + } + public LoopDoStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_loopDoStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterLoopDoStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitLoopDoStatement(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitLoopDoStatement(this); + else return visitor.visitChildren(this); + } + } + + public final LoopDoStatementContext loopDoStatement() throws RecognitionException { + LoopDoStatementContext _localctx = new LoopDoStatementContext(_ctx, getState()); + enterRule(_localctx, 24, RULE_loopDoStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(282); + ((LoopDoStatementContext)_localctx).l1 = match(LOOP); + setState(283); + match(DO); + setState(284); + ((LoopDoStatementContext)_localctx).l2 = loopBody(); + + ((LoopDoStatementContext)_localctx).loopDoRet = new LoopDoStatement(((LoopDoStatementContext)_localctx).l2.loopStmts, ((LoopDoStatementContext)_localctx).l2.loopExps, ((LoopDoStatementContext)_localctx).l2.loopRetStmt); + _localctx.loopDoRet.setLine((((LoopDoStatementContext)_localctx).l1!=null?((LoopDoStatementContext)_localctx).l1.getLine():0)); + + setState(286); + match(END); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class LoopBodyContext extends ParserRuleContext { + public ArrayList loopStmts; + public ArrayList loopExps; + public ReturnStatement loopRetStmt; + public StatementContext s; + public ConditionContext c1; + public ConditionContext c2; + public ReturnStatementContext r; + public List BREAK() { return getTokens(FunctionCraftParser.BREAK); } + public TerminalNode BREAK(int i) { + return getToken(FunctionCraftParser.BREAK, i); + } + public List SEMICOLLON() { return getTokens(FunctionCraftParser.SEMICOLLON); } + public TerminalNode SEMICOLLON(int i) { + return getToken(FunctionCraftParser.SEMICOLLON, i); + } + public List NEXT() { return getTokens(FunctionCraftParser.NEXT); } + public TerminalNode NEXT(int i) { + return getToken(FunctionCraftParser.NEXT, i); + } + public List statement() { + return getRuleContexts(StatementContext.class); + } + public StatementContext statement(int i) { + return getRuleContext(StatementContext.class,i); + } + public ReturnStatementContext returnStatement() { + return getRuleContext(ReturnStatementContext.class,0); + } + public List IF() { return getTokens(FunctionCraftParser.IF); } + public TerminalNode IF(int i) { + return getToken(FunctionCraftParser.IF, i); + } + public List condition() { + return getRuleContexts(ConditionContext.class); + } + public ConditionContext condition(int i) { + return getRuleContext(ConditionContext.class,i); + } + public LoopBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_loopBody; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterLoopBody(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitLoopBody(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitLoopBody(this); + else return visitor.visitChildren(this); + } + } + + public final LoopBodyContext loopBody() throws RecognitionException { + LoopBodyContext _localctx = new LoopBodyContext(_ctx, getState()); + enterRule(_localctx, 26, RULE_loopBody); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + + ((LoopBodyContext)_localctx).loopStmts = new ArrayList(); + ((LoopBodyContext)_localctx).loopExps = new ArrayList(); + ((LoopBodyContext)_localctx).loopRetStmt = null; + + setState(310); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & -1150098203556918928L) != 0)) { + { + setState(308); + _errHandler.sync(this); + switch (_input.LA(1)) { + case PUTS: + case PUSH: + case LEN: + case IF: + case METHOD: + case LOOP: + case FOR: + case CHOP: + case CHOMP: + case MINUS: + case NOT: + case INCREMENT: + case DECREMENT: + case TRUE: + case FALSE: + case ARROW: + case LPAR: + case LBRACK: + case INT_VALUE: + case FLOAT_VALUE: + case IDENTIFIER: + case STRING_VALUE: + { + setState(289); + ((LoopBodyContext)_localctx).s = statement(); + _localctx.loopStmts.add(((LoopBodyContext)_localctx).s.stmtRet); + } + break; + case BREAK: + { + setState(292); + match(BREAK); + setState(297); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==IF) { + { + setState(293); + match(IF); + setState(294); + ((LoopBodyContext)_localctx).c1 = condition(); + _localctx.loopExps.addAll(((LoopBodyContext)_localctx).c1.conditionRet); + } + } + + setState(299); + match(SEMICOLLON); + } + break; + case NEXT: + { + setState(300); + match(NEXT); + setState(305); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==IF) { + { + setState(301); + match(IF); + setState(302); + ((LoopBodyContext)_localctx).c2 = condition(); + _localctx.loopExps.addAll(((LoopBodyContext)_localctx).c2.conditionRet); + } + } + + setState(307); + match(SEMICOLLON); + } + break; + default: + throw new NoViableAltException(this); + } + } + setState(312); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(316); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==RETURN) { + { + setState(313); + ((LoopBodyContext)_localctx).r = returnStatement(); + ((LoopBodyContext)_localctx).loopRetStmt = ((LoopBodyContext)_localctx).r.returnStmtRet;_localctx.loopRetStmt.setLine(((LoopBodyContext)_localctx).r.returnStmtRet.getLine()); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class ForStatementContext extends ParserRuleContext { + public ForStatement forStRet; + public Token f; + public Token id; + public RangeContext r; + public LoopBodyContext l; + public TerminalNode IN() { return getToken(FunctionCraftParser.IN, 0); } + public TerminalNode END() { return getToken(FunctionCraftParser.END, 0); } + public TerminalNode FOR() { return getToken(FunctionCraftParser.FOR, 0); } + public TerminalNode IDENTIFIER() { return getToken(FunctionCraftParser.IDENTIFIER, 0); } + public RangeContext range() { + return getRuleContext(RangeContext.class,0); + } + public LoopBodyContext loopBody() { + return getRuleContext(LoopBodyContext.class,0); + } + public ForStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_forStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterForStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitForStatement(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitForStatement(this); + else return visitor.visitChildren(this); + } + } + + public final ForStatementContext forStatement() throws RecognitionException { + ForStatementContext _localctx = new ForStatementContext(_ctx, getState()); + enterRule(_localctx, 28, RULE_forStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(318); + ((ForStatementContext)_localctx).f = match(FOR); + setState(319); + ((ForStatementContext)_localctx).id = match(IDENTIFIER); + setState(320); + match(IN); + setState(321); + ((ForStatementContext)_localctx).r = range(); + setState(322); + ((ForStatementContext)_localctx).l = loopBody(); + setState(323); + match(END); + + ((ForStatementContext)_localctx).forStRet = new ForStatement(new Identifier((((ForStatementContext)_localctx).id!=null?((ForStatementContext)_localctx).id.getText():null)), + ((ForStatementContext)_localctx).r.rangeRet, ((ForStatementContext)_localctx).l.loopExps, ((ForStatementContext)_localctx).l.loopStmts, + ((ForStatementContext)_localctx).l.loopRetStmt); + _localctx.forStRet.setLine((((ForStatementContext)_localctx).f!=null?((ForStatementContext)_localctx).f.getLine():0)); + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class RangeContext extends ParserRuleContext { + public ArrayList rangeRet; + public ExpressionContext e1; + public ExpressionContext e2; + public ExpressionContext e3; + public ExpressionContext e4; + public Token id; + public TerminalNode LPAR() { return getToken(FunctionCraftParser.LPAR, 0); } + public TerminalNode DOUBLEDOT() { return getToken(FunctionCraftParser.DOUBLEDOT, 0); } + public TerminalNode RPAR() { return getToken(FunctionCraftParser.RPAR, 0); } + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public TerminalNode LBRACK() { return getToken(FunctionCraftParser.LBRACK, 0); } + public TerminalNode RBRACK() { return getToken(FunctionCraftParser.RBRACK, 0); } + public List COMMA() { return getTokens(FunctionCraftParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(FunctionCraftParser.COMMA, i); + } + public TerminalNode IDENTIFIER() { return getToken(FunctionCraftParser.IDENTIFIER, 0); } + public RangeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_range; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterRange(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitRange(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitRange(this); + else return visitor.visitChildren(this); + } + } + + public final RangeContext range() throws RecognitionException { + RangeContext _localctx = new RangeContext(_ctx, getState()); + enterRule(_localctx, 30, RULE_range); + int _la; + try { + setState(353); + _errHandler.sync(this); + switch (_input.LA(1)) { + case LPAR: + enterOuterAlt(_localctx, 1); + { + + ((RangeContext)_localctx).rangeRet = new ArrayList(); + + { + setState(327); + match(LPAR); + setState(328); + ((RangeContext)_localctx).e1 = expression(0); + + _localctx.rangeRet.add(((RangeContext)_localctx).e1.expRet); + + setState(330); + match(DOUBLEDOT); + setState(331); + ((RangeContext)_localctx).e2 = expression(0); + + _localctx.rangeRet.add(((RangeContext)_localctx).e2.expRet); + + setState(333); + match(RPAR); + } + } + break; + case LBRACK: + enterOuterAlt(_localctx, 2); + { + + ((RangeContext)_localctx).rangeRet = new ArrayList(); + + { + setState(336); + match(LBRACK); + { + setState(337); + ((RangeContext)_localctx).e3 = expression(0); + + _localctx.rangeRet.add(((RangeContext)_localctx).e3.expRet); + + setState(345); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(339); + match(COMMA); + setState(340); + ((RangeContext)_localctx).e4 = expression(0); + + _localctx.rangeRet.add(((RangeContext)_localctx).e4.expRet); + + } + } + setState(347); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + setState(348); + match(RBRACK); + } + } + break; + case IDENTIFIER: + enterOuterAlt(_localctx, 3); + { + + ((RangeContext)_localctx).rangeRet = new ArrayList(); + + setState(351); + ((RangeContext)_localctx).id = match(IDENTIFIER); + + Identifier id_ = new Identifier((((RangeContext)_localctx).id!=null?((RangeContext)_localctx).id.getText():null)); + id_.setLine((((RangeContext)_localctx).id!=null?((RangeContext)_localctx).id.getLine():0)); + _localctx.rangeRet.add(id_); + + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class FilterStatementContext extends ParserRuleContext { + public FilterStatement filterStatementRet; + public Token brack; + public ExpressionContext e1; + public Token id; + public RangeContext r; + public ExpressionContext e2; + public ExpressionContext e3; + public TerminalNode SEPARATOR() { return getToken(FunctionCraftParser.SEPARATOR, 0); } + public TerminalNode ARROW() { return getToken(FunctionCraftParser.ARROW, 0); } + public List COMMA() { return getTokens(FunctionCraftParser.COMMA); } + public TerminalNode COMMA(int i) { + return getToken(FunctionCraftParser.COMMA, i); + } + public TerminalNode RBRACK() { return getToken(FunctionCraftParser.RBRACK, 0); } + public TerminalNode LBRACK() { return getToken(FunctionCraftParser.LBRACK, 0); } + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public TerminalNode IDENTIFIER() { return getToken(FunctionCraftParser.IDENTIFIER, 0); } + public RangeContext range() { + return getRuleContext(RangeContext.class,0); + } + public FilterStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_filterStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterFilterStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitFilterStatement(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitFilterStatement(this); + else return visitor.visitChildren(this); + } + } + + public final FilterStatementContext filterStatement() throws RecognitionException { + FilterStatementContext _localctx = new FilterStatementContext(_ctx, getState()); + enterRule(_localctx, 32, RULE_filterStatement); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + + ArrayList conditionExps = new ArrayList(); + + setState(356); + ((FilterStatementContext)_localctx).brack = match(LBRACK); + setState(357); + ((FilterStatementContext)_localctx).e1 = expression(0); + setState(358); + match(SEPARATOR); + setState(359); + ((FilterStatementContext)_localctx).id = match(IDENTIFIER); + setState(360); + match(ARROW); + setState(361); + ((FilterStatementContext)_localctx).r = range(); + setState(362); + match(COMMA); + setState(363); + ((FilterStatementContext)_localctx).e2 = expression(0); + + conditionExps.add(((FilterStatementContext)_localctx).e2.expRet); + + setState(371); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(365); + match(COMMA); + setState(366); + ((FilterStatementContext)_localctx).e3 = expression(0); + + conditionExps.add(((FilterStatementContext)_localctx).e3.expRet); + + } + } + setState(373); + _errHandler.sync(this); + _la = _input.LA(1); + } + + Identifier id_ = new Identifier((((FilterStatementContext)_localctx).id!=null?((FilterStatementContext)_localctx).id.getText():null)); + id_.setLine((((FilterStatementContext)_localctx).id!=null?((FilterStatementContext)_localctx).id.getLine():0)); + ((FilterStatementContext)_localctx).filterStatementRet = new FilterStatement(id_, ((FilterStatementContext)_localctx).e1.expRet, + conditionExps, ((FilterStatementContext)_localctx).r.rangeRet); + _localctx.filterStatementRet.setLine((((FilterStatementContext)_localctx).brack!=null?((FilterStatementContext)_localctx).brack.getLine():0)); + + setState(375); + match(RBRACK); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class MatchPatternStatementContext extends ParserRuleContext { + public MatchPatternStatement matchPatRet; + public Token id; + public Token m; + public ExpressionContext e; + public TerminalNode DOT() { return getToken(FunctionCraftParser.DOT, 0); } + public TerminalNode LPAR() { return getToken(FunctionCraftParser.LPAR, 0); } + public TerminalNode RPAR() { return getToken(FunctionCraftParser.RPAR, 0); } + public TerminalNode IDENTIFIER() { return getToken(FunctionCraftParser.IDENTIFIER, 0); } + public TerminalNode MATCH() { return getToken(FunctionCraftParser.MATCH, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public MatchPatternStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_matchPatternStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterMatchPatternStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitMatchPatternStatement(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitMatchPatternStatement(this); + else return visitor.visitChildren(this); + } + } + + public final MatchPatternStatementContext matchPatternStatement() throws RecognitionException { + MatchPatternStatementContext _localctx = new MatchPatternStatementContext(_ctx, getState()); + enterRule(_localctx, 34, RULE_matchPatternStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(377); + ((MatchPatternStatementContext)_localctx).id = match(IDENTIFIER); + setState(378); + match(DOT); + setState(379); + ((MatchPatternStatementContext)_localctx).m = match(MATCH); + setState(380); + match(LPAR); + setState(381); + ((MatchPatternStatementContext)_localctx).e = expression(0); + setState(382); + match(RPAR); + + Identifier id_ = new Identifier((((MatchPatternStatementContext)_localctx).id!=null?((MatchPatternStatementContext)_localctx).id.getText():null)); + id_.setLine((((MatchPatternStatementContext)_localctx).id!=null?((MatchPatternStatementContext)_localctx).id.getLine():0)); + ((MatchPatternStatementContext)_localctx).matchPatRet = new MatchPatternStatement(id_, ((MatchPatternStatementContext)_localctx).e.expRet); + _localctx.matchPatRet.setLine((((MatchPatternStatementContext)_localctx).m!=null?((MatchPatternStatementContext)_localctx).m.getLine():0)); + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class ChopStatementContext extends ParserRuleContext { + public ChopStatement chopRet; + public Token c; + public ExpressionContext e; + public TerminalNode LPAR() { return getToken(FunctionCraftParser.LPAR, 0); } + public TerminalNode RPAR() { return getToken(FunctionCraftParser.RPAR, 0); } + public TerminalNode CHOP() { return getToken(FunctionCraftParser.CHOP, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public ChopStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_chopStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterChopStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitChopStatement(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitChopStatement(this); + else return visitor.visitChildren(this); + } + } + + public final ChopStatementContext chopStatement() throws RecognitionException { + ChopStatementContext _localctx = new ChopStatementContext(_ctx, getState()); + enterRule(_localctx, 36, RULE_chopStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(385); + ((ChopStatementContext)_localctx).c = match(CHOP); + setState(386); + match(LPAR); + setState(387); + ((ChopStatementContext)_localctx).e = expression(0); + setState(388); + match(RPAR); + + ((ChopStatementContext)_localctx).chopRet = new ChopStatement(((ChopStatementContext)_localctx).e.expRet); + _localctx.chopRet.setLine((((ChopStatementContext)_localctx).c!=null?((ChopStatementContext)_localctx).c.getLine():0)); + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class ChompStatementContext extends ParserRuleContext { + public ChompStatement chompRet; + public Token c; + public ExpressionContext e; + public TerminalNode LPAR() { return getToken(FunctionCraftParser.LPAR, 0); } + public TerminalNode RPAR() { return getToken(FunctionCraftParser.RPAR, 0); } + public TerminalNode CHOMP() { return getToken(FunctionCraftParser.CHOMP, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public ChompStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_chompStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterChompStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitChompStatement(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitChompStatement(this); + else return visitor.visitChildren(this); + } + } + + public final ChompStatementContext chompStatement() throws RecognitionException { + ChompStatementContext _localctx = new ChompStatementContext(_ctx, getState()); + enterRule(_localctx, 38, RULE_chompStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(391); + ((ChompStatementContext)_localctx).c = match(CHOMP); + setState(392); + match(LPAR); + setState(393); + ((ChompStatementContext)_localctx).e = expression(0); + setState(394); + match(RPAR); + + ((ChompStatementContext)_localctx).chompRet = new ChompStatement(((ChompStatementContext)_localctx).e.expRet); + _localctx.chompRet.setLine((((ChompStatementContext)_localctx).c!=null?((ChompStatementContext)_localctx).c.getLine():0)); + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class AssignmentContext extends ParserRuleContext { + public AssignStatement assignRet; + public Token id; + public AccessListContext a; + public Token as; + public Token pl; + public Token mi; + public Token di; + public Token mu; + public Token mo; + public ExpressionContext e; + public TerminalNode SEMICOLLON() { return getToken(FunctionCraftParser.SEMICOLLON, 0); } + public TerminalNode IDENTIFIER() { return getToken(FunctionCraftParser.IDENTIFIER, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public TerminalNode ASSIGN() { return getToken(FunctionCraftParser.ASSIGN, 0); } + public TerminalNode PLUS_ASSIGN() { return getToken(FunctionCraftParser.PLUS_ASSIGN, 0); } + public TerminalNode MINUS_ASSIGN() { return getToken(FunctionCraftParser.MINUS_ASSIGN, 0); } + public TerminalNode DIVIDE_ASSIGN() { return getToken(FunctionCraftParser.DIVIDE_ASSIGN, 0); } + public TerminalNode MULT_ASSIGN() { return getToken(FunctionCraftParser.MULT_ASSIGN, 0); } + public TerminalNode MOD_ASSIGN() { return getToken(FunctionCraftParser.MOD_ASSIGN, 0); } + public AccessListContext accessList() { + return getRuleContext(AccessListContext.class,0); + } + public AssignmentContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_assignment; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterAssignment(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitAssignment(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitAssignment(this); + else return visitor.visitChildren(this); + } + } + + public final AssignmentContext assignment() throws RecognitionException { + AssignmentContext _localctx = new AssignmentContext(_ctx, getState()); + enterRule(_localctx, 40, RULE_assignment); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + + boolean access = false; + int line; + AssignOperator op; + + setState(398); + ((AssignmentContext)_localctx).id = match(IDENTIFIER); + setState(402); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==LBRACK) { + { + setState(399); + ((AssignmentContext)_localctx).a = accessList(); + access = true; + } + } + + setState(416); + _errHandler.sync(this); + switch (_input.LA(1)) { + case ASSIGN: + { + setState(404); + ((AssignmentContext)_localctx).as = match(ASSIGN); + op = AssignOperator.ASSIGN;line = (((AssignmentContext)_localctx).as!=null?((AssignmentContext)_localctx).as.getLine():0); + } + break; + case PLUS_ASSIGN: + { + setState(406); + ((AssignmentContext)_localctx).pl = match(PLUS_ASSIGN); + op = AssignOperator.PLUS_ASSIGN;line = (((AssignmentContext)_localctx).pl!=null?((AssignmentContext)_localctx).pl.getLine():0); + } + break; + case MINUS_ASSIGN: + { + setState(408); + ((AssignmentContext)_localctx).mi = match(MINUS_ASSIGN); + op = AssignOperator.MINUS_ASSIGN;line = (((AssignmentContext)_localctx).mi!=null?((AssignmentContext)_localctx).mi.getLine():0); + } + break; + case DIVIDE_ASSIGN: + { + setState(410); + ((AssignmentContext)_localctx).di = match(DIVIDE_ASSIGN); + op = AssignOperator.DIVIDE_ASSIGN;line = (((AssignmentContext)_localctx).di!=null?((AssignmentContext)_localctx).di.getLine():0); + } + break; + case MULT_ASSIGN: + { + setState(412); + ((AssignmentContext)_localctx).mu = match(MULT_ASSIGN); + op = AssignOperator.MULT_ASSIGN;line = (((AssignmentContext)_localctx).mu!=null?((AssignmentContext)_localctx).mu.getLine():0); + } + break; + case MOD_ASSIGN: + { + setState(414); + ((AssignmentContext)_localctx).mo = match(MOD_ASSIGN); + op = AssignOperator.MOD_ASSIGN;line = (((AssignmentContext)_localctx).mo!=null?((AssignmentContext)_localctx).mo.getLine():0); + } + break; + default: + throw new NoViableAltException(this); + } + setState(418); + ((AssignmentContext)_localctx).e = expression(0); + setState(419); + match(SEMICOLLON); + + Identifier id_ = new Identifier((((AssignmentContext)_localctx).id!=null?((AssignmentContext)_localctx).id.getText():null)); + id_.setLine((((AssignmentContext)_localctx).id!=null?((AssignmentContext)_localctx).id.getLine():0)); + ((AssignmentContext)_localctx).assignRet = new AssignStatement(access, id_, ((AssignmentContext)_localctx).e.expRet, op); + if(access){ + _localctx.assignRet.setAccessListExpression(((AssignmentContext)_localctx).a.accessListExp); + } + _localctx.assignRet.setLine(line); + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class AccessListContext extends ParserRuleContext { + public Expression accessListExp; + public ExpressionContext e; + public TerminalNode LBRACK() { return getToken(FunctionCraftParser.LBRACK, 0); } + public TerminalNode RBRACK() { return getToken(FunctionCraftParser.RBRACK, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public AccessListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_accessList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterAccessList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitAccessList(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitAccessList(this); + else return visitor.visitChildren(this); + } + } + + public final AccessListContext accessList() throws RecognitionException { + AccessListContext _localctx = new AccessListContext(_ctx, getState()); + enterRule(_localctx, 42, RULE_accessList); + try { + enterOuterAlt(_localctx, 1); + { + setState(422); + match(LBRACK); + setState(423); + ((AccessListContext)_localctx).e = expression(0); + ((AccessListContext)_localctx).accessListExp = ((AccessListContext)_localctx).e.expRet; + setState(425); + match(RBRACK); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class StatementContext extends ParserRuleContext { + public Statement stmtRet; + public IfStatementContext i; + public LoopDoStatementContext loop; + public ForStatementContext f; + public PutsStatementContext puts; + public PushStatementContext push; + public ExpressionContext e; + public AssignmentContext as; + public IfStatementContext ifStatement() { + return getRuleContext(IfStatementContext.class,0); + } + public LoopDoStatementContext loopDoStatement() { + return getRuleContext(LoopDoStatementContext.class,0); + } + public ForStatementContext forStatement() { + return getRuleContext(ForStatementContext.class,0); + } + public PutsStatementContext putsStatement() { + return getRuleContext(PutsStatementContext.class,0); + } + public PushStatementContext pushStatement() { + return getRuleContext(PushStatementContext.class,0); + } + public TerminalNode SEMICOLLON() { return getToken(FunctionCraftParser.SEMICOLLON, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public AssignmentContext assignment() { + return getRuleContext(AssignmentContext.class,0); + } + public StatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_statement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitStatement(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitStatement(this); + else return visitor.visitChildren(this); + } + } + + public final StatementContext statement() throws RecognitionException { + StatementContext _localctx = new StatementContext(_ctx, getState()); + enterRule(_localctx, 44, RULE_statement); + try { + setState(450); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,28,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(427); + ((StatementContext)_localctx).i = ifStatement(); + ((StatementContext)_localctx).stmtRet = ((StatementContext)_localctx).i.ifRet; + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(430); + ((StatementContext)_localctx).loop = loopDoStatement(); + ((StatementContext)_localctx).stmtRet = ((StatementContext)_localctx).loop.loopDoRet; + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(433); + ((StatementContext)_localctx).f = forStatement(); + ((StatementContext)_localctx).stmtRet = ((StatementContext)_localctx).f.forStRet; + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(436); + ((StatementContext)_localctx).puts = putsStatement(); + ((StatementContext)_localctx).stmtRet = ((StatementContext)_localctx).puts.putRet; + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(439); + ((StatementContext)_localctx).push = pushStatement(); + ((StatementContext)_localctx).stmtRet = ((StatementContext)_localctx).push.pushRet; + } + break; + case 6: + enterOuterAlt(_localctx, 6); + { + setState(442); + ((StatementContext)_localctx).e = expression(0); + ((StatementContext)_localctx).stmtRet = new ExpressionStatement(((StatementContext)_localctx).e.expRet); + + ExpressionStatement expStmt = new ExpressionStatement(((StatementContext)_localctx).e.expRet); + ((StatementContext)_localctx).stmtRet = expStmt; + _localctx.stmtRet.setLine(((StatementContext)_localctx).e.expRet.getLine()); + + setState(445); + match(SEMICOLLON); + } + break; + case 7: + enterOuterAlt(_localctx, 7); + { + setState(447); + ((StatementContext)_localctx).as = assignment(); + ((StatementContext)_localctx).stmtRet = ((StatementContext)_localctx).as.assignRet; + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class BodyContext extends ParserRuleContext { + public ArrayList bodyRet; + public StatementContext s; + public ReturnStatementContext r; + public List statement() { + return getRuleContexts(StatementContext.class); + } + public StatementContext statement(int i) { + return getRuleContext(StatementContext.class,i); + } + public ReturnStatementContext returnStatement() { + return getRuleContext(ReturnStatementContext.class,0); + } + public BodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_body; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterBody(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitBody(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitBody(this); + else return visitor.visitChildren(this); + } + } + + public final BodyContext body() throws RecognitionException { + BodyContext _localctx = new BodyContext(_ctx, getState()); + enterRule(_localctx, 46, RULE_body); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + + ((BodyContext)_localctx).bodyRet = new ArrayList(); + + setState(458); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & -1150101502091802256L) != 0)) { + { + { + setState(453); + ((BodyContext)_localctx).s = statement(); + _localctx.bodyRet.add(((BodyContext)_localctx).s.stmtRet); + } + } + setState(460); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(464); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==RETURN) { + { + setState(461); + ((BodyContext)_localctx).r = returnStatement(); + _localctx.bodyRet.add(((BodyContext)_localctx).r.returnStmtRet); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class ExpressionContext extends ParserRuleContext { + public Expression expRet; + public ExpressionContext e1; + public EqaulityExpressionContext e3; + public Token a; + public EqaulityExpressionContext e2; + public EqaulityExpressionContext eqaulityExpression() { + return getRuleContext(EqaulityExpressionContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public TerminalNode APPEND() { return getToken(FunctionCraftParser.APPEND, 0); } + public ExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_expression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitExpression(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitExpression(this); + else return visitor.visitChildren(this); + } + } + + public final ExpressionContext expression() throws RecognitionException { + return expression(0); + } + + private ExpressionContext expression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + ExpressionContext _localctx = new ExpressionContext(_ctx, _parentState); + ExpressionContext _prevctx = _localctx; + int _startState = 48; + enterRecursionRule(_localctx, 48, RULE_expression, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(467); + ((ExpressionContext)_localctx).e3 = eqaulityExpression(); + ((ExpressionContext)_localctx).expRet = ((ExpressionContext)_localctx).e3.expRet; + } + _ctx.stop = _input.LT(-1); + setState(477); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,31,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new ExpressionContext(_parentctx, _parentState); + _localctx.e1 = _prevctx; + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(470); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + setState(471); + ((ExpressionContext)_localctx).a = match(APPEND); + setState(472); + ((ExpressionContext)_localctx).e2 = eqaulityExpression(); + + if(!(((ExpressionContext)_localctx).e1.expRet instanceof AppendExpression)){ + ((ExpressionContext)_localctx).expRet = new AppendExpression(((ExpressionContext)_localctx).e1.expRet); + _localctx.expRet.setLine((((ExpressionContext)_localctx).a!=null?((ExpressionContext)_localctx).a.getLine():0)); + } + else{ + AppendExpression appendExp = (AppendExpression) ((ExpressionContext)_localctx).e1.expRet; + appendExp.addAppendedExpression(((ExpressionContext)_localctx).e2.expRet); + ((ExpressionContext)_localctx).expRet = appendExp; + } + + } + } + } + setState(479); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,31,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class EqaulityExpressionContext extends ParserRuleContext { + public Expression expRet; + public RelationalExpressionContext e1; + public Token op1; + public Token op2; + public RelationalExpressionContext r1; + public RelationalExpressionContext r2; + public List relationalExpression() { + return getRuleContexts(RelationalExpressionContext.class); + } + public RelationalExpressionContext relationalExpression(int i) { + return getRuleContext(RelationalExpressionContext.class,i); + } + public TerminalNode EQUAL() { return getToken(FunctionCraftParser.EQUAL, 0); } + public TerminalNode NOT_EQUAL() { return getToken(FunctionCraftParser.NOT_EQUAL, 0); } + public EqaulityExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_eqaulityExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterEqaulityExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitEqaulityExpression(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitEqaulityExpression(this); + else return visitor.visitChildren(this); + } + } + + public final EqaulityExpressionContext eqaulityExpression() throws RecognitionException { + EqaulityExpressionContext _localctx = new EqaulityExpressionContext(_ctx, getState()); + enterRule(_localctx, 50, RULE_eqaulityExpression); + try { + setState(494); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,33,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(480); + ((EqaulityExpressionContext)_localctx).e1 = relationalExpression(0); + + BinaryOperator op; + int line; + + setState(486); + _errHandler.sync(this); + switch (_input.LA(1)) { + case EQUAL: + { + setState(482); + ((EqaulityExpressionContext)_localctx).op1 = match(EQUAL); + op = BinaryOperator.EQUAL;line = (((EqaulityExpressionContext)_localctx).op1!=null?((EqaulityExpressionContext)_localctx).op1.getLine():0); + } + break; + case NOT_EQUAL: + { + setState(484); + ((EqaulityExpressionContext)_localctx).op2 = match(NOT_EQUAL); + op = BinaryOperator.NOT_EQUAL;line = (((EqaulityExpressionContext)_localctx).op2!=null?((EqaulityExpressionContext)_localctx).op2.getLine():0); + } + break; + default: + throw new NoViableAltException(this); + } + setState(488); + ((EqaulityExpressionContext)_localctx).r1 = relationalExpression(0); + ((EqaulityExpressionContext)_localctx).expRet = new BinaryExpression(((EqaulityExpressionContext)_localctx).e1.expRet, ((EqaulityExpressionContext)_localctx).r1.expRet, op);_localctx.expRet.setLine(line); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(491); + ((EqaulityExpressionContext)_localctx).r2 = relationalExpression(0); + ((EqaulityExpressionContext)_localctx).expRet = ((EqaulityExpressionContext)_localctx).r2.expRet; + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class RelationalExpressionContext extends ParserRuleContext { + public Expression expRet; + public RelationalExpressionContext r1; + public AdditiveExpressionContext a2; + public Token gt; + public Token lt; + public Token let; + public Token get; + public AdditiveExpressionContext a1; + public AdditiveExpressionContext additiveExpression() { + return getRuleContext(AdditiveExpressionContext.class,0); + } + public RelationalExpressionContext relationalExpression() { + return getRuleContext(RelationalExpressionContext.class,0); + } + public TerminalNode GREATER_THAN() { return getToken(FunctionCraftParser.GREATER_THAN, 0); } + public TerminalNode LESS_THAN() { return getToken(FunctionCraftParser.LESS_THAN, 0); } + public TerminalNode LESS_EQUAL_THAN() { return getToken(FunctionCraftParser.LESS_EQUAL_THAN, 0); } + public TerminalNode GREATER_EQUAL_THAN() { return getToken(FunctionCraftParser.GREATER_EQUAL_THAN, 0); } + public RelationalExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_relationalExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterRelationalExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitRelationalExpression(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitRelationalExpression(this); + else return visitor.visitChildren(this); + } + } + + public final RelationalExpressionContext relationalExpression() throws RecognitionException { + return relationalExpression(0); + } + + private RelationalExpressionContext relationalExpression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + RelationalExpressionContext _localctx = new RelationalExpressionContext(_ctx, _parentState); + RelationalExpressionContext _prevctx = _localctx; + int _startState = 52; + enterRecursionRule(_localctx, 52, RULE_relationalExpression, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(497); + ((RelationalExpressionContext)_localctx).a2 = additiveExpression(0); + ((RelationalExpressionContext)_localctx).expRet = ((RelationalExpressionContext)_localctx).a2.expRet; + } + _ctx.stop = _input.LT(-1); + setState(517); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,35,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new RelationalExpressionContext(_parentctx, _parentState); + _localctx.r1 = _prevctx; + pushNewRecursionContext(_localctx, _startState, RULE_relationalExpression); + setState(500); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + + BinaryOperator op; + int line; + + setState(510); + _errHandler.sync(this); + switch (_input.LA(1)) { + case GREATER_THAN: + { + setState(502); + ((RelationalExpressionContext)_localctx).gt = match(GREATER_THAN); + op = BinaryOperator.GREATER_THAN;line = (((RelationalExpressionContext)_localctx).gt!=null?((RelationalExpressionContext)_localctx).gt.getLine():0); + } + break; + case LESS_THAN: + { + setState(504); + ((RelationalExpressionContext)_localctx).lt = match(LESS_THAN); + op = BinaryOperator.LESS_THAN;line = (((RelationalExpressionContext)_localctx).lt!=null?((RelationalExpressionContext)_localctx).lt.getLine():0); + } + break; + case LESS_EQUAL_THAN: + { + setState(506); + ((RelationalExpressionContext)_localctx).let = match(LESS_EQUAL_THAN); + op = BinaryOperator.LESS_EQUAL_THAN;line = (((RelationalExpressionContext)_localctx).let!=null?((RelationalExpressionContext)_localctx).let.getLine():0); + } + break; + case GREATER_EQUAL_THAN: + { + setState(508); + ((RelationalExpressionContext)_localctx).get = match(GREATER_EQUAL_THAN); + op = BinaryOperator.GREATER_EQUAL_THAN;line = (((RelationalExpressionContext)_localctx).get!=null?((RelationalExpressionContext)_localctx).get.getLine():0); + } + break; + default: + throw new NoViableAltException(this); + } + setState(512); + ((RelationalExpressionContext)_localctx).a1 = additiveExpression(0); + ((RelationalExpressionContext)_localctx).expRet = new BinaryExpression(((RelationalExpressionContext)_localctx).r1.expRet, ((RelationalExpressionContext)_localctx).a1.expRet, op);_localctx.expRet.setLine(line); + } + } + } + setState(519); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,35,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class AdditiveExpressionContext extends ParserRuleContext { + public Expression expRet; + public AdditiveExpressionContext a1; + public MultiplicativeExpressionContext m2; + public Token p; + public Token m; + public MultiplicativeExpressionContext m1; + public MultiplicativeExpressionContext multiplicativeExpression() { + return getRuleContext(MultiplicativeExpressionContext.class,0); + } + public AdditiveExpressionContext additiveExpression() { + return getRuleContext(AdditiveExpressionContext.class,0); + } + public TerminalNode PLUS() { return getToken(FunctionCraftParser.PLUS, 0); } + public TerminalNode MINUS() { return getToken(FunctionCraftParser.MINUS, 0); } + public AdditiveExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_additiveExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterAdditiveExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitAdditiveExpression(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitAdditiveExpression(this); + else return visitor.visitChildren(this); + } + } + + public final AdditiveExpressionContext additiveExpression() throws RecognitionException { + return additiveExpression(0); + } + + private AdditiveExpressionContext additiveExpression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + AdditiveExpressionContext _localctx = new AdditiveExpressionContext(_ctx, _parentState); + AdditiveExpressionContext _prevctx = _localctx; + int _startState = 54; + enterRecursionRule(_localctx, 54, RULE_additiveExpression, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(521); + ((AdditiveExpressionContext)_localctx).m2 = multiplicativeExpression(0); + + ((AdditiveExpressionContext)_localctx).expRet = ((AdditiveExpressionContext)_localctx).m2.expRet; + + } + _ctx.stop = _input.LT(-1); + setState(537); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,37,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new AdditiveExpressionContext(_parentctx, _parentState); + _localctx.a1 = _prevctx; + pushNewRecursionContext(_localctx, _startState, RULE_additiveExpression); + setState(524); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + + BinaryOperator op; + int line; + + setState(530); + _errHandler.sync(this); + switch (_input.LA(1)) { + case PLUS: + { + setState(526); + ((AdditiveExpressionContext)_localctx).p = match(PLUS); + op = BinaryOperator.PLUS;line = (((AdditiveExpressionContext)_localctx).p!=null?((AdditiveExpressionContext)_localctx).p.getLine():0); + } + break; + case MINUS: + { + setState(528); + ((AdditiveExpressionContext)_localctx).m = match(MINUS); + op = BinaryOperator.MINUS;line = (((AdditiveExpressionContext)_localctx).m!=null?((AdditiveExpressionContext)_localctx).m.getLine():0); + } + break; + default: + throw new NoViableAltException(this); + } + setState(532); + ((AdditiveExpressionContext)_localctx).m1 = multiplicativeExpression(0); + ((AdditiveExpressionContext)_localctx).expRet = new BinaryExpression(((AdditiveExpressionContext)_localctx).a1.expRet, ((AdditiveExpressionContext)_localctx).m1.expRet, op);_localctx.expRet.setLine(line); + } + } + } + setState(539); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,37,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class MultiplicativeExpressionContext extends ParserRuleContext { + public Expression expRet; + public MultiplicativeExpressionContext m1; + public PreUnaryExpressionContext p2; + public Token m; + public Token d; + public PreUnaryExpressionContext p1; + public PreUnaryExpressionContext preUnaryExpression() { + return getRuleContext(PreUnaryExpressionContext.class,0); + } + public MultiplicativeExpressionContext multiplicativeExpression() { + return getRuleContext(MultiplicativeExpressionContext.class,0); + } + public TerminalNode MULT() { return getToken(FunctionCraftParser.MULT, 0); } + public TerminalNode DIVIDE() { return getToken(FunctionCraftParser.DIVIDE, 0); } + public MultiplicativeExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_multiplicativeExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterMultiplicativeExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitMultiplicativeExpression(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitMultiplicativeExpression(this); + else return visitor.visitChildren(this); + } + } + + public final MultiplicativeExpressionContext multiplicativeExpression() throws RecognitionException { + return multiplicativeExpression(0); + } + + private MultiplicativeExpressionContext multiplicativeExpression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + MultiplicativeExpressionContext _localctx = new MultiplicativeExpressionContext(_ctx, _parentState); + MultiplicativeExpressionContext _prevctx = _localctx; + int _startState = 56; + enterRecursionRule(_localctx, 56, RULE_multiplicativeExpression, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(541); + ((MultiplicativeExpressionContext)_localctx).p2 = preUnaryExpression(); + ((MultiplicativeExpressionContext)_localctx).expRet = ((MultiplicativeExpressionContext)_localctx).p2.expRet; + } + _ctx.stop = _input.LT(-1); + setState(557); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,39,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new MultiplicativeExpressionContext(_parentctx, _parentState); + _localctx.m1 = _prevctx; + pushNewRecursionContext(_localctx, _startState, RULE_multiplicativeExpression); + setState(544); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + + BinaryOperator op; + int line; + + setState(550); + _errHandler.sync(this); + switch (_input.LA(1)) { + case MULT: + { + setState(546); + ((MultiplicativeExpressionContext)_localctx).m = match(MULT); + op = BinaryOperator.MULT;line = (((MultiplicativeExpressionContext)_localctx).m!=null?((MultiplicativeExpressionContext)_localctx).m.getLine():0); + } + break; + case DIVIDE: + { + setState(548); + ((MultiplicativeExpressionContext)_localctx).d = match(DIVIDE); + op = BinaryOperator.DIVIDE;line = (((MultiplicativeExpressionContext)_localctx).d!=null?((MultiplicativeExpressionContext)_localctx).d.getLine():0); + } + break; + default: + throw new NoViableAltException(this); + } + setState(552); + ((MultiplicativeExpressionContext)_localctx).p1 = preUnaryExpression(); + ((MultiplicativeExpressionContext)_localctx).expRet = new BinaryExpression(((MultiplicativeExpressionContext)_localctx).m1.expRet, ((MultiplicativeExpressionContext)_localctx).p1.expRet, op);_localctx.expRet.setLine(line); + } + } + } + setState(559); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,39,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class PreUnaryExpressionContext extends ParserRuleContext { + public Expression expRet; + public Token n; + public Token m; + public Token i; + public Token d; + public AccessExpressionContext a1; + public AccessExpressionContext a2; + public AccessExpressionContext accessExpression() { + return getRuleContext(AccessExpressionContext.class,0); + } + public TerminalNode NOT() { return getToken(FunctionCraftParser.NOT, 0); } + public TerminalNode MINUS() { return getToken(FunctionCraftParser.MINUS, 0); } + public TerminalNode INCREMENT() { return getToken(FunctionCraftParser.INCREMENT, 0); } + public TerminalNode DECREMENT() { return getToken(FunctionCraftParser.DECREMENT, 0); } + public PreUnaryExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_preUnaryExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterPreUnaryExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitPreUnaryExpression(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitPreUnaryExpression(this); + else return visitor.visitChildren(this); + } + } + + public final PreUnaryExpressionContext preUnaryExpression() throws RecognitionException { + PreUnaryExpressionContext _localctx = new PreUnaryExpressionContext(_ctx, getState()); + enterRule(_localctx, 58, RULE_preUnaryExpression); + try { + setState(577); + _errHandler.sync(this); + switch (_input.LA(1)) { + case MINUS: + case NOT: + case INCREMENT: + case DECREMENT: + enterOuterAlt(_localctx, 1); + { + + UnaryOperator op; + int line; + + setState(569); + _errHandler.sync(this); + switch (_input.LA(1)) { + case NOT: + { + setState(561); + ((PreUnaryExpressionContext)_localctx).n = match(NOT); + op = UnaryOperator.NOT;line = (((PreUnaryExpressionContext)_localctx).n!=null?((PreUnaryExpressionContext)_localctx).n.getLine():0); + } + break; + case MINUS: + { + setState(563); + ((PreUnaryExpressionContext)_localctx).m = match(MINUS); + op = UnaryOperator.MINUS;line = (((PreUnaryExpressionContext)_localctx).m!=null?((PreUnaryExpressionContext)_localctx).m.getLine():0); + } + break; + case INCREMENT: + { + setState(565); + ((PreUnaryExpressionContext)_localctx).i = match(INCREMENT); + op = UnaryOperator.INC;line = (((PreUnaryExpressionContext)_localctx).i!=null?((PreUnaryExpressionContext)_localctx).i.getLine():0); + } + break; + case DECREMENT: + { + setState(567); + ((PreUnaryExpressionContext)_localctx).d = match(DECREMENT); + op = UnaryOperator.DEC;line = (((PreUnaryExpressionContext)_localctx).d!=null?((PreUnaryExpressionContext)_localctx).d.getLine():0); + } + break; + default: + throw new NoViableAltException(this); + } + setState(571); + ((PreUnaryExpressionContext)_localctx).a1 = accessExpression(); + ((PreUnaryExpressionContext)_localctx).expRet = new UnaryExpression(((PreUnaryExpressionContext)_localctx).a1.expRet, op);_localctx.expRet.setLine(line); + } + break; + case LEN: + case METHOD: + case CHOP: + case CHOMP: + case TRUE: + case FALSE: + case ARROW: + case LPAR: + case LBRACK: + case INT_VALUE: + case FLOAT_VALUE: + case IDENTIFIER: + case STRING_VALUE: + enterOuterAlt(_localctx, 2); + { + setState(574); + ((PreUnaryExpressionContext)_localctx).a2 = accessExpression(); + ((PreUnaryExpressionContext)_localctx).expRet = ((PreUnaryExpressionContext)_localctx).a2.expRet; + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class AccessExpressionContext extends ParserRuleContext { + public Expression expRet; + public OtherExpressionContext o; + public FunctionArgumentsContext f; + public AccessListContext a; + public OtherExpressionContext otherExpression() { + return getRuleContext(OtherExpressionContext.class,0); + } + public List LPAR() { return getTokens(FunctionCraftParser.LPAR); } + public TerminalNode LPAR(int i) { + return getToken(FunctionCraftParser.LPAR, i); + } + public List RPAR() { return getTokens(FunctionCraftParser.RPAR); } + public TerminalNode RPAR(int i) { + return getToken(FunctionCraftParser.RPAR, i); + } + public List functionArguments() { + return getRuleContexts(FunctionArgumentsContext.class); + } + public FunctionArgumentsContext functionArguments(int i) { + return getRuleContext(FunctionArgumentsContext.class,i); + } + public List accessList() { + return getRuleContexts(AccessListContext.class); + } + public AccessListContext accessList(int i) { + return getRuleContext(AccessListContext.class,i); + } + public AccessExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_accessExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterAccessExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitAccessExpression(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitAccessExpression(this); + else return visitor.visitChildren(this); + } + } + + public final AccessExpressionContext accessExpression() throws RecognitionException { + AccessExpressionContext _localctx = new AccessExpressionContext(_ctx, getState()); + enterRule(_localctx, 60, RULE_accessExpression); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + + boolean isAccessExpression = false; + boolean isMultiDimentional = false; + ArrayList args = new ArrayList(); + ArrayList dimentions = new ArrayList(); + + setState(580); + ((AccessExpressionContext)_localctx).o = otherExpression(); + setState(588); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,42,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(581); + match(LPAR); + setState(582); + ((AccessExpressionContext)_localctx).f = functionArguments(); + + isAccessExpression = true; + args.addAll(((AccessExpressionContext)_localctx).f.funcArgsRet); + + setState(584); + match(RPAR); + } + } + } + setState(590); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,42,_ctx); + } + setState(596); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,43,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(591); + ((AccessExpressionContext)_localctx).a = accessList(); + + isMultiDimentional = true; + dimentions.add(((AccessExpressionContext)_localctx).a.accessListExp); + + } + } + } + setState(598); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,43,_ctx); + } + + if(!isAccessExpression){ + System.out.println("here") + ((AccessExpressionContext)_localctx).expRet = ((AccessExpressionContext)_localctx).o.expRet; + } + else{ + AccessExpression accessExp = new AccessExpression(((AccessExpressionContext)_localctx).o.expRet, args); + accessExp.setIsFunctionCall(isAccessExpression); + if(isMultiDimentional){ + + accessExp.setDimentionalAccess(dimentions); + } + ((AccessExpressionContext)_localctx).expRet = accessExp; + _localctx.expRet.setLine(((AccessExpressionContext)_localctx).o.expRet.getLine()); + + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class OtherExpressionContext extends ParserRuleContext { + public Expression expRet; + public ValuesContext v; + public Token id; + public LambdaFunctionContext lambda; + public ChopStatementContext chop; + public ChompStatementContext chomp; + public MatchPatternStatementContext match; + public FilterStatementContext f; + public LenStatementContext len_; + public ExpressionContext e; + public ValuesContext values() { + return getRuleContext(ValuesContext.class,0); + } + public TerminalNode IDENTIFIER() { return getToken(FunctionCraftParser.IDENTIFIER, 0); } + public LambdaFunctionContext lambdaFunction() { + return getRuleContext(LambdaFunctionContext.class,0); + } + public ChopStatementContext chopStatement() { + return getRuleContext(ChopStatementContext.class,0); + } + public ChompStatementContext chompStatement() { + return getRuleContext(ChompStatementContext.class,0); + } + public MatchPatternStatementContext matchPatternStatement() { + return getRuleContext(MatchPatternStatementContext.class,0); + } + public FilterStatementContext filterStatement() { + return getRuleContext(FilterStatementContext.class,0); + } + public LenStatementContext lenStatement() { + return getRuleContext(LenStatementContext.class,0); + } + public TerminalNode LPAR() { return getToken(FunctionCraftParser.LPAR, 0); } + public TerminalNode RPAR() { return getToken(FunctionCraftParser.RPAR, 0); } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public OtherExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_otherExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterOtherExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitOtherExpression(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitOtherExpression(this); + else return visitor.visitChildren(this); + } + } + + public final OtherExpressionContext otherExpression() throws RecognitionException { + OtherExpressionContext _localctx = new OtherExpressionContext(_ctx, getState()); + enterRule(_localctx, 62, RULE_otherExpression); + int _la; + try { + setState(631); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,45,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(601); + ((OtherExpressionContext)_localctx).v = values(); + ((OtherExpressionContext)_localctx).expRet = ((OtherExpressionContext)_localctx).v.valRet; + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(604); + ((OtherExpressionContext)_localctx).id = match(IDENTIFIER); + + ((OtherExpressionContext)_localctx).expRet = new Identifier((((OtherExpressionContext)_localctx).id!=null?((OtherExpressionContext)_localctx).id.getText():null)); + _localctx.expRet.setLine((((OtherExpressionContext)_localctx).id!=null?((OtherExpressionContext)_localctx).id.getLine():0)); + + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(606); + ((OtherExpressionContext)_localctx).lambda = lambdaFunction(); + ((OtherExpressionContext)_localctx).expRet = ((OtherExpressionContext)_localctx).lambda.lambdaRet; + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(609); + ((OtherExpressionContext)_localctx).chop = chopStatement(); + ((OtherExpressionContext)_localctx).expRet = ((OtherExpressionContext)_localctx).chop.chopRet; + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(612); + ((OtherExpressionContext)_localctx).chomp = chompStatement(); + ((OtherExpressionContext)_localctx).expRet = ((OtherExpressionContext)_localctx).chomp.chompRet; + } + break; + case 6: + enterOuterAlt(_localctx, 6); + { + setState(615); + ((OtherExpressionContext)_localctx).match = matchPatternStatement(); + ((OtherExpressionContext)_localctx).expRet = ((OtherExpressionContext)_localctx).match.matchPatRet; + } + break; + case 7: + enterOuterAlt(_localctx, 7); + { + setState(618); + ((OtherExpressionContext)_localctx).f = filterStatement(); + ((OtherExpressionContext)_localctx).expRet = ((OtherExpressionContext)_localctx).f.filterStatementRet; + } + break; + case 8: + enterOuterAlt(_localctx, 8); + { + setState(621); + ((OtherExpressionContext)_localctx).len_ = lenStatement(); + ((OtherExpressionContext)_localctx).expRet = ((OtherExpressionContext)_localctx).len_.lenRet; + } + break; + case 9: + enterOuterAlt(_localctx, 9); + { + setState(624); + match(LPAR); + setState(628); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & -1150101502091851712L) != 0)) { + { + setState(625); + ((OtherExpressionContext)_localctx).e = expression(0); + ((OtherExpressionContext)_localctx).expRet = ((OtherExpressionContext)_localctx).e.expRet; + } + } + + setState(630); + match(RPAR); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class LambdaFunctionContext extends ParserRuleContext { + public Expression lambdaRet; + public Token a; + public FunctionArgumentsDeclarationContext fd; + public BodyContext b; + public TerminalNode LBRACE() { return getToken(FunctionCraftParser.LBRACE, 0); } + public TerminalNode RBRACE() { return getToken(FunctionCraftParser.RBRACE, 0); } + public TerminalNode ARROW() { return getToken(FunctionCraftParser.ARROW, 0); } + public FunctionArgumentsDeclarationContext functionArgumentsDeclaration() { + return getRuleContext(FunctionArgumentsDeclarationContext.class,0); + } + public BodyContext body() { + return getRuleContext(BodyContext.class,0); + } + public LambdaFunctionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_lambdaFunction; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterLambdaFunction(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitLambdaFunction(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitLambdaFunction(this); + else return visitor.visitChildren(this); + } + } + + public final LambdaFunctionContext lambdaFunction() throws RecognitionException { + LambdaFunctionContext _localctx = new LambdaFunctionContext(_ctx, getState()); + enterRule(_localctx, 64, RULE_lambdaFunction); + try { + enterOuterAlt(_localctx, 1); + { + setState(633); + ((LambdaFunctionContext)_localctx).a = match(ARROW); + setState(634); + ((LambdaFunctionContext)_localctx).fd = functionArgumentsDeclaration(); + setState(635); + match(LBRACE); + setState(636); + ((LambdaFunctionContext)_localctx).b = body(); + setState(637); + match(RBRACE); + + ((LambdaFunctionContext)_localctx).lambdaRet = new LambdaExpression(((LambdaFunctionContext)_localctx).fd.argRet, ((LambdaFunctionContext)_localctx).b.bodyRet); + _localctx.lambdaRet.setLine((((LambdaFunctionContext)_localctx).a!=null?((LambdaFunctionContext)_localctx).a.getLine():0)); + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class ValuesContext extends ParserRuleContext { + public Value valRet; + public BoolValueContext b; + public Token s; + public Token i; + public Token float_; + public ListValueContext l; + public FunctionPointerContext f; + public BoolValueContext boolValue() { + return getRuleContext(BoolValueContext.class,0); + } + public TerminalNode STRING_VALUE() { return getToken(FunctionCraftParser.STRING_VALUE, 0); } + public TerminalNode INT_VALUE() { return getToken(FunctionCraftParser.INT_VALUE, 0); } + public TerminalNode FLOAT_VALUE() { return getToken(FunctionCraftParser.FLOAT_VALUE, 0); } + public ListValueContext listValue() { + return getRuleContext(ListValueContext.class,0); + } + public FunctionPointerContext functionPointer() { + return getRuleContext(FunctionPointerContext.class,0); + } + public ValuesContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_values; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterValues(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitValues(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitValues(this); + else return visitor.visitChildren(this); + } + } + + public final ValuesContext values() throws RecognitionException { + ValuesContext _localctx = new ValuesContext(_ctx, getState()); + enterRule(_localctx, 66, RULE_values); + try { + setState(655); + _errHandler.sync(this); + switch (_input.LA(1)) { + case TRUE: + case FALSE: + enterOuterAlt(_localctx, 1); + { + setState(640); + ((ValuesContext)_localctx).b = boolValue(); + ((ValuesContext)_localctx).valRet = ((ValuesContext)_localctx).b.boolValRet; + } + break; + case STRING_VALUE: + enterOuterAlt(_localctx, 2); + { + setState(643); + ((ValuesContext)_localctx).s = match(STRING_VALUE); + ((ValuesContext)_localctx).valRet = new StringValue((((ValuesContext)_localctx).s!=null?((ValuesContext)_localctx).s.getText():null)); _localctx.valRet.setLine((((ValuesContext)_localctx).s!=null?((ValuesContext)_localctx).s.getLine():0)); + } + break; + case INT_VALUE: + enterOuterAlt(_localctx, 3); + { + setState(645); + ((ValuesContext)_localctx).i = match(INT_VALUE); + ((ValuesContext)_localctx).valRet = new IntValue((((ValuesContext)_localctx).i!=null?Integer.valueOf(((ValuesContext)_localctx).i.getText()):0));_localctx.valRet.setLine((((ValuesContext)_localctx).i!=null?((ValuesContext)_localctx).i.getLine():0)); + } + break; + case FLOAT_VALUE: + enterOuterAlt(_localctx, 4); + { + setState(647); + ((ValuesContext)_localctx).float_ = match(FLOAT_VALUE); + ((ValuesContext)_localctx).valRet = new FloatValue(Float.parseFloat((((ValuesContext)_localctx).float_!=null?((ValuesContext)_localctx).float_.getText():null)));_localctx.valRet.setLine((((ValuesContext)_localctx).float_!=null?((ValuesContext)_localctx).float_.getLine():0)); + } + break; + case LBRACK: + enterOuterAlt(_localctx, 5); + { + setState(649); + ((ValuesContext)_localctx).l = listValue(); + ((ValuesContext)_localctx).valRet = ((ValuesContext)_localctx).l.listValRet; + } + break; + case METHOD: + enterOuterAlt(_localctx, 6); + { + setState(652); + ((ValuesContext)_localctx).f = functionPointer(); + ((ValuesContext)_localctx).valRet = ((ValuesContext)_localctx).f.fpRet; + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class ListValueContext extends ParserRuleContext { + public ListValue listValRet; + public Token l; + public FunctionArgumentsContext f; + public TerminalNode RBRACK() { return getToken(FunctionCraftParser.RBRACK, 0); } + public TerminalNode LBRACK() { return getToken(FunctionCraftParser.LBRACK, 0); } + public FunctionArgumentsContext functionArguments() { + return getRuleContext(FunctionArgumentsContext.class,0); + } + public ListValueContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_listValue; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterListValue(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitListValue(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitListValue(this); + else return visitor.visitChildren(this); + } + } + + public final ListValueContext listValue() throws RecognitionException { + ListValueContext _localctx = new ListValueContext(_ctx, getState()); + enterRule(_localctx, 68, RULE_listValue); + try { + enterOuterAlt(_localctx, 1); + { + setState(657); + ((ListValueContext)_localctx).l = match(LBRACK); + setState(658); + ((ListValueContext)_localctx).f = functionArguments(); + setState(659); + match(RBRACK); + + ((ListValueContext)_localctx).listValRet = new ListValue(((ListValueContext)_localctx).f.funcArgsRet); + _localctx.listValRet.setLine((((ListValueContext)_localctx).l!=null?((ListValueContext)_localctx).l.getLine():0)); + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class BoolValueContext extends ParserRuleContext { + public BoolValue boolValRet; + public Token t; + public Token f; + public TerminalNode TRUE() { return getToken(FunctionCraftParser.TRUE, 0); } + public TerminalNode FALSE() { return getToken(FunctionCraftParser.FALSE, 0); } + public BoolValueContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_boolValue; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterBoolValue(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitBoolValue(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitBoolValue(this); + else return visitor.visitChildren(this); + } + } + + public final BoolValueContext boolValue() throws RecognitionException { + BoolValueContext _localctx = new BoolValueContext(_ctx, getState()); + enterRule(_localctx, 70, RULE_boolValue); + try { + setState(666); + _errHandler.sync(this); + switch (_input.LA(1)) { + case TRUE: + enterOuterAlt(_localctx, 1); + { + setState(662); + ((BoolValueContext)_localctx).t = match(TRUE); + ((BoolValueContext)_localctx).boolValRet = new BoolValue(true); _localctx.boolValRet.setLine((((BoolValueContext)_localctx).t!=null?((BoolValueContext)_localctx).t.getLine():0)); + } + break; + case FALSE: + enterOuterAlt(_localctx, 2); + { + setState(664); + ((BoolValueContext)_localctx).f = match(FALSE); + ((BoolValueContext)_localctx).boolValRet = new BoolValue(false); _localctx.boolValRet.setLine((((BoolValueContext)_localctx).f!=null?((BoolValueContext)_localctx).f.getLine():0)); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + @SuppressWarnings("CheckReturnValue") + public static class FunctionPointerContext extends ParserRuleContext { + public FunctionPointer fpRet; + public Token m; + public Token id; + public TerminalNode LPAR() { return getToken(FunctionCraftParser.LPAR, 0); } + public TerminalNode COLON() { return getToken(FunctionCraftParser.COLON, 0); } + public TerminalNode RPAR() { return getToken(FunctionCraftParser.RPAR, 0); } + public TerminalNode METHOD() { return getToken(FunctionCraftParser.METHOD, 0); } + public TerminalNode IDENTIFIER() { return getToken(FunctionCraftParser.IDENTIFIER, 0); } + public FunctionPointerContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_functionPointer; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).enterFunctionPointer(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof FunctionCraftListener ) ((FunctionCraftListener)listener).exitFunctionPointer(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof FunctionCraftVisitor ) return ((FunctionCraftVisitor)visitor).visitFunctionPointer(this); + else return visitor.visitChildren(this); + } + } + + public final FunctionPointerContext functionPointer() throws RecognitionException { + FunctionPointerContext _localctx = new FunctionPointerContext(_ctx, getState()); + enterRule(_localctx, 72, RULE_functionPointer); + try { + enterOuterAlt(_localctx, 1); + { + setState(668); + ((FunctionPointerContext)_localctx).m = match(METHOD); + setState(669); + match(LPAR); + setState(670); + match(COLON); + setState(671); + ((FunctionPointerContext)_localctx).id = match(IDENTIFIER); + setState(672); + match(RPAR); + + Identifier id_ = new Identifier((((FunctionPointerContext)_localctx).id!=null?((FunctionPointerContext)_localctx).id.getText():null)); + id_.setLine((((FunctionPointerContext)_localctx).id!=null?((FunctionPointerContext)_localctx).id.getLine():0)); + ((FunctionPointerContext)_localctx).fpRet = new FunctionPointer(id_); + _localctx.fpRet.setLine((((FunctionPointerContext)_localctx).m!=null?((FunctionPointerContext)_localctx).m.getLine():0)); + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) { + switch (ruleIndex) { + case 24: + return expression_sempred((ExpressionContext)_localctx, predIndex); + case 26: + return relationalExpression_sempred((RelationalExpressionContext)_localctx, predIndex); + case 27: + return additiveExpression_sempred((AdditiveExpressionContext)_localctx, predIndex); + case 28: + return multiplicativeExpression_sempred((MultiplicativeExpressionContext)_localctx, predIndex); + } + return true; + } + private boolean expression_sempred(ExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 0: + return precpred(_ctx, 2); + } + return true; + } + private boolean relationalExpression_sempred(RelationalExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 1: + return precpred(_ctx, 2); + } + return true; + } + private boolean additiveExpression_sempred(AdditiveExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 2: + return precpred(_ctx, 2); + } + return true; + } + private boolean multiplicativeExpression_sempred(MultiplicativeExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 3: + return precpred(_ctx, 2); + } + return true; + } + + public static final String _serializedATN = + "\u0004\u0001A\u02a4\u0002\u0000\u0007\u0000\u0002\u0001\u0007\u0001\u0002"+ + "\u0002\u0007\u0002\u0002\u0003\u0007\u0003\u0002\u0004\u0007\u0004\u0002"+ + "\u0005\u0007\u0005\u0002\u0006\u0007\u0006\u0002\u0007\u0007\u0007\u0002"+ + "\b\u0007\b\u0002\t\u0007\t\u0002\n\u0007\n\u0002\u000b\u0007\u000b\u0002"+ + "\f\u0007\f\u0002\r\u0007\r\u0002\u000e\u0007\u000e\u0002\u000f\u0007\u000f"+ + "\u0002\u0010\u0007\u0010\u0002\u0011\u0007\u0011\u0002\u0012\u0007\u0012"+ + "\u0002\u0013\u0007\u0013\u0002\u0014\u0007\u0014\u0002\u0015\u0007\u0015"+ + "\u0002\u0016\u0007\u0016\u0002\u0017\u0007\u0017\u0002\u0018\u0007\u0018"+ + "\u0002\u0019\u0007\u0019\u0002\u001a\u0007\u001a\u0002\u001b\u0007\u001b"+ + "\u0002\u001c\u0007\u001c\u0002\u001d\u0007\u001d\u0002\u001e\u0007\u001e"+ + "\u0002\u001f\u0007\u001f\u0002 \u0007 \u0002!\u0007!\u0002\"\u0007\"\u0002"+ + "#\u0007#\u0002$\u0007$\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0000"+ + "\u0001\u0000\u0001\u0000\u0001\u0000\u0005\u0000R\b\u0000\n\u0000\f\u0000"+ + "U\t\u0000\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0001\u0001\u0001"+ + "\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001"+ + "\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0002\u0001\u0002\u0001\u0002"+ + "\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0005\u0002l\b\u0002"+ + "\n\u0002\f\u0002o\t\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002"+ + "\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002"+ + "\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0005\u0002\u007f\b\u0002"+ + "\n\u0002\f\u0002\u0082\t\u0002\u0001\u0002\u0001\u0002\u0003\u0002\u0086"+ + "\b\u0002\u0003\u0002\u0088\b\u0002\u0001\u0002\u0001\u0002\u0001\u0003"+ + "\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003"+ + "\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003"+ + "\u0001\u0003\u0001\u0003\u0005\u0003\u009b\b\u0003\n\u0003\f\u0003\u009e"+ + "\t\u0003\u0001\u0003\u0001\u0003\u0001\u0004\u0001\u0004\u0001\u0004\u0001"+ + "\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001"+ + "\u0004\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0001"+ + "\u0005\u0001\u0005\u0005\u0005\u00b3\b\u0005\n\u0005\f\u0005\u00b6\t\u0005"+ + "\u0003\u0005\u00b8\b\u0005\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006"+ + "\u0001\u0006\u0003\u0006\u00bf\b\u0006\u0001\u0006\u0001\u0006\u0001\u0006"+ + "\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007"+ + "\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0003\u0007"+ + "\u00cf\b\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007"+ + "\u0001\u0007\u0001\u0007\u0001\u0007\u0003\u0007\u00d9\b\u0007\u0001\u0007"+ + "\u0001\u0007\u0001\u0007\u0001\u0007\u0005\u0007\u00df\b\u0007\n\u0007"+ + "\f\u0007\u00e2\t\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007"+ + "\u0003\u0007\u00e8\b\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\b"+ + "\u0001\b\u0001\b\u0001\b\u0001\b\u0001\b\u0001\b\u0003\b\u00f4\b\b\u0001"+ + "\b\u0001\b\u0001\b\u0003\b\u00f9\b\b\u0005\b\u00fb\b\b\n\b\f\b\u00fe\t"+ + "\b\u0005\b\u0100\b\b\n\b\f\b\u0103\t\b\u0001\t\u0001\t\u0001\t\u0001\t"+ + "\u0001\t\u0001\t\u0001\t\u0001\n\u0001\n\u0001\n\u0001\n\u0001\n\u0001"+ + "\n\u0001\u000b\u0001\u000b\u0001\u000b\u0001\u000b\u0001\u000b\u0001\u000b"+ + "\u0001\u000b\u0001\u000b\u0001\u000b\u0001\f\u0001\f\u0001\f\u0001\f\u0001"+ + "\f\u0001\f\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001"+ + "\r\u0001\r\u0003\r\u012a\b\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001"+ + "\r\u0003\r\u0132\b\r\u0001\r\u0005\r\u0135\b\r\n\r\f\r\u0138\t\r\u0001"+ + "\r\u0001\r\u0001\r\u0003\r\u013d\b\r\u0001\u000e\u0001\u000e\u0001\u000e"+ + "\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000f"+ + "\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f"+ + "\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f"+ + "\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0005\u000f\u0158\b\u000f"+ + "\n\u000f\f\u000f\u015b\t\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0001"+ + "\u000f\u0001\u000f\u0003\u000f\u0162\b\u000f\u0001\u0010\u0001\u0010\u0001"+ + "\u0010\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0010\u0001"+ + "\u0010\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0010\u0005"+ + "\u0010\u0172\b\u0010\n\u0010\f\u0010\u0175\t\u0010\u0001\u0010\u0001\u0010"+ + "\u0001\u0010\u0001\u0011\u0001\u0011\u0001\u0011\u0001\u0011\u0001\u0011"+ + "\u0001\u0011\u0001\u0011\u0001\u0011\u0001\u0012\u0001\u0012\u0001\u0012"+ + "\u0001\u0012\u0001\u0012\u0001\u0012\u0001\u0013\u0001\u0013\u0001\u0013"+ + "\u0001\u0013\u0001\u0013\u0001\u0013\u0001\u0014\u0001\u0014\u0001\u0014"+ + "\u0001\u0014\u0001\u0014\u0003\u0014\u0193\b\u0014\u0001\u0014\u0001\u0014"+ + "\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0014"+ + "\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0014\u0003\u0014\u01a1\b\u0014"+ + "\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0015\u0001\u0015"+ + "\u0001\u0015\u0001\u0015\u0001\u0015\u0001\u0016\u0001\u0016\u0001\u0016"+ + "\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0016"+ + "\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0016"+ + "\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0016"+ + "\u0001\u0016\u0001\u0016\u0003\u0016\u01c3\b\u0016\u0001\u0017\u0001\u0017"+ + "\u0001\u0017\u0001\u0017\u0005\u0017\u01c9\b\u0017\n\u0017\f\u0017\u01cc"+ + "\t\u0017\u0001\u0017\u0001\u0017\u0001\u0017\u0003\u0017\u01d1\b\u0017"+ + "\u0001\u0018\u0001\u0018\u0001\u0018\u0001\u0018\u0001\u0018\u0001\u0018"+ + "\u0001\u0018\u0001\u0018\u0001\u0018\u0005\u0018\u01dc\b\u0018\n\u0018"+ + "\f\u0018\u01df\t\u0018\u0001\u0019\u0001\u0019\u0001\u0019\u0001\u0019"+ + "\u0001\u0019\u0001\u0019\u0003\u0019\u01e7\b\u0019\u0001\u0019\u0001\u0019"+ + "\u0001\u0019\u0001\u0019\u0001\u0019\u0001\u0019\u0003\u0019\u01ef\b\u0019"+ + "\u0001\u001a\u0001\u001a\u0001\u001a\u0001\u001a\u0001\u001a\u0001\u001a"+ + "\u0001\u001a\u0001\u001a\u0001\u001a\u0001\u001a\u0001\u001a\u0001\u001a"+ + "\u0001\u001a\u0001\u001a\u0003\u001a\u01ff\b\u001a\u0001\u001a\u0001\u001a"+ + "\u0001\u001a\u0005\u001a\u0204\b\u001a\n\u001a\f\u001a\u0207\t\u001a\u0001"+ + "\u001b\u0001\u001b\u0001\u001b\u0001\u001b\u0001\u001b\u0001\u001b\u0001"+ + "\u001b\u0001\u001b\u0001\u001b\u0001\u001b\u0003\u001b\u0213\b\u001b\u0001"+ + "\u001b\u0001\u001b\u0001\u001b\u0005\u001b\u0218\b\u001b\n\u001b\f\u001b"+ + "\u021b\t\u001b\u0001\u001c\u0001\u001c\u0001\u001c\u0001\u001c\u0001\u001c"+ + "\u0001\u001c\u0001\u001c\u0001\u001c\u0001\u001c\u0001\u001c\u0003\u001c"+ + "\u0227\b\u001c\u0001\u001c\u0001\u001c\u0001\u001c\u0005\u001c\u022c\b"+ + "\u001c\n\u001c\f\u001c\u022f\t\u001c\u0001\u001d\u0001\u001d\u0001\u001d"+ + "\u0001\u001d\u0001\u001d\u0001\u001d\u0001\u001d\u0001\u001d\u0001\u001d"+ + "\u0003\u001d\u023a\b\u001d\u0001\u001d\u0001\u001d\u0001\u001d\u0001\u001d"+ + "\u0001\u001d\u0001\u001d\u0003\u001d\u0242\b\u001d\u0001\u001e\u0001\u001e"+ + "\u0001\u001e\u0001\u001e\u0001\u001e\u0001\u001e\u0001\u001e\u0005\u001e"+ + "\u024b\b\u001e\n\u001e\f\u001e\u024e\t\u001e\u0001\u001e\u0001\u001e\u0001"+ + "\u001e\u0005\u001e\u0253\b\u001e\n\u001e\f\u001e\u0256\t\u001e\u0001\u001e"+ + "\u0001\u001e\u0001\u001f\u0001\u001f\u0001\u001f\u0001\u001f\u0001\u001f"+ + "\u0001\u001f\u0001\u001f\u0001\u001f\u0001\u001f\u0001\u001f\u0001\u001f"+ + "\u0001\u001f\u0001\u001f\u0001\u001f\u0001\u001f\u0001\u001f\u0001\u001f"+ + "\u0001\u001f\u0001\u001f\u0001\u001f\u0001\u001f\u0001\u001f\u0001\u001f"+ + "\u0001\u001f\u0001\u001f\u0001\u001f\u0001\u001f\u0003\u001f\u0275\b\u001f"+ + "\u0001\u001f\u0003\u001f\u0278\b\u001f\u0001 \u0001 \u0001 \u0001 \u0001"+ + " \u0001 \u0001 \u0001!\u0001!\u0001!\u0001!\u0001!\u0001!\u0001!\u0001"+ + "!\u0001!\u0001!\u0001!\u0001!\u0001!\u0001!\u0001!\u0003!\u0290\b!\u0001"+ + "\"\u0001\"\u0001\"\u0001\"\u0001\"\u0001#\u0001#\u0001#\u0001#\u0003#"+ + "\u029b\b#\u0001$\u0001$\u0001$\u0001$\u0001$\u0001$\u0001$\u0001$\u0000"+ + "\u00040468%\u0000\u0002\u0004\u0006\b\n\f\u000e\u0010\u0012\u0014\u0016"+ + "\u0018\u001a\u001c\u001e \"$&(*,.02468:<>@BDFH\u0000\u0001\u0001\u0000"+ + "\u001e\u001f\u02c8\u0000J\u0001\u0000\u0000\u0000\u0002Y\u0001\u0000\u0000"+ + "\u0000\u0004d\u0001\u0000\u0000\u0000\u0006\u008b\u0001\u0000\u0000\u0000"+ + "\b\u00a1\u0001\u0000\u0000\u0000\n\u00ab\u0001\u0000\u0000\u0000\f\u00b9"+ + "\u0001\u0000\u0000\u0000\u000e\u00c3\u0001\u0000\u0000\u0000\u0010\u00ec"+ + "\u0001\u0000\u0000\u0000\u0012\u0104\u0001\u0000\u0000\u0000\u0014\u010b"+ + "\u0001\u0000\u0000\u0000\u0016\u0111\u0001\u0000\u0000\u0000\u0018\u011a"+ + "\u0001\u0000\u0000\u0000\u001a\u0120\u0001\u0000\u0000\u0000\u001c\u013e"+ + "\u0001\u0000\u0000\u0000\u001e\u0161\u0001\u0000\u0000\u0000 \u0163\u0001"+ + "\u0000\u0000\u0000\"\u0179\u0001\u0000\u0000\u0000$\u0181\u0001\u0000"+ + "\u0000\u0000&\u0187\u0001\u0000\u0000\u0000(\u018d\u0001\u0000\u0000\u0000"+ + "*\u01a6\u0001\u0000\u0000\u0000,\u01c2\u0001\u0000\u0000\u0000.\u01c4"+ + "\u0001\u0000\u0000\u00000\u01d2\u0001\u0000\u0000\u00002\u01ee\u0001\u0000"+ + "\u0000\u00004\u01f0\u0001\u0000\u0000\u00006\u0208\u0001\u0000\u0000\u0000"+ + "8\u021c\u0001\u0000\u0000\u0000:\u0241\u0001\u0000\u0000\u0000<\u0243"+ + "\u0001\u0000\u0000\u0000>\u0277\u0001\u0000\u0000\u0000@\u0279\u0001\u0000"+ + "\u0000\u0000B\u028f\u0001\u0000\u0000\u0000D\u0291\u0001\u0000\u0000\u0000"+ + "F\u029a\u0001\u0000\u0000\u0000H\u029c\u0001\u0000\u0000\u0000JS\u0006"+ + "\u0000\uffff\uffff\u0000KL\u0003\u0002\u0001\u0000LM\u0006\u0000\uffff"+ + "\uffff\u0000MR\u0001\u0000\u0000\u0000NO\u0003\u0006\u0003\u0000OP\u0006"+ + "\u0000\uffff\uffff\u0000PR\u0001\u0000\u0000\u0000QK\u0001\u0000\u0000"+ + "\u0000QN\u0001\u0000\u0000\u0000RU\u0001\u0000\u0000\u0000SQ\u0001\u0000"+ + "\u0000\u0000ST\u0001\u0000\u0000\u0000TV\u0001\u0000\u0000\u0000US\u0001"+ + "\u0000\u0000\u0000VW\u0003\b\u0004\u0000WX\u0006\u0000\uffff\uffff\u0000"+ + "X\u0001\u0001\u0000\u0000\u0000YZ\u0006\u0001\uffff\uffff\u0000Z[\u0005"+ + "\u0001\u0000\u0000[\\\u0006\u0001\uffff\uffff\u0000\\]\u0005>\u0000\u0000"+ + "]^\u0006\u0001\uffff\uffff\u0000^_\u0003\u0004\u0002\u0000_`\u0006\u0001"+ + "\uffff\uffff\u0000`a\u0003.\u0017\u0000ab\u0006\u0001\uffff\uffff\u0000"+ + "bc\u0005\u0002\u0000\u0000c\u0003\u0001\u0000\u0000\u0000de\u0006\u0002"+ + "\uffff\uffff\u0000e\u0087\u00051\u0000\u0000fg\u0005>\u0000\u0000gm\u0006"+ + "\u0002\uffff\uffff\u0000hi\u00057\u0000\u0000ij\u0005>\u0000\u0000jl\u0006"+ + "\u0002\uffff\uffff\u0000kh\u0001\u0000\u0000\u0000lo\u0001\u0000\u0000"+ + "\u0000mk\u0001\u0000\u0000\u0000mn\u0001\u0000\u0000\u0000n\u0085\u0001"+ + "\u0000\u0000\u0000om\u0001\u0000\u0000\u0000pq\u00057\u0000\u0000qr\u0005"+ + "3\u0000\u0000rs\u0005>\u0000\u0000st\u0006\u0002\uffff\uffff\u0000tu\u0005"+ + "0\u0000\u0000uv\u00030\u0018\u0000v\u0080\u0006\u0002\uffff\uffff\u0000"+ + "wx\u00057\u0000\u0000xy\u0005>\u0000\u0000yz\u0006\u0002\uffff\uffff\u0000"+ + "z{\u00050\u0000\u0000{|\u00030\u0018\u0000|}\u0006\u0002\uffff\uffff\u0000"+ + "}\u007f\u0001\u0000\u0000\u0000~w\u0001\u0000\u0000\u0000\u007f\u0082"+ + "\u0001\u0000\u0000\u0000\u0080~\u0001\u0000\u0000\u0000\u0080\u0081\u0001"+ + "\u0000\u0000\u0000\u0081\u0083\u0001\u0000\u0000\u0000\u0082\u0080\u0001"+ + "\u0000\u0000\u0000\u0083\u0084\u00054\u0000\u0000\u0084\u0086\u0001\u0000"+ + "\u0000\u0000\u0085p\u0001\u0000\u0000\u0000\u0085\u0086\u0001\u0000\u0000"+ + "\u0000\u0086\u0088\u0001\u0000\u0000\u0000\u0087f\u0001\u0000\u0000\u0000"+ + "\u0087\u0088\u0001\u0000\u0000\u0000\u0088\u0089\u0001\u0000\u0000\u0000"+ + "\u0089\u008a\u00052\u0000\u0000\u008a\u0005\u0001\u0000\u0000\u0000\u008b"+ + "\u008c\u0005\f\u0000\u0000\u008c\u008d\u0006\u0003\uffff\uffff\u0000\u008d"+ + "\u008e\u0005>\u0000\u0000\u008e\u008f\u0006\u0003\uffff\uffff\u0000\u008f"+ + "\u0090\u00051\u0000\u0000\u0090\u0091\u0005>\u0000\u0000\u0091\u0092\u0006"+ + "\u0003\uffff\uffff\u0000\u0092\u009c\u00052\u0000\u0000\u0093\u0094\u0005"+ + "#\u0000\u0000\u0094\u0095\u0003\u0010\b\u0000\u0095\u0096\u0006\u0003"+ + "\uffff\uffff\u0000\u0096\u0097\u00050\u0000\u0000\u0097\u0098\u00030\u0018"+ + "\u0000\u0098\u0099\u0006\u0003\uffff\uffff\u0000\u0099\u009b\u0001\u0000"+ + "\u0000\u0000\u009a\u0093\u0001\u0000\u0000\u0000\u009b\u009e\u0001\u0000"+ + "\u0000\u0000\u009c\u009a\u0001\u0000\u0000\u0000\u009c\u009d\u0001\u0000"+ + "\u0000\u0000\u009d\u009f\u0001\u0000\u0000\u0000\u009e\u009c\u0001\u0000"+ + "\u0000\u0000\u009f\u00a0\u0005;\u0000\u0000\u00a0\u0007\u0001\u0000\u0000"+ + "\u0000\u00a1\u00a2\u0006\u0004\uffff\uffff\u0000\u00a2\u00a3\u0005\u0001"+ + "\u0000\u0000\u00a3\u00a4\u0005\u0003\u0000\u0000\u00a4\u00a5\u0006\u0004"+ + "\uffff\uffff\u0000\u00a5\u00a6\u00051\u0000\u0000\u00a6\u00a7\u00052\u0000"+ + "\u0000\u00a7\u00a8\u0003.\u0017\u0000\u00a8\u00a9\u0006\u0004\uffff\uffff"+ + "\u0000\u00a9\u00aa\u0005\u0002\u0000\u0000\u00aa\t\u0001\u0000\u0000\u0000"+ + "\u00ab\u00b7\u0006\u0005\uffff\uffff\u0000\u00ac\u00ad\u00030\u0018\u0000"+ + "\u00ad\u00b4\u0006\u0005\uffff\uffff\u0000\u00ae\u00af\u00057\u0000\u0000"+ + "\u00af\u00b0\u00030\u0018\u0000\u00b0\u00b1\u0006\u0005\uffff\uffff\u0000"+ + "\u00b1\u00b3\u0001\u0000\u0000\u0000\u00b2\u00ae\u0001\u0000\u0000\u0000"+ + "\u00b3\u00b6\u0001\u0000\u0000\u0000\u00b4\u00b2\u0001\u0000\u0000\u0000"+ + "\u00b4\u00b5\u0001\u0000\u0000\u0000\u00b5\u00b8\u0001\u0000\u0000\u0000"+ + "\u00b6\u00b4\u0001\u0000\u0000\u0000\u00b7\u00ac\u0001\u0000\u0000\u0000"+ + "\u00b7\u00b8\u0001\u0000\u0000\u0000\u00b8\u000b\u0001\u0000\u0000\u0000"+ + "\u00b9\u00ba\u0006\u0006\uffff\uffff\u0000\u00ba\u00be\u0005\u0007\u0000"+ + "\u0000\u00bb\u00bc\u00030\u0018\u0000\u00bc\u00bd\u0006\u0006\uffff\uffff"+ + "\u0000\u00bd\u00bf\u0001\u0000\u0000\u0000\u00be\u00bb\u0001\u0000\u0000"+ + "\u0000\u00be\u00bf\u0001\u0000\u0000\u0000\u00bf\u00c0\u0001\u0000\u0000"+ + "\u0000\u00c0\u00c1\u0006\u0006\uffff\uffff\u0000\u00c1\u00c2\u0005;\u0000"+ + "\u0000\u00c2\r\u0001\u0000\u0000\u0000\u00c3\u00c4\u0006\u0007\uffff\uffff"+ + "\u0000\u00c4\u00c5\u0005\b\u0000\u0000\u00c5\u00ce\u0006\u0007\uffff\uffff"+ + "\u0000\u00c6\u00c7\u0003\u0010\b\u0000\u00c7\u00c8\u0006\u0007\uffff\uffff"+ + "\u0000\u00c8\u00cf\u0001\u0000\u0000\u0000\u00c9\u00ca\u00051\u0000\u0000"+ + "\u00ca\u00cb\u0003\u0010\b\u0000\u00cb\u00cc\u00052\u0000\u0000\u00cc"+ + "\u00cd\u0006\u0007\uffff\uffff\u0000\u00cd\u00cf\u0001\u0000\u0000\u0000"+ + "\u00ce\u00c6\u0001\u0000\u0000\u0000\u00ce\u00c9\u0001\u0000\u0000\u0000"+ + "\u00cf\u00d0\u0001\u0000\u0000\u0000\u00d0\u00d1\u0003\u001a\r\u0000\u00d1"+ + "\u00e0\u0006\u0007\uffff\uffff\u0000\u00d2\u00d8\u0005\n\u0000\u0000\u00d3"+ + "\u00d4\u00051\u0000\u0000\u00d4\u00d5\u0003\u0010\b\u0000\u00d5\u00d6"+ + "\u00052\u0000\u0000\u00d6\u00d9\u0001\u0000\u0000\u0000\u00d7\u00d9\u0003"+ + "\u0010\b\u0000\u00d8\u00d3\u0001\u0000\u0000\u0000\u00d8\u00d7\u0001\u0000"+ + "\u0000\u0000\u00d9\u00da\u0001\u0000\u0000\u0000\u00da\u00db\u0006\u0007"+ + "\uffff\uffff\u0000\u00db\u00dc\u0003\u001a\r\u0000\u00dc\u00dd\u0006\u0007"+ + "\uffff\uffff\u0000\u00dd\u00df\u0001\u0000\u0000\u0000\u00de\u00d2\u0001"+ + "\u0000\u0000\u0000\u00df\u00e2\u0001\u0000\u0000\u0000\u00e0\u00de\u0001"+ + "\u0000\u0000\u0000\u00e0\u00e1\u0001\u0000\u0000\u0000\u00e1\u00e7\u0001"+ + "\u0000\u0000\u0000\u00e2\u00e0\u0001\u0000\u0000\u0000\u00e3\u00e4\u0005"+ + "\t\u0000\u0000\u00e4\u00e5\u0003\u001a\r\u0000\u00e5\u00e6\u0006\u0007"+ + "\uffff\uffff\u0000\u00e6\u00e8\u0001\u0000\u0000\u0000\u00e7\u00e3\u0001"+ + "\u0000\u0000\u0000\u00e7\u00e8\u0001\u0000\u0000\u0000\u00e8\u00e9\u0001"+ + "\u0000\u0000\u0000\u00e9\u00ea\u0006\u0007\uffff\uffff\u0000\u00ea\u00eb"+ + "\u0005\u0002\u0000\u0000\u00eb\u000f\u0001\u0000\u0000\u0000\u00ec\u0101"+ + "\u0006\b\uffff\uffff\u0000\u00ed\u00ee\u00051\u0000\u0000\u00ee\u00ef"+ + "\u00030\u0018\u0000\u00ef\u00f0\u0006\b\uffff\uffff\u0000\u00f0\u00fc"+ + "\u00052\u0000\u0000\u00f1\u00f3\u0007\u0000\u0000\u0000\u00f2\u00f4\u0005"+ + "1\u0000\u0000\u00f3\u00f2\u0001\u0000\u0000\u0000\u00f3\u00f4\u0001\u0000"+ + "\u0000\u0000\u00f4\u00f5\u0001\u0000\u0000\u0000\u00f5\u00f6\u0003\u0010"+ + "\b\u0000\u00f6\u00f8\u0006\b\uffff\uffff\u0000\u00f7\u00f9\u00052\u0000"+ + "\u0000\u00f8\u00f7\u0001\u0000\u0000\u0000\u00f8\u00f9\u0001\u0000\u0000"+ + "\u0000\u00f9\u00fb\u0001\u0000\u0000\u0000\u00fa\u00f1\u0001\u0000\u0000"+ + "\u0000\u00fb\u00fe\u0001\u0000\u0000\u0000\u00fc\u00fa\u0001\u0000\u0000"+ + "\u0000\u00fc\u00fd\u0001\u0000\u0000\u0000\u00fd\u0100\u0001\u0000\u0000"+ + "\u0000\u00fe\u00fc\u0001\u0000\u0000\u0000\u00ff\u00ed\u0001\u0000\u0000"+ + "\u0000\u0100\u0103\u0001\u0000\u0000\u0000\u0101\u00ff\u0001\u0000\u0000"+ + "\u0000\u0101\u0102\u0001\u0000\u0000\u0000\u0102\u0011\u0001\u0000\u0000"+ + "\u0000\u0103\u0101\u0001\u0000\u0000\u0000\u0104\u0105\u0005\u0004\u0000"+ + "\u0000\u0105\u0106\u00051\u0000\u0000\u0106\u0107\u00030\u0018\u0000\u0107"+ + "\u0108\u0006\t\uffff\uffff\u0000\u0108\u0109\u00052\u0000\u0000\u0109"+ + "\u010a\u0005;\u0000\u0000\u010a\u0013\u0001\u0000\u0000\u0000\u010b\u010c"+ + "\u0005\u0006\u0000\u0000\u010c\u010d\u00051\u0000\u0000\u010d\u010e\u0003"+ + "0\u0018\u0000\u010e\u010f\u0006\n\uffff\uffff\u0000\u010f\u0110\u0005"+ + "2\u0000\u0000\u0110\u0015\u0001\u0000\u0000\u0000\u0111\u0112\u0005\u0005"+ + "\u0000\u0000\u0112\u0113\u00051\u0000\u0000\u0113\u0114\u00030\u0018\u0000"+ + "\u0114\u0115\u00057\u0000\u0000\u0115\u0116\u00030\u0018\u0000\u0116\u0117"+ + "\u00052\u0000\u0000\u0117\u0118\u0005;\u0000\u0000\u0118\u0119\u0006\u000b"+ + "\uffff\uffff\u0000\u0119\u0017\u0001\u0000\u0000\u0000\u011a\u011b\u0005"+ + "\u000e\u0000\u0000\u011b\u011c\u0005\u0011\u0000\u0000\u011c\u011d\u0003"+ + "\u001a\r\u0000\u011d\u011e\u0006\f\uffff\uffff\u0000\u011e\u011f\u0005"+ + "\u0002\u0000\u0000\u011f\u0019\u0001\u0000\u0000\u0000\u0120\u0136\u0006"+ + "\r\uffff\uffff\u0000\u0121\u0122\u0003,\u0016\u0000\u0122\u0123\u0006"+ + "\r\uffff\uffff\u0000\u0123\u0135\u0001\u0000\u0000\u0000\u0124\u0129\u0005"+ + "(\u0000\u0000\u0125\u0126\u0005\b\u0000\u0000\u0126\u0127\u0003\u0010"+ + "\b\u0000\u0127\u0128\u0006\r\uffff\uffff\u0000\u0128\u012a\u0001\u0000"+ + "\u0000\u0000\u0129\u0125\u0001\u0000\u0000\u0000\u0129\u012a\u0001\u0000"+ + "\u0000\u0000\u012a\u012b\u0001\u0000\u0000\u0000\u012b\u0135\u0005;\u0000"+ + "\u0000\u012c\u0131\u0005)\u0000\u0000\u012d\u012e\u0005\b\u0000\u0000"+ + "\u012e\u012f\u0003\u0010\b\u0000\u012f\u0130\u0006\r\uffff\uffff\u0000"+ + "\u0130\u0132\u0001\u0000\u0000\u0000\u0131\u012d\u0001\u0000\u0000\u0000"+ + "\u0131\u0132\u0001\u0000\u0000\u0000\u0132\u0133\u0001\u0000\u0000\u0000"+ + "\u0133\u0135\u0005;\u0000\u0000\u0134\u0121\u0001\u0000\u0000\u0000\u0134"+ + "\u0124\u0001\u0000\u0000\u0000\u0134\u012c\u0001\u0000\u0000\u0000\u0135"+ + "\u0138\u0001\u0000\u0000\u0000\u0136\u0134\u0001\u0000\u0000\u0000\u0136"+ + "\u0137\u0001\u0000\u0000\u0000\u0137\u013c\u0001\u0000\u0000\u0000\u0138"+ + "\u0136\u0001\u0000\u0000\u0000\u0139\u013a\u0003\f\u0006\u0000\u013a\u013b"+ + "\u0006\r\uffff\uffff\u0000\u013b\u013d\u0001\u0000\u0000\u0000\u013c\u0139"+ + "\u0001\u0000\u0000\u0000\u013c\u013d\u0001\u0000\u0000\u0000\u013d\u001b"+ + "\u0001\u0000\u0000\u0000\u013e\u013f\u0005\u000f\u0000\u0000\u013f\u0140"+ + "\u0005>\u0000\u0000\u0140\u0141\u0005\u0010\u0000\u0000\u0141\u0142\u0003"+ + "\u001e\u000f\u0000\u0142\u0143\u0003\u001a\r\u0000\u0143\u0144\u0005\u0002"+ + "\u0000\u0000\u0144\u0145\u0006\u000e\uffff\uffff\u0000\u0145\u001d\u0001"+ + "\u0000\u0000\u0000\u0146\u0147\u0006\u000f\uffff\uffff\u0000\u0147\u0148"+ + "\u00051\u0000\u0000\u0148\u0149\u00030\u0018\u0000\u0149\u014a\u0006\u000f"+ + "\uffff\uffff\u0000\u014a\u014b\u00059\u0000\u0000\u014b\u014c\u00030\u0018"+ + "\u0000\u014c\u014d\u0006\u000f\uffff\uffff\u0000\u014d\u014e\u00052\u0000"+ + "\u0000\u014e\u0162\u0001\u0000\u0000\u0000\u014f\u0150\u0006\u000f\uffff"+ + "\uffff\u0000\u0150\u0151\u00053\u0000\u0000\u0151\u0152\u00030\u0018\u0000"+ + "\u0152\u0159\u0006\u000f\uffff\uffff\u0000\u0153\u0154\u00057\u0000\u0000"+ + "\u0154\u0155\u00030\u0018\u0000\u0155\u0156\u0006\u000f\uffff\uffff\u0000"+ + "\u0156\u0158\u0001\u0000\u0000\u0000\u0157\u0153\u0001\u0000\u0000\u0000"+ + "\u0158\u015b\u0001\u0000\u0000\u0000\u0159\u0157\u0001\u0000\u0000\u0000"+ + "\u0159\u015a\u0001\u0000\u0000\u0000\u015a\u015c\u0001\u0000\u0000\u0000"+ + "\u015b\u0159\u0001\u0000\u0000\u0000\u015c\u015d\u00054\u0000\u0000\u015d"+ + "\u0162\u0001\u0000\u0000\u0000\u015e\u015f\u0006\u000f\uffff\uffff\u0000"+ + "\u015f\u0160\u0005>\u0000\u0000\u0160\u0162\u0006\u000f\uffff\uffff\u0000"+ + "\u0161\u0146\u0001\u0000\u0000\u0000\u0161\u014f\u0001\u0000\u0000\u0000"+ + "\u0161\u015e\u0001\u0000\u0000\u0000\u0162\u001f\u0001\u0000\u0000\u0000"+ + "\u0163\u0164\u0006\u0010\uffff\uffff\u0000\u0164\u0165\u00053\u0000\u0000"+ + "\u0165\u0166\u00030\u0018\u0000\u0166\u0167\u0005$\u0000\u0000\u0167\u0168"+ + "\u0005>\u0000\u0000\u0168\u0169\u0005*\u0000\u0000\u0169\u016a\u0003\u001e"+ + "\u000f\u0000\u016a\u016b\u00057\u0000\u0000\u016b\u016c\u00030\u0018\u0000"+ + "\u016c\u0173\u0006\u0010\uffff\uffff\u0000\u016d\u016e\u00057\u0000\u0000"+ + "\u016e\u016f\u00030\u0018\u0000\u016f\u0170\u0006\u0010\uffff\uffff\u0000"+ + "\u0170\u0172\u0001\u0000\u0000\u0000\u0171\u016d\u0001\u0000\u0000\u0000"+ + "\u0172\u0175\u0001\u0000\u0000\u0000\u0173\u0171\u0001\u0000\u0000\u0000"+ + "\u0173\u0174\u0001\u0000\u0000\u0000\u0174\u0176\u0001\u0000\u0000\u0000"+ + "\u0175\u0173\u0001\u0000\u0000\u0000\u0176\u0177\u0006\u0010\uffff\uffff"+ + "\u0000\u0177\u0178\u00054\u0000\u0000\u0178!\u0001\u0000\u0000\u0000\u0179"+ + "\u017a\u0005>\u0000\u0000\u017a\u017b\u00058\u0000\u0000\u017b\u017c\u0005"+ + "\r\u0000\u0000\u017c\u017d\u00051\u0000\u0000\u017d\u017e\u00030\u0018"+ + "\u0000\u017e\u017f\u00052\u0000\u0000\u017f\u0180\u0006\u0011\uffff\uffff"+ + "\u0000\u0180#\u0001\u0000\u0000\u0000\u0181\u0182\u0005\u0012\u0000\u0000"+ + "\u0182\u0183\u00051\u0000\u0000\u0183\u0184\u00030\u0018\u0000\u0184\u0185"+ + "\u00052\u0000\u0000\u0185\u0186\u0006\u0012\uffff\uffff\u0000\u0186%\u0001"+ + "\u0000\u0000\u0000\u0187\u0188\u0005\u0013\u0000\u0000\u0188\u0189\u0005"+ + "1\u0000\u0000\u0189\u018a\u00030\u0018\u0000\u018a\u018b\u00052\u0000"+ + "\u0000\u018b\u018c\u0006\u0013\uffff\uffff\u0000\u018c\'\u0001\u0000\u0000"+ + "\u0000\u018d\u018e\u0006\u0014\uffff\uffff\u0000\u018e\u0192\u0005>\u0000"+ + "\u0000\u018f\u0190\u0003*\u0015\u0000\u0190\u0191\u0006\u0014\uffff\uffff"+ + "\u0000\u0191\u0193\u0001\u0000\u0000\u0000\u0192\u018f\u0001\u0000\u0000"+ + "\u0000\u0192\u0193\u0001\u0000\u0000\u0000\u0193\u01a0\u0001\u0000\u0000"+ + "\u0000\u0194\u0195\u00050\u0000\u0000\u0195\u01a1\u0006\u0014\uffff\uffff"+ + "\u0000\u0196\u0197\u0005+\u0000\u0000\u0197\u01a1\u0006\u0014\uffff\uffff"+ + "\u0000\u0198\u0199\u0005,\u0000\u0000\u0199\u01a1\u0006\u0014\uffff\uffff"+ + "\u0000\u019a\u019b\u0005.\u0000\u0000\u019b\u01a1\u0006\u0014\uffff\uffff"+ + "\u0000\u019c\u019d\u0005-\u0000\u0000\u019d\u01a1\u0006\u0014\uffff\uffff"+ + "\u0000\u019e\u019f\u0005/\u0000\u0000\u019f\u01a1\u0006\u0014\uffff\uffff"+ + "\u0000\u01a0\u0194\u0001\u0000\u0000\u0000\u01a0\u0196\u0001\u0000\u0000"+ + "\u0000\u01a0\u0198\u0001\u0000\u0000\u0000\u01a0\u019a\u0001\u0000\u0000"+ + "\u0000\u01a0\u019c\u0001\u0000\u0000\u0000\u01a0\u019e\u0001\u0000\u0000"+ + "\u0000\u01a1\u01a2\u0001\u0000\u0000\u0000\u01a2\u01a3\u00030\u0018\u0000"+ + "\u01a3\u01a4\u0005;\u0000\u0000\u01a4\u01a5\u0006\u0014\uffff\uffff\u0000"+ + "\u01a5)\u0001\u0000\u0000\u0000\u01a6\u01a7\u00053\u0000\u0000\u01a7\u01a8"+ + "\u00030\u0018\u0000\u01a8\u01a9\u0006\u0015\uffff\uffff\u0000\u01a9\u01aa"+ + "\u00054\u0000\u0000\u01aa+\u0001\u0000\u0000\u0000\u01ab\u01ac\u0003\u000e"+ + "\u0007\u0000\u01ac\u01ad\u0006\u0016\uffff\uffff\u0000\u01ad\u01c3\u0001"+ + "\u0000\u0000\u0000\u01ae\u01af\u0003\u0018\f\u0000\u01af\u01b0\u0006\u0016"+ + "\uffff\uffff\u0000\u01b0\u01c3\u0001\u0000\u0000\u0000\u01b1\u01b2\u0003"+ + "\u001c\u000e\u0000\u01b2\u01b3\u0006\u0016\uffff\uffff\u0000\u01b3\u01c3"+ + "\u0001\u0000\u0000\u0000\u01b4\u01b5\u0003\u0012\t\u0000\u01b5\u01b6\u0006"+ + "\u0016\uffff\uffff\u0000\u01b6\u01c3\u0001\u0000\u0000\u0000\u01b7\u01b8"+ + "\u0003\u0016\u000b\u0000\u01b8\u01b9\u0006\u0016\uffff\uffff\u0000\u01b9"+ + "\u01c3\u0001\u0000\u0000\u0000\u01ba\u01bb\u00030\u0018\u0000\u01bb\u01bc"+ + "\u0006\u0016\uffff\uffff\u0000\u01bc\u01bd\u0006\u0016\uffff\uffff\u0000"+ + "\u01bd\u01be\u0005;\u0000\u0000\u01be\u01c3\u0001\u0000\u0000\u0000\u01bf"+ + "\u01c0\u0003(\u0014\u0000\u01c0\u01c1\u0006\u0016\uffff\uffff\u0000\u01c1"+ + "\u01c3\u0001\u0000\u0000\u0000\u01c2\u01ab\u0001\u0000\u0000\u0000\u01c2"+ + "\u01ae\u0001\u0000\u0000\u0000\u01c2\u01b1\u0001\u0000\u0000\u0000\u01c2"+ + "\u01b4\u0001\u0000\u0000\u0000\u01c2\u01b7\u0001\u0000\u0000\u0000\u01c2"+ + "\u01ba\u0001\u0000\u0000\u0000\u01c2\u01bf\u0001\u0000\u0000\u0000\u01c3"+ + "-\u0001\u0000\u0000\u0000\u01c4\u01ca\u0006\u0017\uffff\uffff\u0000\u01c5"+ + "\u01c6\u0003,\u0016\u0000\u01c6\u01c7\u0006\u0017\uffff\uffff\u0000\u01c7"+ + "\u01c9\u0001\u0000\u0000\u0000\u01c8\u01c5\u0001\u0000\u0000\u0000\u01c9"+ + "\u01cc\u0001\u0000\u0000\u0000\u01ca\u01c8\u0001\u0000\u0000\u0000\u01ca"+ + "\u01cb\u0001\u0000\u0000\u0000\u01cb\u01d0\u0001\u0000\u0000\u0000\u01cc"+ + "\u01ca\u0001\u0000\u0000\u0000\u01cd\u01ce\u0003\f\u0006\u0000\u01ce\u01cf"+ + "\u0006\u0017\uffff\uffff\u0000\u01cf\u01d1\u0001\u0000\u0000\u0000\u01d0"+ + "\u01cd\u0001\u0000\u0000\u0000\u01d0\u01d1\u0001\u0000\u0000\u0000\u01d1"+ + "/\u0001\u0000\u0000\u0000\u01d2\u01d3\u0006\u0018\uffff\uffff\u0000\u01d3"+ + "\u01d4\u00032\u0019\u0000\u01d4\u01d5\u0006\u0018\uffff\uffff\u0000\u01d5"+ + "\u01dd\u0001\u0000\u0000\u0000\u01d6\u01d7\n\u0002\u0000\u0000\u01d7\u01d8"+ + "\u0005%\u0000\u0000\u01d8\u01d9\u00032\u0019\u0000\u01d9\u01da\u0006\u0018"+ + "\uffff\uffff\u0000\u01da\u01dc\u0001\u0000\u0000\u0000\u01db\u01d6\u0001"+ + "\u0000\u0000\u0000\u01dc\u01df\u0001\u0000\u0000\u0000\u01dd\u01db\u0001"+ + "\u0000\u0000\u0000\u01dd\u01de\u0001\u0000\u0000\u0000\u01de1\u0001\u0000"+ + "\u0000\u0000\u01df\u01dd\u0001\u0000\u0000\u0000\u01e0\u01e1\u00034\u001a"+ + "\u0000\u01e1\u01e6\u0006\u0019\uffff\uffff\u0000\u01e2\u01e3\u0005\u0018"+ + "\u0000\u0000\u01e3\u01e7\u0006\u0019\uffff\uffff\u0000\u01e4\u01e5\u0005"+ + "\u0019\u0000\u0000\u01e5\u01e7\u0006\u0019\uffff\uffff\u0000\u01e6\u01e2"+ + "\u0001\u0000\u0000\u0000\u01e6\u01e4\u0001\u0000\u0000\u0000\u01e7\u01e8"+ + "\u0001\u0000\u0000\u0000\u01e8\u01e9\u00034\u001a\u0000\u01e9\u01ea\u0006"+ + "\u0019\uffff\uffff\u0000\u01ea\u01ef\u0001\u0000\u0000\u0000\u01eb\u01ec"+ + "\u00034\u001a\u0000\u01ec\u01ed\u0006\u0019\uffff\uffff\u0000\u01ed\u01ef"+ + "\u0001\u0000\u0000\u0000\u01ee\u01e0\u0001\u0000\u0000\u0000\u01ee\u01eb"+ + "\u0001\u0000\u0000\u0000\u01ef3\u0001\u0000\u0000\u0000\u01f0\u01f1\u0006"+ + "\u001a\uffff\uffff\u0000\u01f1\u01f2\u00036\u001b\u0000\u01f2\u01f3\u0006"+ + "\u001a\uffff\uffff\u0000\u01f3\u0205\u0001\u0000\u0000\u0000\u01f4\u01f5"+ + "\n\u0002\u0000\u0000\u01f5\u01fe\u0006\u001a\uffff\uffff\u0000\u01f6\u01f7"+ + "\u0005\u001c\u0000\u0000\u01f7\u01ff\u0006\u001a\uffff\uffff\u0000\u01f8"+ + "\u01f9\u0005\u001d\u0000\u0000\u01f9\u01ff\u0006\u001a\uffff\uffff\u0000"+ + "\u01fa\u01fb\u0005\u001a\u0000\u0000\u01fb\u01ff\u0006\u001a\uffff\uffff"+ + "\u0000\u01fc\u01fd\u0005\u001b\u0000\u0000\u01fd\u01ff\u0006\u001a\uffff"+ + "\uffff\u0000\u01fe\u01f6\u0001\u0000\u0000\u0000\u01fe\u01f8\u0001\u0000"+ + "\u0000\u0000\u01fe\u01fa\u0001\u0000\u0000\u0000\u01fe\u01fc\u0001\u0000"+ + "\u0000\u0000\u01ff\u0200\u0001\u0000\u0000\u0000\u0200\u0201\u00036\u001b"+ + "\u0000\u0201\u0202\u0006\u001a\uffff\uffff\u0000\u0202\u0204\u0001\u0000"+ + "\u0000\u0000\u0203\u01f4\u0001\u0000\u0000\u0000\u0204\u0207\u0001\u0000"+ + "\u0000\u0000\u0205\u0203\u0001\u0000\u0000\u0000\u0205\u0206\u0001\u0000"+ + "\u0000\u0000\u02065\u0001\u0000\u0000\u0000\u0207\u0205\u0001\u0000\u0000"+ + "\u0000\u0208\u0209\u0006\u001b\uffff\uffff\u0000\u0209\u020a\u00038\u001c"+ + "\u0000\u020a\u020b\u0006\u001b\uffff\uffff\u0000\u020b\u0219\u0001\u0000"+ + "\u0000\u0000\u020c\u020d\n\u0002\u0000\u0000\u020d\u0212\u0006\u001b\uffff"+ + "\uffff\u0000\u020e\u020f\u0005\u0014\u0000\u0000\u020f\u0213\u0006\u001b"+ + "\uffff\uffff\u0000\u0210\u0211\u0005\u0015\u0000\u0000\u0211\u0213\u0006"+ + "\u001b\uffff\uffff\u0000\u0212\u020e\u0001\u0000\u0000\u0000\u0212\u0210"+ + "\u0001\u0000\u0000\u0000\u0213\u0214\u0001\u0000\u0000\u0000\u0214\u0215"+ + "\u00038\u001c\u0000\u0215\u0216\u0006\u001b\uffff\uffff\u0000\u0216\u0218"+ + "\u0001\u0000\u0000\u0000\u0217\u020c\u0001\u0000\u0000\u0000\u0218\u021b"+ + "\u0001\u0000\u0000\u0000\u0219\u0217\u0001\u0000\u0000\u0000\u0219\u021a"+ + "\u0001\u0000\u0000\u0000\u021a7\u0001\u0000\u0000\u0000\u021b\u0219\u0001"+ + "\u0000\u0000\u0000\u021c\u021d\u0006\u001c\uffff\uffff\u0000\u021d\u021e"+ + "\u0003:\u001d\u0000\u021e\u021f\u0006\u001c\uffff\uffff\u0000\u021f\u022d"+ + "\u0001\u0000\u0000\u0000\u0220\u0221\n\u0002\u0000\u0000\u0221\u0226\u0006"+ + "\u001c\uffff\uffff\u0000\u0222\u0223\u0005\u0016\u0000\u0000\u0223\u0227"+ + "\u0006\u001c\uffff\uffff\u0000\u0224\u0225\u0005\u0017\u0000\u0000\u0225"+ + "\u0227\u0006\u001c\uffff\uffff\u0000\u0226\u0222\u0001\u0000\u0000\u0000"+ + "\u0226\u0224\u0001\u0000\u0000\u0000\u0227\u0228\u0001\u0000\u0000\u0000"+ + "\u0228\u0229\u0003:\u001d\u0000\u0229\u022a\u0006\u001c\uffff\uffff\u0000"+ + "\u022a\u022c\u0001\u0000\u0000\u0000\u022b\u0220\u0001\u0000\u0000\u0000"+ + "\u022c\u022f\u0001\u0000\u0000\u0000\u022d\u022b\u0001\u0000\u0000\u0000"+ + "\u022d\u022e\u0001\u0000\u0000\u0000\u022e9\u0001\u0000\u0000\u0000\u022f"+ + "\u022d\u0001\u0000\u0000\u0000\u0230\u0239\u0006\u001d\uffff\uffff\u0000"+ + "\u0231\u0232\u0005 \u0000\u0000\u0232\u023a\u0006\u001d\uffff\uffff\u0000"+ + "\u0233\u0234\u0005\u0015\u0000\u0000\u0234\u023a\u0006\u001d\uffff\uffff"+ + "\u0000\u0235\u0236\u0005!\u0000\u0000\u0236\u023a\u0006\u001d\uffff\uffff"+ + "\u0000\u0237\u0238\u0005\"\u0000\u0000\u0238\u023a\u0006\u001d\uffff\uffff"+ + "\u0000\u0239\u0231\u0001\u0000\u0000\u0000\u0239\u0233\u0001\u0000\u0000"+ + "\u0000\u0239\u0235\u0001\u0000\u0000\u0000\u0239\u0237\u0001\u0000\u0000"+ + "\u0000\u023a\u023b\u0001\u0000\u0000\u0000\u023b\u023c\u0003<\u001e\u0000"+ + "\u023c\u023d\u0006\u001d\uffff\uffff\u0000\u023d\u0242\u0001\u0000\u0000"+ + "\u0000\u023e\u023f\u0003<\u001e\u0000\u023f\u0240\u0006\u001d\uffff\uffff"+ + "\u0000\u0240\u0242\u0001\u0000\u0000\u0000\u0241\u0230\u0001\u0000\u0000"+ + "\u0000\u0241\u023e\u0001\u0000\u0000\u0000\u0242;\u0001\u0000\u0000\u0000"+ + "\u0243\u0244\u0006\u001e\uffff\uffff\u0000\u0244\u024c\u0003>\u001f\u0000"+ + "\u0245\u0246\u00051\u0000\u0000\u0246\u0247\u0003\n\u0005\u0000\u0247"+ + "\u0248\u0006\u001e\uffff\uffff\u0000\u0248\u0249\u00052\u0000\u0000\u0249"+ + "\u024b\u0001\u0000\u0000\u0000\u024a\u0245\u0001\u0000\u0000\u0000\u024b"+ + "\u024e\u0001\u0000\u0000\u0000\u024c\u024a\u0001\u0000\u0000\u0000\u024c"+ + "\u024d\u0001\u0000\u0000\u0000\u024d\u0254\u0001\u0000\u0000\u0000\u024e"+ + "\u024c\u0001\u0000\u0000\u0000\u024f\u0250\u0003*\u0015\u0000\u0250\u0251"+ + "\u0006\u001e\uffff\uffff\u0000\u0251\u0253\u0001\u0000\u0000\u0000\u0252"+ + "\u024f\u0001\u0000\u0000\u0000\u0253\u0256\u0001\u0000\u0000\u0000\u0254"+ + "\u0252\u0001\u0000\u0000\u0000\u0254\u0255\u0001\u0000\u0000\u0000\u0255"+ + "\u0257\u0001\u0000\u0000\u0000\u0256\u0254\u0001\u0000\u0000\u0000\u0257"+ + "\u0258\u0006\u001e\uffff\uffff\u0000\u0258=\u0001\u0000\u0000\u0000\u0259"+ + "\u025a\u0003B!\u0000\u025a\u025b\u0006\u001f\uffff\uffff\u0000\u025b\u0278"+ + "\u0001\u0000\u0000\u0000\u025c\u025d\u0005>\u0000\u0000\u025d\u0278\u0006"+ + "\u001f\uffff\uffff\u0000\u025e\u025f\u0003@ \u0000\u025f\u0260\u0006\u001f"+ + "\uffff\uffff\u0000\u0260\u0278\u0001\u0000\u0000\u0000\u0261\u0262\u0003"+ + "$\u0012\u0000\u0262\u0263\u0006\u001f\uffff\uffff\u0000\u0263\u0278\u0001"+ + "\u0000\u0000\u0000\u0264\u0265\u0003&\u0013\u0000\u0265\u0266\u0006\u001f"+ + "\uffff\uffff\u0000\u0266\u0278\u0001\u0000\u0000\u0000\u0267\u0268\u0003"+ + "\"\u0011\u0000\u0268\u0269\u0006\u001f\uffff\uffff\u0000\u0269\u0278\u0001"+ + "\u0000\u0000\u0000\u026a\u026b\u0003 \u0010\u0000\u026b\u026c\u0006\u001f"+ + "\uffff\uffff\u0000\u026c\u0278\u0001\u0000\u0000\u0000\u026d\u026e\u0003"+ + "\u0014\n\u0000\u026e\u026f\u0006\u001f\uffff\uffff\u0000\u026f\u0278\u0001"+ + "\u0000\u0000\u0000\u0270\u0274\u00051\u0000\u0000\u0271\u0272\u00030\u0018"+ + "\u0000\u0272\u0273\u0006\u001f\uffff\uffff\u0000\u0273\u0275\u0001\u0000"+ + "\u0000\u0000\u0274\u0271\u0001\u0000\u0000\u0000\u0274\u0275\u0001\u0000"+ + "\u0000\u0000\u0275\u0276\u0001\u0000\u0000\u0000\u0276\u0278\u00052\u0000"+ + "\u0000\u0277\u0259\u0001\u0000\u0000\u0000\u0277\u025c\u0001\u0000\u0000"+ + "\u0000\u0277\u025e\u0001\u0000\u0000\u0000\u0277\u0261\u0001\u0000\u0000"+ + "\u0000\u0277\u0264\u0001\u0000\u0000\u0000\u0277\u0267\u0001\u0000\u0000"+ + "\u0000\u0277\u026a\u0001\u0000\u0000\u0000\u0277\u026d\u0001\u0000\u0000"+ + "\u0000\u0277\u0270\u0001\u0000\u0000\u0000\u0278?\u0001\u0000\u0000\u0000"+ + "\u0279\u027a\u0005*\u0000\u0000\u027a\u027b\u0003\u0004\u0002\u0000\u027b"+ + "\u027c\u00055\u0000\u0000\u027c\u027d\u0003.\u0017\u0000\u027d\u027e\u0005"+ + "6\u0000\u0000\u027e\u027f\u0006 \uffff\uffff\u0000\u027fA\u0001\u0000"+ + "\u0000\u0000\u0280\u0281\u0003F#\u0000\u0281\u0282\u0006!\uffff\uffff"+ + "\u0000\u0282\u0290\u0001\u0000\u0000\u0000\u0283\u0284\u0005?\u0000\u0000"+ + "\u0284\u0290\u0006!\uffff\uffff\u0000\u0285\u0286\u0005<\u0000\u0000\u0286"+ + "\u0290\u0006!\uffff\uffff\u0000\u0287\u0288\u0005=\u0000\u0000\u0288\u0290"+ + "\u0006!\uffff\uffff\u0000\u0289\u028a\u0003D\"\u0000\u028a\u028b\u0006"+ + "!\uffff\uffff\u0000\u028b\u0290\u0001\u0000\u0000\u0000\u028c\u028d\u0003"+ + "H$\u0000\u028d\u028e\u0006!\uffff\uffff\u0000\u028e\u0290\u0001\u0000"+ + "\u0000\u0000\u028f\u0280\u0001\u0000\u0000\u0000\u028f\u0283\u0001\u0000"+ + "\u0000\u0000\u028f\u0285\u0001\u0000\u0000\u0000\u028f\u0287\u0001\u0000"+ + "\u0000\u0000\u028f\u0289\u0001\u0000\u0000\u0000\u028f\u028c\u0001\u0000"+ + "\u0000\u0000\u0290C\u0001\u0000\u0000\u0000\u0291\u0292\u00053\u0000\u0000"+ + "\u0292\u0293\u0003\n\u0005\u0000\u0293\u0294\u00054\u0000\u0000\u0294"+ + "\u0295\u0006\"\uffff\uffff\u0000\u0295E\u0001\u0000\u0000\u0000\u0296"+ + "\u0297\u0005&\u0000\u0000\u0297\u029b\u0006#\uffff\uffff\u0000\u0298\u0299"+ + "\u0005\'\u0000\u0000\u0299\u029b\u0006#\uffff\uffff\u0000\u029a\u0296"+ + "\u0001\u0000\u0000\u0000\u029a\u0298\u0001\u0000\u0000\u0000\u029bG\u0001"+ + "\u0000\u0000\u0000\u029c\u029d\u0005\u000b\u0000\u0000\u029d\u029e\u0005"+ + "1\u0000\u0000\u029e\u029f\u0005:\u0000\u0000\u029f\u02a0\u0005>\u0000"+ + "\u0000\u02a0\u02a1\u00052\u0000\u0000\u02a1\u02a2\u0006$\uffff\uffff\u0000"+ + "\u02a2I\u0001\u0000\u0000\u00000QSm\u0080\u0085\u0087\u009c\u00b4\u00b7"+ + "\u00be\u00ce\u00d8\u00e0\u00e7\u00f3\u00f8\u00fc\u0101\u0129\u0131\u0134"+ + "\u0136\u013c\u0159\u0161\u0173\u0192\u01a0\u01c2\u01ca\u01d0\u01dd\u01e6"+ + "\u01ee\u01fe\u0205\u0212\u0219\u0226\u022d\u0239\u0241\u024c\u0254\u0274"+ + "\u0277\u028f\u029a"; + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} \ No newline at end of file diff --git a/Phase2Template/gen/main/grammar/FunctionCraftVisitor.java b/Phase2Template/gen/main/grammar/FunctionCraftVisitor.java new file mode 100644 index 0000000..4d0e09e --- /dev/null +++ b/Phase2Template/gen/main/grammar/FunctionCraftVisitor.java @@ -0,0 +1,244 @@ +// Generated from U:/UT/6/PLC_TA/Design-Compiler-Course-Projects/Phase2Template/Phase2/src/main/grammar/FunctionCraft.g4 by ANTLR 4.13.1 +package main.grammar; + + import main.ast.nodes.*; + import main.ast.nodes.declaration.*; + import main.ast.nodes.statement.*; + import main.ast.nodes.expression.*; + import main.ast.nodes.expression.operators.*; + import main.ast.nodes.expression.value.*; + import main.ast.nodes.expression.value.primitive.*; + +import org.antlr.v4.runtime.tree.ParseTreeVisitor; + +/** + * This interface defines a complete generic visitor for a parse tree produced + * by {@link FunctionCraftParser}. + * + * @param The return type of the visit operation. Use {@link Void} for + * operations with no return type. + */ +public interface FunctionCraftVisitor extends ParseTreeVisitor { + /** + * Visit a parse tree produced by {@link FunctionCraftParser#program}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitProgram(FunctionCraftParser.ProgramContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#functionDeclaration}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitFunctionDeclaration(FunctionCraftParser.FunctionDeclarationContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#functionArgumentsDeclaration}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitFunctionArgumentsDeclaration(FunctionCraftParser.FunctionArgumentsDeclarationContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#patternMatching}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitPatternMatching(FunctionCraftParser.PatternMatchingContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#main}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitMain(FunctionCraftParser.MainContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#functionArguments}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitFunctionArguments(FunctionCraftParser.FunctionArgumentsContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#returnStatement}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitReturnStatement(FunctionCraftParser.ReturnStatementContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#ifStatement}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitIfStatement(FunctionCraftParser.IfStatementContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#condition}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitCondition(FunctionCraftParser.ConditionContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#putsStatement}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitPutsStatement(FunctionCraftParser.PutsStatementContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#lenStatement}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitLenStatement(FunctionCraftParser.LenStatementContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#pushStatement}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitPushStatement(FunctionCraftParser.PushStatementContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#loopDoStatement}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitLoopDoStatement(FunctionCraftParser.LoopDoStatementContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#loopBody}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitLoopBody(FunctionCraftParser.LoopBodyContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#forStatement}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitForStatement(FunctionCraftParser.ForStatementContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#range}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitRange(FunctionCraftParser.RangeContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#filterStatement}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitFilterStatement(FunctionCraftParser.FilterStatementContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#matchPatternStatement}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitMatchPatternStatement(FunctionCraftParser.MatchPatternStatementContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#chopStatement}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitChopStatement(FunctionCraftParser.ChopStatementContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#chompStatement}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitChompStatement(FunctionCraftParser.ChompStatementContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#assignment}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitAssignment(FunctionCraftParser.AssignmentContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#accessList}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitAccessList(FunctionCraftParser.AccessListContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#statement}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitStatement(FunctionCraftParser.StatementContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#body}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitBody(FunctionCraftParser.BodyContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#expression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitExpression(FunctionCraftParser.ExpressionContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#eqaulityExpression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitEqaulityExpression(FunctionCraftParser.EqaulityExpressionContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#relationalExpression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitRelationalExpression(FunctionCraftParser.RelationalExpressionContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#additiveExpression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitAdditiveExpression(FunctionCraftParser.AdditiveExpressionContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#multiplicativeExpression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitMultiplicativeExpression(FunctionCraftParser.MultiplicativeExpressionContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#preUnaryExpression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitPreUnaryExpression(FunctionCraftParser.PreUnaryExpressionContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#accessExpression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitAccessExpression(FunctionCraftParser.AccessExpressionContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#otherExpression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitOtherExpression(FunctionCraftParser.OtherExpressionContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#lambdaFunction}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitLambdaFunction(FunctionCraftParser.LambdaFunctionContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#values}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitValues(FunctionCraftParser.ValuesContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#listValue}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitListValue(FunctionCraftParser.ListValueContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#boolValue}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitBoolValue(FunctionCraftParser.BoolValueContext ctx); + /** + * Visit a parse tree produced by {@link FunctionCraftParser#functionPointer}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitFunctionPointer(FunctionCraftParser.FunctionPointerContext ctx); +} \ No newline at end of file diff --git a/Phase2Template/out/production/Phase2Template/main/FunctionCraft.class b/Phase2Template/out/production/Phase2Template/main/FunctionCraft.class new file mode 100644 index 0000000..38a91ac Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/FunctionCraft.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/ast/nodes/Node.class b/Phase2Template/out/production/Phase2Template/main/ast/nodes/Node.class new file mode 100644 index 0000000..2678f99 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/ast/nodes/Node.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/ast/nodes/Program.class b/Phase2Template/out/production/Phase2Template/main/ast/nodes/Program.class new file mode 100644 index 0000000..192399a Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/ast/nodes/Program.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/ast/nodes/declaration/Declaration.class b/Phase2Template/out/production/Phase2Template/main/ast/nodes/declaration/Declaration.class new file mode 100644 index 0000000..5ad92d4 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/ast/nodes/declaration/Declaration.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/ast/nodes/declaration/FunctionDeclaration.class b/Phase2Template/out/production/Phase2Template/main/ast/nodes/declaration/FunctionDeclaration.class new file mode 100644 index 0000000..52fca1e Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/ast/nodes/declaration/FunctionDeclaration.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/ast/nodes/declaration/MainDeclaration.class b/Phase2Template/out/production/Phase2Template/main/ast/nodes/declaration/MainDeclaration.class new file mode 100644 index 0000000..cdc6d88 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/ast/nodes/declaration/MainDeclaration.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/ast/nodes/declaration/PatternDeclaration.class b/Phase2Template/out/production/Phase2Template/main/ast/nodes/declaration/PatternDeclaration.class new file mode 100644 index 0000000..4846bfd Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/ast/nodes/declaration/PatternDeclaration.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/ast/nodes/declaration/VarDeclaration.class b/Phase2Template/out/production/Phase2Template/main/ast/nodes/declaration/VarDeclaration.class new file mode 100644 index 0000000..81c8e0a Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/ast/nodes/declaration/VarDeclaration.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/AccessExpression.class b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/AccessExpression.class new file mode 100644 index 0000000..7029725 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/AccessExpression.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/AppendExpression.class b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/AppendExpression.class new file mode 100644 index 0000000..c2b19e7 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/AppendExpression.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/BinaryExpression.class b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/BinaryExpression.class new file mode 100644 index 0000000..1670f64 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/BinaryExpression.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/ChompStatement.class b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/ChompStatement.class new file mode 100644 index 0000000..f88223c Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/ChompStatement.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/ChopStatement.class b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/ChopStatement.class new file mode 100644 index 0000000..aba5fdd Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/ChopStatement.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/Expression.class b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/Expression.class new file mode 100644 index 0000000..8c399ed Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/Expression.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/FilterStatement.class b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/FilterStatement.class new file mode 100644 index 0000000..809811d Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/FilterStatement.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/Identifier.class b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/Identifier.class new file mode 100644 index 0000000..bc6d394 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/Identifier.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/LambdaExpression.class b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/LambdaExpression.class new file mode 100644 index 0000000..41e236c Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/LambdaExpression.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/LenStatement.class b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/LenStatement.class new file mode 100644 index 0000000..5be4945 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/LenStatement.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/MatchPatternStatement.class b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/MatchPatternStatement.class new file mode 100644 index 0000000..8b4505f Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/MatchPatternStatement.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/UnaryExpression.class b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/UnaryExpression.class new file mode 100644 index 0000000..56e76f8 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/UnaryExpression.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/operators/BinaryOperator.class b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/operators/BinaryOperator.class new file mode 100644 index 0000000..d0c5b11 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/operators/BinaryOperator.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/operators/UnaryOperator.class b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/operators/UnaryOperator.class new file mode 100644 index 0000000..7dcf3a2 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/operators/UnaryOperator.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/value/FunctionPointer.class b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/value/FunctionPointer.class new file mode 100644 index 0000000..6e3f92c Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/value/FunctionPointer.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/value/ListValue.class b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/value/ListValue.class new file mode 100644 index 0000000..136359e Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/value/ListValue.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/value/Value.class b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/value/Value.class new file mode 100644 index 0000000..f6a77f9 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/value/Value.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/value/primitive/BoolValue.class b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/value/primitive/BoolValue.class new file mode 100644 index 0000000..a9e4803 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/value/primitive/BoolValue.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/value/primitive/FloatValue.class b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/value/primitive/FloatValue.class new file mode 100644 index 0000000..1c8f162 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/value/primitive/FloatValue.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/value/primitive/IntValue.class b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/value/primitive/IntValue.class new file mode 100644 index 0000000..236744b Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/value/primitive/IntValue.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/value/primitive/StringValue.class b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/value/primitive/StringValue.class new file mode 100644 index 0000000..117ab0f Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/ast/nodes/expression/value/primitive/StringValue.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/ast/nodes/statement/AssignOperator.class b/Phase2Template/out/production/Phase2Template/main/ast/nodes/statement/AssignOperator.class new file mode 100644 index 0000000..b259ee8 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/ast/nodes/statement/AssignOperator.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/ast/nodes/statement/AssignStatement.class b/Phase2Template/out/production/Phase2Template/main/ast/nodes/statement/AssignStatement.class new file mode 100644 index 0000000..d820241 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/ast/nodes/statement/AssignStatement.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/ast/nodes/statement/ExpressionStatement.class b/Phase2Template/out/production/Phase2Template/main/ast/nodes/statement/ExpressionStatement.class new file mode 100644 index 0000000..544c8e1 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/ast/nodes/statement/ExpressionStatement.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/ast/nodes/statement/ForStatement.class b/Phase2Template/out/production/Phase2Template/main/ast/nodes/statement/ForStatement.class new file mode 100644 index 0000000..77a8de6 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/ast/nodes/statement/ForStatement.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/ast/nodes/statement/IfStatement.class b/Phase2Template/out/production/Phase2Template/main/ast/nodes/statement/IfStatement.class new file mode 100644 index 0000000..f088f36 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/ast/nodes/statement/IfStatement.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/ast/nodes/statement/LoopDoStatement.class b/Phase2Template/out/production/Phase2Template/main/ast/nodes/statement/LoopDoStatement.class new file mode 100644 index 0000000..5e8706a Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/ast/nodes/statement/LoopDoStatement.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/ast/nodes/statement/PushStatement.class b/Phase2Template/out/production/Phase2Template/main/ast/nodes/statement/PushStatement.class new file mode 100644 index 0000000..ba9b252 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/ast/nodes/statement/PushStatement.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/ast/nodes/statement/PutStatement.class b/Phase2Template/out/production/Phase2Template/main/ast/nodes/statement/PutStatement.class new file mode 100644 index 0000000..5bedc46 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/ast/nodes/statement/PutStatement.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/ast/nodes/statement/ReturnStatement.class b/Phase2Template/out/production/Phase2Template/main/ast/nodes/statement/ReturnStatement.class new file mode 100644 index 0000000..9bd64a0 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/ast/nodes/statement/ReturnStatement.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/ast/nodes/statement/Statement.class b/Phase2Template/out/production/Phase2Template/main/ast/nodes/statement/Statement.class new file mode 100644 index 0000000..5e3ac9e Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/ast/nodes/statement/Statement.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/compileError/CompileError.class b/Phase2Template/out/production/Phase2Template/main/compileError/CompileError.class new file mode 100644 index 0000000..39311df Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/compileError/CompileError.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/compileError/nameErrors/ArgMisMatch.class b/Phase2Template/out/production/Phase2Template/main/compileError/nameErrors/ArgMisMatch.class new file mode 100644 index 0000000..52b8b2e Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/compileError/nameErrors/ArgMisMatch.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/compileError/nameErrors/CircularDependency.class b/Phase2Template/out/production/Phase2Template/main/compileError/nameErrors/CircularDependency.class new file mode 100644 index 0000000..ff0f8e7 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/compileError/nameErrors/CircularDependency.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/compileError/nameErrors/DuplicateArg.class b/Phase2Template/out/production/Phase2Template/main/compileError/nameErrors/DuplicateArg.class new file mode 100644 index 0000000..42e95f9 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/compileError/nameErrors/DuplicateArg.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/compileError/nameErrors/FunctionNotDeclared.class b/Phase2Template/out/production/Phase2Template/main/compileError/nameErrors/FunctionNotDeclared.class new file mode 100644 index 0000000..117424f Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/compileError/nameErrors/FunctionNotDeclared.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/compileError/nameErrors/IdenticalArgFunctionName.class b/Phase2Template/out/production/Phase2Template/main/compileError/nameErrors/IdenticalArgFunctionName.class new file mode 100644 index 0000000..9ce1815 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/compileError/nameErrors/IdenticalArgFunctionName.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/compileError/nameErrors/IdenticalArgPatternName.class b/Phase2Template/out/production/Phase2Template/main/compileError/nameErrors/IdenticalArgPatternName.class new file mode 100644 index 0000000..8a9d947 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/compileError/nameErrors/IdenticalArgPatternName.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/compileError/nameErrors/PatternNotDeclared.class b/Phase2Template/out/production/Phase2Template/main/compileError/nameErrors/PatternNotDeclared.class new file mode 100644 index 0000000..520b0e4 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/compileError/nameErrors/PatternNotDeclared.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/compileError/nameErrors/RedefinitionOfFunction.class b/Phase2Template/out/production/Phase2Template/main/compileError/nameErrors/RedefinitionOfFunction.class new file mode 100644 index 0000000..27ec815 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/compileError/nameErrors/RedefinitionOfFunction.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/compileError/nameErrors/RedefinitionOfPattern.class b/Phase2Template/out/production/Phase2Template/main/compileError/nameErrors/RedefinitionOfPattern.class new file mode 100644 index 0000000..98ee609 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/compileError/nameErrors/RedefinitionOfPattern.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/compileError/nameErrors/VariableNotDeclared.class b/Phase2Template/out/production/Phase2Template/main/compileError/nameErrors/VariableNotDeclared.class new file mode 100644 index 0000000..dbd9348 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/compileError/nameErrors/VariableNotDeclared.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/grammar/FunctionCraft.g4 b/Phase2Template/out/production/Phase2Template/main/grammar/FunctionCraft.g4 new file mode 100644 index 0000000..9a157a0 --- /dev/null +++ b/Phase2Template/out/production/Phase2Template/main/grammar/FunctionCraft.g4 @@ -0,0 +1,687 @@ +grammar FunctionCraft; + +@header{ + import main.ast.nodes.*; + import main.ast.nodes.declaration.*; + import main.ast.nodes.statement.*; + import main.ast.nodes.expression.*; + import main.ast.nodes.expression.operators.*; + import main.ast.nodes.expression.value.*; + import main.ast.nodes.expression.value.primitive.*; +} + + +program returns [Program flProgram]: + { + $flProgram = new Program(); + $flProgram.setLine(1); + } + ( + f = functionDeclaration{$flProgram.addFunctionDeclaration($f.functionDeclarationRet);} + | p = patternMatching{$flProgram.addPatternDeclaration($p.patternRet);} + )* + m = main{$flProgram.setMain($m.mainRet);}; + +functionDeclaration returns [FunctionDeclaration functionDeclarationRet]: + { + $functionDeclarationRet = new FunctionDeclaration(); + } + def = DEF {$functionDeclarationRet.setLine($def.line);} id = IDENTIFIER { + Identifier id_ = new Identifier($id.text); + id_.setLine($id.line); + $functionDeclarationRet.setFunctionName(id_); + $functionDeclarationRet.setLine($def.line); + } + f = functionArgumentsDeclaration {$functionDeclarationRet.setArgs($f.argRet);} + b = body {$functionDeclarationRet.setBody($b.bodyRet);} + END + ; + +functionArgumentsDeclaration returns [ArrayList argRet]: + { + $argRet = new ArrayList(); + } + LPAR + (id1 = IDENTIFIER + { + Identifier id_ = new Identifier($id1.text); + id_.setLine($id1.line); + VarDeclaration newVarDec = new VarDeclaration(id_); + newVarDec.setLine($id1.line); + $argRet.add(newVarDec); + } + (COMMA id2 = IDENTIFIER + { + Identifier id_2 = new Identifier($id2.text); + id_2.setLine($id2.line); + VarDeclaration newVarDec2 = new VarDeclaration(id_2); + newVarDec2.setLine($id2.line); + $argRet.add(newVarDec2); + } + )* + ( + COMMA LBRACK id3 = IDENTIFIER + { + Identifier id_3 = new Identifier($id3.text); + id_3.setLine($id3.line); + VarDeclaration newVarDec3 = new VarDeclaration(id_3); + newVarDec3.setLine($id3.line); + } + ASSIGN e1 = expression + { + newVarDec3.setDefaultVal($e1.expRet); + $argRet.add(newVarDec3); + } + (COMMA id4 = IDENTIFIER + { + Identifier id_4 = new Identifier($id4.text); + id_4.setLine($id4.line); + VarDeclaration newVarDec4 = new VarDeclaration(id_4); + newVarDec4.setLine($id4.line); + } + ASSIGN e2 = expression + { + newVarDec4.setDefaultVal($e2.expRet); + $argRet.add(newVarDec4); + } + )* RBRACK + )? + )? RPAR; + +patternMatching returns [PatternDeclaration patternRet]: + pat = PATTERN + { + int patternLine = $pat.line; + } + patternName = IDENTIFIER + { + Identifier patternNameId = new Identifier($patternName.text); + patternNameId.setLine($patternName.line); + } + LPAR targetVar = IDENTIFIER + { + Identifier targetVariable = new Identifier($targetVar.text); + targetVariable.setLine($targetVar.line); + $patternRet = new PatternDeclaration(patternNameId, targetVariable); + $patternRet.setLine(patternLine); + } + RPAR + (PATTERN_MATCHING_SEPARATOR c = condition + { + $patternRet.setConditions($c.conditionRet); + } + ASSIGN e = expression + { + $patternRet.addReturnExp($e.expRet); + } + )* + SEMICOLLON; + +main returns [MainDeclaration mainRet]: + { + $mainRet = new MainDeclaration(); + } + DEF m = MAIN + { + $mainRet.setLine($m.line); + } + LPAR RPAR + b = body + {$mainRet.setBody($b.bodyRet);} + END; + +functionArguments returns [ArrayList funcArgsRet]: + { + $funcArgsRet = new ArrayList(); + } + (e1 = expression + { + $funcArgsRet.add($e1.expRet); + } + (COMMA e2 = expression + { + $funcArgsRet.add($e2.expRet); + } + )* )?; + + +returnStatement returns [ReturnStatement returnStmtRet]: + { + $returnStmtRet = new ReturnStatement(); + } + r = RETURN (e = expression{ + $returnStmtRet.setReturnExp($e.expRet); + })? {$returnStmtRet.setLine($r.line);} SEMICOLLON; + +ifStatement returns[IfStatement ifRet]: + { + $ifRet = new IfStatement(); + ArrayList tempThenStmts = new ArrayList<>(); + ArrayList tempElseStmts = new ArrayList<>(); + } + i = IF + { + $ifRet.setLine($i.line); + } + (c1 = condition {$ifRet.addCondition($c1.conditionRet);} | LPAR c2 = condition RPAR {$ifRet.addCondition($c2.conditionRet);}) + + b = loopBody + { + tempThenStmts.addAll($b.loopStmts); + $ifRet.addCondition($b.loopExps); + if($b.loopRetStmt != null){ + tempThenStmts.add($b.loopRetStmt); + } + } + (ELSEIF (LPAR c2 = condition RPAR | c2 = condition) + { + $ifRet.addCondition($c2.conditionRet); + } + b1 = loopBody + { + tempElseStmts.addAll($b1.loopStmts); + $ifRet.addCondition($b1.loopExps); + if($b1.loopRetStmt != null){ + tempThenStmts.add($b1.loopRetStmt); + } + } + )* + (ELSE b2 = loopBody + { + tempElseStmts.addAll($b2.loopStmts); + $ifRet.addCondition($b2.loopExps); + if($b2.loopRetStmt != null){ + tempThenStmts.add($b2.loopRetStmt); + } + } + )? + { + $ifRet.setThenBody(tempThenStmts); + $ifRet.setElseBody(tempElseStmts); + } + END; + +condition returns [ArrayList conditionRet]: + { + $conditionRet = new ArrayList(); + } + (LPAR e = expression + {$conditionRet.add($e.expRet);} + RPAR ((AND | OR) (LPAR)? c = condition + { + $conditionRet.addAll($c.conditionRet); + } + (RPAR)?)*)*; + +putsStatement returns [PutStatement putRet]: + p = PUTS LPAR e = expression + { + $putRet = new PutStatement($e.expRet); + $putRet.setLine($p.line); + } + RPAR SEMICOLLON; + +lenStatement returns [LenStatement lenRet]: + l = LEN LPAR e = expression + { + $lenRet = new LenStatement($e.expRet); + $lenRet.setLine($l.line); + } + RPAR; + +pushStatement returns [PushStatement pushRet]: + p = PUSH LPAR e1 = expression COMMA e2 = expression RPAR SEMICOLLON + { + $pushRet = new PushStatement($e1.expRet, $e2.expRet); + $pushRet.setLine($p.line); + } + ; + +loopDoStatement returns [LoopDoStatement loopDoRet]: + l1 = LOOP DO + l2 = loopBody + { + $loopDoRet = new LoopDoStatement($l2.loopStmts, $l2.loopExps, $l2.loopRetStmt); + $loopDoRet.setLine($l1.line); + } + END; + +loopBody returns [ArrayList loopStmts, ArrayList loopExps, ReturnStatement loopRetStmt]: + { + $loopStmts = new ArrayList(); + $loopExps = new ArrayList(); + $loopRetStmt = null; + } + (s = statement {$loopStmts.add($s.stmtRet);} + | BREAK (IF c1 = condition{$loopExps.addAll($c1.conditionRet);})? SEMICOLLON + | NEXT (IF c2 = condition{$loopExps.addAll($c2.conditionRet);})? SEMICOLLON + )* + ( + r = returnStatement {$loopRetStmt = $r.returnStmtRet;$loopRetStmt.setLine($r.returnStmtRet.getLine());} + )?; + +forStatement returns [ForStatement forStRet]: + f = FOR id = IDENTIFIER IN r = range + l = loopBody + END + { + $forStRet = new ForStatement(new Identifier($id.text), + $r.rangeRet, $l.loopExps, $l.loopStmts, + $l.loopRetStmt); + $forStRet.setLine($f.line); + } + ; + +range returns [ArrayList rangeRet]: + { + $rangeRet = new ArrayList(); + } + (LPAR e1 = expression + { + $rangeRet.add($e1.expRet); + } + DOUBLEDOT e2 = expression + { + $rangeRet.add($e2.expRet); + } + RPAR) + | + { + $rangeRet = new ArrayList(); + } + (LBRACK (e3 = expression + { + $rangeRet.add($e3.expRet); + } + (COMMA e4 = expression + { + $rangeRet.add($e4.expRet); + } + )*) RBRACK) + | + { + $rangeRet = new ArrayList(); + } + id = IDENTIFIER + { + Identifier id_ = new Identifier($id.text); + id_.setLine($id.line); + $rangeRet.add(id_); + } + ; + +filterStatement returns [FilterStatement filterStatementRet]: + { + ArrayList conditionExps = new ArrayList(); + } + brack = LBRACK e1 = expression SEPARATOR id = IDENTIFIER + ARROW r = range COMMA e2 = expression + { + conditionExps.add($e2.expRet); + } + (COMMA e3 = expression + { + conditionExps.add($e3.expRet); + } + )* + { + Identifier id_ = new Identifier($id.text); + id_.setLine($id.line); + $filterStatementRet = new FilterStatement(id_, $e1.expRet, + conditionExps, $r.rangeRet); + $filterStatementRet.setLine($brack.line); + } + RBRACK; + +matchPatternStatement returns [MatchPatternStatement matchPatRet]: + id = IDENTIFIER DOT m = MATCH LPAR e = expression RPAR + { + Identifier id_ = new Identifier($id.text); + id_.setLine($id.line); + $matchPatRet = new MatchPatternStatement(id_, $e.expRet); + $matchPatRet.setLine($m.line); + } + ; + +chopStatement returns [ChopStatement chopRet]: + + c = CHOP LPAR e = expression RPAR + { + $chopRet = new ChopStatement($e.expRet); + $chopRet.setLine($c.line); + } + ; +chompStatement returns [ChompStatement chompRet]: + c = CHOMP LPAR e = expression RPAR + { + $chompRet = new ChompStatement($e.expRet); + $chompRet.setLine($c.line); + } + ; + +assignment returns [AssignStatement assignRet]: + { + boolean access = false; + int line; + AssignOperator op; + } + id = IDENTIFIER (a = accessList {access = true;})? + (as = ASSIGN {op = AssignOperator.ASSIGN;line = $as.line;} + | pl = PLUS_ASSIGN {op = AssignOperator.PLUS_ASSIGN;line = $pl.line;} + | mi = MINUS_ASSIGN {op = AssignOperator.MINUS_ASSIGN;line = $mi.line;} + | di = DIVIDE_ASSIGN {op = AssignOperator.DIVIDE_ASSIGN;line = $di.line;} + | mu = MULT_ASSIGN {op = AssignOperator.MULT_ASSIGN;line = $mu.line;} + | mo = MOD_ASSIGN {op = AssignOperator.MOD_ASSIGN;line = $mo.line;}) + e = expression SEMICOLLON + { + Identifier id_ = new Identifier($id.text); + id_.setLine($id.line); + $assignRet = new AssignStatement(access, id_, $e.expRet, op); + if(access){ + $assignRet.setAccessListExpression($a.accessListExp); + } + $assignRet.setLine(line); + }; + +accessList returns [Expression accessListExp]: + LBRACK e = expression {$accessListExp = $e.expRet;} RBRACK; + +statement returns [Statement stmtRet]: + i = ifStatement {$stmtRet = $i.ifRet;} + | loop = loopDoStatement {$stmtRet = $loop.loopDoRet;} + | f = forStatement {$stmtRet = $f.forStRet;} + | puts = putsStatement {$stmtRet = $puts.putRet;} + | push = pushStatement {$stmtRet = $push.pushRet;} + | e = expression {$stmtRet = new ExpressionStatement($e.expRet);} + { + ExpressionStatement expStmt = new ExpressionStatement($e.expRet); + $stmtRet = expStmt; + $stmtRet.setLine($e.expRet.getLine()); + } + SEMICOLLON + | as = assignment {$stmtRet = $as.assignRet;} + ; + + +body returns [ArrayList bodyRet]: + { + $bodyRet = new ArrayList(); + } + (s = statement {$bodyRet.add($s.stmtRet);})* + ( + r = returnStatement {$bodyRet.add($r.returnStmtRet);} + )?; + + +expression returns [Expression expRet]: + e1 = expression a = APPEND e2 = eqaulityExpression + { + if(!($e1.expRet instanceof AppendExpression)){ + $expRet = new AppendExpression($e1.expRet); + $expRet.setLine($a.line); + } + else{ + AppendExpression appendExp = (AppendExpression) $e1.expRet; + appendExp.addAppendedExpression($e2.expRet); + $expRet = appendExp; + } + } + | e3 = eqaulityExpression {$expRet = $e3.expRet;}; + + +eqaulityExpression returns[Expression expRet]: + e1 = relationalExpression + { + BinaryOperator op; + int line; + } + (op1 = EQUAL {op = BinaryOperator.EQUAL;line = $op1.line;} + | op2 = NOT_EQUAL {op = BinaryOperator.NOT_EQUAL;line = $op2.line;} + ) r1 = relationalExpression {$expRet = new BinaryExpression($e1.expRet, $r1.expRet, op);$expRet.setLine(line);} + | r2 = relationalExpression {$expRet = $r2.expRet;}; + +relationalExpression returns [Expression expRet]: + r1 = relationalExpression + { + BinaryOperator op; + int line; + } + (gt = GREATER_THAN {op = BinaryOperator.GREATER_THAN;line = $gt.line;} + | lt = LESS_THAN {op = BinaryOperator.LESS_THAN;line = $lt.line;} + | let = LESS_EQUAL_THAN {op = BinaryOperator.LESS_EQUAL_THAN;line = $let.line;} + | get = GREATER_EQUAL_THAN {op = BinaryOperator.GREATER_EQUAL_THAN;line = $get.line;} + ) a1 = additiveExpression {$expRet = new BinaryExpression($r1.expRet, $a1.expRet, op);$expRet.setLine(line);} + | a2 = additiveExpression {$expRet = $a2.expRet;}; + + +additiveExpression returns [Expression expRet]: + a1 = additiveExpression + { + BinaryOperator op; + int line; + } + (p = PLUS {op = BinaryOperator.PLUS;line = $p.line;} + | m = MINUS {op = BinaryOperator.MINUS;line = $m.line;} + ) m1 = multiplicativeExpression {$expRet = new BinaryExpression($a1.expRet, $m1.expRet, op);$expRet.setLine(line);} + | m2 = multiplicativeExpression + { + $expRet = $m2.expRet; + } + ; + + +multiplicativeExpression returns [Expression expRet]: + m1 = multiplicativeExpression + { + BinaryOperator op; + int line; + } + (m = MULT {op = BinaryOperator.MULT;line = $m.line;} + |d = DIVIDE {op = BinaryOperator.DIVIDE;line = $d.line;} + ) p1 = preUnaryExpression {$expRet = new BinaryExpression($m1.expRet, $p1.expRet, op);$expRet.setLine(line);} + | p2 = preUnaryExpression {$expRet = $p2.expRet;}; + + +preUnaryExpression returns [Expression expRet]: + { + UnaryOperator op; + int line; + } + (n = NOT {op = UnaryOperator.NOT;line = $n.line;} + |m = MINUS {op = UnaryOperator.MINUS;line = $m.line;} + |i = INCREMENT {op = UnaryOperator.INC;line = $i.line;} + |d = DECREMENT {op = UnaryOperator.DEC;line = $d.line;} + ) a1 = accessExpression {$expRet = new UnaryExpression($a1.expRet, op);$expRet.setLine(line);} + | a2 = accessExpression {$expRet = $a2.expRet;}; + + +accessExpression returns [Expression expRet]: + { + boolean isAccessExpression = false; + boolean isMultiDimentional = false; + boolean isFunctionCall = false; + ArrayList args = new ArrayList(); + ArrayList dimentions = new ArrayList(); + } + o = otherExpression + (LPAR f = functionArguments //arrayList of expression + { + isAccessExpression = true; + isFunctionCall =true; + args.addAll($f.funcArgsRet); + } + RPAR)* + (a = accessList //single expression + { + isMultiDimentional = true; + isAccessExpression = true; + dimentions.add($a.accessListExp); + } + )* + { + if(!isAccessExpression){ + $expRet = $o.expRet; + } + else{ + AccessExpression accessExp = new AccessExpression($o.expRet, args); + accessExp.setIsFunctionCall(isFunctionCall); + if(isMultiDimentional){ + + accessExp.setDimentionalAccess(dimentions); + } + $expRet = accessExp; + $expRet.setLine($o.expRet.getLine()); + + } + } + ; + +otherExpression returns [Expression expRet]: + v = values {$expRet = $v.valRet;} + | id = IDENTIFIER + { + $expRet = new Identifier($id.text); + $expRet.setLine($id.line); + } + | lambda = lambdaFunction {$expRet = $lambda.lambdaRet;} + | chop = chopStatement {$expRet = $chop.chopRet;} + | chomp = chompStatement {$expRet = $chomp.chompRet;} + | match = matchPatternStatement {$expRet = $match.matchPatRet;} + | f = filterStatement {$expRet = $f.filterStatementRet;} + | len_ = lenStatement {$expRet = $len_.lenRet;} + | LPAR (e = expression {$expRet = $e.expRet;})? RPAR; + + + +//lambdaFunction returns [Expression lambdaRet]: +// a = ARROW fd = functionArgumentsDeclaration +// LBRACE b = body RBRACE fa = functionArguments +// { +// $lambdaRet = new LambdaExpression($fd.argRet, $b.bodyRet, $fa.funcArgsRet); +// $lambdaRet.setLine($a.line); +// } +// ; + +lambdaFunction returns [Expression lambdaRet]: + a = ARROW fd = functionArgumentsDeclaration + LBRACE b = body RBRACE + { + $lambdaRet = new LambdaExpression($fd.argRet, $b.bodyRet); + $lambdaRet.setLine($a.line); + } + ; + +values returns [Value valRet]: + b = boolValue {$valRet = $b.boolValRet;} + | s = STRING_VALUE {$valRet = new StringValue($s.text); $valRet.setLine($s.line);} + | i = INT_VALUE {$valRet = new IntValue($i.int);$valRet.setLine($i.line);} + | float_ = FLOAT_VALUE {$valRet = new FloatValue(Float.parseFloat($float_.text));$valRet.setLine($float_.line);} + | l = listValue {$valRet = $l.listValRet;} + | f = functionPointer {$valRet = $f.fpRet;}; + +listValue returns [ListValue listValRet]: + l = LBRACK f = functionArguments + RBRACK + { + $listValRet = new ListValue($f.funcArgsRet); + $listValRet.setLine($l.line); + } + ; + +boolValue returns [BoolValue boolValRet]: + t = TRUE {$boolValRet = new BoolValue(true); $boolValRet.setLine($t.line);} + | f = FALSE {$boolValRet = new BoolValue(false); $boolValRet.setLine($f.line);} + ; + +functionPointer returns [FunctionPointer fpRet]: + m = METHOD LPAR COLON id = IDENTIFIER RPAR + { + Identifier id_ = new Identifier($id.text); + id_.setLine($id.line); + $fpRet = new FunctionPointer(id_); + $fpRet.setLine($m.line); + } + ; + + +DEF: 'def'; +END: 'end'; +MAIN: 'main'; + +PUTS: 'puts'; +PUSH: 'push'; +LEN: 'len'; +RETURN: 'return'; + +IF: 'if'; +ELSE: 'else'; +ELSEIF: 'elseif'; + +METHOD: 'method'; + +PATTERN: 'pattern'; +MATCH: 'match'; +LOOP: 'loop'; +FOR: 'for'; +IN: 'in'; +DO: 'do'; + +CHOP: 'chop'; +CHOMP: 'chomp'; + +PLUS: '+'; +MINUS: '-'; +MULT: '*'; +DIVIDE: '/'; + +EQUAL: '=='; +NOT_EQUAL: '!='; +LESS_EQUAL_THAN: '<='; +GREATER_EQUAL_THAN: '>='; +GREATER_THAN: '>'; +LESS_THAN: '<'; + +AND: '&&'; +OR: '||'; +NOT: '!'; +INCREMENT: '++'; +DECREMENT: '--'; + +PATTERN_MATCHING_SEPARATOR: ' |'; +SEPARATOR: '|'; +APPEND: '<<'; + +TRUE: 'true'; +FALSE: 'false'; + +BREAK: 'break'; +NEXT: 'next'; + +ARROW: '->'; + +PLUS_ASSIGN: '+='; +MINUS_ASSIGN: '-='; +MULT_ASSIGN: '*='; +DIVIDE_ASSIGN: '/='; +MOD_ASSIGN: '%='; +ASSIGN: '='; + +LPAR: '('; +RPAR: ')'; +LBRACK: '['; +RBRACK: ']'; +LBRACE: '{'; +RBRACE: '}'; + +COMMA: ','; +DOT: '.'; +DOUBLEDOT: '..'; +COLON: ':'; +SEMICOLLON: ';'; + +INT_VALUE: '0' | [1-9][0-9]*; +FLOAT_VALUE: [0-9]* '.' [0-9]+; +IDENTIFIER: [a-zA-Z_][A-Za-z0-9_]*; +STRING_VALUE: '"'~["]*'"'; +COMMENT: ('#' ~( '\r' | '\n')* | ('=begin' .*? '=end')) -> skip; +WS: ([ \t\n\r]) -> skip; \ No newline at end of file diff --git a/Phase2Template/out/production/Phase2Template/main/symbolTable/SymbolTable.class b/Phase2Template/out/production/Phase2Template/main/symbolTable/SymbolTable.class new file mode 100644 index 0000000..a5cb331 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/symbolTable/SymbolTable.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/symbolTable/exceptions/ItemAlreadyExists.class b/Phase2Template/out/production/Phase2Template/main/symbolTable/exceptions/ItemAlreadyExists.class new file mode 100644 index 0000000..847a685 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/symbolTable/exceptions/ItemAlreadyExists.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/symbolTable/exceptions/ItemNotFound.class b/Phase2Template/out/production/Phase2Template/main/symbolTable/exceptions/ItemNotFound.class new file mode 100644 index 0000000..36c0841 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/symbolTable/exceptions/ItemNotFound.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/symbolTable/item/FunctionItem.class b/Phase2Template/out/production/Phase2Template/main/symbolTable/item/FunctionItem.class new file mode 100644 index 0000000..351fd89 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/symbolTable/item/FunctionItem.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/symbolTable/item/PatternItem.class b/Phase2Template/out/production/Phase2Template/main/symbolTable/item/PatternItem.class new file mode 100644 index 0000000..5a9ccb2 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/symbolTable/item/PatternItem.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/symbolTable/item/SymbolTableItem.class b/Phase2Template/out/production/Phase2Template/main/symbolTable/item/SymbolTableItem.class new file mode 100644 index 0000000..d35915f Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/symbolTable/item/SymbolTableItem.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/symbolTable/item/VarItem.class b/Phase2Template/out/production/Phase2Template/main/symbolTable/item/VarItem.class new file mode 100644 index 0000000..e3310f7 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/symbolTable/item/VarItem.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/symbolTable/utils/Graph.class b/Phase2Template/out/production/Phase2Template/main/symbolTable/utils/Graph.class new file mode 100644 index 0000000..69de56e Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/symbolTable/utils/Graph.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/symbolTable/utils/Stack.class b/Phase2Template/out/production/Phase2Template/main/symbolTable/utils/Stack.class new file mode 100644 index 0000000..38eccb0 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/symbolTable/utils/Stack.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/visitor/IVisitor.class b/Phase2Template/out/production/Phase2Template/main/visitor/IVisitor.class new file mode 100644 index 0000000..b1abccb Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/visitor/IVisitor.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/visitor/Visitor.class b/Phase2Template/out/production/Phase2Template/main/visitor/Visitor.class new file mode 100644 index 0000000..5e2dfb1 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/visitor/Visitor.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/visitor/astPrinter/AstPrinter.class b/Phase2Template/out/production/Phase2Template/main/visitor/astPrinter/AstPrinter.class new file mode 100644 index 0000000..08e2508 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/visitor/astPrinter/AstPrinter.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/visitor/nameAnalyzer/DependencyDetector.class b/Phase2Template/out/production/Phase2Template/main/visitor/nameAnalyzer/DependencyDetector.class new file mode 100644 index 0000000..7766dd7 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/visitor/nameAnalyzer/DependencyDetector.class differ diff --git a/Phase2Template/out/production/Phase2Template/main/visitor/nameAnalyzer/NameAnalyzer.class b/Phase2Template/out/production/Phase2Template/main/visitor/nameAnalyzer/NameAnalyzer.class new file mode 100644 index 0000000..adadb96 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/main/visitor/nameAnalyzer/NameAnalyzer.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraft.interp b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraft.interp new file mode 100644 index 0000000..c5704fe --- /dev/null +++ b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraft.interp @@ -0,0 +1,178 @@ +token literal names: +null +'def' +'end' +'main' +'puts' +'push' +'len' +'return' +'if' +'else' +'elseif' +'method' +'pattern' +'match' +'loop' +'for' +'in' +'do' +'chop' +'chomp' +'+' +'-' +'*' +'/' +'==' +'!=' +'<=' +'>=' +'>' +'<' +'&&' +'||' +'!' +'++' +'--' +' |' +'|' +'<<' +'true' +'false' +'break' +'next' +'->' +'+=' +'-=' +'*=' +'/=' +'%=' +'=' +'(' +')' +'[' +']' +'{' +'}' +',' +'.' +'..' +':' +';' +null +null +null +null +null +null + +token symbolic names: +null +DEF +END +MAIN +PUTS +PUSH +LEN +RETURN +IF +ELSE +ELSEIF +METHOD +PATTERN +MATCH +LOOP +FOR +IN +DO +CHOP +CHOMP +PLUS +MINUS +MULT +DIVIDE +EQUAL +NOT_EQUAL +LESS_EQUAL_THAN +GREATER_EQUAL_THAN +GREATER_THAN +LESS_THAN +AND +OR +NOT +INCREMENT +DECREMENT +PATTERN_MATCHING_SEPARATOR +SEPARATOR +APPEND +TRUE +FALSE +BREAK +NEXT +ARROW +PLUS_ASSIGN +MINUS_ASSIGN +MULT_ASSIGN +DIVIDE_ASSIGN +MOD_ASSIGN +ASSIGN +LPAR +RPAR +LBRACK +RBRACK +LBRACE +RBRACE +COMMA +DOT +DOUBLEDOT +COLON +SEMICOLLON +INT_VALUE +FLOAT_VALUE +IDENTIFIER +STRING_VALUE +COMMENT +WS + +rule names: +program +functionDeclaration +functionArgumentsDeclaration +patternMatching +main +functionArguments +returnStatement +ifStatement +condition +putsStatement +lenStatement +pushStatement +loopDoStatement +loopBody +forStatement +range +filterStatement +matchPatternStatement +chopStatement +chompStatement +assignment +accessList +statement +body +expression +eqaulityExpression +relationalExpression +additiveExpression +multiplicativeExpression +preUnaryExpression +accessExpression +otherExpression +lambdaFunction +values +listValue +boolValue +functionPointer + + +atn: +[4, 1, 65, 676, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 5, 0, 82, 8, 0, 10, 0, 12, 0, 85, 9, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 5, 2, 108, 8, 2, 10, 2, 12, 2, 111, 9, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 5, 2, 127, 8, 2, 10, 2, 12, 2, 130, 9, 2, 1, 2, 1, 2, 3, 2, 134, 8, 2, 3, 2, 136, 8, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 5, 3, 155, 8, 3, 10, 3, 12, 3, 158, 9, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 5, 5, 179, 8, 5, 10, 5, 12, 5, 182, 9, 5, 3, 5, 184, 8, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 191, 8, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 3, 7, 207, 8, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 3, 7, 217, 8, 7, 1, 7, 1, 7, 1, 7, 1, 7, 5, 7, 223, 8, 7, 10, 7, 12, 7, 226, 9, 7, 1, 7, 1, 7, 1, 7, 1, 7, 3, 7, 232, 8, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 244, 8, 8, 1, 8, 1, 8, 1, 8, 3, 8, 249, 8, 8, 5, 8, 251, 8, 8, 10, 8, 12, 8, 254, 9, 8, 5, 8, 256, 8, 8, 10, 8, 12, 8, 259, 9, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 298, 8, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 306, 8, 13, 1, 13, 5, 13, 309, 8, 13, 10, 13, 12, 13, 312, 9, 13, 1, 13, 1, 13, 1, 13, 3, 13, 317, 8, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 5, 15, 344, 8, 15, 10, 15, 12, 15, 347, 9, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 3, 15, 354, 8, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 5, 16, 370, 8, 16, 10, 16, 12, 16, 373, 9, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 403, 8, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 417, 8, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 3, 22, 451, 8, 22, 1, 23, 1, 23, 1, 23, 1, 23, 5, 23, 457, 8, 23, 10, 23, 12, 23, 460, 9, 23, 1, 23, 1, 23, 1, 23, 3, 23, 465, 8, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 5, 24, 476, 8, 24, 10, 24, 12, 24, 479, 9, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 3, 25, 487, 8, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 3, 25, 495, 8, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 3, 26, 511, 8, 26, 1, 26, 1, 26, 1, 26, 5, 26, 516, 8, 26, 10, 26, 12, 26, 519, 9, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 3, 27, 531, 8, 27, 1, 27, 1, 27, 1, 27, 5, 27, 536, 8, 27, 10, 27, 12, 27, 539, 9, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 3, 28, 551, 8, 28, 1, 28, 1, 28, 1, 28, 5, 28, 556, 8, 28, 10, 28, 12, 28, 559, 9, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 3, 29, 570, 8, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 3, 29, 578, 8, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 5, 30, 587, 8, 30, 10, 30, 12, 30, 590, 9, 30, 1, 30, 1, 30, 1, 30, 5, 30, 595, 8, 30, 10, 30, 12, 30, 598, 9, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 3, 31, 629, 8, 31, 1, 31, 3, 31, 632, 8, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 3, 33, 656, 8, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 3, 35, 667, 8, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 0, 4, 48, 52, 54, 56, 37, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 0, 1, 1, 0, 30, 31, 712, 0, 74, 1, 0, 0, 0, 2, 89, 1, 0, 0, 0, 4, 100, 1, 0, 0, 0, 6, 139, 1, 0, 0, 0, 8, 161, 1, 0, 0, 0, 10, 171, 1, 0, 0, 0, 12, 185, 1, 0, 0, 0, 14, 195, 1, 0, 0, 0, 16, 236, 1, 0, 0, 0, 18, 260, 1, 0, 0, 0, 20, 267, 1, 0, 0, 0, 22, 273, 1, 0, 0, 0, 24, 282, 1, 0, 0, 0, 26, 288, 1, 0, 0, 0, 28, 318, 1, 0, 0, 0, 30, 353, 1, 0, 0, 0, 32, 355, 1, 0, 0, 0, 34, 377, 1, 0, 0, 0, 36, 385, 1, 0, 0, 0, 38, 391, 1, 0, 0, 0, 40, 397, 1, 0, 0, 0, 42, 422, 1, 0, 0, 0, 44, 450, 1, 0, 0, 0, 46, 452, 1, 0, 0, 0, 48, 466, 1, 0, 0, 0, 50, 494, 1, 0, 0, 0, 52, 496, 1, 0, 0, 0, 54, 520, 1, 0, 0, 0, 56, 540, 1, 0, 0, 0, 58, 577, 1, 0, 0, 0, 60, 579, 1, 0, 0, 0, 62, 631, 1, 0, 0, 0, 64, 633, 1, 0, 0, 0, 66, 655, 1, 0, 0, 0, 68, 657, 1, 0, 0, 0, 70, 666, 1, 0, 0, 0, 72, 668, 1, 0, 0, 0, 74, 83, 6, 0, -1, 0, 75, 76, 3, 2, 1, 0, 76, 77, 6, 0, -1, 0, 77, 82, 1, 0, 0, 0, 78, 79, 3, 6, 3, 0, 79, 80, 6, 0, -1, 0, 80, 82, 1, 0, 0, 0, 81, 75, 1, 0, 0, 0, 81, 78, 1, 0, 0, 0, 82, 85, 1, 0, 0, 0, 83, 81, 1, 0, 0, 0, 83, 84, 1, 0, 0, 0, 84, 86, 1, 0, 0, 0, 85, 83, 1, 0, 0, 0, 86, 87, 3, 8, 4, 0, 87, 88, 6, 0, -1, 0, 88, 1, 1, 0, 0, 0, 89, 90, 6, 1, -1, 0, 90, 91, 5, 1, 0, 0, 91, 92, 6, 1, -1, 0, 92, 93, 5, 62, 0, 0, 93, 94, 6, 1, -1, 0, 94, 95, 3, 4, 2, 0, 95, 96, 6, 1, -1, 0, 96, 97, 3, 46, 23, 0, 97, 98, 6, 1, -1, 0, 98, 99, 5, 2, 0, 0, 99, 3, 1, 0, 0, 0, 100, 101, 6, 2, -1, 0, 101, 135, 5, 49, 0, 0, 102, 103, 5, 62, 0, 0, 103, 109, 6, 2, -1, 0, 104, 105, 5, 55, 0, 0, 105, 106, 5, 62, 0, 0, 106, 108, 6, 2, -1, 0, 107, 104, 1, 0, 0, 0, 108, 111, 1, 0, 0, 0, 109, 107, 1, 0, 0, 0, 109, 110, 1, 0, 0, 0, 110, 133, 1, 0, 0, 0, 111, 109, 1, 0, 0, 0, 112, 113, 5, 55, 0, 0, 113, 114, 5, 51, 0, 0, 114, 115, 5, 62, 0, 0, 115, 116, 6, 2, -1, 0, 116, 117, 5, 48, 0, 0, 117, 118, 3, 48, 24, 0, 118, 128, 6, 2, -1, 0, 119, 120, 5, 55, 0, 0, 120, 121, 5, 62, 0, 0, 121, 122, 6, 2, -1, 0, 122, 123, 5, 48, 0, 0, 123, 124, 3, 48, 24, 0, 124, 125, 6, 2, -1, 0, 125, 127, 1, 0, 0, 0, 126, 119, 1, 0, 0, 0, 127, 130, 1, 0, 0, 0, 128, 126, 1, 0, 0, 0, 128, 129, 1, 0, 0, 0, 129, 131, 1, 0, 0, 0, 130, 128, 1, 0, 0, 0, 131, 132, 5, 52, 0, 0, 132, 134, 1, 0, 0, 0, 133, 112, 1, 0, 0, 0, 133, 134, 1, 0, 0, 0, 134, 136, 1, 0, 0, 0, 135, 102, 1, 0, 0, 0, 135, 136, 1, 0, 0, 0, 136, 137, 1, 0, 0, 0, 137, 138, 5, 50, 0, 0, 138, 5, 1, 0, 0, 0, 139, 140, 5, 12, 0, 0, 140, 141, 6, 3, -1, 0, 141, 142, 5, 62, 0, 0, 142, 143, 6, 3, -1, 0, 143, 144, 5, 49, 0, 0, 144, 145, 5, 62, 0, 0, 145, 146, 6, 3, -1, 0, 146, 156, 5, 50, 0, 0, 147, 148, 5, 35, 0, 0, 148, 149, 3, 16, 8, 0, 149, 150, 6, 3, -1, 0, 150, 151, 5, 48, 0, 0, 151, 152, 3, 48, 24, 0, 152, 153, 6, 3, -1, 0, 153, 155, 1, 0, 0, 0, 154, 147, 1, 0, 0, 0, 155, 158, 1, 0, 0, 0, 156, 154, 1, 0, 0, 0, 156, 157, 1, 0, 0, 0, 157, 159, 1, 0, 0, 0, 158, 156, 1, 0, 0, 0, 159, 160, 5, 59, 0, 0, 160, 7, 1, 0, 0, 0, 161, 162, 6, 4, -1, 0, 162, 163, 5, 1, 0, 0, 163, 164, 5, 3, 0, 0, 164, 165, 6, 4, -1, 0, 165, 166, 5, 49, 0, 0, 166, 167, 5, 50, 0, 0, 167, 168, 3, 46, 23, 0, 168, 169, 6, 4, -1, 0, 169, 170, 5, 2, 0, 0, 170, 9, 1, 0, 0, 0, 171, 183, 6, 5, -1, 0, 172, 173, 3, 48, 24, 0, 173, 180, 6, 5, -1, 0, 174, 175, 5, 55, 0, 0, 175, 176, 3, 48, 24, 0, 176, 177, 6, 5, -1, 0, 177, 179, 1, 0, 0, 0, 178, 174, 1, 0, 0, 0, 179, 182, 1, 0, 0, 0, 180, 178, 1, 0, 0, 0, 180, 181, 1, 0, 0, 0, 181, 184, 1, 0, 0, 0, 182, 180, 1, 0, 0, 0, 183, 172, 1, 0, 0, 0, 183, 184, 1, 0, 0, 0, 184, 11, 1, 0, 0, 0, 185, 186, 6, 6, -1, 0, 186, 190, 5, 7, 0, 0, 187, 188, 3, 48, 24, 0, 188, 189, 6, 6, -1, 0, 189, 191, 1, 0, 0, 0, 190, 187, 1, 0, 0, 0, 190, 191, 1, 0, 0, 0, 191, 192, 1, 0, 0, 0, 192, 193, 6, 6, -1, 0, 193, 194, 5, 59, 0, 0, 194, 13, 1, 0, 0, 0, 195, 196, 6, 7, -1, 0, 196, 197, 5, 8, 0, 0, 197, 206, 6, 7, -1, 0, 198, 199, 3, 16, 8, 0, 199, 200, 6, 7, -1, 0, 200, 207, 1, 0, 0, 0, 201, 202, 5, 49, 0, 0, 202, 203, 3, 16, 8, 0, 203, 204, 5, 50, 0, 0, 204, 205, 6, 7, -1, 0, 205, 207, 1, 0, 0, 0, 206, 198, 1, 0, 0, 0, 206, 201, 1, 0, 0, 0, 207, 208, 1, 0, 0, 0, 208, 209, 3, 26, 13, 0, 209, 224, 6, 7, -1, 0, 210, 216, 5, 10, 0, 0, 211, 212, 5, 49, 0, 0, 212, 213, 3, 16, 8, 0, 213, 214, 5, 50, 0, 0, 214, 217, 1, 0, 0, 0, 215, 217, 3, 16, 8, 0, 216, 211, 1, 0, 0, 0, 216, 215, 1, 0, 0, 0, 217, 218, 1, 0, 0, 0, 218, 219, 6, 7, -1, 0, 219, 220, 3, 26, 13, 0, 220, 221, 6, 7, -1, 0, 221, 223, 1, 0, 0, 0, 222, 210, 1, 0, 0, 0, 223, 226, 1, 0, 0, 0, 224, 222, 1, 0, 0, 0, 224, 225, 1, 0, 0, 0, 225, 231, 1, 0, 0, 0, 226, 224, 1, 0, 0, 0, 227, 228, 5, 9, 0, 0, 228, 229, 3, 26, 13, 0, 229, 230, 6, 7, -1, 0, 230, 232, 1, 0, 0, 0, 231, 227, 1, 0, 0, 0, 231, 232, 1, 0, 0, 0, 232, 233, 1, 0, 0, 0, 233, 234, 6, 7, -1, 0, 234, 235, 5, 2, 0, 0, 235, 15, 1, 0, 0, 0, 236, 257, 6, 8, -1, 0, 237, 238, 5, 49, 0, 0, 238, 239, 3, 48, 24, 0, 239, 240, 6, 8, -1, 0, 240, 252, 5, 50, 0, 0, 241, 243, 7, 0, 0, 0, 242, 244, 5, 49, 0, 0, 243, 242, 1, 0, 0, 0, 243, 244, 1, 0, 0, 0, 244, 245, 1, 0, 0, 0, 245, 246, 3, 16, 8, 0, 246, 248, 6, 8, -1, 0, 247, 249, 5, 50, 0, 0, 248, 247, 1, 0, 0, 0, 248, 249, 1, 0, 0, 0, 249, 251, 1, 0, 0, 0, 250, 241, 1, 0, 0, 0, 251, 254, 1, 0, 0, 0, 252, 250, 1, 0, 0, 0, 252, 253, 1, 0, 0, 0, 253, 256, 1, 0, 0, 0, 254, 252, 1, 0, 0, 0, 255, 237, 1, 0, 0, 0, 256, 259, 1, 0, 0, 0, 257, 255, 1, 0, 0, 0, 257, 258, 1, 0, 0, 0, 258, 17, 1, 0, 0, 0, 259, 257, 1, 0, 0, 0, 260, 261, 5, 4, 0, 0, 261, 262, 5, 49, 0, 0, 262, 263, 3, 48, 24, 0, 263, 264, 6, 9, -1, 0, 264, 265, 5, 50, 0, 0, 265, 266, 5, 59, 0, 0, 266, 19, 1, 0, 0, 0, 267, 268, 5, 6, 0, 0, 268, 269, 5, 49, 0, 0, 269, 270, 3, 48, 24, 0, 270, 271, 6, 10, -1, 0, 271, 272, 5, 50, 0, 0, 272, 21, 1, 0, 0, 0, 273, 274, 5, 5, 0, 0, 274, 275, 5, 49, 0, 0, 275, 276, 3, 48, 24, 0, 276, 277, 5, 55, 0, 0, 277, 278, 3, 48, 24, 0, 278, 279, 5, 50, 0, 0, 279, 280, 5, 59, 0, 0, 280, 281, 6, 11, -1, 0, 281, 23, 1, 0, 0, 0, 282, 283, 5, 14, 0, 0, 283, 284, 5, 17, 0, 0, 284, 285, 3, 26, 13, 0, 285, 286, 6, 12, -1, 0, 286, 287, 5, 2, 0, 0, 287, 25, 1, 0, 0, 0, 288, 310, 6, 13, -1, 0, 289, 290, 3, 44, 22, 0, 290, 291, 6, 13, -1, 0, 291, 309, 1, 0, 0, 0, 292, 297, 5, 40, 0, 0, 293, 294, 5, 8, 0, 0, 294, 295, 3, 16, 8, 0, 295, 296, 6, 13, -1, 0, 296, 298, 1, 0, 0, 0, 297, 293, 1, 0, 0, 0, 297, 298, 1, 0, 0, 0, 298, 299, 1, 0, 0, 0, 299, 309, 5, 59, 0, 0, 300, 305, 5, 41, 0, 0, 301, 302, 5, 8, 0, 0, 302, 303, 3, 16, 8, 0, 303, 304, 6, 13, -1, 0, 304, 306, 1, 0, 0, 0, 305, 301, 1, 0, 0, 0, 305, 306, 1, 0, 0, 0, 306, 307, 1, 0, 0, 0, 307, 309, 5, 59, 0, 0, 308, 289, 1, 0, 0, 0, 308, 292, 1, 0, 0, 0, 308, 300, 1, 0, 0, 0, 309, 312, 1, 0, 0, 0, 310, 308, 1, 0, 0, 0, 310, 311, 1, 0, 0, 0, 311, 316, 1, 0, 0, 0, 312, 310, 1, 0, 0, 0, 313, 314, 3, 12, 6, 0, 314, 315, 6, 13, -1, 0, 315, 317, 1, 0, 0, 0, 316, 313, 1, 0, 0, 0, 316, 317, 1, 0, 0, 0, 317, 27, 1, 0, 0, 0, 318, 319, 5, 15, 0, 0, 319, 320, 5, 62, 0, 0, 320, 321, 5, 16, 0, 0, 321, 322, 3, 30, 15, 0, 322, 323, 3, 26, 13, 0, 323, 324, 5, 2, 0, 0, 324, 325, 6, 14, -1, 0, 325, 29, 1, 0, 0, 0, 326, 327, 6, 15, -1, 0, 327, 328, 5, 49, 0, 0, 328, 329, 3, 48, 24, 0, 329, 330, 6, 15, -1, 0, 330, 331, 5, 57, 0, 0, 331, 332, 3, 48, 24, 0, 332, 333, 6, 15, -1, 0, 333, 334, 5, 50, 0, 0, 334, 354, 1, 0, 0, 0, 335, 336, 6, 15, -1, 0, 336, 337, 5, 51, 0, 0, 337, 338, 3, 48, 24, 0, 338, 345, 6, 15, -1, 0, 339, 340, 5, 55, 0, 0, 340, 341, 3, 48, 24, 0, 341, 342, 6, 15, -1, 0, 342, 344, 1, 0, 0, 0, 343, 339, 1, 0, 0, 0, 344, 347, 1, 0, 0, 0, 345, 343, 1, 0, 0, 0, 345, 346, 1, 0, 0, 0, 346, 348, 1, 0, 0, 0, 347, 345, 1, 0, 0, 0, 348, 349, 5, 52, 0, 0, 349, 354, 1, 0, 0, 0, 350, 351, 6, 15, -1, 0, 351, 352, 5, 62, 0, 0, 352, 354, 6, 15, -1, 0, 353, 326, 1, 0, 0, 0, 353, 335, 1, 0, 0, 0, 353, 350, 1, 0, 0, 0, 354, 31, 1, 0, 0, 0, 355, 356, 6, 16, -1, 0, 356, 357, 5, 51, 0, 0, 357, 358, 3, 48, 24, 0, 358, 359, 5, 36, 0, 0, 359, 360, 5, 62, 0, 0, 360, 361, 5, 42, 0, 0, 361, 362, 3, 30, 15, 0, 362, 363, 5, 55, 0, 0, 363, 364, 3, 48, 24, 0, 364, 371, 6, 16, -1, 0, 365, 366, 5, 55, 0, 0, 366, 367, 3, 48, 24, 0, 367, 368, 6, 16, -1, 0, 368, 370, 1, 0, 0, 0, 369, 365, 1, 0, 0, 0, 370, 373, 1, 0, 0, 0, 371, 369, 1, 0, 0, 0, 371, 372, 1, 0, 0, 0, 372, 374, 1, 0, 0, 0, 373, 371, 1, 0, 0, 0, 374, 375, 6, 16, -1, 0, 375, 376, 5, 52, 0, 0, 376, 33, 1, 0, 0, 0, 377, 378, 5, 62, 0, 0, 378, 379, 5, 56, 0, 0, 379, 380, 5, 13, 0, 0, 380, 381, 5, 49, 0, 0, 381, 382, 3, 48, 24, 0, 382, 383, 5, 50, 0, 0, 383, 384, 6, 17, -1, 0, 384, 35, 1, 0, 0, 0, 385, 386, 5, 18, 0, 0, 386, 387, 5, 49, 0, 0, 387, 388, 3, 48, 24, 0, 388, 389, 5, 50, 0, 0, 389, 390, 6, 18, -1, 0, 390, 37, 1, 0, 0, 0, 391, 392, 5, 19, 0, 0, 392, 393, 5, 49, 0, 0, 393, 394, 3, 48, 24, 0, 394, 395, 5, 50, 0, 0, 395, 396, 6, 19, -1, 0, 396, 39, 1, 0, 0, 0, 397, 398, 6, 20, -1, 0, 398, 402, 5, 62, 0, 0, 399, 400, 3, 42, 21, 0, 400, 401, 6, 20, -1, 0, 401, 403, 1, 0, 0, 0, 402, 399, 1, 0, 0, 0, 402, 403, 1, 0, 0, 0, 403, 416, 1, 0, 0, 0, 404, 405, 5, 48, 0, 0, 405, 417, 6, 20, -1, 0, 406, 407, 5, 43, 0, 0, 407, 417, 6, 20, -1, 0, 408, 409, 5, 44, 0, 0, 409, 417, 6, 20, -1, 0, 410, 411, 5, 46, 0, 0, 411, 417, 6, 20, -1, 0, 412, 413, 5, 45, 0, 0, 413, 417, 6, 20, -1, 0, 414, 415, 5, 47, 0, 0, 415, 417, 6, 20, -1, 0, 416, 404, 1, 0, 0, 0, 416, 406, 1, 0, 0, 0, 416, 408, 1, 0, 0, 0, 416, 410, 1, 0, 0, 0, 416, 412, 1, 0, 0, 0, 416, 414, 1, 0, 0, 0, 417, 418, 1, 0, 0, 0, 418, 419, 3, 48, 24, 0, 419, 420, 5, 59, 0, 0, 420, 421, 6, 20, -1, 0, 421, 41, 1, 0, 0, 0, 422, 423, 5, 51, 0, 0, 423, 424, 3, 48, 24, 0, 424, 425, 6, 21, -1, 0, 425, 426, 5, 52, 0, 0, 426, 43, 1, 0, 0, 0, 427, 428, 3, 14, 7, 0, 428, 429, 6, 22, -1, 0, 429, 451, 1, 0, 0, 0, 430, 431, 3, 24, 12, 0, 431, 432, 6, 22, -1, 0, 432, 451, 1, 0, 0, 0, 433, 434, 3, 28, 14, 0, 434, 435, 6, 22, -1, 0, 435, 451, 1, 0, 0, 0, 436, 437, 3, 18, 9, 0, 437, 438, 6, 22, -1, 0, 438, 451, 1, 0, 0, 0, 439, 440, 3, 22, 11, 0, 440, 441, 6, 22, -1, 0, 441, 451, 1, 0, 0, 0, 442, 443, 3, 48, 24, 0, 443, 444, 6, 22, -1, 0, 444, 445, 6, 22, -1, 0, 445, 446, 5, 59, 0, 0, 446, 451, 1, 0, 0, 0, 447, 448, 3, 40, 20, 0, 448, 449, 6, 22, -1, 0, 449, 451, 1, 0, 0, 0, 450, 427, 1, 0, 0, 0, 450, 430, 1, 0, 0, 0, 450, 433, 1, 0, 0, 0, 450, 436, 1, 0, 0, 0, 450, 439, 1, 0, 0, 0, 450, 442, 1, 0, 0, 0, 450, 447, 1, 0, 0, 0, 451, 45, 1, 0, 0, 0, 452, 458, 6, 23, -1, 0, 453, 454, 3, 44, 22, 0, 454, 455, 6, 23, -1, 0, 455, 457, 1, 0, 0, 0, 456, 453, 1, 0, 0, 0, 457, 460, 1, 0, 0, 0, 458, 456, 1, 0, 0, 0, 458, 459, 1, 0, 0, 0, 459, 464, 1, 0, 0, 0, 460, 458, 1, 0, 0, 0, 461, 462, 3, 12, 6, 0, 462, 463, 6, 23, -1, 0, 463, 465, 1, 0, 0, 0, 464, 461, 1, 0, 0, 0, 464, 465, 1, 0, 0, 0, 465, 47, 1, 0, 0, 0, 466, 467, 6, 24, -1, 0, 467, 468, 3, 50, 25, 0, 468, 469, 6, 24, -1, 0, 469, 477, 1, 0, 0, 0, 470, 471, 10, 2, 0, 0, 471, 472, 5, 37, 0, 0, 472, 473, 3, 50, 25, 0, 473, 474, 6, 24, -1, 0, 474, 476, 1, 0, 0, 0, 475, 470, 1, 0, 0, 0, 476, 479, 1, 0, 0, 0, 477, 475, 1, 0, 0, 0, 477, 478, 1, 0, 0, 0, 478, 49, 1, 0, 0, 0, 479, 477, 1, 0, 0, 0, 480, 481, 3, 52, 26, 0, 481, 486, 6, 25, -1, 0, 482, 483, 5, 24, 0, 0, 483, 487, 6, 25, -1, 0, 484, 485, 5, 25, 0, 0, 485, 487, 6, 25, -1, 0, 486, 482, 1, 0, 0, 0, 486, 484, 1, 0, 0, 0, 487, 488, 1, 0, 0, 0, 488, 489, 3, 52, 26, 0, 489, 490, 6, 25, -1, 0, 490, 495, 1, 0, 0, 0, 491, 492, 3, 52, 26, 0, 492, 493, 6, 25, -1, 0, 493, 495, 1, 0, 0, 0, 494, 480, 1, 0, 0, 0, 494, 491, 1, 0, 0, 0, 495, 51, 1, 0, 0, 0, 496, 497, 6, 26, -1, 0, 497, 498, 3, 54, 27, 0, 498, 499, 6, 26, -1, 0, 499, 517, 1, 0, 0, 0, 500, 501, 10, 2, 0, 0, 501, 510, 6, 26, -1, 0, 502, 503, 5, 28, 0, 0, 503, 511, 6, 26, -1, 0, 504, 505, 5, 29, 0, 0, 505, 511, 6, 26, -1, 0, 506, 507, 5, 26, 0, 0, 507, 511, 6, 26, -1, 0, 508, 509, 5, 27, 0, 0, 509, 511, 6, 26, -1, 0, 510, 502, 1, 0, 0, 0, 510, 504, 1, 0, 0, 0, 510, 506, 1, 0, 0, 0, 510, 508, 1, 0, 0, 0, 511, 512, 1, 0, 0, 0, 512, 513, 3, 54, 27, 0, 513, 514, 6, 26, -1, 0, 514, 516, 1, 0, 0, 0, 515, 500, 1, 0, 0, 0, 516, 519, 1, 0, 0, 0, 517, 515, 1, 0, 0, 0, 517, 518, 1, 0, 0, 0, 518, 53, 1, 0, 0, 0, 519, 517, 1, 0, 0, 0, 520, 521, 6, 27, -1, 0, 521, 522, 3, 56, 28, 0, 522, 523, 6, 27, -1, 0, 523, 537, 1, 0, 0, 0, 524, 525, 10, 2, 0, 0, 525, 530, 6, 27, -1, 0, 526, 527, 5, 20, 0, 0, 527, 531, 6, 27, -1, 0, 528, 529, 5, 21, 0, 0, 529, 531, 6, 27, -1, 0, 530, 526, 1, 0, 0, 0, 530, 528, 1, 0, 0, 0, 531, 532, 1, 0, 0, 0, 532, 533, 3, 56, 28, 0, 533, 534, 6, 27, -1, 0, 534, 536, 1, 0, 0, 0, 535, 524, 1, 0, 0, 0, 536, 539, 1, 0, 0, 0, 537, 535, 1, 0, 0, 0, 537, 538, 1, 0, 0, 0, 538, 55, 1, 0, 0, 0, 539, 537, 1, 0, 0, 0, 540, 541, 6, 28, -1, 0, 541, 542, 3, 58, 29, 0, 542, 543, 6, 28, -1, 0, 543, 557, 1, 0, 0, 0, 544, 545, 10, 2, 0, 0, 545, 550, 6, 28, -1, 0, 546, 547, 5, 22, 0, 0, 547, 551, 6, 28, -1, 0, 548, 549, 5, 23, 0, 0, 549, 551, 6, 28, -1, 0, 550, 546, 1, 0, 0, 0, 550, 548, 1, 0, 0, 0, 551, 552, 1, 0, 0, 0, 552, 553, 3, 58, 29, 0, 553, 554, 6, 28, -1, 0, 554, 556, 1, 0, 0, 0, 555, 544, 1, 0, 0, 0, 556, 559, 1, 0, 0, 0, 557, 555, 1, 0, 0, 0, 557, 558, 1, 0, 0, 0, 558, 57, 1, 0, 0, 0, 559, 557, 1, 0, 0, 0, 560, 569, 6, 29, -1, 0, 561, 562, 5, 32, 0, 0, 562, 570, 6, 29, -1, 0, 563, 564, 5, 21, 0, 0, 564, 570, 6, 29, -1, 0, 565, 566, 5, 33, 0, 0, 566, 570, 6, 29, -1, 0, 567, 568, 5, 34, 0, 0, 568, 570, 6, 29, -1, 0, 569, 561, 1, 0, 0, 0, 569, 563, 1, 0, 0, 0, 569, 565, 1, 0, 0, 0, 569, 567, 1, 0, 0, 0, 570, 571, 1, 0, 0, 0, 571, 572, 3, 60, 30, 0, 572, 573, 6, 29, -1, 0, 573, 578, 1, 0, 0, 0, 574, 575, 3, 60, 30, 0, 575, 576, 6, 29, -1, 0, 576, 578, 1, 0, 0, 0, 577, 560, 1, 0, 0, 0, 577, 574, 1, 0, 0, 0, 578, 59, 1, 0, 0, 0, 579, 580, 6, 30, -1, 0, 580, 588, 3, 62, 31, 0, 581, 582, 5, 49, 0, 0, 582, 583, 3, 10, 5, 0, 583, 584, 6, 30, -1, 0, 584, 585, 5, 50, 0, 0, 585, 587, 1, 0, 0, 0, 586, 581, 1, 0, 0, 0, 587, 590, 1, 0, 0, 0, 588, 586, 1, 0, 0, 0, 588, 589, 1, 0, 0, 0, 589, 596, 1, 0, 0, 0, 590, 588, 1, 0, 0, 0, 591, 592, 3, 42, 21, 0, 592, 593, 6, 30, -1, 0, 593, 595, 1, 0, 0, 0, 594, 591, 1, 0, 0, 0, 595, 598, 1, 0, 0, 0, 596, 594, 1, 0, 0, 0, 596, 597, 1, 0, 0, 0, 597, 599, 1, 0, 0, 0, 598, 596, 1, 0, 0, 0, 599, 600, 6, 30, -1, 0, 600, 61, 1, 0, 0, 0, 601, 602, 3, 66, 33, 0, 602, 603, 6, 31, -1, 0, 603, 632, 1, 0, 0, 0, 604, 605, 5, 62, 0, 0, 605, 632, 6, 31, -1, 0, 606, 607, 3, 64, 32, 0, 607, 608, 6, 31, -1, 0, 608, 632, 1, 0, 0, 0, 609, 610, 3, 36, 18, 0, 610, 611, 6, 31, -1, 0, 611, 632, 1, 0, 0, 0, 612, 613, 3, 38, 19, 0, 613, 614, 6, 31, -1, 0, 614, 632, 1, 0, 0, 0, 615, 616, 3, 34, 17, 0, 616, 617, 6, 31, -1, 0, 617, 632, 1, 0, 0, 0, 618, 619, 3, 32, 16, 0, 619, 620, 6, 31, -1, 0, 620, 632, 1, 0, 0, 0, 621, 622, 3, 20, 10, 0, 622, 623, 6, 31, -1, 0, 623, 632, 1, 0, 0, 0, 624, 628, 5, 49, 0, 0, 625, 626, 3, 48, 24, 0, 626, 627, 6, 31, -1, 0, 627, 629, 1, 0, 0, 0, 628, 625, 1, 0, 0, 0, 628, 629, 1, 0, 0, 0, 629, 630, 1, 0, 0, 0, 630, 632, 5, 50, 0, 0, 631, 601, 1, 0, 0, 0, 631, 604, 1, 0, 0, 0, 631, 606, 1, 0, 0, 0, 631, 609, 1, 0, 0, 0, 631, 612, 1, 0, 0, 0, 631, 615, 1, 0, 0, 0, 631, 618, 1, 0, 0, 0, 631, 621, 1, 0, 0, 0, 631, 624, 1, 0, 0, 0, 632, 63, 1, 0, 0, 0, 633, 634, 5, 42, 0, 0, 634, 635, 3, 4, 2, 0, 635, 636, 5, 53, 0, 0, 636, 637, 3, 46, 23, 0, 637, 638, 5, 54, 0, 0, 638, 639, 6, 32, -1, 0, 639, 65, 1, 0, 0, 0, 640, 641, 3, 70, 35, 0, 641, 642, 6, 33, -1, 0, 642, 656, 1, 0, 0, 0, 643, 644, 5, 63, 0, 0, 644, 656, 6, 33, -1, 0, 645, 646, 5, 60, 0, 0, 646, 656, 6, 33, -1, 0, 647, 648, 5, 61, 0, 0, 648, 656, 6, 33, -1, 0, 649, 650, 3, 68, 34, 0, 650, 651, 6, 33, -1, 0, 651, 656, 1, 0, 0, 0, 652, 653, 3, 72, 36, 0, 653, 654, 6, 33, -1, 0, 654, 656, 1, 0, 0, 0, 655, 640, 1, 0, 0, 0, 655, 643, 1, 0, 0, 0, 655, 645, 1, 0, 0, 0, 655, 647, 1, 0, 0, 0, 655, 649, 1, 0, 0, 0, 655, 652, 1, 0, 0, 0, 656, 67, 1, 0, 0, 0, 657, 658, 5, 51, 0, 0, 658, 659, 3, 10, 5, 0, 659, 660, 5, 52, 0, 0, 660, 661, 6, 34, -1, 0, 661, 69, 1, 0, 0, 0, 662, 663, 5, 38, 0, 0, 663, 667, 6, 35, -1, 0, 664, 665, 5, 39, 0, 0, 665, 667, 6, 35, -1, 0, 666, 662, 1, 0, 0, 0, 666, 664, 1, 0, 0, 0, 667, 71, 1, 0, 0, 0, 668, 669, 5, 11, 0, 0, 669, 670, 5, 49, 0, 0, 670, 671, 5, 58, 0, 0, 671, 672, 5, 62, 0, 0, 672, 673, 5, 50, 0, 0, 673, 674, 6, 36, -1, 0, 674, 73, 1, 0, 0, 0, 48, 81, 83, 109, 128, 133, 135, 156, 180, 183, 190, 206, 216, 224, 231, 243, 248, 252, 257, 297, 305, 308, 310, 316, 345, 353, 371, 402, 416, 450, 458, 464, 477, 486, 494, 510, 517, 530, 537, 550, 557, 569, 577, 588, 596, 628, 631, 655, 666] \ No newline at end of file diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraft.tokens b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraft.tokens new file mode 100644 index 0000000..c103028 --- /dev/null +++ b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraft.tokens @@ -0,0 +1,124 @@ +DEF=1 +END=2 +MAIN=3 +PUTS=4 +PUSH=5 +LEN=6 +RETURN=7 +IF=8 +ELSE=9 +ELSEIF=10 +METHOD=11 +PATTERN=12 +MATCH=13 +LOOP=14 +FOR=15 +IN=16 +DO=17 +CHOP=18 +CHOMP=19 +PLUS=20 +MINUS=21 +MULT=22 +DIVIDE=23 +EQUAL=24 +NOT_EQUAL=25 +LESS_EQUAL_THAN=26 +GREATER_EQUAL_THAN=27 +GREATER_THAN=28 +LESS_THAN=29 +AND=30 +OR=31 +NOT=32 +INCREMENT=33 +DECREMENT=34 +PATTERN_MATCHING_SEPARATOR=35 +SEPARATOR=36 +APPEND=37 +TRUE=38 +FALSE=39 +BREAK=40 +NEXT=41 +ARROW=42 +PLUS_ASSIGN=43 +MINUS_ASSIGN=44 +MULT_ASSIGN=45 +DIVIDE_ASSIGN=46 +MOD_ASSIGN=47 +ASSIGN=48 +LPAR=49 +RPAR=50 +LBRACK=51 +RBRACK=52 +LBRACE=53 +RBRACE=54 +COMMA=55 +DOT=56 +DOUBLEDOT=57 +COLON=58 +SEMICOLLON=59 +INT_VALUE=60 +FLOAT_VALUE=61 +IDENTIFIER=62 +STRING_VALUE=63 +COMMENT=64 +WS=65 +'def'=1 +'end'=2 +'main'=3 +'puts'=4 +'push'=5 +'len'=6 +'return'=7 +'if'=8 +'else'=9 +'elseif'=10 +'method'=11 +'pattern'=12 +'match'=13 +'loop'=14 +'for'=15 +'in'=16 +'do'=17 +'chop'=18 +'chomp'=19 +'+'=20 +'-'=21 +'*'=22 +'/'=23 +'=='=24 +'!='=25 +'<='=26 +'>='=27 +'>'=28 +'<'=29 +'&&'=30 +'||'=31 +'!'=32 +'++'=33 +'--'=34 +' |'=35 +'|'=36 +'<<'=37 +'true'=38 +'false'=39 +'break'=40 +'next'=41 +'->'=42 +'+='=43 +'-='=44 +'*='=45 +'/='=46 +'%='=47 +'='=48 +'('=49 +')'=50 +'['=51 +']'=52 +'{'=53 +'}'=54 +','=55 +'.'=56 +'..'=57 +':'=58 +';'=59 diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftBaseListener.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftBaseListener.class new file mode 100644 index 0000000..07430da Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftBaseListener.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftBaseVisitor.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftBaseVisitor.class new file mode 100644 index 0000000..f5d9fc0 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftBaseVisitor.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftLexer.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftLexer.class new file mode 100644 index 0000000..9cfb3c1 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftLexer.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftLexer.interp b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftLexer.interp new file mode 100644 index 0000000..6d42009 --- /dev/null +++ b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftLexer.interp @@ -0,0 +1,212 @@ +token literal names: +null +'def' +'end' +'main' +'puts' +'push' +'len' +'return' +'if' +'else' +'elseif' +'method' +'pattern' +'match' +'loop' +'for' +'in' +'do' +'chop' +'chomp' +'+' +'-' +'*' +'/' +'==' +'!=' +'<=' +'>=' +'>' +'<' +'&&' +'||' +'!' +'++' +'--' +' |' +'|' +'<<' +'true' +'false' +'break' +'next' +'->' +'+=' +'-=' +'*=' +'/=' +'%=' +'=' +'(' +')' +'[' +']' +'{' +'}' +',' +'.' +'..' +':' +';' +null +null +null +null +null +null + +token symbolic names: +null +DEF +END +MAIN +PUTS +PUSH +LEN +RETURN +IF +ELSE +ELSEIF +METHOD +PATTERN +MATCH +LOOP +FOR +IN +DO +CHOP +CHOMP +PLUS +MINUS +MULT +DIVIDE +EQUAL +NOT_EQUAL +LESS_EQUAL_THAN +GREATER_EQUAL_THAN +GREATER_THAN +LESS_THAN +AND +OR +NOT +INCREMENT +DECREMENT +PATTERN_MATCHING_SEPARATOR +SEPARATOR +APPEND +TRUE +FALSE +BREAK +NEXT +ARROW +PLUS_ASSIGN +MINUS_ASSIGN +MULT_ASSIGN +DIVIDE_ASSIGN +MOD_ASSIGN +ASSIGN +LPAR +RPAR +LBRACK +RBRACK +LBRACE +RBRACE +COMMA +DOT +DOUBLEDOT +COLON +SEMICOLLON +INT_VALUE +FLOAT_VALUE +IDENTIFIER +STRING_VALUE +COMMENT +WS + +rule names: +DEF +END +MAIN +PUTS +PUSH +LEN +RETURN +IF +ELSE +ELSEIF +METHOD +PATTERN +MATCH +LOOP +FOR +IN +DO +CHOP +CHOMP +PLUS +MINUS +MULT +DIVIDE +EQUAL +NOT_EQUAL +LESS_EQUAL_THAN +GREATER_EQUAL_THAN +GREATER_THAN +LESS_THAN +AND +OR +NOT +INCREMENT +DECREMENT +PATTERN_MATCHING_SEPARATOR +SEPARATOR +APPEND +TRUE +FALSE +BREAK +NEXT +ARROW +PLUS_ASSIGN +MINUS_ASSIGN +MULT_ASSIGN +DIVIDE_ASSIGN +MOD_ASSIGN +ASSIGN +LPAR +RPAR +LBRACK +RBRACK +LBRACE +RBRACE +COMMA +DOT +DOUBLEDOT +COLON +SEMICOLLON +INT_VALUE +FLOAT_VALUE +IDENTIFIER +STRING_VALUE +COMMENT +WS + +channel names: +DEFAULT_TOKEN_CHANNEL +HIDDEN + +mode names: +DEFAULT_MODE + +atn: +[4, 0, 65, 411, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 20, 1, 20, 1, 21, 1, 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, 47, 1, 47, 1, 48, 1, 48, 1, 49, 1, 49, 1, 50, 1, 50, 1, 51, 1, 51, 1, 52, 1, 52, 1, 53, 1, 53, 1, 54, 1, 54, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 5, 59, 345, 8, 59, 10, 59, 12, 59, 348, 9, 59, 3, 59, 350, 8, 59, 1, 60, 5, 60, 353, 8, 60, 10, 60, 12, 60, 356, 9, 60, 1, 60, 1, 60, 4, 60, 360, 8, 60, 11, 60, 12, 60, 361, 1, 61, 1, 61, 5, 61, 366, 8, 61, 10, 61, 12, 61, 369, 9, 61, 1, 62, 1, 62, 5, 62, 373, 8, 62, 10, 62, 12, 62, 376, 9, 62, 1, 62, 1, 62, 1, 63, 1, 63, 5, 63, 382, 8, 63, 10, 63, 12, 63, 385, 9, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 5, 63, 395, 8, 63, 10, 63, 12, 63, 398, 9, 63, 1, 63, 1, 63, 1, 63, 1, 63, 3, 63, 404, 8, 63, 1, 63, 1, 63, 1, 64, 1, 64, 1, 64, 1, 64, 1, 396, 0, 65, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 47, 95, 48, 97, 49, 99, 50, 101, 51, 103, 52, 105, 53, 107, 54, 109, 55, 111, 56, 113, 57, 115, 58, 117, 59, 119, 60, 121, 61, 123, 62, 125, 63, 127, 64, 129, 65, 1, 0, 7, 1, 0, 49, 57, 1, 0, 48, 57, 3, 0, 65, 90, 95, 95, 97, 122, 4, 0, 48, 57, 65, 90, 95, 95, 97, 122, 1, 0, 34, 34, 2, 0, 10, 10, 13, 13, 3, 0, 9, 10, 13, 13, 32, 32, 419, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, 0, 0, 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 119, 1, 0, 0, 0, 0, 121, 1, 0, 0, 0, 0, 123, 1, 0, 0, 0, 0, 125, 1, 0, 0, 0, 0, 127, 1, 0, 0, 0, 0, 129, 1, 0, 0, 0, 1, 131, 1, 0, 0, 0, 3, 135, 1, 0, 0, 0, 5, 139, 1, 0, 0, 0, 7, 144, 1, 0, 0, 0, 9, 149, 1, 0, 0, 0, 11, 154, 1, 0, 0, 0, 13, 158, 1, 0, 0, 0, 15, 165, 1, 0, 0, 0, 17, 168, 1, 0, 0, 0, 19, 173, 1, 0, 0, 0, 21, 180, 1, 0, 0, 0, 23, 187, 1, 0, 0, 0, 25, 195, 1, 0, 0, 0, 27, 201, 1, 0, 0, 0, 29, 206, 1, 0, 0, 0, 31, 210, 1, 0, 0, 0, 33, 213, 1, 0, 0, 0, 35, 216, 1, 0, 0, 0, 37, 221, 1, 0, 0, 0, 39, 227, 1, 0, 0, 0, 41, 229, 1, 0, 0, 0, 43, 231, 1, 0, 0, 0, 45, 233, 1, 0, 0, 0, 47, 235, 1, 0, 0, 0, 49, 238, 1, 0, 0, 0, 51, 241, 1, 0, 0, 0, 53, 244, 1, 0, 0, 0, 55, 247, 1, 0, 0, 0, 57, 249, 1, 0, 0, 0, 59, 251, 1, 0, 0, 0, 61, 254, 1, 0, 0, 0, 63, 257, 1, 0, 0, 0, 65, 259, 1, 0, 0, 0, 67, 262, 1, 0, 0, 0, 69, 265, 1, 0, 0, 0, 71, 271, 1, 0, 0, 0, 73, 273, 1, 0, 0, 0, 75, 276, 1, 0, 0, 0, 77, 281, 1, 0, 0, 0, 79, 287, 1, 0, 0, 0, 81, 293, 1, 0, 0, 0, 83, 298, 1, 0, 0, 0, 85, 301, 1, 0, 0, 0, 87, 304, 1, 0, 0, 0, 89, 307, 1, 0, 0, 0, 91, 310, 1, 0, 0, 0, 93, 313, 1, 0, 0, 0, 95, 316, 1, 0, 0, 0, 97, 318, 1, 0, 0, 0, 99, 320, 1, 0, 0, 0, 101, 322, 1, 0, 0, 0, 103, 324, 1, 0, 0, 0, 105, 326, 1, 0, 0, 0, 107, 328, 1, 0, 0, 0, 109, 330, 1, 0, 0, 0, 111, 332, 1, 0, 0, 0, 113, 334, 1, 0, 0, 0, 115, 337, 1, 0, 0, 0, 117, 339, 1, 0, 0, 0, 119, 349, 1, 0, 0, 0, 121, 354, 1, 0, 0, 0, 123, 363, 1, 0, 0, 0, 125, 370, 1, 0, 0, 0, 127, 403, 1, 0, 0, 0, 129, 407, 1, 0, 0, 0, 131, 132, 5, 100, 0, 0, 132, 133, 5, 101, 0, 0, 133, 134, 5, 102, 0, 0, 134, 2, 1, 0, 0, 0, 135, 136, 5, 101, 0, 0, 136, 137, 5, 110, 0, 0, 137, 138, 5, 100, 0, 0, 138, 4, 1, 0, 0, 0, 139, 140, 5, 109, 0, 0, 140, 141, 5, 97, 0, 0, 141, 142, 5, 105, 0, 0, 142, 143, 5, 110, 0, 0, 143, 6, 1, 0, 0, 0, 144, 145, 5, 112, 0, 0, 145, 146, 5, 117, 0, 0, 146, 147, 5, 116, 0, 0, 147, 148, 5, 115, 0, 0, 148, 8, 1, 0, 0, 0, 149, 150, 5, 112, 0, 0, 150, 151, 5, 117, 0, 0, 151, 152, 5, 115, 0, 0, 152, 153, 5, 104, 0, 0, 153, 10, 1, 0, 0, 0, 154, 155, 5, 108, 0, 0, 155, 156, 5, 101, 0, 0, 156, 157, 5, 110, 0, 0, 157, 12, 1, 0, 0, 0, 158, 159, 5, 114, 0, 0, 159, 160, 5, 101, 0, 0, 160, 161, 5, 116, 0, 0, 161, 162, 5, 117, 0, 0, 162, 163, 5, 114, 0, 0, 163, 164, 5, 110, 0, 0, 164, 14, 1, 0, 0, 0, 165, 166, 5, 105, 0, 0, 166, 167, 5, 102, 0, 0, 167, 16, 1, 0, 0, 0, 168, 169, 5, 101, 0, 0, 169, 170, 5, 108, 0, 0, 170, 171, 5, 115, 0, 0, 171, 172, 5, 101, 0, 0, 172, 18, 1, 0, 0, 0, 173, 174, 5, 101, 0, 0, 174, 175, 5, 108, 0, 0, 175, 176, 5, 115, 0, 0, 176, 177, 5, 101, 0, 0, 177, 178, 5, 105, 0, 0, 178, 179, 5, 102, 0, 0, 179, 20, 1, 0, 0, 0, 180, 181, 5, 109, 0, 0, 181, 182, 5, 101, 0, 0, 182, 183, 5, 116, 0, 0, 183, 184, 5, 104, 0, 0, 184, 185, 5, 111, 0, 0, 185, 186, 5, 100, 0, 0, 186, 22, 1, 0, 0, 0, 187, 188, 5, 112, 0, 0, 188, 189, 5, 97, 0, 0, 189, 190, 5, 116, 0, 0, 190, 191, 5, 116, 0, 0, 191, 192, 5, 101, 0, 0, 192, 193, 5, 114, 0, 0, 193, 194, 5, 110, 0, 0, 194, 24, 1, 0, 0, 0, 195, 196, 5, 109, 0, 0, 196, 197, 5, 97, 0, 0, 197, 198, 5, 116, 0, 0, 198, 199, 5, 99, 0, 0, 199, 200, 5, 104, 0, 0, 200, 26, 1, 0, 0, 0, 201, 202, 5, 108, 0, 0, 202, 203, 5, 111, 0, 0, 203, 204, 5, 111, 0, 0, 204, 205, 5, 112, 0, 0, 205, 28, 1, 0, 0, 0, 206, 207, 5, 102, 0, 0, 207, 208, 5, 111, 0, 0, 208, 209, 5, 114, 0, 0, 209, 30, 1, 0, 0, 0, 210, 211, 5, 105, 0, 0, 211, 212, 5, 110, 0, 0, 212, 32, 1, 0, 0, 0, 213, 214, 5, 100, 0, 0, 214, 215, 5, 111, 0, 0, 215, 34, 1, 0, 0, 0, 216, 217, 5, 99, 0, 0, 217, 218, 5, 104, 0, 0, 218, 219, 5, 111, 0, 0, 219, 220, 5, 112, 0, 0, 220, 36, 1, 0, 0, 0, 221, 222, 5, 99, 0, 0, 222, 223, 5, 104, 0, 0, 223, 224, 5, 111, 0, 0, 224, 225, 5, 109, 0, 0, 225, 226, 5, 112, 0, 0, 226, 38, 1, 0, 0, 0, 227, 228, 5, 43, 0, 0, 228, 40, 1, 0, 0, 0, 229, 230, 5, 45, 0, 0, 230, 42, 1, 0, 0, 0, 231, 232, 5, 42, 0, 0, 232, 44, 1, 0, 0, 0, 233, 234, 5, 47, 0, 0, 234, 46, 1, 0, 0, 0, 235, 236, 5, 61, 0, 0, 236, 237, 5, 61, 0, 0, 237, 48, 1, 0, 0, 0, 238, 239, 5, 33, 0, 0, 239, 240, 5, 61, 0, 0, 240, 50, 1, 0, 0, 0, 241, 242, 5, 60, 0, 0, 242, 243, 5, 61, 0, 0, 243, 52, 1, 0, 0, 0, 244, 245, 5, 62, 0, 0, 245, 246, 5, 61, 0, 0, 246, 54, 1, 0, 0, 0, 247, 248, 5, 62, 0, 0, 248, 56, 1, 0, 0, 0, 249, 250, 5, 60, 0, 0, 250, 58, 1, 0, 0, 0, 251, 252, 5, 38, 0, 0, 252, 253, 5, 38, 0, 0, 253, 60, 1, 0, 0, 0, 254, 255, 5, 124, 0, 0, 255, 256, 5, 124, 0, 0, 256, 62, 1, 0, 0, 0, 257, 258, 5, 33, 0, 0, 258, 64, 1, 0, 0, 0, 259, 260, 5, 43, 0, 0, 260, 261, 5, 43, 0, 0, 261, 66, 1, 0, 0, 0, 262, 263, 5, 45, 0, 0, 263, 264, 5, 45, 0, 0, 264, 68, 1, 0, 0, 0, 265, 266, 5, 32, 0, 0, 266, 267, 5, 32, 0, 0, 267, 268, 5, 32, 0, 0, 268, 269, 5, 32, 0, 0, 269, 270, 5, 124, 0, 0, 270, 70, 1, 0, 0, 0, 271, 272, 5, 124, 0, 0, 272, 72, 1, 0, 0, 0, 273, 274, 5, 60, 0, 0, 274, 275, 5, 60, 0, 0, 275, 74, 1, 0, 0, 0, 276, 277, 5, 116, 0, 0, 277, 278, 5, 114, 0, 0, 278, 279, 5, 117, 0, 0, 279, 280, 5, 101, 0, 0, 280, 76, 1, 0, 0, 0, 281, 282, 5, 102, 0, 0, 282, 283, 5, 97, 0, 0, 283, 284, 5, 108, 0, 0, 284, 285, 5, 115, 0, 0, 285, 286, 5, 101, 0, 0, 286, 78, 1, 0, 0, 0, 287, 288, 5, 98, 0, 0, 288, 289, 5, 114, 0, 0, 289, 290, 5, 101, 0, 0, 290, 291, 5, 97, 0, 0, 291, 292, 5, 107, 0, 0, 292, 80, 1, 0, 0, 0, 293, 294, 5, 110, 0, 0, 294, 295, 5, 101, 0, 0, 295, 296, 5, 120, 0, 0, 296, 297, 5, 116, 0, 0, 297, 82, 1, 0, 0, 0, 298, 299, 5, 45, 0, 0, 299, 300, 5, 62, 0, 0, 300, 84, 1, 0, 0, 0, 301, 302, 5, 43, 0, 0, 302, 303, 5, 61, 0, 0, 303, 86, 1, 0, 0, 0, 304, 305, 5, 45, 0, 0, 305, 306, 5, 61, 0, 0, 306, 88, 1, 0, 0, 0, 307, 308, 5, 42, 0, 0, 308, 309, 5, 61, 0, 0, 309, 90, 1, 0, 0, 0, 310, 311, 5, 47, 0, 0, 311, 312, 5, 61, 0, 0, 312, 92, 1, 0, 0, 0, 313, 314, 5, 37, 0, 0, 314, 315, 5, 61, 0, 0, 315, 94, 1, 0, 0, 0, 316, 317, 5, 61, 0, 0, 317, 96, 1, 0, 0, 0, 318, 319, 5, 40, 0, 0, 319, 98, 1, 0, 0, 0, 320, 321, 5, 41, 0, 0, 321, 100, 1, 0, 0, 0, 322, 323, 5, 91, 0, 0, 323, 102, 1, 0, 0, 0, 324, 325, 5, 93, 0, 0, 325, 104, 1, 0, 0, 0, 326, 327, 5, 123, 0, 0, 327, 106, 1, 0, 0, 0, 328, 329, 5, 125, 0, 0, 329, 108, 1, 0, 0, 0, 330, 331, 5, 44, 0, 0, 331, 110, 1, 0, 0, 0, 332, 333, 5, 46, 0, 0, 333, 112, 1, 0, 0, 0, 334, 335, 5, 46, 0, 0, 335, 336, 5, 46, 0, 0, 336, 114, 1, 0, 0, 0, 337, 338, 5, 58, 0, 0, 338, 116, 1, 0, 0, 0, 339, 340, 5, 59, 0, 0, 340, 118, 1, 0, 0, 0, 341, 350, 5, 48, 0, 0, 342, 346, 7, 0, 0, 0, 343, 345, 7, 1, 0, 0, 344, 343, 1, 0, 0, 0, 345, 348, 1, 0, 0, 0, 346, 344, 1, 0, 0, 0, 346, 347, 1, 0, 0, 0, 347, 350, 1, 0, 0, 0, 348, 346, 1, 0, 0, 0, 349, 341, 1, 0, 0, 0, 349, 342, 1, 0, 0, 0, 350, 120, 1, 0, 0, 0, 351, 353, 7, 1, 0, 0, 352, 351, 1, 0, 0, 0, 353, 356, 1, 0, 0, 0, 354, 352, 1, 0, 0, 0, 354, 355, 1, 0, 0, 0, 355, 357, 1, 0, 0, 0, 356, 354, 1, 0, 0, 0, 357, 359, 5, 46, 0, 0, 358, 360, 7, 1, 0, 0, 359, 358, 1, 0, 0, 0, 360, 361, 1, 0, 0, 0, 361, 359, 1, 0, 0, 0, 361, 362, 1, 0, 0, 0, 362, 122, 1, 0, 0, 0, 363, 367, 7, 2, 0, 0, 364, 366, 7, 3, 0, 0, 365, 364, 1, 0, 0, 0, 366, 369, 1, 0, 0, 0, 367, 365, 1, 0, 0, 0, 367, 368, 1, 0, 0, 0, 368, 124, 1, 0, 0, 0, 369, 367, 1, 0, 0, 0, 370, 374, 5, 34, 0, 0, 371, 373, 8, 4, 0, 0, 372, 371, 1, 0, 0, 0, 373, 376, 1, 0, 0, 0, 374, 372, 1, 0, 0, 0, 374, 375, 1, 0, 0, 0, 375, 377, 1, 0, 0, 0, 376, 374, 1, 0, 0, 0, 377, 378, 5, 34, 0, 0, 378, 126, 1, 0, 0, 0, 379, 383, 5, 35, 0, 0, 380, 382, 8, 5, 0, 0, 381, 380, 1, 0, 0, 0, 382, 385, 1, 0, 0, 0, 383, 381, 1, 0, 0, 0, 383, 384, 1, 0, 0, 0, 384, 404, 1, 0, 0, 0, 385, 383, 1, 0, 0, 0, 386, 387, 5, 61, 0, 0, 387, 388, 5, 98, 0, 0, 388, 389, 5, 101, 0, 0, 389, 390, 5, 103, 0, 0, 390, 391, 5, 105, 0, 0, 391, 392, 5, 110, 0, 0, 392, 396, 1, 0, 0, 0, 393, 395, 9, 0, 0, 0, 394, 393, 1, 0, 0, 0, 395, 398, 1, 0, 0, 0, 396, 397, 1, 0, 0, 0, 396, 394, 1, 0, 0, 0, 397, 399, 1, 0, 0, 0, 398, 396, 1, 0, 0, 0, 399, 400, 5, 61, 0, 0, 400, 401, 5, 101, 0, 0, 401, 402, 5, 110, 0, 0, 402, 404, 5, 100, 0, 0, 403, 379, 1, 0, 0, 0, 403, 386, 1, 0, 0, 0, 404, 405, 1, 0, 0, 0, 405, 406, 6, 63, 0, 0, 406, 128, 1, 0, 0, 0, 407, 408, 7, 6, 0, 0, 408, 409, 1, 0, 0, 0, 409, 410, 6, 64, 0, 0, 410, 130, 1, 0, 0, 0, 10, 0, 346, 349, 354, 361, 367, 374, 383, 396, 403, 1, 6, 0, 0] \ No newline at end of file diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftLexer.tokens b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftLexer.tokens new file mode 100644 index 0000000..c103028 --- /dev/null +++ b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftLexer.tokens @@ -0,0 +1,124 @@ +DEF=1 +END=2 +MAIN=3 +PUTS=4 +PUSH=5 +LEN=6 +RETURN=7 +IF=8 +ELSE=9 +ELSEIF=10 +METHOD=11 +PATTERN=12 +MATCH=13 +LOOP=14 +FOR=15 +IN=16 +DO=17 +CHOP=18 +CHOMP=19 +PLUS=20 +MINUS=21 +MULT=22 +DIVIDE=23 +EQUAL=24 +NOT_EQUAL=25 +LESS_EQUAL_THAN=26 +GREATER_EQUAL_THAN=27 +GREATER_THAN=28 +LESS_THAN=29 +AND=30 +OR=31 +NOT=32 +INCREMENT=33 +DECREMENT=34 +PATTERN_MATCHING_SEPARATOR=35 +SEPARATOR=36 +APPEND=37 +TRUE=38 +FALSE=39 +BREAK=40 +NEXT=41 +ARROW=42 +PLUS_ASSIGN=43 +MINUS_ASSIGN=44 +MULT_ASSIGN=45 +DIVIDE_ASSIGN=46 +MOD_ASSIGN=47 +ASSIGN=48 +LPAR=49 +RPAR=50 +LBRACK=51 +RBRACK=52 +LBRACE=53 +RBRACE=54 +COMMA=55 +DOT=56 +DOUBLEDOT=57 +COLON=58 +SEMICOLLON=59 +INT_VALUE=60 +FLOAT_VALUE=61 +IDENTIFIER=62 +STRING_VALUE=63 +COMMENT=64 +WS=65 +'def'=1 +'end'=2 +'main'=3 +'puts'=4 +'push'=5 +'len'=6 +'return'=7 +'if'=8 +'else'=9 +'elseif'=10 +'method'=11 +'pattern'=12 +'match'=13 +'loop'=14 +'for'=15 +'in'=16 +'do'=17 +'chop'=18 +'chomp'=19 +'+'=20 +'-'=21 +'*'=22 +'/'=23 +'=='=24 +'!='=25 +'<='=26 +'>='=27 +'>'=28 +'<'=29 +'&&'=30 +'||'=31 +'!'=32 +'++'=33 +'--'=34 +' |'=35 +'|'=36 +'<<'=37 +'true'=38 +'false'=39 +'break'=40 +'next'=41 +'->'=42 +'+='=43 +'-='=44 +'*='=45 +'/='=46 +'%='=47 +'='=48 +'('=49 +')'=50 +'['=51 +']'=52 +'{'=53 +'}'=54 +','=55 +'.'=56 +'..'=57 +':'=58 +';'=59 diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftListener.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftListener.class new file mode 100644 index 0000000..9efc86c Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftListener.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$AccessExpressionContext.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$AccessExpressionContext.class new file mode 100644 index 0000000..3f0cfc3 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$AccessExpressionContext.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$AccessListContext.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$AccessListContext.class new file mode 100644 index 0000000..cbc95b7 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$AccessListContext.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$AdditiveExpressionContext.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$AdditiveExpressionContext.class new file mode 100644 index 0000000..75c2df3 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$AdditiveExpressionContext.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$AssignmentContext.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$AssignmentContext.class new file mode 100644 index 0000000..4e96743 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$AssignmentContext.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$BodyContext.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$BodyContext.class new file mode 100644 index 0000000..2726d04 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$BodyContext.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$BoolValueContext.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$BoolValueContext.class new file mode 100644 index 0000000..36bb838 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$BoolValueContext.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$ChompStatementContext.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$ChompStatementContext.class new file mode 100644 index 0000000..45bb05f Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$ChompStatementContext.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$ChopStatementContext.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$ChopStatementContext.class new file mode 100644 index 0000000..4a9b2d5 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$ChopStatementContext.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$ConditionContext.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$ConditionContext.class new file mode 100644 index 0000000..77ee98f Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$ConditionContext.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$EqaulityExpressionContext.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$EqaulityExpressionContext.class new file mode 100644 index 0000000..14e8f59 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$EqaulityExpressionContext.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$ExpressionContext.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$ExpressionContext.class new file mode 100644 index 0000000..8327541 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$ExpressionContext.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$FilterStatementContext.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$FilterStatementContext.class new file mode 100644 index 0000000..57ec9ad Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$FilterStatementContext.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$ForStatementContext.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$ForStatementContext.class new file mode 100644 index 0000000..8035370 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$ForStatementContext.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$FunctionArgumentsContext.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$FunctionArgumentsContext.class new file mode 100644 index 0000000..2ae14e9 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$FunctionArgumentsContext.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$FunctionArgumentsDeclarationContext.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$FunctionArgumentsDeclarationContext.class new file mode 100644 index 0000000..dd4406a Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$FunctionArgumentsDeclarationContext.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$FunctionDeclarationContext.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$FunctionDeclarationContext.class new file mode 100644 index 0000000..70886e0 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$FunctionDeclarationContext.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$FunctionPointerContext.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$FunctionPointerContext.class new file mode 100644 index 0000000..a75f379 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$FunctionPointerContext.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$IfStatementContext.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$IfStatementContext.class new file mode 100644 index 0000000..1b58919 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$IfStatementContext.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$LambdaFunctionContext.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$LambdaFunctionContext.class new file mode 100644 index 0000000..da26418 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$LambdaFunctionContext.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$LenStatementContext.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$LenStatementContext.class new file mode 100644 index 0000000..581d871 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$LenStatementContext.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$ListValueContext.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$ListValueContext.class new file mode 100644 index 0000000..7496fc7 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$ListValueContext.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$LoopBodyContext.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$LoopBodyContext.class new file mode 100644 index 0000000..c233c51 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$LoopBodyContext.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$LoopDoStatementContext.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$LoopDoStatementContext.class new file mode 100644 index 0000000..53cd75d Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$LoopDoStatementContext.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$MainContext.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$MainContext.class new file mode 100644 index 0000000..6d8f4e1 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$MainContext.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$MatchPatternStatementContext.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$MatchPatternStatementContext.class new file mode 100644 index 0000000..3edb01f Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$MatchPatternStatementContext.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$MultiplicativeExpressionContext.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$MultiplicativeExpressionContext.class new file mode 100644 index 0000000..0b9e3b5 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$MultiplicativeExpressionContext.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$OtherExpressionContext.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$OtherExpressionContext.class new file mode 100644 index 0000000..777a951 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$OtherExpressionContext.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$PatternMatchingContext.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$PatternMatchingContext.class new file mode 100644 index 0000000..b9a8e3e Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$PatternMatchingContext.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$PreUnaryExpressionContext.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$PreUnaryExpressionContext.class new file mode 100644 index 0000000..c657b8a Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$PreUnaryExpressionContext.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$ProgramContext.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$ProgramContext.class new file mode 100644 index 0000000..f0067a8 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$ProgramContext.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$PushStatementContext.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$PushStatementContext.class new file mode 100644 index 0000000..7e355c6 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$PushStatementContext.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$PutsStatementContext.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$PutsStatementContext.class new file mode 100644 index 0000000..c25d558 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$PutsStatementContext.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$RangeContext.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$RangeContext.class new file mode 100644 index 0000000..a7933f1 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$RangeContext.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$RelationalExpressionContext.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$RelationalExpressionContext.class new file mode 100644 index 0000000..d0231f6 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$RelationalExpressionContext.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$ReturnStatementContext.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$ReturnStatementContext.class new file mode 100644 index 0000000..b760dfb Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$ReturnStatementContext.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$StatementContext.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$StatementContext.class new file mode 100644 index 0000000..4469db7 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$StatementContext.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$ValuesContext.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$ValuesContext.class new file mode 100644 index 0000000..bfa2346 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser$ValuesContext.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser.class new file mode 100644 index 0000000..3ee580e Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftParser.class differ diff --git a/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftVisitor.class b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftVisitor.class new file mode 100644 index 0000000..7048a92 Binary files /dev/null and b/Phase2Template/out/production/Phase2Template/parsers/FunctionCraftVisitor.class differ diff --git a/Sources/Jepeto/2021-Spring(Jepeto)/plc-spring1400-jepeto/.idea/vcs.xml b/Sources/Jepeto/2021-Spring(Jepeto)/plc-spring1400-jepeto/.idea/vcs.xml index 35eb1dd..13b0196 100644 --- a/Sources/Jepeto/2021-Spring(Jepeto)/plc-spring1400-jepeto/.idea/vcs.xml +++ b/Sources/Jepeto/2021-Spring(Jepeto)/plc-spring1400-jepeto/.idea/vcs.xml @@ -2,5 +2,6 @@ + \ No newline at end of file diff --git a/Sources/Jepeto/Delivery_phase3/.idea/.gitignore b/Sources/Jepeto/Delivery_phase3/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/Sources/Jepeto/Delivery_phase3/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/Sources/Jepeto/Delivery_phase3/.idea/Delivery_phase3.iml b/Sources/Jepeto/Delivery_phase3/.idea/Delivery_phase3.iml new file mode 100644 index 0000000..d6ebd48 --- /dev/null +++ b/Sources/Jepeto/Delivery_phase3/.idea/Delivery_phase3.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/Sources/Jepeto/Delivery_phase3/.idea/libraries/Delivery_phase3.xml b/Sources/Jepeto/Delivery_phase3/.idea/libraries/Delivery_phase3.xml new file mode 100644 index 0000000..eb58209 --- /dev/null +++ b/Sources/Jepeto/Delivery_phase3/.idea/libraries/Delivery_phase3.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/Sources/Jepeto/Delivery_phase3/.idea/misc.xml b/Sources/Jepeto/Delivery_phase3/.idea/misc.xml new file mode 100644 index 0000000..6f29fee --- /dev/null +++ b/Sources/Jepeto/Delivery_phase3/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Sources/Jepeto/Delivery_phase3/.idea/modules.xml b/Sources/Jepeto/Delivery_phase3/.idea/modules.xml new file mode 100644 index 0000000..843b0e2 --- /dev/null +++ b/Sources/Jepeto/Delivery_phase3/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/Sources/Jepeto/Delivery_phase3/.idea/vcs.xml b/Sources/Jepeto/Delivery_phase3/.idea/vcs.xml new file mode 100644 index 0000000..c2365ab --- /dev/null +++ b/Sources/Jepeto/Delivery_phase3/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file