diff --git a/RiddleLexer.g4 b/RiddleLexer.g4 index e1344cb..8a889a6 100644 --- a/RiddleLexer.g4 +++ b/RiddleLexer.g4 @@ -20,6 +20,8 @@ False:'false'; Static:'static'; Const:'const'; Null:'null'; +Try:'try'; +Catch:'catch'; //可见字符 //基本运算符 LeftBracket: '('; diff --git a/RiddleParser.g4 b/RiddleParser.g4 index fee3074..7d82059 100644 --- a/RiddleParser.g4 +++ b/RiddleParser.g4 @@ -5,11 +5,17 @@ options { } @Header{ + } @parserFile::members { } +null_cnt + : Semi + | Endl + ; + program : statement_ed* | EOF @@ -31,10 +37,15 @@ statement | whileStatement | ifStatement | returnStatement + | tryExpr | expression | LeftCurly statement_ed* RightCurly ; +bodyExpr + : statement_ed* + ; + packStatement : Package packName=id ; @@ -58,13 +69,8 @@ defineArgs ; funcDefine - : Func funcName=Identifier LeftBracket args=defineArgs RightBracket (Sub Greater returnType=typeName)? LeftCurly body=funcBody RightCurly + : Func funcName=Identifier LeftBracket args=defineArgs RightBracket (Sub Greater returnType=typeName)? LeftCurly body=bodyExpr RightCurly ; - -funcBody - : statement_ed* - ; - forStatement : For LeftBracket (init=varDefineStatement)? Semi (termCond=expression)? Semi (selfVar=statement)? RightBracket body=statement_ed ; @@ -83,11 +89,15 @@ returnStatement ; classDefine - : Class className = id LeftCurly body=classBody RightCurly + : Class className = id LeftCurly body=bodyExpr RightCurly ; -classBody - : statement_ed* +tryExpr + : Try LeftCurly tryBody=bodyExpr RightCurly null_cnt? catchExpr + ; + +catchExpr + : Catch LeftBracket varDefineStatement RightBracket ; // 这一块就是使用 diff --git a/parser/RiddleLexer.cpp b/parser/RiddleLexer.cpp index 29afebb..8e2984f 100644 --- a/parser/RiddleLexer.cpp +++ b/parser/RiddleLexer.cpp @@ -1,5 +1,5 @@ -// Generated from E:/Riddle-Language/RiddleLexer.g4 by ANTLR 4.13.1 +// Generated from E:/Riddle-Language/RiddleLexer.g4 by ANTLR 4.13.2 #include "RiddleLexer.h" @@ -45,7 +45,7 @@ ::antlr4::internal::OnceFlag riddlelexerLexerOnceFlag; #if ANTLR4_USE_THREAD_LOCAL_CACHE static thread_local #endif -RiddleLexerStaticData *riddlelexerLexerStaticData = nullptr; +std::unique_ptr riddlelexerLexerStaticData = nullptr; void riddlelexerLexerInitialize() { #if ANTLR4_USE_THREAD_LOCAL_CACHE @@ -59,14 +59,14 @@ void riddlelexerLexerInitialize() { std::vector{ "Var", "Val", "For", "While", "If", "Else", "Func", "Return", "Import", "Package", "Class", "Public", "Protected", "Private", "Override", - "True", "False", "Static", "Const", "Null", "LeftBracket", "RightBracket", - "LeftSquare", "RightSquare", "LeftCurly", "RightCurly", "Colon", "Semi", - "Comma", "Equal", "Assign", "Greater", "Less", "LeftLeft", "RightRight", - "RightRightRight", "Add", "Sub", "Star", "Div", "Mod", "Not", "And", - "Or", "Xor", "Dot", "DoubleQuotes", "Quotes", "Endl", "Identifier", - "Hexadecimal", "Decimal", "Octal", "Binary", "Float", "IntegerSequence", - "HEX_DIGIT", "OCTAL_DIGIT", "BINARY_DIGIT", "DIGIT", "STRING", "ESC", - "LINE_COMMENT", "BLOCK_COMMENT", "WHITESPACE" + "True", "False", "Static", "Const", "Null", "Try", "Catch", "LeftBracket", + "RightBracket", "LeftSquare", "RightSquare", "LeftCurly", "RightCurly", + "Colon", "Semi", "Comma", "Equal", "Assign", "Greater", "Less", "LeftLeft", + "RightRight", "RightRightRight", "Add", "Sub", "Star", "Div", "Mod", + "Not", "And", "Or", "Xor", "Dot", "DoubleQuotes", "Quotes", "Endl", + "Identifier", "Hexadecimal", "Decimal", "Octal", "Binary", "Float", + "IntegerSequence", "HEX_DIGIT", "OCTAL_DIGIT", "BINARY_DIGIT", "DIGIT", + "STRING", "ESC", "LINE_COMMENT", "BLOCK_COMMENT", "WHITESPACE" }, std::vector{ "DEFAULT_TOKEN_CHANNEL", "HIDDEN" @@ -78,26 +78,26 @@ void riddlelexerLexerInitialize() { "", "'var'", "'val'", "'for'", "'while'", "'if'", "'else'", "'fun'", "'return'", "'import'", "'package'", "'class'", "'public'", "'protected'", "'Private'", "'override'", "'true'", "'false'", "'static'", "'const'", - "'null'", "'('", "')'", "'['", "']'", "'{'", "'}'", "':'", "';'", - "','", "'=='", "'='", "'>'", "'<'", "'<<'", "'>>'", "'>>>'", "'+'", - "'-'", "'*'", "'/'", "'%'", "'!'", "'&'", "'|'", "'^'", "'.'", "'\"'", - "'''", "'\\n'" + "'null'", "'try'", "'catch'", "'('", "')'", "'['", "']'", "'{'", "'}'", + "':'", "';'", "','", "'=='", "'='", "'>'", "'<'", "'<<'", "'>>'", + "'>>>'", "'+'", "'-'", "'*'", "'/'", "'%'", "'!'", "'&'", "'|'", "'^'", + "'.'", "'\"'", "'''", "'\\n'" }, std::vector{ "", "Var", "Val", "For", "While", "If", "Else", "Func", "Return", "Import", "Package", "Class", "Public", "Protected", "Private", "Override", - "True", "False", "Static", "Const", "Null", "LeftBracket", "RightBracket", - "LeftSquare", "RightSquare", "LeftCurly", "RightCurly", "Colon", "Semi", - "Comma", "Equal", "Assign", "Greater", "Less", "LeftLeft", "RightRight", - "RightRightRight", "Add", "Sub", "Star", "Div", "Mod", "Not", "And", - "Or", "Xor", "Dot", "DoubleQuotes", "Quotes", "Endl", "Identifier", - "Hexadecimal", "Decimal", "Octal", "Binary", "Float", "IntegerSequence", - "HEX_DIGIT", "OCTAL_DIGIT", "BINARY_DIGIT", "DIGIT", "STRING", "LINE_COMMENT", - "BLOCK_COMMENT", "WHITESPACE" + "True", "False", "Static", "Const", "Null", "Try", "Catch", "LeftBracket", + "RightBracket", "LeftSquare", "RightSquare", "LeftCurly", "RightCurly", + "Colon", "Semi", "Comma", "Equal", "Assign", "Greater", "Less", "LeftLeft", + "RightRight", "RightRightRight", "Add", "Sub", "Star", "Div", "Mod", + "Not", "And", "Or", "Xor", "Dot", "DoubleQuotes", "Quotes", "Endl", + "Identifier", "Hexadecimal", "Decimal", "Octal", "Binary", "Float", + "IntegerSequence", "HEX_DIGIT", "OCTAL_DIGIT", "BINARY_DIGIT", "DIGIT", + "STRING", "LINE_COMMENT", "BLOCK_COMMENT", "WHITESPACE" } ); static const int32_t serializedATNSegment[] = { - 4,0,64,423,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7, + 4,0,66,437,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7, 6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14, 7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21, 7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28, @@ -106,137 +106,142 @@ void riddlelexerLexerInitialize() { 7,42,2,43,7,43,2,44,7,44,2,45,7,45,2,46,7,46,2,47,7,47,2,48,7,48,2,49, 7,49,2,50,7,50,2,51,7,51,2,52,7,52,2,53,7,53,2,54,7,54,2,55,7,55,2,56, 7,56,2,57,7,57,2,58,7,58,2,59,7,59,2,60,7,60,2,61,7,61,2,62,7,62,2,63, - 7,63,2,64,7,64,1,0,1,0,1,0,1,0,1,1,1,1,1,1,1,1,1,2,1,2,1,2,1,2,1,3,1, - 3,1,3,1,3,1,3,1,3,1,4,1,4,1,4,1,5,1,5,1,5,1,5,1,5,1,6,1,6,1,6,1,6,1,7, - 1,7,1,7,1,7,1,7,1,7,1,7,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,9,1,9,1,9,1,9,1, - 9,1,9,1,9,1,9,1,10,1,10,1,10,1,10,1,10,1,10,1,11,1,11,1,11,1,11,1,11, - 1,11,1,11,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,13,1,13, - 1,13,1,13,1,13,1,13,1,13,1,13,1,14,1,14,1,14,1,14,1,14,1,14,1,14,1,14, - 1,14,1,15,1,15,1,15,1,15,1,15,1,16,1,16,1,16,1,16,1,16,1,16,1,17,1,17, - 1,17,1,17,1,17,1,17,1,17,1,18,1,18,1,18,1,18,1,18,1,18,1,19,1,19,1,19, - 1,19,1,19,1,20,1,20,1,21,1,21,1,22,1,22,1,23,1,23,1,24,1,24,1,25,1,25, - 1,26,1,26,1,27,1,27,1,28,1,28,1,29,1,29,1,29,1,30,1,30,1,31,1,31,1,32, - 1,32,1,33,1,33,1,33,1,34,1,34,1,34,1,35,1,35,1,35,1,35,1,36,1,36,1,37, - 1,37,1,38,1,38,1,39,1,39,1,40,1,40,1,41,1,41,1,42,1,42,1,43,1,43,1,44, - 1,44,1,45,1,45,1,46,1,46,1,47,1,47,1,48,1,48,1,49,1,49,5,49,318,8,49, - 10,49,12,49,321,9,49,1,50,1,50,1,50,1,50,1,50,5,50,328,8,50,10,50,12, - 50,331,9,50,1,51,1,51,1,51,5,51,336,8,51,10,51,12,51,339,9,51,3,51,341, - 8,51,1,52,1,52,1,52,5,52,346,8,52,10,52,12,52,349,9,52,1,53,1,53,1,53, - 1,53,1,53,5,53,356,8,53,10,53,12,53,359,9,53,1,54,1,54,1,54,1,54,1,55, - 4,55,366,8,55,11,55,12,55,367,1,56,1,56,1,57,1,57,1,58,1,58,1,59,1,59, - 1,60,1,60,1,60,5,60,381,8,60,10,60,12,60,384,9,60,1,60,1,60,1,61,1,61, - 3,61,390,8,61,1,62,1,62,1,62,1,62,5,62,396,8,62,10,62,12,62,399,9,62, - 1,62,1,62,1,63,1,63,1,63,1,63,5,63,407,8,63,10,63,12,63,410,9,63,1,63, - 1,63,1,63,1,63,1,63,1,64,4,64,418,8,64,11,64,12,64,419,1,64,1,64,1,408, - 0,65,1,1,3,2,5,3,7,4,9,5,11,6,13,7,15,8,17,9,19,10,21,11,23,12,25,13, + 7,63,2,64,7,64,2,65,7,65,2,66,7,66,1,0,1,0,1,0,1,0,1,1,1,1,1,1,1,1,1, + 2,1,2,1,2,1,2,1,3,1,3,1,3,1,3,1,3,1,3,1,4,1,4,1,4,1,5,1,5,1,5,1,5,1,5, + 1,6,1,6,1,6,1,6,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,8,1,8,1,8,1,8,1,8,1,8,1, + 8,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,10,1,10,1,10,1,10,1,10,1,10,1,11, + 1,11,1,11,1,11,1,11,1,11,1,11,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12, + 1,12,1,12,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,14,1,14,1,14,1,14, + 1,14,1,14,1,14,1,14,1,14,1,15,1,15,1,15,1,15,1,15,1,16,1,16,1,16,1,16, + 1,16,1,16,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,18,1,18,1,18,1,18,1,18, + 1,18,1,19,1,19,1,19,1,19,1,19,1,20,1,20,1,20,1,20,1,21,1,21,1,21,1,21, + 1,21,1,21,1,22,1,22,1,23,1,23,1,24,1,24,1,25,1,25,1,26,1,26,1,27,1,27, + 1,28,1,28,1,29,1,29,1,30,1,30,1,31,1,31,1,31,1,32,1,32,1,33,1,33,1,34, + 1,34,1,35,1,35,1,35,1,36,1,36,1,36,1,37,1,37,1,37,1,37,1,38,1,38,1,39, + 1,39,1,40,1,40,1,41,1,41,1,42,1,42,1,43,1,43,1,44,1,44,1,45,1,45,1,46, + 1,46,1,47,1,47,1,48,1,48,1,49,1,49,1,50,1,50,1,51,1,51,5,51,332,8,51, + 10,51,12,51,335,9,51,1,52,1,52,1,52,1,52,1,52,5,52,342,8,52,10,52,12, + 52,345,9,52,1,53,1,53,1,53,5,53,350,8,53,10,53,12,53,353,9,53,3,53,355, + 8,53,1,54,1,54,1,54,5,54,360,8,54,10,54,12,54,363,9,54,1,55,1,55,1,55, + 1,55,1,55,5,55,370,8,55,10,55,12,55,373,9,55,1,56,1,56,1,56,1,56,1,57, + 4,57,380,8,57,11,57,12,57,381,1,58,1,58,1,59,1,59,1,60,1,60,1,61,1,61, + 1,62,1,62,1,62,5,62,395,8,62,10,62,12,62,398,9,62,1,62,1,62,1,63,1,63, + 3,63,404,8,63,1,64,1,64,1,64,1,64,5,64,410,8,64,10,64,12,64,413,9,64, + 1,64,1,64,1,65,1,65,1,65,1,65,5,65,421,8,65,10,65,12,65,424,9,65,1,65, + 1,65,1,65,1,65,1,65,1,66,4,66,432,8,66,11,66,12,66,433,1,66,1,66,1,422, + 0,67,1,1,3,2,5,3,7,4,9,5,11,6,13,7,15,8,17,9,19,10,21,11,23,12,25,13, 27,14,29,15,31,16,33,17,35,18,37,19,39,20,41,21,43,22,45,23,47,24,49, 25,51,26,53,27,55,28,57,29,59,30,61,31,63,32,65,33,67,34,69,35,71,36, 73,37,75,38,77,39,79,40,81,41,83,42,85,43,87,44,89,45,91,46,93,47,95, 48,97,49,99,50,101,51,103,52,105,53,107,54,109,55,111,56,113,57,115,58, - 117,59,119,60,121,61,123,0,125,62,127,63,129,64,1,0,13,3,0,65,90,95,95, - 97,122,4,0,48,57,65,90,95,95,97,122,2,0,49,57,65,70,1,0,49,57,1,0,49, - 55,2,0,48,57,65,70,1,0,48,55,1,0,48,49,1,0,48,57,4,0,10,10,13,13,34,34, - 92,92,5,0,34,34,47,47,65,90,92,92,97,122,2,0,10,10,13,13,3,0,9,10,13, - 13,32,32,433,0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0, - 0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0, - 0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,31, - 1,0,0,0,0,33,1,0,0,0,0,35,1,0,0,0,0,37,1,0,0,0,0,39,1,0,0,0,0,41,1,0, - 0,0,0,43,1,0,0,0,0,45,1,0,0,0,0,47,1,0,0,0,0,49,1,0,0,0,0,51,1,0,0,0, - 0,53,1,0,0,0,0,55,1,0,0,0,0,57,1,0,0,0,0,59,1,0,0,0,0,61,1,0,0,0,0,63, - 1,0,0,0,0,65,1,0,0,0,0,67,1,0,0,0,0,69,1,0,0,0,0,71,1,0,0,0,0,73,1,0, - 0,0,0,75,1,0,0,0,0,77,1,0,0,0,0,79,1,0,0,0,0,81,1,0,0,0,0,83,1,0,0,0, - 0,85,1,0,0,0,0,87,1,0,0,0,0,89,1,0,0,0,0,91,1,0,0,0,0,93,1,0,0,0,0,95, - 1,0,0,0,0,97,1,0,0,0,0,99,1,0,0,0,0,101,1,0,0,0,0,103,1,0,0,0,0,105,1, - 0,0,0,0,107,1,0,0,0,0,109,1,0,0,0,0,111,1,0,0,0,0,113,1,0,0,0,0,115,1, - 0,0,0,0,117,1,0,0,0,0,119,1,0,0,0,0,121,1,0,0,0,0,125,1,0,0,0,0,127,1, - 0,0,0,0,129,1,0,0,0,1,131,1,0,0,0,3,135,1,0,0,0,5,139,1,0,0,0,7,143,1, - 0,0,0,9,149,1,0,0,0,11,152,1,0,0,0,13,157,1,0,0,0,15,161,1,0,0,0,17,168, - 1,0,0,0,19,175,1,0,0,0,21,183,1,0,0,0,23,189,1,0,0,0,25,196,1,0,0,0,27, - 206,1,0,0,0,29,214,1,0,0,0,31,223,1,0,0,0,33,228,1,0,0,0,35,234,1,0,0, - 0,37,241,1,0,0,0,39,247,1,0,0,0,41,252,1,0,0,0,43,254,1,0,0,0,45,256, - 1,0,0,0,47,258,1,0,0,0,49,260,1,0,0,0,51,262,1,0,0,0,53,264,1,0,0,0,55, - 266,1,0,0,0,57,268,1,0,0,0,59,270,1,0,0,0,61,273,1,0,0,0,63,275,1,0,0, - 0,65,277,1,0,0,0,67,279,1,0,0,0,69,282,1,0,0,0,71,285,1,0,0,0,73,289, - 1,0,0,0,75,291,1,0,0,0,77,293,1,0,0,0,79,295,1,0,0,0,81,297,1,0,0,0,83, - 299,1,0,0,0,85,301,1,0,0,0,87,303,1,0,0,0,89,305,1,0,0,0,91,307,1,0,0, - 0,93,309,1,0,0,0,95,311,1,0,0,0,97,313,1,0,0,0,99,315,1,0,0,0,101,322, - 1,0,0,0,103,340,1,0,0,0,105,342,1,0,0,0,107,350,1,0,0,0,109,360,1,0,0, - 0,111,365,1,0,0,0,113,369,1,0,0,0,115,371,1,0,0,0,117,373,1,0,0,0,119, - 375,1,0,0,0,121,377,1,0,0,0,123,387,1,0,0,0,125,391,1,0,0,0,127,402,1, - 0,0,0,129,417,1,0,0,0,131,132,5,118,0,0,132,133,5,97,0,0,133,134,5,114, - 0,0,134,2,1,0,0,0,135,136,5,118,0,0,136,137,5,97,0,0,137,138,5,108,0, - 0,138,4,1,0,0,0,139,140,5,102,0,0,140,141,5,111,0,0,141,142,5,114,0,0, - 142,6,1,0,0,0,143,144,5,119,0,0,144,145,5,104,0,0,145,146,5,105,0,0,146, - 147,5,108,0,0,147,148,5,101,0,0,148,8,1,0,0,0,149,150,5,105,0,0,150,151, - 5,102,0,0,151,10,1,0,0,0,152,153,5,101,0,0,153,154,5,108,0,0,154,155, - 5,115,0,0,155,156,5,101,0,0,156,12,1,0,0,0,157,158,5,102,0,0,158,159, - 5,117,0,0,159,160,5,110,0,0,160,14,1,0,0,0,161,162,5,114,0,0,162,163, - 5,101,0,0,163,164,5,116,0,0,164,165,5,117,0,0,165,166,5,114,0,0,166,167, - 5,110,0,0,167,16,1,0,0,0,168,169,5,105,0,0,169,170,5,109,0,0,170,171, - 5,112,0,0,171,172,5,111,0,0,172,173,5,114,0,0,173,174,5,116,0,0,174,18, - 1,0,0,0,175,176,5,112,0,0,176,177,5,97,0,0,177,178,5,99,0,0,178,179,5, - 107,0,0,179,180,5,97,0,0,180,181,5,103,0,0,181,182,5,101,0,0,182,20,1, - 0,0,0,183,184,5,99,0,0,184,185,5,108,0,0,185,186,5,97,0,0,186,187,5,115, - 0,0,187,188,5,115,0,0,188,22,1,0,0,0,189,190,5,112,0,0,190,191,5,117, - 0,0,191,192,5,98,0,0,192,193,5,108,0,0,193,194,5,105,0,0,194,195,5,99, - 0,0,195,24,1,0,0,0,196,197,5,112,0,0,197,198,5,114,0,0,198,199,5,111, - 0,0,199,200,5,116,0,0,200,201,5,101,0,0,201,202,5,99,0,0,202,203,5,116, - 0,0,203,204,5,101,0,0,204,205,5,100,0,0,205,26,1,0,0,0,206,207,5,80,0, - 0,207,208,5,114,0,0,208,209,5,105,0,0,209,210,5,118,0,0,210,211,5,97, - 0,0,211,212,5,116,0,0,212,213,5,101,0,0,213,28,1,0,0,0,214,215,5,111, - 0,0,215,216,5,118,0,0,216,217,5,101,0,0,217,218,5,114,0,0,218,219,5,114, - 0,0,219,220,5,105,0,0,220,221,5,100,0,0,221,222,5,101,0,0,222,30,1,0, - 0,0,223,224,5,116,0,0,224,225,5,114,0,0,225,226,5,117,0,0,226,227,5,101, - 0,0,227,32,1,0,0,0,228,229,5,102,0,0,229,230,5,97,0,0,230,231,5,108,0, - 0,231,232,5,115,0,0,232,233,5,101,0,0,233,34,1,0,0,0,234,235,5,115,0, - 0,235,236,5,116,0,0,236,237,5,97,0,0,237,238,5,116,0,0,238,239,5,105, - 0,0,239,240,5,99,0,0,240,36,1,0,0,0,241,242,5,99,0,0,242,243,5,111,0, - 0,243,244,5,110,0,0,244,245,5,115,0,0,245,246,5,116,0,0,246,38,1,0,0, - 0,247,248,5,110,0,0,248,249,5,117,0,0,249,250,5,108,0,0,250,251,5,108, - 0,0,251,40,1,0,0,0,252,253,5,40,0,0,253,42,1,0,0,0,254,255,5,41,0,0,255, - 44,1,0,0,0,256,257,5,91,0,0,257,46,1,0,0,0,258,259,5,93,0,0,259,48,1, - 0,0,0,260,261,5,123,0,0,261,50,1,0,0,0,262,263,5,125,0,0,263,52,1,0,0, - 0,264,265,5,58,0,0,265,54,1,0,0,0,266,267,5,59,0,0,267,56,1,0,0,0,268, - 269,5,44,0,0,269,58,1,0,0,0,270,271,5,61,0,0,271,272,5,61,0,0,272,60, - 1,0,0,0,273,274,5,61,0,0,274,62,1,0,0,0,275,276,5,62,0,0,276,64,1,0,0, - 0,277,278,5,60,0,0,278,66,1,0,0,0,279,280,5,60,0,0,280,281,5,60,0,0,281, - 68,1,0,0,0,282,283,5,62,0,0,283,284,5,62,0,0,284,70,1,0,0,0,285,286,5, - 62,0,0,286,287,5,62,0,0,287,288,5,62,0,0,288,72,1,0,0,0,289,290,5,43, - 0,0,290,74,1,0,0,0,291,292,5,45,0,0,292,76,1,0,0,0,293,294,5,42,0,0,294, - 78,1,0,0,0,295,296,5,47,0,0,296,80,1,0,0,0,297,298,5,37,0,0,298,82,1, - 0,0,0,299,300,5,33,0,0,300,84,1,0,0,0,301,302,5,38,0,0,302,86,1,0,0,0, - 303,304,5,124,0,0,304,88,1,0,0,0,305,306,5,94,0,0,306,90,1,0,0,0,307, - 308,5,46,0,0,308,92,1,0,0,0,309,310,5,34,0,0,310,94,1,0,0,0,311,312,5, - 39,0,0,312,96,1,0,0,0,313,314,5,10,0,0,314,98,1,0,0,0,315,319,7,0,0,0, - 316,318,7,1,0,0,317,316,1,0,0,0,318,321,1,0,0,0,319,317,1,0,0,0,319,320, - 1,0,0,0,320,100,1,0,0,0,321,319,1,0,0,0,322,323,5,48,0,0,323,324,5,120, - 0,0,324,325,1,0,0,0,325,329,7,2,0,0,326,328,3,113,56,0,327,326,1,0,0, - 0,328,331,1,0,0,0,329,327,1,0,0,0,329,330,1,0,0,0,330,102,1,0,0,0,331, - 329,1,0,0,0,332,341,5,48,0,0,333,337,7,3,0,0,334,336,3,119,59,0,335,334, - 1,0,0,0,336,339,1,0,0,0,337,335,1,0,0,0,337,338,1,0,0,0,338,341,1,0,0, - 0,339,337,1,0,0,0,340,332,1,0,0,0,340,333,1,0,0,0,341,104,1,0,0,0,342, - 343,5,48,0,0,343,347,7,4,0,0,344,346,3,115,57,0,345,344,1,0,0,0,346,349, - 1,0,0,0,347,345,1,0,0,0,347,348,1,0,0,0,348,106,1,0,0,0,349,347,1,0,0, - 0,350,351,5,48,0,0,351,352,5,98,0,0,352,353,1,0,0,0,353,357,5,49,0,0, - 354,356,3,117,58,0,355,354,1,0,0,0,356,359,1,0,0,0,357,355,1,0,0,0,357, - 358,1,0,0,0,358,108,1,0,0,0,359,357,1,0,0,0,360,361,3,103,51,0,361,362, - 3,91,45,0,362,363,3,111,55,0,363,110,1,0,0,0,364,366,3,119,59,0,365,364, - 1,0,0,0,366,367,1,0,0,0,367,365,1,0,0,0,367,368,1,0,0,0,368,112,1,0,0, - 0,369,370,7,5,0,0,370,114,1,0,0,0,371,372,7,6,0,0,372,116,1,0,0,0,373, - 374,7,7,0,0,374,118,1,0,0,0,375,376,7,8,0,0,376,120,1,0,0,0,377,382,5, - 34,0,0,378,381,3,123,61,0,379,381,8,9,0,0,380,378,1,0,0,0,380,379,1,0, - 0,0,381,384,1,0,0,0,382,380,1,0,0,0,382,383,1,0,0,0,383,385,1,0,0,0,384, - 382,1,0,0,0,385,386,5,34,0,0,386,122,1,0,0,0,387,389,5,92,0,0,388,390, - 7,10,0,0,389,388,1,0,0,0,390,124,1,0,0,0,391,392,5,47,0,0,392,393,5,47, - 0,0,393,397,1,0,0,0,394,396,8,11,0,0,395,394,1,0,0,0,396,399,1,0,0,0, - 397,395,1,0,0,0,397,398,1,0,0,0,398,400,1,0,0,0,399,397,1,0,0,0,400,401, - 6,62,0,0,401,126,1,0,0,0,402,403,5,47,0,0,403,404,5,42,0,0,404,408,1, - 0,0,0,405,407,9,0,0,0,406,405,1,0,0,0,407,410,1,0,0,0,408,409,1,0,0,0, - 408,406,1,0,0,0,409,411,1,0,0,0,410,408,1,0,0,0,411,412,5,42,0,0,412, - 413,5,47,0,0,413,414,1,0,0,0,414,415,6,63,0,0,415,128,1,0,0,0,416,418, - 7,12,0,0,417,416,1,0,0,0,418,419,1,0,0,0,419,417,1,0,0,0,419,420,1,0, - 0,0,420,421,1,0,0,0,421,422,6,64,0,0,422,130,1,0,0,0,14,0,319,329,337, - 340,347,357,367,380,382,389,397,408,419,1,6,0,0 + 117,59,119,60,121,61,123,62,125,63,127,0,129,64,131,65,133,66,1,0,13, + 3,0,65,90,95,95,97,122,4,0,48,57,65,90,95,95,97,122,2,0,49,57,65,70,1, + 0,49,57,1,0,49,55,2,0,48,57,65,70,1,0,48,55,1,0,48,49,1,0,48,57,4,0,10, + 10,13,13,34,34,92,92,5,0,34,34,47,47,65,90,92,92,97,122,2,0,10,10,13, + 13,3,0,9,10,13,13,32,32,447,0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1, + 0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0, + 0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0,0,27,1,0,0,0,0,29, + 1,0,0,0,0,31,1,0,0,0,0,33,1,0,0,0,0,35,1,0,0,0,0,37,1,0,0,0,0,39,1,0, + 0,0,0,41,1,0,0,0,0,43,1,0,0,0,0,45,1,0,0,0,0,47,1,0,0,0,0,49,1,0,0,0, + 0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57,1,0,0,0,0,59,1,0,0,0,0,61, + 1,0,0,0,0,63,1,0,0,0,0,65,1,0,0,0,0,67,1,0,0,0,0,69,1,0,0,0,0,71,1,0, + 0,0,0,73,1,0,0,0,0,75,1,0,0,0,0,77,1,0,0,0,0,79,1,0,0,0,0,81,1,0,0,0, + 0,83,1,0,0,0,0,85,1,0,0,0,0,87,1,0,0,0,0,89,1,0,0,0,0,91,1,0,0,0,0,93, + 1,0,0,0,0,95,1,0,0,0,0,97,1,0,0,0,0,99,1,0,0,0,0,101,1,0,0,0,0,103,1, + 0,0,0,0,105,1,0,0,0,0,107,1,0,0,0,0,109,1,0,0,0,0,111,1,0,0,0,0,113,1, + 0,0,0,0,115,1,0,0,0,0,117,1,0,0,0,0,119,1,0,0,0,0,121,1,0,0,0,0,123,1, + 0,0,0,0,125,1,0,0,0,0,129,1,0,0,0,0,131,1,0,0,0,0,133,1,0,0,0,1,135,1, + 0,0,0,3,139,1,0,0,0,5,143,1,0,0,0,7,147,1,0,0,0,9,153,1,0,0,0,11,156, + 1,0,0,0,13,161,1,0,0,0,15,165,1,0,0,0,17,172,1,0,0,0,19,179,1,0,0,0,21, + 187,1,0,0,0,23,193,1,0,0,0,25,200,1,0,0,0,27,210,1,0,0,0,29,218,1,0,0, + 0,31,227,1,0,0,0,33,232,1,0,0,0,35,238,1,0,0,0,37,245,1,0,0,0,39,251, + 1,0,0,0,41,256,1,0,0,0,43,260,1,0,0,0,45,266,1,0,0,0,47,268,1,0,0,0,49, + 270,1,0,0,0,51,272,1,0,0,0,53,274,1,0,0,0,55,276,1,0,0,0,57,278,1,0,0, + 0,59,280,1,0,0,0,61,282,1,0,0,0,63,284,1,0,0,0,65,287,1,0,0,0,67,289, + 1,0,0,0,69,291,1,0,0,0,71,293,1,0,0,0,73,296,1,0,0,0,75,299,1,0,0,0,77, + 303,1,0,0,0,79,305,1,0,0,0,81,307,1,0,0,0,83,309,1,0,0,0,85,311,1,0,0, + 0,87,313,1,0,0,0,89,315,1,0,0,0,91,317,1,0,0,0,93,319,1,0,0,0,95,321, + 1,0,0,0,97,323,1,0,0,0,99,325,1,0,0,0,101,327,1,0,0,0,103,329,1,0,0,0, + 105,336,1,0,0,0,107,354,1,0,0,0,109,356,1,0,0,0,111,364,1,0,0,0,113,374, + 1,0,0,0,115,379,1,0,0,0,117,383,1,0,0,0,119,385,1,0,0,0,121,387,1,0,0, + 0,123,389,1,0,0,0,125,391,1,0,0,0,127,401,1,0,0,0,129,405,1,0,0,0,131, + 416,1,0,0,0,133,431,1,0,0,0,135,136,5,118,0,0,136,137,5,97,0,0,137,138, + 5,114,0,0,138,2,1,0,0,0,139,140,5,118,0,0,140,141,5,97,0,0,141,142,5, + 108,0,0,142,4,1,0,0,0,143,144,5,102,0,0,144,145,5,111,0,0,145,146,5,114, + 0,0,146,6,1,0,0,0,147,148,5,119,0,0,148,149,5,104,0,0,149,150,5,105,0, + 0,150,151,5,108,0,0,151,152,5,101,0,0,152,8,1,0,0,0,153,154,5,105,0,0, + 154,155,5,102,0,0,155,10,1,0,0,0,156,157,5,101,0,0,157,158,5,108,0,0, + 158,159,5,115,0,0,159,160,5,101,0,0,160,12,1,0,0,0,161,162,5,102,0,0, + 162,163,5,117,0,0,163,164,5,110,0,0,164,14,1,0,0,0,165,166,5,114,0,0, + 166,167,5,101,0,0,167,168,5,116,0,0,168,169,5,117,0,0,169,170,5,114,0, + 0,170,171,5,110,0,0,171,16,1,0,0,0,172,173,5,105,0,0,173,174,5,109,0, + 0,174,175,5,112,0,0,175,176,5,111,0,0,176,177,5,114,0,0,177,178,5,116, + 0,0,178,18,1,0,0,0,179,180,5,112,0,0,180,181,5,97,0,0,181,182,5,99,0, + 0,182,183,5,107,0,0,183,184,5,97,0,0,184,185,5,103,0,0,185,186,5,101, + 0,0,186,20,1,0,0,0,187,188,5,99,0,0,188,189,5,108,0,0,189,190,5,97,0, + 0,190,191,5,115,0,0,191,192,5,115,0,0,192,22,1,0,0,0,193,194,5,112,0, + 0,194,195,5,117,0,0,195,196,5,98,0,0,196,197,5,108,0,0,197,198,5,105, + 0,0,198,199,5,99,0,0,199,24,1,0,0,0,200,201,5,112,0,0,201,202,5,114,0, + 0,202,203,5,111,0,0,203,204,5,116,0,0,204,205,5,101,0,0,205,206,5,99, + 0,0,206,207,5,116,0,0,207,208,5,101,0,0,208,209,5,100,0,0,209,26,1,0, + 0,0,210,211,5,80,0,0,211,212,5,114,0,0,212,213,5,105,0,0,213,214,5,118, + 0,0,214,215,5,97,0,0,215,216,5,116,0,0,216,217,5,101,0,0,217,28,1,0,0, + 0,218,219,5,111,0,0,219,220,5,118,0,0,220,221,5,101,0,0,221,222,5,114, + 0,0,222,223,5,114,0,0,223,224,5,105,0,0,224,225,5,100,0,0,225,226,5,101, + 0,0,226,30,1,0,0,0,227,228,5,116,0,0,228,229,5,114,0,0,229,230,5,117, + 0,0,230,231,5,101,0,0,231,32,1,0,0,0,232,233,5,102,0,0,233,234,5,97,0, + 0,234,235,5,108,0,0,235,236,5,115,0,0,236,237,5,101,0,0,237,34,1,0,0, + 0,238,239,5,115,0,0,239,240,5,116,0,0,240,241,5,97,0,0,241,242,5,116, + 0,0,242,243,5,105,0,0,243,244,5,99,0,0,244,36,1,0,0,0,245,246,5,99,0, + 0,246,247,5,111,0,0,247,248,5,110,0,0,248,249,5,115,0,0,249,250,5,116, + 0,0,250,38,1,0,0,0,251,252,5,110,0,0,252,253,5,117,0,0,253,254,5,108, + 0,0,254,255,5,108,0,0,255,40,1,0,0,0,256,257,5,116,0,0,257,258,5,114, + 0,0,258,259,5,121,0,0,259,42,1,0,0,0,260,261,5,99,0,0,261,262,5,97,0, + 0,262,263,5,116,0,0,263,264,5,99,0,0,264,265,5,104,0,0,265,44,1,0,0,0, + 266,267,5,40,0,0,267,46,1,0,0,0,268,269,5,41,0,0,269,48,1,0,0,0,270,271, + 5,91,0,0,271,50,1,0,0,0,272,273,5,93,0,0,273,52,1,0,0,0,274,275,5,123, + 0,0,275,54,1,0,0,0,276,277,5,125,0,0,277,56,1,0,0,0,278,279,5,58,0,0, + 279,58,1,0,0,0,280,281,5,59,0,0,281,60,1,0,0,0,282,283,5,44,0,0,283,62, + 1,0,0,0,284,285,5,61,0,0,285,286,5,61,0,0,286,64,1,0,0,0,287,288,5,61, + 0,0,288,66,1,0,0,0,289,290,5,62,0,0,290,68,1,0,0,0,291,292,5,60,0,0,292, + 70,1,0,0,0,293,294,5,60,0,0,294,295,5,60,0,0,295,72,1,0,0,0,296,297,5, + 62,0,0,297,298,5,62,0,0,298,74,1,0,0,0,299,300,5,62,0,0,300,301,5,62, + 0,0,301,302,5,62,0,0,302,76,1,0,0,0,303,304,5,43,0,0,304,78,1,0,0,0,305, + 306,5,45,0,0,306,80,1,0,0,0,307,308,5,42,0,0,308,82,1,0,0,0,309,310,5, + 47,0,0,310,84,1,0,0,0,311,312,5,37,0,0,312,86,1,0,0,0,313,314,5,33,0, + 0,314,88,1,0,0,0,315,316,5,38,0,0,316,90,1,0,0,0,317,318,5,124,0,0,318, + 92,1,0,0,0,319,320,5,94,0,0,320,94,1,0,0,0,321,322,5,46,0,0,322,96,1, + 0,0,0,323,324,5,34,0,0,324,98,1,0,0,0,325,326,5,39,0,0,326,100,1,0,0, + 0,327,328,5,10,0,0,328,102,1,0,0,0,329,333,7,0,0,0,330,332,7,1,0,0,331, + 330,1,0,0,0,332,335,1,0,0,0,333,331,1,0,0,0,333,334,1,0,0,0,334,104,1, + 0,0,0,335,333,1,0,0,0,336,337,5,48,0,0,337,338,5,120,0,0,338,339,1,0, + 0,0,339,343,7,2,0,0,340,342,3,117,58,0,341,340,1,0,0,0,342,345,1,0,0, + 0,343,341,1,0,0,0,343,344,1,0,0,0,344,106,1,0,0,0,345,343,1,0,0,0,346, + 355,5,48,0,0,347,351,7,3,0,0,348,350,3,123,61,0,349,348,1,0,0,0,350,353, + 1,0,0,0,351,349,1,0,0,0,351,352,1,0,0,0,352,355,1,0,0,0,353,351,1,0,0, + 0,354,346,1,0,0,0,354,347,1,0,0,0,355,108,1,0,0,0,356,357,5,48,0,0,357, + 361,7,4,0,0,358,360,3,119,59,0,359,358,1,0,0,0,360,363,1,0,0,0,361,359, + 1,0,0,0,361,362,1,0,0,0,362,110,1,0,0,0,363,361,1,0,0,0,364,365,5,48, + 0,0,365,366,5,98,0,0,366,367,1,0,0,0,367,371,5,49,0,0,368,370,3,121,60, + 0,369,368,1,0,0,0,370,373,1,0,0,0,371,369,1,0,0,0,371,372,1,0,0,0,372, + 112,1,0,0,0,373,371,1,0,0,0,374,375,3,107,53,0,375,376,3,95,47,0,376, + 377,3,115,57,0,377,114,1,0,0,0,378,380,3,123,61,0,379,378,1,0,0,0,380, + 381,1,0,0,0,381,379,1,0,0,0,381,382,1,0,0,0,382,116,1,0,0,0,383,384,7, + 5,0,0,384,118,1,0,0,0,385,386,7,6,0,0,386,120,1,0,0,0,387,388,7,7,0,0, + 388,122,1,0,0,0,389,390,7,8,0,0,390,124,1,0,0,0,391,396,5,34,0,0,392, + 395,3,127,63,0,393,395,8,9,0,0,394,392,1,0,0,0,394,393,1,0,0,0,395,398, + 1,0,0,0,396,394,1,0,0,0,396,397,1,0,0,0,397,399,1,0,0,0,398,396,1,0,0, + 0,399,400,5,34,0,0,400,126,1,0,0,0,401,403,5,92,0,0,402,404,7,10,0,0, + 403,402,1,0,0,0,404,128,1,0,0,0,405,406,5,47,0,0,406,407,5,47,0,0,407, + 411,1,0,0,0,408,410,8,11,0,0,409,408,1,0,0,0,410,413,1,0,0,0,411,409, + 1,0,0,0,411,412,1,0,0,0,412,414,1,0,0,0,413,411,1,0,0,0,414,415,6,64, + 0,0,415,130,1,0,0,0,416,417,5,47,0,0,417,418,5,42,0,0,418,422,1,0,0,0, + 419,421,9,0,0,0,420,419,1,0,0,0,421,424,1,0,0,0,422,423,1,0,0,0,422,420, + 1,0,0,0,423,425,1,0,0,0,424,422,1,0,0,0,425,426,5,42,0,0,426,427,5,47, + 0,0,427,428,1,0,0,0,428,429,6,65,0,0,429,132,1,0,0,0,430,432,7,12,0,0, + 431,430,1,0,0,0,432,433,1,0,0,0,433,431,1,0,0,0,433,434,1,0,0,0,434,435, + 1,0,0,0,435,436,6,66,0,0,436,134,1,0,0,0,14,0,333,343,351,354,361,371, + 381,394,396,403,411,422,433,1,6,0,0 }; staticData->serializedATN = antlr4::atn::SerializedATNView(serializedATNSegment, sizeof(serializedATNSegment) / sizeof(serializedATNSegment[0])); @@ -248,7 +253,7 @@ void riddlelexerLexerInitialize() { for (size_t i = 0; i < count; i++) { staticData->decisionToDFA.emplace_back(staticData->atn->getDecisionState(i), i); } - riddlelexerLexerStaticData = staticData.release(); + riddlelexerLexerStaticData = std::move(staticData); } } diff --git a/parser/RiddleLexer.h b/parser/RiddleLexer.h index 5b24295..59e4a37 100644 --- a/parser/RiddleLexer.h +++ b/parser/RiddleLexer.h @@ -1,5 +1,5 @@ -// Generated from E:/Riddle-Language/RiddleLexer.g4 by ANTLR 4.13.1 +// Generated from E:/Riddle-Language/RiddleLexer.g4 by ANTLR 4.13.2 #pragma once @@ -15,15 +15,15 @@ class RiddleLexer : public antlr4::Lexer { Var = 1, Val = 2, For = 3, While = 4, If = 5, Else = 6, Func = 7, Return = 8, Import = 9, Package = 10, Class = 11, Public = 12, Protected = 13, Private = 14, Override = 15, True = 16, False = 17, Static = 18, Const = 19, Null = 20, - LeftBracket = 21, RightBracket = 22, LeftSquare = 23, RightSquare = 24, - LeftCurly = 25, RightCurly = 26, Colon = 27, Semi = 28, Comma = 29, - Equal = 30, Assign = 31, Greater = 32, Less = 33, LeftLeft = 34, RightRight = 35, - RightRightRight = 36, Add = 37, Sub = 38, Star = 39, Div = 40, Mod = 41, - Not = 42, And = 43, Or = 44, Xor = 45, Dot = 46, DoubleQuotes = 47, - Quotes = 48, Endl = 49, Identifier = 50, Hexadecimal = 51, Decimal = 52, - Octal = 53, Binary = 54, Float = 55, IntegerSequence = 56, HEX_DIGIT = 57, - OCTAL_DIGIT = 58, BINARY_DIGIT = 59, DIGIT = 60, STRING = 61, LINE_COMMENT = 62, - BLOCK_COMMENT = 63, WHITESPACE = 64 + Try = 21, Catch = 22, LeftBracket = 23, RightBracket = 24, LeftSquare = 25, + RightSquare = 26, LeftCurly = 27, RightCurly = 28, Colon = 29, Semi = 30, + Comma = 31, Equal = 32, Assign = 33, Greater = 34, Less = 35, LeftLeft = 36, + RightRight = 37, RightRightRight = 38, Add = 39, Sub = 40, Star = 41, + Div = 42, Mod = 43, Not = 44, And = 45, Or = 46, Xor = 47, Dot = 48, + DoubleQuotes = 49, Quotes = 50, Endl = 51, Identifier = 52, Hexadecimal = 53, + Decimal = 54, Octal = 55, Binary = 56, Float = 57, IntegerSequence = 58, + HEX_DIGIT = 59, OCTAL_DIGIT = 60, BINARY_DIGIT = 61, DIGIT = 62, STRING = 63, + LINE_COMMENT = 64, BLOCK_COMMENT = 65, WHITESPACE = 66 }; explicit RiddleLexer(antlr4::CharStream *input); diff --git a/parser/RiddleLexer.interp b/parser/RiddleLexer.interp index b38bf83..0cb0a13 100644 --- a/parser/RiddleLexer.interp +++ b/parser/RiddleLexer.interp @@ -20,6 +20,8 @@ null 'static' 'const' 'null' +'try' +'catch' '(' ')' '[' @@ -87,6 +89,8 @@ False Static Const Null +Try +Catch LeftBracket RightBracket LeftSquare @@ -153,6 +157,8 @@ False Static Const Null +Try +Catch LeftBracket RightBracket LeftSquare @@ -207,4 +213,4 @@ mode names: DEFAULT_MODE atn: -[4, 0, 64, 423, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 21, 1, 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 24, 1, 24, 1, 25, 1, 25, 1, 26, 1, 26, 1, 27, 1, 27, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 31, 1, 31, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 37, 1, 37, 1, 38, 1, 38, 1, 39, 1, 39, 1, 40, 1, 40, 1, 41, 1, 41, 1, 42, 1, 42, 1, 43, 1, 43, 1, 44, 1, 44, 1, 45, 1, 45, 1, 46, 1, 46, 1, 47, 1, 47, 1, 48, 1, 48, 1, 49, 1, 49, 5, 49, 318, 8, 49, 10, 49, 12, 49, 321, 9, 49, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 5, 50, 328, 8, 50, 10, 50, 12, 50, 331, 9, 50, 1, 51, 1, 51, 1, 51, 5, 51, 336, 8, 51, 10, 51, 12, 51, 339, 9, 51, 3, 51, 341, 8, 51, 1, 52, 1, 52, 1, 52, 5, 52, 346, 8, 52, 10, 52, 12, 52, 349, 9, 52, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 5, 53, 356, 8, 53, 10, 53, 12, 53, 359, 9, 53, 1, 54, 1, 54, 1, 54, 1, 54, 1, 55, 4, 55, 366, 8, 55, 11, 55, 12, 55, 367, 1, 56, 1, 56, 1, 57, 1, 57, 1, 58, 1, 58, 1, 59, 1, 59, 1, 60, 1, 60, 1, 60, 5, 60, 381, 8, 60, 10, 60, 12, 60, 384, 9, 60, 1, 60, 1, 60, 1, 61, 1, 61, 3, 61, 390, 8, 61, 1, 62, 1, 62, 1, 62, 1, 62, 5, 62, 396, 8, 62, 10, 62, 12, 62, 399, 9, 62, 1, 62, 1, 62, 1, 63, 1, 63, 1, 63, 1, 63, 5, 63, 407, 8, 63, 10, 63, 12, 63, 410, 9, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 64, 4, 64, 418, 8, 64, 11, 64, 12, 64, 419, 1, 64, 1, 64, 1, 408, 0, 65, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 47, 95, 48, 97, 49, 99, 50, 101, 51, 103, 52, 105, 53, 107, 54, 109, 55, 111, 56, 113, 57, 115, 58, 117, 59, 119, 60, 121, 61, 123, 0, 125, 62, 127, 63, 129, 64, 1, 0, 13, 3, 0, 65, 90, 95, 95, 97, 122, 4, 0, 48, 57, 65, 90, 95, 95, 97, 122, 2, 0, 49, 57, 65, 70, 1, 0, 49, 57, 1, 0, 49, 55, 2, 0, 48, 57, 65, 70, 1, 0, 48, 55, 1, 0, 48, 49, 1, 0, 48, 57, 4, 0, 10, 10, 13, 13, 34, 34, 92, 92, 5, 0, 34, 34, 47, 47, 65, 90, 92, 92, 97, 122, 2, 0, 10, 10, 13, 13, 3, 0, 9, 10, 13, 13, 32, 32, 433, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, 0, 0, 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 119, 1, 0, 0, 0, 0, 121, 1, 0, 0, 0, 0, 125, 1, 0, 0, 0, 0, 127, 1, 0, 0, 0, 0, 129, 1, 0, 0, 0, 1, 131, 1, 0, 0, 0, 3, 135, 1, 0, 0, 0, 5, 139, 1, 0, 0, 0, 7, 143, 1, 0, 0, 0, 9, 149, 1, 0, 0, 0, 11, 152, 1, 0, 0, 0, 13, 157, 1, 0, 0, 0, 15, 161, 1, 0, 0, 0, 17, 168, 1, 0, 0, 0, 19, 175, 1, 0, 0, 0, 21, 183, 1, 0, 0, 0, 23, 189, 1, 0, 0, 0, 25, 196, 1, 0, 0, 0, 27, 206, 1, 0, 0, 0, 29, 214, 1, 0, 0, 0, 31, 223, 1, 0, 0, 0, 33, 228, 1, 0, 0, 0, 35, 234, 1, 0, 0, 0, 37, 241, 1, 0, 0, 0, 39, 247, 1, 0, 0, 0, 41, 252, 1, 0, 0, 0, 43, 254, 1, 0, 0, 0, 45, 256, 1, 0, 0, 0, 47, 258, 1, 0, 0, 0, 49, 260, 1, 0, 0, 0, 51, 262, 1, 0, 0, 0, 53, 264, 1, 0, 0, 0, 55, 266, 1, 0, 0, 0, 57, 268, 1, 0, 0, 0, 59, 270, 1, 0, 0, 0, 61, 273, 1, 0, 0, 0, 63, 275, 1, 0, 0, 0, 65, 277, 1, 0, 0, 0, 67, 279, 1, 0, 0, 0, 69, 282, 1, 0, 0, 0, 71, 285, 1, 0, 0, 0, 73, 289, 1, 0, 0, 0, 75, 291, 1, 0, 0, 0, 77, 293, 1, 0, 0, 0, 79, 295, 1, 0, 0, 0, 81, 297, 1, 0, 0, 0, 83, 299, 1, 0, 0, 0, 85, 301, 1, 0, 0, 0, 87, 303, 1, 0, 0, 0, 89, 305, 1, 0, 0, 0, 91, 307, 1, 0, 0, 0, 93, 309, 1, 0, 0, 0, 95, 311, 1, 0, 0, 0, 97, 313, 1, 0, 0, 0, 99, 315, 1, 0, 0, 0, 101, 322, 1, 0, 0, 0, 103, 340, 1, 0, 0, 0, 105, 342, 1, 0, 0, 0, 107, 350, 1, 0, 0, 0, 109, 360, 1, 0, 0, 0, 111, 365, 1, 0, 0, 0, 113, 369, 1, 0, 0, 0, 115, 371, 1, 0, 0, 0, 117, 373, 1, 0, 0, 0, 119, 375, 1, 0, 0, 0, 121, 377, 1, 0, 0, 0, 123, 387, 1, 0, 0, 0, 125, 391, 1, 0, 0, 0, 127, 402, 1, 0, 0, 0, 129, 417, 1, 0, 0, 0, 131, 132, 5, 118, 0, 0, 132, 133, 5, 97, 0, 0, 133, 134, 5, 114, 0, 0, 134, 2, 1, 0, 0, 0, 135, 136, 5, 118, 0, 0, 136, 137, 5, 97, 0, 0, 137, 138, 5, 108, 0, 0, 138, 4, 1, 0, 0, 0, 139, 140, 5, 102, 0, 0, 140, 141, 5, 111, 0, 0, 141, 142, 5, 114, 0, 0, 142, 6, 1, 0, 0, 0, 143, 144, 5, 119, 0, 0, 144, 145, 5, 104, 0, 0, 145, 146, 5, 105, 0, 0, 146, 147, 5, 108, 0, 0, 147, 148, 5, 101, 0, 0, 148, 8, 1, 0, 0, 0, 149, 150, 5, 105, 0, 0, 150, 151, 5, 102, 0, 0, 151, 10, 1, 0, 0, 0, 152, 153, 5, 101, 0, 0, 153, 154, 5, 108, 0, 0, 154, 155, 5, 115, 0, 0, 155, 156, 5, 101, 0, 0, 156, 12, 1, 0, 0, 0, 157, 158, 5, 102, 0, 0, 158, 159, 5, 117, 0, 0, 159, 160, 5, 110, 0, 0, 160, 14, 1, 0, 0, 0, 161, 162, 5, 114, 0, 0, 162, 163, 5, 101, 0, 0, 163, 164, 5, 116, 0, 0, 164, 165, 5, 117, 0, 0, 165, 166, 5, 114, 0, 0, 166, 167, 5, 110, 0, 0, 167, 16, 1, 0, 0, 0, 168, 169, 5, 105, 0, 0, 169, 170, 5, 109, 0, 0, 170, 171, 5, 112, 0, 0, 171, 172, 5, 111, 0, 0, 172, 173, 5, 114, 0, 0, 173, 174, 5, 116, 0, 0, 174, 18, 1, 0, 0, 0, 175, 176, 5, 112, 0, 0, 176, 177, 5, 97, 0, 0, 177, 178, 5, 99, 0, 0, 178, 179, 5, 107, 0, 0, 179, 180, 5, 97, 0, 0, 180, 181, 5, 103, 0, 0, 181, 182, 5, 101, 0, 0, 182, 20, 1, 0, 0, 0, 183, 184, 5, 99, 0, 0, 184, 185, 5, 108, 0, 0, 185, 186, 5, 97, 0, 0, 186, 187, 5, 115, 0, 0, 187, 188, 5, 115, 0, 0, 188, 22, 1, 0, 0, 0, 189, 190, 5, 112, 0, 0, 190, 191, 5, 117, 0, 0, 191, 192, 5, 98, 0, 0, 192, 193, 5, 108, 0, 0, 193, 194, 5, 105, 0, 0, 194, 195, 5, 99, 0, 0, 195, 24, 1, 0, 0, 0, 196, 197, 5, 112, 0, 0, 197, 198, 5, 114, 0, 0, 198, 199, 5, 111, 0, 0, 199, 200, 5, 116, 0, 0, 200, 201, 5, 101, 0, 0, 201, 202, 5, 99, 0, 0, 202, 203, 5, 116, 0, 0, 203, 204, 5, 101, 0, 0, 204, 205, 5, 100, 0, 0, 205, 26, 1, 0, 0, 0, 206, 207, 5, 80, 0, 0, 207, 208, 5, 114, 0, 0, 208, 209, 5, 105, 0, 0, 209, 210, 5, 118, 0, 0, 210, 211, 5, 97, 0, 0, 211, 212, 5, 116, 0, 0, 212, 213, 5, 101, 0, 0, 213, 28, 1, 0, 0, 0, 214, 215, 5, 111, 0, 0, 215, 216, 5, 118, 0, 0, 216, 217, 5, 101, 0, 0, 217, 218, 5, 114, 0, 0, 218, 219, 5, 114, 0, 0, 219, 220, 5, 105, 0, 0, 220, 221, 5, 100, 0, 0, 221, 222, 5, 101, 0, 0, 222, 30, 1, 0, 0, 0, 223, 224, 5, 116, 0, 0, 224, 225, 5, 114, 0, 0, 225, 226, 5, 117, 0, 0, 226, 227, 5, 101, 0, 0, 227, 32, 1, 0, 0, 0, 228, 229, 5, 102, 0, 0, 229, 230, 5, 97, 0, 0, 230, 231, 5, 108, 0, 0, 231, 232, 5, 115, 0, 0, 232, 233, 5, 101, 0, 0, 233, 34, 1, 0, 0, 0, 234, 235, 5, 115, 0, 0, 235, 236, 5, 116, 0, 0, 236, 237, 5, 97, 0, 0, 237, 238, 5, 116, 0, 0, 238, 239, 5, 105, 0, 0, 239, 240, 5, 99, 0, 0, 240, 36, 1, 0, 0, 0, 241, 242, 5, 99, 0, 0, 242, 243, 5, 111, 0, 0, 243, 244, 5, 110, 0, 0, 244, 245, 5, 115, 0, 0, 245, 246, 5, 116, 0, 0, 246, 38, 1, 0, 0, 0, 247, 248, 5, 110, 0, 0, 248, 249, 5, 117, 0, 0, 249, 250, 5, 108, 0, 0, 250, 251, 5, 108, 0, 0, 251, 40, 1, 0, 0, 0, 252, 253, 5, 40, 0, 0, 253, 42, 1, 0, 0, 0, 254, 255, 5, 41, 0, 0, 255, 44, 1, 0, 0, 0, 256, 257, 5, 91, 0, 0, 257, 46, 1, 0, 0, 0, 258, 259, 5, 93, 0, 0, 259, 48, 1, 0, 0, 0, 260, 261, 5, 123, 0, 0, 261, 50, 1, 0, 0, 0, 262, 263, 5, 125, 0, 0, 263, 52, 1, 0, 0, 0, 264, 265, 5, 58, 0, 0, 265, 54, 1, 0, 0, 0, 266, 267, 5, 59, 0, 0, 267, 56, 1, 0, 0, 0, 268, 269, 5, 44, 0, 0, 269, 58, 1, 0, 0, 0, 270, 271, 5, 61, 0, 0, 271, 272, 5, 61, 0, 0, 272, 60, 1, 0, 0, 0, 273, 274, 5, 61, 0, 0, 274, 62, 1, 0, 0, 0, 275, 276, 5, 62, 0, 0, 276, 64, 1, 0, 0, 0, 277, 278, 5, 60, 0, 0, 278, 66, 1, 0, 0, 0, 279, 280, 5, 60, 0, 0, 280, 281, 5, 60, 0, 0, 281, 68, 1, 0, 0, 0, 282, 283, 5, 62, 0, 0, 283, 284, 5, 62, 0, 0, 284, 70, 1, 0, 0, 0, 285, 286, 5, 62, 0, 0, 286, 287, 5, 62, 0, 0, 287, 288, 5, 62, 0, 0, 288, 72, 1, 0, 0, 0, 289, 290, 5, 43, 0, 0, 290, 74, 1, 0, 0, 0, 291, 292, 5, 45, 0, 0, 292, 76, 1, 0, 0, 0, 293, 294, 5, 42, 0, 0, 294, 78, 1, 0, 0, 0, 295, 296, 5, 47, 0, 0, 296, 80, 1, 0, 0, 0, 297, 298, 5, 37, 0, 0, 298, 82, 1, 0, 0, 0, 299, 300, 5, 33, 0, 0, 300, 84, 1, 0, 0, 0, 301, 302, 5, 38, 0, 0, 302, 86, 1, 0, 0, 0, 303, 304, 5, 124, 0, 0, 304, 88, 1, 0, 0, 0, 305, 306, 5, 94, 0, 0, 306, 90, 1, 0, 0, 0, 307, 308, 5, 46, 0, 0, 308, 92, 1, 0, 0, 0, 309, 310, 5, 34, 0, 0, 310, 94, 1, 0, 0, 0, 311, 312, 5, 39, 0, 0, 312, 96, 1, 0, 0, 0, 313, 314, 5, 10, 0, 0, 314, 98, 1, 0, 0, 0, 315, 319, 7, 0, 0, 0, 316, 318, 7, 1, 0, 0, 317, 316, 1, 0, 0, 0, 318, 321, 1, 0, 0, 0, 319, 317, 1, 0, 0, 0, 319, 320, 1, 0, 0, 0, 320, 100, 1, 0, 0, 0, 321, 319, 1, 0, 0, 0, 322, 323, 5, 48, 0, 0, 323, 324, 5, 120, 0, 0, 324, 325, 1, 0, 0, 0, 325, 329, 7, 2, 0, 0, 326, 328, 3, 113, 56, 0, 327, 326, 1, 0, 0, 0, 328, 331, 1, 0, 0, 0, 329, 327, 1, 0, 0, 0, 329, 330, 1, 0, 0, 0, 330, 102, 1, 0, 0, 0, 331, 329, 1, 0, 0, 0, 332, 341, 5, 48, 0, 0, 333, 337, 7, 3, 0, 0, 334, 336, 3, 119, 59, 0, 335, 334, 1, 0, 0, 0, 336, 339, 1, 0, 0, 0, 337, 335, 1, 0, 0, 0, 337, 338, 1, 0, 0, 0, 338, 341, 1, 0, 0, 0, 339, 337, 1, 0, 0, 0, 340, 332, 1, 0, 0, 0, 340, 333, 1, 0, 0, 0, 341, 104, 1, 0, 0, 0, 342, 343, 5, 48, 0, 0, 343, 347, 7, 4, 0, 0, 344, 346, 3, 115, 57, 0, 345, 344, 1, 0, 0, 0, 346, 349, 1, 0, 0, 0, 347, 345, 1, 0, 0, 0, 347, 348, 1, 0, 0, 0, 348, 106, 1, 0, 0, 0, 349, 347, 1, 0, 0, 0, 350, 351, 5, 48, 0, 0, 351, 352, 5, 98, 0, 0, 352, 353, 1, 0, 0, 0, 353, 357, 5, 49, 0, 0, 354, 356, 3, 117, 58, 0, 355, 354, 1, 0, 0, 0, 356, 359, 1, 0, 0, 0, 357, 355, 1, 0, 0, 0, 357, 358, 1, 0, 0, 0, 358, 108, 1, 0, 0, 0, 359, 357, 1, 0, 0, 0, 360, 361, 3, 103, 51, 0, 361, 362, 3, 91, 45, 0, 362, 363, 3, 111, 55, 0, 363, 110, 1, 0, 0, 0, 364, 366, 3, 119, 59, 0, 365, 364, 1, 0, 0, 0, 366, 367, 1, 0, 0, 0, 367, 365, 1, 0, 0, 0, 367, 368, 1, 0, 0, 0, 368, 112, 1, 0, 0, 0, 369, 370, 7, 5, 0, 0, 370, 114, 1, 0, 0, 0, 371, 372, 7, 6, 0, 0, 372, 116, 1, 0, 0, 0, 373, 374, 7, 7, 0, 0, 374, 118, 1, 0, 0, 0, 375, 376, 7, 8, 0, 0, 376, 120, 1, 0, 0, 0, 377, 382, 5, 34, 0, 0, 378, 381, 3, 123, 61, 0, 379, 381, 8, 9, 0, 0, 380, 378, 1, 0, 0, 0, 380, 379, 1, 0, 0, 0, 381, 384, 1, 0, 0, 0, 382, 380, 1, 0, 0, 0, 382, 383, 1, 0, 0, 0, 383, 385, 1, 0, 0, 0, 384, 382, 1, 0, 0, 0, 385, 386, 5, 34, 0, 0, 386, 122, 1, 0, 0, 0, 387, 389, 5, 92, 0, 0, 388, 390, 7, 10, 0, 0, 389, 388, 1, 0, 0, 0, 390, 124, 1, 0, 0, 0, 391, 392, 5, 47, 0, 0, 392, 393, 5, 47, 0, 0, 393, 397, 1, 0, 0, 0, 394, 396, 8, 11, 0, 0, 395, 394, 1, 0, 0, 0, 396, 399, 1, 0, 0, 0, 397, 395, 1, 0, 0, 0, 397, 398, 1, 0, 0, 0, 398, 400, 1, 0, 0, 0, 399, 397, 1, 0, 0, 0, 400, 401, 6, 62, 0, 0, 401, 126, 1, 0, 0, 0, 402, 403, 5, 47, 0, 0, 403, 404, 5, 42, 0, 0, 404, 408, 1, 0, 0, 0, 405, 407, 9, 0, 0, 0, 406, 405, 1, 0, 0, 0, 407, 410, 1, 0, 0, 0, 408, 409, 1, 0, 0, 0, 408, 406, 1, 0, 0, 0, 409, 411, 1, 0, 0, 0, 410, 408, 1, 0, 0, 0, 411, 412, 5, 42, 0, 0, 412, 413, 5, 47, 0, 0, 413, 414, 1, 0, 0, 0, 414, 415, 6, 63, 0, 0, 415, 128, 1, 0, 0, 0, 416, 418, 7, 12, 0, 0, 417, 416, 1, 0, 0, 0, 418, 419, 1, 0, 0, 0, 419, 417, 1, 0, 0, 0, 419, 420, 1, 0, 0, 0, 420, 421, 1, 0, 0, 0, 421, 422, 6, 64, 0, 0, 422, 130, 1, 0, 0, 0, 14, 0, 319, 329, 337, 340, 347, 357, 367, 380, 382, 389, 397, 408, 419, 1, 6, 0, 0] \ No newline at end of file +[4, 0, 66, 437, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 24, 1, 24, 1, 25, 1, 25, 1, 26, 1, 26, 1, 27, 1, 27, 1, 28, 1, 28, 1, 29, 1, 29, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 33, 1, 33, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 39, 1, 39, 1, 40, 1, 40, 1, 41, 1, 41, 1, 42, 1, 42, 1, 43, 1, 43, 1, 44, 1, 44, 1, 45, 1, 45, 1, 46, 1, 46, 1, 47, 1, 47, 1, 48, 1, 48, 1, 49, 1, 49, 1, 50, 1, 50, 1, 51, 1, 51, 5, 51, 332, 8, 51, 10, 51, 12, 51, 335, 9, 51, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 5, 52, 342, 8, 52, 10, 52, 12, 52, 345, 9, 52, 1, 53, 1, 53, 1, 53, 5, 53, 350, 8, 53, 10, 53, 12, 53, 353, 9, 53, 3, 53, 355, 8, 53, 1, 54, 1, 54, 1, 54, 5, 54, 360, 8, 54, 10, 54, 12, 54, 363, 9, 54, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 5, 55, 370, 8, 55, 10, 55, 12, 55, 373, 9, 55, 1, 56, 1, 56, 1, 56, 1, 56, 1, 57, 4, 57, 380, 8, 57, 11, 57, 12, 57, 381, 1, 58, 1, 58, 1, 59, 1, 59, 1, 60, 1, 60, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 5, 62, 395, 8, 62, 10, 62, 12, 62, 398, 9, 62, 1, 62, 1, 62, 1, 63, 1, 63, 3, 63, 404, 8, 63, 1, 64, 1, 64, 1, 64, 1, 64, 5, 64, 410, 8, 64, 10, 64, 12, 64, 413, 9, 64, 1, 64, 1, 64, 1, 65, 1, 65, 1, 65, 1, 65, 5, 65, 421, 8, 65, 10, 65, 12, 65, 424, 9, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 66, 4, 66, 432, 8, 66, 11, 66, 12, 66, 433, 1, 66, 1, 66, 1, 422, 0, 67, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 47, 95, 48, 97, 49, 99, 50, 101, 51, 103, 52, 105, 53, 107, 54, 109, 55, 111, 56, 113, 57, 115, 58, 117, 59, 119, 60, 121, 61, 123, 62, 125, 63, 127, 0, 129, 64, 131, 65, 133, 66, 1, 0, 13, 3, 0, 65, 90, 95, 95, 97, 122, 4, 0, 48, 57, 65, 90, 95, 95, 97, 122, 2, 0, 49, 57, 65, 70, 1, 0, 49, 57, 1, 0, 49, 55, 2, 0, 48, 57, 65, 70, 1, 0, 48, 55, 1, 0, 48, 49, 1, 0, 48, 57, 4, 0, 10, 10, 13, 13, 34, 34, 92, 92, 5, 0, 34, 34, 47, 47, 65, 90, 92, 92, 97, 122, 2, 0, 10, 10, 13, 13, 3, 0, 9, 10, 13, 13, 32, 32, 447, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, 0, 0, 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 119, 1, 0, 0, 0, 0, 121, 1, 0, 0, 0, 0, 123, 1, 0, 0, 0, 0, 125, 1, 0, 0, 0, 0, 129, 1, 0, 0, 0, 0, 131, 1, 0, 0, 0, 0, 133, 1, 0, 0, 0, 1, 135, 1, 0, 0, 0, 3, 139, 1, 0, 0, 0, 5, 143, 1, 0, 0, 0, 7, 147, 1, 0, 0, 0, 9, 153, 1, 0, 0, 0, 11, 156, 1, 0, 0, 0, 13, 161, 1, 0, 0, 0, 15, 165, 1, 0, 0, 0, 17, 172, 1, 0, 0, 0, 19, 179, 1, 0, 0, 0, 21, 187, 1, 0, 0, 0, 23, 193, 1, 0, 0, 0, 25, 200, 1, 0, 0, 0, 27, 210, 1, 0, 0, 0, 29, 218, 1, 0, 0, 0, 31, 227, 1, 0, 0, 0, 33, 232, 1, 0, 0, 0, 35, 238, 1, 0, 0, 0, 37, 245, 1, 0, 0, 0, 39, 251, 1, 0, 0, 0, 41, 256, 1, 0, 0, 0, 43, 260, 1, 0, 0, 0, 45, 266, 1, 0, 0, 0, 47, 268, 1, 0, 0, 0, 49, 270, 1, 0, 0, 0, 51, 272, 1, 0, 0, 0, 53, 274, 1, 0, 0, 0, 55, 276, 1, 0, 0, 0, 57, 278, 1, 0, 0, 0, 59, 280, 1, 0, 0, 0, 61, 282, 1, 0, 0, 0, 63, 284, 1, 0, 0, 0, 65, 287, 1, 0, 0, 0, 67, 289, 1, 0, 0, 0, 69, 291, 1, 0, 0, 0, 71, 293, 1, 0, 0, 0, 73, 296, 1, 0, 0, 0, 75, 299, 1, 0, 0, 0, 77, 303, 1, 0, 0, 0, 79, 305, 1, 0, 0, 0, 81, 307, 1, 0, 0, 0, 83, 309, 1, 0, 0, 0, 85, 311, 1, 0, 0, 0, 87, 313, 1, 0, 0, 0, 89, 315, 1, 0, 0, 0, 91, 317, 1, 0, 0, 0, 93, 319, 1, 0, 0, 0, 95, 321, 1, 0, 0, 0, 97, 323, 1, 0, 0, 0, 99, 325, 1, 0, 0, 0, 101, 327, 1, 0, 0, 0, 103, 329, 1, 0, 0, 0, 105, 336, 1, 0, 0, 0, 107, 354, 1, 0, 0, 0, 109, 356, 1, 0, 0, 0, 111, 364, 1, 0, 0, 0, 113, 374, 1, 0, 0, 0, 115, 379, 1, 0, 0, 0, 117, 383, 1, 0, 0, 0, 119, 385, 1, 0, 0, 0, 121, 387, 1, 0, 0, 0, 123, 389, 1, 0, 0, 0, 125, 391, 1, 0, 0, 0, 127, 401, 1, 0, 0, 0, 129, 405, 1, 0, 0, 0, 131, 416, 1, 0, 0, 0, 133, 431, 1, 0, 0, 0, 135, 136, 5, 118, 0, 0, 136, 137, 5, 97, 0, 0, 137, 138, 5, 114, 0, 0, 138, 2, 1, 0, 0, 0, 139, 140, 5, 118, 0, 0, 140, 141, 5, 97, 0, 0, 141, 142, 5, 108, 0, 0, 142, 4, 1, 0, 0, 0, 143, 144, 5, 102, 0, 0, 144, 145, 5, 111, 0, 0, 145, 146, 5, 114, 0, 0, 146, 6, 1, 0, 0, 0, 147, 148, 5, 119, 0, 0, 148, 149, 5, 104, 0, 0, 149, 150, 5, 105, 0, 0, 150, 151, 5, 108, 0, 0, 151, 152, 5, 101, 0, 0, 152, 8, 1, 0, 0, 0, 153, 154, 5, 105, 0, 0, 154, 155, 5, 102, 0, 0, 155, 10, 1, 0, 0, 0, 156, 157, 5, 101, 0, 0, 157, 158, 5, 108, 0, 0, 158, 159, 5, 115, 0, 0, 159, 160, 5, 101, 0, 0, 160, 12, 1, 0, 0, 0, 161, 162, 5, 102, 0, 0, 162, 163, 5, 117, 0, 0, 163, 164, 5, 110, 0, 0, 164, 14, 1, 0, 0, 0, 165, 166, 5, 114, 0, 0, 166, 167, 5, 101, 0, 0, 167, 168, 5, 116, 0, 0, 168, 169, 5, 117, 0, 0, 169, 170, 5, 114, 0, 0, 170, 171, 5, 110, 0, 0, 171, 16, 1, 0, 0, 0, 172, 173, 5, 105, 0, 0, 173, 174, 5, 109, 0, 0, 174, 175, 5, 112, 0, 0, 175, 176, 5, 111, 0, 0, 176, 177, 5, 114, 0, 0, 177, 178, 5, 116, 0, 0, 178, 18, 1, 0, 0, 0, 179, 180, 5, 112, 0, 0, 180, 181, 5, 97, 0, 0, 181, 182, 5, 99, 0, 0, 182, 183, 5, 107, 0, 0, 183, 184, 5, 97, 0, 0, 184, 185, 5, 103, 0, 0, 185, 186, 5, 101, 0, 0, 186, 20, 1, 0, 0, 0, 187, 188, 5, 99, 0, 0, 188, 189, 5, 108, 0, 0, 189, 190, 5, 97, 0, 0, 190, 191, 5, 115, 0, 0, 191, 192, 5, 115, 0, 0, 192, 22, 1, 0, 0, 0, 193, 194, 5, 112, 0, 0, 194, 195, 5, 117, 0, 0, 195, 196, 5, 98, 0, 0, 196, 197, 5, 108, 0, 0, 197, 198, 5, 105, 0, 0, 198, 199, 5, 99, 0, 0, 199, 24, 1, 0, 0, 0, 200, 201, 5, 112, 0, 0, 201, 202, 5, 114, 0, 0, 202, 203, 5, 111, 0, 0, 203, 204, 5, 116, 0, 0, 204, 205, 5, 101, 0, 0, 205, 206, 5, 99, 0, 0, 206, 207, 5, 116, 0, 0, 207, 208, 5, 101, 0, 0, 208, 209, 5, 100, 0, 0, 209, 26, 1, 0, 0, 0, 210, 211, 5, 80, 0, 0, 211, 212, 5, 114, 0, 0, 212, 213, 5, 105, 0, 0, 213, 214, 5, 118, 0, 0, 214, 215, 5, 97, 0, 0, 215, 216, 5, 116, 0, 0, 216, 217, 5, 101, 0, 0, 217, 28, 1, 0, 0, 0, 218, 219, 5, 111, 0, 0, 219, 220, 5, 118, 0, 0, 220, 221, 5, 101, 0, 0, 221, 222, 5, 114, 0, 0, 222, 223, 5, 114, 0, 0, 223, 224, 5, 105, 0, 0, 224, 225, 5, 100, 0, 0, 225, 226, 5, 101, 0, 0, 226, 30, 1, 0, 0, 0, 227, 228, 5, 116, 0, 0, 228, 229, 5, 114, 0, 0, 229, 230, 5, 117, 0, 0, 230, 231, 5, 101, 0, 0, 231, 32, 1, 0, 0, 0, 232, 233, 5, 102, 0, 0, 233, 234, 5, 97, 0, 0, 234, 235, 5, 108, 0, 0, 235, 236, 5, 115, 0, 0, 236, 237, 5, 101, 0, 0, 237, 34, 1, 0, 0, 0, 238, 239, 5, 115, 0, 0, 239, 240, 5, 116, 0, 0, 240, 241, 5, 97, 0, 0, 241, 242, 5, 116, 0, 0, 242, 243, 5, 105, 0, 0, 243, 244, 5, 99, 0, 0, 244, 36, 1, 0, 0, 0, 245, 246, 5, 99, 0, 0, 246, 247, 5, 111, 0, 0, 247, 248, 5, 110, 0, 0, 248, 249, 5, 115, 0, 0, 249, 250, 5, 116, 0, 0, 250, 38, 1, 0, 0, 0, 251, 252, 5, 110, 0, 0, 252, 253, 5, 117, 0, 0, 253, 254, 5, 108, 0, 0, 254, 255, 5, 108, 0, 0, 255, 40, 1, 0, 0, 0, 256, 257, 5, 116, 0, 0, 257, 258, 5, 114, 0, 0, 258, 259, 5, 121, 0, 0, 259, 42, 1, 0, 0, 0, 260, 261, 5, 99, 0, 0, 261, 262, 5, 97, 0, 0, 262, 263, 5, 116, 0, 0, 263, 264, 5, 99, 0, 0, 264, 265, 5, 104, 0, 0, 265, 44, 1, 0, 0, 0, 266, 267, 5, 40, 0, 0, 267, 46, 1, 0, 0, 0, 268, 269, 5, 41, 0, 0, 269, 48, 1, 0, 0, 0, 270, 271, 5, 91, 0, 0, 271, 50, 1, 0, 0, 0, 272, 273, 5, 93, 0, 0, 273, 52, 1, 0, 0, 0, 274, 275, 5, 123, 0, 0, 275, 54, 1, 0, 0, 0, 276, 277, 5, 125, 0, 0, 277, 56, 1, 0, 0, 0, 278, 279, 5, 58, 0, 0, 279, 58, 1, 0, 0, 0, 280, 281, 5, 59, 0, 0, 281, 60, 1, 0, 0, 0, 282, 283, 5, 44, 0, 0, 283, 62, 1, 0, 0, 0, 284, 285, 5, 61, 0, 0, 285, 286, 5, 61, 0, 0, 286, 64, 1, 0, 0, 0, 287, 288, 5, 61, 0, 0, 288, 66, 1, 0, 0, 0, 289, 290, 5, 62, 0, 0, 290, 68, 1, 0, 0, 0, 291, 292, 5, 60, 0, 0, 292, 70, 1, 0, 0, 0, 293, 294, 5, 60, 0, 0, 294, 295, 5, 60, 0, 0, 295, 72, 1, 0, 0, 0, 296, 297, 5, 62, 0, 0, 297, 298, 5, 62, 0, 0, 298, 74, 1, 0, 0, 0, 299, 300, 5, 62, 0, 0, 300, 301, 5, 62, 0, 0, 301, 302, 5, 62, 0, 0, 302, 76, 1, 0, 0, 0, 303, 304, 5, 43, 0, 0, 304, 78, 1, 0, 0, 0, 305, 306, 5, 45, 0, 0, 306, 80, 1, 0, 0, 0, 307, 308, 5, 42, 0, 0, 308, 82, 1, 0, 0, 0, 309, 310, 5, 47, 0, 0, 310, 84, 1, 0, 0, 0, 311, 312, 5, 37, 0, 0, 312, 86, 1, 0, 0, 0, 313, 314, 5, 33, 0, 0, 314, 88, 1, 0, 0, 0, 315, 316, 5, 38, 0, 0, 316, 90, 1, 0, 0, 0, 317, 318, 5, 124, 0, 0, 318, 92, 1, 0, 0, 0, 319, 320, 5, 94, 0, 0, 320, 94, 1, 0, 0, 0, 321, 322, 5, 46, 0, 0, 322, 96, 1, 0, 0, 0, 323, 324, 5, 34, 0, 0, 324, 98, 1, 0, 0, 0, 325, 326, 5, 39, 0, 0, 326, 100, 1, 0, 0, 0, 327, 328, 5, 10, 0, 0, 328, 102, 1, 0, 0, 0, 329, 333, 7, 0, 0, 0, 330, 332, 7, 1, 0, 0, 331, 330, 1, 0, 0, 0, 332, 335, 1, 0, 0, 0, 333, 331, 1, 0, 0, 0, 333, 334, 1, 0, 0, 0, 334, 104, 1, 0, 0, 0, 335, 333, 1, 0, 0, 0, 336, 337, 5, 48, 0, 0, 337, 338, 5, 120, 0, 0, 338, 339, 1, 0, 0, 0, 339, 343, 7, 2, 0, 0, 340, 342, 3, 117, 58, 0, 341, 340, 1, 0, 0, 0, 342, 345, 1, 0, 0, 0, 343, 341, 1, 0, 0, 0, 343, 344, 1, 0, 0, 0, 344, 106, 1, 0, 0, 0, 345, 343, 1, 0, 0, 0, 346, 355, 5, 48, 0, 0, 347, 351, 7, 3, 0, 0, 348, 350, 3, 123, 61, 0, 349, 348, 1, 0, 0, 0, 350, 353, 1, 0, 0, 0, 351, 349, 1, 0, 0, 0, 351, 352, 1, 0, 0, 0, 352, 355, 1, 0, 0, 0, 353, 351, 1, 0, 0, 0, 354, 346, 1, 0, 0, 0, 354, 347, 1, 0, 0, 0, 355, 108, 1, 0, 0, 0, 356, 357, 5, 48, 0, 0, 357, 361, 7, 4, 0, 0, 358, 360, 3, 119, 59, 0, 359, 358, 1, 0, 0, 0, 360, 363, 1, 0, 0, 0, 361, 359, 1, 0, 0, 0, 361, 362, 1, 0, 0, 0, 362, 110, 1, 0, 0, 0, 363, 361, 1, 0, 0, 0, 364, 365, 5, 48, 0, 0, 365, 366, 5, 98, 0, 0, 366, 367, 1, 0, 0, 0, 367, 371, 5, 49, 0, 0, 368, 370, 3, 121, 60, 0, 369, 368, 1, 0, 0, 0, 370, 373, 1, 0, 0, 0, 371, 369, 1, 0, 0, 0, 371, 372, 1, 0, 0, 0, 372, 112, 1, 0, 0, 0, 373, 371, 1, 0, 0, 0, 374, 375, 3, 107, 53, 0, 375, 376, 3, 95, 47, 0, 376, 377, 3, 115, 57, 0, 377, 114, 1, 0, 0, 0, 378, 380, 3, 123, 61, 0, 379, 378, 1, 0, 0, 0, 380, 381, 1, 0, 0, 0, 381, 379, 1, 0, 0, 0, 381, 382, 1, 0, 0, 0, 382, 116, 1, 0, 0, 0, 383, 384, 7, 5, 0, 0, 384, 118, 1, 0, 0, 0, 385, 386, 7, 6, 0, 0, 386, 120, 1, 0, 0, 0, 387, 388, 7, 7, 0, 0, 388, 122, 1, 0, 0, 0, 389, 390, 7, 8, 0, 0, 390, 124, 1, 0, 0, 0, 391, 396, 5, 34, 0, 0, 392, 395, 3, 127, 63, 0, 393, 395, 8, 9, 0, 0, 394, 392, 1, 0, 0, 0, 394, 393, 1, 0, 0, 0, 395, 398, 1, 0, 0, 0, 396, 394, 1, 0, 0, 0, 396, 397, 1, 0, 0, 0, 397, 399, 1, 0, 0, 0, 398, 396, 1, 0, 0, 0, 399, 400, 5, 34, 0, 0, 400, 126, 1, 0, 0, 0, 401, 403, 5, 92, 0, 0, 402, 404, 7, 10, 0, 0, 403, 402, 1, 0, 0, 0, 404, 128, 1, 0, 0, 0, 405, 406, 5, 47, 0, 0, 406, 407, 5, 47, 0, 0, 407, 411, 1, 0, 0, 0, 408, 410, 8, 11, 0, 0, 409, 408, 1, 0, 0, 0, 410, 413, 1, 0, 0, 0, 411, 409, 1, 0, 0, 0, 411, 412, 1, 0, 0, 0, 412, 414, 1, 0, 0, 0, 413, 411, 1, 0, 0, 0, 414, 415, 6, 64, 0, 0, 415, 130, 1, 0, 0, 0, 416, 417, 5, 47, 0, 0, 417, 418, 5, 42, 0, 0, 418, 422, 1, 0, 0, 0, 419, 421, 9, 0, 0, 0, 420, 419, 1, 0, 0, 0, 421, 424, 1, 0, 0, 0, 422, 423, 1, 0, 0, 0, 422, 420, 1, 0, 0, 0, 423, 425, 1, 0, 0, 0, 424, 422, 1, 0, 0, 0, 425, 426, 5, 42, 0, 0, 426, 427, 5, 47, 0, 0, 427, 428, 1, 0, 0, 0, 428, 429, 6, 65, 0, 0, 429, 132, 1, 0, 0, 0, 430, 432, 7, 12, 0, 0, 431, 430, 1, 0, 0, 0, 432, 433, 1, 0, 0, 0, 433, 431, 1, 0, 0, 0, 433, 434, 1, 0, 0, 0, 434, 435, 1, 0, 0, 0, 435, 436, 6, 66, 0, 0, 436, 134, 1, 0, 0, 0, 14, 0, 333, 343, 351, 354, 361, 371, 381, 394, 396, 403, 411, 422, 433, 1, 6, 0, 0] \ No newline at end of file diff --git a/parser/RiddleLexer.tokens b/parser/RiddleLexer.tokens index 6482b53..4d6c425 100644 --- a/parser/RiddleLexer.tokens +++ b/parser/RiddleLexer.tokens @@ -18,50 +18,52 @@ False=17 Static=18 Const=19 Null=20 -LeftBracket=21 -RightBracket=22 -LeftSquare=23 -RightSquare=24 -LeftCurly=25 -RightCurly=26 -Colon=27 -Semi=28 -Comma=29 -Equal=30 -Assign=31 -Greater=32 -Less=33 -LeftLeft=34 -RightRight=35 -RightRightRight=36 -Add=37 -Sub=38 -Star=39 -Div=40 -Mod=41 -Not=42 -And=43 -Or=44 -Xor=45 -Dot=46 -DoubleQuotes=47 -Quotes=48 -Endl=49 -Identifier=50 -Hexadecimal=51 -Decimal=52 -Octal=53 -Binary=54 -Float=55 -IntegerSequence=56 -HEX_DIGIT=57 -OCTAL_DIGIT=58 -BINARY_DIGIT=59 -DIGIT=60 -STRING=61 -LINE_COMMENT=62 -BLOCK_COMMENT=63 -WHITESPACE=64 +Try=21 +Catch=22 +LeftBracket=23 +RightBracket=24 +LeftSquare=25 +RightSquare=26 +LeftCurly=27 +RightCurly=28 +Colon=29 +Semi=30 +Comma=31 +Equal=32 +Assign=33 +Greater=34 +Less=35 +LeftLeft=36 +RightRight=37 +RightRightRight=38 +Add=39 +Sub=40 +Star=41 +Div=42 +Mod=43 +Not=44 +And=45 +Or=46 +Xor=47 +Dot=48 +DoubleQuotes=49 +Quotes=50 +Endl=51 +Identifier=52 +Hexadecimal=53 +Decimal=54 +Octal=55 +Binary=56 +Float=57 +IntegerSequence=58 +HEX_DIGIT=59 +OCTAL_DIGIT=60 +BINARY_DIGIT=61 +DIGIT=62 +STRING=63 +LINE_COMMENT=64 +BLOCK_COMMENT=65 +WHITESPACE=66 'var'=1 'val'=2 'for'=3 @@ -82,32 +84,34 @@ WHITESPACE=64 'static'=18 'const'=19 'null'=20 -'('=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 -'\n'=49 +'try'=21 +'catch'=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 +'\n'=51 diff --git a/parser/RiddleParser.cpp b/parser/RiddleParser.cpp index bcd64f5..d51a8f5 100644 --- a/parser/RiddleParser.cpp +++ b/parser/RiddleParser.cpp @@ -1,5 +1,5 @@ -// Generated from E:/Riddle-Language/RiddleParser.g4 by ANTLR 4.13.1 +// Generated from E:/Riddle-Language/RiddleParser.g4 by ANTLR 4.13.2 #include "RiddleParserListener.h" @@ -41,7 +41,7 @@ ::antlr4::internal::OnceFlag riddleparserParserOnceFlag; #if ANTLR4_USE_THREAD_LOCAL_CACHE static thread_local #endif -RiddleParserStaticData *riddleparserParserStaticData = nullptr; +std::unique_ptr riddleparserParserStaticData = nullptr; void riddleparserParserInitialize() { #if ANTLR4_USE_THREAD_LOCAL_CACHE @@ -53,199 +53,204 @@ void riddleparserParserInitialize() { #endif auto staticData = std::make_unique( std::vector{ - "program", "statement_ed", "statement", "packStatement", "importStatement", - "varDefineStatement", "argsExpr", "defineArgs", "funcDefine", "funcBody", - "forStatement", "whileStatement", "ifStatement", "returnStatement", - "classDefine", "classBody", "exprPtr", "exprPtrParser", "expression", - "id", "number", "boolean", "string", "float", "integer", "templateArg", - "templateArgs", "typeName" + "null_cnt", "program", "statement_ed", "statement", "bodyExpr", "packStatement", + "importStatement", "varDefineStatement", "argsExpr", "defineArgs", + "funcDefine", "forStatement", "whileStatement", "ifStatement", "returnStatement", + "classDefine", "tryExpr", "catchExpr", "exprPtr", "exprPtrParser", + "expression", "id", "number", "boolean", "string", "float", "integer", + "templateArg", "templateArgs", "typeName" }, std::vector{ "", "'var'", "'val'", "'for'", "'while'", "'if'", "'else'", "'fun'", "'return'", "'import'", "'package'", "'class'", "'public'", "'protected'", "'Private'", "'override'", "'true'", "'false'", "'static'", "'const'", - "'null'", "'('", "')'", "'['", "']'", "'{'", "'}'", "':'", "';'", - "','", "'=='", "'='", "'>'", "'<'", "'<<'", "'>>'", "'>>>'", "'+'", - "'-'", "'*'", "'/'", "'%'", "'!'", "'&'", "'|'", "'^'", "'.'", "'\"'", - "'''", "'\\n'" + "'null'", "'try'", "'catch'", "'('", "')'", "'['", "']'", "'{'", "'}'", + "':'", "';'", "','", "'=='", "'='", "'>'", "'<'", "'<<'", "'>>'", + "'>>>'", "'+'", "'-'", "'*'", "'/'", "'%'", "'!'", "'&'", "'|'", "'^'", + "'.'", "'\"'", "'''", "'\\n'" }, std::vector{ "", "Var", "Val", "For", "While", "If", "Else", "Func", "Return", "Import", "Package", "Class", "Public", "Protected", "Private", "Override", - "True", "False", "Static", "Const", "Null", "LeftBracket", "RightBracket", - "LeftSquare", "RightSquare", "LeftCurly", "RightCurly", "Colon", "Semi", - "Comma", "Equal", "Assign", "Greater", "Less", "LeftLeft", "RightRight", - "RightRightRight", "Add", "Sub", "Star", "Div", "Mod", "Not", "And", - "Or", "Xor", "Dot", "DoubleQuotes", "Quotes", "Endl", "Identifier", - "Hexadecimal", "Decimal", "Octal", "Binary", "Float", "IntegerSequence", - "HEX_DIGIT", "OCTAL_DIGIT", "BINARY_DIGIT", "DIGIT", "STRING", "LINE_COMMENT", - "BLOCK_COMMENT", "WHITESPACE" + "True", "False", "Static", "Const", "Null", "Try", "Catch", "LeftBracket", + "RightBracket", "LeftSquare", "RightSquare", "LeftCurly", "RightCurly", + "Colon", "Semi", "Comma", "Equal", "Assign", "Greater", "Less", "LeftLeft", + "RightRight", "RightRightRight", "Add", "Sub", "Star", "Div", "Mod", + "Not", "And", "Or", "Xor", "Dot", "DoubleQuotes", "Quotes", "Endl", + "Identifier", "Hexadecimal", "Decimal", "Octal", "Binary", "Float", + "IntegerSequence", "HEX_DIGIT", "OCTAL_DIGIT", "BINARY_DIGIT", "DIGIT", + "STRING", "LINE_COMMENT", "BLOCK_COMMENT", "WHITESPACE" } ); static const int32_t serializedATNSegment[] = { - 4,1,64,472,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2, + 4,1,66,487,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2, 7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,7, 14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21,7, - 21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,1,0,5, - 0,58,8,0,10,0,12,0,61,9,0,1,0,3,0,64,8,0,1,1,1,1,3,1,68,8,1,1,1,3,1,71, - 8,1,1,1,1,1,3,1,75,8,1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1, - 2,5,2,89,8,2,10,2,12,2,92,9,2,1,2,3,2,95,8,2,1,3,1,3,1,3,1,4,1,4,1,4, - 1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,3,5,118,8, - 5,1,6,1,6,1,6,5,6,123,8,6,10,6,12,6,126,9,6,1,6,3,6,129,8,6,1,7,1,7,1, - 7,1,7,1,7,5,7,136,8,7,10,7,12,7,139,9,7,1,7,1,7,1,7,3,7,144,8,7,1,8,1, - 8,1,8,1,8,1,8,1,8,1,8,1,8,3,8,154,8,8,1,8,1,8,1,8,1,8,1,9,5,9,161,8,9, - 10,9,12,9,164,9,9,1,10,1,10,1,10,3,10,169,8,10,1,10,1,10,3,10,173,8,10, - 1,10,1,10,3,10,177,8,10,1,10,1,10,1,10,1,11,1,11,1,11,1,11,1,11,1,11, - 1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12, - 1,12,1,12,3,12,204,8,12,1,13,1,13,3,13,208,8,13,1,14,1,14,1,14,1,14,1, - 14,1,14,1,15,5,15,217,8,15,10,15,12,15,220,9,15,1,16,1,16,1,16,1,16,1, - 16,1,16,1,16,3,16,229,8,16,1,16,1,16,1,16,5,16,234,8,16,10,16,12,16,237, - 9,16,1,17,1,17,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18, - 1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18, - 1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18, - 1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18, - 1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18, - 1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18, - 1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18, - 1,18,1,18,1,18,1,18,1,18,1,18,3,18,342,8,18,1,18,1,18,1,18,1,18,1,18, - 1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18, - 1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18, - 1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18, - 1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18, - 1,18,5,18,406,8,18,10,18,12,18,409,9,18,1,19,1,19,1,20,1,20,3,20,415, - 8,20,1,21,1,21,1,21,1,21,3,21,421,8,21,1,22,1,22,1,23,1,23,1,23,1,24, - 1,24,1,24,1,24,1,24,1,24,1,24,1,24,3,24,436,8,24,1,25,1,25,3,25,440,8, - 25,1,26,1,26,1,26,5,26,445,8,26,10,26,12,26,448,9,26,1,26,3,26,451,8, - 26,1,27,1,27,1,27,1,27,1,27,1,27,1,27,3,27,460,8,27,1,27,1,27,1,27,1, - 27,1,27,5,27,467,8,27,10,27,12,27,470,9,27,1,27,0,3,32,36,54,28,0,2,4, - 6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52, - 54,0,0,531,0,63,1,0,0,0,2,74,1,0,0,0,4,94,1,0,0,0,6,96,1,0,0,0,8,99,1, - 0,0,0,10,117,1,0,0,0,12,128,1,0,0,0,14,143,1,0,0,0,16,145,1,0,0,0,18, - 162,1,0,0,0,20,165,1,0,0,0,22,181,1,0,0,0,24,203,1,0,0,0,26,205,1,0,0, - 0,28,209,1,0,0,0,30,218,1,0,0,0,32,228,1,0,0,0,34,238,1,0,0,0,36,341, - 1,0,0,0,38,410,1,0,0,0,40,414,1,0,0,0,42,420,1,0,0,0,44,422,1,0,0,0,46, - 424,1,0,0,0,48,435,1,0,0,0,50,439,1,0,0,0,52,450,1,0,0,0,54,459,1,0,0, - 0,56,58,3,2,1,0,57,56,1,0,0,0,58,61,1,0,0,0,59,57,1,0,0,0,59,60,1,0,0, - 0,60,64,1,0,0,0,61,59,1,0,0,0,62,64,5,0,0,1,63,59,1,0,0,0,63,62,1,0,0, - 0,64,1,1,0,0,0,65,67,3,4,2,0,66,68,5,28,0,0,67,66,1,0,0,0,67,68,1,0,0, - 0,68,70,1,0,0,0,69,71,5,49,0,0,70,69,1,0,0,0,70,71,1,0,0,0,71,75,1,0, - 0,0,72,75,5,28,0,0,73,75,5,49,0,0,74,65,1,0,0,0,74,72,1,0,0,0,74,73,1, - 0,0,0,75,3,1,0,0,0,76,95,3,6,3,0,77,95,3,8,4,0,78,95,3,28,14,0,79,95, - 3,16,8,0,80,95,3,10,5,0,81,95,3,20,10,0,82,95,3,22,11,0,83,95,3,24,12, - 0,84,95,3,26,13,0,85,95,3,36,18,0,86,90,5,25,0,0,87,89,3,2,1,0,88,87, - 1,0,0,0,89,92,1,0,0,0,90,88,1,0,0,0,90,91,1,0,0,0,91,93,1,0,0,0,92,90, - 1,0,0,0,93,95,5,26,0,0,94,76,1,0,0,0,94,77,1,0,0,0,94,78,1,0,0,0,94,79, - 1,0,0,0,94,80,1,0,0,0,94,81,1,0,0,0,94,82,1,0,0,0,94,83,1,0,0,0,94,84, - 1,0,0,0,94,85,1,0,0,0,94,86,1,0,0,0,95,5,1,0,0,0,96,97,5,10,0,0,97,98, - 3,38,19,0,98,7,1,0,0,0,99,100,5,9,0,0,100,101,3,38,19,0,101,9,1,0,0,0, - 102,103,5,1,0,0,103,104,5,50,0,0,104,105,5,27,0,0,105,118,3,54,27,0,106, - 107,5,1,0,0,107,108,5,50,0,0,108,109,5,31,0,0,109,118,3,36,18,0,110,111, - 5,1,0,0,111,112,5,50,0,0,112,113,5,27,0,0,113,114,3,54,27,0,114,115,5, - 31,0,0,115,116,3,36,18,0,116,118,1,0,0,0,117,102,1,0,0,0,117,106,1,0, - 0,0,117,110,1,0,0,0,118,11,1,0,0,0,119,120,3,36,18,0,120,121,5,29,0,0, - 121,123,1,0,0,0,122,119,1,0,0,0,123,126,1,0,0,0,124,122,1,0,0,0,124,125, - 1,0,0,0,125,127,1,0,0,0,126,124,1,0,0,0,127,129,3,36,18,0,128,124,1,0, - 0,0,128,129,1,0,0,0,129,13,1,0,0,0,130,131,5,50,0,0,131,132,5,27,0,0, - 132,133,3,54,27,0,133,134,5,29,0,0,134,136,1,0,0,0,135,130,1,0,0,0,136, - 139,1,0,0,0,137,135,1,0,0,0,137,138,1,0,0,0,138,140,1,0,0,0,139,137,1, - 0,0,0,140,141,5,50,0,0,141,142,5,27,0,0,142,144,3,54,27,0,143,137,1,0, - 0,0,143,144,1,0,0,0,144,15,1,0,0,0,145,146,5,7,0,0,146,147,5,50,0,0,147, - 148,5,21,0,0,148,149,3,14,7,0,149,153,5,22,0,0,150,151,5,38,0,0,151,152, - 5,32,0,0,152,154,3,54,27,0,153,150,1,0,0,0,153,154,1,0,0,0,154,155,1, - 0,0,0,155,156,5,25,0,0,156,157,3,18,9,0,157,158,5,26,0,0,158,17,1,0,0, - 0,159,161,3,2,1,0,160,159,1,0,0,0,161,164,1,0,0,0,162,160,1,0,0,0,162, - 163,1,0,0,0,163,19,1,0,0,0,164,162,1,0,0,0,165,166,5,3,0,0,166,168,5, - 21,0,0,167,169,3,10,5,0,168,167,1,0,0,0,168,169,1,0,0,0,169,170,1,0,0, - 0,170,172,5,28,0,0,171,173,3,36,18,0,172,171,1,0,0,0,172,173,1,0,0,0, - 173,174,1,0,0,0,174,176,5,28,0,0,175,177,3,4,2,0,176,175,1,0,0,0,176, - 177,1,0,0,0,177,178,1,0,0,0,178,179,5,22,0,0,179,180,3,2,1,0,180,21,1, - 0,0,0,181,182,5,4,0,0,182,183,5,21,0,0,183,184,3,36,18,0,184,185,5,22, - 0,0,185,186,3,2,1,0,186,23,1,0,0,0,187,188,5,5,0,0,188,189,5,21,0,0,189, - 190,3,36,18,0,190,191,5,22,0,0,191,192,3,2,1,0,192,193,6,12,-1,0,193, - 204,1,0,0,0,194,195,5,5,0,0,195,196,5,21,0,0,196,197,3,36,18,0,197,198, - 5,22,0,0,198,199,3,2,1,0,199,200,5,6,0,0,200,201,3,2,1,0,201,202,6,12, - -1,0,202,204,1,0,0,0,203,187,1,0,0,0,203,194,1,0,0,0,204,25,1,0,0,0,205, - 207,5,8,0,0,206,208,3,2,1,0,207,206,1,0,0,0,207,208,1,0,0,0,208,27,1, - 0,0,0,209,210,5,11,0,0,210,211,3,38,19,0,211,212,5,25,0,0,212,213,3,30, - 15,0,213,214,5,26,0,0,214,29,1,0,0,0,215,217,3,2,1,0,216,215,1,0,0,0, - 217,220,1,0,0,0,218,216,1,0,0,0,218,219,1,0,0,0,219,31,1,0,0,0,220,218, - 1,0,0,0,221,222,6,16,-1,0,222,223,5,50,0,0,223,224,5,21,0,0,224,225,3, - 12,6,0,225,226,5,22,0,0,226,229,1,0,0,0,227,229,5,50,0,0,228,221,1,0, - 0,0,228,227,1,0,0,0,229,235,1,0,0,0,230,231,10,1,0,0,231,232,5,46,0,0, - 232,234,3,32,16,2,233,230,1,0,0,0,234,237,1,0,0,0,235,233,1,0,0,0,235, - 236,1,0,0,0,236,33,1,0,0,0,237,235,1,0,0,0,238,239,3,32,16,0,239,35,1, - 0,0,0,240,241,6,18,-1,0,241,242,5,33,0,0,242,243,3,54,27,0,243,244,5, - 32,0,0,244,245,5,21,0,0,245,246,3,34,17,0,246,247,5,22,0,0,247,342,1, - 0,0,0,248,249,5,21,0,0,249,250,3,36,18,0,250,251,5,22,0,0,251,342,1,0, - 0,0,252,253,5,42,0,0,253,342,3,36,18,44,254,255,5,37,0,0,255,342,3,36, - 18,43,256,257,5,38,0,0,257,342,3,36,18,42,258,259,5,37,0,0,259,260,5, - 37,0,0,260,342,3,34,17,0,261,262,3,34,17,0,262,263,5,37,0,0,263,264,5, - 37,0,0,264,342,1,0,0,0,265,266,5,38,0,0,266,267,5,38,0,0,267,342,3,34, - 17,0,268,269,3,34,17,0,269,270,5,38,0,0,270,271,5,38,0,0,271,342,1,0, - 0,0,272,342,3,32,16,0,273,274,3,34,17,0,274,275,5,31,0,0,275,276,3,36, - 18,17,276,342,1,0,0,0,277,278,3,34,17,0,278,279,5,37,0,0,279,280,5,31, - 0,0,280,281,3,36,18,16,281,342,1,0,0,0,282,283,3,34,17,0,283,284,5,38, - 0,0,284,285,5,31,0,0,285,286,3,36,18,15,286,342,1,0,0,0,287,288,3,34, - 17,0,288,289,5,39,0,0,289,290,5,31,0,0,290,291,3,36,18,14,291,342,1,0, - 0,0,292,293,3,34,17,0,293,294,5,40,0,0,294,295,5,31,0,0,295,296,3,36, - 18,13,296,342,1,0,0,0,297,298,3,34,17,0,298,299,5,41,0,0,299,300,5,31, - 0,0,300,301,3,36,18,12,301,342,1,0,0,0,302,303,3,34,17,0,303,304,5,37, - 0,0,304,305,5,31,0,0,305,306,3,36,18,11,306,342,1,0,0,0,307,308,3,34, - 17,0,308,309,5,43,0,0,309,310,5,31,0,0,310,311,3,36,18,10,311,342,1,0, - 0,0,312,313,3,34,17,0,313,314,5,44,0,0,314,315,5,31,0,0,315,316,3,36, - 18,9,316,342,1,0,0,0,317,318,3,34,17,0,318,319,5,45,0,0,319,320,5,31, - 0,0,320,321,3,36,18,8,321,342,1,0,0,0,322,323,3,34,17,0,323,324,5,34, - 0,0,324,325,5,31,0,0,325,326,3,36,18,7,326,342,1,0,0,0,327,328,3,34,17, - 0,328,329,5,35,0,0,329,330,5,31,0,0,330,331,3,36,18,6,331,342,1,0,0,0, - 332,333,3,34,17,0,333,334,5,36,0,0,334,335,5,31,0,0,335,336,3,36,18,5, - 336,342,1,0,0,0,337,342,3,44,22,0,338,342,3,40,20,0,339,342,3,42,21,0, - 340,342,5,20,0,0,341,240,1,0,0,0,341,248,1,0,0,0,341,252,1,0,0,0,341, - 254,1,0,0,0,341,256,1,0,0,0,341,258,1,0,0,0,341,261,1,0,0,0,341,265,1, - 0,0,0,341,268,1,0,0,0,341,272,1,0,0,0,341,273,1,0,0,0,341,277,1,0,0,0, - 341,282,1,0,0,0,341,287,1,0,0,0,341,292,1,0,0,0,341,297,1,0,0,0,341,302, - 1,0,0,0,341,307,1,0,0,0,341,312,1,0,0,0,341,317,1,0,0,0,341,322,1,0,0, - 0,341,327,1,0,0,0,341,332,1,0,0,0,341,337,1,0,0,0,341,338,1,0,0,0,341, - 339,1,0,0,0,341,340,1,0,0,0,342,407,1,0,0,0,343,344,10,36,0,0,344,345, - 5,39,0,0,345,406,3,36,18,37,346,347,10,35,0,0,347,348,5,40,0,0,348,406, - 3,36,18,36,349,350,10,34,0,0,350,351,5,41,0,0,351,406,3,36,18,35,352, - 353,10,33,0,0,353,354,5,37,0,0,354,406,3,36,18,34,355,356,10,32,0,0,356, - 357,5,38,0,0,357,406,3,36,18,33,358,359,10,31,0,0,359,360,5,34,0,0,360, - 406,3,36,18,32,361,362,10,30,0,0,362,363,5,35,0,0,363,406,3,36,18,31, - 364,365,10,29,0,0,365,366,5,36,0,0,366,406,3,36,18,30,367,368,10,28,0, - 0,368,369,5,32,0,0,369,406,3,36,18,29,370,371,10,27,0,0,371,372,5,33, - 0,0,372,406,3,36,18,28,373,374,10,26,0,0,374,375,5,32,0,0,375,376,5,31, - 0,0,376,406,3,36,18,27,377,378,10,25,0,0,378,379,5,33,0,0,379,380,5,31, - 0,0,380,406,3,36,18,26,381,382,10,24,0,0,382,383,5,30,0,0,383,406,3,36, - 18,25,384,385,10,23,0,0,385,386,5,42,0,0,386,387,5,31,0,0,387,406,3,36, - 18,24,388,389,10,22,0,0,389,390,5,43,0,0,390,406,3,36,18,23,391,392,10, - 21,0,0,392,393,5,45,0,0,393,406,3,36,18,22,394,395,10,20,0,0,395,396, - 5,44,0,0,396,406,3,36,18,21,397,398,10,19,0,0,398,399,5,43,0,0,399,400, - 5,43,0,0,400,406,3,36,18,20,401,402,10,18,0,0,402,403,5,44,0,0,403,404, - 5,44,0,0,404,406,3,36,18,19,405,343,1,0,0,0,405,346,1,0,0,0,405,349,1, - 0,0,0,405,352,1,0,0,0,405,355,1,0,0,0,405,358,1,0,0,0,405,361,1,0,0,0, - 405,364,1,0,0,0,405,367,1,0,0,0,405,370,1,0,0,0,405,373,1,0,0,0,405,377, - 1,0,0,0,405,381,1,0,0,0,405,384,1,0,0,0,405,388,1,0,0,0,405,391,1,0,0, - 0,405,394,1,0,0,0,405,397,1,0,0,0,405,401,1,0,0,0,406,409,1,0,0,0,407, - 405,1,0,0,0,407,408,1,0,0,0,408,37,1,0,0,0,409,407,1,0,0,0,410,411,5, - 50,0,0,411,39,1,0,0,0,412,415,3,48,24,0,413,415,3,46,23,0,414,412,1,0, - 0,0,414,413,1,0,0,0,415,41,1,0,0,0,416,417,5,16,0,0,417,421,6,21,-1,0, - 418,419,5,17,0,0,419,421,6,21,-1,0,420,416,1,0,0,0,420,418,1,0,0,0,421, - 43,1,0,0,0,422,423,5,61,0,0,423,45,1,0,0,0,424,425,5,55,0,0,425,426,6, - 23,-1,0,426,47,1,0,0,0,427,428,5,52,0,0,428,436,6,24,-1,0,429,430,5,51, - 0,0,430,436,6,24,-1,0,431,432,5,54,0,0,432,436,6,24,-1,0,433,434,5,53, - 0,0,434,436,6,24,-1,0,435,427,1,0,0,0,435,429,1,0,0,0,435,431,1,0,0,0, - 435,433,1,0,0,0,436,49,1,0,0,0,437,440,3,36,18,0,438,440,3,54,27,0,439, - 437,1,0,0,0,439,438,1,0,0,0,440,51,1,0,0,0,441,442,3,50,25,0,442,443, - 5,29,0,0,443,445,1,0,0,0,444,441,1,0,0,0,445,448,1,0,0,0,446,444,1,0, - 0,0,446,447,1,0,0,0,447,449,1,0,0,0,448,446,1,0,0,0,449,451,3,50,25,0, - 450,446,1,0,0,0,450,451,1,0,0,0,451,53,1,0,0,0,452,453,6,27,-1,0,453, - 460,3,38,19,0,454,455,3,38,19,0,455,456,5,33,0,0,456,457,3,52,26,0,457, - 458,5,32,0,0,458,460,1,0,0,0,459,452,1,0,0,0,459,454,1,0,0,0,460,468, - 1,0,0,0,461,462,10,1,0,0,462,463,5,23,0,0,463,464,3,36,18,0,464,465,5, - 24,0,0,465,467,1,0,0,0,466,461,1,0,0,0,467,470,1,0,0,0,468,466,1,0,0, - 0,468,469,1,0,0,0,469,55,1,0,0,0,470,468,1,0,0,0,33,59,63,67,70,74,90, - 94,117,124,128,137,143,153,162,168,172,176,203,207,218,228,235,341,405, - 407,414,420,435,439,446,450,459,468 + 21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28,7, + 28,2,29,7,29,1,0,1,0,1,1,5,1,64,8,1,10,1,12,1,67,9,1,1,1,3,1,70,8,1,1, + 2,1,2,3,2,74,8,2,1,2,3,2,77,8,2,1,2,1,2,3,2,81,8,2,1,3,1,3,1,3,1,3,1, + 3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,5,3,96,8,3,10,3,12,3,99,9,3,1,3,3,3, + 102,8,3,1,4,5,4,105,8,4,10,4,12,4,108,9,4,1,5,1,5,1,5,1,6,1,6,1,6,1,7, + 1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,3,7,131,8,7,1, + 8,1,8,1,8,5,8,136,8,8,10,8,12,8,139,9,8,1,8,3,8,142,8,8,1,9,1,9,1,9,1, + 9,1,9,5,9,149,8,9,10,9,12,9,152,9,9,1,9,1,9,1,9,3,9,157,8,9,1,10,1,10, + 1,10,1,10,1,10,1,10,1,10,1,10,3,10,167,8,10,1,10,1,10,1,10,1,10,1,11, + 1,11,1,11,3,11,176,8,11,1,11,1,11,3,11,180,8,11,1,11,1,11,3,11,184,8, + 11,1,11,1,11,1,11,1,12,1,12,1,12,1,12,1,12,1,12,1,13,1,13,1,13,1,13,1, + 13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,3,13,211,8, + 13,1,14,1,14,3,14,215,8,14,1,15,1,15,1,15,1,15,1,15,1,15,1,16,1,16,1, + 16,1,16,1,16,3,16,228,8,16,1,16,1,16,1,17,1,17,1,17,1,17,1,17,1,18,1, + 18,1,18,1,18,1,18,1,18,1,18,3,18,244,8,18,1,18,1,18,1,18,5,18,249,8,18, + 10,18,12,18,252,9,18,1,19,1,19,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20, + 1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20, + 1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20, + 1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20, + 1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20, + 1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20, + 1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20, + 1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,3,20,357,8,20,1,20,1,20, + 1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20, + 1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20, + 1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20, + 1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20, + 1,20,1,20,1,20,1,20,5,20,421,8,20,10,20,12,20,424,9,20,1,21,1,21,1,22, + 1,22,3,22,430,8,22,1,23,1,23,1,23,1,23,3,23,436,8,23,1,24,1,24,1,25,1, + 25,1,25,1,26,1,26,1,26,1,26,1,26,1,26,1,26,1,26,3,26,451,8,26,1,27,1, + 27,3,27,455,8,27,1,28,1,28,1,28,5,28,460,8,28,10,28,12,28,463,9,28,1, + 28,3,28,466,8,28,1,29,1,29,1,29,1,29,1,29,1,29,1,29,3,29,475,8,29,1,29, + 1,29,1,29,1,29,1,29,5,29,482,8,29,10,29,12,29,485,9,29,1,29,0,3,36,40, + 58,30,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44, + 46,48,50,52,54,56,58,0,1,2,0,30,30,51,51,545,0,60,1,0,0,0,2,69,1,0,0, + 0,4,80,1,0,0,0,6,101,1,0,0,0,8,106,1,0,0,0,10,109,1,0,0,0,12,112,1,0, + 0,0,14,130,1,0,0,0,16,141,1,0,0,0,18,156,1,0,0,0,20,158,1,0,0,0,22,172, + 1,0,0,0,24,188,1,0,0,0,26,210,1,0,0,0,28,212,1,0,0,0,30,216,1,0,0,0,32, + 222,1,0,0,0,34,231,1,0,0,0,36,243,1,0,0,0,38,253,1,0,0,0,40,356,1,0,0, + 0,42,425,1,0,0,0,44,429,1,0,0,0,46,435,1,0,0,0,48,437,1,0,0,0,50,439, + 1,0,0,0,52,450,1,0,0,0,54,454,1,0,0,0,56,465,1,0,0,0,58,474,1,0,0,0,60, + 61,7,0,0,0,61,1,1,0,0,0,62,64,3,4,2,0,63,62,1,0,0,0,64,67,1,0,0,0,65, + 63,1,0,0,0,65,66,1,0,0,0,66,70,1,0,0,0,67,65,1,0,0,0,68,70,5,0,0,1,69, + 65,1,0,0,0,69,68,1,0,0,0,70,3,1,0,0,0,71,73,3,6,3,0,72,74,5,30,0,0,73, + 72,1,0,0,0,73,74,1,0,0,0,74,76,1,0,0,0,75,77,5,51,0,0,76,75,1,0,0,0,76, + 77,1,0,0,0,77,81,1,0,0,0,78,81,5,30,0,0,79,81,5,51,0,0,80,71,1,0,0,0, + 80,78,1,0,0,0,80,79,1,0,0,0,81,5,1,0,0,0,82,102,3,10,5,0,83,102,3,12, + 6,0,84,102,3,30,15,0,85,102,3,20,10,0,86,102,3,14,7,0,87,102,3,22,11, + 0,88,102,3,24,12,0,89,102,3,26,13,0,90,102,3,28,14,0,91,102,3,32,16,0, + 92,102,3,40,20,0,93,97,5,27,0,0,94,96,3,4,2,0,95,94,1,0,0,0,96,99,1,0, + 0,0,97,95,1,0,0,0,97,98,1,0,0,0,98,100,1,0,0,0,99,97,1,0,0,0,100,102, + 5,28,0,0,101,82,1,0,0,0,101,83,1,0,0,0,101,84,1,0,0,0,101,85,1,0,0,0, + 101,86,1,0,0,0,101,87,1,0,0,0,101,88,1,0,0,0,101,89,1,0,0,0,101,90,1, + 0,0,0,101,91,1,0,0,0,101,92,1,0,0,0,101,93,1,0,0,0,102,7,1,0,0,0,103, + 105,3,4,2,0,104,103,1,0,0,0,105,108,1,0,0,0,106,104,1,0,0,0,106,107,1, + 0,0,0,107,9,1,0,0,0,108,106,1,0,0,0,109,110,5,10,0,0,110,111,3,42,21, + 0,111,11,1,0,0,0,112,113,5,9,0,0,113,114,3,42,21,0,114,13,1,0,0,0,115, + 116,5,1,0,0,116,117,5,52,0,0,117,118,5,29,0,0,118,131,3,58,29,0,119,120, + 5,1,0,0,120,121,5,52,0,0,121,122,5,33,0,0,122,131,3,40,20,0,123,124,5, + 1,0,0,124,125,5,52,0,0,125,126,5,29,0,0,126,127,3,58,29,0,127,128,5,33, + 0,0,128,129,3,40,20,0,129,131,1,0,0,0,130,115,1,0,0,0,130,119,1,0,0,0, + 130,123,1,0,0,0,131,15,1,0,0,0,132,133,3,40,20,0,133,134,5,31,0,0,134, + 136,1,0,0,0,135,132,1,0,0,0,136,139,1,0,0,0,137,135,1,0,0,0,137,138,1, + 0,0,0,138,140,1,0,0,0,139,137,1,0,0,0,140,142,3,40,20,0,141,137,1,0,0, + 0,141,142,1,0,0,0,142,17,1,0,0,0,143,144,5,52,0,0,144,145,5,29,0,0,145, + 146,3,58,29,0,146,147,5,31,0,0,147,149,1,0,0,0,148,143,1,0,0,0,149,152, + 1,0,0,0,150,148,1,0,0,0,150,151,1,0,0,0,151,153,1,0,0,0,152,150,1,0,0, + 0,153,154,5,52,0,0,154,155,5,29,0,0,155,157,3,58,29,0,156,150,1,0,0,0, + 156,157,1,0,0,0,157,19,1,0,0,0,158,159,5,7,0,0,159,160,5,52,0,0,160,161, + 5,23,0,0,161,162,3,18,9,0,162,166,5,24,0,0,163,164,5,40,0,0,164,165,5, + 34,0,0,165,167,3,58,29,0,166,163,1,0,0,0,166,167,1,0,0,0,167,168,1,0, + 0,0,168,169,5,27,0,0,169,170,3,8,4,0,170,171,5,28,0,0,171,21,1,0,0,0, + 172,173,5,3,0,0,173,175,5,23,0,0,174,176,3,14,7,0,175,174,1,0,0,0,175, + 176,1,0,0,0,176,177,1,0,0,0,177,179,5,30,0,0,178,180,3,40,20,0,179,178, + 1,0,0,0,179,180,1,0,0,0,180,181,1,0,0,0,181,183,5,30,0,0,182,184,3,6, + 3,0,183,182,1,0,0,0,183,184,1,0,0,0,184,185,1,0,0,0,185,186,5,24,0,0, + 186,187,3,4,2,0,187,23,1,0,0,0,188,189,5,4,0,0,189,190,5,23,0,0,190,191, + 3,40,20,0,191,192,5,24,0,0,192,193,3,4,2,0,193,25,1,0,0,0,194,195,5,5, + 0,0,195,196,5,23,0,0,196,197,3,40,20,0,197,198,5,24,0,0,198,199,3,4,2, + 0,199,200,6,13,-1,0,200,211,1,0,0,0,201,202,5,5,0,0,202,203,5,23,0,0, + 203,204,3,40,20,0,204,205,5,24,0,0,205,206,3,4,2,0,206,207,5,6,0,0,207, + 208,3,4,2,0,208,209,6,13,-1,0,209,211,1,0,0,0,210,194,1,0,0,0,210,201, + 1,0,0,0,211,27,1,0,0,0,212,214,5,8,0,0,213,215,3,4,2,0,214,213,1,0,0, + 0,214,215,1,0,0,0,215,29,1,0,0,0,216,217,5,11,0,0,217,218,3,42,21,0,218, + 219,5,27,0,0,219,220,3,8,4,0,220,221,5,28,0,0,221,31,1,0,0,0,222,223, + 5,21,0,0,223,224,5,27,0,0,224,225,3,8,4,0,225,227,5,28,0,0,226,228,3, + 0,0,0,227,226,1,0,0,0,227,228,1,0,0,0,228,229,1,0,0,0,229,230,3,34,17, + 0,230,33,1,0,0,0,231,232,5,22,0,0,232,233,5,23,0,0,233,234,3,14,7,0,234, + 235,5,24,0,0,235,35,1,0,0,0,236,237,6,18,-1,0,237,238,5,52,0,0,238,239, + 5,23,0,0,239,240,3,16,8,0,240,241,5,24,0,0,241,244,1,0,0,0,242,244,5, + 52,0,0,243,236,1,0,0,0,243,242,1,0,0,0,244,250,1,0,0,0,245,246,10,1,0, + 0,246,247,5,48,0,0,247,249,3,36,18,2,248,245,1,0,0,0,249,252,1,0,0,0, + 250,248,1,0,0,0,250,251,1,0,0,0,251,37,1,0,0,0,252,250,1,0,0,0,253,254, + 3,36,18,0,254,39,1,0,0,0,255,256,6,20,-1,0,256,257,5,35,0,0,257,258,3, + 58,29,0,258,259,5,34,0,0,259,260,5,23,0,0,260,261,3,38,19,0,261,262,5, + 24,0,0,262,357,1,0,0,0,263,264,5,23,0,0,264,265,3,40,20,0,265,266,5,24, + 0,0,266,357,1,0,0,0,267,268,5,44,0,0,268,357,3,40,20,44,269,270,5,39, + 0,0,270,357,3,40,20,43,271,272,5,40,0,0,272,357,3,40,20,42,273,274,5, + 39,0,0,274,275,5,39,0,0,275,357,3,38,19,0,276,277,3,38,19,0,277,278,5, + 39,0,0,278,279,5,39,0,0,279,357,1,0,0,0,280,281,5,40,0,0,281,282,5,40, + 0,0,282,357,3,38,19,0,283,284,3,38,19,0,284,285,5,40,0,0,285,286,5,40, + 0,0,286,357,1,0,0,0,287,357,3,36,18,0,288,289,3,38,19,0,289,290,5,33, + 0,0,290,291,3,40,20,17,291,357,1,0,0,0,292,293,3,38,19,0,293,294,5,39, + 0,0,294,295,5,33,0,0,295,296,3,40,20,16,296,357,1,0,0,0,297,298,3,38, + 19,0,298,299,5,40,0,0,299,300,5,33,0,0,300,301,3,40,20,15,301,357,1,0, + 0,0,302,303,3,38,19,0,303,304,5,41,0,0,304,305,5,33,0,0,305,306,3,40, + 20,14,306,357,1,0,0,0,307,308,3,38,19,0,308,309,5,42,0,0,309,310,5,33, + 0,0,310,311,3,40,20,13,311,357,1,0,0,0,312,313,3,38,19,0,313,314,5,43, + 0,0,314,315,5,33,0,0,315,316,3,40,20,12,316,357,1,0,0,0,317,318,3,38, + 19,0,318,319,5,39,0,0,319,320,5,33,0,0,320,321,3,40,20,11,321,357,1,0, + 0,0,322,323,3,38,19,0,323,324,5,45,0,0,324,325,5,33,0,0,325,326,3,40, + 20,10,326,357,1,0,0,0,327,328,3,38,19,0,328,329,5,46,0,0,329,330,5,33, + 0,0,330,331,3,40,20,9,331,357,1,0,0,0,332,333,3,38,19,0,333,334,5,47, + 0,0,334,335,5,33,0,0,335,336,3,40,20,8,336,357,1,0,0,0,337,338,3,38,19, + 0,338,339,5,36,0,0,339,340,5,33,0,0,340,341,3,40,20,7,341,357,1,0,0,0, + 342,343,3,38,19,0,343,344,5,37,0,0,344,345,5,33,0,0,345,346,3,40,20,6, + 346,357,1,0,0,0,347,348,3,38,19,0,348,349,5,38,0,0,349,350,5,33,0,0,350, + 351,3,40,20,5,351,357,1,0,0,0,352,357,3,48,24,0,353,357,3,44,22,0,354, + 357,3,46,23,0,355,357,5,20,0,0,356,255,1,0,0,0,356,263,1,0,0,0,356,267, + 1,0,0,0,356,269,1,0,0,0,356,271,1,0,0,0,356,273,1,0,0,0,356,276,1,0,0, + 0,356,280,1,0,0,0,356,283,1,0,0,0,356,287,1,0,0,0,356,288,1,0,0,0,356, + 292,1,0,0,0,356,297,1,0,0,0,356,302,1,0,0,0,356,307,1,0,0,0,356,312,1, + 0,0,0,356,317,1,0,0,0,356,322,1,0,0,0,356,327,1,0,0,0,356,332,1,0,0,0, + 356,337,1,0,0,0,356,342,1,0,0,0,356,347,1,0,0,0,356,352,1,0,0,0,356,353, + 1,0,0,0,356,354,1,0,0,0,356,355,1,0,0,0,357,422,1,0,0,0,358,359,10,36, + 0,0,359,360,5,41,0,0,360,421,3,40,20,37,361,362,10,35,0,0,362,363,5,42, + 0,0,363,421,3,40,20,36,364,365,10,34,0,0,365,366,5,43,0,0,366,421,3,40, + 20,35,367,368,10,33,0,0,368,369,5,39,0,0,369,421,3,40,20,34,370,371,10, + 32,0,0,371,372,5,40,0,0,372,421,3,40,20,33,373,374,10,31,0,0,374,375, + 5,36,0,0,375,421,3,40,20,32,376,377,10,30,0,0,377,378,5,37,0,0,378,421, + 3,40,20,31,379,380,10,29,0,0,380,381,5,38,0,0,381,421,3,40,20,30,382, + 383,10,28,0,0,383,384,5,34,0,0,384,421,3,40,20,29,385,386,10,27,0,0,386, + 387,5,35,0,0,387,421,3,40,20,28,388,389,10,26,0,0,389,390,5,34,0,0,390, + 391,5,33,0,0,391,421,3,40,20,27,392,393,10,25,0,0,393,394,5,35,0,0,394, + 395,5,33,0,0,395,421,3,40,20,26,396,397,10,24,0,0,397,398,5,32,0,0,398, + 421,3,40,20,25,399,400,10,23,0,0,400,401,5,44,0,0,401,402,5,33,0,0,402, + 421,3,40,20,24,403,404,10,22,0,0,404,405,5,45,0,0,405,421,3,40,20,23, + 406,407,10,21,0,0,407,408,5,47,0,0,408,421,3,40,20,22,409,410,10,20,0, + 0,410,411,5,46,0,0,411,421,3,40,20,21,412,413,10,19,0,0,413,414,5,45, + 0,0,414,415,5,45,0,0,415,421,3,40,20,20,416,417,10,18,0,0,417,418,5,46, + 0,0,418,419,5,46,0,0,419,421,3,40,20,19,420,358,1,0,0,0,420,361,1,0,0, + 0,420,364,1,0,0,0,420,367,1,0,0,0,420,370,1,0,0,0,420,373,1,0,0,0,420, + 376,1,0,0,0,420,379,1,0,0,0,420,382,1,0,0,0,420,385,1,0,0,0,420,388,1, + 0,0,0,420,392,1,0,0,0,420,396,1,0,0,0,420,399,1,0,0,0,420,403,1,0,0,0, + 420,406,1,0,0,0,420,409,1,0,0,0,420,412,1,0,0,0,420,416,1,0,0,0,421,424, + 1,0,0,0,422,420,1,0,0,0,422,423,1,0,0,0,423,41,1,0,0,0,424,422,1,0,0, + 0,425,426,5,52,0,0,426,43,1,0,0,0,427,430,3,52,26,0,428,430,3,50,25,0, + 429,427,1,0,0,0,429,428,1,0,0,0,430,45,1,0,0,0,431,432,5,16,0,0,432,436, + 6,23,-1,0,433,434,5,17,0,0,434,436,6,23,-1,0,435,431,1,0,0,0,435,433, + 1,0,0,0,436,47,1,0,0,0,437,438,5,63,0,0,438,49,1,0,0,0,439,440,5,57,0, + 0,440,441,6,25,-1,0,441,51,1,0,0,0,442,443,5,54,0,0,443,451,6,26,-1,0, + 444,445,5,53,0,0,445,451,6,26,-1,0,446,447,5,56,0,0,447,451,6,26,-1,0, + 448,449,5,55,0,0,449,451,6,26,-1,0,450,442,1,0,0,0,450,444,1,0,0,0,450, + 446,1,0,0,0,450,448,1,0,0,0,451,53,1,0,0,0,452,455,3,40,20,0,453,455, + 3,58,29,0,454,452,1,0,0,0,454,453,1,0,0,0,455,55,1,0,0,0,456,457,3,54, + 27,0,457,458,5,31,0,0,458,460,1,0,0,0,459,456,1,0,0,0,460,463,1,0,0,0, + 461,459,1,0,0,0,461,462,1,0,0,0,462,464,1,0,0,0,463,461,1,0,0,0,464,466, + 3,54,27,0,465,461,1,0,0,0,465,466,1,0,0,0,466,57,1,0,0,0,467,468,6,29, + -1,0,468,475,3,42,21,0,469,470,3,42,21,0,470,471,5,35,0,0,471,472,3,56, + 28,0,472,473,5,34,0,0,473,475,1,0,0,0,474,467,1,0,0,0,474,469,1,0,0,0, + 475,483,1,0,0,0,476,477,10,1,0,0,477,478,5,25,0,0,478,479,3,40,20,0,479, + 480,5,26,0,0,480,482,1,0,0,0,481,476,1,0,0,0,482,485,1,0,0,0,483,481, + 1,0,0,0,483,484,1,0,0,0,484,59,1,0,0,0,485,483,1,0,0,0,33,65,69,73,76, + 80,97,101,106,130,137,141,150,156,166,175,179,183,210,214,227,243,250, + 356,420,422,429,435,450,454,461,465,474,483 }; staticData->serializedATN = antlr4::atn::SerializedATNView(serializedATNSegment, sizeof(serializedATNSegment) / sizeof(serializedATNSegment[0])); @@ -257,7 +262,7 @@ void riddleparserParserInitialize() { for (size_t i = 0; i < count; i++) { staticData->decisionToDFA.emplace_back(staticData->atn->getDecisionState(i), i); } - riddleparserParserStaticData = staticData.release(); + riddleparserParserStaticData = std::move(staticData); } } @@ -294,6 +299,81 @@ antlr4::atn::SerializedATNView RiddleParser::getSerializedATN() const { } +//----------------- Null_cntContext ------------------------------------------------------------------ + +RiddleParser::Null_cntContext::Null_cntContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +tree::TerminalNode* RiddleParser::Null_cntContext::Semi() { + return getToken(RiddleParser::Semi, 0); +} + +tree::TerminalNode* RiddleParser::Null_cntContext::Endl() { + return getToken(RiddleParser::Endl, 0); +} + + +size_t RiddleParser::Null_cntContext::getRuleIndex() const { + return RiddleParser::RuleNull_cnt; +} + +void RiddleParser::Null_cntContext::enterRule(tree::ParseTreeListener *listener) { + auto parserListener = dynamic_cast(listener); + if (parserListener != nullptr) + parserListener->enterNull_cnt(this); +} + +void RiddleParser::Null_cntContext::exitRule(tree::ParseTreeListener *listener) { + auto parserListener = dynamic_cast(listener); + if (parserListener != nullptr) + parserListener->exitNull_cnt(this); +} + + +std::any RiddleParser::Null_cntContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitNull_cnt(this); + else + return visitor->visitChildren(this); +} + +RiddleParser::Null_cntContext* RiddleParser::null_cnt() { + Null_cntContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 0, RiddleParser::RuleNull_cnt); + size_t _la = 0; + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(60); + _la = _input->LA(1); + if (!(_la == RiddleParser::Semi + + || _la == RiddleParser::Endl)) { + _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; +} + //----------------- ProgramContext ------------------------------------------------------------------ RiddleParser::ProgramContext::ProgramContext(ParserRuleContext *parent, size_t invokingState) @@ -339,7 +419,7 @@ std::any RiddleParser::ProgramContext::accept(tree::ParseTreeVisitor *visitor) { RiddleParser::ProgramContext* RiddleParser::program() { ProgramContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 0, RiddleParser::RuleProgram); + enterRule(_localctx, 2, RiddleParser::RuleProgram); size_t _la = 0; #if __cplusplus > 201703L @@ -350,19 +430,19 @@ RiddleParser::ProgramContext* RiddleParser::program() { exitRule(); }); try { - setState(63); + setState(69); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 1, _ctx)) { case 1: { enterOuterAlt(_localctx, 1); - setState(59); + setState(65); _errHandler->sync(this); _la = _input->LA(1); while ((((_la & ~ 0x3fULL) == 0) && - ((1ULL << _la) & 2377342472556842938) != 0)) { - setState(56); + ((1ULL << _la) & -8937374183483830342) != 0)) { + setState(62); statement_ed(); - setState(61); + setState(67); _errHandler->sync(this); _la = _input->LA(1); } @@ -371,7 +451,7 @@ RiddleParser::ProgramContext* RiddleParser::program() { case 2: { enterOuterAlt(_localctx, 2); - setState(62); + setState(68); match(RiddleParser::EOF); break; } @@ -435,7 +515,7 @@ std::any RiddleParser::Statement_edContext::accept(tree::ParseTreeVisitor *visit RiddleParser::Statement_edContext* RiddleParser::statement_ed() { Statement_edContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 2, RiddleParser::RuleStatement_ed); + enterRule(_localctx, 4, RiddleParser::RuleStatement_ed); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -445,7 +525,7 @@ RiddleParser::Statement_edContext* RiddleParser::statement_ed() { exitRule(); }); try { - setState(74); + setState(80); _errHandler->sync(this); switch (_input->LA(1)) { case RiddleParser::Var: @@ -460,6 +540,7 @@ RiddleParser::Statement_edContext* RiddleParser::statement_ed() { case RiddleParser::True: case RiddleParser::False: case RiddleParser::Null: + case RiddleParser::Try: case RiddleParser::LeftBracket: case RiddleParser::LeftCurly: case RiddleParser::Less: @@ -474,14 +555,14 @@ RiddleParser::Statement_edContext* RiddleParser::statement_ed() { case RiddleParser::Float: case RiddleParser::STRING: { enterOuterAlt(_localctx, 1); - setState(65); + setState(71); statement(); - setState(67); + setState(73); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 2, _ctx)) { case 1: { - setState(66); + setState(72); match(RiddleParser::Semi); break; } @@ -489,12 +570,12 @@ RiddleParser::Statement_edContext* RiddleParser::statement_ed() { default: break; } - setState(70); + setState(76); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 3, _ctx)) { case 1: { - setState(69); + setState(75); match(RiddleParser::Endl); break; } @@ -507,14 +588,14 @@ RiddleParser::Statement_edContext* RiddleParser::statement_ed() { case RiddleParser::Semi: { enterOuterAlt(_localctx, 2); - setState(72); + setState(78); match(RiddleParser::Semi); break; } case RiddleParser::Endl: { enterOuterAlt(_localctx, 3); - setState(73); + setState(79); match(RiddleParser::Endl); break; } @@ -575,6 +656,10 @@ RiddleParser::ReturnStatementContext* RiddleParser::StatementContext::returnStat return getRuleContext(0); } +RiddleParser::TryExprContext* RiddleParser::StatementContext::tryExpr() { + return getRuleContext(0); +} + RiddleParser::ExpressionContext* RiddleParser::StatementContext::expression() { return getRuleContext(0); } @@ -622,7 +707,7 @@ std::any RiddleParser::StatementContext::accept(tree::ParseTreeVisitor *visitor) RiddleParser::StatementContext* RiddleParser::statement() { StatementContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 4, RiddleParser::RuleStatement); + enterRule(_localctx, 6, RiddleParser::RuleStatement); size_t _la = 0; #if __cplusplus > 201703L @@ -633,72 +718,79 @@ RiddleParser::StatementContext* RiddleParser::statement() { exitRule(); }); try { - setState(94); + setState(101); _errHandler->sync(this); switch (_input->LA(1)) { case RiddleParser::Package: { enterOuterAlt(_localctx, 1); - setState(76); + setState(82); packStatement(); break; } case RiddleParser::Import: { enterOuterAlt(_localctx, 2); - setState(77); + setState(83); importStatement(); break; } case RiddleParser::Class: { enterOuterAlt(_localctx, 3); - setState(78); + setState(84); classDefine(); break; } case RiddleParser::Func: { enterOuterAlt(_localctx, 4); - setState(79); + setState(85); funcDefine(); break; } case RiddleParser::Var: { enterOuterAlt(_localctx, 5); - setState(80); + setState(86); varDefineStatement(); break; } case RiddleParser::For: { enterOuterAlt(_localctx, 6); - setState(81); + setState(87); forStatement(); break; } case RiddleParser::While: { enterOuterAlt(_localctx, 7); - setState(82); + setState(88); whileStatement(); break; } case RiddleParser::If: { enterOuterAlt(_localctx, 8); - setState(83); + setState(89); ifStatement(); break; } case RiddleParser::Return: { enterOuterAlt(_localctx, 9); - setState(84); + setState(90); returnStatement(); break; } + case RiddleParser::Try: { + enterOuterAlt(_localctx, 10); + setState(91); + tryExpr(); + break; + } + case RiddleParser::True: case RiddleParser::False: case RiddleParser::Null: @@ -714,28 +806,28 @@ RiddleParser::StatementContext* RiddleParser::statement() { case RiddleParser::Binary: case RiddleParser::Float: case RiddleParser::STRING: { - enterOuterAlt(_localctx, 10); - setState(85); + enterOuterAlt(_localctx, 11); + setState(92); expression(0); break; } case RiddleParser::LeftCurly: { - enterOuterAlt(_localctx, 11); - setState(86); + enterOuterAlt(_localctx, 12); + setState(93); match(RiddleParser::LeftCurly); - setState(90); + setState(97); _errHandler->sync(this); _la = _input->LA(1); while ((((_la & ~ 0x3fULL) == 0) && - ((1ULL << _la) & 2377342472556842938) != 0)) { - setState(87); + ((1ULL << _la) & -8937374183483830342) != 0)) { + setState(94); statement_ed(); - setState(92); + setState(99); _errHandler->sync(this); _la = _input->LA(1); } - setState(93); + setState(100); match(RiddleParser::RightCurly); break; } @@ -754,6 +846,81 @@ RiddleParser::StatementContext* RiddleParser::statement() { return _localctx; } +//----------------- BodyExprContext ------------------------------------------------------------------ + +RiddleParser::BodyExprContext::BodyExprContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +std::vector RiddleParser::BodyExprContext::statement_ed() { + return getRuleContexts(); +} + +RiddleParser::Statement_edContext* RiddleParser::BodyExprContext::statement_ed(size_t i) { + return getRuleContext(i); +} + + +size_t RiddleParser::BodyExprContext::getRuleIndex() const { + return RiddleParser::RuleBodyExpr; +} + +void RiddleParser::BodyExprContext::enterRule(tree::ParseTreeListener *listener) { + auto parserListener = dynamic_cast(listener); + if (parserListener != nullptr) + parserListener->enterBodyExpr(this); +} + +void RiddleParser::BodyExprContext::exitRule(tree::ParseTreeListener *listener) { + auto parserListener = dynamic_cast(listener); + if (parserListener != nullptr) + parserListener->exitBodyExpr(this); +} + + +std::any RiddleParser::BodyExprContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitBodyExpr(this); + else + return visitor->visitChildren(this); +} + +RiddleParser::BodyExprContext* RiddleParser::bodyExpr() { + BodyExprContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 8, RiddleParser::RuleBodyExpr); + size_t _la = 0; + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(106); + _errHandler->sync(this); + _la = _input->LA(1); + while ((((_la & ~ 0x3fULL) == 0) && + ((1ULL << _la) & -8937374183483830342) != 0)) { + setState(103); + statement_ed(); + setState(108); + _errHandler->sync(this); + _la = _input->LA(1); + } + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + //----------------- PackStatementContext ------------------------------------------------------------------ RiddleParser::PackStatementContext::PackStatementContext(ParserRuleContext *parent, size_t invokingState) @@ -795,7 +962,7 @@ std::any RiddleParser::PackStatementContext::accept(tree::ParseTreeVisitor *visi RiddleParser::PackStatementContext* RiddleParser::packStatement() { PackStatementContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 6, RiddleParser::RulePackStatement); + enterRule(_localctx, 10, RiddleParser::RulePackStatement); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -806,9 +973,9 @@ RiddleParser::PackStatementContext* RiddleParser::packStatement() { }); try { enterOuterAlt(_localctx, 1); - setState(96); + setState(109); match(RiddleParser::Package); - setState(97); + setState(110); antlrcpp::downCast(_localctx)->packName = id(); } @@ -862,7 +1029,7 @@ std::any RiddleParser::ImportStatementContext::accept(tree::ParseTreeVisitor *vi RiddleParser::ImportStatementContext* RiddleParser::importStatement() { ImportStatementContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 8, RiddleParser::RuleImportStatement); + enterRule(_localctx, 12, RiddleParser::RuleImportStatement); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -873,9 +1040,9 @@ RiddleParser::ImportStatementContext* RiddleParser::importStatement() { }); try { enterOuterAlt(_localctx, 1); - setState(99); + setState(112); match(RiddleParser::Import); - setState(100); + setState(113); antlrcpp::downCast(_localctx)->libName = id(); } @@ -945,7 +1112,7 @@ std::any RiddleParser::VarDefineStatementContext::accept(tree::ParseTreeVisitor RiddleParser::VarDefineStatementContext* RiddleParser::varDefineStatement() { VarDefineStatementContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 10, RiddleParser::RuleVarDefineStatement); + enterRule(_localctx, 14, RiddleParser::RuleVarDefineStatement); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -955,48 +1122,48 @@ RiddleParser::VarDefineStatementContext* RiddleParser::varDefineStatement() { exitRule(); }); try { - setState(117); + setState(130); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 7, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 8, _ctx)) { case 1: { enterOuterAlt(_localctx, 1); - setState(102); + setState(115); match(RiddleParser::Var); - setState(103); + setState(116); antlrcpp::downCast(_localctx)->name = match(RiddleParser::Identifier); - setState(104); + setState(117); match(RiddleParser::Colon); - setState(105); + setState(118); antlrcpp::downCast(_localctx)->type = typeName(0); break; } case 2: { enterOuterAlt(_localctx, 2); - setState(106); + setState(119); match(RiddleParser::Var); - setState(107); + setState(120); antlrcpp::downCast(_localctx)->name = match(RiddleParser::Identifier); - setState(108); + setState(121); match(RiddleParser::Assign); - setState(109); + setState(122); antlrcpp::downCast(_localctx)->value = expression(0); break; } case 3: { enterOuterAlt(_localctx, 3); - setState(110); + setState(123); match(RiddleParser::Var); - setState(111); + setState(124); antlrcpp::downCast(_localctx)->name = match(RiddleParser::Identifier); - setState(112); + setState(125); match(RiddleParser::Colon); - setState(113); + setState(126); antlrcpp::downCast(_localctx)->type = typeName(0); - setState(114); + setState(127); match(RiddleParser::Assign); - setState(115); + setState(128); antlrcpp::downCast(_localctx)->value = expression(0); break; } @@ -1064,7 +1231,7 @@ std::any RiddleParser::ArgsExprContext::accept(tree::ParseTreeVisitor *visitor) RiddleParser::ArgsExprContext* RiddleParser::argsExpr() { ArgsExprContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 12, RiddleParser::RuleArgsExpr); + enterRule(_localctx, 16, RiddleParser::RuleArgsExpr); size_t _la = 0; #if __cplusplus > 201703L @@ -1077,27 +1244,27 @@ RiddleParser::ArgsExprContext* RiddleParser::argsExpr() { try { size_t alt; enterOuterAlt(_localctx, 1); - setState(128); + setState(141); _errHandler->sync(this); _la = _input->LA(1); if ((((_la & ~ 0x3fULL) == 0) && - ((1ULL << _la) & 2376779522301427712) != 0)) { - setState(124); + ((1ULL << _la) & -8939625984507576320) != 0)) { + setState(137); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 8, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 9, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(119); + setState(132); expression(0); - setState(120); + setState(133); match(RiddleParser::Comma); } - setState(126); + setState(139); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 8, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 9, _ctx); } - setState(127); + setState(140); expression(0); } @@ -1176,7 +1343,7 @@ std::any RiddleParser::DefineArgsContext::accept(tree::ParseTreeVisitor *visitor RiddleParser::DefineArgsContext* RiddleParser::defineArgs() { DefineArgsContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 14, RiddleParser::RuleDefineArgs); + enterRule(_localctx, 18, RiddleParser::RuleDefineArgs); size_t _la = 0; #if __cplusplus > 201703L @@ -1189,35 +1356,35 @@ RiddleParser::DefineArgsContext* RiddleParser::defineArgs() { try { size_t alt; enterOuterAlt(_localctx, 1); - setState(143); + setState(156); _errHandler->sync(this); _la = _input->LA(1); if (_la == RiddleParser::Identifier) { - setState(137); + setState(150); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 10, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 11, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(130); + setState(143); match(RiddleParser::Identifier); - setState(131); + setState(144); match(RiddleParser::Colon); - setState(132); + setState(145); typeName(0); - setState(133); + setState(146); match(RiddleParser::Comma); } - setState(139); + setState(152); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 10, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 11, _ctx); } - setState(140); + setState(153); match(RiddleParser::Identifier); - setState(141); + setState(154); match(RiddleParser::Colon); - setState(142); + setState(155); typeName(0); } @@ -1265,8 +1432,8 @@ RiddleParser::DefineArgsContext* RiddleParser::FuncDefineContext::defineArgs() { return getRuleContext(0); } -RiddleParser::FuncBodyContext* RiddleParser::FuncDefineContext::funcBody() { - return getRuleContext(0); +RiddleParser::BodyExprContext* RiddleParser::FuncDefineContext::bodyExpr() { + return getRuleContext(0); } tree::TerminalNode* RiddleParser::FuncDefineContext::Sub() { @@ -1308,7 +1475,7 @@ std::any RiddleParser::FuncDefineContext::accept(tree::ParseTreeVisitor *visitor RiddleParser::FuncDefineContext* RiddleParser::funcDefine() { FuncDefineContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 16, RiddleParser::RuleFuncDefine); + enterRule(_localctx, 20, RiddleParser::RuleFuncDefine); size_t _la = 0; #if __cplusplus > 201703L @@ -1320,33 +1487,33 @@ RiddleParser::FuncDefineContext* RiddleParser::funcDefine() { }); try { enterOuterAlt(_localctx, 1); - setState(145); + setState(158); match(RiddleParser::Func); - setState(146); + setState(159); antlrcpp::downCast(_localctx)->funcName = match(RiddleParser::Identifier); - setState(147); + setState(160); match(RiddleParser::LeftBracket); - setState(148); + setState(161); antlrcpp::downCast(_localctx)->args = defineArgs(); - setState(149); + setState(162); match(RiddleParser::RightBracket); - setState(153); + setState(166); _errHandler->sync(this); _la = _input->LA(1); if (_la == RiddleParser::Sub) { - setState(150); + setState(163); match(RiddleParser::Sub); - setState(151); + setState(164); match(RiddleParser::Greater); - setState(152); + setState(165); antlrcpp::downCast(_localctx)->returnType = typeName(0); } - setState(155); + setState(168); match(RiddleParser::LeftCurly); - setState(156); - antlrcpp::downCast(_localctx)->body = funcBody(); - setState(157); + setState(169); + antlrcpp::downCast(_localctx)->body = bodyExpr(); + setState(170); match(RiddleParser::RightCurly); } @@ -1359,81 +1526,6 @@ RiddleParser::FuncDefineContext* RiddleParser::funcDefine() { return _localctx; } -//----------------- FuncBodyContext ------------------------------------------------------------------ - -RiddleParser::FuncBodyContext::FuncBodyContext(ParserRuleContext *parent, size_t invokingState) - : ParserRuleContext(parent, invokingState) { -} - -std::vector RiddleParser::FuncBodyContext::statement_ed() { - return getRuleContexts(); -} - -RiddleParser::Statement_edContext* RiddleParser::FuncBodyContext::statement_ed(size_t i) { - return getRuleContext(i); -} - - -size_t RiddleParser::FuncBodyContext::getRuleIndex() const { - return RiddleParser::RuleFuncBody; -} - -void RiddleParser::FuncBodyContext::enterRule(tree::ParseTreeListener *listener) { - auto parserListener = dynamic_cast(listener); - if (parserListener != nullptr) - parserListener->enterFuncBody(this); -} - -void RiddleParser::FuncBodyContext::exitRule(tree::ParseTreeListener *listener) { - auto parserListener = dynamic_cast(listener); - if (parserListener != nullptr) - parserListener->exitFuncBody(this); -} - - -std::any RiddleParser::FuncBodyContext::accept(tree::ParseTreeVisitor *visitor) { - if (auto parserVisitor = dynamic_cast(visitor)) - return parserVisitor->visitFuncBody(this); - else - return visitor->visitChildren(this); -} - -RiddleParser::FuncBodyContext* RiddleParser::funcBody() { - FuncBodyContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 18, RiddleParser::RuleFuncBody); - size_t _la = 0; - -#if __cplusplus > 201703L - auto onExit = finally([=, this] { -#else - auto onExit = finally([=] { -#endif - exitRule(); - }); - try { - enterOuterAlt(_localctx, 1); - setState(162); - _errHandler->sync(this); - _la = _input->LA(1); - while ((((_la & ~ 0x3fULL) == 0) && - ((1ULL << _la) & 2377342472556842938) != 0)) { - setState(159); - statement_ed(); - setState(164); - _errHandler->sync(this); - _la = _input->LA(1); - } - - } - catch (RecognitionException &e) { - _errHandler->reportError(this, e); - _localctx->exception = std::current_exception(); - _errHandler->recover(this, _localctx->exception); - } - - return _localctx; -} - //----------------- ForStatementContext ------------------------------------------------------------------ RiddleParser::ForStatementContext::ForStatementContext(ParserRuleContext *parent, size_t invokingState) @@ -1503,7 +1595,7 @@ std::any RiddleParser::ForStatementContext::accept(tree::ParseTreeVisitor *visit RiddleParser::ForStatementContext* RiddleParser::forStatement() { ForStatementContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 20, RiddleParser::RuleForStatement); + enterRule(_localctx, 22, RiddleParser::RuleForStatement); size_t _la = 0; #if __cplusplus > 201703L @@ -1515,43 +1607,43 @@ RiddleParser::ForStatementContext* RiddleParser::forStatement() { }); try { enterOuterAlt(_localctx, 1); - setState(165); + setState(172); match(RiddleParser::For); - setState(166); + setState(173); match(RiddleParser::LeftBracket); - setState(168); + setState(175); _errHandler->sync(this); _la = _input->LA(1); if (_la == RiddleParser::Var) { - setState(167); + setState(174); antlrcpp::downCast(_localctx)->init = varDefineStatement(); } - setState(170); + setState(177); match(RiddleParser::Semi); - setState(172); + setState(179); _errHandler->sync(this); _la = _input->LA(1); if ((((_la & ~ 0x3fULL) == 0) && - ((1ULL << _la) & 2376779522301427712) != 0)) { - setState(171); + ((1ULL << _la) & -8939625984507576320) != 0)) { + setState(178); antlrcpp::downCast(_localctx)->termCond = expression(0); } - setState(174); + setState(181); match(RiddleParser::Semi); - setState(176); + setState(183); _errHandler->sync(this); _la = _input->LA(1); if ((((_la & ~ 0x3fULL) == 0) && - ((1ULL << _la) & 2376779522334986170) != 0)) { - setState(175); + ((1ULL << _la) & -8939625984371257414) != 0)) { + setState(182); antlrcpp::downCast(_localctx)->selfVar = statement(); } - setState(178); + setState(185); match(RiddleParser::RightBracket); - setState(179); + setState(186); antlrcpp::downCast(_localctx)->body = statement_ed(); } @@ -1617,7 +1709,7 @@ std::any RiddleParser::WhileStatementContext::accept(tree::ParseTreeVisitor *vis RiddleParser::WhileStatementContext* RiddleParser::whileStatement() { WhileStatementContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 22, RiddleParser::RuleWhileStatement); + enterRule(_localctx, 24, RiddleParser::RuleWhileStatement); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -1628,15 +1720,15 @@ RiddleParser::WhileStatementContext* RiddleParser::whileStatement() { }); try { enterOuterAlt(_localctx, 1); - setState(181); + setState(188); match(RiddleParser::While); - setState(182); + setState(189); match(RiddleParser::LeftBracket); - setState(183); + setState(190); antlrcpp::downCast(_localctx)->runCond = expression(0); - setState(184); + setState(191); match(RiddleParser::RightBracket); - setState(185); + setState(192); antlrcpp::downCast(_localctx)->body = statement_ed(); } @@ -1710,7 +1802,7 @@ std::any RiddleParser::IfStatementContext::accept(tree::ParseTreeVisitor *visito RiddleParser::IfStatementContext* RiddleParser::ifStatement() { IfStatementContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 24, RiddleParser::RuleIfStatement); + enterRule(_localctx, 26, RiddleParser::RuleIfStatement); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -1720,20 +1812,20 @@ RiddleParser::IfStatementContext* RiddleParser::ifStatement() { exitRule(); }); try { - setState(203); + setState(210); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 17, _ctx)) { case 1: { enterOuterAlt(_localctx, 1); - setState(187); + setState(194); match(RiddleParser::If); - setState(188); + setState(195); match(RiddleParser::LeftBracket); - setState(189); + setState(196); antlrcpp::downCast(_localctx)->cond = expression(0); - setState(190); + setState(197); match(RiddleParser::RightBracket); - setState(191); + setState(198); antlrcpp::downCast(_localctx)->body = statement_ed(); antlrcpp::downCast(_localctx)->hasElse = false; break; @@ -1741,19 +1833,19 @@ RiddleParser::IfStatementContext* RiddleParser::ifStatement() { case 2: { enterOuterAlt(_localctx, 2); - setState(194); + setState(201); match(RiddleParser::If); - setState(195); + setState(202); match(RiddleParser::LeftBracket); - setState(196); + setState(203); antlrcpp::downCast(_localctx)->cond = expression(0); - setState(197); + setState(204); match(RiddleParser::RightBracket); - setState(198); + setState(205); antlrcpp::downCast(_localctx)->body = statement_ed(); - setState(199); + setState(206); match(RiddleParser::Else); - setState(200); + setState(207); antlrcpp::downCast(_localctx)->elseBody = statement_ed(); antlrcpp::downCast(_localctx)->hasElse = true; break; @@ -1814,7 +1906,7 @@ std::any RiddleParser::ReturnStatementContext::accept(tree::ParseTreeVisitor *vi RiddleParser::ReturnStatementContext* RiddleParser::returnStatement() { ReturnStatementContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 26, RiddleParser::RuleReturnStatement); + enterRule(_localctx, 28, RiddleParser::RuleReturnStatement); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -1825,14 +1917,14 @@ RiddleParser::ReturnStatementContext* RiddleParser::returnStatement() { }); try { enterOuterAlt(_localctx, 1); - setState(205); + setState(212); match(RiddleParser::Return); - setState(207); + setState(214); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 18, _ctx)) { case 1: { - setState(206); + setState(213); antlrcpp::downCast(_localctx)->result = statement_ed(); break; } @@ -1873,8 +1965,8 @@ RiddleParser::IdContext* RiddleParser::ClassDefineContext::id() { return getRuleContext(0); } -RiddleParser::ClassBodyContext* RiddleParser::ClassDefineContext::classBody() { - return getRuleContext(0); +RiddleParser::BodyExprContext* RiddleParser::ClassDefineContext::bodyExpr() { + return getRuleContext(0); } @@ -1904,7 +1996,7 @@ std::any RiddleParser::ClassDefineContext::accept(tree::ParseTreeVisitor *visito RiddleParser::ClassDefineContext* RiddleParser::classDefine() { ClassDefineContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 28, RiddleParser::RuleClassDefine); + enterRule(_localctx, 30, RiddleParser::RuleClassDefine); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -1915,15 +2007,15 @@ RiddleParser::ClassDefineContext* RiddleParser::classDefine() { }); try { enterOuterAlt(_localctx, 1); - setState(209); + setState(216); match(RiddleParser::Class); - setState(210); + setState(217); antlrcpp::downCast(_localctx)->className = id(); - setState(211); + setState(218); match(RiddleParser::LeftCurly); - setState(212); - antlrcpp::downCast(_localctx)->body = classBody(); - setState(213); + setState(219); + antlrcpp::downCast(_localctx)->body = bodyExpr(); + setState(220); match(RiddleParser::RightCurly); } @@ -1936,48 +2028,64 @@ RiddleParser::ClassDefineContext* RiddleParser::classDefine() { return _localctx; } -//----------------- ClassBodyContext ------------------------------------------------------------------ +//----------------- TryExprContext ------------------------------------------------------------------ -RiddleParser::ClassBodyContext::ClassBodyContext(ParserRuleContext *parent, size_t invokingState) +RiddleParser::TryExprContext::TryExprContext(ParserRuleContext *parent, size_t invokingState) : ParserRuleContext(parent, invokingState) { } -std::vector RiddleParser::ClassBodyContext::statement_ed() { - return getRuleContexts(); +tree::TerminalNode* RiddleParser::TryExprContext::Try() { + return getToken(RiddleParser::Try, 0); } -RiddleParser::Statement_edContext* RiddleParser::ClassBodyContext::statement_ed(size_t i) { - return getRuleContext(i); +tree::TerminalNode* RiddleParser::TryExprContext::LeftCurly() { + return getToken(RiddleParser::LeftCurly, 0); } +tree::TerminalNode* RiddleParser::TryExprContext::RightCurly() { + return getToken(RiddleParser::RightCurly, 0); +} -size_t RiddleParser::ClassBodyContext::getRuleIndex() const { - return RiddleParser::RuleClassBody; +RiddleParser::CatchExprContext* RiddleParser::TryExprContext::catchExpr() { + return getRuleContext(0); } -void RiddleParser::ClassBodyContext::enterRule(tree::ParseTreeListener *listener) { +RiddleParser::BodyExprContext* RiddleParser::TryExprContext::bodyExpr() { + return getRuleContext(0); +} + +RiddleParser::Null_cntContext* RiddleParser::TryExprContext::null_cnt() { + return getRuleContext(0); +} + + +size_t RiddleParser::TryExprContext::getRuleIndex() const { + return RiddleParser::RuleTryExpr; +} + +void RiddleParser::TryExprContext::enterRule(tree::ParseTreeListener *listener) { auto parserListener = dynamic_cast(listener); if (parserListener != nullptr) - parserListener->enterClassBody(this); + parserListener->enterTryExpr(this); } -void RiddleParser::ClassBodyContext::exitRule(tree::ParseTreeListener *listener) { +void RiddleParser::TryExprContext::exitRule(tree::ParseTreeListener *listener) { auto parserListener = dynamic_cast(listener); if (parserListener != nullptr) - parserListener->exitClassBody(this); + parserListener->exitTryExpr(this); } -std::any RiddleParser::ClassBodyContext::accept(tree::ParseTreeVisitor *visitor) { +std::any RiddleParser::TryExprContext::accept(tree::ParseTreeVisitor *visitor) { if (auto parserVisitor = dynamic_cast(visitor)) - return parserVisitor->visitClassBody(this); + return parserVisitor->visitTryExpr(this); else return visitor->visitChildren(this); } -RiddleParser::ClassBodyContext* RiddleParser::classBody() { - ClassBodyContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 30, RiddleParser::RuleClassBody); +RiddleParser::TryExprContext* RiddleParser::tryExpr() { + TryExprContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 32, RiddleParser::RuleTryExpr); size_t _la = 0; #if __cplusplus > 201703L @@ -1989,17 +2097,105 @@ RiddleParser::ClassBodyContext* RiddleParser::classBody() { }); try { enterOuterAlt(_localctx, 1); - setState(218); + setState(222); + match(RiddleParser::Try); + setState(223); + match(RiddleParser::LeftCurly); + setState(224); + antlrcpp::downCast(_localctx)->tryBody = bodyExpr(); + setState(225); + match(RiddleParser::RightCurly); + setState(227); _errHandler->sync(this); + _la = _input->LA(1); - while ((((_la & ~ 0x3fULL) == 0) && - ((1ULL << _la) & 2377342472556842938) != 0)) { - setState(215); - statement_ed(); - setState(220); - _errHandler->sync(this); - _la = _input->LA(1); + if (_la == RiddleParser::Semi + + || _la == RiddleParser::Endl) { + setState(226); + null_cnt(); } + setState(229); + catchExpr(); + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- CatchExprContext ------------------------------------------------------------------ + +RiddleParser::CatchExprContext::CatchExprContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +tree::TerminalNode* RiddleParser::CatchExprContext::Catch() { + return getToken(RiddleParser::Catch, 0); +} + +tree::TerminalNode* RiddleParser::CatchExprContext::LeftBracket() { + return getToken(RiddleParser::LeftBracket, 0); +} + +RiddleParser::VarDefineStatementContext* RiddleParser::CatchExprContext::varDefineStatement() { + return getRuleContext(0); +} + +tree::TerminalNode* RiddleParser::CatchExprContext::RightBracket() { + return getToken(RiddleParser::RightBracket, 0); +} + + +size_t RiddleParser::CatchExprContext::getRuleIndex() const { + return RiddleParser::RuleCatchExpr; +} + +void RiddleParser::CatchExprContext::enterRule(tree::ParseTreeListener *listener) { + auto parserListener = dynamic_cast(listener); + if (parserListener != nullptr) + parserListener->enterCatchExpr(this); +} + +void RiddleParser::CatchExprContext::exitRule(tree::ParseTreeListener *listener) { + auto parserListener = dynamic_cast(listener); + if (parserListener != nullptr) + parserListener->exitCatchExpr(this); +} + + +std::any RiddleParser::CatchExprContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitCatchExpr(this); + else + return visitor->visitChildren(this); +} + +RiddleParser::CatchExprContext* RiddleParser::catchExpr() { + CatchExprContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 34, RiddleParser::RuleCatchExpr); + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(231); + match(RiddleParser::Catch); + setState(232); + match(RiddleParser::LeftBracket); + setState(233); + varDefineStatement(); + setState(234); + match(RiddleParser::RightBracket); } catch (RecognitionException &e) { @@ -2132,8 +2328,8 @@ RiddleParser::ExprPtrContext* RiddleParser::exprPtr(int precedence) { RiddleParser::ExprPtrContext *_localctx = _tracker.createInstance(_ctx, parentState); RiddleParser::ExprPtrContext *previousContext = _localctx; (void)previousContext; // Silence compiler, in case the context is not used by generated code. - size_t startState = 32; - enterRecursionRule(_localctx, 32, RiddleParser::RuleExprPtr, precedence); + size_t startState = 36; + enterRecursionRule(_localctx, 36, RiddleParser::RuleExprPtr, precedence); @@ -2147,7 +2343,7 @@ RiddleParser::ExprPtrContext* RiddleParser::exprPtr(int precedence) { try { size_t alt; enterOuterAlt(_localctx, 1); - setState(228); + setState(243); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 20, _ctx)) { case 1: { @@ -2155,13 +2351,13 @@ RiddleParser::ExprPtrContext* RiddleParser::exprPtr(int precedence) { _ctx = _localctx; previousContext = _localctx; - setState(222); + setState(237); antlrcpp::downCast(_localctx)->funcName = match(RiddleParser::Identifier); - setState(223); + setState(238); match(RiddleParser::LeftBracket); - setState(224); + setState(239); antlrcpp::downCast(_localctx)->args = argsExpr(); - setState(225); + setState(240); match(RiddleParser::RightBracket); break; } @@ -2170,7 +2366,7 @@ RiddleParser::ExprPtrContext* RiddleParser::exprPtr(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(227); + setState(242); match(RiddleParser::Identifier); break; } @@ -2179,7 +2375,7 @@ RiddleParser::ExprPtrContext* RiddleParser::exprPtr(int precedence) { break; } _ctx->stop = _input->LT(-1); - setState(235); + setState(250); _errHandler->sync(this); alt = getInterpreter()->adaptivePredict(_input, 21, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { @@ -2191,15 +2387,15 @@ RiddleParser::ExprPtrContext* RiddleParser::exprPtr(int precedence) { _localctx = newContext; newContext->parent = previousContext; pushNewRecursionContext(newContext, startState, RuleExprPtr); - setState(230); + setState(245); if (!(precpred(_ctx, 1))) throw FailedPredicateException(this, "precpred(_ctx, 1)"); - setState(231); + setState(246); match(RiddleParser::Dot); - setState(232); + setState(247); antlrcpp::downCast(_localctx)->child = exprPtr(2); } - setState(237); + setState(252); _errHandler->sync(this); alt = getInterpreter()->adaptivePredict(_input, 21, _ctx); } @@ -2249,7 +2445,7 @@ std::any RiddleParser::ExprPtrParserContext::accept(tree::ParseTreeVisitor *visi RiddleParser::ExprPtrParserContext* RiddleParser::exprPtrParser() { ExprPtrParserContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 34, RiddleParser::RuleExprPtrParser); + enterRule(_localctx, 38, RiddleParser::RuleExprPtrParser); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -2260,7 +2456,7 @@ RiddleParser::ExprPtrParserContext* RiddleParser::exprPtrParser() { }); try { enterOuterAlt(_localctx, 1); - setState(238); + setState(253); exprPtr(0); } @@ -3808,8 +4004,8 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { RiddleParser::ExpressionContext *_localctx = _tracker.createInstance(_ctx, parentState); RiddleParser::ExpressionContext *previousContext = _localctx; (void)previousContext; // Silence compiler, in case the context is not used by generated code. - size_t startState = 36; - enterRecursionRule(_localctx, 36, RiddleParser::RuleExpression, precedence); + size_t startState = 40; + enterRecursionRule(_localctx, 40, RiddleParser::RuleExpression, precedence); @@ -3823,7 +4019,7 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { try { size_t alt; enterOuterAlt(_localctx, 1); - setState(341); + setState(356); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 22, _ctx)) { case 1: { @@ -3831,17 +4027,17 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _ctx = _localctx; previousContext = _localctx; - setState(241); + setState(256); match(RiddleParser::Less); - setState(242); + setState(257); antlrcpp::downCast(_localctx)->type = typeName(0); - setState(243); + setState(258); match(RiddleParser::Greater); - setState(244); + setState(259); match(RiddleParser::LeftBracket); - setState(245); + setState(260); antlrcpp::downCast(_localctx)->value = exprPtrParser(); - setState(246); + setState(261); match(RiddleParser::RightBracket); break; } @@ -3850,11 +4046,11 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(248); + setState(263); match(RiddleParser::LeftBracket); - setState(249); + setState(264); antlrcpp::downCast(_localctx)->expr = expression(0); - setState(250); + setState(265); match(RiddleParser::RightBracket); break; } @@ -3863,9 +4059,9 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(252); + setState(267); match(RiddleParser::Not); - setState(253); + setState(268); antlrcpp::downCast(_localctx)->expr = expression(44); break; } @@ -3874,9 +4070,9 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(254); + setState(269); match(RiddleParser::Add); - setState(255); + setState(270); antlrcpp::downCast(_localctx)->expr = expression(43); break; } @@ -3885,9 +4081,9 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(256); + setState(271); match(RiddleParser::Sub); - setState(257); + setState(272); antlrcpp::downCast(_localctx)->expr = expression(42); break; } @@ -3896,11 +4092,11 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(258); + setState(273); match(RiddleParser::Add); - setState(259); + setState(274); match(RiddleParser::Add); - setState(260); + setState(275); antlrcpp::downCast(_localctx)->expr = exprPtrParser(); break; } @@ -3909,11 +4105,11 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(261); + setState(276); antlrcpp::downCast(_localctx)->expr = exprPtrParser(); - setState(262); + setState(277); match(RiddleParser::Add); - setState(263); + setState(278); match(RiddleParser::Add); break; } @@ -3922,11 +4118,11 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(265); + setState(280); match(RiddleParser::Sub); - setState(266); + setState(281); match(RiddleParser::Sub); - setState(267); + setState(282); antlrcpp::downCast(_localctx)->expr = exprPtrParser(); break; } @@ -3935,11 +4131,11 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(268); + setState(283); antlrcpp::downCast(_localctx)->expr = exprPtrParser(); - setState(269); + setState(284); match(RiddleParser::Sub); - setState(270); + setState(285); match(RiddleParser::Sub); break; } @@ -3948,7 +4144,7 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(272); + setState(287); exprPtr(0); break; } @@ -3957,11 +4153,11 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(273); + setState(288); antlrcpp::downCast(_localctx)->left = exprPtrParser(); - setState(274); + setState(289); match(RiddleParser::Assign); - setState(275); + setState(290); antlrcpp::downCast(_localctx)->right = expression(17); break; } @@ -3970,13 +4166,13 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(277); + setState(292); antlrcpp::downCast(_localctx)->left = exprPtrParser(); - setState(278); + setState(293); match(RiddleParser::Add); - setState(279); + setState(294); match(RiddleParser::Assign); - setState(280); + setState(295); antlrcpp::downCast(_localctx)->right = expression(16); break; } @@ -3985,13 +4181,13 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(282); + setState(297); antlrcpp::downCast(_localctx)->left = exprPtrParser(); - setState(283); + setState(298); match(RiddleParser::Sub); - setState(284); + setState(299); match(RiddleParser::Assign); - setState(285); + setState(300); antlrcpp::downCast(_localctx)->right = expression(15); break; } @@ -4000,13 +4196,13 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(287); + setState(302); antlrcpp::downCast(_localctx)->left = exprPtrParser(); - setState(288); + setState(303); match(RiddleParser::Star); - setState(289); + setState(304); match(RiddleParser::Assign); - setState(290); + setState(305); antlrcpp::downCast(_localctx)->right = expression(14); break; } @@ -4015,13 +4211,13 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(292); + setState(307); antlrcpp::downCast(_localctx)->left = exprPtrParser(); - setState(293); + setState(308); match(RiddleParser::Div); - setState(294); + setState(309); match(RiddleParser::Assign); - setState(295); + setState(310); antlrcpp::downCast(_localctx)->right = expression(13); break; } @@ -4030,13 +4226,13 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(297); + setState(312); antlrcpp::downCast(_localctx)->left = exprPtrParser(); - setState(298); + setState(313); match(RiddleParser::Mod); - setState(299); + setState(314); match(RiddleParser::Assign); - setState(300); + setState(315); antlrcpp::downCast(_localctx)->right = expression(12); break; } @@ -4045,13 +4241,13 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(302); + setState(317); antlrcpp::downCast(_localctx)->left = exprPtrParser(); - setState(303); + setState(318); match(RiddleParser::Add); - setState(304); + setState(319); match(RiddleParser::Assign); - setState(305); + setState(320); antlrcpp::downCast(_localctx)->right = expression(11); break; } @@ -4060,13 +4256,13 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(307); + setState(322); antlrcpp::downCast(_localctx)->left = exprPtrParser(); - setState(308); + setState(323); match(RiddleParser::And); - setState(309); + setState(324); match(RiddleParser::Assign); - setState(310); + setState(325); antlrcpp::downCast(_localctx)->right = expression(10); break; } @@ -4075,13 +4271,13 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(312); + setState(327); antlrcpp::downCast(_localctx)->left = exprPtrParser(); - setState(313); + setState(328); match(RiddleParser::Or); - setState(314); + setState(329); match(RiddleParser::Assign); - setState(315); + setState(330); antlrcpp::downCast(_localctx)->right = expression(9); break; } @@ -4090,13 +4286,13 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(317); + setState(332); antlrcpp::downCast(_localctx)->left = exprPtrParser(); - setState(318); + setState(333); match(RiddleParser::Xor); - setState(319); + setState(334); match(RiddleParser::Assign); - setState(320); + setState(335); antlrcpp::downCast(_localctx)->right = expression(8); break; } @@ -4105,13 +4301,13 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(322); + setState(337); antlrcpp::downCast(_localctx)->left = exprPtrParser(); - setState(323); + setState(338); match(RiddleParser::LeftLeft); - setState(324); + setState(339); match(RiddleParser::Assign); - setState(325); + setState(340); antlrcpp::downCast(_localctx)->right = expression(7); break; } @@ -4120,13 +4316,13 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(327); + setState(342); antlrcpp::downCast(_localctx)->left = exprPtrParser(); - setState(328); + setState(343); match(RiddleParser::RightRight); - setState(329); + setState(344); match(RiddleParser::Assign); - setState(330); + setState(345); antlrcpp::downCast(_localctx)->right = expression(6); break; } @@ -4135,13 +4331,13 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(332); + setState(347); antlrcpp::downCast(_localctx)->left = exprPtrParser(); - setState(333); + setState(348); match(RiddleParser::RightRightRight); - setState(334); + setState(349); match(RiddleParser::Assign); - setState(335); + setState(350); antlrcpp::downCast(_localctx)->right = expression(5); break; } @@ -4150,7 +4346,7 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(337); + setState(352); string(); break; } @@ -4159,7 +4355,7 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(338); + setState(353); number(); break; } @@ -4168,7 +4364,7 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(339); + setState(354); boolean(); break; } @@ -4177,7 +4373,7 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(340); + setState(355); match(RiddleParser::Null); break; } @@ -4186,7 +4382,7 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { break; } _ctx->stop = _input->LT(-1); - setState(407); + setState(422); _errHandler->sync(this); alt = getInterpreter()->adaptivePredict(_input, 24, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { @@ -4194,7 +4390,7 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { if (!_parseListeners.empty()) triggerExitRuleEvent(); previousContext = _localctx; - setState(405); + setState(420); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 23, _ctx)) { case 1: { @@ -4202,12 +4398,12 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = newContext; newContext->left = previousContext; pushNewRecursionContext(newContext, startState, RuleExpression); - setState(343); + setState(358); if (!(precpred(_ctx, 36))) throw FailedPredicateException(this, "precpred(_ctx, 36)"); - setState(344); + setState(359); match(RiddleParser::Star); - setState(345); + setState(360); antlrcpp::downCast(_localctx)->right = expression(37); break; } @@ -4217,12 +4413,12 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = newContext; newContext->left = previousContext; pushNewRecursionContext(newContext, startState, RuleExpression); - setState(346); + setState(361); if (!(precpred(_ctx, 35))) throw FailedPredicateException(this, "precpred(_ctx, 35)"); - setState(347); + setState(362); match(RiddleParser::Div); - setState(348); + setState(363); antlrcpp::downCast(_localctx)->right = expression(36); break; } @@ -4232,12 +4428,12 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = newContext; newContext->left = previousContext; pushNewRecursionContext(newContext, startState, RuleExpression); - setState(349); + setState(364); if (!(precpred(_ctx, 34))) throw FailedPredicateException(this, "precpred(_ctx, 34)"); - setState(350); + setState(365); match(RiddleParser::Mod); - setState(351); + setState(366); antlrcpp::downCast(_localctx)->right = expression(35); break; } @@ -4247,12 +4443,12 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = newContext; newContext->left = previousContext; pushNewRecursionContext(newContext, startState, RuleExpression); - setState(352); + setState(367); if (!(precpred(_ctx, 33))) throw FailedPredicateException(this, "precpred(_ctx, 33)"); - setState(353); + setState(368); match(RiddleParser::Add); - setState(354); + setState(369); antlrcpp::downCast(_localctx)->right = expression(34); break; } @@ -4262,12 +4458,12 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = newContext; newContext->left = previousContext; pushNewRecursionContext(newContext, startState, RuleExpression); - setState(355); + setState(370); if (!(precpred(_ctx, 32))) throw FailedPredicateException(this, "precpred(_ctx, 32)"); - setState(356); + setState(371); match(RiddleParser::Sub); - setState(357); + setState(372); antlrcpp::downCast(_localctx)->right = expression(33); break; } @@ -4277,12 +4473,12 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = newContext; newContext->left = previousContext; pushNewRecursionContext(newContext, startState, RuleExpression); - setState(358); + setState(373); if (!(precpred(_ctx, 31))) throw FailedPredicateException(this, "precpred(_ctx, 31)"); - setState(359); + setState(374); match(RiddleParser::LeftLeft); - setState(360); + setState(375); antlrcpp::downCast(_localctx)->right = expression(32); break; } @@ -4292,12 +4488,12 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = newContext; newContext->left = previousContext; pushNewRecursionContext(newContext, startState, RuleExpression); - setState(361); + setState(376); if (!(precpred(_ctx, 30))) throw FailedPredicateException(this, "precpred(_ctx, 30)"); - setState(362); + setState(377); match(RiddleParser::RightRight); - setState(363); + setState(378); antlrcpp::downCast(_localctx)->right = expression(31); break; } @@ -4307,12 +4503,12 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = newContext; newContext->left = previousContext; pushNewRecursionContext(newContext, startState, RuleExpression); - setState(364); + setState(379); if (!(precpred(_ctx, 29))) throw FailedPredicateException(this, "precpred(_ctx, 29)"); - setState(365); + setState(380); match(RiddleParser::RightRightRight); - setState(366); + setState(381); antlrcpp::downCast(_localctx)->right = expression(30); break; } @@ -4322,12 +4518,12 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = newContext; newContext->left = previousContext; pushNewRecursionContext(newContext, startState, RuleExpression); - setState(367); + setState(382); if (!(precpred(_ctx, 28))) throw FailedPredicateException(this, "precpred(_ctx, 28)"); - setState(368); + setState(383); match(RiddleParser::Greater); - setState(369); + setState(384); antlrcpp::downCast(_localctx)->right = expression(29); break; } @@ -4337,12 +4533,12 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = newContext; newContext->left = previousContext; pushNewRecursionContext(newContext, startState, RuleExpression); - setState(370); + setState(385); if (!(precpred(_ctx, 27))) throw FailedPredicateException(this, "precpred(_ctx, 27)"); - setState(371); + setState(386); match(RiddleParser::Less); - setState(372); + setState(387); antlrcpp::downCast(_localctx)->right = expression(28); break; } @@ -4352,14 +4548,14 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = newContext; newContext->left = previousContext; pushNewRecursionContext(newContext, startState, RuleExpression); - setState(373); + setState(388); if (!(precpred(_ctx, 26))) throw FailedPredicateException(this, "precpred(_ctx, 26)"); - setState(374); + setState(389); match(RiddleParser::Greater); - setState(375); + setState(390); match(RiddleParser::Assign); - setState(376); + setState(391); antlrcpp::downCast(_localctx)->right = expression(27); break; } @@ -4369,14 +4565,14 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = newContext; newContext->left = previousContext; pushNewRecursionContext(newContext, startState, RuleExpression); - setState(377); + setState(392); if (!(precpred(_ctx, 25))) throw FailedPredicateException(this, "precpred(_ctx, 25)"); - setState(378); + setState(393); match(RiddleParser::Less); - setState(379); + setState(394); match(RiddleParser::Assign); - setState(380); + setState(395); antlrcpp::downCast(_localctx)->right = expression(26); break; } @@ -4386,12 +4582,12 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = newContext; newContext->left = previousContext; pushNewRecursionContext(newContext, startState, RuleExpression); - setState(381); + setState(396); if (!(precpred(_ctx, 24))) throw FailedPredicateException(this, "precpred(_ctx, 24)"); - setState(382); + setState(397); match(RiddleParser::Equal); - setState(383); + setState(398); antlrcpp::downCast(_localctx)->right = expression(25); break; } @@ -4401,14 +4597,14 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = newContext; newContext->left = previousContext; pushNewRecursionContext(newContext, startState, RuleExpression); - setState(384); + setState(399); if (!(precpred(_ctx, 23))) throw FailedPredicateException(this, "precpred(_ctx, 23)"); - setState(385); + setState(400); match(RiddleParser::Not); - setState(386); + setState(401); match(RiddleParser::Assign); - setState(387); + setState(402); antlrcpp::downCast(_localctx)->right = expression(24); break; } @@ -4418,12 +4614,12 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = newContext; newContext->left = previousContext; pushNewRecursionContext(newContext, startState, RuleExpression); - setState(388); + setState(403); if (!(precpred(_ctx, 22))) throw FailedPredicateException(this, "precpred(_ctx, 22)"); - setState(389); + setState(404); match(RiddleParser::And); - setState(390); + setState(405); antlrcpp::downCast(_localctx)->right = expression(23); break; } @@ -4433,12 +4629,12 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = newContext; newContext->left = previousContext; pushNewRecursionContext(newContext, startState, RuleExpression); - setState(391); + setState(406); if (!(precpred(_ctx, 21))) throw FailedPredicateException(this, "precpred(_ctx, 21)"); - setState(392); + setState(407); match(RiddleParser::Xor); - setState(393); + setState(408); antlrcpp::downCast(_localctx)->right = expression(22); break; } @@ -4448,12 +4644,12 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = newContext; newContext->left = previousContext; pushNewRecursionContext(newContext, startState, RuleExpression); - setState(394); + setState(409); if (!(precpred(_ctx, 20))) throw FailedPredicateException(this, "precpred(_ctx, 20)"); - setState(395); + setState(410); match(RiddleParser::Or); - setState(396); + setState(411); antlrcpp::downCast(_localctx)->right = expression(21); break; } @@ -4463,14 +4659,14 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = newContext; newContext->left = previousContext; pushNewRecursionContext(newContext, startState, RuleExpression); - setState(397); + setState(412); if (!(precpred(_ctx, 19))) throw FailedPredicateException(this, "precpred(_ctx, 19)"); - setState(398); + setState(413); match(RiddleParser::And); - setState(399); + setState(414); match(RiddleParser::And); - setState(400); + setState(415); antlrcpp::downCast(_localctx)->right = expression(20); break; } @@ -4480,14 +4676,14 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { _localctx = newContext; newContext->left = previousContext; pushNewRecursionContext(newContext, startState, RuleExpression); - setState(401); + setState(416); if (!(precpred(_ctx, 18))) throw FailedPredicateException(this, "precpred(_ctx, 18)"); - setState(402); + setState(417); match(RiddleParser::Or); - setState(403); + setState(418); match(RiddleParser::Or); - setState(404); + setState(419); antlrcpp::downCast(_localctx)->right = expression(19); break; } @@ -4496,7 +4692,7 @@ RiddleParser::ExpressionContext* RiddleParser::expression(int precedence) { break; } } - setState(409); + setState(424); _errHandler->sync(this); alt = getInterpreter()->adaptivePredict(_input, 24, _ctx); } @@ -4546,7 +4742,7 @@ std::any RiddleParser::IdContext::accept(tree::ParseTreeVisitor *visitor) { RiddleParser::IdContext* RiddleParser::id() { IdContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 38, RiddleParser::RuleId); + enterRule(_localctx, 42, RiddleParser::RuleId); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -4557,7 +4753,7 @@ RiddleParser::IdContext* RiddleParser::id() { }); try { enterOuterAlt(_localctx, 1); - setState(410); + setState(425); match(RiddleParser::Identifier); } @@ -4611,7 +4807,7 @@ std::any RiddleParser::NumberContext::accept(tree::ParseTreeVisitor *visitor) { RiddleParser::NumberContext* RiddleParser::number() { NumberContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 40, RiddleParser::RuleNumber); + enterRule(_localctx, 44, RiddleParser::RuleNumber); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -4621,7 +4817,7 @@ RiddleParser::NumberContext* RiddleParser::number() { exitRule(); }); try { - setState(414); + setState(429); _errHandler->sync(this); switch (_input->LA(1)) { case RiddleParser::Hexadecimal: @@ -4629,14 +4825,14 @@ RiddleParser::NumberContext* RiddleParser::number() { case RiddleParser::Octal: case RiddleParser::Binary: { enterOuterAlt(_localctx, 1); - setState(412); + setState(427); integer(); break; } case RiddleParser::Float: { enterOuterAlt(_localctx, 2); - setState(413); + setState(428); float_(); break; } @@ -4696,7 +4892,7 @@ std::any RiddleParser::BooleanContext::accept(tree::ParseTreeVisitor *visitor) { RiddleParser::BooleanContext* RiddleParser::boolean() { BooleanContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 42, RiddleParser::RuleBoolean); + enterRule(_localctx, 46, RiddleParser::RuleBoolean); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -4706,12 +4902,12 @@ RiddleParser::BooleanContext* RiddleParser::boolean() { exitRule(); }); try { - setState(420); + setState(435); _errHandler->sync(this); switch (_input->LA(1)) { case RiddleParser::True: { enterOuterAlt(_localctx, 1); - setState(416); + setState(431); match(RiddleParser::True); antlrcpp::downCast(_localctx)->value = true; break; @@ -4719,7 +4915,7 @@ RiddleParser::BooleanContext* RiddleParser::boolean() { case RiddleParser::False: { enterOuterAlt(_localctx, 2); - setState(418); + setState(433); match(RiddleParser::False); antlrcpp::downCast(_localctx)->value = false; break; @@ -4776,7 +4972,7 @@ std::any RiddleParser::StringContext::accept(tree::ParseTreeVisitor *visitor) { RiddleParser::StringContext* RiddleParser::string() { StringContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 44, RiddleParser::RuleString); + enterRule(_localctx, 48, RiddleParser::RuleString); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -4787,7 +4983,7 @@ RiddleParser::StringContext* RiddleParser::string() { }); try { enterOuterAlt(_localctx, 1); - setState(422); + setState(437); match(RiddleParser::STRING); } @@ -4837,7 +5033,7 @@ std::any RiddleParser::FloatContext::accept(tree::ParseTreeVisitor *visitor) { RiddleParser::FloatContext* RiddleParser::float_() { FloatContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 46, RiddleParser::RuleFloat); + enterRule(_localctx, 50, RiddleParser::RuleFloat); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -4848,7 +5044,7 @@ RiddleParser::FloatContext* RiddleParser::float_() { }); try { enterOuterAlt(_localctx, 1); - setState(424); + setState(439); antlrcpp::downCast(_localctx)->floatToken = match(RiddleParser::Float); antlrcpp::downCast(_localctx)->value = stod((antlrcpp::downCast(_localctx)->floatToken != nullptr ? antlrcpp::downCast(_localctx)->floatToken->getText() : "")); @@ -4913,7 +5109,7 @@ std::any RiddleParser::IntegerContext::accept(tree::ParseTreeVisitor *visitor) { RiddleParser::IntegerContext* RiddleParser::integer() { IntegerContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 48, RiddleParser::RuleInteger); + enterRule(_localctx, 52, RiddleParser::RuleInteger); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -4923,12 +5119,12 @@ RiddleParser::IntegerContext* RiddleParser::integer() { exitRule(); }); try { - setState(435); + setState(450); _errHandler->sync(this); switch (_input->LA(1)) { case RiddleParser::Decimal: { enterOuterAlt(_localctx, 1); - setState(427); + setState(442); antlrcpp::downCast(_localctx)->decimalToken = match(RiddleParser::Decimal); antlrcpp::downCast(_localctx)->value = stoi((antlrcpp::downCast(_localctx)->decimalToken != nullptr ? antlrcpp::downCast(_localctx)->decimalToken->getText() : "")); @@ -4938,7 +5134,7 @@ RiddleParser::IntegerContext* RiddleParser::integer() { case RiddleParser::Hexadecimal: { enterOuterAlt(_localctx, 2); - setState(429); + setState(444); antlrcpp::downCast(_localctx)->hexadecimalToken = match(RiddleParser::Hexadecimal); antlrcpp::downCast(_localctx)->value = stoi((antlrcpp::downCast(_localctx)->hexadecimalToken != nullptr ? antlrcpp::downCast(_localctx)->hexadecimalToken->getText() : "").substr(2),nullptr,16); @@ -4948,7 +5144,7 @@ RiddleParser::IntegerContext* RiddleParser::integer() { case RiddleParser::Binary: { enterOuterAlt(_localctx, 3); - setState(431); + setState(446); antlrcpp::downCast(_localctx)->binaryToken = match(RiddleParser::Binary); antlrcpp::downCast(_localctx)->value = stoi((antlrcpp::downCast(_localctx)->binaryToken != nullptr ? antlrcpp::downCast(_localctx)->binaryToken->getText() : "").substr(2),nullptr,2); @@ -4958,7 +5154,7 @@ RiddleParser::IntegerContext* RiddleParser::integer() { case RiddleParser::Octal: { enterOuterAlt(_localctx, 4); - setState(433); + setState(448); antlrcpp::downCast(_localctx)->octalToken = match(RiddleParser::Octal); antlrcpp::downCast(_localctx)->value = stoi((antlrcpp::downCast(_localctx)->octalToken != nullptr ? antlrcpp::downCast(_localctx)->octalToken->getText() : "").substr(1),nullptr,8); @@ -5021,7 +5217,7 @@ std::any RiddleParser::TemplateArgContext::accept(tree::ParseTreeVisitor *visito RiddleParser::TemplateArgContext* RiddleParser::templateArg() { TemplateArgContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 50, RiddleParser::RuleTemplateArg); + enterRule(_localctx, 54, RiddleParser::RuleTemplateArg); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -5031,19 +5227,19 @@ RiddleParser::TemplateArgContext* RiddleParser::templateArg() { exitRule(); }); try { - setState(439); + setState(454); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 28, _ctx)) { case 1: { enterOuterAlt(_localctx, 1); - setState(437); + setState(452); expression(0); break; } case 2: { enterOuterAlt(_localctx, 2); - setState(438); + setState(453); typeName(0); break; } @@ -5111,7 +5307,7 @@ std::any RiddleParser::TemplateArgsContext::accept(tree::ParseTreeVisitor *visit RiddleParser::TemplateArgsContext* RiddleParser::templateArgs() { TemplateArgsContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 52, RiddleParser::RuleTemplateArgs); + enterRule(_localctx, 56, RiddleParser::RuleTemplateArgs); size_t _la = 0; #if __cplusplus > 201703L @@ -5124,27 +5320,27 @@ RiddleParser::TemplateArgsContext* RiddleParser::templateArgs() { try { size_t alt; enterOuterAlt(_localctx, 1); - setState(450); + setState(465); _errHandler->sync(this); _la = _input->LA(1); if ((((_la & ~ 0x3fULL) == 0) && - ((1ULL << _la) & 2376779522301427712) != 0)) { - setState(446); + ((1ULL << _la) & -8939625984507576320) != 0)) { + setState(461); _errHandler->sync(this); alt = getInterpreter()->adaptivePredict(_input, 29, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(441); + setState(456); templateArg(); - setState(442); + setState(457); match(RiddleParser::Comma); } - setState(448); + setState(463); _errHandler->sync(this); alt = getInterpreter()->adaptivePredict(_input, 29, _ctx); } - setState(449); + setState(464); templateArg(); } @@ -5232,8 +5428,8 @@ RiddleParser::TypeNameContext* RiddleParser::typeName(int precedence) { RiddleParser::TypeNameContext *_localctx = _tracker.createInstance(_ctx, parentState); RiddleParser::TypeNameContext *previousContext = _localctx; (void)previousContext; // Silence compiler, in case the context is not used by generated code. - size_t startState = 54; - enterRecursionRule(_localctx, 54, RiddleParser::RuleTypeName, precedence); + size_t startState = 58; + enterRecursionRule(_localctx, 58, RiddleParser::RuleTypeName, precedence); @@ -5247,23 +5443,23 @@ RiddleParser::TypeNameContext* RiddleParser::typeName(int precedence) { try { size_t alt; enterOuterAlt(_localctx, 1); - setState(459); + setState(474); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 31, _ctx)) { case 1: { - setState(453); + setState(468); antlrcpp::downCast(_localctx)->name = id(); break; } case 2: { - setState(454); + setState(469); antlrcpp::downCast(_localctx)->name = id(); - setState(455); + setState(470); match(RiddleParser::Less); - setState(456); + setState(471); antlrcpp::downCast(_localctx)->args = templateArgs(); - setState(457); + setState(472); match(RiddleParser::Greater); break; } @@ -5272,7 +5468,7 @@ RiddleParser::TypeNameContext* RiddleParser::typeName(int precedence) { break; } _ctx->stop = _input->LT(-1); - setState(468); + setState(483); _errHandler->sync(this); alt = getInterpreter()->adaptivePredict(_input, 32, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { @@ -5283,17 +5479,17 @@ RiddleParser::TypeNameContext* RiddleParser::typeName(int precedence) { _localctx = _tracker.createInstance(parentContext, parentState); _localctx->baseType = previousContext; pushNewRecursionContext(_localctx, startState, RuleTypeName); - setState(461); + setState(476); if (!(precpred(_ctx, 1))) throw FailedPredicateException(this, "precpred(_ctx, 1)"); - setState(462); + setState(477); match(RiddleParser::LeftSquare); - setState(463); + setState(478); antlrcpp::downCast(_localctx)->size = expression(0); - setState(464); + setState(479); match(RiddleParser::RightSquare); } - setState(470); + setState(485); _errHandler->sync(this); alt = getInterpreter()->adaptivePredict(_input, 32, _ctx); } @@ -5308,9 +5504,9 @@ RiddleParser::TypeNameContext* RiddleParser::typeName(int precedence) { bool RiddleParser::sempred(RuleContext *context, size_t ruleIndex, size_t predicateIndex) { switch (ruleIndex) { - case 16: return exprPtrSempred(antlrcpp::downCast(context), predicateIndex); - case 18: return expressionSempred(antlrcpp::downCast(context), predicateIndex); - case 27: return typeNameSempred(antlrcpp::downCast(context), predicateIndex); + case 18: return exprPtrSempred(antlrcpp::downCast(context), predicateIndex); + case 20: return expressionSempred(antlrcpp::downCast(context), predicateIndex); + case 29: return typeNameSempred(antlrcpp::downCast(context), predicateIndex); default: break; diff --git a/parser/RiddleParser.h b/parser/RiddleParser.h index 3a85225..07eea95 100644 --- a/parser/RiddleParser.h +++ b/parser/RiddleParser.h @@ -1,5 +1,5 @@ -// Generated from E:/Riddle-Language/RiddleParser.g4 by ANTLR 4.13.1 +// Generated from E:/Riddle-Language/RiddleParser.g4 by ANTLR 4.13.2 #pragma once @@ -15,26 +15,26 @@ class RiddleParser : public antlr4::Parser { Var = 1, Val = 2, For = 3, While = 4, If = 5, Else = 6, Func = 7, Return = 8, Import = 9, Package = 10, Class = 11, Public = 12, Protected = 13, Private = 14, Override = 15, True = 16, False = 17, Static = 18, Const = 19, Null = 20, - LeftBracket = 21, RightBracket = 22, LeftSquare = 23, RightSquare = 24, - LeftCurly = 25, RightCurly = 26, Colon = 27, Semi = 28, Comma = 29, - Equal = 30, Assign = 31, Greater = 32, Less = 33, LeftLeft = 34, RightRight = 35, - RightRightRight = 36, Add = 37, Sub = 38, Star = 39, Div = 40, Mod = 41, - Not = 42, And = 43, Or = 44, Xor = 45, Dot = 46, DoubleQuotes = 47, - Quotes = 48, Endl = 49, Identifier = 50, Hexadecimal = 51, Decimal = 52, - Octal = 53, Binary = 54, Float = 55, IntegerSequence = 56, HEX_DIGIT = 57, - OCTAL_DIGIT = 58, BINARY_DIGIT = 59, DIGIT = 60, STRING = 61, LINE_COMMENT = 62, - BLOCK_COMMENT = 63, WHITESPACE = 64 + Try = 21, Catch = 22, LeftBracket = 23, RightBracket = 24, LeftSquare = 25, + RightSquare = 26, LeftCurly = 27, RightCurly = 28, Colon = 29, Semi = 30, + Comma = 31, Equal = 32, Assign = 33, Greater = 34, Less = 35, LeftLeft = 36, + RightRight = 37, RightRightRight = 38, Add = 39, Sub = 40, Star = 41, + Div = 42, Mod = 43, Not = 44, And = 45, Or = 46, Xor = 47, Dot = 48, + DoubleQuotes = 49, Quotes = 50, Endl = 51, Identifier = 52, Hexadecimal = 53, + Decimal = 54, Octal = 55, Binary = 56, Float = 57, IntegerSequence = 58, + HEX_DIGIT = 59, OCTAL_DIGIT = 60, BINARY_DIGIT = 61, DIGIT = 62, STRING = 63, + LINE_COMMENT = 64, BLOCK_COMMENT = 65, WHITESPACE = 66 }; enum { - RuleProgram = 0, RuleStatement_ed = 1, RuleStatement = 2, RulePackStatement = 3, - RuleImportStatement = 4, RuleVarDefineStatement = 5, RuleArgsExpr = 6, - RuleDefineArgs = 7, RuleFuncDefine = 8, RuleFuncBody = 9, RuleForStatement = 10, - RuleWhileStatement = 11, RuleIfStatement = 12, RuleReturnStatement = 13, - RuleClassDefine = 14, RuleClassBody = 15, RuleExprPtr = 16, RuleExprPtrParser = 17, - RuleExpression = 18, RuleId = 19, RuleNumber = 20, RuleBoolean = 21, - RuleString = 22, RuleFloat = 23, RuleInteger = 24, RuleTemplateArg = 25, - RuleTemplateArgs = 26, RuleTypeName = 27 + RuleNull_cnt = 0, RuleProgram = 1, RuleStatement_ed = 2, RuleStatement = 3, + RuleBodyExpr = 4, RulePackStatement = 5, RuleImportStatement = 6, RuleVarDefineStatement = 7, + RuleArgsExpr = 8, RuleDefineArgs = 9, RuleFuncDefine = 10, RuleForStatement = 11, + RuleWhileStatement = 12, RuleIfStatement = 13, RuleReturnStatement = 14, + RuleClassDefine = 15, RuleTryExpr = 16, RuleCatchExpr = 17, RuleExprPtr = 18, + RuleExprPtrParser = 19, RuleExpression = 20, RuleId = 21, RuleNumber = 22, + RuleBoolean = 23, RuleString = 24, RuleFloat = 25, RuleInteger = 26, + RuleTemplateArg = 27, RuleTemplateArgs = 28, RuleTypeName = 29 }; explicit RiddleParser(antlr4::TokenStream *input); @@ -54,22 +54,24 @@ class RiddleParser : public antlr4::Parser { antlr4::atn::SerializedATNView getSerializedATN() const override; + class Null_cntContext; class ProgramContext; class Statement_edContext; class StatementContext; + class BodyExprContext; class PackStatementContext; class ImportStatementContext; class VarDefineStatementContext; class ArgsExprContext; class DefineArgsContext; class FuncDefineContext; - class FuncBodyContext; class ForStatementContext; class WhileStatementContext; class IfStatementContext; class ReturnStatementContext; class ClassDefineContext; - class ClassBodyContext; + class TryExprContext; + class CatchExprContext; class ExprPtrContext; class ExprPtrParserContext; class ExpressionContext; @@ -83,6 +85,22 @@ class RiddleParser : public antlr4::Parser { class TemplateArgsContext; class TypeNameContext; + class Null_cntContext : public antlr4::ParserRuleContext { + public: + Null_cntContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + antlr4::tree::TerminalNode *Semi(); + antlr4::tree::TerminalNode *Endl(); + + virtual void enterRule(antlr4::tree::ParseTreeListener *listener) override; + virtual void exitRule(antlr4::tree::ParseTreeListener *listener) override; + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + Null_cntContext* null_cnt(); + class ProgramContext : public antlr4::ParserRuleContext { public: ProgramContext(antlr4::ParserRuleContext *parent, size_t invokingState); @@ -130,6 +148,7 @@ class RiddleParser : public antlr4::Parser { WhileStatementContext *whileStatement(); IfStatementContext *ifStatement(); ReturnStatementContext *returnStatement(); + TryExprContext *tryExpr(); ExpressionContext *expression(); antlr4::tree::TerminalNode *LeftCurly(); antlr4::tree::TerminalNode *RightCurly(); @@ -145,6 +164,22 @@ class RiddleParser : public antlr4::Parser { StatementContext* statement(); + class BodyExprContext : public antlr4::ParserRuleContext { + public: + BodyExprContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + std::vector statement_ed(); + Statement_edContext* statement_ed(size_t i); + + virtual void enterRule(antlr4::tree::ParseTreeListener *listener) override; + virtual void exitRule(antlr4::tree::ParseTreeListener *listener) override; + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + BodyExprContext* bodyExpr(); + class PackStatementContext : public antlr4::ParserRuleContext { public: RiddleParser::IdContext *packName = nullptr; @@ -247,7 +282,7 @@ class RiddleParser : public antlr4::Parser { antlr4::Token *funcName = nullptr; RiddleParser::DefineArgsContext *args = nullptr; RiddleParser::TypeNameContext *returnType = nullptr; - RiddleParser::FuncBodyContext *body = nullptr; + RiddleParser::BodyExprContext *body = nullptr; FuncDefineContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *Func(); @@ -257,7 +292,7 @@ class RiddleParser : public antlr4::Parser { antlr4::tree::TerminalNode *RightCurly(); antlr4::tree::TerminalNode *Identifier(); DefineArgsContext *defineArgs(); - FuncBodyContext *funcBody(); + BodyExprContext *bodyExpr(); antlr4::tree::TerminalNode *Sub(); antlr4::tree::TerminalNode *Greater(); TypeNameContext *typeName(); @@ -271,22 +306,6 @@ class RiddleParser : public antlr4::Parser { FuncDefineContext* funcDefine(); - class FuncBodyContext : public antlr4::ParserRuleContext { - public: - FuncBodyContext(antlr4::ParserRuleContext *parent, size_t invokingState); - virtual size_t getRuleIndex() const override; - std::vector statement_ed(); - Statement_edContext* statement_ed(size_t i); - - virtual void enterRule(antlr4::tree::ParseTreeListener *listener) override; - virtual void exitRule(antlr4::tree::ParseTreeListener *listener) override; - - virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; - - }; - - FuncBodyContext* funcBody(); - class ForStatementContext : public antlr4::ParserRuleContext { public: RiddleParser::VarDefineStatementContext *init = nullptr; @@ -380,14 +399,14 @@ class RiddleParser : public antlr4::Parser { class ClassDefineContext : public antlr4::ParserRuleContext { public: RiddleParser::IdContext *className = nullptr; - RiddleParser::ClassBodyContext *body = nullptr; + RiddleParser::BodyExprContext *body = nullptr; ClassDefineContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; antlr4::tree::TerminalNode *Class(); antlr4::tree::TerminalNode *LeftCurly(); antlr4::tree::TerminalNode *RightCurly(); IdContext *id(); - ClassBodyContext *classBody(); + BodyExprContext *bodyExpr(); virtual void enterRule(antlr4::tree::ParseTreeListener *listener) override; virtual void exitRule(antlr4::tree::ParseTreeListener *listener) override; @@ -398,12 +417,35 @@ class RiddleParser : public antlr4::Parser { ClassDefineContext* classDefine(); - class ClassBodyContext : public antlr4::ParserRuleContext { + class TryExprContext : public antlr4::ParserRuleContext { public: - ClassBodyContext(antlr4::ParserRuleContext *parent, size_t invokingState); + RiddleParser::BodyExprContext *tryBody = nullptr; + TryExprContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; - std::vector statement_ed(); - Statement_edContext* statement_ed(size_t i); + antlr4::tree::TerminalNode *Try(); + antlr4::tree::TerminalNode *LeftCurly(); + antlr4::tree::TerminalNode *RightCurly(); + CatchExprContext *catchExpr(); + BodyExprContext *bodyExpr(); + Null_cntContext *null_cnt(); + + virtual void enterRule(antlr4::tree::ParseTreeListener *listener) override; + virtual void exitRule(antlr4::tree::ParseTreeListener *listener) override; + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + TryExprContext* tryExpr(); + + class CatchExprContext : public antlr4::ParserRuleContext { + public: + CatchExprContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + antlr4::tree::TerminalNode *Catch(); + antlr4::tree::TerminalNode *LeftBracket(); + VarDefineStatementContext *varDefineStatement(); + antlr4::tree::TerminalNode *RightBracket(); virtual void enterRule(antlr4::tree::ParseTreeListener *listener) override; virtual void exitRule(antlr4::tree::ParseTreeListener *listener) override; @@ -412,7 +454,7 @@ class RiddleParser : public antlr4::Parser { }; - ClassBodyContext* classBody(); + CatchExprContext* catchExpr(); class ExprPtrContext : public antlr4::ParserRuleContext { public: diff --git a/parser/RiddleParser.interp b/parser/RiddleParser.interp index 15e2224..ace8fb6 100644 --- a/parser/RiddleParser.interp +++ b/parser/RiddleParser.interp @@ -20,6 +20,8 @@ null 'static' 'const' 'null' +'try' +'catch' '(' ')' '[' @@ -87,6 +89,8 @@ False Static Const Null +Try +Catch LeftBracket RightBracket LeftSquare @@ -133,22 +137,24 @@ BLOCK_COMMENT WHITESPACE rule names: +null_cnt program statement_ed statement +bodyExpr packStatement importStatement varDefineStatement argsExpr defineArgs funcDefine -funcBody forStatement whileStatement ifStatement returnStatement classDefine -classBody +tryExpr +catchExpr exprPtr exprPtrParser expression @@ -164,4 +170,4 @@ typeName atn: -[4, 1, 64, 472, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 1, 0, 5, 0, 58, 8, 0, 10, 0, 12, 0, 61, 9, 0, 1, 0, 3, 0, 64, 8, 0, 1, 1, 1, 1, 3, 1, 68, 8, 1, 1, 1, 3, 1, 71, 8, 1, 1, 1, 1, 1, 3, 1, 75, 8, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 5, 2, 89, 8, 2, 10, 2, 12, 2, 92, 9, 2, 1, 2, 3, 2, 95, 8, 2, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 118, 8, 5, 1, 6, 1, 6, 1, 6, 5, 6, 123, 8, 6, 10, 6, 12, 6, 126, 9, 6, 1, 6, 3, 6, 129, 8, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 5, 7, 136, 8, 7, 10, 7, 12, 7, 139, 9, 7, 1, 7, 1, 7, 1, 7, 3, 7, 144, 8, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 154, 8, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 5, 9, 161, 8, 9, 10, 9, 12, 9, 164, 9, 9, 1, 10, 1, 10, 1, 10, 3, 10, 169, 8, 10, 1, 10, 1, 10, 3, 10, 173, 8, 10, 1, 10, 1, 10, 3, 10, 177, 8, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 204, 8, 12, 1, 13, 1, 13, 3, 13, 208, 8, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 5, 15, 217, 8, 15, 10, 15, 12, 15, 220, 9, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 3, 16, 229, 8, 16, 1, 16, 1, 16, 1, 16, 5, 16, 234, 8, 16, 10, 16, 12, 16, 237, 9, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 3, 18, 342, 8, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 5, 18, 406, 8, 18, 10, 18, 12, 18, 409, 9, 18, 1, 19, 1, 19, 1, 20, 1, 20, 3, 20, 415, 8, 20, 1, 21, 1, 21, 1, 21, 1, 21, 3, 21, 421, 8, 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 3, 24, 436, 8, 24, 1, 25, 1, 25, 3, 25, 440, 8, 25, 1, 26, 1, 26, 1, 26, 5, 26, 445, 8, 26, 10, 26, 12, 26, 448, 9, 26, 1, 26, 3, 26, 451, 8, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 3, 27, 460, 8, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 5, 27, 467, 8, 27, 10, 27, 12, 27, 470, 9, 27, 1, 27, 0, 3, 32, 36, 54, 28, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 0, 0, 531, 0, 63, 1, 0, 0, 0, 2, 74, 1, 0, 0, 0, 4, 94, 1, 0, 0, 0, 6, 96, 1, 0, 0, 0, 8, 99, 1, 0, 0, 0, 10, 117, 1, 0, 0, 0, 12, 128, 1, 0, 0, 0, 14, 143, 1, 0, 0, 0, 16, 145, 1, 0, 0, 0, 18, 162, 1, 0, 0, 0, 20, 165, 1, 0, 0, 0, 22, 181, 1, 0, 0, 0, 24, 203, 1, 0, 0, 0, 26, 205, 1, 0, 0, 0, 28, 209, 1, 0, 0, 0, 30, 218, 1, 0, 0, 0, 32, 228, 1, 0, 0, 0, 34, 238, 1, 0, 0, 0, 36, 341, 1, 0, 0, 0, 38, 410, 1, 0, 0, 0, 40, 414, 1, 0, 0, 0, 42, 420, 1, 0, 0, 0, 44, 422, 1, 0, 0, 0, 46, 424, 1, 0, 0, 0, 48, 435, 1, 0, 0, 0, 50, 439, 1, 0, 0, 0, 52, 450, 1, 0, 0, 0, 54, 459, 1, 0, 0, 0, 56, 58, 3, 2, 1, 0, 57, 56, 1, 0, 0, 0, 58, 61, 1, 0, 0, 0, 59, 57, 1, 0, 0, 0, 59, 60, 1, 0, 0, 0, 60, 64, 1, 0, 0, 0, 61, 59, 1, 0, 0, 0, 62, 64, 5, 0, 0, 1, 63, 59, 1, 0, 0, 0, 63, 62, 1, 0, 0, 0, 64, 1, 1, 0, 0, 0, 65, 67, 3, 4, 2, 0, 66, 68, 5, 28, 0, 0, 67, 66, 1, 0, 0, 0, 67, 68, 1, 0, 0, 0, 68, 70, 1, 0, 0, 0, 69, 71, 5, 49, 0, 0, 70, 69, 1, 0, 0, 0, 70, 71, 1, 0, 0, 0, 71, 75, 1, 0, 0, 0, 72, 75, 5, 28, 0, 0, 73, 75, 5, 49, 0, 0, 74, 65, 1, 0, 0, 0, 74, 72, 1, 0, 0, 0, 74, 73, 1, 0, 0, 0, 75, 3, 1, 0, 0, 0, 76, 95, 3, 6, 3, 0, 77, 95, 3, 8, 4, 0, 78, 95, 3, 28, 14, 0, 79, 95, 3, 16, 8, 0, 80, 95, 3, 10, 5, 0, 81, 95, 3, 20, 10, 0, 82, 95, 3, 22, 11, 0, 83, 95, 3, 24, 12, 0, 84, 95, 3, 26, 13, 0, 85, 95, 3, 36, 18, 0, 86, 90, 5, 25, 0, 0, 87, 89, 3, 2, 1, 0, 88, 87, 1, 0, 0, 0, 89, 92, 1, 0, 0, 0, 90, 88, 1, 0, 0, 0, 90, 91, 1, 0, 0, 0, 91, 93, 1, 0, 0, 0, 92, 90, 1, 0, 0, 0, 93, 95, 5, 26, 0, 0, 94, 76, 1, 0, 0, 0, 94, 77, 1, 0, 0, 0, 94, 78, 1, 0, 0, 0, 94, 79, 1, 0, 0, 0, 94, 80, 1, 0, 0, 0, 94, 81, 1, 0, 0, 0, 94, 82, 1, 0, 0, 0, 94, 83, 1, 0, 0, 0, 94, 84, 1, 0, 0, 0, 94, 85, 1, 0, 0, 0, 94, 86, 1, 0, 0, 0, 95, 5, 1, 0, 0, 0, 96, 97, 5, 10, 0, 0, 97, 98, 3, 38, 19, 0, 98, 7, 1, 0, 0, 0, 99, 100, 5, 9, 0, 0, 100, 101, 3, 38, 19, 0, 101, 9, 1, 0, 0, 0, 102, 103, 5, 1, 0, 0, 103, 104, 5, 50, 0, 0, 104, 105, 5, 27, 0, 0, 105, 118, 3, 54, 27, 0, 106, 107, 5, 1, 0, 0, 107, 108, 5, 50, 0, 0, 108, 109, 5, 31, 0, 0, 109, 118, 3, 36, 18, 0, 110, 111, 5, 1, 0, 0, 111, 112, 5, 50, 0, 0, 112, 113, 5, 27, 0, 0, 113, 114, 3, 54, 27, 0, 114, 115, 5, 31, 0, 0, 115, 116, 3, 36, 18, 0, 116, 118, 1, 0, 0, 0, 117, 102, 1, 0, 0, 0, 117, 106, 1, 0, 0, 0, 117, 110, 1, 0, 0, 0, 118, 11, 1, 0, 0, 0, 119, 120, 3, 36, 18, 0, 120, 121, 5, 29, 0, 0, 121, 123, 1, 0, 0, 0, 122, 119, 1, 0, 0, 0, 123, 126, 1, 0, 0, 0, 124, 122, 1, 0, 0, 0, 124, 125, 1, 0, 0, 0, 125, 127, 1, 0, 0, 0, 126, 124, 1, 0, 0, 0, 127, 129, 3, 36, 18, 0, 128, 124, 1, 0, 0, 0, 128, 129, 1, 0, 0, 0, 129, 13, 1, 0, 0, 0, 130, 131, 5, 50, 0, 0, 131, 132, 5, 27, 0, 0, 132, 133, 3, 54, 27, 0, 133, 134, 5, 29, 0, 0, 134, 136, 1, 0, 0, 0, 135, 130, 1, 0, 0, 0, 136, 139, 1, 0, 0, 0, 137, 135, 1, 0, 0, 0, 137, 138, 1, 0, 0, 0, 138, 140, 1, 0, 0, 0, 139, 137, 1, 0, 0, 0, 140, 141, 5, 50, 0, 0, 141, 142, 5, 27, 0, 0, 142, 144, 3, 54, 27, 0, 143, 137, 1, 0, 0, 0, 143, 144, 1, 0, 0, 0, 144, 15, 1, 0, 0, 0, 145, 146, 5, 7, 0, 0, 146, 147, 5, 50, 0, 0, 147, 148, 5, 21, 0, 0, 148, 149, 3, 14, 7, 0, 149, 153, 5, 22, 0, 0, 150, 151, 5, 38, 0, 0, 151, 152, 5, 32, 0, 0, 152, 154, 3, 54, 27, 0, 153, 150, 1, 0, 0, 0, 153, 154, 1, 0, 0, 0, 154, 155, 1, 0, 0, 0, 155, 156, 5, 25, 0, 0, 156, 157, 3, 18, 9, 0, 157, 158, 5, 26, 0, 0, 158, 17, 1, 0, 0, 0, 159, 161, 3, 2, 1, 0, 160, 159, 1, 0, 0, 0, 161, 164, 1, 0, 0, 0, 162, 160, 1, 0, 0, 0, 162, 163, 1, 0, 0, 0, 163, 19, 1, 0, 0, 0, 164, 162, 1, 0, 0, 0, 165, 166, 5, 3, 0, 0, 166, 168, 5, 21, 0, 0, 167, 169, 3, 10, 5, 0, 168, 167, 1, 0, 0, 0, 168, 169, 1, 0, 0, 0, 169, 170, 1, 0, 0, 0, 170, 172, 5, 28, 0, 0, 171, 173, 3, 36, 18, 0, 172, 171, 1, 0, 0, 0, 172, 173, 1, 0, 0, 0, 173, 174, 1, 0, 0, 0, 174, 176, 5, 28, 0, 0, 175, 177, 3, 4, 2, 0, 176, 175, 1, 0, 0, 0, 176, 177, 1, 0, 0, 0, 177, 178, 1, 0, 0, 0, 178, 179, 5, 22, 0, 0, 179, 180, 3, 2, 1, 0, 180, 21, 1, 0, 0, 0, 181, 182, 5, 4, 0, 0, 182, 183, 5, 21, 0, 0, 183, 184, 3, 36, 18, 0, 184, 185, 5, 22, 0, 0, 185, 186, 3, 2, 1, 0, 186, 23, 1, 0, 0, 0, 187, 188, 5, 5, 0, 0, 188, 189, 5, 21, 0, 0, 189, 190, 3, 36, 18, 0, 190, 191, 5, 22, 0, 0, 191, 192, 3, 2, 1, 0, 192, 193, 6, 12, -1, 0, 193, 204, 1, 0, 0, 0, 194, 195, 5, 5, 0, 0, 195, 196, 5, 21, 0, 0, 196, 197, 3, 36, 18, 0, 197, 198, 5, 22, 0, 0, 198, 199, 3, 2, 1, 0, 199, 200, 5, 6, 0, 0, 200, 201, 3, 2, 1, 0, 201, 202, 6, 12, -1, 0, 202, 204, 1, 0, 0, 0, 203, 187, 1, 0, 0, 0, 203, 194, 1, 0, 0, 0, 204, 25, 1, 0, 0, 0, 205, 207, 5, 8, 0, 0, 206, 208, 3, 2, 1, 0, 207, 206, 1, 0, 0, 0, 207, 208, 1, 0, 0, 0, 208, 27, 1, 0, 0, 0, 209, 210, 5, 11, 0, 0, 210, 211, 3, 38, 19, 0, 211, 212, 5, 25, 0, 0, 212, 213, 3, 30, 15, 0, 213, 214, 5, 26, 0, 0, 214, 29, 1, 0, 0, 0, 215, 217, 3, 2, 1, 0, 216, 215, 1, 0, 0, 0, 217, 220, 1, 0, 0, 0, 218, 216, 1, 0, 0, 0, 218, 219, 1, 0, 0, 0, 219, 31, 1, 0, 0, 0, 220, 218, 1, 0, 0, 0, 221, 222, 6, 16, -1, 0, 222, 223, 5, 50, 0, 0, 223, 224, 5, 21, 0, 0, 224, 225, 3, 12, 6, 0, 225, 226, 5, 22, 0, 0, 226, 229, 1, 0, 0, 0, 227, 229, 5, 50, 0, 0, 228, 221, 1, 0, 0, 0, 228, 227, 1, 0, 0, 0, 229, 235, 1, 0, 0, 0, 230, 231, 10, 1, 0, 0, 231, 232, 5, 46, 0, 0, 232, 234, 3, 32, 16, 2, 233, 230, 1, 0, 0, 0, 234, 237, 1, 0, 0, 0, 235, 233, 1, 0, 0, 0, 235, 236, 1, 0, 0, 0, 236, 33, 1, 0, 0, 0, 237, 235, 1, 0, 0, 0, 238, 239, 3, 32, 16, 0, 239, 35, 1, 0, 0, 0, 240, 241, 6, 18, -1, 0, 241, 242, 5, 33, 0, 0, 242, 243, 3, 54, 27, 0, 243, 244, 5, 32, 0, 0, 244, 245, 5, 21, 0, 0, 245, 246, 3, 34, 17, 0, 246, 247, 5, 22, 0, 0, 247, 342, 1, 0, 0, 0, 248, 249, 5, 21, 0, 0, 249, 250, 3, 36, 18, 0, 250, 251, 5, 22, 0, 0, 251, 342, 1, 0, 0, 0, 252, 253, 5, 42, 0, 0, 253, 342, 3, 36, 18, 44, 254, 255, 5, 37, 0, 0, 255, 342, 3, 36, 18, 43, 256, 257, 5, 38, 0, 0, 257, 342, 3, 36, 18, 42, 258, 259, 5, 37, 0, 0, 259, 260, 5, 37, 0, 0, 260, 342, 3, 34, 17, 0, 261, 262, 3, 34, 17, 0, 262, 263, 5, 37, 0, 0, 263, 264, 5, 37, 0, 0, 264, 342, 1, 0, 0, 0, 265, 266, 5, 38, 0, 0, 266, 267, 5, 38, 0, 0, 267, 342, 3, 34, 17, 0, 268, 269, 3, 34, 17, 0, 269, 270, 5, 38, 0, 0, 270, 271, 5, 38, 0, 0, 271, 342, 1, 0, 0, 0, 272, 342, 3, 32, 16, 0, 273, 274, 3, 34, 17, 0, 274, 275, 5, 31, 0, 0, 275, 276, 3, 36, 18, 17, 276, 342, 1, 0, 0, 0, 277, 278, 3, 34, 17, 0, 278, 279, 5, 37, 0, 0, 279, 280, 5, 31, 0, 0, 280, 281, 3, 36, 18, 16, 281, 342, 1, 0, 0, 0, 282, 283, 3, 34, 17, 0, 283, 284, 5, 38, 0, 0, 284, 285, 5, 31, 0, 0, 285, 286, 3, 36, 18, 15, 286, 342, 1, 0, 0, 0, 287, 288, 3, 34, 17, 0, 288, 289, 5, 39, 0, 0, 289, 290, 5, 31, 0, 0, 290, 291, 3, 36, 18, 14, 291, 342, 1, 0, 0, 0, 292, 293, 3, 34, 17, 0, 293, 294, 5, 40, 0, 0, 294, 295, 5, 31, 0, 0, 295, 296, 3, 36, 18, 13, 296, 342, 1, 0, 0, 0, 297, 298, 3, 34, 17, 0, 298, 299, 5, 41, 0, 0, 299, 300, 5, 31, 0, 0, 300, 301, 3, 36, 18, 12, 301, 342, 1, 0, 0, 0, 302, 303, 3, 34, 17, 0, 303, 304, 5, 37, 0, 0, 304, 305, 5, 31, 0, 0, 305, 306, 3, 36, 18, 11, 306, 342, 1, 0, 0, 0, 307, 308, 3, 34, 17, 0, 308, 309, 5, 43, 0, 0, 309, 310, 5, 31, 0, 0, 310, 311, 3, 36, 18, 10, 311, 342, 1, 0, 0, 0, 312, 313, 3, 34, 17, 0, 313, 314, 5, 44, 0, 0, 314, 315, 5, 31, 0, 0, 315, 316, 3, 36, 18, 9, 316, 342, 1, 0, 0, 0, 317, 318, 3, 34, 17, 0, 318, 319, 5, 45, 0, 0, 319, 320, 5, 31, 0, 0, 320, 321, 3, 36, 18, 8, 321, 342, 1, 0, 0, 0, 322, 323, 3, 34, 17, 0, 323, 324, 5, 34, 0, 0, 324, 325, 5, 31, 0, 0, 325, 326, 3, 36, 18, 7, 326, 342, 1, 0, 0, 0, 327, 328, 3, 34, 17, 0, 328, 329, 5, 35, 0, 0, 329, 330, 5, 31, 0, 0, 330, 331, 3, 36, 18, 6, 331, 342, 1, 0, 0, 0, 332, 333, 3, 34, 17, 0, 333, 334, 5, 36, 0, 0, 334, 335, 5, 31, 0, 0, 335, 336, 3, 36, 18, 5, 336, 342, 1, 0, 0, 0, 337, 342, 3, 44, 22, 0, 338, 342, 3, 40, 20, 0, 339, 342, 3, 42, 21, 0, 340, 342, 5, 20, 0, 0, 341, 240, 1, 0, 0, 0, 341, 248, 1, 0, 0, 0, 341, 252, 1, 0, 0, 0, 341, 254, 1, 0, 0, 0, 341, 256, 1, 0, 0, 0, 341, 258, 1, 0, 0, 0, 341, 261, 1, 0, 0, 0, 341, 265, 1, 0, 0, 0, 341, 268, 1, 0, 0, 0, 341, 272, 1, 0, 0, 0, 341, 273, 1, 0, 0, 0, 341, 277, 1, 0, 0, 0, 341, 282, 1, 0, 0, 0, 341, 287, 1, 0, 0, 0, 341, 292, 1, 0, 0, 0, 341, 297, 1, 0, 0, 0, 341, 302, 1, 0, 0, 0, 341, 307, 1, 0, 0, 0, 341, 312, 1, 0, 0, 0, 341, 317, 1, 0, 0, 0, 341, 322, 1, 0, 0, 0, 341, 327, 1, 0, 0, 0, 341, 332, 1, 0, 0, 0, 341, 337, 1, 0, 0, 0, 341, 338, 1, 0, 0, 0, 341, 339, 1, 0, 0, 0, 341, 340, 1, 0, 0, 0, 342, 407, 1, 0, 0, 0, 343, 344, 10, 36, 0, 0, 344, 345, 5, 39, 0, 0, 345, 406, 3, 36, 18, 37, 346, 347, 10, 35, 0, 0, 347, 348, 5, 40, 0, 0, 348, 406, 3, 36, 18, 36, 349, 350, 10, 34, 0, 0, 350, 351, 5, 41, 0, 0, 351, 406, 3, 36, 18, 35, 352, 353, 10, 33, 0, 0, 353, 354, 5, 37, 0, 0, 354, 406, 3, 36, 18, 34, 355, 356, 10, 32, 0, 0, 356, 357, 5, 38, 0, 0, 357, 406, 3, 36, 18, 33, 358, 359, 10, 31, 0, 0, 359, 360, 5, 34, 0, 0, 360, 406, 3, 36, 18, 32, 361, 362, 10, 30, 0, 0, 362, 363, 5, 35, 0, 0, 363, 406, 3, 36, 18, 31, 364, 365, 10, 29, 0, 0, 365, 366, 5, 36, 0, 0, 366, 406, 3, 36, 18, 30, 367, 368, 10, 28, 0, 0, 368, 369, 5, 32, 0, 0, 369, 406, 3, 36, 18, 29, 370, 371, 10, 27, 0, 0, 371, 372, 5, 33, 0, 0, 372, 406, 3, 36, 18, 28, 373, 374, 10, 26, 0, 0, 374, 375, 5, 32, 0, 0, 375, 376, 5, 31, 0, 0, 376, 406, 3, 36, 18, 27, 377, 378, 10, 25, 0, 0, 378, 379, 5, 33, 0, 0, 379, 380, 5, 31, 0, 0, 380, 406, 3, 36, 18, 26, 381, 382, 10, 24, 0, 0, 382, 383, 5, 30, 0, 0, 383, 406, 3, 36, 18, 25, 384, 385, 10, 23, 0, 0, 385, 386, 5, 42, 0, 0, 386, 387, 5, 31, 0, 0, 387, 406, 3, 36, 18, 24, 388, 389, 10, 22, 0, 0, 389, 390, 5, 43, 0, 0, 390, 406, 3, 36, 18, 23, 391, 392, 10, 21, 0, 0, 392, 393, 5, 45, 0, 0, 393, 406, 3, 36, 18, 22, 394, 395, 10, 20, 0, 0, 395, 396, 5, 44, 0, 0, 396, 406, 3, 36, 18, 21, 397, 398, 10, 19, 0, 0, 398, 399, 5, 43, 0, 0, 399, 400, 5, 43, 0, 0, 400, 406, 3, 36, 18, 20, 401, 402, 10, 18, 0, 0, 402, 403, 5, 44, 0, 0, 403, 404, 5, 44, 0, 0, 404, 406, 3, 36, 18, 19, 405, 343, 1, 0, 0, 0, 405, 346, 1, 0, 0, 0, 405, 349, 1, 0, 0, 0, 405, 352, 1, 0, 0, 0, 405, 355, 1, 0, 0, 0, 405, 358, 1, 0, 0, 0, 405, 361, 1, 0, 0, 0, 405, 364, 1, 0, 0, 0, 405, 367, 1, 0, 0, 0, 405, 370, 1, 0, 0, 0, 405, 373, 1, 0, 0, 0, 405, 377, 1, 0, 0, 0, 405, 381, 1, 0, 0, 0, 405, 384, 1, 0, 0, 0, 405, 388, 1, 0, 0, 0, 405, 391, 1, 0, 0, 0, 405, 394, 1, 0, 0, 0, 405, 397, 1, 0, 0, 0, 405, 401, 1, 0, 0, 0, 406, 409, 1, 0, 0, 0, 407, 405, 1, 0, 0, 0, 407, 408, 1, 0, 0, 0, 408, 37, 1, 0, 0, 0, 409, 407, 1, 0, 0, 0, 410, 411, 5, 50, 0, 0, 411, 39, 1, 0, 0, 0, 412, 415, 3, 48, 24, 0, 413, 415, 3, 46, 23, 0, 414, 412, 1, 0, 0, 0, 414, 413, 1, 0, 0, 0, 415, 41, 1, 0, 0, 0, 416, 417, 5, 16, 0, 0, 417, 421, 6, 21, -1, 0, 418, 419, 5, 17, 0, 0, 419, 421, 6, 21, -1, 0, 420, 416, 1, 0, 0, 0, 420, 418, 1, 0, 0, 0, 421, 43, 1, 0, 0, 0, 422, 423, 5, 61, 0, 0, 423, 45, 1, 0, 0, 0, 424, 425, 5, 55, 0, 0, 425, 426, 6, 23, -1, 0, 426, 47, 1, 0, 0, 0, 427, 428, 5, 52, 0, 0, 428, 436, 6, 24, -1, 0, 429, 430, 5, 51, 0, 0, 430, 436, 6, 24, -1, 0, 431, 432, 5, 54, 0, 0, 432, 436, 6, 24, -1, 0, 433, 434, 5, 53, 0, 0, 434, 436, 6, 24, -1, 0, 435, 427, 1, 0, 0, 0, 435, 429, 1, 0, 0, 0, 435, 431, 1, 0, 0, 0, 435, 433, 1, 0, 0, 0, 436, 49, 1, 0, 0, 0, 437, 440, 3, 36, 18, 0, 438, 440, 3, 54, 27, 0, 439, 437, 1, 0, 0, 0, 439, 438, 1, 0, 0, 0, 440, 51, 1, 0, 0, 0, 441, 442, 3, 50, 25, 0, 442, 443, 5, 29, 0, 0, 443, 445, 1, 0, 0, 0, 444, 441, 1, 0, 0, 0, 445, 448, 1, 0, 0, 0, 446, 444, 1, 0, 0, 0, 446, 447, 1, 0, 0, 0, 447, 449, 1, 0, 0, 0, 448, 446, 1, 0, 0, 0, 449, 451, 3, 50, 25, 0, 450, 446, 1, 0, 0, 0, 450, 451, 1, 0, 0, 0, 451, 53, 1, 0, 0, 0, 452, 453, 6, 27, -1, 0, 453, 460, 3, 38, 19, 0, 454, 455, 3, 38, 19, 0, 455, 456, 5, 33, 0, 0, 456, 457, 3, 52, 26, 0, 457, 458, 5, 32, 0, 0, 458, 460, 1, 0, 0, 0, 459, 452, 1, 0, 0, 0, 459, 454, 1, 0, 0, 0, 460, 468, 1, 0, 0, 0, 461, 462, 10, 1, 0, 0, 462, 463, 5, 23, 0, 0, 463, 464, 3, 36, 18, 0, 464, 465, 5, 24, 0, 0, 465, 467, 1, 0, 0, 0, 466, 461, 1, 0, 0, 0, 467, 470, 1, 0, 0, 0, 468, 466, 1, 0, 0, 0, 468, 469, 1, 0, 0, 0, 469, 55, 1, 0, 0, 0, 470, 468, 1, 0, 0, 0, 33, 59, 63, 67, 70, 74, 90, 94, 117, 124, 128, 137, 143, 153, 162, 168, 172, 176, 203, 207, 218, 228, 235, 341, 405, 407, 414, 420, 435, 439, 446, 450, 459, 468] \ No newline at end of file +[4, 1, 66, 487, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 1, 0, 1, 0, 1, 1, 5, 1, 64, 8, 1, 10, 1, 12, 1, 67, 9, 1, 1, 1, 3, 1, 70, 8, 1, 1, 2, 1, 2, 3, 2, 74, 8, 2, 1, 2, 3, 2, 77, 8, 2, 1, 2, 1, 2, 3, 2, 81, 8, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 5, 3, 96, 8, 3, 10, 3, 12, 3, 99, 9, 3, 1, 3, 3, 3, 102, 8, 3, 1, 4, 5, 4, 105, 8, 4, 10, 4, 12, 4, 108, 9, 4, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 3, 7, 131, 8, 7, 1, 8, 1, 8, 1, 8, 5, 8, 136, 8, 8, 10, 8, 12, 8, 139, 9, 8, 1, 8, 3, 8, 142, 8, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 5, 9, 149, 8, 9, 10, 9, 12, 9, 152, 9, 9, 1, 9, 1, 9, 1, 9, 3, 9, 157, 8, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 167, 8, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 3, 11, 176, 8, 11, 1, 11, 1, 11, 3, 11, 180, 8, 11, 1, 11, 1, 11, 3, 11, 184, 8, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 211, 8, 13, 1, 14, 1, 14, 3, 14, 215, 8, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 3, 16, 228, 8, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 3, 18, 244, 8, 18, 1, 18, 1, 18, 1, 18, 5, 18, 249, 8, 18, 10, 18, 12, 18, 252, 9, 18, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 357, 8, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 5, 20, 421, 8, 20, 10, 20, 12, 20, 424, 9, 20, 1, 21, 1, 21, 1, 22, 1, 22, 3, 22, 430, 8, 22, 1, 23, 1, 23, 1, 23, 1, 23, 3, 23, 436, 8, 23, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 3, 26, 451, 8, 26, 1, 27, 1, 27, 3, 27, 455, 8, 27, 1, 28, 1, 28, 1, 28, 5, 28, 460, 8, 28, 10, 28, 12, 28, 463, 9, 28, 1, 28, 3, 28, 466, 8, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 3, 29, 475, 8, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 5, 29, 482, 8, 29, 10, 29, 12, 29, 485, 9, 29, 1, 29, 0, 3, 36, 40, 58, 30, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 0, 1, 2, 0, 30, 30, 51, 51, 545, 0, 60, 1, 0, 0, 0, 2, 69, 1, 0, 0, 0, 4, 80, 1, 0, 0, 0, 6, 101, 1, 0, 0, 0, 8, 106, 1, 0, 0, 0, 10, 109, 1, 0, 0, 0, 12, 112, 1, 0, 0, 0, 14, 130, 1, 0, 0, 0, 16, 141, 1, 0, 0, 0, 18, 156, 1, 0, 0, 0, 20, 158, 1, 0, 0, 0, 22, 172, 1, 0, 0, 0, 24, 188, 1, 0, 0, 0, 26, 210, 1, 0, 0, 0, 28, 212, 1, 0, 0, 0, 30, 216, 1, 0, 0, 0, 32, 222, 1, 0, 0, 0, 34, 231, 1, 0, 0, 0, 36, 243, 1, 0, 0, 0, 38, 253, 1, 0, 0, 0, 40, 356, 1, 0, 0, 0, 42, 425, 1, 0, 0, 0, 44, 429, 1, 0, 0, 0, 46, 435, 1, 0, 0, 0, 48, 437, 1, 0, 0, 0, 50, 439, 1, 0, 0, 0, 52, 450, 1, 0, 0, 0, 54, 454, 1, 0, 0, 0, 56, 465, 1, 0, 0, 0, 58, 474, 1, 0, 0, 0, 60, 61, 7, 0, 0, 0, 61, 1, 1, 0, 0, 0, 62, 64, 3, 4, 2, 0, 63, 62, 1, 0, 0, 0, 64, 67, 1, 0, 0, 0, 65, 63, 1, 0, 0, 0, 65, 66, 1, 0, 0, 0, 66, 70, 1, 0, 0, 0, 67, 65, 1, 0, 0, 0, 68, 70, 5, 0, 0, 1, 69, 65, 1, 0, 0, 0, 69, 68, 1, 0, 0, 0, 70, 3, 1, 0, 0, 0, 71, 73, 3, 6, 3, 0, 72, 74, 5, 30, 0, 0, 73, 72, 1, 0, 0, 0, 73, 74, 1, 0, 0, 0, 74, 76, 1, 0, 0, 0, 75, 77, 5, 51, 0, 0, 76, 75, 1, 0, 0, 0, 76, 77, 1, 0, 0, 0, 77, 81, 1, 0, 0, 0, 78, 81, 5, 30, 0, 0, 79, 81, 5, 51, 0, 0, 80, 71, 1, 0, 0, 0, 80, 78, 1, 0, 0, 0, 80, 79, 1, 0, 0, 0, 81, 5, 1, 0, 0, 0, 82, 102, 3, 10, 5, 0, 83, 102, 3, 12, 6, 0, 84, 102, 3, 30, 15, 0, 85, 102, 3, 20, 10, 0, 86, 102, 3, 14, 7, 0, 87, 102, 3, 22, 11, 0, 88, 102, 3, 24, 12, 0, 89, 102, 3, 26, 13, 0, 90, 102, 3, 28, 14, 0, 91, 102, 3, 32, 16, 0, 92, 102, 3, 40, 20, 0, 93, 97, 5, 27, 0, 0, 94, 96, 3, 4, 2, 0, 95, 94, 1, 0, 0, 0, 96, 99, 1, 0, 0, 0, 97, 95, 1, 0, 0, 0, 97, 98, 1, 0, 0, 0, 98, 100, 1, 0, 0, 0, 99, 97, 1, 0, 0, 0, 100, 102, 5, 28, 0, 0, 101, 82, 1, 0, 0, 0, 101, 83, 1, 0, 0, 0, 101, 84, 1, 0, 0, 0, 101, 85, 1, 0, 0, 0, 101, 86, 1, 0, 0, 0, 101, 87, 1, 0, 0, 0, 101, 88, 1, 0, 0, 0, 101, 89, 1, 0, 0, 0, 101, 90, 1, 0, 0, 0, 101, 91, 1, 0, 0, 0, 101, 92, 1, 0, 0, 0, 101, 93, 1, 0, 0, 0, 102, 7, 1, 0, 0, 0, 103, 105, 3, 4, 2, 0, 104, 103, 1, 0, 0, 0, 105, 108, 1, 0, 0, 0, 106, 104, 1, 0, 0, 0, 106, 107, 1, 0, 0, 0, 107, 9, 1, 0, 0, 0, 108, 106, 1, 0, 0, 0, 109, 110, 5, 10, 0, 0, 110, 111, 3, 42, 21, 0, 111, 11, 1, 0, 0, 0, 112, 113, 5, 9, 0, 0, 113, 114, 3, 42, 21, 0, 114, 13, 1, 0, 0, 0, 115, 116, 5, 1, 0, 0, 116, 117, 5, 52, 0, 0, 117, 118, 5, 29, 0, 0, 118, 131, 3, 58, 29, 0, 119, 120, 5, 1, 0, 0, 120, 121, 5, 52, 0, 0, 121, 122, 5, 33, 0, 0, 122, 131, 3, 40, 20, 0, 123, 124, 5, 1, 0, 0, 124, 125, 5, 52, 0, 0, 125, 126, 5, 29, 0, 0, 126, 127, 3, 58, 29, 0, 127, 128, 5, 33, 0, 0, 128, 129, 3, 40, 20, 0, 129, 131, 1, 0, 0, 0, 130, 115, 1, 0, 0, 0, 130, 119, 1, 0, 0, 0, 130, 123, 1, 0, 0, 0, 131, 15, 1, 0, 0, 0, 132, 133, 3, 40, 20, 0, 133, 134, 5, 31, 0, 0, 134, 136, 1, 0, 0, 0, 135, 132, 1, 0, 0, 0, 136, 139, 1, 0, 0, 0, 137, 135, 1, 0, 0, 0, 137, 138, 1, 0, 0, 0, 138, 140, 1, 0, 0, 0, 139, 137, 1, 0, 0, 0, 140, 142, 3, 40, 20, 0, 141, 137, 1, 0, 0, 0, 141, 142, 1, 0, 0, 0, 142, 17, 1, 0, 0, 0, 143, 144, 5, 52, 0, 0, 144, 145, 5, 29, 0, 0, 145, 146, 3, 58, 29, 0, 146, 147, 5, 31, 0, 0, 147, 149, 1, 0, 0, 0, 148, 143, 1, 0, 0, 0, 149, 152, 1, 0, 0, 0, 150, 148, 1, 0, 0, 0, 150, 151, 1, 0, 0, 0, 151, 153, 1, 0, 0, 0, 152, 150, 1, 0, 0, 0, 153, 154, 5, 52, 0, 0, 154, 155, 5, 29, 0, 0, 155, 157, 3, 58, 29, 0, 156, 150, 1, 0, 0, 0, 156, 157, 1, 0, 0, 0, 157, 19, 1, 0, 0, 0, 158, 159, 5, 7, 0, 0, 159, 160, 5, 52, 0, 0, 160, 161, 5, 23, 0, 0, 161, 162, 3, 18, 9, 0, 162, 166, 5, 24, 0, 0, 163, 164, 5, 40, 0, 0, 164, 165, 5, 34, 0, 0, 165, 167, 3, 58, 29, 0, 166, 163, 1, 0, 0, 0, 166, 167, 1, 0, 0, 0, 167, 168, 1, 0, 0, 0, 168, 169, 5, 27, 0, 0, 169, 170, 3, 8, 4, 0, 170, 171, 5, 28, 0, 0, 171, 21, 1, 0, 0, 0, 172, 173, 5, 3, 0, 0, 173, 175, 5, 23, 0, 0, 174, 176, 3, 14, 7, 0, 175, 174, 1, 0, 0, 0, 175, 176, 1, 0, 0, 0, 176, 177, 1, 0, 0, 0, 177, 179, 5, 30, 0, 0, 178, 180, 3, 40, 20, 0, 179, 178, 1, 0, 0, 0, 179, 180, 1, 0, 0, 0, 180, 181, 1, 0, 0, 0, 181, 183, 5, 30, 0, 0, 182, 184, 3, 6, 3, 0, 183, 182, 1, 0, 0, 0, 183, 184, 1, 0, 0, 0, 184, 185, 1, 0, 0, 0, 185, 186, 5, 24, 0, 0, 186, 187, 3, 4, 2, 0, 187, 23, 1, 0, 0, 0, 188, 189, 5, 4, 0, 0, 189, 190, 5, 23, 0, 0, 190, 191, 3, 40, 20, 0, 191, 192, 5, 24, 0, 0, 192, 193, 3, 4, 2, 0, 193, 25, 1, 0, 0, 0, 194, 195, 5, 5, 0, 0, 195, 196, 5, 23, 0, 0, 196, 197, 3, 40, 20, 0, 197, 198, 5, 24, 0, 0, 198, 199, 3, 4, 2, 0, 199, 200, 6, 13, -1, 0, 200, 211, 1, 0, 0, 0, 201, 202, 5, 5, 0, 0, 202, 203, 5, 23, 0, 0, 203, 204, 3, 40, 20, 0, 204, 205, 5, 24, 0, 0, 205, 206, 3, 4, 2, 0, 206, 207, 5, 6, 0, 0, 207, 208, 3, 4, 2, 0, 208, 209, 6, 13, -1, 0, 209, 211, 1, 0, 0, 0, 210, 194, 1, 0, 0, 0, 210, 201, 1, 0, 0, 0, 211, 27, 1, 0, 0, 0, 212, 214, 5, 8, 0, 0, 213, 215, 3, 4, 2, 0, 214, 213, 1, 0, 0, 0, 214, 215, 1, 0, 0, 0, 215, 29, 1, 0, 0, 0, 216, 217, 5, 11, 0, 0, 217, 218, 3, 42, 21, 0, 218, 219, 5, 27, 0, 0, 219, 220, 3, 8, 4, 0, 220, 221, 5, 28, 0, 0, 221, 31, 1, 0, 0, 0, 222, 223, 5, 21, 0, 0, 223, 224, 5, 27, 0, 0, 224, 225, 3, 8, 4, 0, 225, 227, 5, 28, 0, 0, 226, 228, 3, 0, 0, 0, 227, 226, 1, 0, 0, 0, 227, 228, 1, 0, 0, 0, 228, 229, 1, 0, 0, 0, 229, 230, 3, 34, 17, 0, 230, 33, 1, 0, 0, 0, 231, 232, 5, 22, 0, 0, 232, 233, 5, 23, 0, 0, 233, 234, 3, 14, 7, 0, 234, 235, 5, 24, 0, 0, 235, 35, 1, 0, 0, 0, 236, 237, 6, 18, -1, 0, 237, 238, 5, 52, 0, 0, 238, 239, 5, 23, 0, 0, 239, 240, 3, 16, 8, 0, 240, 241, 5, 24, 0, 0, 241, 244, 1, 0, 0, 0, 242, 244, 5, 52, 0, 0, 243, 236, 1, 0, 0, 0, 243, 242, 1, 0, 0, 0, 244, 250, 1, 0, 0, 0, 245, 246, 10, 1, 0, 0, 246, 247, 5, 48, 0, 0, 247, 249, 3, 36, 18, 2, 248, 245, 1, 0, 0, 0, 249, 252, 1, 0, 0, 0, 250, 248, 1, 0, 0, 0, 250, 251, 1, 0, 0, 0, 251, 37, 1, 0, 0, 0, 252, 250, 1, 0, 0, 0, 253, 254, 3, 36, 18, 0, 254, 39, 1, 0, 0, 0, 255, 256, 6, 20, -1, 0, 256, 257, 5, 35, 0, 0, 257, 258, 3, 58, 29, 0, 258, 259, 5, 34, 0, 0, 259, 260, 5, 23, 0, 0, 260, 261, 3, 38, 19, 0, 261, 262, 5, 24, 0, 0, 262, 357, 1, 0, 0, 0, 263, 264, 5, 23, 0, 0, 264, 265, 3, 40, 20, 0, 265, 266, 5, 24, 0, 0, 266, 357, 1, 0, 0, 0, 267, 268, 5, 44, 0, 0, 268, 357, 3, 40, 20, 44, 269, 270, 5, 39, 0, 0, 270, 357, 3, 40, 20, 43, 271, 272, 5, 40, 0, 0, 272, 357, 3, 40, 20, 42, 273, 274, 5, 39, 0, 0, 274, 275, 5, 39, 0, 0, 275, 357, 3, 38, 19, 0, 276, 277, 3, 38, 19, 0, 277, 278, 5, 39, 0, 0, 278, 279, 5, 39, 0, 0, 279, 357, 1, 0, 0, 0, 280, 281, 5, 40, 0, 0, 281, 282, 5, 40, 0, 0, 282, 357, 3, 38, 19, 0, 283, 284, 3, 38, 19, 0, 284, 285, 5, 40, 0, 0, 285, 286, 5, 40, 0, 0, 286, 357, 1, 0, 0, 0, 287, 357, 3, 36, 18, 0, 288, 289, 3, 38, 19, 0, 289, 290, 5, 33, 0, 0, 290, 291, 3, 40, 20, 17, 291, 357, 1, 0, 0, 0, 292, 293, 3, 38, 19, 0, 293, 294, 5, 39, 0, 0, 294, 295, 5, 33, 0, 0, 295, 296, 3, 40, 20, 16, 296, 357, 1, 0, 0, 0, 297, 298, 3, 38, 19, 0, 298, 299, 5, 40, 0, 0, 299, 300, 5, 33, 0, 0, 300, 301, 3, 40, 20, 15, 301, 357, 1, 0, 0, 0, 302, 303, 3, 38, 19, 0, 303, 304, 5, 41, 0, 0, 304, 305, 5, 33, 0, 0, 305, 306, 3, 40, 20, 14, 306, 357, 1, 0, 0, 0, 307, 308, 3, 38, 19, 0, 308, 309, 5, 42, 0, 0, 309, 310, 5, 33, 0, 0, 310, 311, 3, 40, 20, 13, 311, 357, 1, 0, 0, 0, 312, 313, 3, 38, 19, 0, 313, 314, 5, 43, 0, 0, 314, 315, 5, 33, 0, 0, 315, 316, 3, 40, 20, 12, 316, 357, 1, 0, 0, 0, 317, 318, 3, 38, 19, 0, 318, 319, 5, 39, 0, 0, 319, 320, 5, 33, 0, 0, 320, 321, 3, 40, 20, 11, 321, 357, 1, 0, 0, 0, 322, 323, 3, 38, 19, 0, 323, 324, 5, 45, 0, 0, 324, 325, 5, 33, 0, 0, 325, 326, 3, 40, 20, 10, 326, 357, 1, 0, 0, 0, 327, 328, 3, 38, 19, 0, 328, 329, 5, 46, 0, 0, 329, 330, 5, 33, 0, 0, 330, 331, 3, 40, 20, 9, 331, 357, 1, 0, 0, 0, 332, 333, 3, 38, 19, 0, 333, 334, 5, 47, 0, 0, 334, 335, 5, 33, 0, 0, 335, 336, 3, 40, 20, 8, 336, 357, 1, 0, 0, 0, 337, 338, 3, 38, 19, 0, 338, 339, 5, 36, 0, 0, 339, 340, 5, 33, 0, 0, 340, 341, 3, 40, 20, 7, 341, 357, 1, 0, 0, 0, 342, 343, 3, 38, 19, 0, 343, 344, 5, 37, 0, 0, 344, 345, 5, 33, 0, 0, 345, 346, 3, 40, 20, 6, 346, 357, 1, 0, 0, 0, 347, 348, 3, 38, 19, 0, 348, 349, 5, 38, 0, 0, 349, 350, 5, 33, 0, 0, 350, 351, 3, 40, 20, 5, 351, 357, 1, 0, 0, 0, 352, 357, 3, 48, 24, 0, 353, 357, 3, 44, 22, 0, 354, 357, 3, 46, 23, 0, 355, 357, 5, 20, 0, 0, 356, 255, 1, 0, 0, 0, 356, 263, 1, 0, 0, 0, 356, 267, 1, 0, 0, 0, 356, 269, 1, 0, 0, 0, 356, 271, 1, 0, 0, 0, 356, 273, 1, 0, 0, 0, 356, 276, 1, 0, 0, 0, 356, 280, 1, 0, 0, 0, 356, 283, 1, 0, 0, 0, 356, 287, 1, 0, 0, 0, 356, 288, 1, 0, 0, 0, 356, 292, 1, 0, 0, 0, 356, 297, 1, 0, 0, 0, 356, 302, 1, 0, 0, 0, 356, 307, 1, 0, 0, 0, 356, 312, 1, 0, 0, 0, 356, 317, 1, 0, 0, 0, 356, 322, 1, 0, 0, 0, 356, 327, 1, 0, 0, 0, 356, 332, 1, 0, 0, 0, 356, 337, 1, 0, 0, 0, 356, 342, 1, 0, 0, 0, 356, 347, 1, 0, 0, 0, 356, 352, 1, 0, 0, 0, 356, 353, 1, 0, 0, 0, 356, 354, 1, 0, 0, 0, 356, 355, 1, 0, 0, 0, 357, 422, 1, 0, 0, 0, 358, 359, 10, 36, 0, 0, 359, 360, 5, 41, 0, 0, 360, 421, 3, 40, 20, 37, 361, 362, 10, 35, 0, 0, 362, 363, 5, 42, 0, 0, 363, 421, 3, 40, 20, 36, 364, 365, 10, 34, 0, 0, 365, 366, 5, 43, 0, 0, 366, 421, 3, 40, 20, 35, 367, 368, 10, 33, 0, 0, 368, 369, 5, 39, 0, 0, 369, 421, 3, 40, 20, 34, 370, 371, 10, 32, 0, 0, 371, 372, 5, 40, 0, 0, 372, 421, 3, 40, 20, 33, 373, 374, 10, 31, 0, 0, 374, 375, 5, 36, 0, 0, 375, 421, 3, 40, 20, 32, 376, 377, 10, 30, 0, 0, 377, 378, 5, 37, 0, 0, 378, 421, 3, 40, 20, 31, 379, 380, 10, 29, 0, 0, 380, 381, 5, 38, 0, 0, 381, 421, 3, 40, 20, 30, 382, 383, 10, 28, 0, 0, 383, 384, 5, 34, 0, 0, 384, 421, 3, 40, 20, 29, 385, 386, 10, 27, 0, 0, 386, 387, 5, 35, 0, 0, 387, 421, 3, 40, 20, 28, 388, 389, 10, 26, 0, 0, 389, 390, 5, 34, 0, 0, 390, 391, 5, 33, 0, 0, 391, 421, 3, 40, 20, 27, 392, 393, 10, 25, 0, 0, 393, 394, 5, 35, 0, 0, 394, 395, 5, 33, 0, 0, 395, 421, 3, 40, 20, 26, 396, 397, 10, 24, 0, 0, 397, 398, 5, 32, 0, 0, 398, 421, 3, 40, 20, 25, 399, 400, 10, 23, 0, 0, 400, 401, 5, 44, 0, 0, 401, 402, 5, 33, 0, 0, 402, 421, 3, 40, 20, 24, 403, 404, 10, 22, 0, 0, 404, 405, 5, 45, 0, 0, 405, 421, 3, 40, 20, 23, 406, 407, 10, 21, 0, 0, 407, 408, 5, 47, 0, 0, 408, 421, 3, 40, 20, 22, 409, 410, 10, 20, 0, 0, 410, 411, 5, 46, 0, 0, 411, 421, 3, 40, 20, 21, 412, 413, 10, 19, 0, 0, 413, 414, 5, 45, 0, 0, 414, 415, 5, 45, 0, 0, 415, 421, 3, 40, 20, 20, 416, 417, 10, 18, 0, 0, 417, 418, 5, 46, 0, 0, 418, 419, 5, 46, 0, 0, 419, 421, 3, 40, 20, 19, 420, 358, 1, 0, 0, 0, 420, 361, 1, 0, 0, 0, 420, 364, 1, 0, 0, 0, 420, 367, 1, 0, 0, 0, 420, 370, 1, 0, 0, 0, 420, 373, 1, 0, 0, 0, 420, 376, 1, 0, 0, 0, 420, 379, 1, 0, 0, 0, 420, 382, 1, 0, 0, 0, 420, 385, 1, 0, 0, 0, 420, 388, 1, 0, 0, 0, 420, 392, 1, 0, 0, 0, 420, 396, 1, 0, 0, 0, 420, 399, 1, 0, 0, 0, 420, 403, 1, 0, 0, 0, 420, 406, 1, 0, 0, 0, 420, 409, 1, 0, 0, 0, 420, 412, 1, 0, 0, 0, 420, 416, 1, 0, 0, 0, 421, 424, 1, 0, 0, 0, 422, 420, 1, 0, 0, 0, 422, 423, 1, 0, 0, 0, 423, 41, 1, 0, 0, 0, 424, 422, 1, 0, 0, 0, 425, 426, 5, 52, 0, 0, 426, 43, 1, 0, 0, 0, 427, 430, 3, 52, 26, 0, 428, 430, 3, 50, 25, 0, 429, 427, 1, 0, 0, 0, 429, 428, 1, 0, 0, 0, 430, 45, 1, 0, 0, 0, 431, 432, 5, 16, 0, 0, 432, 436, 6, 23, -1, 0, 433, 434, 5, 17, 0, 0, 434, 436, 6, 23, -1, 0, 435, 431, 1, 0, 0, 0, 435, 433, 1, 0, 0, 0, 436, 47, 1, 0, 0, 0, 437, 438, 5, 63, 0, 0, 438, 49, 1, 0, 0, 0, 439, 440, 5, 57, 0, 0, 440, 441, 6, 25, -1, 0, 441, 51, 1, 0, 0, 0, 442, 443, 5, 54, 0, 0, 443, 451, 6, 26, -1, 0, 444, 445, 5, 53, 0, 0, 445, 451, 6, 26, -1, 0, 446, 447, 5, 56, 0, 0, 447, 451, 6, 26, -1, 0, 448, 449, 5, 55, 0, 0, 449, 451, 6, 26, -1, 0, 450, 442, 1, 0, 0, 0, 450, 444, 1, 0, 0, 0, 450, 446, 1, 0, 0, 0, 450, 448, 1, 0, 0, 0, 451, 53, 1, 0, 0, 0, 452, 455, 3, 40, 20, 0, 453, 455, 3, 58, 29, 0, 454, 452, 1, 0, 0, 0, 454, 453, 1, 0, 0, 0, 455, 55, 1, 0, 0, 0, 456, 457, 3, 54, 27, 0, 457, 458, 5, 31, 0, 0, 458, 460, 1, 0, 0, 0, 459, 456, 1, 0, 0, 0, 460, 463, 1, 0, 0, 0, 461, 459, 1, 0, 0, 0, 461, 462, 1, 0, 0, 0, 462, 464, 1, 0, 0, 0, 463, 461, 1, 0, 0, 0, 464, 466, 3, 54, 27, 0, 465, 461, 1, 0, 0, 0, 465, 466, 1, 0, 0, 0, 466, 57, 1, 0, 0, 0, 467, 468, 6, 29, -1, 0, 468, 475, 3, 42, 21, 0, 469, 470, 3, 42, 21, 0, 470, 471, 5, 35, 0, 0, 471, 472, 3, 56, 28, 0, 472, 473, 5, 34, 0, 0, 473, 475, 1, 0, 0, 0, 474, 467, 1, 0, 0, 0, 474, 469, 1, 0, 0, 0, 475, 483, 1, 0, 0, 0, 476, 477, 10, 1, 0, 0, 477, 478, 5, 25, 0, 0, 478, 479, 3, 40, 20, 0, 479, 480, 5, 26, 0, 0, 480, 482, 1, 0, 0, 0, 481, 476, 1, 0, 0, 0, 482, 485, 1, 0, 0, 0, 483, 481, 1, 0, 0, 0, 483, 484, 1, 0, 0, 0, 484, 59, 1, 0, 0, 0, 485, 483, 1, 0, 0, 0, 33, 65, 69, 73, 76, 80, 97, 101, 106, 130, 137, 141, 150, 156, 166, 175, 179, 183, 210, 214, 227, 243, 250, 356, 420, 422, 429, 435, 450, 454, 461, 465, 474, 483] \ No newline at end of file diff --git a/parser/RiddleParser.tokens b/parser/RiddleParser.tokens index 6482b53..4d6c425 100644 --- a/parser/RiddleParser.tokens +++ b/parser/RiddleParser.tokens @@ -18,50 +18,52 @@ False=17 Static=18 Const=19 Null=20 -LeftBracket=21 -RightBracket=22 -LeftSquare=23 -RightSquare=24 -LeftCurly=25 -RightCurly=26 -Colon=27 -Semi=28 -Comma=29 -Equal=30 -Assign=31 -Greater=32 -Less=33 -LeftLeft=34 -RightRight=35 -RightRightRight=36 -Add=37 -Sub=38 -Star=39 -Div=40 -Mod=41 -Not=42 -And=43 -Or=44 -Xor=45 -Dot=46 -DoubleQuotes=47 -Quotes=48 -Endl=49 -Identifier=50 -Hexadecimal=51 -Decimal=52 -Octal=53 -Binary=54 -Float=55 -IntegerSequence=56 -HEX_DIGIT=57 -OCTAL_DIGIT=58 -BINARY_DIGIT=59 -DIGIT=60 -STRING=61 -LINE_COMMENT=62 -BLOCK_COMMENT=63 -WHITESPACE=64 +Try=21 +Catch=22 +LeftBracket=23 +RightBracket=24 +LeftSquare=25 +RightSquare=26 +LeftCurly=27 +RightCurly=28 +Colon=29 +Semi=30 +Comma=31 +Equal=32 +Assign=33 +Greater=34 +Less=35 +LeftLeft=36 +RightRight=37 +RightRightRight=38 +Add=39 +Sub=40 +Star=41 +Div=42 +Mod=43 +Not=44 +And=45 +Or=46 +Xor=47 +Dot=48 +DoubleQuotes=49 +Quotes=50 +Endl=51 +Identifier=52 +Hexadecimal=53 +Decimal=54 +Octal=55 +Binary=56 +Float=57 +IntegerSequence=58 +HEX_DIGIT=59 +OCTAL_DIGIT=60 +BINARY_DIGIT=61 +DIGIT=62 +STRING=63 +LINE_COMMENT=64 +BLOCK_COMMENT=65 +WHITESPACE=66 'var'=1 'val'=2 'for'=3 @@ -82,32 +84,34 @@ WHITESPACE=64 'static'=18 'const'=19 'null'=20 -'('=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 -'\n'=49 +'try'=21 +'catch'=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 +'\n'=51 diff --git a/parser/RiddleParserBaseListener.cpp b/parser/RiddleParserBaseListener.cpp index bd9390d..22a8502 100644 --- a/parser/RiddleParserBaseListener.cpp +++ b/parser/RiddleParserBaseListener.cpp @@ -1,5 +1,5 @@ -// Generated from E:/Riddle-Language/RiddleParser.g4 by ANTLR 4.13.1 +// Generated from E:/Riddle-Language/RiddleParser.g4 by ANTLR 4.13.2 #include "RiddleParserBaseListener.h" diff --git a/parser/RiddleParserBaseListener.h b/parser/RiddleParserBaseListener.h index 094fae4..4aac2b1 100644 --- a/parser/RiddleParserBaseListener.h +++ b/parser/RiddleParserBaseListener.h @@ -1,5 +1,5 @@ -// Generated from E:/Riddle-Language/RiddleParser.g4 by ANTLR 4.13.1 +// Generated from E:/Riddle-Language/RiddleParser.g4 by ANTLR 4.13.2 #pragma once @@ -16,6 +16,9 @@ class RiddleParserBaseListener : public RiddleParserListener { public: + virtual void enterNull_cnt(RiddleParser::Null_cntContext * /*ctx*/) override { } + virtual void exitNull_cnt(RiddleParser::Null_cntContext * /*ctx*/) override { } + virtual void enterProgram(RiddleParser::ProgramContext * /*ctx*/) override { } virtual void exitProgram(RiddleParser::ProgramContext * /*ctx*/) override { } @@ -25,6 +28,9 @@ class RiddleParserBaseListener : public RiddleParserListener { virtual void enterStatement(RiddleParser::StatementContext * /*ctx*/) override { } virtual void exitStatement(RiddleParser::StatementContext * /*ctx*/) override { } + virtual void enterBodyExpr(RiddleParser::BodyExprContext * /*ctx*/) override { } + virtual void exitBodyExpr(RiddleParser::BodyExprContext * /*ctx*/) override { } + virtual void enterPackStatement(RiddleParser::PackStatementContext * /*ctx*/) override { } virtual void exitPackStatement(RiddleParser::PackStatementContext * /*ctx*/) override { } @@ -43,9 +49,6 @@ class RiddleParserBaseListener : public RiddleParserListener { virtual void enterFuncDefine(RiddleParser::FuncDefineContext * /*ctx*/) override { } virtual void exitFuncDefine(RiddleParser::FuncDefineContext * /*ctx*/) override { } - virtual void enterFuncBody(RiddleParser::FuncBodyContext * /*ctx*/) override { } - virtual void exitFuncBody(RiddleParser::FuncBodyContext * /*ctx*/) override { } - virtual void enterForStatement(RiddleParser::ForStatementContext * /*ctx*/) override { } virtual void exitForStatement(RiddleParser::ForStatementContext * /*ctx*/) override { } @@ -61,8 +64,11 @@ class RiddleParserBaseListener : public RiddleParserListener { virtual void enterClassDefine(RiddleParser::ClassDefineContext * /*ctx*/) override { } virtual void exitClassDefine(RiddleParser::ClassDefineContext * /*ctx*/) override { } - virtual void enterClassBody(RiddleParser::ClassBodyContext * /*ctx*/) override { } - virtual void exitClassBody(RiddleParser::ClassBodyContext * /*ctx*/) override { } + virtual void enterTryExpr(RiddleParser::TryExprContext * /*ctx*/) override { } + virtual void exitTryExpr(RiddleParser::TryExprContext * /*ctx*/) override { } + + virtual void enterCatchExpr(RiddleParser::CatchExprContext * /*ctx*/) override { } + virtual void exitCatchExpr(RiddleParser::CatchExprContext * /*ctx*/) override { } virtual void enterFuncExpr(RiddleParser::FuncExprContext * /*ctx*/) override { } virtual void exitFuncExpr(RiddleParser::FuncExprContext * /*ctx*/) override { } diff --git a/parser/RiddleParserBaseVisitor.cpp b/parser/RiddleParserBaseVisitor.cpp index 41d0e34..f48dff4 100644 --- a/parser/RiddleParserBaseVisitor.cpp +++ b/parser/RiddleParserBaseVisitor.cpp @@ -1,5 +1,5 @@ -// Generated from E:/Riddle-Language/RiddleParser.g4 by ANTLR 4.13.1 +// Generated from E:/Riddle-Language/RiddleParser.g4 by ANTLR 4.13.2 #include "RiddleParserBaseVisitor.h" diff --git a/parser/RiddleParserBaseVisitor.h b/parser/RiddleParserBaseVisitor.h index 33f2d32..7028ff7 100644 --- a/parser/RiddleParserBaseVisitor.h +++ b/parser/RiddleParserBaseVisitor.h @@ -1,5 +1,5 @@ -// Generated from E:/Riddle-Language/RiddleParser.g4 by ANTLR 4.13.1 +// Generated from E:/Riddle-Language/RiddleParser.g4 by ANTLR 4.13.2 #pragma once @@ -15,6 +15,10 @@ class RiddleParserBaseVisitor : public RiddleParserVisitor { public: + virtual std::any visitNull_cnt(RiddleParser::Null_cntContext *ctx) override { + return visitChildren(ctx); + } + virtual std::any visitProgram(RiddleParser::ProgramContext *ctx) override { return visitChildren(ctx); } @@ -27,6 +31,10 @@ class RiddleParserBaseVisitor : public RiddleParserVisitor { return visitChildren(ctx); } + virtual std::any visitBodyExpr(RiddleParser::BodyExprContext *ctx) override { + return visitChildren(ctx); + } + virtual std::any visitPackStatement(RiddleParser::PackStatementContext *ctx) override { return visitChildren(ctx); } @@ -51,10 +59,6 @@ class RiddleParserBaseVisitor : public RiddleParserVisitor { return visitChildren(ctx); } - virtual std::any visitFuncBody(RiddleParser::FuncBodyContext *ctx) override { - return visitChildren(ctx); - } - virtual std::any visitForStatement(RiddleParser::ForStatementContext *ctx) override { return visitChildren(ctx); } @@ -75,7 +79,11 @@ class RiddleParserBaseVisitor : public RiddleParserVisitor { return visitChildren(ctx); } - virtual std::any visitClassBody(RiddleParser::ClassBodyContext *ctx) override { + virtual std::any visitTryExpr(RiddleParser::TryExprContext *ctx) override { + return visitChildren(ctx); + } + + virtual std::any visitCatchExpr(RiddleParser::CatchExprContext *ctx) override { return visitChildren(ctx); } diff --git a/parser/RiddleParserListener.cpp b/parser/RiddleParserListener.cpp index 8c94daa..bf458e3 100644 --- a/parser/RiddleParserListener.cpp +++ b/parser/RiddleParserListener.cpp @@ -1,5 +1,5 @@ -// Generated from E:/Riddle-Language/RiddleParser.g4 by ANTLR 4.13.1 +// Generated from E:/Riddle-Language/RiddleParser.g4 by ANTLR 4.13.2 #include "RiddleParserListener.h" diff --git a/parser/RiddleParserListener.h b/parser/RiddleParserListener.h index 0a3d08e..881bede 100644 --- a/parser/RiddleParserListener.h +++ b/parser/RiddleParserListener.h @@ -1,5 +1,5 @@ -// Generated from E:/Riddle-Language/RiddleParser.g4 by ANTLR 4.13.1 +// Generated from E:/Riddle-Language/RiddleParser.g4 by ANTLR 4.13.2 #pragma once @@ -14,6 +14,9 @@ class RiddleParserListener : public antlr4::tree::ParseTreeListener { public: + virtual void enterNull_cnt(RiddleParser::Null_cntContext *ctx) = 0; + virtual void exitNull_cnt(RiddleParser::Null_cntContext *ctx) = 0; + virtual void enterProgram(RiddleParser::ProgramContext *ctx) = 0; virtual void exitProgram(RiddleParser::ProgramContext *ctx) = 0; @@ -23,6 +26,9 @@ class RiddleParserListener : public antlr4::tree::ParseTreeListener { virtual void enterStatement(RiddleParser::StatementContext *ctx) = 0; virtual void exitStatement(RiddleParser::StatementContext *ctx) = 0; + virtual void enterBodyExpr(RiddleParser::BodyExprContext *ctx) = 0; + virtual void exitBodyExpr(RiddleParser::BodyExprContext *ctx) = 0; + virtual void enterPackStatement(RiddleParser::PackStatementContext *ctx) = 0; virtual void exitPackStatement(RiddleParser::PackStatementContext *ctx) = 0; @@ -41,9 +47,6 @@ class RiddleParserListener : public antlr4::tree::ParseTreeListener { virtual void enterFuncDefine(RiddleParser::FuncDefineContext *ctx) = 0; virtual void exitFuncDefine(RiddleParser::FuncDefineContext *ctx) = 0; - virtual void enterFuncBody(RiddleParser::FuncBodyContext *ctx) = 0; - virtual void exitFuncBody(RiddleParser::FuncBodyContext *ctx) = 0; - virtual void enterForStatement(RiddleParser::ForStatementContext *ctx) = 0; virtual void exitForStatement(RiddleParser::ForStatementContext *ctx) = 0; @@ -59,8 +62,11 @@ class RiddleParserListener : public antlr4::tree::ParseTreeListener { virtual void enterClassDefine(RiddleParser::ClassDefineContext *ctx) = 0; virtual void exitClassDefine(RiddleParser::ClassDefineContext *ctx) = 0; - virtual void enterClassBody(RiddleParser::ClassBodyContext *ctx) = 0; - virtual void exitClassBody(RiddleParser::ClassBodyContext *ctx) = 0; + virtual void enterTryExpr(RiddleParser::TryExprContext *ctx) = 0; + virtual void exitTryExpr(RiddleParser::TryExprContext *ctx) = 0; + + virtual void enterCatchExpr(RiddleParser::CatchExprContext *ctx) = 0; + virtual void exitCatchExpr(RiddleParser::CatchExprContext *ctx) = 0; virtual void enterFuncExpr(RiddleParser::FuncExprContext *ctx) = 0; virtual void exitFuncExpr(RiddleParser::FuncExprContext *ctx) = 0; diff --git a/parser/RiddleParserVisitor.cpp b/parser/RiddleParserVisitor.cpp index 9846ffe..e0403bd 100644 --- a/parser/RiddleParserVisitor.cpp +++ b/parser/RiddleParserVisitor.cpp @@ -1,5 +1,5 @@ -// Generated from E:/Riddle-Language/RiddleParser.g4 by ANTLR 4.13.1 +// Generated from E:/Riddle-Language/RiddleParser.g4 by ANTLR 4.13.2 #include "RiddleParserVisitor.h" diff --git a/parser/RiddleParserVisitor.h b/parser/RiddleParserVisitor.h index 3224674..0b77ac4 100644 --- a/parser/RiddleParserVisitor.h +++ b/parser/RiddleParserVisitor.h @@ -1,5 +1,5 @@ -// Generated from E:/Riddle-Language/RiddleParser.g4 by ANTLR 4.13.1 +// Generated from E:/Riddle-Language/RiddleParser.g4 by ANTLR 4.13.2 #pragma once @@ -19,12 +19,16 @@ class RiddleParserVisitor : public antlr4::tree::AbstractParseTreeVisitor { /** * Visit parse trees produced by RiddleParser. */ + virtual std::any visitNull_cnt(RiddleParser::Null_cntContext *context) = 0; + virtual std::any visitProgram(RiddleParser::ProgramContext *context) = 0; virtual std::any visitStatement_ed(RiddleParser::Statement_edContext *context) = 0; virtual std::any visitStatement(RiddleParser::StatementContext *context) = 0; + virtual std::any visitBodyExpr(RiddleParser::BodyExprContext *context) = 0; + virtual std::any visitPackStatement(RiddleParser::PackStatementContext *context) = 0; virtual std::any visitImportStatement(RiddleParser::ImportStatementContext *context) = 0; @@ -37,9 +41,7 @@ class RiddleParserVisitor : public antlr4::tree::AbstractParseTreeVisitor { virtual std::any visitFuncDefine(RiddleParser::FuncDefineContext *context) = 0; - virtual std::any visitFuncBody(RiddleParser::FuncBodyContext *context) = 0; - - virtual std::any visitForStatement(RiddleParser::ForStatementContext *context) = 0; + virtual std::any visitForStatement(RiddleParser::ForStatementContext *ctx) = 0; virtual std::any visitWhileStatement(RiddleParser::WhileStatementContext *context) = 0; @@ -49,7 +51,9 @@ class RiddleParserVisitor : public antlr4::tree::AbstractParseTreeVisitor { virtual std::any visitClassDefine(RiddleParser::ClassDefineContext *context) = 0; - virtual std::any visitClassBody(RiddleParser::ClassBodyContext *context) = 0; + virtual std::any visitTryExpr(RiddleParser::TryExprContext *context) = 0; + + virtual std::any visitCatchExpr(RiddleParser::CatchExprContext *context) = 0; virtual std::any visitFuncExpr(RiddleParser::FuncExprContext *context) = 0; diff --git a/src/IR/Builder.ixx b/src/IR/Builder.ixx index b6c34a3..3d9ef35 100644 --- a/src/IR/Builder.ixx +++ b/src/IR/Builder.ixx @@ -10,30 +10,31 @@ export namespace Riddle { llvm::IRBuilder<> llvmBuilder; public: - explicit Builder(Context &context): ctx(&context), llvmBuilder(ctx->context) {} + explicit Builder(Context &context): ctx(&context), llvmBuilder(ctx->llvm_context) {} + Context &getContext() const { return *ctx; } // constant /// @brief 获取不同位数的整数类型 /// @param bits 整数类型的位数 /// @return llvm:IntegerTy inline llvm::IntegerType *getIntegerTy(const unsigned bits = 32) const { - return llvm::Type::getIntNTy(ctx->context, bits); + return llvm::Type::getIntNTy(ctx->llvm_context, bits); } /// @brief 获取单浮点类型 inline llvm::Type *getFloatTy() const { - return llvm::Type::getFloatTy(ctx->context); + return llvm::Type::getFloatTy(ctx->llvm_context); } /// @brief 获取双浮点类型 inline llvm::Type *getDoubleTy() const { - return llvm::Type::getDoubleTy(ctx->context); + return llvm::Type::getDoubleTy(ctx->llvm_context); } /// @brief 获取空类型 inline llvm::Type *getVoidTy() const { - return llvm::Type::getVoidTy(ctx->context); + return llvm::Type::getVoidTy(ctx->llvm_context); } /// @brief 获取布尔类型 @@ -52,8 +53,12 @@ export namespace Riddle { } /// @brief 将 int N 类型 转化为 llvm::Constant 类型 - inline llvm::Constant* getIntN(const unsigned long long bits,const long long int) { - return llvmBuilder.getIntN(bits,bits); + inline llvm::Constant *getIntN(const unsigned long long bits, const long long int) { + return llvmBuilder.getIntN(bits, bits); + } + + inline llvm::Constant *getDouble(const double &value) const { + return llvm::ConstantFP::get(llvm::Type::getDoubleTy(ctx->llvm_context), value); } /// @brief 创建一个变量 diff --git a/src/IR/Context.cpp b/src/IR/Context.cpp index f36eb5e..3261cd6 100644 --- a/src/IR/Context.cpp +++ b/src/IR/Context.cpp @@ -1,35 +1,2 @@ module; -#include module IR.Context; - -namespace Riddle { - Variable &VarManager::getVariable(const std::string &name) { - if(!Vars.contains(name) || Vars.find(name)->second.empty()) { - throw std::logic_error("Variable not found"); - } - return *Vars[name].top(); - } - - void VarManager::addVariable(Variable &var) { - if(Defined.top().contains(var.name)) { - throw std::logic_error("Variable already exists"); - } - Defined.top().insert(var.name); - Vars[var.name].push(&var); - } - - void VarManager::push() { - Defined.emplace(); - } - - void VarManager::pop() { - for(const auto &i: Defined.top()) { - Vars[i].pop(); - if(Vars[i].empty()) { - Vars.erase(i); - } - } - Defined.pop(); - } - -}// namespace Riddle \ No newline at end of file diff --git a/src/IR/Context.ixx b/src/IR/Context.ixx index a206301..7fd336b 100644 --- a/src/IR/Context.ixx +++ b/src/IR/Context.ixx @@ -7,45 +7,21 @@ module; export module IR.Context; import Type.Variable; - -namespace Riddle { - class VarManager { - std::unordered_map> Vars; - std::stack> Defined = {}; - - public: - VarManager(): Vars({}) {} - - /// @brief 获取一个变量 - /// @param name 变量名 - /// @return 变量 - Variable &getVariable(const std::string &name); - - /// @brief 添加一个变量 - /// @param var 变量 - void addVariable(Variable &var); - - /// @brief 进入下一个生命周期 - void push(); - - /// @brief 退出当前作用域 - void pop(); - }; -}// namespace Riddle +import Manager.VarManager; export namespace Riddle { class Context { int _deep = 0; public: - llvm::LLVMContext &context; + llvm::LLVMContext &llvm_context; llvm::Module module; VarManager varManager; - explicit Context(llvm::LLVMContext &context): context(context), module("", context) {} + explicit Context(llvm::LLVMContext &context): llvm_context(context), module("", context) {} - inline void addVariable(Variable var) { - varManager.addVariable(var); + inline void addVariable(const Variable &var) { + varManager.addVar(var); } inline void push() { diff --git a/src/IR/ParserStmt.ixx b/src/IR/ParserStmt.ixx new file mode 100644 index 0000000..bb8f590 --- /dev/null +++ b/src/IR/ParserStmt.ixx @@ -0,0 +1,60 @@ +module; +#include +#include +#include +export module IR.ParserStmt; +import Types.Statements; +import Manager.ClassManager; +import Manager.VarManager; +import IR.Context; +import IR.Builder; +export namespace Riddle { + class ParserStmt { + Builder builder; + ClassManager classManager; + VarManager varManager; + + public: + ParserStmt(Context &ctx): classManager(ctx.llvm_context), builder(ctx) {} + + std::any accept(BaseStmt *stmt) { + if(stmt->getStmtTypeID() == BaseStmt::StmtTypeID::ProgramStmtID) { + Program(static_cast(stmt)); + return nullptr; + } else if(stmt->getStmtTypeID() == BaseStmt::StmtTypeID::IntegerStmtID) { + return Integer(static_cast(stmt)); + } else if(stmt->getStmtTypeID() == BaseStmt::StmtTypeID::DoubleStmtID) { + return Double(static_cast(stmt)); + } else if(stmt->getStmtTypeID() == BaseStmt::StmtTypeID::ObjStmtID) { + return Object(static_cast(stmt)); + } + return nullptr; + } + + llvm::Value *Integer(const IntegerStmt *stmt) { + return builder.getInt32(stmt->getValue()); + } + + llvm::Value *Double(const DoubleStmt *stmt) const { + return builder.getDouble(stmt->getValue()); + } + + void Program(ProgramStmt *stmt) { + for(const auto i: stmt->body) { + accept(i); + } + } + + llvm::Value *VarDefine(const VarDefineStmt *stmt) { + llvm::Type *type = classManager.getType(stmt->getType()); + const auto value = std::any_cast(accept(stmt->getValue())); + const std::string name = stmt->getName(); + return builder.createVariable(type, value, name); + } + + llvm::Value *Object(const ObjectStmt *stmt) { + const std::string name = stmt->getName(); + return varManager.getVar(name).var; + } + }; +}// namespace Riddle \ No newline at end of file diff --git a/src/Tools/Managers/ClassManager.cpp b/src/Tools/Managers/ClassManager.cpp index 93bfcaa..4767d90 100644 --- a/src/Tools/Managers/ClassManager.cpp +++ b/src/Tools/Managers/ClassManager.cpp @@ -1,5 +1,8 @@ module; +#include +#include #include +#include module Manager.ClassManager; namespace Riddle { @@ -10,6 +13,18 @@ namespace Riddle { } return Classes.find(name)->second; } + llvm::Type *ClassManager::getType(const std::string &name) { + std::unordered_map baseType = { + {"int", llvm::Type::getInt32Ty(Context)}, + {"double", llvm::Type::getDoubleTy(Context)}, + {"float", llvm::Type::getFloatTy(Context)}, + {"bool", llvm::Type::getInt1Ty(Context)}, + {"char", llvm::Type::getInt8Ty(Context)}}; + if(baseType.contains(name)) { + return baseType.find(name)->second; + } + return getClass(name).theClass->types; + } void ClassManager::createClass(const ClassNode &theClass) { Classes.emplace(theClass.get().types->getName().str(), theClass); diff --git a/src/Tools/Managers/ClassManger.ixx b/src/Tools/Managers/ClassManger.ixx index 5ac1c44..8e47961 100644 --- a/src/Tools/Managers/ClassManger.ixx +++ b/src/Tools/Managers/ClassManger.ixx @@ -1,5 +1,7 @@ module; -#include +#include +#include +#include export module Manager.ClassManager; import Types.Class; import Types.ClassNode; @@ -9,10 +11,11 @@ export namespace Riddle { class ClassManager { /// @brief 存储数据字段 std::unordered_map Classes; - + llvm::LLVMContext &Context; public: + explicit ClassManager(llvm::LLVMContext &context) : Context(context) {} ClassNode getClass(const std::string &name); - + llvm::Type* getType(const std::string &name); // class 在进入该函数后则不可修改 void createClass(const ClassNode &theClass); }; diff --git a/src/Tools/Managers/StmtManager.ixx b/src/Tools/Managers/StmtManager.ixx index 788f9f2..7c57e58 100644 --- a/src/Tools/Managers/StmtManager.ixx +++ b/src/Tools/Managers/StmtManager.ixx @@ -50,5 +50,15 @@ export namespace Riddle { stmts.push_back(ptr); return ptr; } + WhileStmt *getWhile(BaseStmt *condition, BaseStmt *body) { + const auto ptr = new WhileStmt(condition, body); + stmts.push_back(ptr); + return ptr; + } + ForStmt *getFor(BaseStmt *init, BaseStmt *condition, BaseStmt *changed, BaseStmt *body) { + const auto ptr = new ForStmt(init, condition, changed, body); + stmts.push_back(ptr); + return ptr; + } }; }// namespace Riddle \ No newline at end of file diff --git a/src/Tools/Managers/VarManager.cpp b/src/Tools/Managers/VarManager.cpp index 3bfaa05..462e8d4 100644 --- a/src/Tools/Managers/VarManager.cpp +++ b/src/Tools/Managers/VarManager.cpp @@ -1,6 +1,7 @@ module; -#include #include +#include +#include module Manager.VarManager; namespace Riddle { @@ -14,7 +15,7 @@ namespace Riddle { Defined.emplace(); } void VarManager::pop() { - for(auto [name, iDefined]: Defined.top()) { + for(const auto& name: Defined.top() | std::views::keys) { NamedVar[name].pop(); if(NamedVar[name].empty()) { NamedVar.erase(name); @@ -29,6 +30,10 @@ namespace Riddle { NamedVar[name].push(Variable(name, value, isConst)); Defined.top()[name] = true; } + void VarManager::addVar(const Variable &var) { + NamedVar[var.name].push(var); + Defined.top()[var.name] = true; + } Variable VarManager::getVar(const std::string &name) { return NamedVar[name].top(); } diff --git a/src/Tools/Managers/VarManager.ixx b/src/Tools/Managers/VarManager.ixx index 1acb92e..eb5d723 100644 --- a/src/Tools/Managers/VarManager.ixx +++ b/src/Tools/Managers/VarManager.ixx @@ -26,6 +26,7 @@ export namespace Riddle { /// @param isConst 是否不变 /// @param value 指某个局部变量的地址 void defineVar(const std::string &name, const bool &isConst, llvm::Value *value = nullptr); + void addVar(const Variable &var); /// @brief 获取一个变量的属性 /// @param name 变量名 /// @returns 变量的属性 diff --git a/src/Types/Statements.ixx b/src/Types/Statements.ixx index 7b750ea..a7e123b 100644 --- a/src/Types/Statements.ixx +++ b/src/Types/Statements.ixx @@ -8,6 +8,7 @@ export namespace Riddle { public: /// 用于标识语句类型 enum class StmtTypeID { + ProgramStmtID, VarDefineStmtID, // 变量定义 FuncDefineStmtID,// 函数定义 ForStmtID, // for 循环 @@ -43,11 +44,17 @@ export namespace Riddle { return false; } - [[nodiscard]] inline StmtTypeID getTypeID() const { + [[nodiscard]] inline StmtTypeID getStmtTypeID() const { return StmtID; } }; + class ProgramStmt final : public BaseStmt { + public: + std::vector body; + explicit ProgramStmt(std::vector body): body{std::move(body)} {} + }; + /// @brief 是多个语句的组合 class BlockStmt final : public BaseStmt { public: @@ -157,15 +164,11 @@ export namespace Riddle { public: FuncDefineStmt(std::string func_name, std::string return_type, - std::vector args = {}, - BaseStmt *body = nullptr): BaseStmt(StmtTypeID::FuncDefineStmtID), - func_name(std::move(func_name)), - return_type(std::move(return_type)), - args(std::move(args)), body(body) {} - /// 设置函数体 - void setBodyStmts(BaseStmt *stmts) { - body = stmts; - } + BaseStmt *body, + std::vector args = {}): BaseStmt(StmtTypeID::FuncDefineStmtID), + func_name(std::move(func_name)), + return_type(std::move(return_type)), + args(std::move(args)), body(body) {} [[nodiscard]] inline std::string getFuncName() const { return func_name; } [[nodiscard]] inline std::string getReturnType() const { return return_type; } @@ -185,13 +188,8 @@ export namespace Riddle { ForStmt(BaseStmt *init, BaseStmt *cond, BaseStmt *self_change, - BaseStmt *body = nullptr): BaseStmt(StmtTypeID::ForStmtID), init(init), condition(cond), - self_change(self_change), body(body) {} - - /// 设置循环体 - void setBodyStmt(BaseStmt *stmt) { - body = stmt; - } + BaseStmt *body): BaseStmt(StmtTypeID::ForStmtID), init(init), condition(cond), + self_change(self_change), body(body) {} [[nodiscard]] inline BaseStmt *getInit() const { return init; } [[nodiscard]] inline BaseStmt *getCondition() const { return condition; } @@ -212,9 +210,45 @@ export namespace Riddle { body = stmt; } - [[nodiscard]] inline BaseStmt* getCondition() const { return condition; } - [[nodiscard]] inline BaseStmt* getBody() const { return body; } + [[nodiscard]] inline BaseStmt *getCondition() const { return condition; } + [[nodiscard]] inline BaseStmt *getBody() const { return body; } + }; + + /// @brief 用于存储 try 语句 + class TryStmt final : public BaseStmt { + protected: + BaseStmt *tryBody; + BaseStmt *catchBody; + + public: + TryStmt(BaseStmt *tryBody, BaseStmt *catchBody): tryBody(tryBody), catchBody(catchBody) {} + + [[nodiscard]] inline BaseStmt *getTryBody() const { return tryBody; } + [[nodiscard]] inline BaseStmt *getCatchBody() const { return catchBody; } }; + /// @brief 用于存储 if 语句 + class IfStmt final : public BaseStmt { + protected: + BaseStmt *condition; + BaseStmt *thenBody; + BaseStmt *elseBody; + + public: + IfStmt(BaseStmt *cond, BaseStmt *thenBody, BaseStmt *elseBody): condition(cond),thenBody(thenBody),elseBody(elseBody){} + + [[nodiscard]] inline BaseStmt *getCondition() const { return condition; } + [[nodiscard]] inline BaseStmt *getThenBody() const { return thenBody; } + [[nodiscard]] inline BaseStmt *getElseBody() const { return elseBody; } + }; + + class ObjectStmt final : public BaseStmt { + protected: + std::string name; + public: + explicit ObjectStmt(std::string name): name(std::move(name)) {} + + [[nodiscard]] inline std::string getName() const { return name; } + }; }// namespace Riddle \ No newline at end of file diff --git a/src/Visitors/GenVisitor.cpp b/src/Visitors/GenVisitor.cpp index 883a288..a236d4c 100644 --- a/src/Visitors/GenVisitor.cpp +++ b/src/Visitors/GenVisitor.cpp @@ -11,7 +11,7 @@ #include namespace Riddle { - GenVisitor::GenVisitor(const std::string &moduleName): Builder(globalContext) { + GenVisitor::GenVisitor(const std::string &moduleName): Builder(globalContext),classManager(globalContext) { module = new llvm::Module(moduleName, globalContext); module->setSourceFileName(moduleName + ".red"); opMap = getBinaryOpMap(Builder); @@ -112,7 +112,7 @@ namespace Riddle { varManager.defineVar(args.names[i], false, Alloca); } - visit(ctx->funcBody()); + visit(ctx->body); varManager.pop(); ParentStack.pop(); Builder.SetInsertPoint(oldBlock); @@ -576,7 +576,4 @@ namespace Riddle { return nullptr; } - std::any GenVisitor::visitClassBody(RiddleParser::ClassBodyContext *ctx){ - return RiddleParserBaseVisitor::visitClassBody(ctx); - } } // namespace Riddle diff --git a/src/Visitors/GenVisitor.h b/src/Visitors/GenVisitor.h index 0119a77..ad8669e 100644 --- a/src/Visitors/GenVisitor.h +++ b/src/Visitors/GenVisitor.h @@ -213,9 +213,6 @@ namespace Riddle { /// @brief 定义一个类 /// @returns nullptr std::any visitClassDefine(RiddleParser::ClassDefineContext *ctx) override; - /// @brief 一个类的主体 - /// @returns nullptr - std::any visitClassBody(RiddleParser::ClassBodyContext *ctx) override; /// @brief 获取一个混合对象 /// @return tuple{llvm::Value*,llvm::Type*} std::any visitBlendExpr(RiddleParser::BlendExprContext *ctx) override; diff --git a/src/Visitors/StmtVisitor.cpp b/src/Visitors/StmtVisitor.cpp index 6f54b0f..f3b36ee 100644 --- a/src/Visitors/StmtVisitor.cpp +++ b/src/Visitors/StmtVisitor.cpp @@ -1,7 +1,4 @@ #include "StmtVisitor.h" - -#include - import Types.Statements; import Managers.StmtManager; @@ -9,7 +6,7 @@ namespace Riddle { std::any StmtVisitor::visitProgram(RiddleParser::ProgramContext *ctx) { std::vector stmts; for(auto i: ctx->children) { - stmts.push_back(std::any_cast(visit(i))); + stmts.push_back(std::any_cast(visit(i))); } return stmts; } @@ -43,6 +40,18 @@ namespace Riddle { const auto value = std::any_cast(visit(ctx->value)); return stmt_manager.getVarDefine(name, type, value); } + std::any StmtVisitor::visitWhileStatement(RiddleParser::WhileStatementContext *ctx) { + const auto cond = std::any_cast(visit(ctx->runCond)); + const auto body = std::any_cast(visit(ctx->body)); + return stmt_manager.getWhile(cond, body); + } + std::any StmtVisitor::visitForStatement(RiddleParser::ForStatementContext *ctx) { + const auto init = std::any_cast(visit(ctx->init)); + const auto cond = std::any_cast(visit(ctx->termCond)); + const auto changed = std::any_cast(visit(ctx->selfVar)); + const auto body = std::any_cast(visit(ctx->body)); + return stmt_manager.getFor(init, cond, changed, body); + } }// namespace Riddle \ No newline at end of file diff --git a/src/Visitors/StmtVisitor.h b/src/Visitors/StmtVisitor.h index e79b265..66306bc 100644 --- a/src/Visitors/StmtVisitor.h +++ b/src/Visitors/StmtVisitor.h @@ -18,6 +18,8 @@ namespace Riddle { std::any visitBoolean(RiddleParser::BooleanContext *ctx) override; std::any visitNullExpr(RiddleParser::NullExprContext *context) override; std::any visitVarDefineStatement(RiddleParser::VarDefineStatementContext *ctx) override; + std::any visitWhileStatement(RiddleParser::WhileStatementContext *ctx) override; + std::any visitForStatement(RiddleParser::ForStatementContext *ctx) override; }; }// namespace Riddle