From: Patrick Schönberger Date: Sat, 31 Jul 2021 21:18:40 +0000 (+0200) Subject: compile again X-Git-Url: https://gitweb.ps.run/toc/commitdiff_plain/9f5457a18f551d261e4bd380ea16a52dc5b04cf9 compile again --- diff --git a/Toc.g4 b/Toc.g4 index 631e2c3..2170321 100644 --- a/Toc.g4 +++ b/Toc.g4 @@ -37,10 +37,13 @@ stmt: varDecl | returnStmt | expr; -ifStmt: 'if' expr body ('else' 'if' expr body)* ('else' body)?; +ifStmt: 'if' expr body elseIfStmt* elseStmt?; +elseIfStmt: 'else' 'if' expr body; +elseStmt: 'else' body; switchStmt: 'switch' identifierExpr switchBody; -switchBody: '{' ('case' expr body)* '}'; +switchBody: '{' switchCase* '}'; +switchCase: 'case' expr body; forStmt: 'for' (varInit | assignStmt) ',' expr ',' expr body; @@ -72,16 +75,19 @@ nonAccessExpr: funcExpr funcExpr: funcName '(' (expr (',' expr)*)? ')'; opExpr: binaryOp | prefixOp | postfixOp | ternaryOp; -binaryOp: nonOpExpr BINARY_OP nonOpExpr (BINARY_OP nonOpExpr)*; -prefixOp: PREFIX_OP nonOpExpr; -postfixOp: nonOpExpr POSTFIX_OP; +binaryOp: nonOpExpr binary_op nonOpExpr (binary_op nonOpExpr)*; +prefixOp: prefix_op nonOpExpr; +postfixOp: nonOpExpr postfix_op; ternaryOp: nonOpExpr '?' expr ':' expr; identifierExpr: varName; litExpr: INT_LIT | DECIMAL_LIT | STRING_LIT | BOOL_LIT; -accessExpr: nonAccessExpr ((('.' | '->') identifierExpr) | ('[' expr ']'))+; +accessExpr: nonAccessExpr (accessSubExpr)+; +accessSubExpr: accessMember | accessBrackets; +accessMember: ('.' | '->') identifierExpr; +accessBrackets: '[' expr ']'; parenExpr: '(' expr ')'; @@ -91,12 +97,12 @@ typeName: NAME; structName: NAME; -POSTFIX_OP: +postfix_op: '++' | '--'; -PREFIX_OP: - [+!~&*-] | POSTFIX_OP; -BINARY_OP: - [+*/%&<|^>-] | +prefix_op: + '+' | '-' | '!' | '~' | '&' | '*' | postfix_op; +binary_op: + '+' | '-' | '*' | '/' | '%' | '&' | '<' | '|' | '^' | '>' | '==' | '!=' | '<=' | '>=' | '<' | '>' | '<<' | '>>' | '||' | '&&' | '&=' | '|=' | '^=' | '<<=' | '>>=' | '+=' | '-=' | '*=' | '/=' | '%='; diff --git a/gen/Toc.interp b/gen/Toc.interp index 5da1799..f161181 100644 --- a/gen/Toc.interp +++ b/gen/Toc.interp @@ -23,6 +23,67 @@ null '?' '.' '->' +'++' +'--' +'+' +'-' +'!' +'~' +'&' +'/' +'%' +'<' +'|' +'^' +'>' +'==' +'!=' +'<=' +'>=' +'<<' +'>>' +'||' +'&&' +'&=' +'|=' +'^=' +'<<=' +'>>=' +'+=' +'-=' +'*=' +'/=' +'%=' +null +null +null +null +null +null +null +null + +token symbolic names: +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null null null null @@ -34,8 +95,6 @@ null null null null - -token symbolic names: null null null @@ -60,9 +119,6 @@ null null null null -POSTFIX_OP -PREFIX_OP -BINARY_OP INT_LIT DECIMAL_LIT STRING_LIT @@ -90,8 +146,11 @@ structVar structMethod stmt ifStmt +elseIfStmt +elseStmt switchStmt switchBody +switchCase forStmt whileStmt assignStmt @@ -108,12 +167,18 @@ ternaryOp identifierExpr litExpr accessExpr +accessSubExpr +accessMember +accessBrackets parenExpr funcName varName typeName structName +postfix_op +prefix_op +binary_op atn: -[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 36, 332, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 3, 2, 6, 2, 84, 10, 2, 13, 2, 14, 2, 85, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 5, 3, 93, 10, 3, 3, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 5, 5, 104, 10, 5, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 7, 3, 7, 7, 7, 115, 10, 7, 12, 7, 14, 7, 118, 11, 7, 3, 8, 3, 8, 3, 8, 5, 8, 123, 10, 8, 3, 8, 5, 8, 126, 10, 8, 3, 9, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 7, 11, 143, 10, 11, 12, 11, 14, 11, 146, 11, 11, 5, 11, 148, 10, 11, 3, 12, 3, 12, 7, 12, 152, 10, 12, 12, 12, 14, 12, 155, 11, 12, 3, 12, 3, 12, 3, 13, 3, 13, 3, 13, 3, 13, 7, 13, 163, 10, 13, 12, 13, 14, 13, 166, 11, 13, 3, 13, 3, 13, 3, 14, 3, 14, 5, 14, 172, 10, 14, 3, 15, 3, 15, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 5, 17, 186, 10, 17, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 7, 18, 196, 10, 18, 12, 18, 14, 18, 199, 11, 18, 3, 18, 3, 18, 5, 18, 203, 10, 18, 3, 19, 3, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 7, 20, 214, 10, 20, 12, 20, 14, 20, 217, 11, 20, 3, 20, 3, 20, 3, 21, 3, 21, 3, 21, 5, 21, 224, 10, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 22, 3, 22, 3, 22, 3, 22, 3, 23, 3, 23, 3, 23, 3, 23, 3, 24, 3, 24, 3, 24, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 5, 25, 249, 10, 25, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 5, 26, 256, 10, 26, 3, 27, 3, 27, 3, 27, 5, 27, 261, 10, 27, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 7, 28, 268, 10, 28, 12, 28, 14, 28, 271, 11, 28, 5, 28, 273, 10, 28, 3, 28, 3, 28, 3, 29, 3, 29, 3, 29, 3, 29, 5, 29, 281, 10, 29, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 7, 30, 288, 10, 30, 12, 30, 14, 30, 291, 11, 30, 3, 31, 3, 31, 3, 31, 3, 32, 3, 32, 3, 32, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 34, 3, 34, 3, 35, 3, 35, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 6, 36, 316, 10, 36, 13, 36, 14, 36, 317, 3, 37, 3, 37, 3, 37, 3, 37, 3, 38, 3, 38, 3, 39, 3, 39, 3, 40, 3, 40, 3, 41, 3, 41, 3, 41, 2, 2, 42, 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, 74, 76, 78, 80, 2, 4, 3, 2, 29, 32, 3, 2, 24, 25, 2, 333, 2, 83, 3, 2, 2, 2, 4, 92, 3, 2, 2, 2, 6, 94, 3, 2, 2, 2, 8, 97, 3, 2, 2, 2, 10, 105, 3, 2, 2, 2, 12, 112, 3, 2, 2, 2, 14, 125, 3, 2, 2, 2, 16, 127, 3, 2, 2, 2, 18, 130, 3, 2, 2, 2, 20, 147, 3, 2, 2, 2, 22, 149, 3, 2, 2, 2, 24, 158, 3, 2, 2, 2, 26, 171, 3, 2, 2, 2, 28, 173, 3, 2, 2, 2, 30, 175, 3, 2, 2, 2, 32, 185, 3, 2, 2, 2, 34, 187, 3, 2, 2, 2, 36, 204, 3, 2, 2, 2, 38, 208, 3, 2, 2, 2, 40, 220, 3, 2, 2, 2, 42, 231, 3, 2, 2, 2, 44, 235, 3, 2, 2, 2, 46, 239, 3, 2, 2, 2, 48, 248, 3, 2, 2, 2, 50, 255, 3, 2, 2, 2, 52, 260, 3, 2, 2, 2, 54, 262, 3, 2, 2, 2, 56, 280, 3, 2, 2, 2, 58, 282, 3, 2, 2, 2, 60, 292, 3, 2, 2, 2, 62, 295, 3, 2, 2, 2, 64, 298, 3, 2, 2, 2, 66, 304, 3, 2, 2, 2, 68, 306, 3, 2, 2, 2, 70, 308, 3, 2, 2, 2, 72, 319, 3, 2, 2, 2, 74, 323, 3, 2, 2, 2, 76, 325, 3, 2, 2, 2, 78, 327, 3, 2, 2, 2, 80, 329, 3, 2, 2, 2, 82, 84, 5, 4, 3, 2, 83, 82, 3, 2, 2, 2, 84, 85, 3, 2, 2, 2, 85, 83, 3, 2, 2, 2, 85, 86, 3, 2, 2, 2, 86, 87, 3, 2, 2, 2, 87, 88, 7, 2, 2, 3, 88, 3, 3, 2, 2, 2, 89, 93, 5, 6, 4, 2, 90, 93, 5, 16, 9, 2, 91, 93, 5, 24, 13, 2, 92, 89, 3, 2, 2, 2, 92, 90, 3, 2, 2, 2, 92, 91, 3, 2, 2, 2, 93, 5, 3, 2, 2, 2, 94, 95, 7, 3, 2, 2, 95, 96, 5, 8, 5, 2, 96, 7, 3, 2, 2, 2, 97, 98, 5, 76, 39, 2, 98, 99, 7, 4, 2, 2, 99, 100, 5, 12, 7, 2, 100, 103, 3, 2, 2, 2, 101, 102, 7, 5, 2, 2, 102, 104, 5, 48, 25, 2, 103, 101, 3, 2, 2, 2, 103, 104, 3, 2, 2, 2, 104, 9, 3, 2, 2, 2, 105, 106, 5, 76, 39, 2, 106, 107, 7, 4, 2, 2, 107, 108, 5, 12, 7, 2, 108, 109, 3, 2, 2, 2, 109, 110, 7, 5, 2, 2, 110, 111, 5, 48, 25, 2, 111, 11, 3, 2, 2, 2, 112, 116, 5, 78, 40, 2, 113, 115, 5, 14, 8, 2, 114, 113, 3, 2, 2, 2, 115, 118, 3, 2, 2, 2, 116, 114, 3, 2, 2, 2, 116, 117, 3, 2, 2, 2, 117, 13, 3, 2, 2, 2, 118, 116, 3, 2, 2, 2, 119, 126, 7, 6, 2, 2, 120, 122, 7, 7, 2, 2, 121, 123, 7, 36, 2, 2, 122, 121, 3, 2, 2, 2, 122, 123, 3, 2, 2, 2, 123, 124, 3, 2, 2, 2, 124, 126, 7, 8, 2, 2, 125, 119, 3, 2, 2, 2, 125, 120, 3, 2, 2, 2, 126, 15, 3, 2, 2, 2, 127, 128, 7, 9, 2, 2, 128, 129, 5, 18, 10, 2, 129, 17, 3, 2, 2, 2, 130, 131, 5, 74, 38, 2, 131, 132, 7, 10, 2, 2, 132, 133, 5, 20, 11, 2, 133, 134, 7, 11, 2, 2, 134, 135, 7, 4, 2, 2, 135, 136, 5, 12, 7, 2, 136, 137, 3, 2, 2, 2, 137, 138, 5, 22, 12, 2, 138, 19, 3, 2, 2, 2, 139, 144, 5, 8, 5, 2, 140, 141, 7, 12, 2, 2, 141, 143, 5, 8, 5, 2, 142, 140, 3, 2, 2, 2, 143, 146, 3, 2, 2, 2, 144, 142, 3, 2, 2, 2, 144, 145, 3, 2, 2, 2, 145, 148, 3, 2, 2, 2, 146, 144, 3, 2, 2, 2, 147, 139, 3, 2, 2, 2, 147, 148, 3, 2, 2, 2, 148, 21, 3, 2, 2, 2, 149, 153, 7, 13, 2, 2, 150, 152, 5, 32, 17, 2, 151, 150, 3, 2, 2, 2, 152, 155, 3, 2, 2, 2, 153, 151, 3, 2, 2, 2, 153, 154, 3, 2, 2, 2, 154, 156, 3, 2, 2, 2, 155, 153, 3, 2, 2, 2, 156, 157, 7, 14, 2, 2, 157, 23, 3, 2, 2, 2, 158, 159, 7, 15, 2, 2, 159, 160, 5, 80, 41, 2, 160, 164, 7, 13, 2, 2, 161, 163, 5, 26, 14, 2, 162, 161, 3, 2, 2, 2, 163, 166, 3, 2, 2, 2, 164, 162, 3, 2, 2, 2, 164, 165, 3, 2, 2, 2, 165, 167, 3, 2, 2, 2, 166, 164, 3, 2, 2, 2, 167, 168, 7, 14, 2, 2, 168, 25, 3, 2, 2, 2, 169, 172, 5, 28, 15, 2, 170, 172, 5, 30, 16, 2, 171, 169, 3, 2, 2, 2, 171, 170, 3, 2, 2, 2, 172, 27, 3, 2, 2, 2, 173, 174, 5, 8, 5, 2, 174, 29, 3, 2, 2, 2, 175, 176, 5, 18, 10, 2, 176, 31, 3, 2, 2, 2, 177, 186, 5, 6, 4, 2, 178, 186, 5, 34, 18, 2, 179, 186, 5, 36, 19, 2, 180, 186, 5, 40, 21, 2, 181, 186, 5, 42, 22, 2, 182, 186, 5, 44, 23, 2, 183, 186, 5, 46, 24, 2, 184, 186, 5, 48, 25, 2, 185, 177, 3, 2, 2, 2, 185, 178, 3, 2, 2, 2, 185, 179, 3, 2, 2, 2, 185, 180, 3, 2, 2, 2, 185, 181, 3, 2, 2, 2, 185, 182, 3, 2, 2, 2, 185, 183, 3, 2, 2, 2, 185, 184, 3, 2, 2, 2, 186, 33, 3, 2, 2, 2, 187, 188, 7, 16, 2, 2, 188, 189, 5, 48, 25, 2, 189, 197, 5, 22, 12, 2, 190, 191, 7, 17, 2, 2, 191, 192, 7, 16, 2, 2, 192, 193, 5, 48, 25, 2, 193, 194, 5, 22, 12, 2, 194, 196, 3, 2, 2, 2, 195, 190, 3, 2, 2, 2, 196, 199, 3, 2, 2, 2, 197, 195, 3, 2, 2, 2, 197, 198, 3, 2, 2, 2, 198, 202, 3, 2, 2, 2, 199, 197, 3, 2, 2, 2, 200, 201, 7, 17, 2, 2, 201, 203, 5, 22, 12, 2, 202, 200, 3, 2, 2, 2, 202, 203, 3, 2, 2, 2, 203, 35, 3, 2, 2, 2, 204, 205, 7, 18, 2, 2, 205, 206, 5, 66, 34, 2, 206, 207, 5, 38, 20, 2, 207, 37, 3, 2, 2, 2, 208, 215, 7, 13, 2, 2, 209, 210, 7, 19, 2, 2, 210, 211, 5, 48, 25, 2, 211, 212, 5, 22, 12, 2, 212, 214, 3, 2, 2, 2, 213, 209, 3, 2, 2, 2, 214, 217, 3, 2, 2, 2, 215, 213, 3, 2, 2, 2, 215, 216, 3, 2, 2, 2, 216, 218, 3, 2, 2, 2, 217, 215, 3, 2, 2, 2, 218, 219, 7, 14, 2, 2, 219, 39, 3, 2, 2, 2, 220, 223, 7, 20, 2, 2, 221, 224, 5, 10, 6, 2, 222, 224, 5, 44, 23, 2, 223, 221, 3, 2, 2, 2, 223, 222, 3, 2, 2, 2, 224, 225, 3, 2, 2, 2, 225, 226, 7, 12, 2, 2, 226, 227, 5, 48, 25, 2, 227, 228, 7, 12, 2, 2, 228, 229, 5, 48, 25, 2, 229, 230, 5, 22, 12, 2, 230, 41, 3, 2, 2, 2, 231, 232, 7, 21, 2, 2, 232, 233, 5, 48, 25, 2, 233, 234, 5, 22, 12, 2, 234, 43, 3, 2, 2, 2, 235, 236, 5, 66, 34, 2, 236, 237, 7, 5, 2, 2, 237, 238, 5, 48, 25, 2, 238, 45, 3, 2, 2, 2, 239, 240, 7, 22, 2, 2, 240, 241, 5, 48, 25, 2, 241, 47, 3, 2, 2, 2, 242, 249, 5, 54, 28, 2, 243, 249, 5, 68, 35, 2, 244, 249, 5, 66, 34, 2, 245, 249, 5, 72, 37, 2, 246, 249, 5, 70, 36, 2, 247, 249, 5, 56, 29, 2, 248, 242, 3, 2, 2, 2, 248, 243, 3, 2, 2, 2, 248, 244, 3, 2, 2, 2, 248, 245, 3, 2, 2, 2, 248, 246, 3, 2, 2, 2, 248, 247, 3, 2, 2, 2, 249, 49, 3, 2, 2, 2, 250, 256, 5, 54, 28, 2, 251, 256, 5, 68, 35, 2, 252, 256, 5, 66, 34, 2, 253, 256, 5, 72, 37, 2, 254, 256, 5, 70, 36, 2, 255, 250, 3, 2, 2, 2, 255, 251, 3, 2, 2, 2, 255, 252, 3, 2, 2, 2, 255, 253, 3, 2, 2, 2, 255, 254, 3, 2, 2, 2, 256, 51, 3, 2, 2, 2, 257, 261, 5, 54, 28, 2, 258, 261, 5, 66, 34, 2, 259, 261, 5, 72, 37, 2, 260, 257, 3, 2, 2, 2, 260, 258, 3, 2, 2, 2, 260, 259, 3, 2, 2, 2, 261, 53, 3, 2, 2, 2, 262, 263, 5, 74, 38, 2, 263, 272, 7, 10, 2, 2, 264, 269, 5, 48, 25, 2, 265, 266, 7, 12, 2, 2, 266, 268, 5, 48, 25, 2, 267, 265, 3, 2, 2, 2, 268, 271, 3, 2, 2, 2, 269, 267, 3, 2, 2, 2, 269, 270, 3, 2, 2, 2, 270, 273, 3, 2, 2, 2, 271, 269, 3, 2, 2, 2, 272, 264, 3, 2, 2, 2, 272, 273, 3, 2, 2, 2, 273, 274, 3, 2, 2, 2, 274, 275, 7, 11, 2, 2, 275, 55, 3, 2, 2, 2, 276, 281, 5, 58, 30, 2, 277, 281, 5, 60, 31, 2, 278, 281, 5, 62, 32, 2, 279, 281, 5, 64, 33, 2, 280, 276, 3, 2, 2, 2, 280, 277, 3, 2, 2, 2, 280, 278, 3, 2, 2, 2, 280, 279, 3, 2, 2, 2, 281, 57, 3, 2, 2, 2, 282, 283, 5, 50, 26, 2, 283, 284, 7, 28, 2, 2, 284, 289, 5, 50, 26, 2, 285, 286, 7, 28, 2, 2, 286, 288, 5, 50, 26, 2, 287, 285, 3, 2, 2, 2, 288, 291, 3, 2, 2, 2, 289, 287, 3, 2, 2, 2, 289, 290, 3, 2, 2, 2, 290, 59, 3, 2, 2, 2, 291, 289, 3, 2, 2, 2, 292, 293, 7, 27, 2, 2, 293, 294, 5, 50, 26, 2, 294, 61, 3, 2, 2, 2, 295, 296, 5, 50, 26, 2, 296, 297, 7, 26, 2, 2, 297, 63, 3, 2, 2, 2, 298, 299, 5, 50, 26, 2, 299, 300, 7, 23, 2, 2, 300, 301, 5, 48, 25, 2, 301, 302, 7, 4, 2, 2, 302, 303, 5, 48, 25, 2, 303, 65, 3, 2, 2, 2, 304, 305, 5, 76, 39, 2, 305, 67, 3, 2, 2, 2, 306, 307, 9, 2, 2, 2, 307, 69, 3, 2, 2, 2, 308, 315, 5, 52, 27, 2, 309, 310, 9, 3, 2, 2, 310, 316, 5, 66, 34, 2, 311, 312, 7, 7, 2, 2, 312, 313, 5, 48, 25, 2, 313, 314, 7, 8, 2, 2, 314, 316, 3, 2, 2, 2, 315, 309, 3, 2, 2, 2, 315, 311, 3, 2, 2, 2, 316, 317, 3, 2, 2, 2, 317, 315, 3, 2, 2, 2, 317, 318, 3, 2, 2, 2, 318, 71, 3, 2, 2, 2, 319, 320, 7, 10, 2, 2, 320, 321, 5, 48, 25, 2, 321, 322, 7, 11, 2, 2, 322, 73, 3, 2, 2, 2, 323, 324, 7, 33, 2, 2, 324, 75, 3, 2, 2, 2, 325, 326, 7, 33, 2, 2, 326, 77, 3, 2, 2, 2, 327, 328, 7, 33, 2, 2, 328, 79, 3, 2, 2, 2, 329, 330, 7, 33, 2, 2, 330, 81, 3, 2, 2, 2, 27, 85, 92, 103, 116, 122, 125, 144, 147, 153, 164, 171, 185, 197, 202, 215, 223, 248, 255, 260, 269, 272, 280, 289, 315, 317] \ No newline at end of file +[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 64, 374, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, 50, 9, 50, 3, 2, 6, 2, 102, 10, 2, 13, 2, 14, 2, 103, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 5, 3, 111, 10, 3, 3, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 5, 5, 122, 10, 5, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 7, 3, 7, 7, 7, 133, 10, 7, 12, 7, 14, 7, 136, 11, 7, 3, 8, 3, 8, 3, 8, 5, 8, 141, 10, 8, 3, 8, 5, 8, 144, 10, 8, 3, 9, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 7, 11, 161, 10, 11, 12, 11, 14, 11, 164, 11, 11, 5, 11, 166, 10, 11, 3, 12, 3, 12, 7, 12, 170, 10, 12, 12, 12, 14, 12, 173, 11, 12, 3, 12, 3, 12, 3, 13, 3, 13, 3, 13, 3, 13, 7, 13, 181, 10, 13, 12, 13, 14, 13, 184, 11, 13, 3, 13, 3, 13, 3, 14, 3, 14, 5, 14, 190, 10, 14, 3, 15, 3, 15, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 5, 17, 204, 10, 17, 3, 18, 3, 18, 3, 18, 3, 18, 7, 18, 210, 10, 18, 12, 18, 14, 18, 213, 11, 18, 3, 18, 5, 18, 216, 10, 18, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, 21, 3, 21, 3, 21, 3, 21, 3, 22, 3, 22, 7, 22, 232, 10, 22, 12, 22, 14, 22, 235, 11, 22, 3, 22, 3, 22, 3, 23, 3, 23, 3, 23, 3, 23, 3, 24, 3, 24, 3, 24, 5, 24, 246, 10, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 25, 3, 25, 3, 25, 3, 25, 3, 26, 3, 26, 3, 26, 3, 26, 3, 27, 3, 27, 3, 27, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 5, 28, 271, 10, 28, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 5, 29, 278, 10, 29, 3, 30, 3, 30, 3, 30, 5, 30, 283, 10, 30, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 7, 31, 290, 10, 31, 12, 31, 14, 31, 293, 11, 31, 5, 31, 295, 10, 31, 3, 31, 3, 31, 3, 32, 3, 32, 3, 32, 3, 32, 5, 32, 303, 10, 32, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 7, 33, 311, 10, 33, 12, 33, 14, 33, 314, 11, 33, 3, 34, 3, 34, 3, 34, 3, 35, 3, 35, 3, 35, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 37, 3, 37, 3, 38, 3, 38, 3, 39, 3, 39, 6, 39, 334, 10, 39, 13, 39, 14, 39, 335, 3, 40, 3, 40, 5, 40, 340, 10, 40, 3, 41, 3, 41, 3, 41, 3, 42, 3, 42, 3, 42, 3, 42, 3, 43, 3, 43, 3, 43, 3, 43, 3, 44, 3, 44, 3, 45, 3, 45, 3, 46, 3, 46, 3, 47, 3, 47, 3, 48, 3, 48, 3, 49, 3, 49, 3, 49, 3, 49, 3, 49, 3, 49, 3, 49, 5, 49, 370, 10, 49, 3, 50, 3, 50, 3, 50, 2, 2, 51, 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, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 2, 6, 3, 2, 57, 60, 3, 2, 24, 25, 3, 2, 26, 27, 5, 2, 6, 6, 28, 29, 32, 56, 2, 372, 2, 101, 3, 2, 2, 2, 4, 110, 3, 2, 2, 2, 6, 112, 3, 2, 2, 2, 8, 115, 3, 2, 2, 2, 10, 123, 3, 2, 2, 2, 12, 130, 3, 2, 2, 2, 14, 143, 3, 2, 2, 2, 16, 145, 3, 2, 2, 2, 18, 148, 3, 2, 2, 2, 20, 165, 3, 2, 2, 2, 22, 167, 3, 2, 2, 2, 24, 176, 3, 2, 2, 2, 26, 189, 3, 2, 2, 2, 28, 191, 3, 2, 2, 2, 30, 193, 3, 2, 2, 2, 32, 203, 3, 2, 2, 2, 34, 205, 3, 2, 2, 2, 36, 217, 3, 2, 2, 2, 38, 222, 3, 2, 2, 2, 40, 225, 3, 2, 2, 2, 42, 229, 3, 2, 2, 2, 44, 238, 3, 2, 2, 2, 46, 242, 3, 2, 2, 2, 48, 253, 3, 2, 2, 2, 50, 257, 3, 2, 2, 2, 52, 261, 3, 2, 2, 2, 54, 270, 3, 2, 2, 2, 56, 277, 3, 2, 2, 2, 58, 282, 3, 2, 2, 2, 60, 284, 3, 2, 2, 2, 62, 302, 3, 2, 2, 2, 64, 304, 3, 2, 2, 2, 66, 315, 3, 2, 2, 2, 68, 318, 3, 2, 2, 2, 70, 321, 3, 2, 2, 2, 72, 327, 3, 2, 2, 2, 74, 329, 3, 2, 2, 2, 76, 331, 3, 2, 2, 2, 78, 339, 3, 2, 2, 2, 80, 341, 3, 2, 2, 2, 82, 344, 3, 2, 2, 2, 84, 348, 3, 2, 2, 2, 86, 352, 3, 2, 2, 2, 88, 354, 3, 2, 2, 2, 90, 356, 3, 2, 2, 2, 92, 358, 3, 2, 2, 2, 94, 360, 3, 2, 2, 2, 96, 369, 3, 2, 2, 2, 98, 371, 3, 2, 2, 2, 100, 102, 5, 4, 3, 2, 101, 100, 3, 2, 2, 2, 102, 103, 3, 2, 2, 2, 103, 101, 3, 2, 2, 2, 103, 104, 3, 2, 2, 2, 104, 105, 3, 2, 2, 2, 105, 106, 7, 2, 2, 3, 106, 3, 3, 2, 2, 2, 107, 111, 5, 6, 4, 2, 108, 111, 5, 16, 9, 2, 109, 111, 5, 24, 13, 2, 110, 107, 3, 2, 2, 2, 110, 108, 3, 2, 2, 2, 110, 109, 3, 2, 2, 2, 111, 5, 3, 2, 2, 2, 112, 113, 7, 3, 2, 2, 113, 114, 5, 8, 5, 2, 114, 7, 3, 2, 2, 2, 115, 116, 5, 88, 45, 2, 116, 117, 7, 4, 2, 2, 117, 118, 5, 12, 7, 2, 118, 121, 3, 2, 2, 2, 119, 120, 7, 5, 2, 2, 120, 122, 5, 54, 28, 2, 121, 119, 3, 2, 2, 2, 121, 122, 3, 2, 2, 2, 122, 9, 3, 2, 2, 2, 123, 124, 5, 88, 45, 2, 124, 125, 7, 4, 2, 2, 125, 126, 5, 12, 7, 2, 126, 127, 3, 2, 2, 2, 127, 128, 7, 5, 2, 2, 128, 129, 5, 54, 28, 2, 129, 11, 3, 2, 2, 2, 130, 134, 5, 90, 46, 2, 131, 133, 5, 14, 8, 2, 132, 131, 3, 2, 2, 2, 133, 136, 3, 2, 2, 2, 134, 132, 3, 2, 2, 2, 134, 135, 3, 2, 2, 2, 135, 13, 3, 2, 2, 2, 136, 134, 3, 2, 2, 2, 137, 144, 7, 6, 2, 2, 138, 140, 7, 7, 2, 2, 139, 141, 7, 64, 2, 2, 140, 139, 3, 2, 2, 2, 140, 141, 3, 2, 2, 2, 141, 142, 3, 2, 2, 2, 142, 144, 7, 8, 2, 2, 143, 137, 3, 2, 2, 2, 143, 138, 3, 2, 2, 2, 144, 15, 3, 2, 2, 2, 145, 146, 7, 9, 2, 2, 146, 147, 5, 18, 10, 2, 147, 17, 3, 2, 2, 2, 148, 149, 5, 86, 44, 2, 149, 150, 7, 10, 2, 2, 150, 151, 5, 20, 11, 2, 151, 152, 7, 11, 2, 2, 152, 153, 7, 4, 2, 2, 153, 154, 5, 12, 7, 2, 154, 155, 3, 2, 2, 2, 155, 156, 5, 22, 12, 2, 156, 19, 3, 2, 2, 2, 157, 162, 5, 8, 5, 2, 158, 159, 7, 12, 2, 2, 159, 161, 5, 8, 5, 2, 160, 158, 3, 2, 2, 2, 161, 164, 3, 2, 2, 2, 162, 160, 3, 2, 2, 2, 162, 163, 3, 2, 2, 2, 163, 166, 3, 2, 2, 2, 164, 162, 3, 2, 2, 2, 165, 157, 3, 2, 2, 2, 165, 166, 3, 2, 2, 2, 166, 21, 3, 2, 2, 2, 167, 171, 7, 13, 2, 2, 168, 170, 5, 32, 17, 2, 169, 168, 3, 2, 2, 2, 170, 173, 3, 2, 2, 2, 171, 169, 3, 2, 2, 2, 171, 172, 3, 2, 2, 2, 172, 174, 3, 2, 2, 2, 173, 171, 3, 2, 2, 2, 174, 175, 7, 14, 2, 2, 175, 23, 3, 2, 2, 2, 176, 177, 7, 15, 2, 2, 177, 178, 5, 92, 47, 2, 178, 182, 7, 13, 2, 2, 179, 181, 5, 26, 14, 2, 180, 179, 3, 2, 2, 2, 181, 184, 3, 2, 2, 2, 182, 180, 3, 2, 2, 2, 182, 183, 3, 2, 2, 2, 183, 185, 3, 2, 2, 2, 184, 182, 3, 2, 2, 2, 185, 186, 7, 14, 2, 2, 186, 25, 3, 2, 2, 2, 187, 190, 5, 28, 15, 2, 188, 190, 5, 30, 16, 2, 189, 187, 3, 2, 2, 2, 189, 188, 3, 2, 2, 2, 190, 27, 3, 2, 2, 2, 191, 192, 5, 8, 5, 2, 192, 29, 3, 2, 2, 2, 193, 194, 5, 18, 10, 2, 194, 31, 3, 2, 2, 2, 195, 204, 5, 6, 4, 2, 196, 204, 5, 34, 18, 2, 197, 204, 5, 40, 21, 2, 198, 204, 5, 46, 24, 2, 199, 204, 5, 48, 25, 2, 200, 204, 5, 50, 26, 2, 201, 204, 5, 52, 27, 2, 202, 204, 5, 54, 28, 2, 203, 195, 3, 2, 2, 2, 203, 196, 3, 2, 2, 2, 203, 197, 3, 2, 2, 2, 203, 198, 3, 2, 2, 2, 203, 199, 3, 2, 2, 2, 203, 200, 3, 2, 2, 2, 203, 201, 3, 2, 2, 2, 203, 202, 3, 2, 2, 2, 204, 33, 3, 2, 2, 2, 205, 206, 7, 16, 2, 2, 206, 207, 5, 54, 28, 2, 207, 211, 5, 22, 12, 2, 208, 210, 5, 36, 19, 2, 209, 208, 3, 2, 2, 2, 210, 213, 3, 2, 2, 2, 211, 209, 3, 2, 2, 2, 211, 212, 3, 2, 2, 2, 212, 215, 3, 2, 2, 2, 213, 211, 3, 2, 2, 2, 214, 216, 5, 38, 20, 2, 215, 214, 3, 2, 2, 2, 215, 216, 3, 2, 2, 2, 216, 35, 3, 2, 2, 2, 217, 218, 7, 17, 2, 2, 218, 219, 7, 16, 2, 2, 219, 220, 5, 54, 28, 2, 220, 221, 5, 22, 12, 2, 221, 37, 3, 2, 2, 2, 222, 223, 7, 17, 2, 2, 223, 224, 5, 22, 12, 2, 224, 39, 3, 2, 2, 2, 225, 226, 7, 18, 2, 2, 226, 227, 5, 72, 37, 2, 227, 228, 5, 42, 22, 2, 228, 41, 3, 2, 2, 2, 229, 233, 7, 13, 2, 2, 230, 232, 5, 44, 23, 2, 231, 230, 3, 2, 2, 2, 232, 235, 3, 2, 2, 2, 233, 231, 3, 2, 2, 2, 233, 234, 3, 2, 2, 2, 234, 236, 3, 2, 2, 2, 235, 233, 3, 2, 2, 2, 236, 237, 7, 14, 2, 2, 237, 43, 3, 2, 2, 2, 238, 239, 7, 19, 2, 2, 239, 240, 5, 54, 28, 2, 240, 241, 5, 22, 12, 2, 241, 45, 3, 2, 2, 2, 242, 245, 7, 20, 2, 2, 243, 246, 5, 10, 6, 2, 244, 246, 5, 50, 26, 2, 245, 243, 3, 2, 2, 2, 245, 244, 3, 2, 2, 2, 246, 247, 3, 2, 2, 2, 247, 248, 7, 12, 2, 2, 248, 249, 5, 54, 28, 2, 249, 250, 7, 12, 2, 2, 250, 251, 5, 54, 28, 2, 251, 252, 5, 22, 12, 2, 252, 47, 3, 2, 2, 2, 253, 254, 7, 21, 2, 2, 254, 255, 5, 54, 28, 2, 255, 256, 5, 22, 12, 2, 256, 49, 3, 2, 2, 2, 257, 258, 5, 72, 37, 2, 258, 259, 7, 5, 2, 2, 259, 260, 5, 54, 28, 2, 260, 51, 3, 2, 2, 2, 261, 262, 7, 22, 2, 2, 262, 263, 5, 54, 28, 2, 263, 53, 3, 2, 2, 2, 264, 271, 5, 60, 31, 2, 265, 271, 5, 74, 38, 2, 266, 271, 5, 72, 37, 2, 267, 271, 5, 84, 43, 2, 268, 271, 5, 76, 39, 2, 269, 271, 5, 62, 32, 2, 270, 264, 3, 2, 2, 2, 270, 265, 3, 2, 2, 2, 270, 266, 3, 2, 2, 2, 270, 267, 3, 2, 2, 2, 270, 268, 3, 2, 2, 2, 270, 269, 3, 2, 2, 2, 271, 55, 3, 2, 2, 2, 272, 278, 5, 60, 31, 2, 273, 278, 5, 74, 38, 2, 274, 278, 5, 72, 37, 2, 275, 278, 5, 84, 43, 2, 276, 278, 5, 76, 39, 2, 277, 272, 3, 2, 2, 2, 277, 273, 3, 2, 2, 2, 277, 274, 3, 2, 2, 2, 277, 275, 3, 2, 2, 2, 277, 276, 3, 2, 2, 2, 278, 57, 3, 2, 2, 2, 279, 283, 5, 60, 31, 2, 280, 283, 5, 72, 37, 2, 281, 283, 5, 84, 43, 2, 282, 279, 3, 2, 2, 2, 282, 280, 3, 2, 2, 2, 282, 281, 3, 2, 2, 2, 283, 59, 3, 2, 2, 2, 284, 285, 5, 86, 44, 2, 285, 294, 7, 10, 2, 2, 286, 291, 5, 54, 28, 2, 287, 288, 7, 12, 2, 2, 288, 290, 5, 54, 28, 2, 289, 287, 3, 2, 2, 2, 290, 293, 3, 2, 2, 2, 291, 289, 3, 2, 2, 2, 291, 292, 3, 2, 2, 2, 292, 295, 3, 2, 2, 2, 293, 291, 3, 2, 2, 2, 294, 286, 3, 2, 2, 2, 294, 295, 3, 2, 2, 2, 295, 296, 3, 2, 2, 2, 296, 297, 7, 11, 2, 2, 297, 61, 3, 2, 2, 2, 298, 303, 5, 64, 33, 2, 299, 303, 5, 66, 34, 2, 300, 303, 5, 68, 35, 2, 301, 303, 5, 70, 36, 2, 302, 298, 3, 2, 2, 2, 302, 299, 3, 2, 2, 2, 302, 300, 3, 2, 2, 2, 302, 301, 3, 2, 2, 2, 303, 63, 3, 2, 2, 2, 304, 305, 5, 56, 29, 2, 305, 306, 5, 98, 50, 2, 306, 312, 5, 56, 29, 2, 307, 308, 5, 98, 50, 2, 308, 309, 5, 56, 29, 2, 309, 311, 3, 2, 2, 2, 310, 307, 3, 2, 2, 2, 311, 314, 3, 2, 2, 2, 312, 310, 3, 2, 2, 2, 312, 313, 3, 2, 2, 2, 313, 65, 3, 2, 2, 2, 314, 312, 3, 2, 2, 2, 315, 316, 5, 96, 49, 2, 316, 317, 5, 56, 29, 2, 317, 67, 3, 2, 2, 2, 318, 319, 5, 56, 29, 2, 319, 320, 5, 94, 48, 2, 320, 69, 3, 2, 2, 2, 321, 322, 5, 56, 29, 2, 322, 323, 7, 23, 2, 2, 323, 324, 5, 54, 28, 2, 324, 325, 7, 4, 2, 2, 325, 326, 5, 54, 28, 2, 326, 71, 3, 2, 2, 2, 327, 328, 5, 88, 45, 2, 328, 73, 3, 2, 2, 2, 329, 330, 9, 2, 2, 2, 330, 75, 3, 2, 2, 2, 331, 333, 5, 58, 30, 2, 332, 334, 5, 78, 40, 2, 333, 332, 3, 2, 2, 2, 334, 335, 3, 2, 2, 2, 335, 333, 3, 2, 2, 2, 335, 336, 3, 2, 2, 2, 336, 77, 3, 2, 2, 2, 337, 340, 5, 80, 41, 2, 338, 340, 5, 82, 42, 2, 339, 337, 3, 2, 2, 2, 339, 338, 3, 2, 2, 2, 340, 79, 3, 2, 2, 2, 341, 342, 9, 3, 2, 2, 342, 343, 5, 72, 37, 2, 343, 81, 3, 2, 2, 2, 344, 345, 7, 7, 2, 2, 345, 346, 5, 54, 28, 2, 346, 347, 7, 8, 2, 2, 347, 83, 3, 2, 2, 2, 348, 349, 7, 10, 2, 2, 349, 350, 5, 54, 28, 2, 350, 351, 7, 11, 2, 2, 351, 85, 3, 2, 2, 2, 352, 353, 7, 61, 2, 2, 353, 87, 3, 2, 2, 2, 354, 355, 7, 61, 2, 2, 355, 89, 3, 2, 2, 2, 356, 357, 7, 61, 2, 2, 357, 91, 3, 2, 2, 2, 358, 359, 7, 61, 2, 2, 359, 93, 3, 2, 2, 2, 360, 361, 9, 4, 2, 2, 361, 95, 3, 2, 2, 2, 362, 370, 7, 28, 2, 2, 363, 370, 7, 29, 2, 2, 364, 370, 7, 30, 2, 2, 365, 370, 7, 31, 2, 2, 366, 370, 7, 32, 2, 2, 367, 370, 7, 6, 2, 2, 368, 370, 5, 94, 48, 2, 369, 362, 3, 2, 2, 2, 369, 363, 3, 2, 2, 2, 369, 364, 3, 2, 2, 2, 369, 365, 3, 2, 2, 2, 369, 366, 3, 2, 2, 2, 369, 367, 3, 2, 2, 2, 369, 368, 3, 2, 2, 2, 370, 97, 3, 2, 2, 2, 371, 372, 9, 5, 2, 2, 372, 99, 3, 2, 2, 2, 28, 103, 110, 121, 134, 140, 143, 162, 165, 171, 182, 189, 203, 211, 215, 233, 245, 270, 277, 282, 291, 294, 302, 312, 335, 339, 369] \ No newline at end of file diff --git a/gen/Toc.tokens b/gen/Toc.tokens index ccfc5b5..446ddcd 100644 --- a/gen/Toc.tokens +++ b/gen/Toc.tokens @@ -21,17 +21,45 @@ T__19=20 T__20=21 T__21=22 T__22=23 -POSTFIX_OP=24 -PREFIX_OP=25 -BINARY_OP=26 -INT_LIT=27 -DECIMAL_LIT=28 -STRING_LIT=29 -BOOL_LIT=30 -NAME=31 -WS=32 -NEWLINE=33 -NUMBER=34 +T__23=24 +T__24=25 +T__25=26 +T__26=27 +T__27=28 +T__28=29 +T__29=30 +T__30=31 +T__31=32 +T__32=33 +T__33=34 +T__34=35 +T__35=36 +T__36=37 +T__37=38 +T__38=39 +T__39=40 +T__40=41 +T__41=42 +T__42=43 +T__43=44 +T__44=45 +T__45=46 +T__46=47 +T__47=48 +T__48=49 +T__49=50 +T__50=51 +T__51=52 +T__52=53 +T__53=54 +INT_LIT=55 +DECIMAL_LIT=56 +STRING_LIT=57 +BOOL_LIT=58 +NAME=59 +WS=60 +NEWLINE=61 +NUMBER=62 'var'=1 ':'=2 '='=3 @@ -55,3 +83,34 @@ NUMBER=34 '?'=21 '.'=22 '->'=23 +'++'=24 +'--'=25 +'+'=26 +'-'=27 +'!'=28 +'~'=29 +'&'=30 +'/'=31 +'%'=32 +'<'=33 +'|'=34 +'^'=35 +'>'=36 +'=='=37 +'!='=38 +'<='=39 +'>='=40 +'<<'=41 +'>>'=42 +'||'=43 +'&&'=44 +'&='=45 +'|='=46 +'^='=47 +'<<='=48 +'>>='=49 +'+='=50 +'-='=51 +'*='=52 +'/='=53 +'%='=54 diff --git a/gen/TocBaseListener.h b/gen/TocBaseListener.h index dbebc54..1110d48 100644 --- a/gen/TocBaseListener.h +++ b/gen/TocBaseListener.h @@ -67,12 +67,21 @@ public: virtual void enterIfStmt(TocParser::IfStmtContext * /*ctx*/) override { } virtual void exitIfStmt(TocParser::IfStmtContext * /*ctx*/) override { } + virtual void enterElseIfStmt(TocParser::ElseIfStmtContext * /*ctx*/) override { } + virtual void exitElseIfStmt(TocParser::ElseIfStmtContext * /*ctx*/) override { } + + virtual void enterElseStmt(TocParser::ElseStmtContext * /*ctx*/) override { } + virtual void exitElseStmt(TocParser::ElseStmtContext * /*ctx*/) override { } + virtual void enterSwitchStmt(TocParser::SwitchStmtContext * /*ctx*/) override { } virtual void exitSwitchStmt(TocParser::SwitchStmtContext * /*ctx*/) override { } virtual void enterSwitchBody(TocParser::SwitchBodyContext * /*ctx*/) override { } virtual void exitSwitchBody(TocParser::SwitchBodyContext * /*ctx*/) override { } + virtual void enterSwitchCase(TocParser::SwitchCaseContext * /*ctx*/) override { } + virtual void exitSwitchCase(TocParser::SwitchCaseContext * /*ctx*/) override { } + virtual void enterForStmt(TocParser::ForStmtContext * /*ctx*/) override { } virtual void exitForStmt(TocParser::ForStmtContext * /*ctx*/) override { } @@ -121,6 +130,15 @@ public: virtual void enterAccessExpr(TocParser::AccessExprContext * /*ctx*/) override { } virtual void exitAccessExpr(TocParser::AccessExprContext * /*ctx*/) override { } + virtual void enterAccessSubExpr(TocParser::AccessSubExprContext * /*ctx*/) override { } + virtual void exitAccessSubExpr(TocParser::AccessSubExprContext * /*ctx*/) override { } + + virtual void enterAccessMember(TocParser::AccessMemberContext * /*ctx*/) override { } + virtual void exitAccessMember(TocParser::AccessMemberContext * /*ctx*/) override { } + + virtual void enterAccessBrackets(TocParser::AccessBracketsContext * /*ctx*/) override { } + virtual void exitAccessBrackets(TocParser::AccessBracketsContext * /*ctx*/) override { } + virtual void enterParenExpr(TocParser::ParenExprContext * /*ctx*/) override { } virtual void exitParenExpr(TocParser::ParenExprContext * /*ctx*/) override { } @@ -136,6 +154,15 @@ public: virtual void enterStructName(TocParser::StructNameContext * /*ctx*/) override { } virtual void exitStructName(TocParser::StructNameContext * /*ctx*/) override { } + virtual void enterPostfix_op(TocParser::Postfix_opContext * /*ctx*/) override { } + virtual void exitPostfix_op(TocParser::Postfix_opContext * /*ctx*/) override { } + + virtual void enterPrefix_op(TocParser::Prefix_opContext * /*ctx*/) override { } + virtual void exitPrefix_op(TocParser::Prefix_opContext * /*ctx*/) override { } + + virtual void enterBinary_op(TocParser::Binary_opContext * /*ctx*/) override { } + virtual void exitBinary_op(TocParser::Binary_opContext * /*ctx*/) override { } + virtual void enterEveryRule(antlr4::ParserRuleContext * /*ctx*/) override { } virtual void exitEveryRule(antlr4::ParserRuleContext * /*ctx*/) override { } diff --git a/gen/TocLexer.cpp b/gen/TocLexer.cpp index 59b8f65..7074805 100644 --- a/gen/TocLexer.cpp +++ b/gen/TocLexer.cpp @@ -62,9 +62,12 @@ std::vector TocLexer::_serializedATN; std::vector TocLexer::_ruleNames = { "T__0", "T__1", "T__2", "T__3", "T__4", "T__5", "T__6", "T__7", "T__8", "T__9", "T__10", "T__11", "T__12", "T__13", "T__14", "T__15", "T__16", - "T__17", "T__18", "T__19", "T__20", "T__21", "T__22", "POSTFIX_OP", "PREFIX_OP", - "BINARY_OP", "INT_LIT", "DECIMAL_LIT", "STRING_LIT", "BOOL_LIT", "NAME", - "WS", "NEWLINE", "NUMBER" + "T__17", "T__18", "T__19", "T__20", "T__21", "T__22", "T__23", "T__24", + "T__25", "T__26", "T__27", "T__28", "T__29", "T__30", "T__31", "T__32", + "T__33", "T__34", "T__35", "T__36", "T__37", "T__38", "T__39", "T__40", + "T__41", "T__42", "T__43", "T__44", "T__45", "T__46", "T__47", "T__48", + "T__49", "T__50", "T__51", "T__52", "T__53", "INT_LIT", "DECIMAL_LIT", + "STRING_LIT", "BOOL_LIT", "NAME", "WS", "NEWLINE", "NUMBER" }; std::vector TocLexer::_channelNames = { @@ -78,13 +81,19 @@ std::vector TocLexer::_modeNames = { std::vector TocLexer::_literalNames = { "", "'var'", "':'", "'='", "'*'", "'['", "']'", "'func'", "'('", "')'", "','", "'{'", "'}'", "'struct'", "'if'", "'else'", "'switch'", "'case'", - "'for'", "'while'", "'return'", "'\u003F'", "'.'", "'->'" + "'for'", "'while'", "'return'", "'\u003F'", "'.'", "'->'", "'++'", "'--'", + "'+'", "'-'", "'!'", "'~'", "'&'", "'/'", "'%'", "'<'", "'|'", "'^'", + "'>'", "'=='", "'!='", "'<='", "'>='", "'<<'", "'>>'", "'||'", "'&&'", + "'&='", "'|='", "'^='", "'<<='", "'>>='", "'+='", "'-='", "'*='", "'/='", + "'%='" }; std::vector TocLexer::_symbolicNames = { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", - "", "", "", "", "", "", "POSTFIX_OP", "PREFIX_OP", "BINARY_OP", "INT_LIT", - "DECIMAL_LIT", "STRING_LIT", "BOOL_LIT", "NAME", "WS", "NEWLINE", "NUMBER" + "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", + "", "INT_LIT", "DECIMAL_LIT", "STRING_LIT", "BOOL_LIT", "NAME", "WS", + "NEWLINE", "NUMBER" }; dfa::Vocabulary TocLexer::_vocabulary(_literalNames, _symbolicNames); @@ -108,7 +117,7 @@ TocLexer::Initializer::Initializer() { static const uint16_t serializedATNSegment0[] = { 0x3, 0x608b, 0xa72a, 0x8133, 0xb9ed, 0x417c, 0x3be7, 0x7786, 0x5964, - 0x2, 0x24, 0x10e, 0x8, 0x1, 0x4, 0x2, 0x9, 0x2, 0x4, 0x3, 0x9, 0x3, + 0x2, 0x40, 0x166, 0x8, 0x1, 0x4, 0x2, 0x9, 0x2, 0x4, 0x3, 0x9, 0x3, 0x4, 0x4, 0x9, 0x4, 0x4, 0x5, 0x9, 0x5, 0x4, 0x6, 0x9, 0x6, 0x4, 0x7, 0x9, 0x7, 0x4, 0x8, 0x9, 0x8, 0x4, 0x9, 0x9, 0x9, 0x4, 0xa, 0x9, 0xa, 0x4, 0xb, 0x9, 0xb, 0x4, 0xc, 0x9, 0xc, 0x4, 0xd, 0x9, @@ -119,200 +128,250 @@ TocLexer::Initializer::Initializer() { 0x4, 0x1a, 0x9, 0x1a, 0x4, 0x1b, 0x9, 0x1b, 0x4, 0x1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0x3e, 0x2, 0x2, 0xf8, 0xf9, + 0x7, 0x3e, 0x2, 0x2, 0xf9, 0x54, 0x3, 0x2, 0x2, 0x2, 0xfa, 0xfb, + 0x7, 0x40, 0x2, 0x2, 0xfb, 0xfc, 0x7, 0x40, 0x2, 0x2, 0xfc, 0x56, + 0x3, 0x2, 0x2, 0x2, 0xfd, 0xfe, 0x7, 0x7e, 0x2, 0x2, 0xfe, 0xff, + 0x7, 0x7e, 0x2, 0x2, 0xff, 0x58, 0x3, 0x2, 0x2, 0x2, 0x100, 0x101, + 0x7, 0x28, 0x2, 0x2, 0x101, 0x102, 0x7, 0x28, 0x2, 0x2, 0x102, 0x5a, + 0x3, 0x2, 0x2, 0x2, 0x103, 0x104, 0x7, 0x28, 0x2, 0x2, 0x104, 0x105, + 0x7, 0x3f, 0x2, 0x2, 0x105, 0x5c, 0x3, 0x2, 0x2, 0x2, 0x106, 0x107, + 0x7, 0x7e, 0x2, 0x2, 0x107, 0x108, 0x7, 0x3f, 0x2, 0x2, 0x108, 0x5e, + 0x3, 0x2, 0x2, 0x2, 0x109, 0x10a, 0x7, 0x60, 0x2, 0x2, 0x10a, 0x10b, + 0x7, 0x3f, 0x2, 0x2, 0x10b, 0x60, 0x3, 0x2, 0x2, 0x2, 0x10c, 0x10d, + 0x7, 0x3e, 0x2, 0x2, 0x10d, 0x10e, 0x7, 0x3e, 0x2, 0x2, 0x10e, 0x10f, + 0x7, 0x3f, 0x2, 0x2, 0x10f, 0x62, 0x3, 0x2, 0x2, 0x2, 0x110, 0x111, + 0x7, 0x40, 0x2, 0x2, 0x111, 0x112, 0x7, 0x40, 0x2, 0x2, 0x112, 0x113, + 0x7, 0x3f, 0x2, 0x2, 0x113, 0x64, 0x3, 0x2, 0x2, 0x2, 0x114, 0x115, + 0x7, 0x2d, 0x2, 0x2, 0x115, 0x116, 0x7, 0x3f, 0x2, 0x2, 0x116, 0x66, + 0x3, 0x2, 0x2, 0x2, 0x117, 0x118, 0x7, 0x2f, 0x2, 0x2, 0x118, 0x119, + 0x7, 0x3f, 0x2, 0x2, 0x119, 0x68, 0x3, 0x2, 0x2, 0x2, 0x11a, 0x11b, + 0x7, 0x2c, 0x2, 0x2, 0x11b, 0x11c, 0x7, 0x3f, 0x2, 0x2, 0x11c, 0x6a, + 0x3, 0x2, 0x2, 0x2, 0x11d, 0x11e, 0x7, 0x31, 0x2, 0x2, 0x11e, 0x11f, + 0x7, 0x3f, 0x2, 0x2, 0x11f, 0x6c, 0x3, 0x2, 0x2, 0x2, 0x120, 0x121, + 0x7, 0x27, 0x2, 0x2, 0x121, 0x122, 0x7, 0x3f, 0x2, 0x2, 0x122, 0x6e, + 0x3, 0x2, 0x2, 0x2, 0x123, 0x125, 0x9, 0x2, 0x2, 0x2, 0x124, 0x123, + 0x3, 0x2, 0x2, 0x2, 0x124, 0x125, 0x3, 0x2, 0x2, 0x2, 0x125, 0x127, + 0x3, 0x2, 0x2, 0x2, 0x126, 0x128, 0x9, 0x3, 0x2, 0x2, 0x127, 0x126, + 0x3, 0x2, 0x2, 0x2, 0x128, 0x129, 0x3, 0x2, 0x2, 0x2, 0x129, 0x127, + 0x3, 0x2, 0x2, 0x2, 0x129, 0x12a, 0x3, 0x2, 0x2, 0x2, 0x12a, 0x70, + 0x3, 0x2, 0x2, 0x2, 0x12b, 0x12d, 0x9, 0x2, 0x2, 0x2, 0x12c, 0x12b, + 0x3, 0x2, 0x2, 0x2, 0x12d, 0x130, 0x3, 0x2, 0x2, 0x2, 0x12e, 0x12c, + 0x3, 0x2, 0x2, 0x2, 0x12e, 0x12f, 0x3, 0x2, 0x2, 0x2, 0x12f, 0x132, + 0x3, 0x2, 0x2, 0x2, 0x130, 0x12e, 0x3, 0x2, 0x2, 0x2, 0x131, 0x133, + 0x9, 0x3, 0x2, 0x2, 0x132, 0x131, 0x3, 0x2, 0x2, 0x2, 0x133, 0x134, + 0x3, 0x2, 0x2, 0x2, 0x134, 0x132, 0x3, 0x2, 0x2, 0x2, 0x134, 0x135, + 0x3, 0x2, 0x2, 0x2, 0x135, 0x136, 0x3, 0x2, 0x2, 0x2, 0x136, 0x138, + 0x7, 0x30, 0x2, 0x2, 0x137, 0x139, 0x9, 0x3, 0x2, 0x2, 0x138, 0x137, + 0x3, 0x2, 0x2, 0x2, 0x139, 0x13a, 0x3, 0x2, 0x2, 0x2, 0x13a, 0x138, + 0x3, 0x2, 0x2, 0x2, 0x13a, 0x13b, 0x3, 0x2, 0x2, 0x2, 0x13b, 0x72, + 0x3, 0x2, 0x2, 0x2, 0x13c, 0x140, 0x7, 0x24, 0x2, 0x2, 0x13d, 0x13f, + 0x9, 0x4, 0x2, 0x2, 0x13e, 0x13d, 0x3, 0x2, 0x2, 0x2, 0x13f, 0x142, + 0x3, 0x2, 0x2, 0x2, 0x140, 0x13e, 0x3, 0x2, 0x2, 0x2, 0x140, 0x141, + 0x3, 0x2, 0x2, 0x2, 0x141, 0x143, 0x3, 0x2, 0x2, 0x2, 0x142, 0x140, + 0x3, 0x2, 0x2, 0x2, 0x143, 0x144, 0x7, 0x24, 0x2, 0x2, 0x144, 0x74, + 0x3, 0x2, 0x2, 0x2, 0x145, 0x146, 0x7, 0x76, 0x2, 0x2, 0x146, 0x147, + 0x7, 0x74, 0x2, 0x2, 0x147, 0x148, 0x7, 0x77, 0x2, 0x2, 0x148, 0x14f, + 0x7, 0x67, 0x2, 0x2, 0x149, 0x14a, 0x7, 0x68, 0x2, 0x2, 0x14a, 0x14b, + 0x7, 0x63, 0x2, 0x2, 0x14b, 0x14c, 0x7, 0x6e, 0x2, 0x2, 0x14c, 0x14d, + 0x7, 0x75, 0x2, 0x2, 0x14d, 0x14f, 0x7, 0x67, 0x2, 0x2, 0x14e, 0x145, + 0x3, 0x2, 0x2, 0x2, 0x14e, 0x149, 0x3, 0x2, 0x2, 0x2, 0x14f, 0x76, + 0x3, 0x2, 0x2, 0x2, 0x150, 0x152, 0x9, 0x5, 0x2, 0x2, 0x151, 0x150, + 0x3, 0x2, 0x2, 0x2, 0x152, 0x153, 0x3, 0x2, 0x2, 0x2, 0x153, 0x151, + 0x3, 0x2, 0x2, 0x2, 0x153, 0x154, 0x3, 0x2, 0x2, 0x2, 0x154, 0x78, + 0x3, 0x2, 0x2, 0x2, 0x155, 0x157, 0x9, 0x6, 0x2, 0x2, 0x156, 0x155, + 0x3, 0x2, 0x2, 0x2, 0x157, 0x158, 0x3, 0x2, 0x2, 0x2, 0x158, 0x156, + 0x3, 0x2, 0x2, 0x2, 0x158, 0x159, 0x3, 0x2, 0x2, 0x2, 0x159, 0x15a, + 0x3, 0x2, 0x2, 0x2, 0x15a, 0x15b, 0x8, 0x3d, 0x2, 0x2, 0x15b, 0x7a, + 0x3, 0x2, 0x2, 0x2, 0x15c, 0x15e, 0x9, 0x7, 0x2, 0x2, 0x15d, 0x15c, + 0x3, 0x2, 0x2, 0x2, 0x15e, 0x15f, 0x3, 0x2, 0x2, 0x2, 0x15f, 0x15d, + 0x3, 0x2, 0x2, 0x2, 0x15f, 0x160, 0x3, 0x2, 0x2, 0x2, 0x160, 0x7c, + 0x3, 0x2, 0x2, 0x2, 0x161, 0x163, 0x9, 0x3, 0x2, 0x2, 0x162, 0x161, + 0x3, 0x2, 0x2, 0x2, 0x163, 0x164, 0x3, 0x2, 0x2, 0x2, 0x164, 0x162, + 0x3, 0x2, 0x2, 0x2, 0x164, 0x165, 0x3, 0x2, 0x2, 0x2, 0x165, 0x7e, + 0x3, 0x2, 0x2, 0x2, 0xf, 0x2, 0x124, 0x129, 0x12e, 0x134, 0x13a, + 0x140, 0x14e, 0x151, 0x153, 0x158, 0x15f, 0x164, 0x3, 0x8, 0x2, 0x2, }; _serializedATN.insert(_serializedATN.end(), serializedATNSegment0, diff --git a/gen/TocLexer.h b/gen/TocLexer.h index 97d739e..752d97b 100644 --- a/gen/TocLexer.h +++ b/gen/TocLexer.h @@ -15,9 +15,13 @@ public: T__0 = 1, T__1 = 2, T__2 = 3, T__3 = 4, T__4 = 5, T__5 = 6, T__6 = 7, T__7 = 8, T__8 = 9, T__9 = 10, T__10 = 11, T__11 = 12, T__12 = 13, T__13 = 14, T__14 = 15, T__15 = 16, T__16 = 17, T__17 = 18, T__18 = 19, T__19 = 20, - T__20 = 21, T__21 = 22, T__22 = 23, POSTFIX_OP = 24, PREFIX_OP = 25, - BINARY_OP = 26, INT_LIT = 27, DECIMAL_LIT = 28, STRING_LIT = 29, BOOL_LIT = 30, - NAME = 31, WS = 32, NEWLINE = 33, NUMBER = 34 + T__20 = 21, T__21 = 22, T__22 = 23, T__23 = 24, T__24 = 25, T__25 = 26, + T__26 = 27, T__27 = 28, T__28 = 29, T__29 = 30, T__30 = 31, T__31 = 32, + T__32 = 33, T__33 = 34, T__34 = 35, T__35 = 36, T__36 = 37, T__37 = 38, + T__38 = 39, T__39 = 40, T__40 = 41, T__41 = 42, T__42 = 43, T__43 = 44, + T__44 = 45, T__45 = 46, T__46 = 47, T__47 = 48, T__48 = 49, T__49 = 50, + T__50 = 51, T__51 = 52, T__52 = 53, T__53 = 54, INT_LIT = 55, DECIMAL_LIT = 56, + STRING_LIT = 57, BOOL_LIT = 58, NAME = 59, WS = 60, NEWLINE = 61, NUMBER = 62 }; explicit TocLexer(antlr4::CharStream *input); diff --git a/gen/TocLexer.interp b/gen/TocLexer.interp index c37f3ff..06d1b7c 100644 --- a/gen/TocLexer.interp +++ b/gen/TocLexer.interp @@ -23,6 +23,67 @@ null '?' '.' '->' +'++' +'--' +'+' +'-' +'!' +'~' +'&' +'/' +'%' +'<' +'|' +'^' +'>' +'==' +'!=' +'<=' +'>=' +'<<' +'>>' +'||' +'&&' +'&=' +'|=' +'^=' +'<<=' +'>>=' +'+=' +'-=' +'*=' +'/=' +'%=' +null +null +null +null +null +null +null +null + +token symbolic names: +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null null null null @@ -34,8 +95,6 @@ null null null null - -token symbolic names: null null null @@ -60,9 +119,6 @@ null null null null -POSTFIX_OP -PREFIX_OP -BINARY_OP INT_LIT DECIMAL_LIT STRING_LIT @@ -96,9 +152,37 @@ T__19 T__20 T__21 T__22 -POSTFIX_OP -PREFIX_OP -BINARY_OP +T__23 +T__24 +T__25 +T__26 +T__27 +T__28 +T__29 +T__30 +T__31 +T__32 +T__33 +T__34 +T__35 +T__36 +T__37 +T__38 +T__39 +T__40 +T__41 +T__42 +T__43 +T__44 +T__45 +T__46 +T__47 +T__48 +T__49 +T__50 +T__51 +T__52 +T__53 INT_LIT DECIMAL_LIT STRING_LIT @@ -116,4 +200,4 @@ mode names: DEFAULT_MODE atn: -[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 36, 270, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 3, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 4, 3, 4, 3, 5, 3, 5, 3, 6, 3, 6, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 10, 3, 10, 3, 11, 3, 11, 3, 12, 3, 12, 3, 13, 3, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 19, 3, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 22, 3, 22, 3, 23, 3, 23, 3, 24, 3, 24, 3, 24, 3, 25, 3, 25, 3, 25, 3, 25, 5, 25, 156, 10, 25, 3, 26, 3, 26, 5, 26, 160, 10, 26, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 5, 27, 202, 10, 27, 3, 28, 5, 28, 205, 10, 28, 3, 28, 6, 28, 208, 10, 28, 13, 28, 14, 28, 209, 3, 29, 7, 29, 213, 10, 29, 12, 29, 14, 29, 216, 11, 29, 3, 29, 6, 29, 219, 10, 29, 13, 29, 14, 29, 220, 3, 29, 3, 29, 6, 29, 225, 10, 29, 13, 29, 14, 29, 226, 3, 30, 3, 30, 7, 30, 231, 10, 30, 12, 30, 14, 30, 234, 11, 30, 3, 30, 3, 30, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 5, 31, 247, 10, 31, 3, 32, 6, 32, 250, 10, 32, 13, 32, 14, 32, 251, 3, 33, 6, 33, 255, 10, 33, 13, 33, 14, 33, 256, 3, 33, 3, 33, 3, 34, 6, 34, 262, 10, 34, 13, 34, 14, 34, 263, 3, 35, 6, 35, 267, 10, 35, 13, 35, 14, 35, 268, 2, 2, 36, 3, 3, 5, 4, 7, 5, 9, 6, 11, 7, 13, 8, 15, 9, 17, 10, 19, 11, 21, 12, 23, 13, 25, 14, 27, 15, 29, 16, 31, 17, 33, 18, 35, 19, 37, 20, 39, 21, 41, 22, 43, 23, 45, 24, 47, 25, 49, 26, 51, 27, 53, 28, 55, 29, 57, 30, 59, 31, 61, 32, 63, 33, 65, 34, 67, 35, 69, 36, 3, 2, 11, 7, 2, 35, 35, 40, 40, 44, 45, 47, 47, 128, 128, 10, 2, 39, 40, 44, 45, 47, 47, 49, 49, 62, 62, 64, 64, 96, 96, 126, 126, 4, 2, 62, 62, 64, 64, 4, 2, 45, 45, 47, 47, 3, 2, 50, 59, 4, 2, 36, 36, 96, 96, 5, 2, 50, 59, 67, 92, 99, 124, 5, 2, 11, 12, 15, 15, 34, 34, 4, 2, 12, 12, 15, 15, 2, 301, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2, 2, 33, 3, 2, 2, 2, 2, 35, 3, 2, 2, 2, 2, 37, 3, 2, 2, 2, 2, 39, 3, 2, 2, 2, 2, 41, 3, 2, 2, 2, 2, 43, 3, 2, 2, 2, 2, 45, 3, 2, 2, 2, 2, 47, 3, 2, 2, 2, 2, 49, 3, 2, 2, 2, 2, 51, 3, 2, 2, 2, 2, 53, 3, 2, 2, 2, 2, 55, 3, 2, 2, 2, 2, 57, 3, 2, 2, 2, 2, 59, 3, 2, 2, 2, 2, 61, 3, 2, 2, 2, 2, 63, 3, 2, 2, 2, 2, 65, 3, 2, 2, 2, 2, 67, 3, 2, 2, 2, 2, 69, 3, 2, 2, 2, 3, 71, 3, 2, 2, 2, 5, 75, 3, 2, 2, 2, 7, 77, 3, 2, 2, 2, 9, 79, 3, 2, 2, 2, 11, 81, 3, 2, 2, 2, 13, 83, 3, 2, 2, 2, 15, 85, 3, 2, 2, 2, 17, 90, 3, 2, 2, 2, 19, 92, 3, 2, 2, 2, 21, 94, 3, 2, 2, 2, 23, 96, 3, 2, 2, 2, 25, 98, 3, 2, 2, 2, 27, 100, 3, 2, 2, 2, 29, 107, 3, 2, 2, 2, 31, 110, 3, 2, 2, 2, 33, 115, 3, 2, 2, 2, 35, 122, 3, 2, 2, 2, 37, 127, 3, 2, 2, 2, 39, 131, 3, 2, 2, 2, 41, 137, 3, 2, 2, 2, 43, 144, 3, 2, 2, 2, 45, 146, 3, 2, 2, 2, 47, 148, 3, 2, 2, 2, 49, 155, 3, 2, 2, 2, 51, 159, 3, 2, 2, 2, 53, 201, 3, 2, 2, 2, 55, 204, 3, 2, 2, 2, 57, 214, 3, 2, 2, 2, 59, 228, 3, 2, 2, 2, 61, 246, 3, 2, 2, 2, 63, 249, 3, 2, 2, 2, 65, 254, 3, 2, 2, 2, 67, 261, 3, 2, 2, 2, 69, 266, 3, 2, 2, 2, 71, 72, 7, 120, 2, 2, 72, 73, 7, 99, 2, 2, 73, 74, 7, 116, 2, 2, 74, 4, 3, 2, 2, 2, 75, 76, 7, 60, 2, 2, 76, 6, 3, 2, 2, 2, 77, 78, 7, 63, 2, 2, 78, 8, 3, 2, 2, 2, 79, 80, 7, 44, 2, 2, 80, 10, 3, 2, 2, 2, 81, 82, 7, 93, 2, 2, 82, 12, 3, 2, 2, 2, 83, 84, 7, 95, 2, 2, 84, 14, 3, 2, 2, 2, 85, 86, 7, 104, 2, 2, 86, 87, 7, 119, 2, 2, 87, 88, 7, 112, 2, 2, 88, 89, 7, 101, 2, 2, 89, 16, 3, 2, 2, 2, 90, 91, 7, 42, 2, 2, 91, 18, 3, 2, 2, 2, 92, 93, 7, 43, 2, 2, 93, 20, 3, 2, 2, 2, 94, 95, 7, 46, 2, 2, 95, 22, 3, 2, 2, 2, 96, 97, 7, 125, 2, 2, 97, 24, 3, 2, 2, 2, 98, 99, 7, 127, 2, 2, 99, 26, 3, 2, 2, 2, 100, 101, 7, 117, 2, 2, 101, 102, 7, 118, 2, 2, 102, 103, 7, 116, 2, 2, 103, 104, 7, 119, 2, 2, 104, 105, 7, 101, 2, 2, 105, 106, 7, 118, 2, 2, 106, 28, 3, 2, 2, 2, 107, 108, 7, 107, 2, 2, 108, 109, 7, 104, 2, 2, 109, 30, 3, 2, 2, 2, 110, 111, 7, 103, 2, 2, 111, 112, 7, 110, 2, 2, 112, 113, 7, 117, 2, 2, 113, 114, 7, 103, 2, 2, 114, 32, 3, 2, 2, 2, 115, 116, 7, 117, 2, 2, 116, 117, 7, 121, 2, 2, 117, 118, 7, 107, 2, 2, 118, 119, 7, 118, 2, 2, 119, 120, 7, 101, 2, 2, 120, 121, 7, 106, 2, 2, 121, 34, 3, 2, 2, 2, 122, 123, 7, 101, 2, 2, 123, 124, 7, 99, 2, 2, 124, 125, 7, 117, 2, 2, 125, 126, 7, 103, 2, 2, 126, 36, 3, 2, 2, 2, 127, 128, 7, 104, 2, 2, 128, 129, 7, 113, 2, 2, 129, 130, 7, 116, 2, 2, 130, 38, 3, 2, 2, 2, 131, 132, 7, 121, 2, 2, 132, 133, 7, 106, 2, 2, 133, 134, 7, 107, 2, 2, 134, 135, 7, 110, 2, 2, 135, 136, 7, 103, 2, 2, 136, 40, 3, 2, 2, 2, 137, 138, 7, 116, 2, 2, 138, 139, 7, 103, 2, 2, 139, 140, 7, 118, 2, 2, 140, 141, 7, 119, 2, 2, 141, 142, 7, 116, 2, 2, 142, 143, 7, 112, 2, 2, 143, 42, 3, 2, 2, 2, 144, 145, 7, 65, 2, 2, 145, 44, 3, 2, 2, 2, 146, 147, 7, 48, 2, 2, 147, 46, 3, 2, 2, 2, 148, 149, 7, 47, 2, 2, 149, 150, 7, 64, 2, 2, 150, 48, 3, 2, 2, 2, 151, 152, 7, 45, 2, 2, 152, 156, 7, 45, 2, 2, 153, 154, 7, 47, 2, 2, 154, 156, 7, 47, 2, 2, 155, 151, 3, 2, 2, 2, 155, 153, 3, 2, 2, 2, 156, 50, 3, 2, 2, 2, 157, 160, 9, 2, 2, 2, 158, 160, 5, 49, 25, 2, 159, 157, 3, 2, 2, 2, 159, 158, 3, 2, 2, 2, 160, 52, 3, 2, 2, 2, 161, 202, 9, 3, 2, 2, 162, 163, 7, 63, 2, 2, 163, 202, 7, 63, 2, 2, 164, 165, 7, 35, 2, 2, 165, 202, 7, 63, 2, 2, 166, 167, 7, 62, 2, 2, 167, 202, 7, 63, 2, 2, 168, 169, 7, 64, 2, 2, 169, 202, 7, 63, 2, 2, 170, 202, 9, 4, 2, 2, 171, 172, 7, 62, 2, 2, 172, 202, 7, 62, 2, 2, 173, 174, 7, 64, 2, 2, 174, 202, 7, 64, 2, 2, 175, 176, 7, 126, 2, 2, 176, 202, 7, 126, 2, 2, 177, 178, 7, 40, 2, 2, 178, 202, 7, 40, 2, 2, 179, 180, 7, 40, 2, 2, 180, 202, 7, 63, 2, 2, 181, 182, 7, 126, 2, 2, 182, 202, 7, 63, 2, 2, 183, 184, 7, 96, 2, 2, 184, 202, 7, 63, 2, 2, 185, 186, 7, 62, 2, 2, 186, 187, 7, 62, 2, 2, 187, 202, 7, 63, 2, 2, 188, 189, 7, 64, 2, 2, 189, 190, 7, 64, 2, 2, 190, 202, 7, 63, 2, 2, 191, 192, 7, 45, 2, 2, 192, 202, 7, 63, 2, 2, 193, 194, 7, 47, 2, 2, 194, 202, 7, 63, 2, 2, 195, 196, 7, 44, 2, 2, 196, 202, 7, 63, 2, 2, 197, 198, 7, 49, 2, 2, 198, 202, 7, 63, 2, 2, 199, 200, 7, 39, 2, 2, 200, 202, 7, 63, 2, 2, 201, 161, 3, 2, 2, 2, 201, 162, 3, 2, 2, 2, 201, 164, 3, 2, 2, 2, 201, 166, 3, 2, 2, 2, 201, 168, 3, 2, 2, 2, 201, 170, 3, 2, 2, 2, 201, 171, 3, 2, 2, 2, 201, 173, 3, 2, 2, 2, 201, 175, 3, 2, 2, 2, 201, 177, 3, 2, 2, 2, 201, 179, 3, 2, 2, 2, 201, 181, 3, 2, 2, 2, 201, 183, 3, 2, 2, 2, 201, 185, 3, 2, 2, 2, 201, 188, 3, 2, 2, 2, 201, 191, 3, 2, 2, 2, 201, 193, 3, 2, 2, 2, 201, 195, 3, 2, 2, 2, 201, 197, 3, 2, 2, 2, 201, 199, 3, 2, 2, 2, 202, 54, 3, 2, 2, 2, 203, 205, 9, 5, 2, 2, 204, 203, 3, 2, 2, 2, 204, 205, 3, 2, 2, 2, 205, 207, 3, 2, 2, 2, 206, 208, 9, 6, 2, 2, 207, 206, 3, 2, 2, 2, 208, 209, 3, 2, 2, 2, 209, 207, 3, 2, 2, 2, 209, 210, 3, 2, 2, 2, 210, 56, 3, 2, 2, 2, 211, 213, 9, 5, 2, 2, 212, 211, 3, 2, 2, 2, 213, 216, 3, 2, 2, 2, 214, 212, 3, 2, 2, 2, 214, 215, 3, 2, 2, 2, 215, 218, 3, 2, 2, 2, 216, 214, 3, 2, 2, 2, 217, 219, 9, 6, 2, 2, 218, 217, 3, 2, 2, 2, 219, 220, 3, 2, 2, 2, 220, 218, 3, 2, 2, 2, 220, 221, 3, 2, 2, 2, 221, 222, 3, 2, 2, 2, 222, 224, 7, 48, 2, 2, 223, 225, 9, 6, 2, 2, 224, 223, 3, 2, 2, 2, 225, 226, 3, 2, 2, 2, 226, 224, 3, 2, 2, 2, 226, 227, 3, 2, 2, 2, 227, 58, 3, 2, 2, 2, 228, 232, 7, 36, 2, 2, 229, 231, 9, 7, 2, 2, 230, 229, 3, 2, 2, 2, 231, 234, 3, 2, 2, 2, 232, 230, 3, 2, 2, 2, 232, 233, 3, 2, 2, 2, 233, 235, 3, 2, 2, 2, 234, 232, 3, 2, 2, 2, 235, 236, 7, 36, 2, 2, 236, 60, 3, 2, 2, 2, 237, 238, 7, 118, 2, 2, 238, 239, 7, 116, 2, 2, 239, 240, 7, 119, 2, 2, 240, 247, 7, 103, 2, 2, 241, 242, 7, 104, 2, 2, 242, 243, 7, 99, 2, 2, 243, 244, 7, 110, 2, 2, 244, 245, 7, 117, 2, 2, 245, 247, 7, 103, 2, 2, 246, 237, 3, 2, 2, 2, 246, 241, 3, 2, 2, 2, 247, 62, 3, 2, 2, 2, 248, 250, 9, 8, 2, 2, 249, 248, 3, 2, 2, 2, 250, 251, 3, 2, 2, 2, 251, 249, 3, 2, 2, 2, 251, 252, 3, 2, 2, 2, 252, 64, 3, 2, 2, 2, 253, 255, 9, 9, 2, 2, 254, 253, 3, 2, 2, 2, 255, 256, 3, 2, 2, 2, 256, 254, 3, 2, 2, 2, 256, 257, 3, 2, 2, 2, 257, 258, 3, 2, 2, 2, 258, 259, 8, 33, 2, 2, 259, 66, 3, 2, 2, 2, 260, 262, 9, 10, 2, 2, 261, 260, 3, 2, 2, 2, 262, 263, 3, 2, 2, 2, 263, 261, 3, 2, 2, 2, 263, 264, 3, 2, 2, 2, 264, 68, 3, 2, 2, 2, 265, 267, 9, 6, 2, 2, 266, 265, 3, 2, 2, 2, 267, 268, 3, 2, 2, 2, 268, 266, 3, 2, 2, 2, 268, 269, 3, 2, 2, 2, 269, 70, 3, 2, 2, 2, 18, 2, 155, 159, 201, 204, 209, 214, 220, 226, 232, 246, 249, 251, 256, 263, 268, 3, 8, 2, 2] \ No newline at end of file +[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 64, 358, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 4, 55, 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, 60, 9, 60, 4, 61, 9, 61, 4, 62, 9, 62, 4, 63, 9, 63, 3, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 4, 3, 4, 3, 5, 3, 5, 3, 6, 3, 6, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 10, 3, 10, 3, 11, 3, 11, 3, 12, 3, 12, 3, 13, 3, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 19, 3, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 22, 3, 22, 3, 23, 3, 23, 3, 24, 3, 24, 3, 24, 3, 25, 3, 25, 3, 25, 3, 26, 3, 26, 3, 26, 3, 27, 3, 27, 3, 28, 3, 28, 3, 29, 3, 29, 3, 30, 3, 30, 3, 31, 3, 31, 3, 32, 3, 32, 3, 33, 3, 33, 3, 34, 3, 34, 3, 35, 3, 35, 3, 36, 3, 36, 3, 37, 3, 37, 3, 38, 3, 38, 3, 38, 3, 39, 3, 39, 3, 39, 3, 40, 3, 40, 3, 40, 3, 41, 3, 41, 3, 41, 3, 42, 3, 42, 3, 42, 3, 43, 3, 43, 3, 43, 3, 44, 3, 44, 3, 44, 3, 45, 3, 45, 3, 45, 3, 46, 3, 46, 3, 46, 3, 47, 3, 47, 3, 47, 3, 48, 3, 48, 3, 48, 3, 49, 3, 49, 3, 49, 3, 49, 3, 50, 3, 50, 3, 50, 3, 50, 3, 51, 3, 51, 3, 51, 3, 52, 3, 52, 3, 52, 3, 53, 3, 53, 3, 53, 3, 54, 3, 54, 3, 54, 3, 55, 3, 55, 3, 55, 3, 56, 5, 56, 293, 10, 56, 3, 56, 6, 56, 296, 10, 56, 13, 56, 14, 56, 297, 3, 57, 7, 57, 301, 10, 57, 12, 57, 14, 57, 304, 11, 57, 3, 57, 6, 57, 307, 10, 57, 13, 57, 14, 57, 308, 3, 57, 3, 57, 6, 57, 313, 10, 57, 13, 57, 14, 57, 314, 3, 58, 3, 58, 7, 58, 319, 10, 58, 12, 58, 14, 58, 322, 11, 58, 3, 58, 3, 58, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 5, 59, 335, 10, 59, 3, 60, 6, 60, 338, 10, 60, 13, 60, 14, 60, 339, 3, 61, 6, 61, 343, 10, 61, 13, 61, 14, 61, 344, 3, 61, 3, 61, 3, 62, 6, 62, 350, 10, 62, 13, 62, 14, 62, 351, 3, 63, 6, 63, 355, 10, 63, 13, 63, 14, 63, 356, 2, 2, 64, 3, 3, 5, 4, 7, 5, 9, 6, 11, 7, 13, 8, 15, 9, 17, 10, 19, 11, 21, 12, 23, 13, 25, 14, 27, 15, 29, 16, 31, 17, 33, 18, 35, 19, 37, 20, 39, 21, 41, 22, 43, 23, 45, 24, 47, 25, 49, 26, 51, 27, 53, 28, 55, 29, 57, 30, 59, 31, 61, 32, 63, 33, 65, 34, 67, 35, 69, 36, 71, 37, 73, 38, 75, 39, 77, 40, 79, 41, 81, 42, 83, 43, 85, 44, 87, 45, 89, 46, 91, 47, 93, 48, 95, 49, 97, 50, 99, 51, 101, 52, 103, 53, 105, 54, 107, 55, 109, 56, 111, 57, 113, 58, 115, 59, 117, 60, 119, 61, 121, 62, 123, 63, 125, 64, 3, 2, 8, 4, 2, 45, 45, 47, 47, 3, 2, 50, 59, 4, 2, 36, 36, 96, 96, 5, 2, 50, 59, 67, 92, 99, 124, 5, 2, 11, 12, 15, 15, 34, 34, 4, 2, 12, 12, 15, 15, 2, 368, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2, 2, 33, 3, 2, 2, 2, 2, 35, 3, 2, 2, 2, 2, 37, 3, 2, 2, 2, 2, 39, 3, 2, 2, 2, 2, 41, 3, 2, 2, 2, 2, 43, 3, 2, 2, 2, 2, 45, 3, 2, 2, 2, 2, 47, 3, 2, 2, 2, 2, 49, 3, 2, 2, 2, 2, 51, 3, 2, 2, 2, 2, 53, 3, 2, 2, 2, 2, 55, 3, 2, 2, 2, 2, 57, 3, 2, 2, 2, 2, 59, 3, 2, 2, 2, 2, 61, 3, 2, 2, 2, 2, 63, 3, 2, 2, 2, 2, 65, 3, 2, 2, 2, 2, 67, 3, 2, 2, 2, 2, 69, 3, 2, 2, 2, 2, 71, 3, 2, 2, 2, 2, 73, 3, 2, 2, 2, 2, 75, 3, 2, 2, 2, 2, 77, 3, 2, 2, 2, 2, 79, 3, 2, 2, 2, 2, 81, 3, 2, 2, 2, 2, 83, 3, 2, 2, 2, 2, 85, 3, 2, 2, 2, 2, 87, 3, 2, 2, 2, 2, 89, 3, 2, 2, 2, 2, 91, 3, 2, 2, 2, 2, 93, 3, 2, 2, 2, 2, 95, 3, 2, 2, 2, 2, 97, 3, 2, 2, 2, 2, 99, 3, 2, 2, 2, 2, 101, 3, 2, 2, 2, 2, 103, 3, 2, 2, 2, 2, 105, 3, 2, 2, 2, 2, 107, 3, 2, 2, 2, 2, 109, 3, 2, 2, 2, 2, 111, 3, 2, 2, 2, 2, 113, 3, 2, 2, 2, 2, 115, 3, 2, 2, 2, 2, 117, 3, 2, 2, 2, 2, 119, 3, 2, 2, 2, 2, 121, 3, 2, 2, 2, 2, 123, 3, 2, 2, 2, 2, 125, 3, 2, 2, 2, 3, 127, 3, 2, 2, 2, 5, 131, 3, 2, 2, 2, 7, 133, 3, 2, 2, 2, 9, 135, 3, 2, 2, 2, 11, 137, 3, 2, 2, 2, 13, 139, 3, 2, 2, 2, 15, 141, 3, 2, 2, 2, 17, 146, 3, 2, 2, 2, 19, 148, 3, 2, 2, 2, 21, 150, 3, 2, 2, 2, 23, 152, 3, 2, 2, 2, 25, 154, 3, 2, 2, 2, 27, 156, 3, 2, 2, 2, 29, 163, 3, 2, 2, 2, 31, 166, 3, 2, 2, 2, 33, 171, 3, 2, 2, 2, 35, 178, 3, 2, 2, 2, 37, 183, 3, 2, 2, 2, 39, 187, 3, 2, 2, 2, 41, 193, 3, 2, 2, 2, 43, 200, 3, 2, 2, 2, 45, 202, 3, 2, 2, 2, 47, 204, 3, 2, 2, 2, 49, 207, 3, 2, 2, 2, 51, 210, 3, 2, 2, 2, 53, 213, 3, 2, 2, 2, 55, 215, 3, 2, 2, 2, 57, 217, 3, 2, 2, 2, 59, 219, 3, 2, 2, 2, 61, 221, 3, 2, 2, 2, 63, 223, 3, 2, 2, 2, 65, 225, 3, 2, 2, 2, 67, 227, 3, 2, 2, 2, 69, 229, 3, 2, 2, 2, 71, 231, 3, 2, 2, 2, 73, 233, 3, 2, 2, 2, 75, 235, 3, 2, 2, 2, 77, 238, 3, 2, 2, 2, 79, 241, 3, 2, 2, 2, 81, 244, 3, 2, 2, 2, 83, 247, 3, 2, 2, 2, 85, 250, 3, 2, 2, 2, 87, 253, 3, 2, 2, 2, 89, 256, 3, 2, 2, 2, 91, 259, 3, 2, 2, 2, 93, 262, 3, 2, 2, 2, 95, 265, 3, 2, 2, 2, 97, 268, 3, 2, 2, 2, 99, 272, 3, 2, 2, 2, 101, 276, 3, 2, 2, 2, 103, 279, 3, 2, 2, 2, 105, 282, 3, 2, 2, 2, 107, 285, 3, 2, 2, 2, 109, 288, 3, 2, 2, 2, 111, 292, 3, 2, 2, 2, 113, 302, 3, 2, 2, 2, 115, 316, 3, 2, 2, 2, 117, 334, 3, 2, 2, 2, 119, 337, 3, 2, 2, 2, 121, 342, 3, 2, 2, 2, 123, 349, 3, 2, 2, 2, 125, 354, 3, 2, 2, 2, 127, 128, 7, 120, 2, 2, 128, 129, 7, 99, 2, 2, 129, 130, 7, 116, 2, 2, 130, 4, 3, 2, 2, 2, 131, 132, 7, 60, 2, 2, 132, 6, 3, 2, 2, 2, 133, 134, 7, 63, 2, 2, 134, 8, 3, 2, 2, 2, 135, 136, 7, 44, 2, 2, 136, 10, 3, 2, 2, 2, 137, 138, 7, 93, 2, 2, 138, 12, 3, 2, 2, 2, 139, 140, 7, 95, 2, 2, 140, 14, 3, 2, 2, 2, 141, 142, 7, 104, 2, 2, 142, 143, 7, 119, 2, 2, 143, 144, 7, 112, 2, 2, 144, 145, 7, 101, 2, 2, 145, 16, 3, 2, 2, 2, 146, 147, 7, 42, 2, 2, 147, 18, 3, 2, 2, 2, 148, 149, 7, 43, 2, 2, 149, 20, 3, 2, 2, 2, 150, 151, 7, 46, 2, 2, 151, 22, 3, 2, 2, 2, 152, 153, 7, 125, 2, 2, 153, 24, 3, 2, 2, 2, 154, 155, 7, 127, 2, 2, 155, 26, 3, 2, 2, 2, 156, 157, 7, 117, 2, 2, 157, 158, 7, 118, 2, 2, 158, 159, 7, 116, 2, 2, 159, 160, 7, 119, 2, 2, 160, 161, 7, 101, 2, 2, 161, 162, 7, 118, 2, 2, 162, 28, 3, 2, 2, 2, 163, 164, 7, 107, 2, 2, 164, 165, 7, 104, 2, 2, 165, 30, 3, 2, 2, 2, 166, 167, 7, 103, 2, 2, 167, 168, 7, 110, 2, 2, 168, 169, 7, 117, 2, 2, 169, 170, 7, 103, 2, 2, 170, 32, 3, 2, 2, 2, 171, 172, 7, 117, 2, 2, 172, 173, 7, 121, 2, 2, 173, 174, 7, 107, 2, 2, 174, 175, 7, 118, 2, 2, 175, 176, 7, 101, 2, 2, 176, 177, 7, 106, 2, 2, 177, 34, 3, 2, 2, 2, 178, 179, 7, 101, 2, 2, 179, 180, 7, 99, 2, 2, 180, 181, 7, 117, 2, 2, 181, 182, 7, 103, 2, 2, 182, 36, 3, 2, 2, 2, 183, 184, 7, 104, 2, 2, 184, 185, 7, 113, 2, 2, 185, 186, 7, 116, 2, 2, 186, 38, 3, 2, 2, 2, 187, 188, 7, 121, 2, 2, 188, 189, 7, 106, 2, 2, 189, 190, 7, 107, 2, 2, 190, 191, 7, 110, 2, 2, 191, 192, 7, 103, 2, 2, 192, 40, 3, 2, 2, 2, 193, 194, 7, 116, 2, 2, 194, 195, 7, 103, 2, 2, 195, 196, 7, 118, 2, 2, 196, 197, 7, 119, 2, 2, 197, 198, 7, 116, 2, 2, 198, 199, 7, 112, 2, 2, 199, 42, 3, 2, 2, 2, 200, 201, 7, 65, 2, 2, 201, 44, 3, 2, 2, 2, 202, 203, 7, 48, 2, 2, 203, 46, 3, 2, 2, 2, 204, 205, 7, 47, 2, 2, 205, 206, 7, 64, 2, 2, 206, 48, 3, 2, 2, 2, 207, 208, 7, 45, 2, 2, 208, 209, 7, 45, 2, 2, 209, 50, 3, 2, 2, 2, 210, 211, 7, 47, 2, 2, 211, 212, 7, 47, 2, 2, 212, 52, 3, 2, 2, 2, 213, 214, 7, 45, 2, 2, 214, 54, 3, 2, 2, 2, 215, 216, 7, 47, 2, 2, 216, 56, 3, 2, 2, 2, 217, 218, 7, 35, 2, 2, 218, 58, 3, 2, 2, 2, 219, 220, 7, 128, 2, 2, 220, 60, 3, 2, 2, 2, 221, 222, 7, 40, 2, 2, 222, 62, 3, 2, 2, 2, 223, 224, 7, 49, 2, 2, 224, 64, 3, 2, 2, 2, 225, 226, 7, 39, 2, 2, 226, 66, 3, 2, 2, 2, 227, 228, 7, 62, 2, 2, 228, 68, 3, 2, 2, 2, 229, 230, 7, 126, 2, 2, 230, 70, 3, 2, 2, 2, 231, 232, 7, 96, 2, 2, 232, 72, 3, 2, 2, 2, 233, 234, 7, 64, 2, 2, 234, 74, 3, 2, 2, 2, 235, 236, 7, 63, 2, 2, 236, 237, 7, 63, 2, 2, 237, 76, 3, 2, 2, 2, 238, 239, 7, 35, 2, 2, 239, 240, 7, 63, 2, 2, 240, 78, 3, 2, 2, 2, 241, 242, 7, 62, 2, 2, 242, 243, 7, 63, 2, 2, 243, 80, 3, 2, 2, 2, 244, 245, 7, 64, 2, 2, 245, 246, 7, 63, 2, 2, 246, 82, 3, 2, 2, 2, 247, 248, 7, 62, 2, 2, 248, 249, 7, 62, 2, 2, 249, 84, 3, 2, 2, 2, 250, 251, 7, 64, 2, 2, 251, 252, 7, 64, 2, 2, 252, 86, 3, 2, 2, 2, 253, 254, 7, 126, 2, 2, 254, 255, 7, 126, 2, 2, 255, 88, 3, 2, 2, 2, 256, 257, 7, 40, 2, 2, 257, 258, 7, 40, 2, 2, 258, 90, 3, 2, 2, 2, 259, 260, 7, 40, 2, 2, 260, 261, 7, 63, 2, 2, 261, 92, 3, 2, 2, 2, 262, 263, 7, 126, 2, 2, 263, 264, 7, 63, 2, 2, 264, 94, 3, 2, 2, 2, 265, 266, 7, 96, 2, 2, 266, 267, 7, 63, 2, 2, 267, 96, 3, 2, 2, 2, 268, 269, 7, 62, 2, 2, 269, 270, 7, 62, 2, 2, 270, 271, 7, 63, 2, 2, 271, 98, 3, 2, 2, 2, 272, 273, 7, 64, 2, 2, 273, 274, 7, 64, 2, 2, 274, 275, 7, 63, 2, 2, 275, 100, 3, 2, 2, 2, 276, 277, 7, 45, 2, 2, 277, 278, 7, 63, 2, 2, 278, 102, 3, 2, 2, 2, 279, 280, 7, 47, 2, 2, 280, 281, 7, 63, 2, 2, 281, 104, 3, 2, 2, 2, 282, 283, 7, 44, 2, 2, 283, 284, 7, 63, 2, 2, 284, 106, 3, 2, 2, 2, 285, 286, 7, 49, 2, 2, 286, 287, 7, 63, 2, 2, 287, 108, 3, 2, 2, 2, 288, 289, 7, 39, 2, 2, 289, 290, 7, 63, 2, 2, 290, 110, 3, 2, 2, 2, 291, 293, 9, 2, 2, 2, 292, 291, 3, 2, 2, 2, 292, 293, 3, 2, 2, 2, 293, 295, 3, 2, 2, 2, 294, 296, 9, 3, 2, 2, 295, 294, 3, 2, 2, 2, 296, 297, 3, 2, 2, 2, 297, 295, 3, 2, 2, 2, 297, 298, 3, 2, 2, 2, 298, 112, 3, 2, 2, 2, 299, 301, 9, 2, 2, 2, 300, 299, 3, 2, 2, 2, 301, 304, 3, 2, 2, 2, 302, 300, 3, 2, 2, 2, 302, 303, 3, 2, 2, 2, 303, 306, 3, 2, 2, 2, 304, 302, 3, 2, 2, 2, 305, 307, 9, 3, 2, 2, 306, 305, 3, 2, 2, 2, 307, 308, 3, 2, 2, 2, 308, 306, 3, 2, 2, 2, 308, 309, 3, 2, 2, 2, 309, 310, 3, 2, 2, 2, 310, 312, 7, 48, 2, 2, 311, 313, 9, 3, 2, 2, 312, 311, 3, 2, 2, 2, 313, 314, 3, 2, 2, 2, 314, 312, 3, 2, 2, 2, 314, 315, 3, 2, 2, 2, 315, 114, 3, 2, 2, 2, 316, 320, 7, 36, 2, 2, 317, 319, 9, 4, 2, 2, 318, 317, 3, 2, 2, 2, 319, 322, 3, 2, 2, 2, 320, 318, 3, 2, 2, 2, 320, 321, 3, 2, 2, 2, 321, 323, 3, 2, 2, 2, 322, 320, 3, 2, 2, 2, 323, 324, 7, 36, 2, 2, 324, 116, 3, 2, 2, 2, 325, 326, 7, 118, 2, 2, 326, 327, 7, 116, 2, 2, 327, 328, 7, 119, 2, 2, 328, 335, 7, 103, 2, 2, 329, 330, 7, 104, 2, 2, 330, 331, 7, 99, 2, 2, 331, 332, 7, 110, 2, 2, 332, 333, 7, 117, 2, 2, 333, 335, 7, 103, 2, 2, 334, 325, 3, 2, 2, 2, 334, 329, 3, 2, 2, 2, 335, 118, 3, 2, 2, 2, 336, 338, 9, 5, 2, 2, 337, 336, 3, 2, 2, 2, 338, 339, 3, 2, 2, 2, 339, 337, 3, 2, 2, 2, 339, 340, 3, 2, 2, 2, 340, 120, 3, 2, 2, 2, 341, 343, 9, 6, 2, 2, 342, 341, 3, 2, 2, 2, 343, 344, 3, 2, 2, 2, 344, 342, 3, 2, 2, 2, 344, 345, 3, 2, 2, 2, 345, 346, 3, 2, 2, 2, 346, 347, 8, 61, 2, 2, 347, 122, 3, 2, 2, 2, 348, 350, 9, 7, 2, 2, 349, 348, 3, 2, 2, 2, 350, 351, 3, 2, 2, 2, 351, 349, 3, 2, 2, 2, 351, 352, 3, 2, 2, 2, 352, 124, 3, 2, 2, 2, 353, 355, 9, 3, 2, 2, 354, 353, 3, 2, 2, 2, 355, 356, 3, 2, 2, 2, 356, 354, 3, 2, 2, 2, 356, 357, 3, 2, 2, 2, 357, 126, 3, 2, 2, 2, 15, 2, 292, 297, 302, 308, 314, 320, 334, 337, 339, 344, 351, 356, 3, 8, 2, 2] \ No newline at end of file diff --git a/gen/TocLexer.tokens b/gen/TocLexer.tokens index ccfc5b5..446ddcd 100644 --- a/gen/TocLexer.tokens +++ b/gen/TocLexer.tokens @@ -21,17 +21,45 @@ T__19=20 T__20=21 T__21=22 T__22=23 -POSTFIX_OP=24 -PREFIX_OP=25 -BINARY_OP=26 -INT_LIT=27 -DECIMAL_LIT=28 -STRING_LIT=29 -BOOL_LIT=30 -NAME=31 -WS=32 -NEWLINE=33 -NUMBER=34 +T__23=24 +T__24=25 +T__25=26 +T__26=27 +T__27=28 +T__28=29 +T__29=30 +T__30=31 +T__31=32 +T__32=33 +T__33=34 +T__34=35 +T__35=36 +T__36=37 +T__37=38 +T__38=39 +T__39=40 +T__40=41 +T__41=42 +T__42=43 +T__43=44 +T__44=45 +T__45=46 +T__46=47 +T__47=48 +T__48=49 +T__49=50 +T__50=51 +T__51=52 +T__52=53 +T__53=54 +INT_LIT=55 +DECIMAL_LIT=56 +STRING_LIT=57 +BOOL_LIT=58 +NAME=59 +WS=60 +NEWLINE=61 +NUMBER=62 'var'=1 ':'=2 '='=3 @@ -55,3 +83,34 @@ NUMBER=34 '?'=21 '.'=22 '->'=23 +'++'=24 +'--'=25 +'+'=26 +'-'=27 +'!'=28 +'~'=29 +'&'=30 +'/'=31 +'%'=32 +'<'=33 +'|'=34 +'^'=35 +'>'=36 +'=='=37 +'!='=38 +'<='=39 +'>='=40 +'<<'=41 +'>>'=42 +'||'=43 +'&&'=44 +'&='=45 +'|='=46 +'^='=47 +'<<='=48 +'>>='=49 +'+='=50 +'-='=51 +'*='=52 +'/='=53 +'%='=54 diff --git a/gen/TocListener.h b/gen/TocListener.h index aa72186..d3297f0 100644 --- a/gen/TocListener.h +++ b/gen/TocListener.h @@ -65,12 +65,21 @@ public: virtual void enterIfStmt(TocParser::IfStmtContext *ctx) = 0; virtual void exitIfStmt(TocParser::IfStmtContext *ctx) = 0; + virtual void enterElseIfStmt(TocParser::ElseIfStmtContext *ctx) = 0; + virtual void exitElseIfStmt(TocParser::ElseIfStmtContext *ctx) = 0; + + virtual void enterElseStmt(TocParser::ElseStmtContext *ctx) = 0; + virtual void exitElseStmt(TocParser::ElseStmtContext *ctx) = 0; + virtual void enterSwitchStmt(TocParser::SwitchStmtContext *ctx) = 0; virtual void exitSwitchStmt(TocParser::SwitchStmtContext *ctx) = 0; virtual void enterSwitchBody(TocParser::SwitchBodyContext *ctx) = 0; virtual void exitSwitchBody(TocParser::SwitchBodyContext *ctx) = 0; + virtual void enterSwitchCase(TocParser::SwitchCaseContext *ctx) = 0; + virtual void exitSwitchCase(TocParser::SwitchCaseContext *ctx) = 0; + virtual void enterForStmt(TocParser::ForStmtContext *ctx) = 0; virtual void exitForStmt(TocParser::ForStmtContext *ctx) = 0; @@ -119,6 +128,15 @@ public: virtual void enterAccessExpr(TocParser::AccessExprContext *ctx) = 0; virtual void exitAccessExpr(TocParser::AccessExprContext *ctx) = 0; + virtual void enterAccessSubExpr(TocParser::AccessSubExprContext *ctx) = 0; + virtual void exitAccessSubExpr(TocParser::AccessSubExprContext *ctx) = 0; + + virtual void enterAccessMember(TocParser::AccessMemberContext *ctx) = 0; + virtual void exitAccessMember(TocParser::AccessMemberContext *ctx) = 0; + + virtual void enterAccessBrackets(TocParser::AccessBracketsContext *ctx) = 0; + virtual void exitAccessBrackets(TocParser::AccessBracketsContext *ctx) = 0; + virtual void enterParenExpr(TocParser::ParenExprContext *ctx) = 0; virtual void exitParenExpr(TocParser::ParenExprContext *ctx) = 0; @@ -134,6 +152,15 @@ public: virtual void enterStructName(TocParser::StructNameContext *ctx) = 0; virtual void exitStructName(TocParser::StructNameContext *ctx) = 0; + virtual void enterPostfix_op(TocParser::Postfix_opContext *ctx) = 0; + virtual void exitPostfix_op(TocParser::Postfix_opContext *ctx) = 0; + + virtual void enterPrefix_op(TocParser::Prefix_opContext *ctx) = 0; + virtual void exitPrefix_op(TocParser::Prefix_opContext *ctx) = 0; + + virtual void enterBinary_op(TocParser::Binary_opContext *ctx) = 0; + virtual void exitBinary_op(TocParser::Binary_opContext *ctx) = 0; + }; diff --git a/gen/TocParser.cpp b/gen/TocParser.cpp index e1d5b1f..0088f72 100644 --- a/gen/TocParser.cpp +++ b/gen/TocParser.cpp @@ -80,20 +80,20 @@ TocParser::ProgContext* TocParser::prog() { }); try { enterOuterAlt(_localctx, 1); - setState(81); + setState(99); _errHandler->sync(this); _la = _input->LA(1); do { - setState(80); + setState(98); decl(); - setState(83); + setState(101); _errHandler->sync(this); _la = _input->LA(1); } while ((((_la & ~ 0x3fULL) == 0) && ((1ULL << _la) & ((1ULL << TocParser::T__0) | (1ULL << TocParser::T__6) | (1ULL << TocParser::T__12))) != 0)); - setState(85); + setState(103); match(TocParser::EOF); } @@ -153,26 +153,26 @@ TocParser::DeclContext* TocParser::decl() { exitRule(); }); try { - setState(90); + setState(108); _errHandler->sync(this); switch (_input->LA(1)) { case TocParser::T__0: { enterOuterAlt(_localctx, 1); - setState(87); + setState(105); varDecl(); break; } case TocParser::T__6: { enterOuterAlt(_localctx, 2); - setState(88); + setState(106); funcDecl(); break; } case TocParser::T__12: { enterOuterAlt(_localctx, 3); - setState(89); + setState(107); structDecl(); break; } @@ -231,9 +231,9 @@ TocParser::VarDeclContext* TocParser::varDecl() { }); try { enterOuterAlt(_localctx, 1); - setState(92); + setState(110); match(TocParser::T__0); - setState(93); + setState(111); var(); } @@ -295,21 +295,21 @@ TocParser::VarContext* TocParser::var() { }); try { enterOuterAlt(_localctx, 1); - setState(95); + setState(113); varName(); - setState(96); + setState(114); match(TocParser::T__1); - setState(97); + setState(115); type(); - setState(101); + setState(119); _errHandler->sync(this); _la = _input->LA(1); if (_la == TocParser::T__2) { - setState(99); + setState(117); match(TocParser::T__2); - setState(100); + setState(118); expr(); } @@ -371,17 +371,17 @@ TocParser::VarInitContext* TocParser::varInit() { }); try { enterOuterAlt(_localctx, 1); - setState(103); + setState(121); varName(); - setState(104); + setState(122); match(TocParser::T__1); - setState(105); + setState(123); type(); - setState(107); + setState(125); match(TocParser::T__2); - setState(108); + setState(126); expr(); } @@ -432,7 +432,6 @@ void TocParser::TypeContext::exitRule(tree::ParseTreeListener *listener) { TocParser::TypeContext* TocParser::type() { TypeContext *_localctx = _tracker.createInstance(_ctx, getState()); enterRule(_localctx, 10, TocParser::RuleType); - size_t _la = 0; #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -442,20 +441,21 @@ TocParser::TypeContext* TocParser::type() { exitRule(); }); try { + size_t alt; enterOuterAlt(_localctx, 1); - setState(110); + setState(128); typeName(); - setState(114); + setState(132); _errHandler->sync(this); - _la = _input->LA(1); - while (_la == TocParser::T__3 - - || _la == TocParser::T__4) { - setState(111); - typeModifier(); - setState(116); + alt = getInterpreter()->adaptivePredict(_input, 3, _ctx); + while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { + if (alt == 1) { + setState(129); + typeModifier(); + } + setState(134); _errHandler->sync(this); - _la = _input->LA(1); + alt = getInterpreter()->adaptivePredict(_input, 3, _ctx); } } @@ -508,29 +508,29 @@ TocParser::TypeModifierContext* TocParser::typeModifier() { exitRule(); }); try { - setState(123); + setState(141); _errHandler->sync(this); switch (_input->LA(1)) { case TocParser::T__3: { enterOuterAlt(_localctx, 1); - setState(117); + setState(135); match(TocParser::T__3); break; } case TocParser::T__4: { enterOuterAlt(_localctx, 2); - setState(118); + setState(136); match(TocParser::T__4); - setState(120); + setState(138); _errHandler->sync(this); _la = _input->LA(1); if (_la == TocParser::NUMBER) { - setState(119); + setState(137); match(TocParser::NUMBER); } - setState(122); + setState(140); match(TocParser::T__5); break; } @@ -589,9 +589,9 @@ TocParser::FuncDeclContext* TocParser::funcDecl() { }); try { enterOuterAlt(_localctx, 1); - setState(125); + setState(143); match(TocParser::T__6); - setState(126); + setState(144); func(); } @@ -656,20 +656,20 @@ TocParser::FuncContext* TocParser::func() { }); try { enterOuterAlt(_localctx, 1); - setState(128); + setState(146); funcName(); - setState(129); + setState(147); match(TocParser::T__7); - setState(130); + setState(148); parameter(); - setState(131); + setState(149); match(TocParser::T__8); - setState(132); + setState(150); match(TocParser::T__1); - setState(133); + setState(151); type(); - setState(135); + setState(153); body(); } @@ -727,22 +727,22 @@ TocParser::ParameterContext* TocParser::parameter() { }); try { enterOuterAlt(_localctx, 1); - setState(145); + setState(163); _errHandler->sync(this); _la = _input->LA(1); if (_la == TocParser::NAME) { - setState(137); + setState(155); var(); - setState(142); + setState(160); _errHandler->sync(this); _la = _input->LA(1); while (_la == TocParser::T__9) { - setState(138); + setState(156); match(TocParser::T__9); - setState(139); + setState(157); var(); - setState(144); + setState(162); _errHandler->sync(this); _la = _input->LA(1); } @@ -803,32 +803,39 @@ TocParser::BodyContext* TocParser::body() { }); try { enterOuterAlt(_localctx, 1); - setState(147); + setState(165); match(TocParser::T__10); - setState(151); + setState(169); _errHandler->sync(this); _la = _input->LA(1); while ((((_la & ~ 0x3fULL) == 0) && ((1ULL << _la) & ((1ULL << TocParser::T__0) + | (1ULL << TocParser::T__3) | (1ULL << TocParser::T__7) | (1ULL << TocParser::T__13) | (1ULL << TocParser::T__15) | (1ULL << TocParser::T__17) | (1ULL << TocParser::T__18) | (1ULL << TocParser::T__19) - | (1ULL << TocParser::PREFIX_OP) + | (1ULL << TocParser::T__23) + | (1ULL << TocParser::T__24) + | (1ULL << TocParser::T__25) + | (1ULL << TocParser::T__26) + | (1ULL << TocParser::T__27) + | (1ULL << TocParser::T__28) + | (1ULL << TocParser::T__29) | (1ULL << TocParser::INT_LIT) | (1ULL << TocParser::DECIMAL_LIT) | (1ULL << TocParser::STRING_LIT) | (1ULL << TocParser::BOOL_LIT) | (1ULL << TocParser::NAME))) != 0)) { - setState(148); + setState(166); stmt(); - setState(153); + setState(171); _errHandler->sync(this); _la = _input->LA(1); } - setState(154); + setState(172); match(TocParser::T__11); } @@ -890,23 +897,23 @@ TocParser::StructDeclContext* TocParser::structDecl() { }); try { enterOuterAlt(_localctx, 1); - setState(156); + setState(174); match(TocParser::T__12); - setState(157); + setState(175); structName(); - setState(158); + setState(176); match(TocParser::T__10); - setState(162); + setState(180); _errHandler->sync(this); _la = _input->LA(1); while (_la == TocParser::NAME) { - setState(159); + setState(177); structMember(); - setState(164); + setState(182); _errHandler->sync(this); _la = _input->LA(1); } - setState(165); + setState(183); match(TocParser::T__11); } @@ -962,19 +969,19 @@ TocParser::StructMemberContext* TocParser::structMember() { exitRule(); }); try { - setState(169); + setState(187); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 10, _ctx)) { case 1: { enterOuterAlt(_localctx, 1); - setState(167); + setState(185); structVar(); break; } case 2: { enterOuterAlt(_localctx, 2); - setState(168); + setState(186); structMethod(); break; } @@ -1033,7 +1040,7 @@ TocParser::StructVarContext* TocParser::structVar() { }); try { enterOuterAlt(_localctx, 1); - setState(171); + setState(189); var(); } @@ -1086,7 +1093,7 @@ TocParser::StructMethodContext* TocParser::structMethod() { }); try { enterOuterAlt(_localctx, 1); - setState(173); + setState(191); func(); } @@ -1166,61 +1173,61 @@ TocParser::StmtContext* TocParser::stmt() { exitRule(); }); try { - setState(183); + setState(201); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 11, _ctx)) { case 1: { enterOuterAlt(_localctx, 1); - setState(175); + setState(193); varDecl(); break; } case 2: { enterOuterAlt(_localctx, 2); - setState(176); + setState(194); ifStmt(); break; } case 3: { enterOuterAlt(_localctx, 3); - setState(177); + setState(195); switchStmt(); break; } case 4: { enterOuterAlt(_localctx, 4); - setState(178); + setState(196); forStmt(); break; } case 5: { enterOuterAlt(_localctx, 5); - setState(179); + setState(197); whileStmt(); break; } case 6: { enterOuterAlt(_localctx, 6); - setState(180); + setState(198); assignStmt(); break; } case 7: { enterOuterAlt(_localctx, 7); - setState(181); + setState(199); returnStmt(); break; } case 8: { enterOuterAlt(_localctx, 8); - setState(182); + setState(200); expr(); break; } @@ -1245,20 +1252,24 @@ TocParser::IfStmtContext::IfStmtContext(ParserRuleContext *parent, size_t invoki : ParserRuleContext(parent, invokingState) { } -std::vector TocParser::IfStmtContext::expr() { - return getRuleContexts(); +TocParser::ExprContext* TocParser::IfStmtContext::expr() { + return getRuleContext(0); } -TocParser::ExprContext* TocParser::IfStmtContext::expr(size_t i) { - return getRuleContext(i); +TocParser::BodyContext* TocParser::IfStmtContext::body() { + return getRuleContext(0); +} + +std::vector TocParser::IfStmtContext::elseIfStmt() { + return getRuleContexts(); } -std::vector TocParser::IfStmtContext::body() { - return getRuleContexts(); +TocParser::ElseIfStmtContext* TocParser::IfStmtContext::elseIfStmt(size_t i) { + return getRuleContext(i); } -TocParser::BodyContext* TocParser::IfStmtContext::body(size_t i) { - return getRuleContext(i); +TocParser::ElseStmtContext* TocParser::IfStmtContext::elseStmt() { + return getRuleContext(0); } @@ -1293,39 +1304,31 @@ TocParser::IfStmtContext* TocParser::ifStmt() { try { size_t alt; enterOuterAlt(_localctx, 1); - setState(185); + setState(203); match(TocParser::T__13); - setState(186); + setState(204); expr(); - setState(187); + setState(205); body(); - setState(195); + setState(209); _errHandler->sync(this); alt = getInterpreter()->adaptivePredict(_input, 12, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(188); - match(TocParser::T__14); - setState(189); - match(TocParser::T__13); - setState(190); - expr(); - setState(191); - body(); + setState(206); + elseIfStmt(); } - setState(197); + setState(211); _errHandler->sync(this); alt = getInterpreter()->adaptivePredict(_input, 12, _ctx); } - setState(200); + setState(213); _errHandler->sync(this); _la = _input->LA(1); if (_la == TocParser::T__14) { - setState(198); - match(TocParser::T__14); - setState(199); - body(); + setState(212); + elseStmt(); } } @@ -1338,6 +1341,124 @@ TocParser::IfStmtContext* TocParser::ifStmt() { return _localctx; } +//----------------- ElseIfStmtContext ------------------------------------------------------------------ + +TocParser::ElseIfStmtContext::ElseIfStmtContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +TocParser::ExprContext* TocParser::ElseIfStmtContext::expr() { + return getRuleContext(0); +} + +TocParser::BodyContext* TocParser::ElseIfStmtContext::body() { + return getRuleContext(0); +} + + +size_t TocParser::ElseIfStmtContext::getRuleIndex() const { + return TocParser::RuleElseIfStmt; +} + +void TocParser::ElseIfStmtContext::enterRule(tree::ParseTreeListener *listener) { + auto parserListener = dynamic_cast(listener); + if (parserListener != nullptr) + parserListener->enterElseIfStmt(this); +} + +void TocParser::ElseIfStmtContext::exitRule(tree::ParseTreeListener *listener) { + auto parserListener = dynamic_cast(listener); + if (parserListener != nullptr) + parserListener->exitElseIfStmt(this); +} + +TocParser::ElseIfStmtContext* TocParser::elseIfStmt() { + ElseIfStmtContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 34, TocParser::RuleElseIfStmt); + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(215); + match(TocParser::T__14); + setState(216); + match(TocParser::T__13); + setState(217); + expr(); + setState(218); + body(); + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- ElseStmtContext ------------------------------------------------------------------ + +TocParser::ElseStmtContext::ElseStmtContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +TocParser::BodyContext* TocParser::ElseStmtContext::body() { + return getRuleContext(0); +} + + +size_t TocParser::ElseStmtContext::getRuleIndex() const { + return TocParser::RuleElseStmt; +} + +void TocParser::ElseStmtContext::enterRule(tree::ParseTreeListener *listener) { + auto parserListener = dynamic_cast(listener); + if (parserListener != nullptr) + parserListener->enterElseStmt(this); +} + +void TocParser::ElseStmtContext::exitRule(tree::ParseTreeListener *listener) { + auto parserListener = dynamic_cast(listener); + if (parserListener != nullptr) + parserListener->exitElseStmt(this); +} + +TocParser::ElseStmtContext* TocParser::elseStmt() { + ElseStmtContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 36, TocParser::RuleElseStmt); + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(220); + match(TocParser::T__14); + setState(221); + body(); + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + //----------------- SwitchStmtContext ------------------------------------------------------------------ TocParser::SwitchStmtContext::SwitchStmtContext(ParserRuleContext *parent, size_t invokingState) @@ -1371,7 +1492,7 @@ void TocParser::SwitchStmtContext::exitRule(tree::ParseTreeListener *listener) { TocParser::SwitchStmtContext* TocParser::switchStmt() { SwitchStmtContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 34, TocParser::RuleSwitchStmt); + enterRule(_localctx, 38, TocParser::RuleSwitchStmt); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -1382,11 +1503,11 @@ TocParser::SwitchStmtContext* TocParser::switchStmt() { }); try { enterOuterAlt(_localctx, 1); - setState(202); + setState(223); match(TocParser::T__15); - setState(203); + setState(224); identifierExpr(); - setState(204); + setState(225); switchBody(); } @@ -1405,20 +1526,12 @@ TocParser::SwitchBodyContext::SwitchBodyContext(ParserRuleContext *parent, size_ : ParserRuleContext(parent, invokingState) { } -std::vector TocParser::SwitchBodyContext::expr() { - return getRuleContexts(); -} - -TocParser::ExprContext* TocParser::SwitchBodyContext::expr(size_t i) { - return getRuleContext(i); -} - -std::vector TocParser::SwitchBodyContext::body() { - return getRuleContexts(); +std::vector TocParser::SwitchBodyContext::switchCase() { + return getRuleContexts(); } -TocParser::BodyContext* TocParser::SwitchBodyContext::body(size_t i) { - return getRuleContext(i); +TocParser::SwitchCaseContext* TocParser::SwitchBodyContext::switchCase(size_t i) { + return getRuleContext(i); } @@ -1440,7 +1553,7 @@ void TocParser::SwitchBodyContext::exitRule(tree::ParseTreeListener *listener) { TocParser::SwitchBodyContext* TocParser::switchBody() { SwitchBodyContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 36, TocParser::RuleSwitchBody); + enterRule(_localctx, 40, TocParser::RuleSwitchBody); size_t _la = 0; #if __cplusplus > 201703L @@ -1452,23 +1565,19 @@ TocParser::SwitchBodyContext* TocParser::switchBody() { }); try { enterOuterAlt(_localctx, 1); - setState(206); + setState(227); match(TocParser::T__10); - setState(213); + setState(231); _errHandler->sync(this); _la = _input->LA(1); while (_la == TocParser::T__16) { - setState(207); - match(TocParser::T__16); - setState(208); - expr(); - setState(209); - body(); - setState(215); + setState(228); + switchCase(); + setState(233); _errHandler->sync(this); _la = _input->LA(1); } - setState(216); + setState(234); match(TocParser::T__11); } @@ -1481,6 +1590,67 @@ TocParser::SwitchBodyContext* TocParser::switchBody() { return _localctx; } +//----------------- SwitchCaseContext ------------------------------------------------------------------ + +TocParser::SwitchCaseContext::SwitchCaseContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +TocParser::ExprContext* TocParser::SwitchCaseContext::expr() { + return getRuleContext(0); +} + +TocParser::BodyContext* TocParser::SwitchCaseContext::body() { + return getRuleContext(0); +} + + +size_t TocParser::SwitchCaseContext::getRuleIndex() const { + return TocParser::RuleSwitchCase; +} + +void TocParser::SwitchCaseContext::enterRule(tree::ParseTreeListener *listener) { + auto parserListener = dynamic_cast(listener); + if (parserListener != nullptr) + parserListener->enterSwitchCase(this); +} + +void TocParser::SwitchCaseContext::exitRule(tree::ParseTreeListener *listener) { + auto parserListener = dynamic_cast(listener); + if (parserListener != nullptr) + parserListener->exitSwitchCase(this); +} + +TocParser::SwitchCaseContext* TocParser::switchCase() { + SwitchCaseContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 42, TocParser::RuleSwitchCase); + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(236); + match(TocParser::T__16); + setState(237); + expr(); + setState(238); + body(); + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + //----------------- ForStmtContext ------------------------------------------------------------------ TocParser::ForStmtContext::ForStmtContext(ParserRuleContext *parent, size_t invokingState) @@ -1526,7 +1696,7 @@ void TocParser::ForStmtContext::exitRule(tree::ParseTreeListener *listener) { TocParser::ForStmtContext* TocParser::forStmt() { ForStmtContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 38, TocParser::RuleForStmt); + enterRule(_localctx, 44, TocParser::RuleForStmt); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -1537,19 +1707,19 @@ TocParser::ForStmtContext* TocParser::forStmt() { }); try { enterOuterAlt(_localctx, 1); - setState(218); + setState(240); match(TocParser::T__17); - setState(221); + setState(243); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 15, _ctx)) { case 1: { - setState(219); + setState(241); varInit(); break; } case 2: { - setState(220); + setState(242); assignStmt(); break; } @@ -1557,15 +1727,15 @@ TocParser::ForStmtContext* TocParser::forStmt() { default: break; } - setState(223); + setState(245); match(TocParser::T__9); - setState(224); + setState(246); expr(); - setState(225); + setState(247); match(TocParser::T__9); - setState(226); + setState(248); expr(); - setState(227); + setState(249); body(); } @@ -1611,7 +1781,7 @@ void TocParser::WhileStmtContext::exitRule(tree::ParseTreeListener *listener) { TocParser::WhileStmtContext* TocParser::whileStmt() { WhileStmtContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 40, TocParser::RuleWhileStmt); + enterRule(_localctx, 46, TocParser::RuleWhileStmt); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -1622,11 +1792,11 @@ TocParser::WhileStmtContext* TocParser::whileStmt() { }); try { enterOuterAlt(_localctx, 1); - setState(229); + setState(251); match(TocParser::T__18); - setState(230); + setState(252); expr(); - setState(231); + setState(253); body(); } @@ -1672,7 +1842,7 @@ void TocParser::AssignStmtContext::exitRule(tree::ParseTreeListener *listener) { TocParser::AssignStmtContext* TocParser::assignStmt() { AssignStmtContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 42, TocParser::RuleAssignStmt); + enterRule(_localctx, 48, TocParser::RuleAssignStmt); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -1683,11 +1853,11 @@ TocParser::AssignStmtContext* TocParser::assignStmt() { }); try { enterOuterAlt(_localctx, 1); - setState(233); + setState(255); identifierExpr(); - setState(234); + setState(256); match(TocParser::T__2); - setState(235); + setState(257); expr(); } @@ -1729,7 +1899,7 @@ void TocParser::ReturnStmtContext::exitRule(tree::ParseTreeListener *listener) { TocParser::ReturnStmtContext* TocParser::returnStmt() { ReturnStmtContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 44, TocParser::RuleReturnStmt); + enterRule(_localctx, 50, TocParser::RuleReturnStmt); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -1740,9 +1910,9 @@ TocParser::ReturnStmtContext* TocParser::returnStmt() { }); try { enterOuterAlt(_localctx, 1); - setState(237); + setState(259); match(TocParser::T__19); - setState(238); + setState(260); expr(); } @@ -1804,7 +1974,7 @@ void TocParser::ExprContext::exitRule(tree::ParseTreeListener *listener) { TocParser::ExprContext* TocParser::expr() { ExprContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 46, TocParser::RuleExpr); + enterRule(_localctx, 52, TocParser::RuleExpr); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -1814,47 +1984,47 @@ TocParser::ExprContext* TocParser::expr() { exitRule(); }); try { - setState(246); + setState(268); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 16, _ctx)) { case 1: { enterOuterAlt(_localctx, 1); - setState(240); + setState(262); funcExpr(); break; } case 2: { enterOuterAlt(_localctx, 2); - setState(241); + setState(263); litExpr(); break; } case 3: { enterOuterAlt(_localctx, 3); - setState(242); + setState(264); identifierExpr(); break; } case 4: { enterOuterAlt(_localctx, 4); - setState(243); + setState(265); parenExpr(); break; } case 5: { enterOuterAlt(_localctx, 5); - setState(244); + setState(266); accessExpr(); break; } case 6: { enterOuterAlt(_localctx, 6); - setState(245); + setState(267); opExpr(); break; } @@ -1918,7 +2088,7 @@ void TocParser::NonOpExprContext::exitRule(tree::ParseTreeListener *listener) { TocParser::NonOpExprContext* TocParser::nonOpExpr() { NonOpExprContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 48, TocParser::RuleNonOpExpr); + enterRule(_localctx, 54, TocParser::RuleNonOpExpr); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -1928,40 +2098,40 @@ TocParser::NonOpExprContext* TocParser::nonOpExpr() { exitRule(); }); try { - setState(253); + setState(275); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 17, _ctx)) { case 1: { enterOuterAlt(_localctx, 1); - setState(248); + setState(270); funcExpr(); break; } case 2: { enterOuterAlt(_localctx, 2); - setState(249); + setState(271); litExpr(); break; } case 3: { enterOuterAlt(_localctx, 3); - setState(250); + setState(272); identifierExpr(); break; } case 4: { enterOuterAlt(_localctx, 4); - setState(251); + setState(273); parenExpr(); break; } case 5: { enterOuterAlt(_localctx, 5); - setState(252); + setState(274); accessExpr(); break; } @@ -2017,7 +2187,7 @@ void TocParser::NonAccessExprContext::exitRule(tree::ParseTreeListener *listener TocParser::NonAccessExprContext* TocParser::nonAccessExpr() { NonAccessExprContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 50, TocParser::RuleNonAccessExpr); + enterRule(_localctx, 56, TocParser::RuleNonAccessExpr); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -2027,26 +2197,26 @@ TocParser::NonAccessExprContext* TocParser::nonAccessExpr() { exitRule(); }); try { - setState(258); + setState(280); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 18, _ctx)) { case 1: { enterOuterAlt(_localctx, 1); - setState(255); + setState(277); funcExpr(); break; } case 2: { enterOuterAlt(_localctx, 2); - setState(256); + setState(278); identifierExpr(); break; } case 3: { enterOuterAlt(_localctx, 3); - setState(257); + setState(279); parenExpr(); break; } @@ -2102,7 +2272,7 @@ void TocParser::FuncExprContext::exitRule(tree::ParseTreeListener *listener) { TocParser::FuncExprContext* TocParser::funcExpr() { FuncExprContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 52, TocParser::RuleFuncExpr); + enterRule(_localctx, 58, TocParser::RuleFuncExpr); size_t _la = 0; #if __cplusplus > 201703L @@ -2114,38 +2284,45 @@ TocParser::FuncExprContext* TocParser::funcExpr() { }); try { enterOuterAlt(_localctx, 1); - setState(260); + setState(282); funcName(); - setState(261); + setState(283); match(TocParser::T__7); - setState(270); + setState(292); _errHandler->sync(this); _la = _input->LA(1); if ((((_la & ~ 0x3fULL) == 0) && - ((1ULL << _la) & ((1ULL << TocParser::T__7) - | (1ULL << TocParser::PREFIX_OP) + ((1ULL << _la) & ((1ULL << TocParser::T__3) + | (1ULL << TocParser::T__7) + | (1ULL << TocParser::T__23) + | (1ULL << TocParser::T__24) + | (1ULL << TocParser::T__25) + | (1ULL << TocParser::T__26) + | (1ULL << TocParser::T__27) + | (1ULL << TocParser::T__28) + | (1ULL << TocParser::T__29) | (1ULL << TocParser::INT_LIT) | (1ULL << TocParser::DECIMAL_LIT) | (1ULL << TocParser::STRING_LIT) | (1ULL << TocParser::BOOL_LIT) | (1ULL << TocParser::NAME))) != 0)) { - setState(262); + setState(284); expr(); - setState(267); + setState(289); _errHandler->sync(this); _la = _input->LA(1); while (_la == TocParser::T__9) { - setState(263); + setState(285); match(TocParser::T__9); - setState(264); + setState(286); expr(); - setState(269); + setState(291); _errHandler->sync(this); _la = _input->LA(1); } } - setState(272); + setState(294); match(TocParser::T__8); } @@ -2199,7 +2376,7 @@ void TocParser::OpExprContext::exitRule(tree::ParseTreeListener *listener) { TocParser::OpExprContext* TocParser::opExpr() { OpExprContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 54, TocParser::RuleOpExpr); + enterRule(_localctx, 60, TocParser::RuleOpExpr); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -2209,33 +2386,33 @@ TocParser::OpExprContext* TocParser::opExpr() { exitRule(); }); try { - setState(278); + setState(300); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 21, _ctx)) { case 1: { enterOuterAlt(_localctx, 1); - setState(274); + setState(296); binaryOp(); break; } case 2: { enterOuterAlt(_localctx, 2); - setState(275); + setState(297); prefixOp(); break; } case 3: { enterOuterAlt(_localctx, 3); - setState(276); + setState(298); postfixOp(); break; } case 4: { enterOuterAlt(_localctx, 4); - setState(277); + setState(299); ternaryOp(); break; } @@ -2268,12 +2445,12 @@ TocParser::NonOpExprContext* TocParser::BinaryOpContext::nonOpExpr(size_t i) { return getRuleContext(i); } -std::vector TocParser::BinaryOpContext::BINARY_OP() { - return getTokens(TocParser::BINARY_OP); +std::vector TocParser::BinaryOpContext::binary_op() { + return getRuleContexts(); } -tree::TerminalNode* TocParser::BinaryOpContext::BINARY_OP(size_t i) { - return getToken(TocParser::BINARY_OP, i); +TocParser::Binary_opContext* TocParser::BinaryOpContext::binary_op(size_t i) { + return getRuleContext(i); } @@ -2295,8 +2472,7 @@ void TocParser::BinaryOpContext::exitRule(tree::ParseTreeListener *listener) { TocParser::BinaryOpContext* TocParser::binaryOp() { BinaryOpContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 56, TocParser::RuleBinaryOp); - size_t _la = 0; + enterRule(_localctx, 62, TocParser::RuleBinaryOp); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -2306,24 +2482,27 @@ TocParser::BinaryOpContext* TocParser::binaryOp() { exitRule(); }); try { + size_t alt; enterOuterAlt(_localctx, 1); - setState(280); + setState(302); nonOpExpr(); - setState(281); - match(TocParser::BINARY_OP); - setState(282); + setState(303); + binary_op(); + setState(304); nonOpExpr(); - setState(287); + setState(310); _errHandler->sync(this); - _la = _input->LA(1); - while (_la == TocParser::BINARY_OP) { - setState(283); - match(TocParser::BINARY_OP); - setState(284); - nonOpExpr(); - setState(289); - _errHandler->sync(this); - _la = _input->LA(1); + alt = getInterpreter()->adaptivePredict(_input, 22, _ctx); + while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { + if (alt == 1) { + setState(305); + binary_op(); + setState(306); + nonOpExpr(); + } + setState(312); + _errHandler->sync(this); + alt = getInterpreter()->adaptivePredict(_input, 22, _ctx); } } @@ -2342,8 +2521,8 @@ TocParser::PrefixOpContext::PrefixOpContext(ParserRuleContext *parent, size_t in : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* TocParser::PrefixOpContext::PREFIX_OP() { - return getToken(TocParser::PREFIX_OP, 0); +TocParser::Prefix_opContext* TocParser::PrefixOpContext::prefix_op() { + return getRuleContext(0); } TocParser::NonOpExprContext* TocParser::PrefixOpContext::nonOpExpr() { @@ -2369,7 +2548,7 @@ void TocParser::PrefixOpContext::exitRule(tree::ParseTreeListener *listener) { TocParser::PrefixOpContext* TocParser::prefixOp() { PrefixOpContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 58, TocParser::RulePrefixOp); + enterRule(_localctx, 64, TocParser::RulePrefixOp); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -2380,9 +2559,9 @@ TocParser::PrefixOpContext* TocParser::prefixOp() { }); try { enterOuterAlt(_localctx, 1); - setState(290); - match(TocParser::PREFIX_OP); - setState(291); + setState(313); + prefix_op(); + setState(314); nonOpExpr(); } @@ -2405,8 +2584,8 @@ TocParser::NonOpExprContext* TocParser::PostfixOpContext::nonOpExpr() { return getRuleContext(0); } -tree::TerminalNode* TocParser::PostfixOpContext::POSTFIX_OP() { - return getToken(TocParser::POSTFIX_OP, 0); +TocParser::Postfix_opContext* TocParser::PostfixOpContext::postfix_op() { + return getRuleContext(0); } @@ -2428,7 +2607,7 @@ void TocParser::PostfixOpContext::exitRule(tree::ParseTreeListener *listener) { TocParser::PostfixOpContext* TocParser::postfixOp() { PostfixOpContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 60, TocParser::RulePostfixOp); + enterRule(_localctx, 66, TocParser::RulePostfixOp); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -2439,10 +2618,10 @@ TocParser::PostfixOpContext* TocParser::postfixOp() { }); try { enterOuterAlt(_localctx, 1); - setState(293); + setState(316); nonOpExpr(); - setState(294); - match(TocParser::POSTFIX_OP); + setState(317); + postfix_op(); } catch (RecognitionException &e) { @@ -2491,7 +2670,7 @@ void TocParser::TernaryOpContext::exitRule(tree::ParseTreeListener *listener) { TocParser::TernaryOpContext* TocParser::ternaryOp() { TernaryOpContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 62, TocParser::RuleTernaryOp); + enterRule(_localctx, 68, TocParser::RuleTernaryOp); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -2502,15 +2681,15 @@ TocParser::TernaryOpContext* TocParser::ternaryOp() { }); try { enterOuterAlt(_localctx, 1); - setState(296); + setState(319); nonOpExpr(); - setState(297); + setState(320); match(TocParser::T__20); - setState(298); + setState(321); expr(); - setState(299); + setState(322); match(TocParser::T__1); - setState(300); + setState(323); expr(); } @@ -2552,7 +2731,7 @@ void TocParser::IdentifierExprContext::exitRule(tree::ParseTreeListener *listene TocParser::IdentifierExprContext* TocParser::identifierExpr() { IdentifierExprContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 64, TocParser::RuleIdentifierExpr); + enterRule(_localctx, 70, TocParser::RuleIdentifierExpr); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -2563,7 +2742,7 @@ TocParser::IdentifierExprContext* TocParser::identifierExpr() { }); try { enterOuterAlt(_localctx, 1); - setState(302); + setState(325); varName(); } @@ -2617,7 +2796,7 @@ void TocParser::LitExprContext::exitRule(tree::ParseTreeListener *listener) { TocParser::LitExprContext* TocParser::litExpr() { LitExprContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 66, TocParser::RuleLitExpr); + enterRule(_localctx, 72, TocParser::RuleLitExpr); size_t _la = 0; #if __cplusplus > 201703L @@ -2629,7 +2808,7 @@ TocParser::LitExprContext* TocParser::litExpr() { }); try { enterOuterAlt(_localctx, 1); - setState(304); + setState(327); _la = _input->LA(1); if (!((((_la & ~ 0x3fULL) == 0) && ((1ULL << _la) & ((1ULL << TocParser::INT_LIT) @@ -2663,20 +2842,12 @@ TocParser::NonAccessExprContext* TocParser::AccessExprContext::nonAccessExpr() { return getRuleContext(0); } -std::vector TocParser::AccessExprContext::identifierExpr() { - return getRuleContexts(); -} - -TocParser::IdentifierExprContext* TocParser::AccessExprContext::identifierExpr(size_t i) { - return getRuleContext(i); +std::vector TocParser::AccessExprContext::accessSubExpr() { + return getRuleContexts(); } -std::vector TocParser::AccessExprContext::expr() { - return getRuleContexts(); -} - -TocParser::ExprContext* TocParser::AccessExprContext::expr(size_t i) { - return getRuleContext(i); +TocParser::AccessSubExprContext* TocParser::AccessExprContext::accessSubExpr(size_t i) { + return getRuleContext(i); } @@ -2698,7 +2869,7 @@ void TocParser::AccessExprContext::exitRule(tree::ParseTreeListener *listener) { TocParser::AccessExprContext* TocParser::accessExpr() { AccessExprContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 68, TocParser::RuleAccessExpr); + enterRule(_localctx, 74, TocParser::RuleAccessExpr); size_t _la = 0; #if __cplusplus > 201703L @@ -2710,47 +2881,15 @@ TocParser::AccessExprContext* TocParser::accessExpr() { }); try { enterOuterAlt(_localctx, 1); - setState(306); + setState(329); nonAccessExpr(); - setState(313); + setState(331); _errHandler->sync(this); _la = _input->LA(1); do { - setState(313); - _errHandler->sync(this); - switch (_input->LA(1)) { - case TocParser::T__21: - case TocParser::T__22: { - setState(307); - _la = _input->LA(1); - if (!(_la == TocParser::T__21 - - || _la == TocParser::T__22)) { - _errHandler->recoverInline(this); - } - else { - _errHandler->reportMatch(this); - consume(); - } - setState(308); - identifierExpr(); - break; - } - - case TocParser::T__4: { - setState(309); - match(TocParser::T__4); - setState(310); - expr(); - setState(311); - match(TocParser::T__5); - break; - } - - default: - throw NoViableAltException(this); - } - setState(315); + setState(330); + accessSubExpr(); + setState(333); _errHandler->sync(this); _la = _input->LA(1); } while ((((_la & ~ 0x3fULL) == 0) && @@ -2768,6 +2907,203 @@ TocParser::AccessExprContext* TocParser::accessExpr() { return _localctx; } +//----------------- AccessSubExprContext ------------------------------------------------------------------ + +TocParser::AccessSubExprContext::AccessSubExprContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +TocParser::AccessMemberContext* TocParser::AccessSubExprContext::accessMember() { + return getRuleContext(0); +} + +TocParser::AccessBracketsContext* TocParser::AccessSubExprContext::accessBrackets() { + return getRuleContext(0); +} + + +size_t TocParser::AccessSubExprContext::getRuleIndex() const { + return TocParser::RuleAccessSubExpr; +} + +void TocParser::AccessSubExprContext::enterRule(tree::ParseTreeListener *listener) { + auto parserListener = dynamic_cast(listener); + if (parserListener != nullptr) + parserListener->enterAccessSubExpr(this); +} + +void TocParser::AccessSubExprContext::exitRule(tree::ParseTreeListener *listener) { + auto parserListener = dynamic_cast(listener); + if (parserListener != nullptr) + parserListener->exitAccessSubExpr(this); +} + +TocParser::AccessSubExprContext* TocParser::accessSubExpr() { + AccessSubExprContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 76, TocParser::RuleAccessSubExpr); + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + setState(337); + _errHandler->sync(this); + switch (_input->LA(1)) { + case TocParser::T__21: + case TocParser::T__22: { + enterOuterAlt(_localctx, 1); + setState(335); + accessMember(); + break; + } + + case TocParser::T__4: { + enterOuterAlt(_localctx, 2); + setState(336); + accessBrackets(); + break; + } + + default: + throw NoViableAltException(this); + } + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- AccessMemberContext ------------------------------------------------------------------ + +TocParser::AccessMemberContext::AccessMemberContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +TocParser::IdentifierExprContext* TocParser::AccessMemberContext::identifierExpr() { + return getRuleContext(0); +} + + +size_t TocParser::AccessMemberContext::getRuleIndex() const { + return TocParser::RuleAccessMember; +} + +void TocParser::AccessMemberContext::enterRule(tree::ParseTreeListener *listener) { + auto parserListener = dynamic_cast(listener); + if (parserListener != nullptr) + parserListener->enterAccessMember(this); +} + +void TocParser::AccessMemberContext::exitRule(tree::ParseTreeListener *listener) { + auto parserListener = dynamic_cast(listener); + if (parserListener != nullptr) + parserListener->exitAccessMember(this); +} + +TocParser::AccessMemberContext* TocParser::accessMember() { + AccessMemberContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 78, TocParser::RuleAccessMember); + size_t _la = 0; + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(339); + _la = _input->LA(1); + if (!(_la == TocParser::T__21 + + || _la == TocParser::T__22)) { + _errHandler->recoverInline(this); + } + else { + _errHandler->reportMatch(this); + consume(); + } + setState(340); + identifierExpr(); + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- AccessBracketsContext ------------------------------------------------------------------ + +TocParser::AccessBracketsContext::AccessBracketsContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +TocParser::ExprContext* TocParser::AccessBracketsContext::expr() { + return getRuleContext(0); +} + + +size_t TocParser::AccessBracketsContext::getRuleIndex() const { + return TocParser::RuleAccessBrackets; +} + +void TocParser::AccessBracketsContext::enterRule(tree::ParseTreeListener *listener) { + auto parserListener = dynamic_cast(listener); + if (parserListener != nullptr) + parserListener->enterAccessBrackets(this); +} + +void TocParser::AccessBracketsContext::exitRule(tree::ParseTreeListener *listener) { + auto parserListener = dynamic_cast(listener); + if (parserListener != nullptr) + parserListener->exitAccessBrackets(this); +} + +TocParser::AccessBracketsContext* TocParser::accessBrackets() { + AccessBracketsContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 80, TocParser::RuleAccessBrackets); + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(342); + match(TocParser::T__4); + setState(343); + expr(); + setState(344); + match(TocParser::T__5); + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + //----------------- ParenExprContext ------------------------------------------------------------------ TocParser::ParenExprContext::ParenExprContext(ParserRuleContext *parent, size_t invokingState) @@ -2797,7 +3133,7 @@ void TocParser::ParenExprContext::exitRule(tree::ParseTreeListener *listener) { TocParser::ParenExprContext* TocParser::parenExpr() { ParenExprContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 70, TocParser::RuleParenExpr); + enterRule(_localctx, 82, TocParser::RuleParenExpr); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -2808,11 +3144,11 @@ TocParser::ParenExprContext* TocParser::parenExpr() { }); try { enterOuterAlt(_localctx, 1); - setState(317); + setState(346); match(TocParser::T__7); - setState(318); + setState(347); expr(); - setState(319); + setState(348); match(TocParser::T__8); } @@ -2854,7 +3190,7 @@ void TocParser::FuncNameContext::exitRule(tree::ParseTreeListener *listener) { TocParser::FuncNameContext* TocParser::funcName() { FuncNameContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 72, TocParser::RuleFuncName); + enterRule(_localctx, 84, TocParser::RuleFuncName); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -2865,7 +3201,7 @@ TocParser::FuncNameContext* TocParser::funcName() { }); try { enterOuterAlt(_localctx, 1); - setState(321); + setState(350); match(TocParser::NAME); } @@ -2907,7 +3243,7 @@ void TocParser::VarNameContext::exitRule(tree::ParseTreeListener *listener) { TocParser::VarNameContext* TocParser::varName() { VarNameContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 74, TocParser::RuleVarName); + enterRule(_localctx, 86, TocParser::RuleVarName); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -2918,7 +3254,7 @@ TocParser::VarNameContext* TocParser::varName() { }); try { enterOuterAlt(_localctx, 1); - setState(323); + setState(352); match(TocParser::NAME); } @@ -2960,7 +3296,7 @@ void TocParser::TypeNameContext::exitRule(tree::ParseTreeListener *listener) { TocParser::TypeNameContext* TocParser::typeName() { TypeNameContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 76, TocParser::RuleTypeName); + enterRule(_localctx, 88, TocParser::RuleTypeName); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -2971,7 +3307,7 @@ TocParser::TypeNameContext* TocParser::typeName() { }); try { enterOuterAlt(_localctx, 1); - setState(325); + setState(354); match(TocParser::NAME); } @@ -3013,7 +3349,7 @@ void TocParser::StructNameContext::exitRule(tree::ParseTreeListener *listener) { TocParser::StructNameContext* TocParser::structName() { StructNameContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 78, TocParser::RuleStructName); + enterRule(_localctx, 90, TocParser::RuleStructName); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -3024,7 +3360,7 @@ TocParser::StructNameContext* TocParser::structName() { }); try { enterOuterAlt(_localctx, 1); - setState(327); + setState(356); match(TocParser::NAME); } @@ -3037,6 +3373,256 @@ TocParser::StructNameContext* TocParser::structName() { return _localctx; } +//----------------- Postfix_opContext ------------------------------------------------------------------ + +TocParser::Postfix_opContext::Postfix_opContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + + +size_t TocParser::Postfix_opContext::getRuleIndex() const { + return TocParser::RulePostfix_op; +} + +void TocParser::Postfix_opContext::enterRule(tree::ParseTreeListener *listener) { + auto parserListener = dynamic_cast(listener); + if (parserListener != nullptr) + parserListener->enterPostfix_op(this); +} + +void TocParser::Postfix_opContext::exitRule(tree::ParseTreeListener *listener) { + auto parserListener = dynamic_cast(listener); + if (parserListener != nullptr) + parserListener->exitPostfix_op(this); +} + +TocParser::Postfix_opContext* TocParser::postfix_op() { + Postfix_opContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 92, TocParser::RulePostfix_op); + size_t _la = 0; + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(358); + _la = _input->LA(1); + if (!(_la == TocParser::T__23 + + || _la == TocParser::T__24)) { + _errHandler->recoverInline(this); + } + else { + _errHandler->reportMatch(this); + consume(); + } + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- Prefix_opContext ------------------------------------------------------------------ + +TocParser::Prefix_opContext::Prefix_opContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +TocParser::Postfix_opContext* TocParser::Prefix_opContext::postfix_op() { + return getRuleContext(0); +} + + +size_t TocParser::Prefix_opContext::getRuleIndex() const { + return TocParser::RulePrefix_op; +} + +void TocParser::Prefix_opContext::enterRule(tree::ParseTreeListener *listener) { + auto parserListener = dynamic_cast(listener); + if (parserListener != nullptr) + parserListener->enterPrefix_op(this); +} + +void TocParser::Prefix_opContext::exitRule(tree::ParseTreeListener *listener) { + auto parserListener = dynamic_cast(listener); + if (parserListener != nullptr) + parserListener->exitPrefix_op(this); +} + +TocParser::Prefix_opContext* TocParser::prefix_op() { + Prefix_opContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 94, TocParser::RulePrefix_op); + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + setState(367); + _errHandler->sync(this); + switch (_input->LA(1)) { + case TocParser::T__25: { + enterOuterAlt(_localctx, 1); + setState(360); + match(TocParser::T__25); + break; + } + + case TocParser::T__26: { + enterOuterAlt(_localctx, 2); + setState(361); + match(TocParser::T__26); + break; + } + + case TocParser::T__27: { + enterOuterAlt(_localctx, 3); + setState(362); + match(TocParser::T__27); + break; + } + + case TocParser::T__28: { + enterOuterAlt(_localctx, 4); + setState(363); + match(TocParser::T__28); + break; + } + + case TocParser::T__29: { + enterOuterAlt(_localctx, 5); + setState(364); + match(TocParser::T__29); + break; + } + + case TocParser::T__3: { + enterOuterAlt(_localctx, 6); + setState(365); + match(TocParser::T__3); + break; + } + + case TocParser::T__23: + case TocParser::T__24: { + enterOuterAlt(_localctx, 7); + setState(366); + postfix_op(); + break; + } + + default: + throw NoViableAltException(this); + } + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- Binary_opContext ------------------------------------------------------------------ + +TocParser::Binary_opContext::Binary_opContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + + +size_t TocParser::Binary_opContext::getRuleIndex() const { + return TocParser::RuleBinary_op; +} + +void TocParser::Binary_opContext::enterRule(tree::ParseTreeListener *listener) { + auto parserListener = dynamic_cast(listener); + if (parserListener != nullptr) + parserListener->enterBinary_op(this); +} + +void TocParser::Binary_opContext::exitRule(tree::ParseTreeListener *listener) { + auto parserListener = dynamic_cast(listener); + if (parserListener != nullptr) + parserListener->exitBinary_op(this); +} + +TocParser::Binary_opContext* TocParser::binary_op() { + Binary_opContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 96, TocParser::RuleBinary_op); + size_t _la = 0; + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(369); + _la = _input->LA(1); + if (!((((_la & ~ 0x3fULL) == 0) && + ((1ULL << _la) & ((1ULL << TocParser::T__3) + | (1ULL << TocParser::T__25) + | (1ULL << TocParser::T__26) + | (1ULL << TocParser::T__29) + | (1ULL << TocParser::T__30) + | (1ULL << TocParser::T__31) + | (1ULL << TocParser::T__32) + | (1ULL << TocParser::T__33) + | (1ULL << TocParser::T__34) + | (1ULL << TocParser::T__35) + | (1ULL << TocParser::T__36) + | (1ULL << TocParser::T__37) + | (1ULL << TocParser::T__38) + | (1ULL << TocParser::T__39) + | (1ULL << TocParser::T__40) + | (1ULL << TocParser::T__41) + | (1ULL << TocParser::T__42) + | (1ULL << TocParser::T__43) + | (1ULL << TocParser::T__44) + | (1ULL << TocParser::T__45) + | (1ULL << TocParser::T__46) + | (1ULL << TocParser::T__47) + | (1ULL << TocParser::T__48) + | (1ULL << TocParser::T__49) + | (1ULL << TocParser::T__50) + | (1ULL << TocParser::T__51) + | (1ULL << TocParser::T__52) + | (1ULL << TocParser::T__53))) != 0))) { + _errHandler->recoverInline(this); + } + else { + _errHandler->reportMatch(this); + consume(); + } + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + // Static vars and initialization. std::vector TocParser::_decisionToDFA; atn::PredictionContextCache TocParser::_sharedContextCache; @@ -3048,23 +3634,30 @@ std::vector TocParser::_serializedATN; std::vector TocParser::_ruleNames = { "prog", "decl", "varDecl", "var", "varInit", "type", "typeModifier", "funcDecl", "func", "parameter", "body", "structDecl", "structMember", "structVar", - "structMethod", "stmt", "ifStmt", "switchStmt", "switchBody", "forStmt", - "whileStmt", "assignStmt", "returnStmt", "expr", "nonOpExpr", "nonAccessExpr", - "funcExpr", "opExpr", "binaryOp", "prefixOp", "postfixOp", "ternaryOp", - "identifierExpr", "litExpr", "accessExpr", "parenExpr", "funcName", "varName", - "typeName", "structName" + "structMethod", "stmt", "ifStmt", "elseIfStmt", "elseStmt", "switchStmt", + "switchBody", "switchCase", "forStmt", "whileStmt", "assignStmt", "returnStmt", + "expr", "nonOpExpr", "nonAccessExpr", "funcExpr", "opExpr", "binaryOp", + "prefixOp", "postfixOp", "ternaryOp", "identifierExpr", "litExpr", "accessExpr", + "accessSubExpr", "accessMember", "accessBrackets", "parenExpr", "funcName", + "varName", "typeName", "structName", "postfix_op", "prefix_op", "binary_op" }; std::vector TocParser::_literalNames = { "", "'var'", "':'", "'='", "'*'", "'['", "']'", "'func'", "'('", "')'", "','", "'{'", "'}'", "'struct'", "'if'", "'else'", "'switch'", "'case'", - "'for'", "'while'", "'return'", "'\u003F'", "'.'", "'->'" + "'for'", "'while'", "'return'", "'\u003F'", "'.'", "'->'", "'++'", "'--'", + "'+'", "'-'", "'!'", "'~'", "'&'", "'/'", "'%'", "'<'", "'|'", "'^'", + "'>'", "'=='", "'!='", "'<='", "'>='", "'<<'", "'>>'", "'||'", "'&&'", + "'&='", "'|='", "'^='", "'<<='", "'>>='", "'+='", "'-='", "'*='", "'/='", + "'%='" }; std::vector TocParser::_symbolicNames = { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", - "", "", "", "", "", "", "POSTFIX_OP", "PREFIX_OP", "BINARY_OP", "INT_LIT", - "DECIMAL_LIT", "STRING_LIT", "BOOL_LIT", "NAME", "WS", "NEWLINE", "NUMBER" + "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", + "", "INT_LIT", "DECIMAL_LIT", "STRING_LIT", "BOOL_LIT", "NAME", "WS", + "NEWLINE", "NUMBER" }; dfa::Vocabulary TocParser::_vocabulary(_literalNames, _symbolicNames); @@ -3087,7 +3680,7 @@ TocParser::Initializer::Initializer() { static const uint16_t serializedATNSegment0[] = { 0x3, 0x608b, 0xa72a, 0x8133, 0xb9ed, 0x417c, 0x3be7, 0x7786, 0x5964, - 0x3, 0x24, 0x14c, 0x4, 0x2, 0x9, 0x2, 0x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, 0x3, 0x2, 0x2, 0x2, 0xff, 0xfd, - 0x3, 0x2, 0x2, 0x2, 0xff, 0xfe, 0x3, 0x2, 0x2, 0x2, 0x100, 0x33, - 0x3, 0x2, 0x2, 0x2, 0x101, 0x105, 0x5, 0x36, 0x1c, 0x2, 0x102, 0x105, - 0x5, 0x42, 0x22, 0x2, 0x103, 0x105, 0x5, 0x48, 0x25, 0x2, 0x104, - 0x101, 0x3, 0x2, 0x2, 0x2, 0x104, 0x102, 0x3, 0x2, 0x2, 0x2, 0x104, - 0x103, 0x3, 0x2, 0x2, 0x2, 0x105, 0x35, 0x3, 0x2, 0x2, 0x2, 0x106, - 0x107, 0x5, 0x4a, 0x26, 0x2, 0x107, 0x110, 0x7, 0xa, 0x2, 0x2, 0x108, - 0x10d, 0x5, 0x30, 0x19, 0x2, 0x109, 0x10a, 0x7, 0xc, 0x2, 0x2, 0x10a, - 0x10c, 0x5, 0x30, 0x19, 0x2, 0x10b, 0x109, 0x3, 0x2, 0x2, 0x2, 0x10c, - 0x10f, 0x3, 0x2, 0x2, 0x2, 0x10d, 0x10b, 0x3, 0x2, 0x2, 0x2, 0x10d, - 0x10e, 0x3, 0x2, 0x2, 0x2, 0x10e, 0x111, 0x3, 0x2, 0x2, 0x2, 0x10f, - 0x10d, 0x3, 0x2, 0x2, 0x2, 0x110, 0x108, 0x3, 0x2, 0x2, 0x2, 0x110, - 0x111, 0x3, 0x2, 0x2, 0x2, 0x111, 0x112, 0x3, 0x2, 0x2, 0x2, 0x112, - 0x113, 0x7, 0xb, 0x2, 0x2, 0x113, 0x37, 0x3, 0x2, 0x2, 0x2, 0x114, - 0x119, 0x5, 0x3a, 0x1e, 0x2, 0x115, 0x119, 0x5, 0x3c, 0x1f, 0x2, - 0x116, 0x119, 0x5, 0x3e, 0x20, 0x2, 0x117, 0x119, 0x5, 0x40, 0x21, - 0x2, 0x118, 0x114, 0x3, 0x2, 0x2, 0x2, 0x118, 0x115, 0x3, 0x2, 0x2, - 0x2, 0x118, 0x116, 0x3, 0x2, 0x2, 0x2, 0x118, 0x117, 0x3, 0x2, 0x2, - 0x2, 0x119, 0x39, 0x3, 0x2, 0x2, 0x2, 0x11a, 0x11b, 0x5, 0x32, 0x1a, - 0x2, 0x11b, 0x11c, 0x7, 0x1c, 0x2, 0x2, 0x11c, 0x121, 0x5, 0x32, - 0x1a, 0x2, 0x11d, 0x11e, 0x7, 0x1c, 0x2, 0x2, 0x11e, 0x120, 0x5, - 0x32, 0x1a, 0x2, 0x11f, 0x11d, 0x3, 0x2, 0x2, 0x2, 0x120, 0x123, - 0x3, 0x2, 0x2, 0x2, 0x121, 0x11f, 0x3, 0x2, 0x2, 0x2, 0x121, 0x122, - 0x3, 0x2, 0x2, 0x2, 0x122, 0x3b, 0x3, 0x2, 0x2, 0x2, 0x123, 0x121, - 0x3, 0x2, 0x2, 0x2, 0x124, 0x125, 0x7, 0x1b, 0x2, 0x2, 0x125, 0x126, - 0x5, 0x32, 0x1a, 0x2, 0x126, 0x3d, 0x3, 0x2, 0x2, 0x2, 0x127, 0x128, - 0x5, 0x32, 0x1a, 0x2, 0x128, 0x129, 0x7, 0x1a, 0x2, 0x2, 0x129, 0x3f, - 0x3, 0x2, 0x2, 0x2, 0x12a, 0x12b, 0x5, 0x32, 0x1a, 0x2, 0x12b, 0x12c, - 0x7, 0x17, 0x2, 0x2, 0x12c, 0x12d, 0x5, 0x30, 0x19, 0x2, 0x12d, 0x12e, - 0x7, 0x4, 0x2, 0x2, 0x12e, 0x12f, 0x5, 0x30, 0x19, 0x2, 0x12f, 0x41, - 0x3, 0x2, 0x2, 0x2, 0x130, 0x131, 0x5, 0x4c, 0x27, 0x2, 0x131, 0x43, - 0x3, 0x2, 0x2, 0x2, 0x132, 0x133, 0x9, 0x2, 0x2, 0x2, 0x133, 0x45, - 0x3, 0x2, 0x2, 0x2, 0x134, 0x13b, 0x5, 0x34, 0x1b, 0x2, 0x135, 0x136, - 0x9, 0x3, 0x2, 0x2, 0x136, 0x13c, 0x5, 0x42, 0x22, 0x2, 0x137, 0x138, - 0x7, 0x7, 0x2, 0x2, 0x138, 0x139, 0x5, 0x30, 0x19, 0x2, 0x139, 0x13a, - 0x7, 0x8, 0x2, 0x2, 0x13a, 0x13c, 0x3, 0x2, 0x2, 0x2, 0x13b, 0x135, - 0x3, 0x2, 0x2, 0x2, 0x13b, 0x137, 0x3, 0x2, 0x2, 0x2, 0x13c, 0x13d, - 0x3, 0x2, 0x2, 0x2, 0x13d, 0x13b, 0x3, 0x2, 0x2, 0x2, 0x13d, 0x13e, - 0x3, 0x2, 0x2, 0x2, 0x13e, 0x47, 0x3, 0x2, 0x2, 0x2, 0x13f, 0x140, - 0x7, 0xa, 0x2, 0x2, 0x140, 0x141, 0x5, 0x30, 0x19, 0x2, 0x141, 0x142, - 0x7, 0xb, 0x2, 0x2, 0x142, 0x49, 0x3, 0x2, 0x2, 0x2, 0x143, 0x144, - 0x7, 0x21, 0x2, 0x2, 0x144, 0x4b, 0x3, 0x2, 0x2, 0x2, 0x145, 0x146, - 0x7, 0x21, 0x2, 0x2, 0x146, 0x4d, 0x3, 0x2, 0x2, 0x2, 0x147, 0x148, - 0x7, 0x21, 0x2, 0x2, 0x148, 0x4f, 0x3, 0x2, 0x2, 0x2, 0x149, 0x14a, - 0x7, 0x21, 0x2, 0x2, 0x14a, 0x51, 0x3, 0x2, 0x2, 0x2, 0x1b, 0x55, - 0x5c, 0x67, 0x74, 0x7a, 0x7d, 0x90, 0x93, 0x99, 0xa4, 0xab, 0xb9, - 0xc5, 0xca, 0xd7, 0xdf, 0xf8, 0xff, 0x104, 0x10d, 0x110, 0x118, 0x121, - 0x13b, 0x13d, + 0x2, 0x2, 0xa5, 0x9d, 0x3, 0x2, 0x2, 0x2, 0xa5, 0xa6, 0x3, 0x2, 0x2, + 0x2, 0xa6, 0x15, 0x3, 0x2, 0x2, 0x2, 0xa7, 0xab, 0x7, 0xd, 0x2, 0x2, + 0xa8, 0xaa, 0x5, 0x20, 0x11, 0x2,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a, 0xfb, 0x5, 0x36, 0x1c, 0x2, 0xfb, 0xfc, + 0x5, 0x16, 0xc, 0x2, 0xfc, 0x2f, 0x3, 0x2, 0x2, 0x2, 0xfd, 0xfe, + 0x7, 0x15, 0x2, 0x2, 0xfe, 0xff, 0x5, 0x36, 0x1c, 0x2, 0xff, 0x100, + 0x5, 0x16, 0xc, 0x2, 0x100, 0x31, 0x3, 0x2, 0x2, 0x2, 0x101, 0x102, + 0x5, 0x48, 0x25, 0x2, 0x102, 0x103, 0x7, 0x5, 0x2, 0x2, 0x103, 0x104, + 0x5, 0x36, 0x1c, 0x2, 0x104, 0x33, 0x3, 0x2, 0x2, 0x2, 0x105, 0x106, + 0x7, 0x16, 0x2, 0x2, 0x106, 0x107, 0x5, 0x36, 0x1c, 0x2, 0x107, 0x35, + 0x3, 0x2, 0x2, 0x2, 0x108, 0x10f, 0x5, 0x3c, 0x1f, 0x2, 0x109, 0x10f, + 0x5, 0x4a, 0x26, 0x2, 0x10a, 0x10f, 0x5, 0x48, 0x25, 0x2, 0x10b, + 0x10f, 0x5, 0x54, 0x2b, 0x2, 0x10c, 0x10f, 0x5, 0x4c, 0x27, 0x2, + 0x10d, 0x10f, 0x5, 0x3e, 0x20, 0x2, 0x10e, 0x108, 0x3, 0x2, 0x2, + 0x2, 0x10e, 0x109, 0x3, 0x2, 0x2, 0x2, 0x10e, 0x10a, 0x3, 0x2, 0x2, + 0x2, 0x10e, 0x10b, 0x3, 0x2, 0x2, 0x2, 0x10e, 0x10c, 0x3, 0x2, 0x2, + 0x2, 0x10e, 0x10d, 0x3, 0x2, 0x2, 0x2, 0x10f, 0x37, 0x3, 0x2, 0x2, + 0x2, 0x110, 0x116, 0x5, 0x3c, 0x1f, 0x2, 0x111, 0x116, 0x5, 0x4a, + 0x26, 0x2, 0x112, 0x116, 0x5, 0x48, 0x25, 0x2, 0x113, 0x116, 0x5, + 0x54, 0x2b, 0x2, 0x114, 0x116, 0x5, 0x4c, 0x27, 0x2, 0x115, 0x110, + 0x3, 0x2, 0x2, 0x2, 0x115, 0x111, 0x3, 0x2, 0x2, 0x2, 0x115, 0x112, + 0x3, 0x2, 0x2, 0x2, 0x115, 0x113, 0x3, 0x2, 0x2, 0x2, 0x115, 0x114, + 0x3, 0x2, 0x2, 0x2, 0x116, 0x39, 0x3, 0x2, 0x2, 0x2, 0x117, 0x11b, + 0x5, 0x3c, 0x1f, 0x2, 0x118, 0x11b, 0x5, 0x48, 0x25, 0x2, 0x119, + 0x11b, 0x5, 0x54, 0x2b, 0x2, 0x11a, 0x117, 0x3, 0x2, 0x2, 0x2, 0x11a, + 0x118, 0x3, 0x2, 0x2, 0x2, 0x11a, 0x119, 0x3, 0x2, 0x2, 0x2, 0x11b, + 0x3b, 0x3, 0x2, 0x2, 0x2, 0x11c, 0x11d, 0x5, 0x56, 0x2c, 0x2, 0x11d, + 0x126, 0x7, 0xa, 0x2, 0x2, 0x11e, 0x123, 0x5, 0x36, 0x1c, 0x2, 0x11f, + 0x120, 0x7, 0xc, 0x2, 0x2, 0x120, 0x122, 0x5, 0x36, 0x1c, 0x2, 0x121, + 0x11f, 0x3, 0x2, 0x2, 0x2, 0x122, 0x125, 0x3, 0x2, 0x2, 0x2, 0x123, + 0x121, 0x3, 0x2, 0x2, 0x2, 0x123, 0x124, 0x3, 0x2, 0x2, 0x2, 0x124, + 0x127, 0x3, 0x2, 0x2, 0x2, 0x125, 0x123, 0x3, 0x2, 0x2, 0x2, 0x126, + 0x11e, 0x3, 0x2, 0x2, 0x2, 0x126, 0x127, 0x3, 0x2, 0x2, 0x2, 0x127, + 0x128, 0x3, 0x2, 0x2, 0x2, 0x128, 0x129, 0x7, 0xb, 0x2, 0x2, 0x129, + 0x3d, 0x3, 0x2, 0x2, 0x2, 0x12a, 0x12f, 0x5, 0x40, 0x21, 0x2, 0x12b, + 0x12f, 0x5, 0x42, 0x22, 0x2, 0x12c, 0x12f, 0x5, 0x44, 0x23, 0x2, + 0x12d, 0x12f, 0x5, 0x46, 0x24, 0x2, 0x12e, 0x12a, 0x3, 0x2, 0x2, + 0x2, 0x12e, 0x12b, 0x3, 0x2, 0x2, 0x2, 0x12e, 0x12c, 0x3, 0x2, 0x2, + 0x2, 0x12e, 0x12d, 0x3, 0x2, 0x2, 0x2, 0x12f, 0x3f, 0x3, 0x2, 0x2, + 0x2, 0x130, 0x131, 0x5, 0x38, 0x1d, 0x2, 0x131, 0x132, 0x5, 0x62, + 0x32, 0x2, 0x132, 0x138, 0x5, 0x38, 0x1d, 0x2, 0x133, 0x134, 0x5, + 0x62, 0x32, 0x2, 0x134, 0x135, 0x5, 0x38, 0x1d, 0x2, 0x135, 0x137, + 0x3, 0x2, 0x2, 0x2, 0x136, 0x133, 0x3, 0x2, 0x2, 0x2, 0x137, 0x13a, + 0x3, 0x2, 0x2, 0x2, 0x138, 0x136, 0x3, 0x2, 0x2, 0x2, 0x138, 0x139, + 0x3, 0x2, 0x2, 0x2, 0x139, 0x41, 0x3, 0x2, 0x2, 0x2, 0x13a, 0x138, + 0x3, 0x2, 0x2, 0x2, 0x13b, 0x13c, 0x5, 0x60, 0x31, 0x2, 0x13c, 0x13d, + 0x5, 0x38, 0x1d, 0x2, 0x13d, 0x43, 0x3, 0x2, 0x2, 0x2, 0x13e, 0x13f, + 0x5, 0x38, 0x1d, 0x2, 0x13f, 0x140, 0x5, 0x5e, 0x30, 0x2, 0x140, + 0x45, 0x3, 0x2, 0x2, 0x2, 0x141, 0x142, 0x5, 0x38, 0x1d, 0x2, 0x142, + 0x143, 0x7, 0x17, 0x2, 0x2, 0x143, 0x144, 0x5, 0x36, 0x1c, 0x2, 0x144, + 0x145, 0x7, 0x4, 0x2, 0x2, 0x145, 0x146, 0x5, 0x36, 0x1c, 0x2, 0x146, + 0x47, 0x3, 0x2, 0x2, 0x2, 0x147, 0x148, 0x5, 0x58, 0x2d, 0x2, 0x148, + 0x49, 0x3, 0x2, 0x2, 0x2, 0x149, 0x14a, 0x9, 0x2, 0x2, 0x2, 0x14a, + 0x4b, 0x3, 0x2, 0x2, 0x2, 0x14b, 0x14d, 0x5, 0x3a, 0x1e, 0x2, 0x14c, + 0x14e, 0x5, 0x4e, 0x28, 0x2, 0x14d, 0x14c, 0x3, 0x2, 0x2, 0x2, 0x14e, + 0x14f, 0x3, 0x2, 0x2, 0x2, 0x14f, 0x14d, 0x3, 0x2, 0x2, 0x2, 0x14f, + 0x150, 0x3, 0x2, 0x2, 0x2, 0x150, 0x4d, 0x3, 0x2, 0x2, 0x2, 0x151, + 0x154, 0x5, 0x50, 0x29, 0x2, 0x152, 0x154, 0x5, 0x52, 0x2a, 0x2, + 0x153, 0x151, 0x3, 0x2, 0x2, 0x2, 0x153, 0x152, 0x3, 0x2, 0x2, 0x2, + 0x154, 0x4f, 0x3, 0x2, 0x2, 0x2, 0x155, 0x156, 0x9, 0x3, 0x2, 0x2, + 0x156, 0x157, 0x5, 0x48, 0x25, 0x2, 0x157, 0x51, 0x3, 0x2, 0x2, 0x2, + 0x158, 0x159, 0x7, 0x7, 0x2, 0x2, 0x159, 0x15a, 0x5, 0x36, 0x1c, + 0x2, 0x15a, 0x15b, 0x7, 0x8, 0x2, 0x2, 0x15b, 0x53, 0x3, 0x2, 0x2, + 0x2, 0x15c, 0x15d, 0x7, 0xa, 0x2, 0x2, 0x15d, 0x15e, 0x5, 0x36, 0x1c, + 0x2, 0x15e, 0x15f, 0x7, 0xb, 0x2, 0x2, 0x15f, 0x55, 0x3, 0x2, 0x2, + 0x2, 0x160, 0x161, 0x7, 0x3d, 0x2, 0x2, 0x161, 0x57, 0x3, 0x2, 0x2, + 0x2, 0x162, 0x163, 0x7, 0x3d, 0x2, 0x2, 0x163, 0x59, 0x3, 0x2, 0x2, + 0x2, 0x164, 0x165, 0x7, 0x3d, 0x2, 0x2, 0x165, 0x5b, 0x3, 0x2, 0x2, + 0x2, 0x166, 0x167, 0x7, 0x3d, 0x2, 0x2, 0x167, 0x5d, 0x3, 0x2, 0x2, + 0x2, 0x168, 0x169, 0x9, 0x4, 0x2, 0x2, 0x169, 0x5f, 0x3, 0x2, 0x2, + 0x2, 0x16a, 0x172, 0x7, 0x1c, 0x2, 0x2, 0x16b, 0x172, 0x7, 0x1d, + 0x2, 0x2, 0x16c, 0x172, 0x7, 0x1e, 0x2, 0x2, 0x16d, 0x172, 0x7, 0x1f, + 0x2, 0x2, 0x16e, 0x172, 0x7, 0x20, 0x2, 0x2, 0x16f, 0x172, 0x7, 0x6, + 0x2, 0x2, 0x170, 0x172, 0x5, 0x5e, 0x30, 0x2, 0x171, 0x16a, 0x3, + 0x2, 0x2, 0x2, 0x171, 0x16b, 0x3, 0x2, 0x2, 0x2, 0x171, 0x16c, 0x3, + 0x2, 0x2, 0x2, 0x171, 0x16d, 0x3, 0x2, 0x2, 0x2, 0x171, 0x16e, 0x3, + 0x2, 0x2, 0x2, 0x171, 0x16f, 0x3, 0x2, 0x2, 0x2, 0x171, 0x170, 0x3, + 0x2, 0x2, 0x2, 0x172, 0x61, 0x3, 0x2, 0x2, 0x2, 0x173, 0x174, 0x9, + 0x5, 0x2, 0x2, 0x174, 0x63, 0x3, 0x2, 0x2, 0x2, 0x1c, 0x67, 0x6e, + 0x79, 0x86, 0x8c, 0x8f, 0xa2, 0xa5, 0xab, 0xb6, 0xbd, 0xcb, 0xd3, + 0xd7, 0xe9, 0xf5, 0x10e, 0x115, 0x11a, 0x123, 0x126, 0x12e, 0x138, + 0x14f, 0x153, 0x171, }; _serializedATN.insert(_serializedATN.end(), serializedATNSegment0, diff --git a/gen/TocParser.h b/gen/TocParser.h index 8cdece5..0157c9c 100644 --- a/gen/TocParser.h +++ b/gen/TocParser.h @@ -15,9 +15,13 @@ public: T__0 = 1, T__1 = 2, T__2 = 3, T__3 = 4, T__4 = 5, T__5 = 6, T__6 = 7, T__7 = 8, T__8 = 9, T__9 = 10, T__10 = 11, T__11 = 12, T__12 = 13, T__13 = 14, T__14 = 15, T__15 = 16, T__16 = 17, T__17 = 18, T__18 = 19, T__19 = 20, - T__20 = 21, T__21 = 22, T__22 = 23, POSTFIX_OP = 24, PREFIX_OP = 25, - BINARY_OP = 26, INT_LIT = 27, DECIMAL_LIT = 28, STRING_LIT = 29, BOOL_LIT = 30, - NAME = 31, WS = 32, NEWLINE = 33, NUMBER = 34 + T__20 = 21, T__21 = 22, T__22 = 23, T__23 = 24, T__24 = 25, T__25 = 26, + T__26 = 27, T__27 = 28, T__28 = 29, T__29 = 30, T__30 = 31, T__31 = 32, + T__32 = 33, T__33 = 34, T__34 = 35, T__35 = 36, T__36 = 37, T__37 = 38, + T__38 = 39, T__39 = 40, T__40 = 41, T__41 = 42, T__42 = 43, T__43 = 44, + T__44 = 45, T__45 = 46, T__46 = 47, T__47 = 48, T__48 = 49, T__49 = 50, + T__50 = 51, T__51 = 52, T__52 = 53, T__53 = 54, INT_LIT = 55, DECIMAL_LIT = 56, + STRING_LIT = 57, BOOL_LIT = 58, NAME = 59, WS = 60, NEWLINE = 61, NUMBER = 62 }; enum { @@ -25,12 +29,15 @@ public: RuleType = 5, RuleTypeModifier = 6, RuleFuncDecl = 7, RuleFunc = 8, RuleParameter = 9, RuleBody = 10, RuleStructDecl = 11, RuleStructMember = 12, RuleStructVar = 13, RuleStructMethod = 14, RuleStmt = 15, RuleIfStmt = 16, - RuleSwitchStmt = 17, RuleSwitchBody = 18, RuleForStmt = 19, RuleWhileStmt = 20, - RuleAssignStmt = 21, RuleReturnStmt = 22, RuleExpr = 23, RuleNonOpExpr = 24, - RuleNonAccessExpr = 25, RuleFuncExpr = 26, RuleOpExpr = 27, RuleBinaryOp = 28, - RulePrefixOp = 29, RulePostfixOp = 30, RuleTernaryOp = 31, RuleIdentifierExpr = 32, - RuleLitExpr = 33, RuleAccessExpr = 34, RuleParenExpr = 35, RuleFuncName = 36, - RuleVarName = 37, RuleTypeName = 38, RuleStructName = 39 + RuleElseIfStmt = 17, RuleElseStmt = 18, RuleSwitchStmt = 19, RuleSwitchBody = 20, + RuleSwitchCase = 21, RuleForStmt = 22, RuleWhileStmt = 23, RuleAssignStmt = 24, + RuleReturnStmt = 25, RuleExpr = 26, RuleNonOpExpr = 27, RuleNonAccessExpr = 28, + RuleFuncExpr = 29, RuleOpExpr = 30, RuleBinaryOp = 31, RulePrefixOp = 32, + RulePostfixOp = 33, RuleTernaryOp = 34, RuleIdentifierExpr = 35, RuleLitExpr = 36, + RuleAccessExpr = 37, RuleAccessSubExpr = 38, RuleAccessMember = 39, + RuleAccessBrackets = 40, RuleParenExpr = 41, RuleFuncName = 42, RuleVarName = 43, + RuleTypeName = 44, RuleStructName = 45, RulePostfix_op = 46, RulePrefix_op = 47, + RuleBinary_op = 48 }; explicit TocParser(antlr4::TokenStream *input); @@ -60,8 +67,11 @@ public: class StructMethodContext; class StmtContext; class IfStmtContext; + class ElseIfStmtContext; + class ElseStmtContext; class SwitchStmtContext; class SwitchBodyContext; + class SwitchCaseContext; class ForStmtContext; class WhileStmtContext; class AssignStmtContext; @@ -78,11 +88,17 @@ public: class IdentifierExprContext; class LitExprContext; class AccessExprContext; + class AccessSubExprContext; + class AccessMemberContext; + class AccessBracketsContext; class ParenExprContext; class FuncNameContext; class VarNameContext; class TypeNameContext; - class StructNameContext; + class StructNameContext; + class Postfix_opContext; + class Prefix_opContext; + class Binary_opContext; class ProgContext : public antlr4::ParserRuleContext { public: @@ -321,10 +337,11 @@ public: public: IfStmtContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; - std::vector expr(); - ExprContext* expr(size_t i); - std::vector body(); - BodyContext* body(size_t i); + ExprContext *expr(); + BodyContext *body(); + std::vector elseIfStmt(); + ElseIfStmtContext* elseIfStmt(size_t i); + ElseStmtContext *elseStmt(); virtual void enterRule(antlr4::tree::ParseTreeListener *listener) override; virtual void exitRule(antlr4::tree::ParseTreeListener *listener) override; @@ -333,6 +350,33 @@ public: IfStmtContext* ifStmt(); + class ElseIfStmtContext : public antlr4::ParserRuleContext { + public: + ElseIfStmtContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + ExprContext *expr(); + BodyContext *body(); + + virtual void enterRule(antlr4::tree::ParseTreeListener *listener) override; + virtual void exitRule(antlr4::tree::ParseTreeListener *listener) override; + + }; + + ElseIfStmtContext* elseIfStmt(); + + class ElseStmtContext : public antlr4::ParserRuleContext { + public: + ElseStmtContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + BodyContext *body(); + + virtual void enterRule(antlr4::tree::ParseTreeListener *listener) override; + virtual void exitRule(antlr4::tree::ParseTreeListener *listener) override; + + }; + + ElseStmtContext* elseStmt(); + class SwitchStmtContext : public antlr4::ParserRuleContext { public: SwitchStmtContext(antlr4::ParserRuleContext *parent, size_t invokingState); @@ -351,10 +395,8 @@ public: public: SwitchBodyContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; - std::vector expr(); - ExprContext* expr(size_t i); - std::vector body(); - BodyContext* body(size_t i); + std::vector switchCase(); + SwitchCaseContext* switchCase(size_t i); virtual void enterRule(antlr4::tree::ParseTreeListener *listener) override; virtual void exitRule(antlr4::tree::ParseTreeListener *listener) override; @@ -363,6 +405,20 @@ public: SwitchBodyContext* switchBody(); + class SwitchCaseContext : public antlr4::ParserRuleContext { + public: + SwitchCaseContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + ExprContext *expr(); + BodyContext *body(); + + virtual void enterRule(antlr4::tree::ParseTreeListener *listener) override; + virtual void exitRule(antlr4::tree::ParseTreeListener *listener) override; + + }; + + SwitchCaseContext* switchCase(); + class ForStmtContext : public antlr4::ParserRuleContext { public: ForStmtContext(antlr4::ParserRuleContext *parent, size_t invokingState); @@ -508,8 +564,8 @@ public: virtual size_t getRuleIndex() const override; std::vector nonOpExpr(); NonOpExprContext* nonOpExpr(size_t i); - std::vector BINARY_OP(); - antlr4::tree::TerminalNode* BINARY_OP(size_t i); + std::vector binary_op(); + Binary_opContext* binary_op(size_t i); virtual void enterRule(antlr4::tree::ParseTreeListener *listener) override; virtual void exitRule(antlr4::tree::ParseTreeListener *listener) override; @@ -522,7 +578,7 @@ public: public: PrefixOpContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; - antlr4::tree::TerminalNode *PREFIX_OP(); + Prefix_opContext *prefix_op(); NonOpExprContext *nonOpExpr(); virtual void enterRule(antlr4::tree::ParseTreeListener *listener) override; @@ -537,7 +593,7 @@ public: PostfixOpContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; NonOpExprContext *nonOpExpr(); - antlr4::tree::TerminalNode *POSTFIX_OP(); + Postfix_opContext *postfix_op(); virtual void enterRule(antlr4::tree::ParseTreeListener *listener) override; virtual void exitRule(antlr4::tree::ParseTreeListener *listener) override; @@ -595,10 +651,8 @@ public: AccessExprContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; NonAccessExprContext *nonAccessExpr(); - std::vector identifierExpr(); - IdentifierExprContext* identifierExpr(size_t i); - std::vector expr(); - ExprContext* expr(size_t i); + std::vector accessSubExpr(); + AccessSubExprContext* accessSubExpr(size_t i); virtual void enterRule(antlr4::tree::ParseTreeListener *listener) override; virtual void exitRule(antlr4::tree::ParseTreeListener *listener) override; @@ -607,6 +661,46 @@ public: AccessExprContext* accessExpr(); + class AccessSubExprContext : public antlr4::ParserRuleContext { + public: + AccessSubExprContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + AccessMemberContext *accessMember(); + AccessBracketsContext *accessBrackets(); + + virtual void enterRule(antlr4::tree::ParseTreeListener *listener) override; + virtual void exitRule(antlr4::tree::ParseTreeListener *listener) override; + + }; + + AccessSubExprContext* accessSubExpr(); + + class AccessMemberContext : public antlr4::ParserRuleContext { + public: + AccessMemberContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + IdentifierExprContext *identifierExpr(); + + virtual void enterRule(antlr4::tree::ParseTreeListener *listener) override; + virtual void exitRule(antlr4::tree::ParseTreeListener *listener) override; + + }; + + AccessMemberContext* accessMember(); + + class AccessBracketsContext : public antlr4::ParserRuleContext { + public: + AccessBracketsContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + ExprContext *expr(); + + virtual void enterRule(antlr4::tree::ParseTreeListener *listener) override; + virtual void exitRule(antlr4::tree::ParseTreeListener *listener) override; + + }; + + AccessBracketsContext* accessBrackets(); + class ParenExprContext : public antlr4::ParserRuleContext { public: ParenExprContext(antlr4::ParserRuleContext *parent, size_t invokingState); @@ -672,6 +766,43 @@ public: StructNameContext* structName(); + class Postfix_opContext : public antlr4::ParserRuleContext { + public: + Postfix_opContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + + virtual void enterRule(antlr4::tree::ParseTreeListener *listener) override; + virtual void exitRule(antlr4::tree::ParseTreeListener *listener) override; + + }; + + Postfix_opContext* postfix_op(); + + class Prefix_opContext : public antlr4::ParserRuleContext { + public: + Prefix_opContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + Postfix_opContext *postfix_op(); + + virtual void enterRule(antlr4::tree::ParseTreeListener *listener) override; + virtual void exitRule(antlr4::tree::ParseTreeListener *listener) override; + + }; + + Prefix_opContext* prefix_op(); + + class Binary_opContext : public antlr4::ParserRuleContext { + public: + Binary_opContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + + virtual void enterRule(antlr4::tree::ParseTreeListener *listener) override; + virtual void exitRule(antlr4::tree::ParseTreeListener *listener) override; + + }; + + Binary_opContext* binary_op(); + private: static std::vector _decisionToDFA; diff --git a/src/repr.h b/src/repr.h index c745ba1..cc28746 100644 --- a/src/repr.h +++ b/src/repr.h @@ -97,6 +97,7 @@ struct LitExpr { bool _bool; }; +// TODO: accessExpr struct IdentifierExpr { std::string name; }; @@ -107,14 +108,17 @@ struct BracketsExpr { }; enum class UnaryOperatorType { - Plus, Minus, IncrementPre, DecrementPre, IncrementPost, DecrementPost, LogicalNot, BitwiseNot, Dereference, AddressOf + Plus, Minus, IncrementPre, DecrementPre, IncrementPost, DecrementPost, + LogicalNot, BitwiseNot, Dereference, AddressOf, + COUNT }; enum class BinaryOperatorType { Plus, Minus, Multiply, Divide, Modulo, BitwiseAnd, BitwiseOr, BitwiseXor, LessThan, GreaterThan, LeftShift, RightShift, LogicalAnd, LogicalOr, Equals, NotEquals, LessThanEquals, GreaterThanEquals, BitwiseAndEquals, BitwiseOrEquals, BitwiseXorEquals, PlusEquals, MinusEquals, MultiplyEquals, DivideEquals, ModuloEquals, - LeftShiftEquals, RightShiftEquals + LeftShiftEquals, RightShiftEquals, + COUNT }; static std::string UnaryOperatorTypeStrings[] = { "+", "-", "++", "--", "++", "--", "!", "~", "*", "&" }; @@ -143,10 +147,11 @@ struct TernaryOperatorExpr { }; struct DotExpr { - std::shared_ptr lexpr; + std::shared_ptr expr; IdentifierExpr ident; }; +// TODO: paren expr struct Expr { ExprType type; @@ -185,8 +190,10 @@ struct SwitchStmt { std::vector cases; }; +// TODO: int i = 0 (var decl) struct ForStmt { - AssignStmt assign; + std::string varName; + std::shared_ptr initValue; std::shared_ptr condition; std::shared_ptr action; Body body; @@ -198,8 +205,8 @@ struct WhileStmt { }; struct AssignStmt { - Expr lexpr; - Expr rexpr; + std::string name; + Expr expr; }; struct ReturnStmt { diff --git a/src/repr_get.h b/src/repr_get.h index afea882..b624e4c 100644 --- a/src/repr_get.h +++ b/src/repr_get.h @@ -2,20 +2,31 @@ #include "repr.h" -Type getType(TocParser::TypeContext * ctx); -Variable getVariable(TocParser::VarContext * ctx); -Body getBody(TocParser::BodyContext * ctx); -Function getFunction(TocParser::FuncContext * ctx); -Struct getStruct(TocParser::StructDeclContext * ctx); -Program getProgram(TocParser::ProgContext * ctx); -//Expr getExpr(TocParser::NonOpExprContext * ctx); -//Expr getExpr(TocParser::NonAccessExprContext * ctx); -Expr getExpr(TocParser::ExprContext * ctx); -Stmt getStmt(TocParser::StmtContext * ctx); +Type getType(TocParser::TypeContext * ctx); +Variable getVariable(TocParser::VarContext * ctx); +Body getBody(TocParser::BodyContext * ctx); +Function getFunction(TocParser::FuncContext * ctx); +Struct getStruct(TocParser::StructDeclContext * ctx); +Program getProgram(TocParser::ProgContext * ctx); +UnaryOperatorType getUnaryOperatorType(const std::string & s); +BinaryOperatorType getBinaryOperatorType(const std::string & s); +UnaryOperatorExpr getUnaryOperatorExpr(TocParser::OpExprContext * ctx); +BinaryOperatorExpr getBinaryOperatorExpr(TocParser::OpExprContext * ctx); +TernaryOperatorExpr getTernaryOperatorExpr(TocParser::OpExprContext * ctx); +Expr getExpr(TocParser::NonOpExprContext * ctx); +Expr getExpr(TocParser::NonAccessExprContext * ctx); +Expr getExpr(TocParser::ExprContext * ctx); +Stmt getStmt(TocParser::StmtContext * ctx); Type getType(TocParser::TypeContext * ctx) { Type result; result.name = ctx->typeName()->NAME()->toString(); + for (auto m : ctx->typeModifier()) { + result.modifiers.emplace_back( + m->toString() == "*" ? TypeModifierType::Pointer : TypeModifierType::Array, + m->toString() == "*" ? -1 : atoi(m->NUMBER()->toString().c_str()) + ); + } return result; } Variable getVariable(TocParser::VarContext * ctx) { @@ -29,6 +40,8 @@ Body getBody(TocParser::BodyContext * ctx) { for (auto s : ctx->stmt()) { if (s->varDecl() != nullptr) { result.variables.push_back(getVariable(s->varDecl()->var())); + if (s->varDecl()->var()->expr() != nullptr) + result.statements.push_back(getStmt(s)); } else { result.statements.push_back(getStmt(s)); @@ -75,127 +88,257 @@ Program getProgram(TocParser::ProgContext * ctx) { } return result; } -OperatorExpr getOperatorExpr(TocParser::OpExprContext * ctx) { - OperatorExpr result; +UnaryOperatorType getUnaryOperatorType(const std::string & s) { + for (int i = 0; i < (int)UnaryOperatorType::COUNT; i++) { + if (UnaryOperatorTypeStrings[i] == s) { + return (UnaryOperatorType)i; + } + } + return UnaryOperatorType::COUNT; +} +BinaryOperatorType getBinaryOperatorType(const std::string & s) { + for (int i = 0; i < (int)BinaryOperatorType::COUNT; i++) { + if (BinaryOperatorTypeStrings[i] == s) { + return (BinaryOperatorType)i; + } + } + return BinaryOperatorType::COUNT; +} +UnaryOperatorExpr getUnaryOperatorExpr(TocParser::OpExprContext * ctx) { + UnaryOperatorExpr result; + if (ctx->prefixOp() != nullptr) + result.expr = std::make_unique(getExpr(ctx->prefixOp()->nonOpExpr())); + else + result.expr = std::make_unique(getExpr(ctx->postfixOp()->nonOpExpr())); + + std::string op; + if (ctx->prefixOp() != nullptr) + op = ctx->prefixOp()->prefix_op()->getText(); + else + op = ctx->postfixOp()->postfix_op()->getText(); + + // TODO: postfix type + + result.type = getUnaryOperatorType(op); + + return result; +} +BinaryOperatorExpr getBinaryOperatorExpr(TocParser::OpExprContext * ctx) { + BinaryOperatorExpr result; result.lexpr = std::make_unique(getExpr(ctx->binaryOp()->nonOpExpr(0))); result.rexpr = std::make_unique(getExpr(ctx->binaryOp()->nonOpExpr(1))); - std::string op = ctx->binaryOp()->BINARY_OP(0)->toString(); - for (auto o : ops) { + std::string op = ctx->binaryOp()->binary_op(0)->getText(); + std::cout << op << std::endl; - } - if (op == "+") result.type = OperatorType::Plus; - if (op == "-") result.type = OperatorType::Minus; - if (op == "*") result.type = OperatorType::Multiply; - if (op == "/") result.type = OperatorType::Divide; - if (op == "==") result.type = OperatorType::Equals; - if (op == "!=") result.type = OperatorType::NotEquals; - if (op == "<") result.type = OperatorType::LessThan; - if (op == ">") result.type = OperatorType::GreaterThan; + result.type = getBinaryOperatorType(op); + + return result; +} +TernaryOperatorExpr getTernaryOperatorExpr(TocParser::OpExprContext * ctx) { + TernaryOperatorExpr result; + result.lexpr = std::make_unique(getExpr(ctx->ternaryOp()->nonOpExpr())); + result.rexprTrue = std::make_unique(getExpr(ctx->ternaryOp()->expr(0))); + result.rexprFalse = std::make_unique(getExpr(ctx->ternaryOp()->expr(1))); return result; } Expr getExpr(TocParser::NonOpExprContext * ctx) { Expr result; - if (ctx->funcCall() != nullptr) { - result.type = ExprType::Call; - for (auto e : ctx->funcCall()->expr()) - result._call.arguments.push_back(getExpr(e)); - result._call.functionName = ctx->funcCall()->funcName()->NAME()->toString(); - } - if (ctx->literal() != nullptr) { - result.type = ExprType::Literal; - result._literal.i = atoi(ctx->literal()->INTLIT()->toString().c_str()); - } - if (ctx->identifier() != nullptr) { - result.type = ExprType::Variable; - result._variable.name = ctx->identifier()->varName()->NAME()->toString(); - } - if (ctx->subscript() != nullptr) { - result.type = ExprType::Brackets; - result._brackets.lexpr = std::make_unique(getExpr(ctx->subscript()->nonSubscriptExpr())); - result._brackets.rexpr = std::make_unique(getExpr(ctx->subscript()->expr())); - } - if (ctx->memberAccess() != nullptr) { - result.type = ExprType::Dot; - Expr e; e.type = ExprType::Variable; e._variable.name = ctx->memberAccess()->identifier(0)->varName()->NAME()->toString(); - result._dot.lexpr = std::make_unique(e); - result._dot.name = ctx->memberAccess()->identifier(1)->varName()->NAME()->toString(); + if (ctx->funcExpr() != nullptr) { + result.type = ExprType::Func; + result._func.functionName = ctx->funcExpr()->funcName()->NAME()->toString(); + for (auto e : ctx->funcExpr()->expr()) + result._func.arguments.push_back(getExpr(e)); + } + if (ctx->litExpr() != nullptr) { + result.type = ExprType::Lit; + if (ctx->litExpr()->INT_LIT() != nullptr) { + result._lit.type = LitType::Int; + result._lit._int = atoi(ctx->litExpr()->INT_LIT()->toString().c_str()); + } + else if (ctx->litExpr()->DECIMAL_LIT() != nullptr) { + result._lit.type = LitType::Decimal; + result._lit._decimal = atof(ctx->litExpr()->DECIMAL_LIT()->toString().c_str()); + } + else if (ctx->litExpr()->STRING_LIT() != nullptr) { + result._lit.type = LitType::String; + result._lit._string = ctx->litExpr()->STRING_LIT()->toString(); + } + else if (ctx->litExpr()->BOOL_LIT() != nullptr) { + result._lit.type = LitType::Bool; + result._lit._bool = ctx->litExpr()->BOOL_LIT()->toString() == "true"; + } + } + if (ctx->identifierExpr() != nullptr) { + result.type = ExprType::Identifier; + result._identifier.name = ctx->identifierExpr()->varName()->NAME()->toString(); + } + if (ctx->parenExpr() != nullptr) { + result = getExpr(ctx->parenExpr()->expr()); + } + if (ctx->accessExpr() != nullptr) { + // TODO: access chain + for (auto sub : ctx->accessExpr()->accessSubExpr()) { + if (sub->accessMember() != nullptr) { + result.type = ExprType::Dot; + result._dot.ident.name = sub->accessMember()->identifierExpr()->varName()->NAME()->toString(); + } + else { + result.type = ExprType::Brackets; + result._brackets.lexpr = std::make_unique(getExpr(ctx->accessExpr()->nonAccessExpr())); + result._brackets.rexpr = std::make_unique(getExpr(sub->accessBrackets()->expr())); + } + } } return result; } Expr getExpr(TocParser::NonAccessExprContext * ctx) { Expr result; - if (ctx->funcCall() != nullptr) { - result.type = ExprType::Call; - for (auto e : ctx->funcCall()->expr()) - result._call.arguments.push_back(getExpr(e)); - result._call.functionName = ctx->funcCall()->funcName()->NAME()->toString(); - } - if (ctx->literal() != nullptr) { - result.type = ExprType::Literal; - result._literal.i = atoi(ctx->literal()->INTLIT()->toString().c_str()); - } - if (ctx->identifier() != nullptr) { - result.type = ExprType::Variable; - result._variable.name = ctx->identifier()->varName()->NAME()->toString(); - } - if (ctx->memberAccess() != nullptr) { - result.type = ExprType::Dot; - Expr e; e.type = ExprType::Variable; e._variable.name = ctx->memberAccess()->identifier(0)->varName()->NAME()->toString(); - result._dot.lexpr = std::make_unique(e); - result._dot.name = ctx->memberAccess()->identifier(1)->varName()->NAME()->toString(); + if (ctx->funcExpr() != nullptr) { + result.type = ExprType::Func; + result._func.functionName = ctx->funcExpr()->funcName()->NAME()->toString(); + for (auto e : ctx->funcExpr()->expr()) + result._func.arguments.push_back(getExpr(e)); + } + if (ctx->identifierExpr() != nullptr) { + result.type = ExprType::Identifier; + result._identifier.name = ctx->identifierExpr()->varName()->NAME()->toString(); + } + if (ctx->parenExpr() != nullptr) { + result = getExpr(ctx->parenExpr()->expr()); } return result; } Expr getExpr(TocParser::ExprContext * ctx) { Expr result; - if (ctx->funcCall() != nullptr) { - result.type = ExprType::Call; - for (auto e : ctx->funcCall()->expr()) - result._call.arguments.push_back(getExpr(e)); - result._call.functionName = ctx->funcCall()->funcName()->NAME()->toString(); - } - if (ctx->literal() != nullptr) { - result.type = ExprType::Literal; - result._literal.i = atoi(ctx->literal()->INTLIT()->toString().c_str()); - } - if (ctx->identifier() != nullptr) { - result.type = ExprType::Variable; - result._variable.name = ctx->identifier()->varName()->NAME()->toString(); - } - if (ctx->subscript() != nullptr) { - result.type = ExprType::Brackets; - result._brackets.lexpr = std::make_unique(getExpr(ctx->subscript()->nonSubscriptExpr())); - result._brackets.rexpr = std::make_unique(getExpr(ctx->subscript()->expr())); - } - if (ctx->memberAccess() != nullptr) { - result.type = ExprType::Dot; - Expr e; e.type = ExprType::Variable; e._variable.name = ctx->memberAccess()->identifier(0)->varName()->NAME()->toString(); - result._dot.lexpr = std::make_unique(e); - result._dot.name = ctx->memberAccess()->identifier(1)->varName()->NAME()->toString(); - } - if (ctx->operatorExpr() != nullptr) { - result.type = ExprType::Operator; - result._operator = getOperatorExpr(ctx->operatorExpr()); + if (ctx->funcExpr() != nullptr) { + result.type = ExprType::Func; + result._func.functionName = ctx->funcExpr()->funcName()->NAME()->toString(); + for (auto e : ctx->funcExpr()->expr()) + result._func.arguments.push_back(getExpr(e)); + } + if (ctx->litExpr() != nullptr) { + result.type = ExprType::Lit; + if (ctx->litExpr()->INT_LIT() != nullptr) { + result._lit.type = LitType::Int; + result._lit._int = atoi(ctx->litExpr()->INT_LIT()->toString().c_str()); + } + else if (ctx->litExpr()->DECIMAL_LIT() != nullptr) { + result._lit.type = LitType::Decimal; + result._lit._decimal = atof(ctx->litExpr()->DECIMAL_LIT()->toString().c_str()); + } + else if (ctx->litExpr()->STRING_LIT() != nullptr) { + result._lit.type = LitType::String; + result._lit._string = ctx->litExpr()->STRING_LIT()->toString(); + } + else if (ctx->litExpr()->BOOL_LIT() != nullptr) { + result._lit.type = LitType::Bool; + result._lit._bool = ctx->litExpr()->BOOL_LIT()->toString() == "true"; + } + } + if (ctx->identifierExpr() != nullptr) { + result.type = ExprType::Identifier; + result._identifier.name = ctx->identifierExpr()->varName()->NAME()->toString(); + } + if (ctx->parenExpr() != nullptr) { + result = getExpr(ctx->parenExpr()->expr()); + } + if (ctx->accessExpr() != nullptr) { + // TODO: access chain + for (auto sub : ctx->accessExpr()->accessSubExpr()) { + if (sub->accessMember() != nullptr) { + result.type = ExprType::Dot; + result._dot.expr = std::make_unique(getExpr(ctx->accessExpr()->nonAccessExpr())); + result._dot.ident.name = sub->accessMember()->identifierExpr()->varName()->NAME()->toString(); + } + else { + result.type = ExprType::Brackets; + result._brackets.lexpr = std::make_unique(getExpr(ctx->accessExpr()->nonAccessExpr())); + result._brackets.rexpr = std::make_unique(getExpr(sub->accessBrackets()->expr())); + } + } + } + if (ctx->opExpr() != nullptr) { + if (ctx->opExpr()->prefixOp() != nullptr || ctx->opExpr()->postfixOp() != nullptr) { + result.type = ExprType::UnaryOperator; + result._unaryOperator = getUnaryOperatorExpr(ctx->opExpr()); + } + else if (ctx->opExpr()->binaryOp() != nullptr) { + result.type = ExprType::BinaryOperator; + result._binaryOperator = getBinaryOperatorExpr(ctx->opExpr()); + for (int i = 1; i < ctx->opExpr()->binaryOp()->binary_op().size(); i++) { + Expr tmp = result; + result._binaryOperator.lexpr = std::make_unique(tmp); + result._binaryOperator.type = getBinaryOperatorType(ctx->opExpr()->binaryOp()->binary_op(i)->getText()); + result._binaryOperator.rexpr = std::make_unique(getExpr(ctx->opExpr()->binaryOp()->nonOpExpr(i+1))); + } + } + else if (ctx->opExpr()->ternaryOp() != nullptr) { + result.type = ExprType::TernaryOperator; + result._ternaryOperator = getTernaryOperatorExpr(ctx->opExpr()); + } } return result; } Stmt getStmt(TocParser::StmtContext * ctx) { Stmt result; - if (ctx->conditional() != nullptr) { + if (ctx->varDecl() != nullptr && ctx->varDecl()->var()->expr() != nullptr) { + result.type = StmtType::Assign; + result._assign.name = ctx->varDecl()->var()->varName()->NAME()->toString(); + result._assign.expr = getExpr(ctx->varDecl()->var()->expr()); + } + if (ctx->ifStmt() != nullptr) { result.type = StmtType::If; - result._if.condition = getExpr(ctx->conditional()->ifCond()->expr()); - result._if.body = getBody(ctx->conditional()->ifCond()->body()); + result._if.condition = getExpr(ctx->ifStmt()->expr()); + result._if.body = getBody(ctx->ifStmt()->body()); + for (auto ei : ctx->ifStmt()->elseIfStmt()) { + result._if.elses.emplace_back( + true, + std::make_unique(getExpr(ei->expr())), + getBody(ei->body()) + ); + } + if (ctx->ifStmt()->elseStmt() != nullptr) { + result._if.elses.emplace_back( + false, + nullptr, + getBody(ctx->ifStmt()->elseStmt()->body()) + ); + } } - if (ctx->loop() != nullptr) { + if (ctx->switchStmt() != nullptr) { + result.type = StmtType::Switch; + result._switch.ident.name = ctx->switchStmt()->identifierExpr()->varName()->NAME()->toString(); + for (auto c : ctx->switchStmt()->switchBody()->switchCase()) { + result._switch.cases.emplace_back( + std::make_unique(getExpr(c->expr())), + getBody(c->body()) + ); + } + } + if (ctx->forStmt() != nullptr) { + result.type = StmtType::For; + if (ctx->forStmt()->varInit() != nullptr) { + result._for.varName = ctx->forStmt()->varInit()->varName()->NAME()->toString(); + result._for.initValue = std::make_unique(getExpr(ctx->forStmt()->varInit()->expr())); + } + else { + result._for.varName = ctx->forStmt()->assignStmt()->identifierExpr()->varName()->NAME()->toString(); + result._for.initValue = std::make_unique(getExpr(ctx->forStmt()->assignStmt()->expr())); + } + result._for.condition = std::make_unique(getExpr(ctx->forStmt()->expr(0))); + result._for.action = std::make_unique(getExpr(ctx->forStmt()->expr(1))); + result._for.body = getBody(ctx->forStmt()->body()); + } + if (ctx->whileStmt() != nullptr) { result.type = StmtType::While; - result._while.condition = getExpr(ctx->loop()->whileLoop()->expr()); - result._while.body = getBody(ctx->loop()->whileLoop()->body()); + result._while.condition = getExpr(ctx->whileStmt()->expr()); + result._while.body = getBody(ctx->whileStmt()->body()); } - if (ctx->assignment() != nullptr) { + if (ctx->assignStmt() != nullptr) { result.type = StmtType::Assign; - //result._assign.lexpr = getExpr(ctx->assignment()->); - result._assign.rexpr = getExpr(ctx->assignment()->expr()); + result._assign.name = ctx->assignStmt()->identifierExpr()->varName()->NAME()->toString(); + result._assign.expr = getExpr(ctx->assignStmt()->expr()); } if (ctx->returnStmt() != nullptr) { result.type = StmtType::Return; @@ -205,9 +348,5 @@ Stmt getStmt(TocParser::StmtContext * ctx) { result.type = StmtType::Expr; result._expr = getExpr(ctx->expr()); } - if (ctx->varDecl() != nullptr && ctx->varDecl()->var()->expr() != nullptr) { - result.type = StmtType::Assign; - result._assign.rexpr = getExpr(ctx->varDecl()->var()->expr()); - } return result; } \ No newline at end of file diff --git a/src/toc.h b/src/toc.h index 67f92dc..6dd611d 100644 --- a/src/toc.h +++ b/src/toc.h @@ -59,7 +59,7 @@ std::ostream & operator<< (std::ostream & out, const Body & b) { for (auto s : b.statements) { indent(out); - out << s << ";\n"; + out << s << "\n"; } indent(out, -2); @@ -89,34 +89,57 @@ std::ostream & operator<< (std::ostream & out, const TernaryOperatorExpr & o) { } std::ostream & operator<< (std::ostream & out, const Expr & e) { switch (e.type) { + case ExprType::Func: + out << e._func.functionName << "(" << e._func.arguments << ")"; break; + case ExprType::Lit: + /**/ if (e._lit.type == LitType::Int) out << e._lit._int; + else if (e._lit.type == LitType::Decimal) out << e._lit._decimal; + else if (e._lit.type == LitType::String) out << e._lit._string; + else if (e._lit.type == LitType::Bool) out << e._lit._bool; + break; + case ExprType::Identifier: + out << e._identifier.name; break; case ExprType::Brackets: out << *e._brackets.lexpr << "[" << *e._brackets.rexpr << "]"; break; - case ExprType::Call: - out << e._call.functionName << "(" << e._call.arguments << ")"; break; case ExprType::Dot: - out << e._dot.name << "." << *e._dot.lexpr; break; - case ExprType::Literal: - out << e._literal.i; break; - case ExprType::Operator: - out << e._operator; break; - case ExprType::Variable: - out << e._variable.name; break; + out << *e._dot.expr << "." << e._dot.ident.name; break; + case ExprType::UnaryOperator: + out << e._unaryOperator; break; + case ExprType::BinaryOperator: + out << e._binaryOperator; break; + case ExprType::TernaryOperator: + out << e._ternaryOperator; break; } return out; } std::ostream & operator<< (std::ostream & out, const Stmt & s) { switch (s.type) { - case StmtType::Assign: - out << s._assign.lexpr << "=" << s._assign.rexpr; break; - case StmtType::Expr: - out << s._expr; break; case StmtType::If: out << "if (" << s._if.condition << ")\n" << s._if.body; break; - case StmtType::Return: - out << "return " << s._return.expr; break; + case StmtType::Switch: + out << "switch (" << s._switch.ident.name << ")\n{\n"; + for (auto c : s._switch.cases) { + indent(out, 2); + out << "case " << *c.expr << ": " << c.body << "break;"; + } + indent(out, -2); + out << "}\n"; + break; + case StmtType::For: + out << "for (" << + s._for.varName << " = " << *s._for.initValue << "; " << + *s._for.condition << "; " << + *s._for.action << + ")\n" << s._for.body; break; case StmtType::While: out << "while (" << s._while.condition << ")\n" << s._while.body; break; + case StmtType::Assign: + out << s._assign.name << "=" << s._assign.expr << ";"; break; + case StmtType::Return: + out << "return " << s._return.expr << ";"; break; + case StmtType::Expr: + out << s._expr << ";"; break; } return out; @@ -124,17 +147,7 @@ std::ostream & operator<< (std::ostream & out, const Stmt & s) { void tocFunction (std::ostream & out, const Function & f, bool stub) { - out << f.returnType << " " << f.name << " ("; - - bool comma = false; - for (auto p : f.parameters) { - if (comma) out << ", "; - else comma = true; - - out << p.type << " " << p.name; - } - - out << ")"; + out << f.returnType << " " << f.name << " (" << f.parameters << ")"; if (stub) { out << ";\n"; @@ -147,6 +160,9 @@ void tocStruct (std::ostream & out, const Struct & s, bool stub) { out << "struct " << s.name; if (stub) { out << ";\n"; + for (auto m : s.methods) { + out << m.returnType << " " << s.name << "_" << m.name << " (" << m.parameters << ");\n"; + } return; } out << "\n{\n"; @@ -159,6 +175,10 @@ void tocStruct (std::ostream & out, const Struct & s, bool stub) { indent(out, -2); out << "};\n"; + + for (auto m : s.methods) { + out << m.returnType << " " << s.name << "_" << m.name << " (" << m.parameters << ")\n" << m.body; + } } void tocProgram (std::ostream & out, const Program & p) { for (auto s : p.structs) { diff --git a/test.toc b/test.toc index f9322d6..80e19c1 100644 --- a/test.toc +++ b/test.toc @@ -23,7 +23,7 @@ struct S1 { while i1 < i2 { i1 = m2(i1) - i2 = (i1 + i2) * i2 + i2 = (i1 + i2 * i2) print(12345) } diff --git a/todo.txt b/todo.txt index 8ddc15e..f48d2a3 100644 --- a/todo.txt +++ b/todo.txt @@ -58,4 +58,5 @@ Zeitplan: Missing: - unions -- const/static/extern \ No newline at end of file +- const/static/extern +- operator precedence \ No newline at end of file