diff --git a/cosmosdb/CosmosDBLexer.g4 b/cosmosdb/CosmosDBLexer.g4 index b35324f..8e85950 100644 --- a/cosmosdb/CosmosDBLexer.g4 +++ b/cosmosdb/CosmosDBLexer.g4 @@ -61,6 +61,10 @@ EXISTS_SYMBOL: 'EXISTS'; LIKE_SYMBOL: 'LIKE'; HAVING_SYMBOL: 'HAVING'; JOIN_SYMBOL: 'JOIN'; +ESCAPE_SYMBOL: 'ESCAPE'; +ARRAY_SYMBOL: 'ARRAY'; +ROOT_SYMBOL: 'ROOT'; +RANK_SYMBOL: 'RANK'; AT_SYMBOL: '@'; LC_BRACKET_SYMBOL: '{'; @@ -73,6 +77,7 @@ SINGLE_QUOTE_SYMBOL: '\''; DOUBLE_QUOTE_SYMBOL: '"'; COMMA_SYMBOL: ','; DOT_SYMBOL: '.'; +DOUBLE_QUESTION_MARK_SYMBOL: '??'; QUESTION_MARK_SYMBOL: '?'; COLON_SYMBOL: ':'; PLUS_SYMBOL: '+'; @@ -93,8 +98,13 @@ LEFT_SHIFT_OPERATOR: '<<'; RIGHT_SHIFT_OPERATOR: '>>'; ZERO_FILL_RIGHT_SHIFT_OPERATOR: '>>>'; NOT_EQUAL_OPERATOR: '!='; +NOT_EQUAL_OPERATOR_2: '<>'; +/* Constants */ +INFINITY_SYMBOL options { caseInsensitive = false; }: 'Infinity'; +NAN_SYMBOL options { caseInsensitive = false; }: 'NaN'; + /* Identifiers */ IDENTIFIER: [a-z_] [a-z_0-9]*; @@ -102,6 +112,8 @@ IDENTIFIER: [a-z_] [a-z_0-9]*; WHITESPACE: [ \t\f\r\n] -> channel(HIDDEN); // Ignore whitespaces. +LINE_COMMENT: '--' ~[\r\n]* -> channel(HIDDEN); + // Decimal literal. fragment DEC_DIGIT: [0-9]; fragment DEC_DOT_DEC: ( diff --git a/cosmosdb/CosmosDBParser.g4 b/cosmosdb/CosmosDBParser.g4 index d960880..256b82b 100644 --- a/cosmosdb/CosmosDBParser.g4 +++ b/cosmosdb/CosmosDBParser.g4 @@ -34,18 +34,30 @@ order_by_clause: COMMA_SYMBOL sort_expression )*; -sort_expression: scalar_expression (ASC_SYMBOL | DESC_SYMBOL)?; +sort_expression: + scalar_expression (ASC_SYMBOL | DESC_SYMBOL)? + | RANK_SYMBOL scalar_expression; offset_limit_clause: OFFSET_SYMBOL DECIMAL LIMIT_SYMBOL DECIMAL; -from_specification: from_source; +from_specification: from_source (join_clause)*; -from_source: container_expression (join_clause)*; +from_source: + container_expression (AS_SYMBOL? identifier)? + | identifier IN_SYMBOL container_expression; -container_expression: container_name (AS_SYMBOL? identifier)?; +container_expression: + ROOT_SYMBOL + | container_name + | container_expression DOT_SYMBOL property_name + | container_expression LS_BRACKET_SYMBOL ( + DOUBLE_QUOTE_STRING_LITERAL + | SINGLE_QUOTE_STRING_LITERAL + | array_index + ) RS_BRACKET_SYMBOL + | LR_BRACKET_SYMBOL select RR_BRACKET_SYMBOL; -join_clause: - JOIN_SYMBOL identifier IN_SYMBOL scalar_expression; +join_clause: JOIN_SYMBOL from_source; container_name: identifier; @@ -70,11 +82,13 @@ scalar_expression: | LR_BRACKET_SYMBOL scalar_expression RR_BRACKET_SYMBOL | LR_BRACKET_SYMBOL select RR_BRACKET_SYMBOL | EXISTS_SYMBOL LR_BRACKET_SYMBOL select RR_BRACKET_SYMBOL + | ARRAY_SYMBOL LR_BRACKET_SYMBOL select RR_BRACKET_SYMBOL | scalar_expression DOT_SYMBOL property_name | scalar_expression LS_BRACKET_SYMBOL ( DOUBLE_QUOTE_STRING_LITERAL | SINGLE_QUOTE_STRING_LITERAL | array_index + | parameter_name ) RS_BRACKET_SYMBOL | unary_operator scalar_expression | NOT_SYMBOL scalar_expression @@ -90,9 +104,10 @@ scalar_expression: scalar_expression (COMMA_SYMBOL scalar_expression)* )? RR_BRACKET_SYMBOL | scalar_expression NOT_SYMBOL? BETWEEN_SYMBOL scalar_expression AND_SYMBOL scalar_expression - | scalar_expression NOT_SYMBOL? LIKE_SYMBOL scalar_expression + | scalar_expression NOT_SYMBOL? LIKE_SYMBOL scalar_expression (ESCAPE_SYMBOL scalar_expression)? | scalar_expression AND_SYMBOL scalar_expression | scalar_expression OR_SYMBOL scalar_expression + | scalar_expression DOUBLE_QUESTION_MARK_SYMBOL scalar_expression | scalar_expression QUESTION_MARK_SYMBOL scalar_expression COLON_SYMBOL scalar_expression; create_array_expression: @@ -139,6 +154,7 @@ shift_operator: comparison_operator: EQUAL_SYMBOL | NOT_EQUAL_OPERATOR + | NOT_EQUAL_OPERATOR_2 | LESS_THAN_OPERATOR | LESS_THAN_EQUAL_OPERATOR | GREATER_THAN_OPERATOR @@ -162,7 +178,7 @@ null_constant: NULL_SYMBOL; boolean_constant: TRUE_SYMBOL | FALSE_SYMBOL; -number_constant: decimal_literal | hexadecimal_literal; +number_constant: decimal_literal | hexadecimal_literal | INFINITY_SYMBOL | NAN_SYMBOL; string_constant: string_literal; @@ -192,9 +208,31 @@ identifier: | EXISTS_SYMBOL | LIKE_SYMBOL | HAVING_SYMBOL - | JOIN_SYMBOL; - -property_name: identifier; + | JOIN_SYMBOL + | ESCAPE_SYMBOL + | ARRAY_SYMBOL + | ROOT_SYMBOL + | RANK_SYMBOL; + +property_name: + identifier + | SELECT_SYMBOL + | FROM_SYMBOL + | WHERE_SYMBOL + | NOT_SYMBOL + | AND_SYMBOL + | OR_SYMBOL + | AS_SYMBOL + | TRUE_SYMBOL + | FALSE_SYMBOL + | NULL_SYMBOL + | UNDEFINED_SYMBOL + | UDF_SYMBOL + | DISTINCT_SYMBOL + | ARRAY_SYMBOL + | ROOT_SYMBOL + | ESCAPE_SYMBOL + | RANK_SYMBOL; array_index: DECIMAL; diff --git a/cosmosdb/cosmosdb_lexer.go b/cosmosdb/cosmosdb_lexer.go index c337105..10b0956 100644 --- a/cosmosdb/cosmosdb_lexer.go +++ b/cosmosdb/cosmosdb_lexer.go @@ -47,10 +47,11 @@ func cosmosdblexerLexerInit() { "'NULL'", "'FALSE'", "'TRUE'", "'NOT'", "'UDF'", "'WHERE'", "'AND'", "'OR'", "'IN'", "'BETWEEN'", "'TOP'", "'VALUE'", "'ORDER'", "'BY'", "'GROUP'", "'OFFSET'", "'LIMIT'", "'ASC'", "'DESC'", "'EXISTS'", "'LIKE'", - "'HAVING'", "'JOIN'", "'@'", "'{'", "'}'", "'['", "']'", "'('", "')'", - "'''", "'\"'", "','", "'.'", "'?'", "':'", "'+'", "'-'", "'~'", "'/'", - "'%'", "'&'", "'|'", "'||'", "'^'", "'='", "'<'", "'<='", "'>'", "'>='", - "'<<'", "'>>'", "'>>>'", "'!='", + "'HAVING'", "'JOIN'", "'ESCAPE'", "'ARRAY'", "'ROOT'", "'RANK'", "'@'", + "'{'", "'}'", "'['", "']'", "'('", "')'", "'''", "'\"'", "','", "'.'", + "'??'", "'?'", "':'", "'+'", "'-'", "'~'", "'/'", "'%'", "'&'", "'|'", + "'||'", "'^'", "'='", "'<'", "'<='", "'>'", "'>='", "'<<'", "'>>'", + "'>>>'", "'!='", "'<>'", } staticData.SymbolicNames = []string{ "", "MULTIPLY_OPERATOR", "AS_SYMBOL", "SELECT_SYMBOL", "FROM_SYMBOL", @@ -59,16 +60,18 @@ func cosmosdblexerLexerInit() { "OR_SYMBOL", "IN_SYMBOL", "BETWEEN_SYMBOL", "TOP_SYMBOL", "VALUE_SYMBOL", "ORDER_SYMBOL", "BY_SYMBOL", "GROUP_SYMBOL", "OFFSET_SYMBOL", "LIMIT_SYMBOL", "ASC_SYMBOL", "DESC_SYMBOL", "EXISTS_SYMBOL", "LIKE_SYMBOL", "HAVING_SYMBOL", - "JOIN_SYMBOL", "AT_SYMBOL", "LC_BRACKET_SYMBOL", "RC_BRACKET_SYMBOL", - "LS_BRACKET_SYMBOL", "RS_BRACKET_SYMBOL", "LR_BRACKET_SYMBOL", "RR_BRACKET_SYMBOL", - "SINGLE_QUOTE_SYMBOL", "DOUBLE_QUOTE_SYMBOL", "COMMA_SYMBOL", "DOT_SYMBOL", + "JOIN_SYMBOL", "ESCAPE_SYMBOL", "ARRAY_SYMBOL", "ROOT_SYMBOL", "RANK_SYMBOL", + "AT_SYMBOL", "LC_BRACKET_SYMBOL", "RC_BRACKET_SYMBOL", "LS_BRACKET_SYMBOL", + "RS_BRACKET_SYMBOL", "LR_BRACKET_SYMBOL", "RR_BRACKET_SYMBOL", "SINGLE_QUOTE_SYMBOL", + "DOUBLE_QUOTE_SYMBOL", "COMMA_SYMBOL", "DOT_SYMBOL", "DOUBLE_QUESTION_MARK_SYMBOL", "QUESTION_MARK_SYMBOL", "COLON_SYMBOL", "PLUS_SYMBOL", "MINUS_SYMBOL", "BIT_NOT_SYMBOL", "DIVIDE_SYMBOL", "MODULO_SYMBOL", "BIT_AND_SYMBOL", "BIT_OR_SYMBOL", "DOUBLE_BAR_SYMBOL", "BIT_XOR_SYMBOL", "EQUAL_SYMBOL", "LESS_THAN_OPERATOR", "LESS_THAN_EQUAL_OPERATOR", "GREATER_THAN_OPERATOR", "GREATER_THAN_EQUAL_OPERATOR", "LEFT_SHIFT_OPERATOR", "RIGHT_SHIFT_OPERATOR", - "ZERO_FILL_RIGHT_SHIFT_OPERATOR", "NOT_EQUAL_OPERATOR", "IDENTIFIER", - "WHITESPACE", "DECIMAL", "REAL", "FLOAT", "HEXADECIMAL", "SINGLE_QUOTE_STRING_LITERAL", + "ZERO_FILL_RIGHT_SHIFT_OPERATOR", "NOT_EQUAL_OPERATOR", "NOT_EQUAL_OPERATOR_2", + "INFINITY_SYMBOL", "NAN_SYMBOL", "IDENTIFIER", "WHITESPACE", "LINE_COMMENT", + "DECIMAL", "REAL", "FLOAT", "HEXADECIMAL", "SINGLE_QUOTE_STRING_LITERAL", "DOUBLE_QUOTE_STRING_LITERAL", } staticData.RuleNames = []string{ @@ -79,22 +82,24 @@ func cosmosdblexerLexerInit() { "WHERE_SYMBOL", "AND_SYMBOL", "OR_SYMBOL", "IN_SYMBOL", "BETWEEN_SYMBOL", "TOP_SYMBOL", "VALUE_SYMBOL", "ORDER_SYMBOL", "BY_SYMBOL", "GROUP_SYMBOL", "OFFSET_SYMBOL", "LIMIT_SYMBOL", "ASC_SYMBOL", "DESC_SYMBOL", "EXISTS_SYMBOL", - "LIKE_SYMBOL", "HAVING_SYMBOL", "JOIN_SYMBOL", "AT_SYMBOL", "LC_BRACKET_SYMBOL", - "RC_BRACKET_SYMBOL", "LS_BRACKET_SYMBOL", "RS_BRACKET_SYMBOL", "LR_BRACKET_SYMBOL", - "RR_BRACKET_SYMBOL", "SINGLE_QUOTE_SYMBOL", "DOUBLE_QUOTE_SYMBOL", "COMMA_SYMBOL", - "DOT_SYMBOL", "QUESTION_MARK_SYMBOL", "COLON_SYMBOL", "PLUS_SYMBOL", - "MINUS_SYMBOL", "BIT_NOT_SYMBOL", "DIVIDE_SYMBOL", "MODULO_SYMBOL", + "LIKE_SYMBOL", "HAVING_SYMBOL", "JOIN_SYMBOL", "ESCAPE_SYMBOL", "ARRAY_SYMBOL", + "ROOT_SYMBOL", "RANK_SYMBOL", "AT_SYMBOL", "LC_BRACKET_SYMBOL", "RC_BRACKET_SYMBOL", + "LS_BRACKET_SYMBOL", "RS_BRACKET_SYMBOL", "LR_BRACKET_SYMBOL", "RR_BRACKET_SYMBOL", + "SINGLE_QUOTE_SYMBOL", "DOUBLE_QUOTE_SYMBOL", "COMMA_SYMBOL", "DOT_SYMBOL", + "DOUBLE_QUESTION_MARK_SYMBOL", "QUESTION_MARK_SYMBOL", "COLON_SYMBOL", + "PLUS_SYMBOL", "MINUS_SYMBOL", "BIT_NOT_SYMBOL", "DIVIDE_SYMBOL", "MODULO_SYMBOL", "BIT_AND_SYMBOL", "BIT_OR_SYMBOL", "DOUBLE_BAR_SYMBOL", "BIT_XOR_SYMBOL", "EQUAL_SYMBOL", "LESS_THAN_OPERATOR", "LESS_THAN_EQUAL_OPERATOR", "GREATER_THAN_OPERATOR", "GREATER_THAN_EQUAL_OPERATOR", "LEFT_SHIFT_OPERATOR", "RIGHT_SHIFT_OPERATOR", - "ZERO_FILL_RIGHT_SHIFT_OPERATOR", "NOT_EQUAL_OPERATOR", "IDENTIFIER", - "WHITESPACE", "DEC_DIGIT", "DEC_DOT_DEC", "DECIMAL", "REAL", "FLOAT", - "HEX_DIGIT", "HEXADECIMAL", "FullWidthLetter", "ESCAPE_SEQUENCE", "STRING_CHAR", + "ZERO_FILL_RIGHT_SHIFT_OPERATOR", "NOT_EQUAL_OPERATOR", "NOT_EQUAL_OPERATOR_2", + "INFINITY_SYMBOL", "NAN_SYMBOL", "IDENTIFIER", "WHITESPACE", "LINE_COMMENT", + "DEC_DIGIT", "DEC_DOT_DEC", "DECIMAL", "REAL", "FLOAT", "HEX_DIGIT", + "HEXADECIMAL", "FullWidthLetter", "ESCAPE_SEQUENCE", "STRING_CHAR", "SINGLE_QUOTE_STRING_LITERAL", "DOUBLE_QUOTE_STRING_LITERAL", } staticData.PredictionContextCache = antlr.NewPredictionContextCache() staticData.serializedATN = []int32{ - 4, 0, 68, 582, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, + 4, 0, 77, 653, 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, @@ -113,244 +118,275 @@ func cosmosdblexerLexerInit() { 83, 2, 84, 7, 84, 2, 85, 7, 85, 2, 86, 7, 86, 2, 87, 7, 87, 2, 88, 7, 88, 2, 89, 7, 89, 2, 90, 7, 90, 2, 91, 7, 91, 2, 92, 7, 92, 2, 93, 7, 93, 2, 94, 7, 94, 2, 95, 7, 95, 2, 96, 7, 96, 2, 97, 7, 97, 2, 98, 7, 98, 2, 99, - 7, 99, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1, 5, - 1, 5, 1, 6, 1, 6, 1, 7, 1, 7, 1, 8, 1, 8, 1, 9, 1, 9, 1, 10, 1, 10, 1, - 11, 1, 11, 1, 12, 1, 12, 1, 13, 1, 13, 1, 14, 1, 14, 1, 15, 1, 15, 1, 16, - 1, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 19, 1, 19, 1, 20, 1, 20, 1, 21, 1, - 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 24, 1, 24, 1, 25, 1, 25, 1, 26, 1, 26, - 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, - 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, - 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, - 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, - 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, - 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, - 1, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, - 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, - 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 1, - 44, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, 46, - 1, 46, 1, 46, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 48, 1, - 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 49, 1, 49, 1, 49, 1, 49, 1, 50, 1, 50, - 1, 50, 1, 50, 1, 50, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, - 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, - 1, 53, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 55, 1, 55, 1, 56, 1, 56, 1, - 57, 1, 57, 1, 58, 1, 58, 1, 59, 1, 59, 1, 60, 1, 60, 1, 61, 1, 61, 1, 62, - 1, 62, 1, 63, 1, 63, 1, 64, 1, 64, 1, 65, 1, 65, 1, 66, 1, 66, 1, 67, 1, - 67, 1, 68, 1, 68, 1, 69, 1, 69, 1, 70, 1, 70, 1, 71, 1, 71, 1, 72, 1, 72, - 1, 73, 1, 73, 1, 74, 1, 74, 1, 75, 1, 75, 1, 75, 1, 76, 1, 76, 1, 77, 1, - 77, 1, 78, 1, 78, 1, 79, 1, 79, 1, 79, 1, 80, 1, 80, 1, 81, 1, 81, 1, 81, - 1, 82, 1, 82, 1, 82, 1, 83, 1, 83, 1, 83, 1, 84, 1, 84, 1, 84, 1, 84, 1, - 85, 1, 85, 1, 85, 1, 86, 1, 86, 5, 86, 481, 8, 86, 10, 86, 12, 86, 484, - 9, 86, 1, 87, 1, 87, 1, 87, 1, 87, 1, 88, 1, 88, 1, 89, 4, 89, 493, 8, - 89, 11, 89, 12, 89, 494, 1, 89, 1, 89, 4, 89, 499, 8, 89, 11, 89, 12, 89, - 500, 1, 89, 4, 89, 504, 8, 89, 11, 89, 12, 89, 505, 1, 89, 1, 89, 1, 89, - 1, 89, 4, 89, 512, 8, 89, 11, 89, 12, 89, 513, 3, 89, 516, 8, 89, 1, 90, - 4, 90, 519, 8, 90, 11, 90, 12, 90, 520, 1, 91, 1, 91, 3, 91, 525, 8, 91, - 1, 91, 1, 91, 3, 91, 529, 8, 91, 1, 91, 4, 91, 532, 8, 91, 11, 91, 12, - 91, 533, 1, 92, 1, 92, 1, 93, 1, 93, 1, 94, 1, 94, 1, 94, 4, 94, 543, 8, - 94, 11, 94, 12, 94, 544, 1, 95, 1, 95, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, - 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 3, 96, 559, 8, 96, 1, 97, 1, 97, 3, - 97, 563, 8, 97, 1, 98, 1, 98, 5, 98, 567, 8, 98, 10, 98, 12, 98, 570, 9, - 98, 1, 98, 1, 98, 1, 99, 1, 99, 5, 99, 576, 8, 99, 10, 99, 12, 99, 579, - 9, 99, 1, 99, 1, 99, 0, 0, 100, 1, 0, 3, 0, 5, 0, 7, 0, 9, 0, 11, 0, 13, - 0, 15, 0, 17, 0, 19, 0, 21, 0, 23, 0, 25, 0, 27, 0, 29, 0, 31, 0, 33, 0, - 35, 0, 37, 0, 39, 0, 41, 0, 43, 0, 45, 0, 47, 0, 49, 0, 51, 0, 53, 1, 55, - 2, 57, 3, 59, 4, 61, 5, 63, 6, 65, 7, 67, 8, 69, 9, 71, 10, 73, 11, 75, - 12, 77, 13, 79, 14, 81, 15, 83, 16, 85, 17, 87, 18, 89, 19, 91, 20, 93, - 21, 95, 22, 97, 23, 99, 24, 101, 25, 103, 26, 105, 27, 107, 28, 109, 29, - 111, 30, 113, 31, 115, 32, 117, 33, 119, 34, 121, 35, 123, 36, 125, 37, - 127, 38, 129, 39, 131, 40, 133, 41, 135, 42, 137, 43, 139, 44, 141, 45, - 143, 46, 145, 47, 147, 48, 149, 49, 151, 50, 153, 51, 155, 52, 157, 53, - 159, 54, 161, 55, 163, 56, 165, 57, 167, 58, 169, 59, 171, 60, 173, 61, - 175, 62, 177, 0, 179, 0, 181, 63, 183, 64, 185, 65, 187, 0, 189, 66, 191, - 0, 193, 0, 195, 0, 197, 67, 199, 68, 1, 0, 35, 2, 0, 65, 65, 97, 97, 2, - 0, 66, 66, 98, 98, 2, 0, 67, 67, 99, 99, 2, 0, 68, 68, 100, 100, 2, 0, - 69, 69, 101, 101, 2, 0, 70, 70, 102, 102, 2, 0, 71, 71, 103, 103, 2, 0, - 72, 72, 104, 104, 2, 0, 73, 73, 105, 105, 2, 0, 74, 74, 106, 106, 2, 0, - 75, 75, 107, 107, 2, 0, 76, 76, 108, 108, 2, 0, 77, 77, 109, 109, 2, 0, - 78, 78, 110, 110, 2, 0, 79, 79, 111, 111, 2, 0, 80, 80, 112, 112, 2, 0, - 81, 81, 113, 113, 2, 0, 82, 82, 114, 114, 2, 0, 83, 83, 115, 115, 2, 0, - 84, 84, 116, 116, 2, 0, 85, 85, 117, 117, 2, 0, 86, 86, 118, 118, 2, 0, - 87, 87, 119, 119, 2, 0, 88, 88, 120, 120, 2, 0, 89, 89, 121, 121, 2, 0, - 90, 90, 122, 122, 3, 0, 65, 90, 95, 95, 97, 122, 4, 0, 48, 57, 65, 90, - 95, 95, 97, 122, 3, 0, 9, 10, 12, 13, 32, 32, 1, 0, 48, 57, 2, 0, 43, 43, - 45, 45, 3, 0, 48, 57, 65, 70, 97, 102, 10, 0, 192, 214, 216, 246, 248, - 8191, 11264, 12287, 12352, 12687, 13056, 13183, 13312, 16383, 19968, 55295, - 63744, 64255, 65280, 65520, 14, 0, 34, 34, 39, 39, 47, 47, 66, 66, 70, - 70, 78, 78, 82, 82, 84, 84, 92, 92, 98, 98, 102, 102, 110, 110, 114, 114, - 116, 116, 5, 0, 10, 10, 13, 13, 34, 34, 39, 39, 92, 92, 565, 0, 53, 1, - 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, - 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, - 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, - 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, - 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, - 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, - 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, - 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, - 0, 0, 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 119, 1, 0, 0, 0, 0, 121, - 1, 0, 0, 0, 0, 123, 1, 0, 0, 0, 0, 125, 1, 0, 0, 0, 0, 127, 1, 0, 0, 0, - 0, 129, 1, 0, 0, 0, 0, 131, 1, 0, 0, 0, 0, 133, 1, 0, 0, 0, 0, 135, 1, - 0, 0, 0, 0, 137, 1, 0, 0, 0, 0, 139, 1, 0, 0, 0, 0, 141, 1, 0, 0, 0, 0, - 143, 1, 0, 0, 0, 0, 145, 1, 0, 0, 0, 0, 147, 1, 0, 0, 0, 0, 149, 1, 0, - 0, 0, 0, 151, 1, 0, 0, 0, 0, 153, 1, 0, 0, 0, 0, 155, 1, 0, 0, 0, 0, 157, - 1, 0, 0, 0, 0, 159, 1, 0, 0, 0, 0, 161, 1, 0, 0, 0, 0, 163, 1, 0, 0, 0, - 0, 165, 1, 0, 0, 0, 0, 167, 1, 0, 0, 0, 0, 169, 1, 0, 0, 0, 0, 171, 1, - 0, 0, 0, 0, 173, 1, 0, 0, 0, 0, 175, 1, 0, 0, 0, 0, 181, 1, 0, 0, 0, 0, - 183, 1, 0, 0, 0, 0, 185, 1, 0, 0, 0, 0, 189, 1, 0, 0, 0, 0, 197, 1, 0, - 0, 0, 0, 199, 1, 0, 0, 0, 1, 201, 1, 0, 0, 0, 3, 203, 1, 0, 0, 0, 5, 205, - 1, 0, 0, 0, 7, 207, 1, 0, 0, 0, 9, 209, 1, 0, 0, 0, 11, 211, 1, 0, 0, 0, - 13, 213, 1, 0, 0, 0, 15, 215, 1, 0, 0, 0, 17, 217, 1, 0, 0, 0, 19, 219, - 1, 0, 0, 0, 21, 221, 1, 0, 0, 0, 23, 223, 1, 0, 0, 0, 25, 225, 1, 0, 0, - 0, 27, 227, 1, 0, 0, 0, 29, 229, 1, 0, 0, 0, 31, 231, 1, 0, 0, 0, 33, 233, - 1, 0, 0, 0, 35, 235, 1, 0, 0, 0, 37, 237, 1, 0, 0, 0, 39, 239, 1, 0, 0, - 0, 41, 241, 1, 0, 0, 0, 43, 243, 1, 0, 0, 0, 45, 245, 1, 0, 0, 0, 47, 247, - 1, 0, 0, 0, 49, 249, 1, 0, 0, 0, 51, 251, 1, 0, 0, 0, 53, 253, 1, 0, 0, - 0, 55, 255, 1, 0, 0, 0, 57, 258, 1, 0, 0, 0, 59, 265, 1, 0, 0, 0, 61, 270, - 1, 0, 0, 0, 63, 279, 1, 0, 0, 0, 65, 289, 1, 0, 0, 0, 67, 294, 1, 0, 0, - 0, 69, 300, 1, 0, 0, 0, 71, 305, 1, 0, 0, 0, 73, 309, 1, 0, 0, 0, 75, 313, - 1, 0, 0, 0, 77, 319, 1, 0, 0, 0, 79, 323, 1, 0, 0, 0, 81, 326, 1, 0, 0, - 0, 83, 329, 1, 0, 0, 0, 85, 337, 1, 0, 0, 0, 87, 341, 1, 0, 0, 0, 89, 347, - 1, 0, 0, 0, 91, 353, 1, 0, 0, 0, 93, 356, 1, 0, 0, 0, 95, 362, 1, 0, 0, - 0, 97, 369, 1, 0, 0, 0, 99, 375, 1, 0, 0, 0, 101, 379, 1, 0, 0, 0, 103, - 384, 1, 0, 0, 0, 105, 391, 1, 0, 0, 0, 107, 396, 1, 0, 0, 0, 109, 403, - 1, 0, 0, 0, 111, 408, 1, 0, 0, 0, 113, 410, 1, 0, 0, 0, 115, 412, 1, 0, - 0, 0, 117, 414, 1, 0, 0, 0, 119, 416, 1, 0, 0, 0, 121, 418, 1, 0, 0, 0, - 123, 420, 1, 0, 0, 0, 125, 422, 1, 0, 0, 0, 127, 424, 1, 0, 0, 0, 129, - 426, 1, 0, 0, 0, 131, 428, 1, 0, 0, 0, 133, 430, 1, 0, 0, 0, 135, 432, - 1, 0, 0, 0, 137, 434, 1, 0, 0, 0, 139, 436, 1, 0, 0, 0, 141, 438, 1, 0, - 0, 0, 143, 440, 1, 0, 0, 0, 145, 442, 1, 0, 0, 0, 147, 444, 1, 0, 0, 0, - 149, 446, 1, 0, 0, 0, 151, 448, 1, 0, 0, 0, 153, 451, 1, 0, 0, 0, 155, - 453, 1, 0, 0, 0, 157, 455, 1, 0, 0, 0, 159, 457, 1, 0, 0, 0, 161, 460, - 1, 0, 0, 0, 163, 462, 1, 0, 0, 0, 165, 465, 1, 0, 0, 0, 167, 468, 1, 0, - 0, 0, 169, 471, 1, 0, 0, 0, 171, 475, 1, 0, 0, 0, 173, 478, 1, 0, 0, 0, - 175, 485, 1, 0, 0, 0, 177, 489, 1, 0, 0, 0, 179, 515, 1, 0, 0, 0, 181, - 518, 1, 0, 0, 0, 183, 524, 1, 0, 0, 0, 185, 535, 1, 0, 0, 0, 187, 537, - 1, 0, 0, 0, 189, 539, 1, 0, 0, 0, 191, 546, 1, 0, 0, 0, 193, 558, 1, 0, - 0, 0, 195, 562, 1, 0, 0, 0, 197, 564, 1, 0, 0, 0, 199, 573, 1, 0, 0, 0, - 201, 202, 7, 0, 0, 0, 202, 2, 1, 0, 0, 0, 203, 204, 7, 1, 0, 0, 204, 4, - 1, 0, 0, 0, 205, 206, 7, 2, 0, 0, 206, 6, 1, 0, 0, 0, 207, 208, 7, 3, 0, - 0, 208, 8, 1, 0, 0, 0, 209, 210, 7, 4, 0, 0, 210, 10, 1, 0, 0, 0, 211, - 212, 7, 5, 0, 0, 212, 12, 1, 0, 0, 0, 213, 214, 7, 6, 0, 0, 214, 14, 1, - 0, 0, 0, 215, 216, 7, 7, 0, 0, 216, 16, 1, 0, 0, 0, 217, 218, 7, 8, 0, - 0, 218, 18, 1, 0, 0, 0, 219, 220, 7, 9, 0, 0, 220, 20, 1, 0, 0, 0, 221, - 222, 7, 10, 0, 0, 222, 22, 1, 0, 0, 0, 223, 224, 7, 11, 0, 0, 224, 24, - 1, 0, 0, 0, 225, 226, 7, 12, 0, 0, 226, 26, 1, 0, 0, 0, 227, 228, 7, 13, - 0, 0, 228, 28, 1, 0, 0, 0, 229, 230, 7, 14, 0, 0, 230, 30, 1, 0, 0, 0, - 231, 232, 7, 15, 0, 0, 232, 32, 1, 0, 0, 0, 233, 234, 7, 16, 0, 0, 234, - 34, 1, 0, 0, 0, 235, 236, 7, 17, 0, 0, 236, 36, 1, 0, 0, 0, 237, 238, 7, - 18, 0, 0, 238, 38, 1, 0, 0, 0, 239, 240, 7, 19, 0, 0, 240, 40, 1, 0, 0, - 0, 241, 242, 7, 20, 0, 0, 242, 42, 1, 0, 0, 0, 243, 244, 7, 21, 0, 0, 244, - 44, 1, 0, 0, 0, 245, 246, 7, 22, 0, 0, 246, 46, 1, 0, 0, 0, 247, 248, 7, - 23, 0, 0, 248, 48, 1, 0, 0, 0, 249, 250, 7, 24, 0, 0, 250, 50, 1, 0, 0, - 0, 251, 252, 7, 25, 0, 0, 252, 52, 1, 0, 0, 0, 253, 254, 5, 42, 0, 0, 254, - 54, 1, 0, 0, 0, 255, 256, 7, 0, 0, 0, 256, 257, 7, 18, 0, 0, 257, 56, 1, - 0, 0, 0, 258, 259, 7, 18, 0, 0, 259, 260, 7, 4, 0, 0, 260, 261, 7, 11, - 0, 0, 261, 262, 7, 4, 0, 0, 262, 263, 7, 2, 0, 0, 263, 264, 7, 19, 0, 0, - 264, 58, 1, 0, 0, 0, 265, 266, 7, 5, 0, 0, 266, 267, 7, 17, 0, 0, 267, - 268, 7, 14, 0, 0, 268, 269, 7, 12, 0, 0, 269, 60, 1, 0, 0, 0, 270, 271, - 7, 3, 0, 0, 271, 272, 7, 8, 0, 0, 272, 273, 7, 18, 0, 0, 273, 274, 7, 19, - 0, 0, 274, 275, 7, 8, 0, 0, 275, 276, 7, 13, 0, 0, 276, 277, 7, 2, 0, 0, - 277, 278, 7, 19, 0, 0, 278, 62, 1, 0, 0, 0, 279, 280, 7, 20, 0, 0, 280, - 281, 7, 13, 0, 0, 281, 282, 7, 3, 0, 0, 282, 283, 7, 4, 0, 0, 283, 284, - 7, 5, 0, 0, 284, 285, 7, 8, 0, 0, 285, 286, 7, 13, 0, 0, 286, 287, 7, 4, - 0, 0, 287, 288, 7, 3, 0, 0, 288, 64, 1, 0, 0, 0, 289, 290, 7, 13, 0, 0, - 290, 291, 7, 20, 0, 0, 291, 292, 7, 11, 0, 0, 292, 293, 7, 11, 0, 0, 293, - 66, 1, 0, 0, 0, 294, 295, 7, 5, 0, 0, 295, 296, 7, 0, 0, 0, 296, 297, 7, - 11, 0, 0, 297, 298, 7, 18, 0, 0, 298, 299, 7, 4, 0, 0, 299, 68, 1, 0, 0, - 0, 300, 301, 7, 19, 0, 0, 301, 302, 7, 17, 0, 0, 302, 303, 7, 20, 0, 0, - 303, 304, 7, 4, 0, 0, 304, 70, 1, 0, 0, 0, 305, 306, 7, 13, 0, 0, 306, - 307, 7, 14, 0, 0, 307, 308, 7, 19, 0, 0, 308, 72, 1, 0, 0, 0, 309, 310, - 7, 20, 0, 0, 310, 311, 7, 3, 0, 0, 311, 312, 7, 5, 0, 0, 312, 74, 1, 0, - 0, 0, 313, 314, 7, 22, 0, 0, 314, 315, 7, 7, 0, 0, 315, 316, 7, 4, 0, 0, - 316, 317, 7, 17, 0, 0, 317, 318, 7, 4, 0, 0, 318, 76, 1, 0, 0, 0, 319, - 320, 7, 0, 0, 0, 320, 321, 7, 13, 0, 0, 321, 322, 7, 3, 0, 0, 322, 78, - 1, 0, 0, 0, 323, 324, 7, 14, 0, 0, 324, 325, 7, 17, 0, 0, 325, 80, 1, 0, - 0, 0, 326, 327, 7, 8, 0, 0, 327, 328, 7, 13, 0, 0, 328, 82, 1, 0, 0, 0, - 329, 330, 7, 1, 0, 0, 330, 331, 7, 4, 0, 0, 331, 332, 7, 19, 0, 0, 332, - 333, 7, 22, 0, 0, 333, 334, 7, 4, 0, 0, 334, 335, 7, 4, 0, 0, 335, 336, - 7, 13, 0, 0, 336, 84, 1, 0, 0, 0, 337, 338, 7, 19, 0, 0, 338, 339, 7, 14, - 0, 0, 339, 340, 7, 15, 0, 0, 340, 86, 1, 0, 0, 0, 341, 342, 7, 21, 0, 0, - 342, 343, 7, 0, 0, 0, 343, 344, 7, 11, 0, 0, 344, 345, 7, 20, 0, 0, 345, - 346, 7, 4, 0, 0, 346, 88, 1, 0, 0, 0, 347, 348, 7, 14, 0, 0, 348, 349, - 7, 17, 0, 0, 349, 350, 7, 3, 0, 0, 350, 351, 7, 4, 0, 0, 351, 352, 7, 17, - 0, 0, 352, 90, 1, 0, 0, 0, 353, 354, 7, 1, 0, 0, 354, 355, 7, 24, 0, 0, - 355, 92, 1, 0, 0, 0, 356, 357, 7, 6, 0, 0, 357, 358, 7, 17, 0, 0, 358, - 359, 7, 14, 0, 0, 359, 360, 7, 20, 0, 0, 360, 361, 7, 15, 0, 0, 361, 94, - 1, 0, 0, 0, 362, 363, 7, 14, 0, 0, 363, 364, 7, 5, 0, 0, 364, 365, 7, 5, - 0, 0, 365, 366, 7, 18, 0, 0, 366, 367, 7, 4, 0, 0, 367, 368, 7, 19, 0, - 0, 368, 96, 1, 0, 0, 0, 369, 370, 7, 11, 0, 0, 370, 371, 7, 8, 0, 0, 371, - 372, 7, 12, 0, 0, 372, 373, 7, 8, 0, 0, 373, 374, 7, 19, 0, 0, 374, 98, - 1, 0, 0, 0, 375, 376, 7, 0, 0, 0, 376, 377, 7, 18, 0, 0, 377, 378, 7, 2, - 0, 0, 378, 100, 1, 0, 0, 0, 379, 380, 7, 3, 0, 0, 380, 381, 7, 4, 0, 0, - 381, 382, 7, 18, 0, 0, 382, 383, 7, 2, 0, 0, 383, 102, 1, 0, 0, 0, 384, - 385, 7, 4, 0, 0, 385, 386, 7, 23, 0, 0, 386, 387, 7, 8, 0, 0, 387, 388, - 7, 18, 0, 0, 388, 389, 7, 19, 0, 0, 389, 390, 7, 18, 0, 0, 390, 104, 1, - 0, 0, 0, 391, 392, 7, 11, 0, 0, 392, 393, 7, 8, 0, 0, 393, 394, 7, 10, - 0, 0, 394, 395, 7, 4, 0, 0, 395, 106, 1, 0, 0, 0, 396, 397, 7, 7, 0, 0, - 397, 398, 7, 0, 0, 0, 398, 399, 7, 21, 0, 0, 399, 400, 7, 8, 0, 0, 400, - 401, 7, 13, 0, 0, 401, 402, 7, 6, 0, 0, 402, 108, 1, 0, 0, 0, 403, 404, - 7, 9, 0, 0, 404, 405, 7, 14, 0, 0, 405, 406, 7, 8, 0, 0, 406, 407, 7, 13, - 0, 0, 407, 110, 1, 0, 0, 0, 408, 409, 5, 64, 0, 0, 409, 112, 1, 0, 0, 0, - 410, 411, 5, 123, 0, 0, 411, 114, 1, 0, 0, 0, 412, 413, 5, 125, 0, 0, 413, - 116, 1, 0, 0, 0, 414, 415, 5, 91, 0, 0, 415, 118, 1, 0, 0, 0, 416, 417, - 5, 93, 0, 0, 417, 120, 1, 0, 0, 0, 418, 419, 5, 40, 0, 0, 419, 122, 1, - 0, 0, 0, 420, 421, 5, 41, 0, 0, 421, 124, 1, 0, 0, 0, 422, 423, 5, 39, - 0, 0, 423, 126, 1, 0, 0, 0, 424, 425, 5, 34, 0, 0, 425, 128, 1, 0, 0, 0, - 426, 427, 5, 44, 0, 0, 427, 130, 1, 0, 0, 0, 428, 429, 5, 46, 0, 0, 429, - 132, 1, 0, 0, 0, 430, 431, 5, 63, 0, 0, 431, 134, 1, 0, 0, 0, 432, 433, - 5, 58, 0, 0, 433, 136, 1, 0, 0, 0, 434, 435, 5, 43, 0, 0, 435, 138, 1, - 0, 0, 0, 436, 437, 5, 45, 0, 0, 437, 140, 1, 0, 0, 0, 438, 439, 5, 126, - 0, 0, 439, 142, 1, 0, 0, 0, 440, 441, 5, 47, 0, 0, 441, 144, 1, 0, 0, 0, - 442, 443, 5, 37, 0, 0, 443, 146, 1, 0, 0, 0, 444, 445, 5, 38, 0, 0, 445, - 148, 1, 0, 0, 0, 446, 447, 5, 124, 0, 0, 447, 150, 1, 0, 0, 0, 448, 449, - 5, 124, 0, 0, 449, 450, 5, 124, 0, 0, 450, 152, 1, 0, 0, 0, 451, 452, 5, - 94, 0, 0, 452, 154, 1, 0, 0, 0, 453, 454, 5, 61, 0, 0, 454, 156, 1, 0, - 0, 0, 455, 456, 5, 60, 0, 0, 456, 158, 1, 0, 0, 0, 457, 458, 5, 60, 0, - 0, 458, 459, 5, 61, 0, 0, 459, 160, 1, 0, 0, 0, 460, 461, 5, 62, 0, 0, - 461, 162, 1, 0, 0, 0, 462, 463, 5, 62, 0, 0, 463, 464, 5, 61, 0, 0, 464, - 164, 1, 0, 0, 0, 465, 466, 5, 60, 0, 0, 466, 467, 5, 60, 0, 0, 467, 166, - 1, 0, 0, 0, 468, 469, 5, 62, 0, 0, 469, 470, 5, 62, 0, 0, 470, 168, 1, - 0, 0, 0, 471, 472, 5, 62, 0, 0, 472, 473, 5, 62, 0, 0, 473, 474, 5, 62, - 0, 0, 474, 170, 1, 0, 0, 0, 475, 476, 5, 33, 0, 0, 476, 477, 5, 61, 0, - 0, 477, 172, 1, 0, 0, 0, 478, 482, 7, 26, 0, 0, 479, 481, 7, 27, 0, 0, - 480, 479, 1, 0, 0, 0, 481, 484, 1, 0, 0, 0, 482, 480, 1, 0, 0, 0, 482, - 483, 1, 0, 0, 0, 483, 174, 1, 0, 0, 0, 484, 482, 1, 0, 0, 0, 485, 486, - 7, 28, 0, 0, 486, 487, 1, 0, 0, 0, 487, 488, 6, 87, 0, 0, 488, 176, 1, - 0, 0, 0, 489, 490, 7, 29, 0, 0, 490, 178, 1, 0, 0, 0, 491, 493, 3, 177, - 88, 0, 492, 491, 1, 0, 0, 0, 493, 494, 1, 0, 0, 0, 494, 492, 1, 0, 0, 0, - 494, 495, 1, 0, 0, 0, 495, 496, 1, 0, 0, 0, 496, 498, 5, 46, 0, 0, 497, - 499, 3, 177, 88, 0, 498, 497, 1, 0, 0, 0, 499, 500, 1, 0, 0, 0, 500, 498, - 1, 0, 0, 0, 500, 501, 1, 0, 0, 0, 501, 516, 1, 0, 0, 0, 502, 504, 3, 177, - 88, 0, 503, 502, 1, 0, 0, 0, 504, 505, 1, 0, 0, 0, 505, 503, 1, 0, 0, 0, - 505, 506, 1, 0, 0, 0, 506, 507, 1, 0, 0, 0, 507, 508, 5, 46, 0, 0, 508, - 516, 1, 0, 0, 0, 509, 511, 5, 46, 0, 0, 510, 512, 3, 177, 88, 0, 511, 510, - 1, 0, 0, 0, 512, 513, 1, 0, 0, 0, 513, 511, 1, 0, 0, 0, 513, 514, 1, 0, - 0, 0, 514, 516, 1, 0, 0, 0, 515, 492, 1, 0, 0, 0, 515, 503, 1, 0, 0, 0, - 515, 509, 1, 0, 0, 0, 516, 180, 1, 0, 0, 0, 517, 519, 3, 177, 88, 0, 518, - 517, 1, 0, 0, 0, 519, 520, 1, 0, 0, 0, 520, 518, 1, 0, 0, 0, 520, 521, - 1, 0, 0, 0, 521, 182, 1, 0, 0, 0, 522, 525, 3, 181, 90, 0, 523, 525, 3, - 179, 89, 0, 524, 522, 1, 0, 0, 0, 524, 523, 1, 0, 0, 0, 525, 526, 1, 0, - 0, 0, 526, 528, 7, 4, 0, 0, 527, 529, 7, 30, 0, 0, 528, 527, 1, 0, 0, 0, - 528, 529, 1, 0, 0, 0, 529, 531, 1, 0, 0, 0, 530, 532, 3, 177, 88, 0, 531, - 530, 1, 0, 0, 0, 532, 533, 1, 0, 0, 0, 533, 531, 1, 0, 0, 0, 533, 534, - 1, 0, 0, 0, 534, 184, 1, 0, 0, 0, 535, 536, 3, 179, 89, 0, 536, 186, 1, - 0, 0, 0, 537, 538, 7, 31, 0, 0, 538, 188, 1, 0, 0, 0, 539, 540, 5, 48, - 0, 0, 540, 542, 7, 23, 0, 0, 541, 543, 3, 187, 93, 0, 542, 541, 1, 0, 0, - 0, 543, 544, 1, 0, 0, 0, 544, 542, 1, 0, 0, 0, 544, 545, 1, 0, 0, 0, 545, - 190, 1, 0, 0, 0, 546, 547, 7, 32, 0, 0, 547, 192, 1, 0, 0, 0, 548, 549, - 5, 92, 0, 0, 549, 559, 7, 33, 0, 0, 550, 551, 5, 92, 0, 0, 551, 552, 7, - 20, 0, 0, 552, 553, 1, 0, 0, 0, 553, 554, 3, 187, 93, 0, 554, 555, 3, 187, - 93, 0, 555, 556, 3, 187, 93, 0, 556, 557, 3, 187, 93, 0, 557, 559, 1, 0, - 0, 0, 558, 548, 1, 0, 0, 0, 558, 550, 1, 0, 0, 0, 559, 194, 1, 0, 0, 0, - 560, 563, 3, 193, 96, 0, 561, 563, 8, 34, 0, 0, 562, 560, 1, 0, 0, 0, 562, - 561, 1, 0, 0, 0, 563, 196, 1, 0, 0, 0, 564, 568, 3, 125, 62, 0, 565, 567, - 3, 195, 97, 0, 566, 565, 1, 0, 0, 0, 567, 570, 1, 0, 0, 0, 568, 566, 1, - 0, 0, 0, 568, 569, 1, 0, 0, 0, 569, 571, 1, 0, 0, 0, 570, 568, 1, 0, 0, - 0, 571, 572, 3, 125, 62, 0, 572, 198, 1, 0, 0, 0, 573, 577, 3, 127, 63, - 0, 574, 576, 3, 195, 97, 0, 575, 574, 1, 0, 0, 0, 576, 579, 1, 0, 0, 0, - 577, 575, 1, 0, 0, 0, 577, 578, 1, 0, 0, 0, 578, 580, 1, 0, 0, 0, 579, - 577, 1, 0, 0, 0, 580, 581, 3, 127, 63, 0, 581, 200, 1, 0, 0, 0, 16, 0, - 482, 494, 500, 505, 513, 515, 520, 524, 528, 533, 544, 558, 562, 568, 577, - 1, 0, 1, 0, + 7, 99, 2, 100, 7, 100, 2, 101, 7, 101, 2, 102, 7, 102, 2, 103, 7, 103, + 2, 104, 7, 104, 2, 105, 7, 105, 2, 106, 7, 106, 2, 107, 7, 107, 2, 108, + 7, 108, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1, + 5, 1, 5, 1, 6, 1, 6, 1, 7, 1, 7, 1, 8, 1, 8, 1, 9, 1, 9, 1, 10, 1, 10, + 1, 11, 1, 11, 1, 12, 1, 12, 1, 13, 1, 13, 1, 14, 1, 14, 1, 15, 1, 15, 1, + 16, 1, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 19, 1, 19, 1, 20, 1, 20, 1, 21, + 1, 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 24, 1, 24, 1, 25, 1, 25, 1, 26, 1, + 26, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, + 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, + 30, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, + 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, + 33, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, + 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, + 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, + 1, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 42, 1, + 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, + 1, 44, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, + 46, 1, 46, 1, 46, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 48, + 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 49, 1, 49, 1, 49, 1, 49, 1, 50, 1, + 50, 1, 50, 1, 50, 1, 50, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, + 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, + 53, 1, 53, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 55, 1, 55, 1, 55, 1, 55, + 1, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 57, 1, + 57, 1, 57, 1, 57, 1, 57, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, + 1, 60, 1, 60, 1, 61, 1, 61, 1, 62, 1, 62, 1, 63, 1, 63, 1, 64, 1, 64, 1, + 65, 1, 65, 1, 66, 1, 66, 1, 67, 1, 67, 1, 68, 1, 68, 1, 69, 1, 69, 1, 70, + 1, 70, 1, 70, 1, 71, 1, 71, 1, 72, 1, 72, 1, 73, 1, 73, 1, 74, 1, 74, 1, + 75, 1, 75, 1, 76, 1, 76, 1, 77, 1, 77, 1, 78, 1, 78, 1, 79, 1, 79, 1, 80, + 1, 80, 1, 80, 1, 81, 1, 81, 1, 82, 1, 82, 1, 83, 1, 83, 1, 84, 1, 84, 1, + 84, 1, 85, 1, 85, 1, 86, 1, 86, 1, 86, 1, 87, 1, 87, 1, 87, 1, 88, 1, 88, + 1, 88, 1, 89, 1, 89, 1, 89, 1, 89, 1, 90, 1, 90, 1, 90, 1, 91, 1, 91, 1, + 91, 1, 92, 1, 92, 1, 92, 1, 92, 1, 92, 1, 92, 1, 92, 1, 92, 1, 92, 1, 93, + 1, 93, 1, 93, 1, 93, 1, 94, 1, 94, 5, 94, 541, 8, 94, 10, 94, 12, 94, 544, + 9, 94, 1, 95, 1, 95, 1, 95, 1, 95, 1, 96, 1, 96, 1, 96, 1, 96, 5, 96, 554, + 8, 96, 10, 96, 12, 96, 557, 9, 96, 1, 96, 1, 96, 1, 97, 1, 97, 1, 98, 4, + 98, 564, 8, 98, 11, 98, 12, 98, 565, 1, 98, 1, 98, 4, 98, 570, 8, 98, 11, + 98, 12, 98, 571, 1, 98, 4, 98, 575, 8, 98, 11, 98, 12, 98, 576, 1, 98, + 1, 98, 1, 98, 1, 98, 4, 98, 583, 8, 98, 11, 98, 12, 98, 584, 3, 98, 587, + 8, 98, 1, 99, 4, 99, 590, 8, 99, 11, 99, 12, 99, 591, 1, 100, 1, 100, 3, + 100, 596, 8, 100, 1, 100, 1, 100, 3, 100, 600, 8, 100, 1, 100, 4, 100, + 603, 8, 100, 11, 100, 12, 100, 604, 1, 101, 1, 101, 1, 102, 1, 102, 1, + 103, 1, 103, 1, 103, 4, 103, 614, 8, 103, 11, 103, 12, 103, 615, 1, 104, + 1, 104, 1, 105, 1, 105, 1, 105, 1, 105, 1, 105, 1, 105, 1, 105, 1, 105, + 1, 105, 1, 105, 3, 105, 630, 8, 105, 1, 106, 1, 106, 3, 106, 634, 8, 106, + 1, 107, 1, 107, 5, 107, 638, 8, 107, 10, 107, 12, 107, 641, 9, 107, 1, + 107, 1, 107, 1, 108, 1, 108, 5, 108, 647, 8, 108, 10, 108, 12, 108, 650, + 9, 108, 1, 108, 1, 108, 0, 0, 109, 1, 0, 3, 0, 5, 0, 7, 0, 9, 0, 11, 0, + 13, 0, 15, 0, 17, 0, 19, 0, 21, 0, 23, 0, 25, 0, 27, 0, 29, 0, 31, 0, 33, + 0, 35, 0, 37, 0, 39, 0, 41, 0, 43, 0, 45, 0, 47, 0, 49, 0, 51, 0, 53, 1, + 55, 2, 57, 3, 59, 4, 61, 5, 63, 6, 65, 7, 67, 8, 69, 9, 71, 10, 73, 11, + 75, 12, 77, 13, 79, 14, 81, 15, 83, 16, 85, 17, 87, 18, 89, 19, 91, 20, + 93, 21, 95, 22, 97, 23, 99, 24, 101, 25, 103, 26, 105, 27, 107, 28, 109, + 29, 111, 30, 113, 31, 115, 32, 117, 33, 119, 34, 121, 35, 123, 36, 125, + 37, 127, 38, 129, 39, 131, 40, 133, 41, 135, 42, 137, 43, 139, 44, 141, + 45, 143, 46, 145, 47, 147, 48, 149, 49, 151, 50, 153, 51, 155, 52, 157, + 53, 159, 54, 161, 55, 163, 56, 165, 57, 167, 58, 169, 59, 171, 60, 173, + 61, 175, 62, 177, 63, 179, 64, 181, 65, 183, 66, 185, 67, 187, 68, 189, + 69, 191, 70, 193, 71, 195, 0, 197, 0, 199, 72, 201, 73, 203, 74, 205, 0, + 207, 75, 209, 0, 211, 0, 213, 0, 215, 76, 217, 77, 1, 0, 36, 2, 0, 65, + 65, 97, 97, 2, 0, 66, 66, 98, 98, 2, 0, 67, 67, 99, 99, 2, 0, 68, 68, 100, + 100, 2, 0, 69, 69, 101, 101, 2, 0, 70, 70, 102, 102, 2, 0, 71, 71, 103, + 103, 2, 0, 72, 72, 104, 104, 2, 0, 73, 73, 105, 105, 2, 0, 74, 74, 106, + 106, 2, 0, 75, 75, 107, 107, 2, 0, 76, 76, 108, 108, 2, 0, 77, 77, 109, + 109, 2, 0, 78, 78, 110, 110, 2, 0, 79, 79, 111, 111, 2, 0, 80, 80, 112, + 112, 2, 0, 81, 81, 113, 113, 2, 0, 82, 82, 114, 114, 2, 0, 83, 83, 115, + 115, 2, 0, 84, 84, 116, 116, 2, 0, 85, 85, 117, 117, 2, 0, 86, 86, 118, + 118, 2, 0, 87, 87, 119, 119, 2, 0, 88, 88, 120, 120, 2, 0, 89, 89, 121, + 121, 2, 0, 90, 90, 122, 122, 3, 0, 65, 90, 95, 95, 97, 122, 4, 0, 48, 57, + 65, 90, 95, 95, 97, 122, 3, 0, 9, 10, 12, 13, 32, 32, 2, 0, 10, 10, 13, + 13, 1, 0, 48, 57, 2, 0, 43, 43, 45, 45, 3, 0, 48, 57, 65, 70, 97, 102, + 10, 0, 192, 214, 216, 246, 248, 8191, 11264, 12287, 12352, 12687, 13056, + 13183, 13312, 16383, 19968, 55295, 63744, 64255, 65280, 65520, 14, 0, 34, + 34, 39, 39, 47, 47, 66, 66, 70, 70, 78, 78, 82, 82, 84, 84, 92, 92, 98, + 98, 102, 102, 110, 110, 114, 114, 116, 116, 5, 0, 10, 10, 13, 13, 34, 34, + 39, 39, 92, 92, 637, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, + 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, + 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, + 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, + 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, + 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, + 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, + 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, + 111, 1, 0, 0, 0, 0, 113, 1, 0, 0, 0, 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, + 0, 0, 0, 119, 1, 0, 0, 0, 0, 121, 1, 0, 0, 0, 0, 123, 1, 0, 0, 0, 0, 125, + 1, 0, 0, 0, 0, 127, 1, 0, 0, 0, 0, 129, 1, 0, 0, 0, 0, 131, 1, 0, 0, 0, + 0, 133, 1, 0, 0, 0, 0, 135, 1, 0, 0, 0, 0, 137, 1, 0, 0, 0, 0, 139, 1, + 0, 0, 0, 0, 141, 1, 0, 0, 0, 0, 143, 1, 0, 0, 0, 0, 145, 1, 0, 0, 0, 0, + 147, 1, 0, 0, 0, 0, 149, 1, 0, 0, 0, 0, 151, 1, 0, 0, 0, 0, 153, 1, 0, + 0, 0, 0, 155, 1, 0, 0, 0, 0, 157, 1, 0, 0, 0, 0, 159, 1, 0, 0, 0, 0, 161, + 1, 0, 0, 0, 0, 163, 1, 0, 0, 0, 0, 165, 1, 0, 0, 0, 0, 167, 1, 0, 0, 0, + 0, 169, 1, 0, 0, 0, 0, 171, 1, 0, 0, 0, 0, 173, 1, 0, 0, 0, 0, 175, 1, + 0, 0, 0, 0, 177, 1, 0, 0, 0, 0, 179, 1, 0, 0, 0, 0, 181, 1, 0, 0, 0, 0, + 183, 1, 0, 0, 0, 0, 185, 1, 0, 0, 0, 0, 187, 1, 0, 0, 0, 0, 189, 1, 0, + 0, 0, 0, 191, 1, 0, 0, 0, 0, 193, 1, 0, 0, 0, 0, 199, 1, 0, 0, 0, 0, 201, + 1, 0, 0, 0, 0, 203, 1, 0, 0, 0, 0, 207, 1, 0, 0, 0, 0, 215, 1, 0, 0, 0, + 0, 217, 1, 0, 0, 0, 1, 219, 1, 0, 0, 0, 3, 221, 1, 0, 0, 0, 5, 223, 1, + 0, 0, 0, 7, 225, 1, 0, 0, 0, 9, 227, 1, 0, 0, 0, 11, 229, 1, 0, 0, 0, 13, + 231, 1, 0, 0, 0, 15, 233, 1, 0, 0, 0, 17, 235, 1, 0, 0, 0, 19, 237, 1, + 0, 0, 0, 21, 239, 1, 0, 0, 0, 23, 241, 1, 0, 0, 0, 25, 243, 1, 0, 0, 0, + 27, 245, 1, 0, 0, 0, 29, 247, 1, 0, 0, 0, 31, 249, 1, 0, 0, 0, 33, 251, + 1, 0, 0, 0, 35, 253, 1, 0, 0, 0, 37, 255, 1, 0, 0, 0, 39, 257, 1, 0, 0, + 0, 41, 259, 1, 0, 0, 0, 43, 261, 1, 0, 0, 0, 45, 263, 1, 0, 0, 0, 47, 265, + 1, 0, 0, 0, 49, 267, 1, 0, 0, 0, 51, 269, 1, 0, 0, 0, 53, 271, 1, 0, 0, + 0, 55, 273, 1, 0, 0, 0, 57, 276, 1, 0, 0, 0, 59, 283, 1, 0, 0, 0, 61, 288, + 1, 0, 0, 0, 63, 297, 1, 0, 0, 0, 65, 307, 1, 0, 0, 0, 67, 312, 1, 0, 0, + 0, 69, 318, 1, 0, 0, 0, 71, 323, 1, 0, 0, 0, 73, 327, 1, 0, 0, 0, 75, 331, + 1, 0, 0, 0, 77, 337, 1, 0, 0, 0, 79, 341, 1, 0, 0, 0, 81, 344, 1, 0, 0, + 0, 83, 347, 1, 0, 0, 0, 85, 355, 1, 0, 0, 0, 87, 359, 1, 0, 0, 0, 89, 365, + 1, 0, 0, 0, 91, 371, 1, 0, 0, 0, 93, 374, 1, 0, 0, 0, 95, 380, 1, 0, 0, + 0, 97, 387, 1, 0, 0, 0, 99, 393, 1, 0, 0, 0, 101, 397, 1, 0, 0, 0, 103, + 402, 1, 0, 0, 0, 105, 409, 1, 0, 0, 0, 107, 414, 1, 0, 0, 0, 109, 421, + 1, 0, 0, 0, 111, 426, 1, 0, 0, 0, 113, 433, 1, 0, 0, 0, 115, 439, 1, 0, + 0, 0, 117, 444, 1, 0, 0, 0, 119, 449, 1, 0, 0, 0, 121, 451, 1, 0, 0, 0, + 123, 453, 1, 0, 0, 0, 125, 455, 1, 0, 0, 0, 127, 457, 1, 0, 0, 0, 129, + 459, 1, 0, 0, 0, 131, 461, 1, 0, 0, 0, 133, 463, 1, 0, 0, 0, 135, 465, + 1, 0, 0, 0, 137, 467, 1, 0, 0, 0, 139, 469, 1, 0, 0, 0, 141, 471, 1, 0, + 0, 0, 143, 474, 1, 0, 0, 0, 145, 476, 1, 0, 0, 0, 147, 478, 1, 0, 0, 0, + 149, 480, 1, 0, 0, 0, 151, 482, 1, 0, 0, 0, 153, 484, 1, 0, 0, 0, 155, + 486, 1, 0, 0, 0, 157, 488, 1, 0, 0, 0, 159, 490, 1, 0, 0, 0, 161, 492, + 1, 0, 0, 0, 163, 495, 1, 0, 0, 0, 165, 497, 1, 0, 0, 0, 167, 499, 1, 0, + 0, 0, 169, 501, 1, 0, 0, 0, 171, 504, 1, 0, 0, 0, 173, 506, 1, 0, 0, 0, + 175, 509, 1, 0, 0, 0, 177, 512, 1, 0, 0, 0, 179, 515, 1, 0, 0, 0, 181, + 519, 1, 0, 0, 0, 183, 522, 1, 0, 0, 0, 185, 525, 1, 0, 0, 0, 187, 534, + 1, 0, 0, 0, 189, 538, 1, 0, 0, 0, 191, 545, 1, 0, 0, 0, 193, 549, 1, 0, + 0, 0, 195, 560, 1, 0, 0, 0, 197, 586, 1, 0, 0, 0, 199, 589, 1, 0, 0, 0, + 201, 595, 1, 0, 0, 0, 203, 606, 1, 0, 0, 0, 205, 608, 1, 0, 0, 0, 207, + 610, 1, 0, 0, 0, 209, 617, 1, 0, 0, 0, 211, 629, 1, 0, 0, 0, 213, 633, + 1, 0, 0, 0, 215, 635, 1, 0, 0, 0, 217, 644, 1, 0, 0, 0, 219, 220, 7, 0, + 0, 0, 220, 2, 1, 0, 0, 0, 221, 222, 7, 1, 0, 0, 222, 4, 1, 0, 0, 0, 223, + 224, 7, 2, 0, 0, 224, 6, 1, 0, 0, 0, 225, 226, 7, 3, 0, 0, 226, 8, 1, 0, + 0, 0, 227, 228, 7, 4, 0, 0, 228, 10, 1, 0, 0, 0, 229, 230, 7, 5, 0, 0, + 230, 12, 1, 0, 0, 0, 231, 232, 7, 6, 0, 0, 232, 14, 1, 0, 0, 0, 233, 234, + 7, 7, 0, 0, 234, 16, 1, 0, 0, 0, 235, 236, 7, 8, 0, 0, 236, 18, 1, 0, 0, + 0, 237, 238, 7, 9, 0, 0, 238, 20, 1, 0, 0, 0, 239, 240, 7, 10, 0, 0, 240, + 22, 1, 0, 0, 0, 241, 242, 7, 11, 0, 0, 242, 24, 1, 0, 0, 0, 243, 244, 7, + 12, 0, 0, 244, 26, 1, 0, 0, 0, 245, 246, 7, 13, 0, 0, 246, 28, 1, 0, 0, + 0, 247, 248, 7, 14, 0, 0, 248, 30, 1, 0, 0, 0, 249, 250, 7, 15, 0, 0, 250, + 32, 1, 0, 0, 0, 251, 252, 7, 16, 0, 0, 252, 34, 1, 0, 0, 0, 253, 254, 7, + 17, 0, 0, 254, 36, 1, 0, 0, 0, 255, 256, 7, 18, 0, 0, 256, 38, 1, 0, 0, + 0, 257, 258, 7, 19, 0, 0, 258, 40, 1, 0, 0, 0, 259, 260, 7, 20, 0, 0, 260, + 42, 1, 0, 0, 0, 261, 262, 7, 21, 0, 0, 262, 44, 1, 0, 0, 0, 263, 264, 7, + 22, 0, 0, 264, 46, 1, 0, 0, 0, 265, 266, 7, 23, 0, 0, 266, 48, 1, 0, 0, + 0, 267, 268, 7, 24, 0, 0, 268, 50, 1, 0, 0, 0, 269, 270, 7, 25, 0, 0, 270, + 52, 1, 0, 0, 0, 271, 272, 5, 42, 0, 0, 272, 54, 1, 0, 0, 0, 273, 274, 7, + 0, 0, 0, 274, 275, 7, 18, 0, 0, 275, 56, 1, 0, 0, 0, 276, 277, 7, 18, 0, + 0, 277, 278, 7, 4, 0, 0, 278, 279, 7, 11, 0, 0, 279, 280, 7, 4, 0, 0, 280, + 281, 7, 2, 0, 0, 281, 282, 7, 19, 0, 0, 282, 58, 1, 0, 0, 0, 283, 284, + 7, 5, 0, 0, 284, 285, 7, 17, 0, 0, 285, 286, 7, 14, 0, 0, 286, 287, 7, + 12, 0, 0, 287, 60, 1, 0, 0, 0, 288, 289, 7, 3, 0, 0, 289, 290, 7, 8, 0, + 0, 290, 291, 7, 18, 0, 0, 291, 292, 7, 19, 0, 0, 292, 293, 7, 8, 0, 0, + 293, 294, 7, 13, 0, 0, 294, 295, 7, 2, 0, 0, 295, 296, 7, 19, 0, 0, 296, + 62, 1, 0, 0, 0, 297, 298, 7, 20, 0, 0, 298, 299, 7, 13, 0, 0, 299, 300, + 7, 3, 0, 0, 300, 301, 7, 4, 0, 0, 301, 302, 7, 5, 0, 0, 302, 303, 7, 8, + 0, 0, 303, 304, 7, 13, 0, 0, 304, 305, 7, 4, 0, 0, 305, 306, 7, 3, 0, 0, + 306, 64, 1, 0, 0, 0, 307, 308, 7, 13, 0, 0, 308, 309, 7, 20, 0, 0, 309, + 310, 7, 11, 0, 0, 310, 311, 7, 11, 0, 0, 311, 66, 1, 0, 0, 0, 312, 313, + 7, 5, 0, 0, 313, 314, 7, 0, 0, 0, 314, 315, 7, 11, 0, 0, 315, 316, 7, 18, + 0, 0, 316, 317, 7, 4, 0, 0, 317, 68, 1, 0, 0, 0, 318, 319, 7, 19, 0, 0, + 319, 320, 7, 17, 0, 0, 320, 321, 7, 20, 0, 0, 321, 322, 7, 4, 0, 0, 322, + 70, 1, 0, 0, 0, 323, 324, 7, 13, 0, 0, 324, 325, 7, 14, 0, 0, 325, 326, + 7, 19, 0, 0, 326, 72, 1, 0, 0, 0, 327, 328, 7, 20, 0, 0, 328, 329, 7, 3, + 0, 0, 329, 330, 7, 5, 0, 0, 330, 74, 1, 0, 0, 0, 331, 332, 7, 22, 0, 0, + 332, 333, 7, 7, 0, 0, 333, 334, 7, 4, 0, 0, 334, 335, 7, 17, 0, 0, 335, + 336, 7, 4, 0, 0, 336, 76, 1, 0, 0, 0, 337, 338, 7, 0, 0, 0, 338, 339, 7, + 13, 0, 0, 339, 340, 7, 3, 0, 0, 340, 78, 1, 0, 0, 0, 341, 342, 7, 14, 0, + 0, 342, 343, 7, 17, 0, 0, 343, 80, 1, 0, 0, 0, 344, 345, 7, 8, 0, 0, 345, + 346, 7, 13, 0, 0, 346, 82, 1, 0, 0, 0, 347, 348, 7, 1, 0, 0, 348, 349, + 7, 4, 0, 0, 349, 350, 7, 19, 0, 0, 350, 351, 7, 22, 0, 0, 351, 352, 7, + 4, 0, 0, 352, 353, 7, 4, 0, 0, 353, 354, 7, 13, 0, 0, 354, 84, 1, 0, 0, + 0, 355, 356, 7, 19, 0, 0, 356, 357, 7, 14, 0, 0, 357, 358, 7, 15, 0, 0, + 358, 86, 1, 0, 0, 0, 359, 360, 7, 21, 0, 0, 360, 361, 7, 0, 0, 0, 361, + 362, 7, 11, 0, 0, 362, 363, 7, 20, 0, 0, 363, 364, 7, 4, 0, 0, 364, 88, + 1, 0, 0, 0, 365, 366, 7, 14, 0, 0, 366, 367, 7, 17, 0, 0, 367, 368, 7, + 3, 0, 0, 368, 369, 7, 4, 0, 0, 369, 370, 7, 17, 0, 0, 370, 90, 1, 0, 0, + 0, 371, 372, 7, 1, 0, 0, 372, 373, 7, 24, 0, 0, 373, 92, 1, 0, 0, 0, 374, + 375, 7, 6, 0, 0, 375, 376, 7, 17, 0, 0, 376, 377, 7, 14, 0, 0, 377, 378, + 7, 20, 0, 0, 378, 379, 7, 15, 0, 0, 379, 94, 1, 0, 0, 0, 380, 381, 7, 14, + 0, 0, 381, 382, 7, 5, 0, 0, 382, 383, 7, 5, 0, 0, 383, 384, 7, 18, 0, 0, + 384, 385, 7, 4, 0, 0, 385, 386, 7, 19, 0, 0, 386, 96, 1, 0, 0, 0, 387, + 388, 7, 11, 0, 0, 388, 389, 7, 8, 0, 0, 389, 390, 7, 12, 0, 0, 390, 391, + 7, 8, 0, 0, 391, 392, 7, 19, 0, 0, 392, 98, 1, 0, 0, 0, 393, 394, 7, 0, + 0, 0, 394, 395, 7, 18, 0, 0, 395, 396, 7, 2, 0, 0, 396, 100, 1, 0, 0, 0, + 397, 398, 7, 3, 0, 0, 398, 399, 7, 4, 0, 0, 399, 400, 7, 18, 0, 0, 400, + 401, 7, 2, 0, 0, 401, 102, 1, 0, 0, 0, 402, 403, 7, 4, 0, 0, 403, 404, + 7, 23, 0, 0, 404, 405, 7, 8, 0, 0, 405, 406, 7, 18, 0, 0, 406, 407, 7, + 19, 0, 0, 407, 408, 7, 18, 0, 0, 408, 104, 1, 0, 0, 0, 409, 410, 7, 11, + 0, 0, 410, 411, 7, 8, 0, 0, 411, 412, 7, 10, 0, 0, 412, 413, 7, 4, 0, 0, + 413, 106, 1, 0, 0, 0, 414, 415, 7, 7, 0, 0, 415, 416, 7, 0, 0, 0, 416, + 417, 7, 21, 0, 0, 417, 418, 7, 8, 0, 0, 418, 419, 7, 13, 0, 0, 419, 420, + 7, 6, 0, 0, 420, 108, 1, 0, 0, 0, 421, 422, 7, 9, 0, 0, 422, 423, 7, 14, + 0, 0, 423, 424, 7, 8, 0, 0, 424, 425, 7, 13, 0, 0, 425, 110, 1, 0, 0, 0, + 426, 427, 7, 4, 0, 0, 427, 428, 7, 18, 0, 0, 428, 429, 7, 2, 0, 0, 429, + 430, 7, 0, 0, 0, 430, 431, 7, 15, 0, 0, 431, 432, 7, 4, 0, 0, 432, 112, + 1, 0, 0, 0, 433, 434, 7, 0, 0, 0, 434, 435, 7, 17, 0, 0, 435, 436, 7, 17, + 0, 0, 436, 437, 7, 0, 0, 0, 437, 438, 7, 24, 0, 0, 438, 114, 1, 0, 0, 0, + 439, 440, 7, 17, 0, 0, 440, 441, 7, 14, 0, 0, 441, 442, 7, 14, 0, 0, 442, + 443, 7, 19, 0, 0, 443, 116, 1, 0, 0, 0, 444, 445, 7, 17, 0, 0, 445, 446, + 7, 0, 0, 0, 446, 447, 7, 13, 0, 0, 447, 448, 7, 10, 0, 0, 448, 118, 1, + 0, 0, 0, 449, 450, 5, 64, 0, 0, 450, 120, 1, 0, 0, 0, 451, 452, 5, 123, + 0, 0, 452, 122, 1, 0, 0, 0, 453, 454, 5, 125, 0, 0, 454, 124, 1, 0, 0, + 0, 455, 456, 5, 91, 0, 0, 456, 126, 1, 0, 0, 0, 457, 458, 5, 93, 0, 0, + 458, 128, 1, 0, 0, 0, 459, 460, 5, 40, 0, 0, 460, 130, 1, 0, 0, 0, 461, + 462, 5, 41, 0, 0, 462, 132, 1, 0, 0, 0, 463, 464, 5, 39, 0, 0, 464, 134, + 1, 0, 0, 0, 465, 466, 5, 34, 0, 0, 466, 136, 1, 0, 0, 0, 467, 468, 5, 44, + 0, 0, 468, 138, 1, 0, 0, 0, 469, 470, 5, 46, 0, 0, 470, 140, 1, 0, 0, 0, + 471, 472, 5, 63, 0, 0, 472, 473, 5, 63, 0, 0, 473, 142, 1, 0, 0, 0, 474, + 475, 5, 63, 0, 0, 475, 144, 1, 0, 0, 0, 476, 477, 5, 58, 0, 0, 477, 146, + 1, 0, 0, 0, 478, 479, 5, 43, 0, 0, 479, 148, 1, 0, 0, 0, 480, 481, 5, 45, + 0, 0, 481, 150, 1, 0, 0, 0, 482, 483, 5, 126, 0, 0, 483, 152, 1, 0, 0, + 0, 484, 485, 5, 47, 0, 0, 485, 154, 1, 0, 0, 0, 486, 487, 5, 37, 0, 0, + 487, 156, 1, 0, 0, 0, 488, 489, 5, 38, 0, 0, 489, 158, 1, 0, 0, 0, 490, + 491, 5, 124, 0, 0, 491, 160, 1, 0, 0, 0, 492, 493, 5, 124, 0, 0, 493, 494, + 5, 124, 0, 0, 494, 162, 1, 0, 0, 0, 495, 496, 5, 94, 0, 0, 496, 164, 1, + 0, 0, 0, 497, 498, 5, 61, 0, 0, 498, 166, 1, 0, 0, 0, 499, 500, 5, 60, + 0, 0, 500, 168, 1, 0, 0, 0, 501, 502, 5, 60, 0, 0, 502, 503, 5, 61, 0, + 0, 503, 170, 1, 0, 0, 0, 504, 505, 5, 62, 0, 0, 505, 172, 1, 0, 0, 0, 506, + 507, 5, 62, 0, 0, 507, 508, 5, 61, 0, 0, 508, 174, 1, 0, 0, 0, 509, 510, + 5, 60, 0, 0, 510, 511, 5, 60, 0, 0, 511, 176, 1, 0, 0, 0, 512, 513, 5, + 62, 0, 0, 513, 514, 5, 62, 0, 0, 514, 178, 1, 0, 0, 0, 515, 516, 5, 62, + 0, 0, 516, 517, 5, 62, 0, 0, 517, 518, 5, 62, 0, 0, 518, 180, 1, 0, 0, + 0, 519, 520, 5, 33, 0, 0, 520, 521, 5, 61, 0, 0, 521, 182, 1, 0, 0, 0, + 522, 523, 5, 60, 0, 0, 523, 524, 5, 62, 0, 0, 524, 184, 1, 0, 0, 0, 525, + 526, 5, 73, 0, 0, 526, 527, 5, 110, 0, 0, 527, 528, 5, 102, 0, 0, 528, + 529, 5, 105, 0, 0, 529, 530, 5, 110, 0, 0, 530, 531, 5, 105, 0, 0, 531, + 532, 5, 116, 0, 0, 532, 533, 5, 121, 0, 0, 533, 186, 1, 0, 0, 0, 534, 535, + 5, 78, 0, 0, 535, 536, 5, 97, 0, 0, 536, 537, 5, 78, 0, 0, 537, 188, 1, + 0, 0, 0, 538, 542, 7, 26, 0, 0, 539, 541, 7, 27, 0, 0, 540, 539, 1, 0, + 0, 0, 541, 544, 1, 0, 0, 0, 542, 540, 1, 0, 0, 0, 542, 543, 1, 0, 0, 0, + 543, 190, 1, 0, 0, 0, 544, 542, 1, 0, 0, 0, 545, 546, 7, 28, 0, 0, 546, + 547, 1, 0, 0, 0, 547, 548, 6, 95, 0, 0, 548, 192, 1, 0, 0, 0, 549, 550, + 5, 45, 0, 0, 550, 551, 5, 45, 0, 0, 551, 555, 1, 0, 0, 0, 552, 554, 8, + 29, 0, 0, 553, 552, 1, 0, 0, 0, 554, 557, 1, 0, 0, 0, 555, 553, 1, 0, 0, + 0, 555, 556, 1, 0, 0, 0, 556, 558, 1, 0, 0, 0, 557, 555, 1, 0, 0, 0, 558, + 559, 6, 96, 0, 0, 559, 194, 1, 0, 0, 0, 560, 561, 7, 30, 0, 0, 561, 196, + 1, 0, 0, 0, 562, 564, 3, 195, 97, 0, 563, 562, 1, 0, 0, 0, 564, 565, 1, + 0, 0, 0, 565, 563, 1, 0, 0, 0, 565, 566, 1, 0, 0, 0, 566, 567, 1, 0, 0, + 0, 567, 569, 5, 46, 0, 0, 568, 570, 3, 195, 97, 0, 569, 568, 1, 0, 0, 0, + 570, 571, 1, 0, 0, 0, 571, 569, 1, 0, 0, 0, 571, 572, 1, 0, 0, 0, 572, + 587, 1, 0, 0, 0, 573, 575, 3, 195, 97, 0, 574, 573, 1, 0, 0, 0, 575, 576, + 1, 0, 0, 0, 576, 574, 1, 0, 0, 0, 576, 577, 1, 0, 0, 0, 577, 578, 1, 0, + 0, 0, 578, 579, 5, 46, 0, 0, 579, 587, 1, 0, 0, 0, 580, 582, 5, 46, 0, + 0, 581, 583, 3, 195, 97, 0, 582, 581, 1, 0, 0, 0, 583, 584, 1, 0, 0, 0, + 584, 582, 1, 0, 0, 0, 584, 585, 1, 0, 0, 0, 585, 587, 1, 0, 0, 0, 586, + 563, 1, 0, 0, 0, 586, 574, 1, 0, 0, 0, 586, 580, 1, 0, 0, 0, 587, 198, + 1, 0, 0, 0, 588, 590, 3, 195, 97, 0, 589, 588, 1, 0, 0, 0, 590, 591, 1, + 0, 0, 0, 591, 589, 1, 0, 0, 0, 591, 592, 1, 0, 0, 0, 592, 200, 1, 0, 0, + 0, 593, 596, 3, 199, 99, 0, 594, 596, 3, 197, 98, 0, 595, 593, 1, 0, 0, + 0, 595, 594, 1, 0, 0, 0, 596, 597, 1, 0, 0, 0, 597, 599, 7, 4, 0, 0, 598, + 600, 7, 31, 0, 0, 599, 598, 1, 0, 0, 0, 599, 600, 1, 0, 0, 0, 600, 602, + 1, 0, 0, 0, 601, 603, 3, 195, 97, 0, 602, 601, 1, 0, 0, 0, 603, 604, 1, + 0, 0, 0, 604, 602, 1, 0, 0, 0, 604, 605, 1, 0, 0, 0, 605, 202, 1, 0, 0, + 0, 606, 607, 3, 197, 98, 0, 607, 204, 1, 0, 0, 0, 608, 609, 7, 32, 0, 0, + 609, 206, 1, 0, 0, 0, 610, 611, 5, 48, 0, 0, 611, 613, 7, 23, 0, 0, 612, + 614, 3, 205, 102, 0, 613, 612, 1, 0, 0, 0, 614, 615, 1, 0, 0, 0, 615, 613, + 1, 0, 0, 0, 615, 616, 1, 0, 0, 0, 616, 208, 1, 0, 0, 0, 617, 618, 7, 33, + 0, 0, 618, 210, 1, 0, 0, 0, 619, 620, 5, 92, 0, 0, 620, 630, 7, 34, 0, + 0, 621, 622, 5, 92, 0, 0, 622, 623, 7, 20, 0, 0, 623, 624, 1, 0, 0, 0, + 624, 625, 3, 205, 102, 0, 625, 626, 3, 205, 102, 0, 626, 627, 3, 205, 102, + 0, 627, 628, 3, 205, 102, 0, 628, 630, 1, 0, 0, 0, 629, 619, 1, 0, 0, 0, + 629, 621, 1, 0, 0, 0, 630, 212, 1, 0, 0, 0, 631, 634, 3, 211, 105, 0, 632, + 634, 8, 35, 0, 0, 633, 631, 1, 0, 0, 0, 633, 632, 1, 0, 0, 0, 634, 214, + 1, 0, 0, 0, 635, 639, 3, 133, 66, 0, 636, 638, 3, 213, 106, 0, 637, 636, + 1, 0, 0, 0, 638, 641, 1, 0, 0, 0, 639, 637, 1, 0, 0, 0, 639, 640, 1, 0, + 0, 0, 640, 642, 1, 0, 0, 0, 641, 639, 1, 0, 0, 0, 642, 643, 3, 133, 66, + 0, 643, 216, 1, 0, 0, 0, 644, 648, 3, 135, 67, 0, 645, 647, 3, 213, 106, + 0, 646, 645, 1, 0, 0, 0, 647, 650, 1, 0, 0, 0, 648, 646, 1, 0, 0, 0, 648, + 649, 1, 0, 0, 0, 649, 651, 1, 0, 0, 0, 650, 648, 1, 0, 0, 0, 651, 652, + 3, 135, 67, 0, 652, 218, 1, 0, 0, 0, 17, 0, 542, 555, 565, 571, 576, 584, + 586, 591, 595, 599, 604, 615, 629, 633, 639, 648, 1, 0, 1, 0, } deserializer := antlr.NewATNDeserializer(nil) staticData.atn = deserializer.Deserialize(staticData.serializedATN) @@ -420,43 +456,52 @@ const ( CosmosDBLexerLIKE_SYMBOL = 27 CosmosDBLexerHAVING_SYMBOL = 28 CosmosDBLexerJOIN_SYMBOL = 29 - CosmosDBLexerAT_SYMBOL = 30 - CosmosDBLexerLC_BRACKET_SYMBOL = 31 - CosmosDBLexerRC_BRACKET_SYMBOL = 32 - CosmosDBLexerLS_BRACKET_SYMBOL = 33 - CosmosDBLexerRS_BRACKET_SYMBOL = 34 - CosmosDBLexerLR_BRACKET_SYMBOL = 35 - CosmosDBLexerRR_BRACKET_SYMBOL = 36 - CosmosDBLexerSINGLE_QUOTE_SYMBOL = 37 - CosmosDBLexerDOUBLE_QUOTE_SYMBOL = 38 - CosmosDBLexerCOMMA_SYMBOL = 39 - CosmosDBLexerDOT_SYMBOL = 40 - CosmosDBLexerQUESTION_MARK_SYMBOL = 41 - CosmosDBLexerCOLON_SYMBOL = 42 - CosmosDBLexerPLUS_SYMBOL = 43 - CosmosDBLexerMINUS_SYMBOL = 44 - CosmosDBLexerBIT_NOT_SYMBOL = 45 - CosmosDBLexerDIVIDE_SYMBOL = 46 - CosmosDBLexerMODULO_SYMBOL = 47 - CosmosDBLexerBIT_AND_SYMBOL = 48 - CosmosDBLexerBIT_OR_SYMBOL = 49 - CosmosDBLexerDOUBLE_BAR_SYMBOL = 50 - CosmosDBLexerBIT_XOR_SYMBOL = 51 - CosmosDBLexerEQUAL_SYMBOL = 52 - CosmosDBLexerLESS_THAN_OPERATOR = 53 - CosmosDBLexerLESS_THAN_EQUAL_OPERATOR = 54 - CosmosDBLexerGREATER_THAN_OPERATOR = 55 - CosmosDBLexerGREATER_THAN_EQUAL_OPERATOR = 56 - CosmosDBLexerLEFT_SHIFT_OPERATOR = 57 - CosmosDBLexerRIGHT_SHIFT_OPERATOR = 58 - CosmosDBLexerZERO_FILL_RIGHT_SHIFT_OPERATOR = 59 - CosmosDBLexerNOT_EQUAL_OPERATOR = 60 - CosmosDBLexerIDENTIFIER = 61 - CosmosDBLexerWHITESPACE = 62 - CosmosDBLexerDECIMAL = 63 - CosmosDBLexerREAL = 64 - CosmosDBLexerFLOAT = 65 - CosmosDBLexerHEXADECIMAL = 66 - CosmosDBLexerSINGLE_QUOTE_STRING_LITERAL = 67 - CosmosDBLexerDOUBLE_QUOTE_STRING_LITERAL = 68 + CosmosDBLexerESCAPE_SYMBOL = 30 + CosmosDBLexerARRAY_SYMBOL = 31 + CosmosDBLexerROOT_SYMBOL = 32 + CosmosDBLexerRANK_SYMBOL = 33 + CosmosDBLexerAT_SYMBOL = 34 + CosmosDBLexerLC_BRACKET_SYMBOL = 35 + CosmosDBLexerRC_BRACKET_SYMBOL = 36 + CosmosDBLexerLS_BRACKET_SYMBOL = 37 + CosmosDBLexerRS_BRACKET_SYMBOL = 38 + CosmosDBLexerLR_BRACKET_SYMBOL = 39 + CosmosDBLexerRR_BRACKET_SYMBOL = 40 + CosmosDBLexerSINGLE_QUOTE_SYMBOL = 41 + CosmosDBLexerDOUBLE_QUOTE_SYMBOL = 42 + CosmosDBLexerCOMMA_SYMBOL = 43 + CosmosDBLexerDOT_SYMBOL = 44 + CosmosDBLexerDOUBLE_QUESTION_MARK_SYMBOL = 45 + CosmosDBLexerQUESTION_MARK_SYMBOL = 46 + CosmosDBLexerCOLON_SYMBOL = 47 + CosmosDBLexerPLUS_SYMBOL = 48 + CosmosDBLexerMINUS_SYMBOL = 49 + CosmosDBLexerBIT_NOT_SYMBOL = 50 + CosmosDBLexerDIVIDE_SYMBOL = 51 + CosmosDBLexerMODULO_SYMBOL = 52 + CosmosDBLexerBIT_AND_SYMBOL = 53 + CosmosDBLexerBIT_OR_SYMBOL = 54 + CosmosDBLexerDOUBLE_BAR_SYMBOL = 55 + CosmosDBLexerBIT_XOR_SYMBOL = 56 + CosmosDBLexerEQUAL_SYMBOL = 57 + CosmosDBLexerLESS_THAN_OPERATOR = 58 + CosmosDBLexerLESS_THAN_EQUAL_OPERATOR = 59 + CosmosDBLexerGREATER_THAN_OPERATOR = 60 + CosmosDBLexerGREATER_THAN_EQUAL_OPERATOR = 61 + CosmosDBLexerLEFT_SHIFT_OPERATOR = 62 + CosmosDBLexerRIGHT_SHIFT_OPERATOR = 63 + CosmosDBLexerZERO_FILL_RIGHT_SHIFT_OPERATOR = 64 + CosmosDBLexerNOT_EQUAL_OPERATOR = 65 + CosmosDBLexerNOT_EQUAL_OPERATOR_2 = 66 + CosmosDBLexerINFINITY_SYMBOL = 67 + CosmosDBLexerNAN_SYMBOL = 68 + CosmosDBLexerIDENTIFIER = 69 + CosmosDBLexerWHITESPACE = 70 + CosmosDBLexerLINE_COMMENT = 71 + CosmosDBLexerDECIMAL = 72 + CosmosDBLexerREAL = 73 + CosmosDBLexerFLOAT = 74 + CosmosDBLexerHEXADECIMAL = 75 + CosmosDBLexerSINGLE_QUOTE_STRING_LITERAL = 76 + CosmosDBLexerDOUBLE_QUOTE_STRING_LITERAL = 77 ) diff --git a/cosmosdb/cosmosdb_parser.go b/cosmosdb/cosmosdb_parser.go index 32f0da6..fda179c 100644 --- a/cosmosdb/cosmosdb_parser.go +++ b/cosmosdb/cosmosdb_parser.go @@ -36,10 +36,11 @@ func cosmosdbparserParserInit() { "'NULL'", "'FALSE'", "'TRUE'", "'NOT'", "'UDF'", "'WHERE'", "'AND'", "'OR'", "'IN'", "'BETWEEN'", "'TOP'", "'VALUE'", "'ORDER'", "'BY'", "'GROUP'", "'OFFSET'", "'LIMIT'", "'ASC'", "'DESC'", "'EXISTS'", "'LIKE'", - "'HAVING'", "'JOIN'", "'@'", "'{'", "'}'", "'['", "']'", "'('", "')'", - "'''", "'\"'", "','", "'.'", "'?'", "':'", "'+'", "'-'", "'~'", "'/'", - "'%'", "'&'", "'|'", "'||'", "'^'", "'='", "'<'", "'<='", "'>'", "'>='", - "'<<'", "'>>'", "'>>>'", "'!='", + "'HAVING'", "'JOIN'", "'ESCAPE'", "'ARRAY'", "'ROOT'", "'RANK'", "'@'", + "'{'", "'}'", "'['", "']'", "'('", "')'", "'''", "'\"'", "','", "'.'", + "'??'", "'?'", "':'", "'+'", "'-'", "'~'", "'/'", "'%'", "'&'", "'|'", + "'||'", "'^'", "'='", "'<'", "'<='", "'>'", "'>='", "'<<'", "'>>'", + "'>>>'", "'!='", "'<>'", } staticData.SymbolicNames = []string{ "", "MULTIPLY_OPERATOR", "AS_SYMBOL", "SELECT_SYMBOL", "FROM_SYMBOL", @@ -48,16 +49,18 @@ func cosmosdbparserParserInit() { "OR_SYMBOL", "IN_SYMBOL", "BETWEEN_SYMBOL", "TOP_SYMBOL", "VALUE_SYMBOL", "ORDER_SYMBOL", "BY_SYMBOL", "GROUP_SYMBOL", "OFFSET_SYMBOL", "LIMIT_SYMBOL", "ASC_SYMBOL", "DESC_SYMBOL", "EXISTS_SYMBOL", "LIKE_SYMBOL", "HAVING_SYMBOL", - "JOIN_SYMBOL", "AT_SYMBOL", "LC_BRACKET_SYMBOL", "RC_BRACKET_SYMBOL", - "LS_BRACKET_SYMBOL", "RS_BRACKET_SYMBOL", "LR_BRACKET_SYMBOL", "RR_BRACKET_SYMBOL", - "SINGLE_QUOTE_SYMBOL", "DOUBLE_QUOTE_SYMBOL", "COMMA_SYMBOL", "DOT_SYMBOL", + "JOIN_SYMBOL", "ESCAPE_SYMBOL", "ARRAY_SYMBOL", "ROOT_SYMBOL", "RANK_SYMBOL", + "AT_SYMBOL", "LC_BRACKET_SYMBOL", "RC_BRACKET_SYMBOL", "LS_BRACKET_SYMBOL", + "RS_BRACKET_SYMBOL", "LR_BRACKET_SYMBOL", "RR_BRACKET_SYMBOL", "SINGLE_QUOTE_SYMBOL", + "DOUBLE_QUOTE_SYMBOL", "COMMA_SYMBOL", "DOT_SYMBOL", "DOUBLE_QUESTION_MARK_SYMBOL", "QUESTION_MARK_SYMBOL", "COLON_SYMBOL", "PLUS_SYMBOL", "MINUS_SYMBOL", "BIT_NOT_SYMBOL", "DIVIDE_SYMBOL", "MODULO_SYMBOL", "BIT_AND_SYMBOL", "BIT_OR_SYMBOL", "DOUBLE_BAR_SYMBOL", "BIT_XOR_SYMBOL", "EQUAL_SYMBOL", "LESS_THAN_OPERATOR", "LESS_THAN_EQUAL_OPERATOR", "GREATER_THAN_OPERATOR", "GREATER_THAN_EQUAL_OPERATOR", "LEFT_SHIFT_OPERATOR", "RIGHT_SHIFT_OPERATOR", - "ZERO_FILL_RIGHT_SHIFT_OPERATOR", "NOT_EQUAL_OPERATOR", "IDENTIFIER", - "WHITESPACE", "DECIMAL", "REAL", "FLOAT", "HEXADECIMAL", "SINGLE_QUOTE_STRING_LITERAL", + "ZERO_FILL_RIGHT_SHIFT_OPERATOR", "NOT_EQUAL_OPERATOR", "NOT_EQUAL_OPERATOR_2", + "INFINITY_SYMBOL", "NAN_SYMBOL", "IDENTIFIER", "WHITESPACE", "LINE_COMMENT", + "DECIMAL", "REAL", "FLOAT", "HEXADECIMAL", "SINGLE_QUOTE_STRING_LITERAL", "DOUBLE_QUOTE_STRING_LITERAL", } staticData.RuleNames = []string{ @@ -76,7 +79,7 @@ func cosmosdbparserParserInit() { } staticData.PredictionContextCache = antlr.NewPredictionContextCache() staticData.serializedATN = []int32{ - 4, 1, 68, 443, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, + 4, 1, 77, 507, 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, @@ -92,187 +95,224 @@ func cosmosdbparserParserInit() { 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 5, 7, 145, 8, 7, 10, 7, 12, 7, 148, 9, 7, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 5, 9, 158, 8, 9, 10, 9, 12, 9, 161, 9, 9, 1, 10, 1, 10, 3, 10, 165, - 8, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 13, 1, 13, 5, - 13, 176, 8, 13, 10, 13, 12, 13, 179, 9, 13, 1, 14, 1, 14, 3, 14, 183, 8, - 14, 1, 14, 3, 14, 186, 8, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, - 1, 16, 1, 17, 1, 17, 1, 17, 5, 17, 198, 8, 17, 10, 17, 12, 17, 201, 9, - 17, 1, 18, 1, 18, 3, 18, 205, 8, 18, 1, 18, 3, 18, 208, 8, 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, 3, 20, 237, 8, 20, 1, 20, 1, 20, 1, 20, + 8, 10, 1, 10, 1, 10, 3, 10, 169, 8, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, + 11, 1, 12, 1, 12, 5, 12, 178, 8, 12, 10, 12, 12, 12, 181, 9, 12, 1, 13, + 1, 13, 3, 13, 185, 8, 13, 1, 13, 3, 13, 188, 8, 13, 1, 13, 1, 13, 1, 13, + 1, 13, 3, 13, 194, 8, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, + 14, 3, 14, 203, 8, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, + 1, 14, 3, 14, 213, 8, 14, 1, 14, 5, 14, 216, 8, 14, 10, 14, 12, 14, 219, + 9, 14, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 5, 17, 229, + 8, 17, 10, 17, 12, 17, 232, 9, 17, 1, 18, 1, 18, 3, 18, 236, 8, 18, 1, + 18, 3, 18, 239, 8, 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, 3, 20, 269, 8, 20, 1, 20, 1, - 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 278, 8, 20, 1, 20, 1, 20, + 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 273, 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, 3, 20, - 302, 8, 20, 1, 20, 1, 20, 1, 20, 3, 20, 307, 8, 20, 1, 20, 1, 20, 1, 20, - 1, 20, 1, 20, 5, 20, 314, 8, 20, 10, 20, 12, 20, 317, 9, 20, 3, 20, 319, - 8, 20, 1, 20, 5, 20, 322, 8, 20, 10, 20, 12, 20, 325, 9, 20, 1, 21, 1, - 21, 1, 21, 1, 21, 5, 21, 331, 8, 21, 10, 21, 12, 21, 334, 9, 21, 3, 21, - 336, 8, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 5, 22, 344, 8, 22, - 10, 22, 12, 22, 347, 9, 22, 3, 22, 349, 8, 22, 1, 22, 1, 22, 1, 23, 1, - 23, 3, 23, 355, 8, 23, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 3, 24, 362, 8, - 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 5, 25, 371, 8, 25, - 10, 25, 12, 25, 374, 9, 25, 3, 25, 376, 8, 25, 1, 25, 1, 25, 1, 26, 1, - 26, 1, 26, 1, 26, 3, 26, 384, 8, 26, 1, 26, 1, 26, 5, 26, 388, 8, 26, 10, - 26, 12, 26, 391, 9, 26, 3, 26, 393, 8, 26, 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, 32, 1, 32, 1, - 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 3, 33, 415, 8, 33, 1, 34, 1, 34, - 1, 35, 1, 35, 1, 36, 1, 36, 1, 37, 1, 37, 3, 37, 425, 8, 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, 45, 0, 1, 40, 46, 0, 2, 4, 6, 8, 10, 12, - 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, - 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, - 86, 88, 90, 0, 10, 1, 0, 24, 25, 2, 0, 1, 1, 46, 47, 1, 0, 43, 44, 1, 0, - 57, 59, 2, 0, 52, 56, 60, 60, 1, 0, 43, 45, 1, 0, 8, 9, 1, 0, 67, 68, 1, - 0, 63, 65, 2, 0, 15, 29, 61, 61, 464, 0, 92, 1, 0, 0, 0, 2, 95, 1, 0, 0, - 0, 4, 114, 1, 0, 0, 0, 6, 120, 1, 0, 0, 0, 8, 131, 1, 0, 0, 0, 10, 133, - 1, 0, 0, 0, 12, 136, 1, 0, 0, 0, 14, 139, 1, 0, 0, 0, 16, 149, 1, 0, 0, - 0, 18, 152, 1, 0, 0, 0, 20, 162, 1, 0, 0, 0, 22, 166, 1, 0, 0, 0, 24, 171, - 1, 0, 0, 0, 26, 173, 1, 0, 0, 0, 28, 180, 1, 0, 0, 0, 30, 187, 1, 0, 0, - 0, 32, 192, 1, 0, 0, 0, 34, 194, 1, 0, 0, 0, 36, 202, 1, 0, 0, 0, 38, 209, - 1, 0, 0, 0, 40, 236, 1, 0, 0, 0, 42, 326, 1, 0, 0, 0, 44, 339, 1, 0, 0, - 0, 46, 354, 1, 0, 0, 0, 48, 361, 1, 0, 0, 0, 50, 363, 1, 0, 0, 0, 52, 379, - 1, 0, 0, 0, 54, 396, 1, 0, 0, 0, 56, 398, 1, 0, 0, 0, 58, 400, 1, 0, 0, - 0, 60, 402, 1, 0, 0, 0, 62, 404, 1, 0, 0, 0, 64, 406, 1, 0, 0, 0, 66, 414, - 1, 0, 0, 0, 68, 416, 1, 0, 0, 0, 70, 418, 1, 0, 0, 0, 72, 420, 1, 0, 0, - 0, 74, 424, 1, 0, 0, 0, 76, 426, 1, 0, 0, 0, 78, 428, 1, 0, 0, 0, 80, 430, - 1, 0, 0, 0, 82, 432, 1, 0, 0, 0, 84, 434, 1, 0, 0, 0, 86, 436, 1, 0, 0, - 0, 88, 438, 1, 0, 0, 0, 90, 440, 1, 0, 0, 0, 92, 93, 3, 2, 1, 0, 93, 94, - 5, 0, 0, 1, 94, 1, 1, 0, 0, 0, 95, 97, 3, 4, 2, 0, 96, 98, 3, 10, 5, 0, - 97, 96, 1, 0, 0, 0, 97, 98, 1, 0, 0, 0, 98, 100, 1, 0, 0, 0, 99, 101, 3, - 12, 6, 0, 100, 99, 1, 0, 0, 0, 100, 101, 1, 0, 0, 0, 101, 103, 1, 0, 0, - 0, 102, 104, 3, 14, 7, 0, 103, 102, 1, 0, 0, 0, 103, 104, 1, 0, 0, 0, 104, - 106, 1, 0, 0, 0, 105, 107, 3, 16, 8, 0, 106, 105, 1, 0, 0, 0, 106, 107, - 1, 0, 0, 0, 107, 109, 1, 0, 0, 0, 108, 110, 3, 18, 9, 0, 109, 108, 1, 0, - 0, 0, 109, 110, 1, 0, 0, 0, 110, 112, 1, 0, 0, 0, 111, 113, 3, 22, 11, - 0, 112, 111, 1, 0, 0, 0, 112, 113, 1, 0, 0, 0, 113, 3, 1, 0, 0, 0, 114, - 116, 5, 3, 0, 0, 115, 117, 3, 6, 3, 0, 116, 115, 1, 0, 0, 0, 116, 117, - 1, 0, 0, 0, 117, 118, 1, 0, 0, 0, 118, 119, 3, 8, 4, 0, 119, 5, 1, 0, 0, - 0, 120, 121, 5, 17, 0, 0, 121, 122, 5, 63, 0, 0, 122, 7, 1, 0, 0, 0, 123, - 132, 5, 1, 0, 0, 124, 126, 5, 5, 0, 0, 125, 124, 1, 0, 0, 0, 125, 126, - 1, 0, 0, 0, 126, 128, 1, 0, 0, 0, 127, 129, 5, 18, 0, 0, 128, 127, 1, 0, - 0, 0, 128, 129, 1, 0, 0, 0, 129, 130, 1, 0, 0, 0, 130, 132, 3, 34, 17, - 0, 131, 123, 1, 0, 0, 0, 131, 125, 1, 0, 0, 0, 132, 9, 1, 0, 0, 0, 133, - 134, 5, 4, 0, 0, 134, 135, 3, 24, 12, 0, 135, 11, 1, 0, 0, 0, 136, 137, - 5, 12, 0, 0, 137, 138, 3, 40, 20, 0, 138, 13, 1, 0, 0, 0, 139, 140, 5, - 21, 0, 0, 140, 141, 5, 20, 0, 0, 141, 146, 3, 40, 20, 0, 142, 143, 5, 39, - 0, 0, 143, 145, 3, 40, 20, 0, 144, 142, 1, 0, 0, 0, 145, 148, 1, 0, 0, - 0, 146, 144, 1, 0, 0, 0, 146, 147, 1, 0, 0, 0, 147, 15, 1, 0, 0, 0, 148, - 146, 1, 0, 0, 0, 149, 150, 5, 28, 0, 0, 150, 151, 3, 40, 20, 0, 151, 17, - 1, 0, 0, 0, 152, 153, 5, 19, 0, 0, 153, 154, 5, 20, 0, 0, 154, 159, 3, - 20, 10, 0, 155, 156, 5, 39, 0, 0, 156, 158, 3, 20, 10, 0, 157, 155, 1, - 0, 0, 0, 158, 161, 1, 0, 0, 0, 159, 157, 1, 0, 0, 0, 159, 160, 1, 0, 0, - 0, 160, 19, 1, 0, 0, 0, 161, 159, 1, 0, 0, 0, 162, 164, 3, 40, 20, 0, 163, - 165, 7, 0, 0, 0, 164, 163, 1, 0, 0, 0, 164, 165, 1, 0, 0, 0, 165, 21, 1, - 0, 0, 0, 166, 167, 5, 22, 0, 0, 167, 168, 5, 63, 0, 0, 168, 169, 5, 23, - 0, 0, 169, 170, 5, 63, 0, 0, 170, 23, 1, 0, 0, 0, 171, 172, 3, 26, 13, - 0, 172, 25, 1, 0, 0, 0, 173, 177, 3, 28, 14, 0, 174, 176, 3, 30, 15, 0, - 175, 174, 1, 0, 0, 0, 176, 179, 1, 0, 0, 0, 177, 175, 1, 0, 0, 0, 177, - 178, 1, 0, 0, 0, 178, 27, 1, 0, 0, 0, 179, 177, 1, 0, 0, 0, 180, 185, 3, - 32, 16, 0, 181, 183, 5, 2, 0, 0, 182, 181, 1, 0, 0, 0, 182, 183, 1, 0, - 0, 0, 183, 184, 1, 0, 0, 0, 184, 186, 3, 84, 42, 0, 185, 182, 1, 0, 0, - 0, 185, 186, 1, 0, 0, 0, 186, 29, 1, 0, 0, 0, 187, 188, 5, 29, 0, 0, 188, - 189, 3, 84, 42, 0, 189, 190, 5, 15, 0, 0, 190, 191, 3, 40, 20, 0, 191, - 31, 1, 0, 0, 0, 192, 193, 3, 84, 42, 0, 193, 33, 1, 0, 0, 0, 194, 199, - 3, 36, 18, 0, 195, 196, 5, 39, 0, 0, 196, 198, 3, 36, 18, 0, 197, 195, - 1, 0, 0, 0, 198, 201, 1, 0, 0, 0, 199, 197, 1, 0, 0, 0, 199, 200, 1, 0, - 0, 0, 200, 35, 1, 0, 0, 0, 201, 199, 1, 0, 0, 0, 202, 207, 3, 40, 20, 0, - 203, 205, 5, 2, 0, 0, 204, 203, 1, 0, 0, 0, 204, 205, 1, 0, 0, 0, 205, - 206, 1, 0, 0, 0, 206, 208, 3, 38, 19, 0, 207, 204, 1, 0, 0, 0, 207, 208, - 1, 0, 0, 0, 208, 37, 1, 0, 0, 0, 209, 210, 3, 84, 42, 0, 210, 39, 1, 0, - 0, 0, 211, 212, 6, 20, -1, 0, 212, 237, 3, 66, 33, 0, 213, 237, 3, 90, - 45, 0, 214, 237, 3, 64, 32, 0, 215, 237, 3, 48, 24, 0, 216, 237, 3, 44, - 22, 0, 217, 237, 3, 42, 21, 0, 218, 219, 5, 35, 0, 0, 219, 220, 3, 40, - 20, 0, 220, 221, 5, 36, 0, 0, 221, 237, 1, 0, 0, 0, 222, 223, 5, 35, 0, - 0, 223, 224, 3, 2, 1, 0, 224, 225, 5, 36, 0, 0, 225, 237, 1, 0, 0, 0, 226, - 227, 5, 26, 0, 0, 227, 228, 5, 35, 0, 0, 228, 229, 3, 2, 1, 0, 229, 230, - 5, 36, 0, 0, 230, 237, 1, 0, 0, 0, 231, 232, 3, 62, 31, 0, 232, 233, 3, - 40, 20, 16, 233, 237, 1, 0, 0, 0, 234, 235, 5, 10, 0, 0, 235, 237, 3, 40, - 20, 15, 236, 211, 1, 0, 0, 0, 236, 213, 1, 0, 0, 0, 236, 214, 1, 0, 0, - 0, 236, 215, 1, 0, 0, 0, 236, 216, 1, 0, 0, 0, 236, 217, 1, 0, 0, 0, 236, - 218, 1, 0, 0, 0, 236, 222, 1, 0, 0, 0, 236, 226, 1, 0, 0, 0, 236, 231, - 1, 0, 0, 0, 236, 234, 1, 0, 0, 0, 237, 323, 1, 0, 0, 0, 238, 239, 10, 14, - 0, 0, 239, 240, 3, 54, 27, 0, 240, 241, 3, 40, 20, 15, 241, 322, 1, 0, - 0, 0, 242, 243, 10, 13, 0, 0, 243, 244, 3, 56, 28, 0, 244, 245, 3, 40, - 20, 14, 245, 322, 1, 0, 0, 0, 246, 247, 10, 12, 0, 0, 247, 248, 3, 58, - 29, 0, 248, 249, 3, 40, 20, 13, 249, 322, 1, 0, 0, 0, 250, 251, 10, 11, - 0, 0, 251, 252, 5, 48, 0, 0, 252, 322, 3, 40, 20, 12, 253, 254, 10, 10, - 0, 0, 254, 255, 5, 51, 0, 0, 255, 322, 3, 40, 20, 11, 256, 257, 10, 9, - 0, 0, 257, 258, 5, 49, 0, 0, 258, 322, 3, 40, 20, 10, 259, 260, 10, 8, - 0, 0, 260, 261, 5, 50, 0, 0, 261, 322, 3, 40, 20, 9, 262, 263, 10, 7, 0, - 0, 263, 264, 3, 60, 30, 0, 264, 265, 3, 40, 20, 8, 265, 322, 1, 0, 0, 0, - 266, 268, 10, 5, 0, 0, 267, 269, 5, 10, 0, 0, 268, 267, 1, 0, 0, 0, 268, - 269, 1, 0, 0, 0, 269, 270, 1, 0, 0, 0, 270, 271, 5, 16, 0, 0, 271, 272, - 3, 40, 20, 0, 272, 273, 5, 13, 0, 0, 273, 274, 3, 40, 20, 6, 274, 322, - 1, 0, 0, 0, 275, 277, 10, 4, 0, 0, 276, 278, 5, 10, 0, 0, 277, 276, 1, - 0, 0, 0, 277, 278, 1, 0, 0, 0, 278, 279, 1, 0, 0, 0, 279, 280, 5, 27, 0, - 0, 280, 322, 3, 40, 20, 5, 281, 282, 10, 3, 0, 0, 282, 283, 5, 13, 0, 0, - 283, 322, 3, 40, 20, 4, 284, 285, 10, 2, 0, 0, 285, 286, 5, 14, 0, 0, 286, - 322, 3, 40, 20, 3, 287, 288, 10, 1, 0, 0, 288, 289, 5, 41, 0, 0, 289, 290, - 3, 40, 20, 0, 290, 291, 5, 42, 0, 0, 291, 292, 3, 40, 20, 2, 292, 322, - 1, 0, 0, 0, 293, 294, 10, 18, 0, 0, 294, 295, 5, 40, 0, 0, 295, 322, 3, - 86, 43, 0, 296, 297, 10, 17, 0, 0, 297, 301, 5, 33, 0, 0, 298, 302, 5, - 68, 0, 0, 299, 302, 5, 67, 0, 0, 300, 302, 3, 88, 44, 0, 301, 298, 1, 0, - 0, 0, 301, 299, 1, 0, 0, 0, 301, 300, 1, 0, 0, 0, 302, 303, 1, 0, 0, 0, - 303, 322, 5, 34, 0, 0, 304, 306, 10, 6, 0, 0, 305, 307, 5, 10, 0, 0, 306, - 305, 1, 0, 0, 0, 306, 307, 1, 0, 0, 0, 307, 308, 1, 0, 0, 0, 308, 309, - 5, 15, 0, 0, 309, 318, 5, 35, 0, 0, 310, 315, 3, 40, 20, 0, 311, 312, 5, - 39, 0, 0, 312, 314, 3, 40, 20, 0, 313, 311, 1, 0, 0, 0, 314, 317, 1, 0, - 0, 0, 315, 313, 1, 0, 0, 0, 315, 316, 1, 0, 0, 0, 316, 319, 1, 0, 0, 0, - 317, 315, 1, 0, 0, 0, 318, 310, 1, 0, 0, 0, 318, 319, 1, 0, 0, 0, 319, - 320, 1, 0, 0, 0, 320, 322, 5, 36, 0, 0, 321, 238, 1, 0, 0, 0, 321, 242, - 1, 0, 0, 0, 321, 246, 1, 0, 0, 0, 321, 250, 1, 0, 0, 0, 321, 253, 1, 0, - 0, 0, 321, 256, 1, 0, 0, 0, 321, 259, 1, 0, 0, 0, 321, 262, 1, 0, 0, 0, - 321, 266, 1, 0, 0, 0, 321, 275, 1, 0, 0, 0, 321, 281, 1, 0, 0, 0, 321, - 284, 1, 0, 0, 0, 321, 287, 1, 0, 0, 0, 321, 293, 1, 0, 0, 0, 321, 296, - 1, 0, 0, 0, 321, 304, 1, 0, 0, 0, 322, 325, 1, 0, 0, 0, 323, 321, 1, 0, - 0, 0, 323, 324, 1, 0, 0, 0, 324, 41, 1, 0, 0, 0, 325, 323, 1, 0, 0, 0, - 326, 335, 5, 33, 0, 0, 327, 332, 3, 40, 20, 0, 328, 329, 5, 39, 0, 0, 329, - 331, 3, 40, 20, 0, 330, 328, 1, 0, 0, 0, 331, 334, 1, 0, 0, 0, 332, 330, - 1, 0, 0, 0, 332, 333, 1, 0, 0, 0, 333, 336, 1, 0, 0, 0, 334, 332, 1, 0, - 0, 0, 335, 327, 1, 0, 0, 0, 335, 336, 1, 0, 0, 0, 336, 337, 1, 0, 0, 0, - 337, 338, 5, 34, 0, 0, 338, 43, 1, 0, 0, 0, 339, 348, 5, 31, 0, 0, 340, - 345, 3, 46, 23, 0, 341, 342, 5, 39, 0, 0, 342, 344, 3, 46, 23, 0, 343, - 341, 1, 0, 0, 0, 344, 347, 1, 0, 0, 0, 345, 343, 1, 0, 0, 0, 345, 346, - 1, 0, 0, 0, 346, 349, 1, 0, 0, 0, 347, 345, 1, 0, 0, 0, 348, 340, 1, 0, - 0, 0, 348, 349, 1, 0, 0, 0, 349, 350, 1, 0, 0, 0, 350, 351, 5, 32, 0, 0, - 351, 45, 1, 0, 0, 0, 352, 355, 3, 78, 39, 0, 353, 355, 3, 86, 43, 0, 354, - 352, 1, 0, 0, 0, 354, 353, 1, 0, 0, 0, 355, 356, 1, 0, 0, 0, 356, 357, - 5, 42, 0, 0, 357, 358, 3, 40, 20, 0, 358, 47, 1, 0, 0, 0, 359, 362, 3, - 50, 25, 0, 360, 362, 3, 52, 26, 0, 361, 359, 1, 0, 0, 0, 361, 360, 1, 0, - 0, 0, 362, 49, 1, 0, 0, 0, 363, 364, 5, 11, 0, 0, 364, 365, 5, 40, 0, 0, - 365, 366, 3, 84, 42, 0, 366, 375, 5, 35, 0, 0, 367, 372, 3, 40, 20, 0, - 368, 369, 5, 39, 0, 0, 369, 371, 3, 40, 20, 0, 370, 368, 1, 0, 0, 0, 371, - 374, 1, 0, 0, 0, 372, 370, 1, 0, 0, 0, 372, 373, 1, 0, 0, 0, 373, 376, - 1, 0, 0, 0, 374, 372, 1, 0, 0, 0, 375, 367, 1, 0, 0, 0, 375, 376, 1, 0, - 0, 0, 376, 377, 1, 0, 0, 0, 377, 378, 5, 36, 0, 0, 378, 51, 1, 0, 0, 0, - 379, 380, 3, 84, 42, 0, 380, 392, 5, 35, 0, 0, 381, 384, 5, 1, 0, 0, 382, - 384, 3, 40, 20, 0, 383, 381, 1, 0, 0, 0, 383, 382, 1, 0, 0, 0, 384, 389, - 1, 0, 0, 0, 385, 386, 5, 39, 0, 0, 386, 388, 3, 40, 20, 0, 387, 385, 1, - 0, 0, 0, 388, 391, 1, 0, 0, 0, 389, 387, 1, 0, 0, 0, 389, 390, 1, 0, 0, - 0, 390, 393, 1, 0, 0, 0, 391, 389, 1, 0, 0, 0, 392, 383, 1, 0, 0, 0, 392, - 393, 1, 0, 0, 0, 393, 394, 1, 0, 0, 0, 394, 395, 5, 36, 0, 0, 395, 53, - 1, 0, 0, 0, 396, 397, 7, 1, 0, 0, 397, 55, 1, 0, 0, 0, 398, 399, 7, 2, - 0, 0, 399, 57, 1, 0, 0, 0, 400, 401, 7, 3, 0, 0, 401, 59, 1, 0, 0, 0, 402, - 403, 7, 4, 0, 0, 403, 61, 1, 0, 0, 0, 404, 405, 7, 5, 0, 0, 405, 63, 1, - 0, 0, 0, 406, 407, 5, 30, 0, 0, 407, 408, 3, 84, 42, 0, 408, 65, 1, 0, - 0, 0, 409, 415, 3, 68, 34, 0, 410, 415, 3, 70, 35, 0, 411, 415, 3, 72, - 36, 0, 412, 415, 3, 74, 37, 0, 413, 415, 3, 76, 38, 0, 414, 409, 1, 0, - 0, 0, 414, 410, 1, 0, 0, 0, 414, 411, 1, 0, 0, 0, 414, 412, 1, 0, 0, 0, - 414, 413, 1, 0, 0, 0, 415, 67, 1, 0, 0, 0, 416, 417, 5, 6, 0, 0, 417, 69, - 1, 0, 0, 0, 418, 419, 5, 7, 0, 0, 419, 71, 1, 0, 0, 0, 420, 421, 7, 6, - 0, 0, 421, 73, 1, 0, 0, 0, 422, 425, 3, 80, 40, 0, 423, 425, 3, 82, 41, - 0, 424, 422, 1, 0, 0, 0, 424, 423, 1, 0, 0, 0, 425, 75, 1, 0, 0, 0, 426, - 427, 3, 78, 39, 0, 427, 77, 1, 0, 0, 0, 428, 429, 7, 7, 0, 0, 429, 79, - 1, 0, 0, 0, 430, 431, 7, 8, 0, 0, 431, 81, 1, 0, 0, 0, 432, 433, 5, 66, - 0, 0, 433, 83, 1, 0, 0, 0, 434, 435, 7, 9, 0, 0, 435, 85, 1, 0, 0, 0, 436, - 437, 3, 84, 42, 0, 437, 87, 1, 0, 0, 0, 438, 439, 5, 63, 0, 0, 439, 89, - 1, 0, 0, 0, 440, 441, 3, 84, 42, 0, 441, 91, 1, 0, 0, 0, 41, 97, 100, 103, - 106, 109, 112, 116, 125, 128, 131, 146, 159, 164, 177, 182, 185, 199, 204, - 207, 236, 268, 277, 301, 306, 315, 318, 321, 323, 332, 335, 345, 348, 354, - 361, 372, 375, 383, 389, 392, 414, 424, + 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 305, 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, 3, 20, 336, 8, 20, 1, 20, 1, + 20, 1, 20, 3, 20, 341, 8, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 5, 20, + 348, 8, 20, 10, 20, 12, 20, 351, 9, 20, 3, 20, 353, 8, 20, 1, 20, 1, 20, + 1, 20, 3, 20, 358, 8, 20, 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 364, 8, 20, + 5, 20, 366, 8, 20, 10, 20, 12, 20, 369, 9, 20, 1, 21, 1, 21, 1, 21, 1, + 21, 5, 21, 375, 8, 21, 10, 21, 12, 21, 378, 9, 21, 3, 21, 380, 8, 21, 1, + 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 5, 22, 388, 8, 22, 10, 22, 12, 22, + 391, 9, 22, 3, 22, 393, 8, 22, 1, 22, 1, 22, 1, 23, 1, 23, 3, 23, 399, + 8, 23, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 3, 24, 406, 8, 24, 1, 25, 1, + 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 5, 25, 415, 8, 25, 10, 25, 12, 25, + 418, 9, 25, 3, 25, 420, 8, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 26, + 3, 26, 428, 8, 26, 1, 26, 1, 26, 5, 26, 432, 8, 26, 10, 26, 12, 26, 435, + 9, 26, 3, 26, 437, 8, 26, 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, 32, 1, 32, 1, 32, 1, 33, 1, 33, + 1, 33, 1, 33, 1, 33, 3, 33, 459, 8, 33, 1, 34, 1, 34, 1, 35, 1, 35, 1, + 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 3, 37, 471, 8, 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, + 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, + 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 3, 43, 501, 8, 43, 1, 44, 1, 44, 1, + 45, 1, 45, 1, 45, 0, 2, 28, 40, 46, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, + 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, + 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, + 0, 10, 1, 0, 24, 25, 2, 0, 1, 1, 51, 52, 1, 0, 48, 49, 1, 0, 62, 64, 2, + 0, 57, 61, 65, 66, 1, 0, 48, 50, 1, 0, 8, 9, 1, 0, 76, 77, 1, 0, 72, 74, + 2, 0, 15, 33, 69, 69, 559, 0, 92, 1, 0, 0, 0, 2, 95, 1, 0, 0, 0, 4, 114, + 1, 0, 0, 0, 6, 120, 1, 0, 0, 0, 8, 131, 1, 0, 0, 0, 10, 133, 1, 0, 0, 0, + 12, 136, 1, 0, 0, 0, 14, 139, 1, 0, 0, 0, 16, 149, 1, 0, 0, 0, 18, 152, + 1, 0, 0, 0, 20, 168, 1, 0, 0, 0, 22, 170, 1, 0, 0, 0, 24, 175, 1, 0, 0, + 0, 26, 193, 1, 0, 0, 0, 28, 202, 1, 0, 0, 0, 30, 220, 1, 0, 0, 0, 32, 223, + 1, 0, 0, 0, 34, 225, 1, 0, 0, 0, 36, 233, 1, 0, 0, 0, 38, 240, 1, 0, 0, + 0, 40, 272, 1, 0, 0, 0, 42, 370, 1, 0, 0, 0, 44, 383, 1, 0, 0, 0, 46, 398, + 1, 0, 0, 0, 48, 405, 1, 0, 0, 0, 50, 407, 1, 0, 0, 0, 52, 423, 1, 0, 0, + 0, 54, 440, 1, 0, 0, 0, 56, 442, 1, 0, 0, 0, 58, 444, 1, 0, 0, 0, 60, 446, + 1, 0, 0, 0, 62, 448, 1, 0, 0, 0, 64, 450, 1, 0, 0, 0, 66, 458, 1, 0, 0, + 0, 68, 460, 1, 0, 0, 0, 70, 462, 1, 0, 0, 0, 72, 464, 1, 0, 0, 0, 74, 470, + 1, 0, 0, 0, 76, 472, 1, 0, 0, 0, 78, 474, 1, 0, 0, 0, 80, 476, 1, 0, 0, + 0, 82, 478, 1, 0, 0, 0, 84, 480, 1, 0, 0, 0, 86, 500, 1, 0, 0, 0, 88, 502, + 1, 0, 0, 0, 90, 504, 1, 0, 0, 0, 92, 93, 3, 2, 1, 0, 93, 94, 5, 0, 0, 1, + 94, 1, 1, 0, 0, 0, 95, 97, 3, 4, 2, 0, 96, 98, 3, 10, 5, 0, 97, 96, 1, + 0, 0, 0, 97, 98, 1, 0, 0, 0, 98, 100, 1, 0, 0, 0, 99, 101, 3, 12, 6, 0, + 100, 99, 1, 0, 0, 0, 100, 101, 1, 0, 0, 0, 101, 103, 1, 0, 0, 0, 102, 104, + 3, 14, 7, 0, 103, 102, 1, 0, 0, 0, 103, 104, 1, 0, 0, 0, 104, 106, 1, 0, + 0, 0, 105, 107, 3, 16, 8, 0, 106, 105, 1, 0, 0, 0, 106, 107, 1, 0, 0, 0, + 107, 109, 1, 0, 0, 0, 108, 110, 3, 18, 9, 0, 109, 108, 1, 0, 0, 0, 109, + 110, 1, 0, 0, 0, 110, 112, 1, 0, 0, 0, 111, 113, 3, 22, 11, 0, 112, 111, + 1, 0, 0, 0, 112, 113, 1, 0, 0, 0, 113, 3, 1, 0, 0, 0, 114, 116, 5, 3, 0, + 0, 115, 117, 3, 6, 3, 0, 116, 115, 1, 0, 0, 0, 116, 117, 1, 0, 0, 0, 117, + 118, 1, 0, 0, 0, 118, 119, 3, 8, 4, 0, 119, 5, 1, 0, 0, 0, 120, 121, 5, + 17, 0, 0, 121, 122, 5, 72, 0, 0, 122, 7, 1, 0, 0, 0, 123, 132, 5, 1, 0, + 0, 124, 126, 5, 5, 0, 0, 125, 124, 1, 0, 0, 0, 125, 126, 1, 0, 0, 0, 126, + 128, 1, 0, 0, 0, 127, 129, 5, 18, 0, 0, 128, 127, 1, 0, 0, 0, 128, 129, + 1, 0, 0, 0, 129, 130, 1, 0, 0, 0, 130, 132, 3, 34, 17, 0, 131, 123, 1, + 0, 0, 0, 131, 125, 1, 0, 0, 0, 132, 9, 1, 0, 0, 0, 133, 134, 5, 4, 0, 0, + 134, 135, 3, 24, 12, 0, 135, 11, 1, 0, 0, 0, 136, 137, 5, 12, 0, 0, 137, + 138, 3, 40, 20, 0, 138, 13, 1, 0, 0, 0, 139, 140, 5, 21, 0, 0, 140, 141, + 5, 20, 0, 0, 141, 146, 3, 40, 20, 0, 142, 143, 5, 43, 0, 0, 143, 145, 3, + 40, 20, 0, 144, 142, 1, 0, 0, 0, 145, 148, 1, 0, 0, 0, 146, 144, 1, 0, + 0, 0, 146, 147, 1, 0, 0, 0, 147, 15, 1, 0, 0, 0, 148, 146, 1, 0, 0, 0, + 149, 150, 5, 28, 0, 0, 150, 151, 3, 40, 20, 0, 151, 17, 1, 0, 0, 0, 152, + 153, 5, 19, 0, 0, 153, 154, 5, 20, 0, 0, 154, 159, 3, 20, 10, 0, 155, 156, + 5, 43, 0, 0, 156, 158, 3, 20, 10, 0, 157, 155, 1, 0, 0, 0, 158, 161, 1, + 0, 0, 0, 159, 157, 1, 0, 0, 0, 159, 160, 1, 0, 0, 0, 160, 19, 1, 0, 0, + 0, 161, 159, 1, 0, 0, 0, 162, 164, 3, 40, 20, 0, 163, 165, 7, 0, 0, 0, + 164, 163, 1, 0, 0, 0, 164, 165, 1, 0, 0, 0, 165, 169, 1, 0, 0, 0, 166, + 167, 5, 33, 0, 0, 167, 169, 3, 40, 20, 0, 168, 162, 1, 0, 0, 0, 168, 166, + 1, 0, 0, 0, 169, 21, 1, 0, 0, 0, 170, 171, 5, 22, 0, 0, 171, 172, 5, 72, + 0, 0, 172, 173, 5, 23, 0, 0, 173, 174, 5, 72, 0, 0, 174, 23, 1, 0, 0, 0, + 175, 179, 3, 26, 13, 0, 176, 178, 3, 30, 15, 0, 177, 176, 1, 0, 0, 0, 178, + 181, 1, 0, 0, 0, 179, 177, 1, 0, 0, 0, 179, 180, 1, 0, 0, 0, 180, 25, 1, + 0, 0, 0, 181, 179, 1, 0, 0, 0, 182, 187, 3, 28, 14, 0, 183, 185, 5, 2, + 0, 0, 184, 183, 1, 0, 0, 0, 184, 185, 1, 0, 0, 0, 185, 186, 1, 0, 0, 0, + 186, 188, 3, 84, 42, 0, 187, 184, 1, 0, 0, 0, 187, 188, 1, 0, 0, 0, 188, + 194, 1, 0, 0, 0, 189, 190, 3, 84, 42, 0, 190, 191, 5, 15, 0, 0, 191, 192, + 3, 28, 14, 0, 192, 194, 1, 0, 0, 0, 193, 182, 1, 0, 0, 0, 193, 189, 1, + 0, 0, 0, 194, 27, 1, 0, 0, 0, 195, 196, 6, 14, -1, 0, 196, 203, 5, 32, + 0, 0, 197, 203, 3, 32, 16, 0, 198, 199, 5, 39, 0, 0, 199, 200, 3, 2, 1, + 0, 200, 201, 5, 40, 0, 0, 201, 203, 1, 0, 0, 0, 202, 195, 1, 0, 0, 0, 202, + 197, 1, 0, 0, 0, 202, 198, 1, 0, 0, 0, 203, 217, 1, 0, 0, 0, 204, 205, + 10, 3, 0, 0, 205, 206, 5, 44, 0, 0, 206, 216, 3, 86, 43, 0, 207, 208, 10, + 2, 0, 0, 208, 212, 5, 37, 0, 0, 209, 213, 5, 77, 0, 0, 210, 213, 5, 76, + 0, 0, 211, 213, 3, 88, 44, 0, 212, 209, 1, 0, 0, 0, 212, 210, 1, 0, 0, + 0, 212, 211, 1, 0, 0, 0, 213, 214, 1, 0, 0, 0, 214, 216, 5, 38, 0, 0, 215, + 204, 1, 0, 0, 0, 215, 207, 1, 0, 0, 0, 216, 219, 1, 0, 0, 0, 217, 215, + 1, 0, 0, 0, 217, 218, 1, 0, 0, 0, 218, 29, 1, 0, 0, 0, 219, 217, 1, 0, + 0, 0, 220, 221, 5, 29, 0, 0, 221, 222, 3, 26, 13, 0, 222, 31, 1, 0, 0, + 0, 223, 224, 3, 84, 42, 0, 224, 33, 1, 0, 0, 0, 225, 230, 3, 36, 18, 0, + 226, 227, 5, 43, 0, 0, 227, 229, 3, 36, 18, 0, 228, 226, 1, 0, 0, 0, 229, + 232, 1, 0, 0, 0, 230, 228, 1, 0, 0, 0, 230, 231, 1, 0, 0, 0, 231, 35, 1, + 0, 0, 0, 232, 230, 1, 0, 0, 0, 233, 238, 3, 40, 20, 0, 234, 236, 5, 2, + 0, 0, 235, 234, 1, 0, 0, 0, 235, 236, 1, 0, 0, 0, 236, 237, 1, 0, 0, 0, + 237, 239, 3, 38, 19, 0, 238, 235, 1, 0, 0, 0, 238, 239, 1, 0, 0, 0, 239, + 37, 1, 0, 0, 0, 240, 241, 3, 84, 42, 0, 241, 39, 1, 0, 0, 0, 242, 243, + 6, 20, -1, 0, 243, 273, 3, 66, 33, 0, 244, 273, 3, 90, 45, 0, 245, 273, + 3, 64, 32, 0, 246, 273, 3, 48, 24, 0, 247, 273, 3, 44, 22, 0, 248, 273, + 3, 42, 21, 0, 249, 250, 5, 39, 0, 0, 250, 251, 3, 40, 20, 0, 251, 252, + 5, 40, 0, 0, 252, 273, 1, 0, 0, 0, 253, 254, 5, 39, 0, 0, 254, 255, 3, + 2, 1, 0, 255, 256, 5, 40, 0, 0, 256, 273, 1, 0, 0, 0, 257, 258, 5, 26, + 0, 0, 258, 259, 5, 39, 0, 0, 259, 260, 3, 2, 1, 0, 260, 261, 5, 40, 0, + 0, 261, 273, 1, 0, 0, 0, 262, 263, 5, 31, 0, 0, 263, 264, 5, 39, 0, 0, + 264, 265, 3, 2, 1, 0, 265, 266, 5, 40, 0, 0, 266, 273, 1, 0, 0, 0, 267, + 268, 3, 62, 31, 0, 268, 269, 3, 40, 20, 17, 269, 273, 1, 0, 0, 0, 270, + 271, 5, 10, 0, 0, 271, 273, 3, 40, 20, 16, 272, 242, 1, 0, 0, 0, 272, 244, + 1, 0, 0, 0, 272, 245, 1, 0, 0, 0, 272, 246, 1, 0, 0, 0, 272, 247, 1, 0, + 0, 0, 272, 248, 1, 0, 0, 0, 272, 249, 1, 0, 0, 0, 272, 253, 1, 0, 0, 0, + 272, 257, 1, 0, 0, 0, 272, 262, 1, 0, 0, 0, 272, 267, 1, 0, 0, 0, 272, + 270, 1, 0, 0, 0, 273, 367, 1, 0, 0, 0, 274, 275, 10, 15, 0, 0, 275, 276, + 3, 54, 27, 0, 276, 277, 3, 40, 20, 16, 277, 366, 1, 0, 0, 0, 278, 279, + 10, 14, 0, 0, 279, 280, 3, 56, 28, 0, 280, 281, 3, 40, 20, 15, 281, 366, + 1, 0, 0, 0, 282, 283, 10, 13, 0, 0, 283, 284, 3, 58, 29, 0, 284, 285, 3, + 40, 20, 14, 285, 366, 1, 0, 0, 0, 286, 287, 10, 12, 0, 0, 287, 288, 5, + 53, 0, 0, 288, 366, 3, 40, 20, 13, 289, 290, 10, 11, 0, 0, 290, 291, 5, + 56, 0, 0, 291, 366, 3, 40, 20, 12, 292, 293, 10, 10, 0, 0, 293, 294, 5, + 54, 0, 0, 294, 366, 3, 40, 20, 11, 295, 296, 10, 9, 0, 0, 296, 297, 5, + 55, 0, 0, 297, 366, 3, 40, 20, 10, 298, 299, 10, 8, 0, 0, 299, 300, 3, + 60, 30, 0, 300, 301, 3, 40, 20, 9, 301, 366, 1, 0, 0, 0, 302, 304, 10, + 6, 0, 0, 303, 305, 5, 10, 0, 0, 304, 303, 1, 0, 0, 0, 304, 305, 1, 0, 0, + 0, 305, 306, 1, 0, 0, 0, 306, 307, 5, 16, 0, 0, 307, 308, 3, 40, 20, 0, + 308, 309, 5, 13, 0, 0, 309, 310, 3, 40, 20, 7, 310, 366, 1, 0, 0, 0, 311, + 312, 10, 4, 0, 0, 312, 313, 5, 13, 0, 0, 313, 366, 3, 40, 20, 5, 314, 315, + 10, 3, 0, 0, 315, 316, 5, 14, 0, 0, 316, 366, 3, 40, 20, 4, 317, 318, 10, + 2, 0, 0, 318, 319, 5, 45, 0, 0, 319, 366, 3, 40, 20, 3, 320, 321, 10, 1, + 0, 0, 321, 322, 5, 46, 0, 0, 322, 323, 3, 40, 20, 0, 323, 324, 5, 47, 0, + 0, 324, 325, 3, 40, 20, 2, 325, 366, 1, 0, 0, 0, 326, 327, 10, 19, 0, 0, + 327, 328, 5, 44, 0, 0, 328, 366, 3, 86, 43, 0, 329, 330, 10, 18, 0, 0, + 330, 335, 5, 37, 0, 0, 331, 336, 5, 77, 0, 0, 332, 336, 5, 76, 0, 0, 333, + 336, 3, 88, 44, 0, 334, 336, 3, 64, 32, 0, 335, 331, 1, 0, 0, 0, 335, 332, + 1, 0, 0, 0, 335, 333, 1, 0, 0, 0, 335, 334, 1, 0, 0, 0, 336, 337, 1, 0, + 0, 0, 337, 366, 5, 38, 0, 0, 338, 340, 10, 7, 0, 0, 339, 341, 5, 10, 0, + 0, 340, 339, 1, 0, 0, 0, 340, 341, 1, 0, 0, 0, 341, 342, 1, 0, 0, 0, 342, + 343, 5, 15, 0, 0, 343, 352, 5, 39, 0, 0, 344, 349, 3, 40, 20, 0, 345, 346, + 5, 43, 0, 0, 346, 348, 3, 40, 20, 0, 347, 345, 1, 0, 0, 0, 348, 351, 1, + 0, 0, 0, 349, 347, 1, 0, 0, 0, 349, 350, 1, 0, 0, 0, 350, 353, 1, 0, 0, + 0, 351, 349, 1, 0, 0, 0, 352, 344, 1, 0, 0, 0, 352, 353, 1, 0, 0, 0, 353, + 354, 1, 0, 0, 0, 354, 366, 5, 40, 0, 0, 355, 357, 10, 5, 0, 0, 356, 358, + 5, 10, 0, 0, 357, 356, 1, 0, 0, 0, 357, 358, 1, 0, 0, 0, 358, 359, 1, 0, + 0, 0, 359, 360, 5, 27, 0, 0, 360, 363, 3, 40, 20, 0, 361, 362, 5, 30, 0, + 0, 362, 364, 3, 40, 20, 0, 363, 361, 1, 0, 0, 0, 363, 364, 1, 0, 0, 0, + 364, 366, 1, 0, 0, 0, 365, 274, 1, 0, 0, 0, 365, 278, 1, 0, 0, 0, 365, + 282, 1, 0, 0, 0, 365, 286, 1, 0, 0, 0, 365, 289, 1, 0, 0, 0, 365, 292, + 1, 0, 0, 0, 365, 295, 1, 0, 0, 0, 365, 298, 1, 0, 0, 0, 365, 302, 1, 0, + 0, 0, 365, 311, 1, 0, 0, 0, 365, 314, 1, 0, 0, 0, 365, 317, 1, 0, 0, 0, + 365, 320, 1, 0, 0, 0, 365, 326, 1, 0, 0, 0, 365, 329, 1, 0, 0, 0, 365, + 338, 1, 0, 0, 0, 365, 355, 1, 0, 0, 0, 366, 369, 1, 0, 0, 0, 367, 365, + 1, 0, 0, 0, 367, 368, 1, 0, 0, 0, 368, 41, 1, 0, 0, 0, 369, 367, 1, 0, + 0, 0, 370, 379, 5, 37, 0, 0, 371, 376, 3, 40, 20, 0, 372, 373, 5, 43, 0, + 0, 373, 375, 3, 40, 20, 0, 374, 372, 1, 0, 0, 0, 375, 378, 1, 0, 0, 0, + 376, 374, 1, 0, 0, 0, 376, 377, 1, 0, 0, 0, 377, 380, 1, 0, 0, 0, 378, + 376, 1, 0, 0, 0, 379, 371, 1, 0, 0, 0, 379, 380, 1, 0, 0, 0, 380, 381, + 1, 0, 0, 0, 381, 382, 5, 38, 0, 0, 382, 43, 1, 0, 0, 0, 383, 392, 5, 35, + 0, 0, 384, 389, 3, 46, 23, 0, 385, 386, 5, 43, 0, 0, 386, 388, 3, 46, 23, + 0, 387, 385, 1, 0, 0, 0, 388, 391, 1, 0, 0, 0, 389, 387, 1, 0, 0, 0, 389, + 390, 1, 0, 0, 0, 390, 393, 1, 0, 0, 0, 391, 389, 1, 0, 0, 0, 392, 384, + 1, 0, 0, 0, 392, 393, 1, 0, 0, 0, 393, 394, 1, 0, 0, 0, 394, 395, 5, 36, + 0, 0, 395, 45, 1, 0, 0, 0, 396, 399, 3, 78, 39, 0, 397, 399, 3, 86, 43, + 0, 398, 396, 1, 0, 0, 0, 398, 397, 1, 0, 0, 0, 399, 400, 1, 0, 0, 0, 400, + 401, 5, 47, 0, 0, 401, 402, 3, 40, 20, 0, 402, 47, 1, 0, 0, 0, 403, 406, + 3, 50, 25, 0, 404, 406, 3, 52, 26, 0, 405, 403, 1, 0, 0, 0, 405, 404, 1, + 0, 0, 0, 406, 49, 1, 0, 0, 0, 407, 408, 5, 11, 0, 0, 408, 409, 5, 44, 0, + 0, 409, 410, 3, 84, 42, 0, 410, 419, 5, 39, 0, 0, 411, 416, 3, 40, 20, + 0, 412, 413, 5, 43, 0, 0, 413, 415, 3, 40, 20, 0, 414, 412, 1, 0, 0, 0, + 415, 418, 1, 0, 0, 0, 416, 414, 1, 0, 0, 0, 416, 417, 1, 0, 0, 0, 417, + 420, 1, 0, 0, 0, 418, 416, 1, 0, 0, 0, 419, 411, 1, 0, 0, 0, 419, 420, + 1, 0, 0, 0, 420, 421, 1, 0, 0, 0, 421, 422, 5, 40, 0, 0, 422, 51, 1, 0, + 0, 0, 423, 424, 3, 84, 42, 0, 424, 436, 5, 39, 0, 0, 425, 428, 5, 1, 0, + 0, 426, 428, 3, 40, 20, 0, 427, 425, 1, 0, 0, 0, 427, 426, 1, 0, 0, 0, + 428, 433, 1, 0, 0, 0, 429, 430, 5, 43, 0, 0, 430, 432, 3, 40, 20, 0, 431, + 429, 1, 0, 0, 0, 432, 435, 1, 0, 0, 0, 433, 431, 1, 0, 0, 0, 433, 434, + 1, 0, 0, 0, 434, 437, 1, 0, 0, 0, 435, 433, 1, 0, 0, 0, 436, 427, 1, 0, + 0, 0, 436, 437, 1, 0, 0, 0, 437, 438, 1, 0, 0, 0, 438, 439, 5, 40, 0, 0, + 439, 53, 1, 0, 0, 0, 440, 441, 7, 1, 0, 0, 441, 55, 1, 0, 0, 0, 442, 443, + 7, 2, 0, 0, 443, 57, 1, 0, 0, 0, 444, 445, 7, 3, 0, 0, 445, 59, 1, 0, 0, + 0, 446, 447, 7, 4, 0, 0, 447, 61, 1, 0, 0, 0, 448, 449, 7, 5, 0, 0, 449, + 63, 1, 0, 0, 0, 450, 451, 5, 34, 0, 0, 451, 452, 3, 84, 42, 0, 452, 65, + 1, 0, 0, 0, 453, 459, 3, 68, 34, 0, 454, 459, 3, 70, 35, 0, 455, 459, 3, + 72, 36, 0, 456, 459, 3, 74, 37, 0, 457, 459, 3, 76, 38, 0, 458, 453, 1, + 0, 0, 0, 458, 454, 1, 0, 0, 0, 458, 455, 1, 0, 0, 0, 458, 456, 1, 0, 0, + 0, 458, 457, 1, 0, 0, 0, 459, 67, 1, 0, 0, 0, 460, 461, 5, 6, 0, 0, 461, + 69, 1, 0, 0, 0, 462, 463, 5, 7, 0, 0, 463, 71, 1, 0, 0, 0, 464, 465, 7, + 6, 0, 0, 465, 73, 1, 0, 0, 0, 466, 471, 3, 80, 40, 0, 467, 471, 3, 82, + 41, 0, 468, 471, 5, 67, 0, 0, 469, 471, 5, 68, 0, 0, 470, 466, 1, 0, 0, + 0, 470, 467, 1, 0, 0, 0, 470, 468, 1, 0, 0, 0, 470, 469, 1, 0, 0, 0, 471, + 75, 1, 0, 0, 0, 472, 473, 3, 78, 39, 0, 473, 77, 1, 0, 0, 0, 474, 475, + 7, 7, 0, 0, 475, 79, 1, 0, 0, 0, 476, 477, 7, 8, 0, 0, 477, 81, 1, 0, 0, + 0, 478, 479, 5, 75, 0, 0, 479, 83, 1, 0, 0, 0, 480, 481, 7, 9, 0, 0, 481, + 85, 1, 0, 0, 0, 482, 501, 3, 84, 42, 0, 483, 501, 5, 3, 0, 0, 484, 501, + 5, 4, 0, 0, 485, 501, 5, 12, 0, 0, 486, 501, 5, 10, 0, 0, 487, 501, 5, + 13, 0, 0, 488, 501, 5, 14, 0, 0, 489, 501, 5, 2, 0, 0, 490, 501, 5, 9, + 0, 0, 491, 501, 5, 8, 0, 0, 492, 501, 5, 7, 0, 0, 493, 501, 5, 6, 0, 0, + 494, 501, 5, 11, 0, 0, 495, 501, 5, 5, 0, 0, 496, 501, 5, 31, 0, 0, 497, + 501, 5, 32, 0, 0, 498, 501, 5, 30, 0, 0, 499, 501, 5, 33, 0, 0, 500, 482, + 1, 0, 0, 0, 500, 483, 1, 0, 0, 0, 500, 484, 1, 0, 0, 0, 500, 485, 1, 0, + 0, 0, 500, 486, 1, 0, 0, 0, 500, 487, 1, 0, 0, 0, 500, 488, 1, 0, 0, 0, + 500, 489, 1, 0, 0, 0, 500, 490, 1, 0, 0, 0, 500, 491, 1, 0, 0, 0, 500, + 492, 1, 0, 0, 0, 500, 493, 1, 0, 0, 0, 500, 494, 1, 0, 0, 0, 500, 495, + 1, 0, 0, 0, 500, 496, 1, 0, 0, 0, 500, 497, 1, 0, 0, 0, 500, 498, 1, 0, + 0, 0, 500, 499, 1, 0, 0, 0, 501, 87, 1, 0, 0, 0, 502, 503, 5, 72, 0, 0, + 503, 89, 1, 0, 0, 0, 504, 505, 3, 84, 42, 0, 505, 91, 1, 0, 0, 0, 49, 97, + 100, 103, 106, 109, 112, 116, 125, 128, 131, 146, 159, 164, 168, 179, 184, + 187, 193, 202, 212, 215, 217, 230, 235, 238, 272, 304, 335, 340, 349, 352, + 357, 363, 365, 367, 376, 379, 389, 392, 398, 405, 416, 419, 427, 433, 436, + 458, 470, 500, } deserializer := antlr.NewATNDeserializer(nil) staticData.atn = deserializer.Deserialize(staticData.serializedATN) @@ -340,45 +380,54 @@ const ( CosmosDBParserLIKE_SYMBOL = 27 CosmosDBParserHAVING_SYMBOL = 28 CosmosDBParserJOIN_SYMBOL = 29 - CosmosDBParserAT_SYMBOL = 30 - CosmosDBParserLC_BRACKET_SYMBOL = 31 - CosmosDBParserRC_BRACKET_SYMBOL = 32 - CosmosDBParserLS_BRACKET_SYMBOL = 33 - CosmosDBParserRS_BRACKET_SYMBOL = 34 - CosmosDBParserLR_BRACKET_SYMBOL = 35 - CosmosDBParserRR_BRACKET_SYMBOL = 36 - CosmosDBParserSINGLE_QUOTE_SYMBOL = 37 - CosmosDBParserDOUBLE_QUOTE_SYMBOL = 38 - CosmosDBParserCOMMA_SYMBOL = 39 - CosmosDBParserDOT_SYMBOL = 40 - CosmosDBParserQUESTION_MARK_SYMBOL = 41 - CosmosDBParserCOLON_SYMBOL = 42 - CosmosDBParserPLUS_SYMBOL = 43 - CosmosDBParserMINUS_SYMBOL = 44 - CosmosDBParserBIT_NOT_SYMBOL = 45 - CosmosDBParserDIVIDE_SYMBOL = 46 - CosmosDBParserMODULO_SYMBOL = 47 - CosmosDBParserBIT_AND_SYMBOL = 48 - CosmosDBParserBIT_OR_SYMBOL = 49 - CosmosDBParserDOUBLE_BAR_SYMBOL = 50 - CosmosDBParserBIT_XOR_SYMBOL = 51 - CosmosDBParserEQUAL_SYMBOL = 52 - CosmosDBParserLESS_THAN_OPERATOR = 53 - CosmosDBParserLESS_THAN_EQUAL_OPERATOR = 54 - CosmosDBParserGREATER_THAN_OPERATOR = 55 - CosmosDBParserGREATER_THAN_EQUAL_OPERATOR = 56 - CosmosDBParserLEFT_SHIFT_OPERATOR = 57 - CosmosDBParserRIGHT_SHIFT_OPERATOR = 58 - CosmosDBParserZERO_FILL_RIGHT_SHIFT_OPERATOR = 59 - CosmosDBParserNOT_EQUAL_OPERATOR = 60 - CosmosDBParserIDENTIFIER = 61 - CosmosDBParserWHITESPACE = 62 - CosmosDBParserDECIMAL = 63 - CosmosDBParserREAL = 64 - CosmosDBParserFLOAT = 65 - CosmosDBParserHEXADECIMAL = 66 - CosmosDBParserSINGLE_QUOTE_STRING_LITERAL = 67 - CosmosDBParserDOUBLE_QUOTE_STRING_LITERAL = 68 + CosmosDBParserESCAPE_SYMBOL = 30 + CosmosDBParserARRAY_SYMBOL = 31 + CosmosDBParserROOT_SYMBOL = 32 + CosmosDBParserRANK_SYMBOL = 33 + CosmosDBParserAT_SYMBOL = 34 + CosmosDBParserLC_BRACKET_SYMBOL = 35 + CosmosDBParserRC_BRACKET_SYMBOL = 36 + CosmosDBParserLS_BRACKET_SYMBOL = 37 + CosmosDBParserRS_BRACKET_SYMBOL = 38 + CosmosDBParserLR_BRACKET_SYMBOL = 39 + CosmosDBParserRR_BRACKET_SYMBOL = 40 + CosmosDBParserSINGLE_QUOTE_SYMBOL = 41 + CosmosDBParserDOUBLE_QUOTE_SYMBOL = 42 + CosmosDBParserCOMMA_SYMBOL = 43 + CosmosDBParserDOT_SYMBOL = 44 + CosmosDBParserDOUBLE_QUESTION_MARK_SYMBOL = 45 + CosmosDBParserQUESTION_MARK_SYMBOL = 46 + CosmosDBParserCOLON_SYMBOL = 47 + CosmosDBParserPLUS_SYMBOL = 48 + CosmosDBParserMINUS_SYMBOL = 49 + CosmosDBParserBIT_NOT_SYMBOL = 50 + CosmosDBParserDIVIDE_SYMBOL = 51 + CosmosDBParserMODULO_SYMBOL = 52 + CosmosDBParserBIT_AND_SYMBOL = 53 + CosmosDBParserBIT_OR_SYMBOL = 54 + CosmosDBParserDOUBLE_BAR_SYMBOL = 55 + CosmosDBParserBIT_XOR_SYMBOL = 56 + CosmosDBParserEQUAL_SYMBOL = 57 + CosmosDBParserLESS_THAN_OPERATOR = 58 + CosmosDBParserLESS_THAN_EQUAL_OPERATOR = 59 + CosmosDBParserGREATER_THAN_OPERATOR = 60 + CosmosDBParserGREATER_THAN_EQUAL_OPERATOR = 61 + CosmosDBParserLEFT_SHIFT_OPERATOR = 62 + CosmosDBParserRIGHT_SHIFT_OPERATOR = 63 + CosmosDBParserZERO_FILL_RIGHT_SHIFT_OPERATOR = 64 + CosmosDBParserNOT_EQUAL_OPERATOR = 65 + CosmosDBParserNOT_EQUAL_OPERATOR_2 = 66 + CosmosDBParserINFINITY_SYMBOL = 67 + CosmosDBParserNAN_SYMBOL = 68 + CosmosDBParserIDENTIFIER = 69 + CosmosDBParserWHITESPACE = 70 + CosmosDBParserLINE_COMMENT = 71 + CosmosDBParserDECIMAL = 72 + CosmosDBParserREAL = 73 + CosmosDBParserFLOAT = 74 + CosmosDBParserHEXADECIMAL = 75 + CosmosDBParserSINGLE_QUOTE_STRING_LITERAL = 76 + CosmosDBParserDOUBLE_QUOTE_STRING_LITERAL = 77 ) // CosmosDBParser rules. @@ -1265,7 +1314,7 @@ func (p *CosmosDBParser) Select_specification() (localctx ISelect_specificationC } } - case CosmosDBParserDISTINCT_SYMBOL, CosmosDBParserUNDEFINED_SYMBOL, CosmosDBParserNULL_SYMBOL, CosmosDBParserFALSE_SYMBOL, CosmosDBParserTRUE_SYMBOL, CosmosDBParserNOT_SYMBOL, CosmosDBParserUDF_SYMBOL, CosmosDBParserIN_SYMBOL, CosmosDBParserBETWEEN_SYMBOL, CosmosDBParserTOP_SYMBOL, CosmosDBParserVALUE_SYMBOL, CosmosDBParserORDER_SYMBOL, CosmosDBParserBY_SYMBOL, CosmosDBParserGROUP_SYMBOL, CosmosDBParserOFFSET_SYMBOL, CosmosDBParserLIMIT_SYMBOL, CosmosDBParserASC_SYMBOL, CosmosDBParserDESC_SYMBOL, CosmosDBParserEXISTS_SYMBOL, CosmosDBParserLIKE_SYMBOL, CosmosDBParserHAVING_SYMBOL, CosmosDBParserJOIN_SYMBOL, CosmosDBParserAT_SYMBOL, CosmosDBParserLC_BRACKET_SYMBOL, CosmosDBParserLS_BRACKET_SYMBOL, CosmosDBParserLR_BRACKET_SYMBOL, CosmosDBParserPLUS_SYMBOL, CosmosDBParserMINUS_SYMBOL, CosmosDBParserBIT_NOT_SYMBOL, CosmosDBParserIDENTIFIER, CosmosDBParserDECIMAL, CosmosDBParserREAL, CosmosDBParserFLOAT, CosmosDBParserHEXADECIMAL, CosmosDBParserSINGLE_QUOTE_STRING_LITERAL, CosmosDBParserDOUBLE_QUOTE_STRING_LITERAL: + case CosmosDBParserDISTINCT_SYMBOL, CosmosDBParserUNDEFINED_SYMBOL, CosmosDBParserNULL_SYMBOL, CosmosDBParserFALSE_SYMBOL, CosmosDBParserTRUE_SYMBOL, CosmosDBParserNOT_SYMBOL, CosmosDBParserUDF_SYMBOL, CosmosDBParserIN_SYMBOL, CosmosDBParserBETWEEN_SYMBOL, CosmosDBParserTOP_SYMBOL, CosmosDBParserVALUE_SYMBOL, CosmosDBParserORDER_SYMBOL, CosmosDBParserBY_SYMBOL, CosmosDBParserGROUP_SYMBOL, CosmosDBParserOFFSET_SYMBOL, CosmosDBParserLIMIT_SYMBOL, CosmosDBParserASC_SYMBOL, CosmosDBParserDESC_SYMBOL, CosmosDBParserEXISTS_SYMBOL, CosmosDBParserLIKE_SYMBOL, CosmosDBParserHAVING_SYMBOL, CosmosDBParserJOIN_SYMBOL, CosmosDBParserESCAPE_SYMBOL, CosmosDBParserARRAY_SYMBOL, CosmosDBParserROOT_SYMBOL, CosmosDBParserRANK_SYMBOL, CosmosDBParserAT_SYMBOL, CosmosDBParserLC_BRACKET_SYMBOL, CosmosDBParserLS_BRACKET_SYMBOL, CosmosDBParserLR_BRACKET_SYMBOL, CosmosDBParserPLUS_SYMBOL, CosmosDBParserMINUS_SYMBOL, CosmosDBParserBIT_NOT_SYMBOL, CosmosDBParserINFINITY_SYMBOL, CosmosDBParserNAN_SYMBOL, CosmosDBParserIDENTIFIER, CosmosDBParserDECIMAL, CosmosDBParserREAL, CosmosDBParserFLOAT, CosmosDBParserHEXADECIMAL, CosmosDBParserSINGLE_QUOTE_STRING_LITERAL, CosmosDBParserDOUBLE_QUOTE_STRING_LITERAL: p.EnterOuterAlt(localctx, 2) p.SetState(125) p.GetErrorHandler().Sync(p) @@ -2128,6 +2177,7 @@ type ISort_expressionContext interface { Scalar_expression() IScalar_expressionContext ASC_SYMBOL() antlr.TerminalNode DESC_SYMBOL() antlr.TerminalNode + RANK_SYMBOL() antlr.TerminalNode // IsSort_expressionContext differentiates from other interfaces. IsSort_expressionContext() @@ -2189,6 +2239,10 @@ func (s *Sort_expressionContext) DESC_SYMBOL() antlr.TerminalNode { return s.GetToken(CosmosDBParserDESC_SYMBOL, 0) } +func (s *Sort_expressionContext) RANK_SYMBOL() antlr.TerminalNode { + return s.GetToken(CosmosDBParserRANK_SYMBOL, 0) +} + func (s *Sort_expressionContext) GetRuleContext() antlr.RuleContext { return s } @@ -2224,31 +2278,58 @@ func (p *CosmosDBParser) Sort_expression() (localctx ISort_expressionContext) { p.EnterRule(localctx, 20, CosmosDBParserRULE_sort_expression) var _la int - p.EnterOuterAlt(localctx, 1) - { - p.SetState(162) - p.scalar_expression(0) - } - p.SetState(164) + p.SetState(168) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - _la = p.GetTokenStream().LA(1) - if _la == CosmosDBParserASC_SYMBOL || _la == CosmosDBParserDESC_SYMBOL { + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 13, p.GetParserRuleContext()) { + case 1: + p.EnterOuterAlt(localctx, 1) { - p.SetState(163) - _la = p.GetTokenStream().LA(1) + p.SetState(162) + p.scalar_expression(0) + } + p.SetState(164) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == CosmosDBParserASC_SYMBOL || _la == CosmosDBParserDESC_SYMBOL { + { + p.SetState(163) + _la = p.GetTokenStream().LA(1) - if !(_la == CosmosDBParserASC_SYMBOL || _la == CosmosDBParserDESC_SYMBOL) { - p.GetErrorHandler().RecoverInline(p) - } else { - p.GetErrorHandler().ReportMatch(p) - p.Consume() + if !(_la == CosmosDBParserASC_SYMBOL || _la == CosmosDBParserDESC_SYMBOL) { + p.GetErrorHandler().RecoverInline(p) + } else { + p.GetErrorHandler().ReportMatch(p) + p.Consume() + } + } + + } + + case 2: + p.EnterOuterAlt(localctx, 2) + { + p.SetState(166) + p.Match(CosmosDBParserRANK_SYMBOL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit } } + { + p.SetState(167) + p.scalar_expression(0) + } + case antlr.ATNInvalidAltNumber: + goto errorExit } errorExit: @@ -2364,7 +2445,7 @@ func (p *CosmosDBParser) Offset_limit_clause() (localctx IOffset_limit_clauseCon p.EnterRule(localctx, 22, CosmosDBParserRULE_offset_limit_clause) p.EnterOuterAlt(localctx, 1) { - p.SetState(166) + p.SetState(170) p.Match(CosmosDBParserOFFSET_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -2372,7 +2453,7 @@ func (p *CosmosDBParser) Offset_limit_clause() (localctx IOffset_limit_clauseCon } } { - p.SetState(167) + p.SetState(171) p.Match(CosmosDBParserDECIMAL) if p.HasError() { // Recognition error - abort rule @@ -2380,7 +2461,7 @@ func (p *CosmosDBParser) Offset_limit_clause() (localctx IOffset_limit_clauseCon } } { - p.SetState(168) + p.SetState(172) p.Match(CosmosDBParserLIMIT_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -2388,7 +2469,7 @@ func (p *CosmosDBParser) Offset_limit_clause() (localctx IOffset_limit_clauseCon } } { - p.SetState(169) + p.SetState(173) p.Match(CosmosDBParserDECIMAL) if p.HasError() { // Recognition error - abort rule @@ -2418,6 +2499,8 @@ type IFrom_specificationContext interface { // Getter signatures From_source() IFrom_sourceContext + AllJoin_clause() []IJoin_clauseContext + Join_clause(i int) IJoin_clauseContext // IsFrom_specificationContext differentiates from other interfaces. IsFrom_specificationContext() @@ -2471,6 +2554,47 @@ func (s *From_specificationContext) From_source() IFrom_sourceContext { return t.(IFrom_sourceContext) } +func (s *From_specificationContext) AllJoin_clause() []IJoin_clauseContext { + children := s.GetChildren() + len := 0 + for _, ctx := range children { + if _, ok := ctx.(IJoin_clauseContext); ok { + len++ + } + } + + tst := make([]IJoin_clauseContext, len) + i := 0 + for _, ctx := range children { + if t, ok := ctx.(IJoin_clauseContext); ok { + tst[i] = t.(IJoin_clauseContext) + i++ + } + } + + return tst +} + +func (s *From_specificationContext) Join_clause(i int) IJoin_clauseContext { + var t antlr.RuleContext + j := 0 + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IJoin_clauseContext); ok { + if j == i { + t = ctx.(antlr.RuleContext) + break + } + j++ + } + } + + if t == nil { + return nil + } + + return t.(IJoin_clauseContext) +} + func (s *From_specificationContext) GetRuleContext() antlr.RuleContext { return s } @@ -2504,11 +2628,33 @@ func (s *From_specificationContext) Accept(visitor antlr.ParseTreeVisitor) inter func (p *CosmosDBParser) From_specification() (localctx IFrom_specificationContext) { localctx = NewFrom_specificationContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 24, CosmosDBParserRULE_from_specification) + var _la int + p.EnterOuterAlt(localctx, 1) { - p.SetState(171) + p.SetState(175) p.From_source() } + p.SetState(179) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + for _la == CosmosDBParserJOIN_SYMBOL { + { + p.SetState(176) + p.Join_clause() + } + + p.SetState(181) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + } errorExit: if p.HasError() { @@ -2532,8 +2678,9 @@ type IFrom_sourceContext interface { // Getter signatures Container_expression() IContainer_expressionContext - AllJoin_clause() []IJoin_clauseContext - Join_clause(i int) IJoin_clauseContext + Identifier() IIdentifierContext + AS_SYMBOL() antlr.TerminalNode + IN_SYMBOL() antlr.TerminalNode // IsFrom_sourceContext differentiates from other interfaces. IsFrom_sourceContext() @@ -2587,37 +2734,12 @@ func (s *From_sourceContext) Container_expression() IContainer_expressionContext return t.(IContainer_expressionContext) } -func (s *From_sourceContext) AllJoin_clause() []IJoin_clauseContext { - children := s.GetChildren() - len := 0 - for _, ctx := range children { - if _, ok := ctx.(IJoin_clauseContext); ok { - len++ - } - } - - tst := make([]IJoin_clauseContext, len) - i := 0 - for _, ctx := range children { - if t, ok := ctx.(IJoin_clauseContext); ok { - tst[i] = t.(IJoin_clauseContext) - i++ - } - } - - return tst -} - -func (s *From_sourceContext) Join_clause(i int) IJoin_clauseContext { +func (s *From_sourceContext) Identifier() IIdentifierContext { var t antlr.RuleContext - j := 0 for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IJoin_clauseContext); ok { - if j == i { - t = ctx.(antlr.RuleContext) - break - } - j++ + if _, ok := ctx.(IIdentifierContext); ok { + t = ctx.(antlr.RuleContext) + break } } @@ -2625,7 +2747,15 @@ func (s *From_sourceContext) Join_clause(i int) IJoin_clauseContext { return nil } - return t.(IJoin_clauseContext) + return t.(IIdentifierContext) +} + +func (s *From_sourceContext) AS_SYMBOL() antlr.TerminalNode { + return s.GetToken(CosmosDBParserAS_SYMBOL, 0) +} + +func (s *From_sourceContext) IN_SYMBOL() antlr.TerminalNode { + return s.GetToken(CosmosDBParserIN_SYMBOL, 0) } func (s *From_sourceContext) GetRuleContext() antlr.RuleContext { @@ -2663,30 +2793,71 @@ func (p *CosmosDBParser) From_source() (localctx IFrom_sourceContext) { p.EnterRule(localctx, 26, CosmosDBParserRULE_from_source) var _la int - p.EnterOuterAlt(localctx, 1) - { - p.SetState(173) - p.Container_expression() - } - p.SetState(177) + p.SetState(193) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - _la = p.GetTokenStream().LA(1) - for _la == CosmosDBParserJOIN_SYMBOL { + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 17, p.GetParserRuleContext()) { + case 1: + p.EnterOuterAlt(localctx, 1) { - p.SetState(174) - p.Join_clause() + p.SetState(182) + p.container_expression(0) } - - p.SetState(179) + p.SetState(187) p.GetErrorHandler().Sync(p) - if p.HasError() { + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 16, p.GetParserRuleContext()) == 1 { + p.SetState(184) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == CosmosDBParserAS_SYMBOL { + { + p.SetState(183) + p.Match(CosmosDBParserAS_SYMBOL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(186) + p.Identifier() + } + + } else if p.HasError() { // JIM goto errorExit } - _la = p.GetTokenStream().LA(1) + + case 2: + p.EnterOuterAlt(localctx, 2) + { + p.SetState(189) + p.Identifier() + } + { + p.SetState(190) + p.Match(CosmosDBParserIN_SYMBOL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(191) + p.container_expression(0) + } + + case antlr.ATNInvalidAltNumber: + goto errorExit } errorExit: @@ -2710,9 +2881,19 @@ type IContainer_expressionContext interface { GetParser() antlr.Parser // Getter signatures + ROOT_SYMBOL() antlr.TerminalNode Container_name() IContainer_nameContext - Identifier() IIdentifierContext - AS_SYMBOL() antlr.TerminalNode + LR_BRACKET_SYMBOL() antlr.TerminalNode + Select_() ISelectContext + RR_BRACKET_SYMBOL() antlr.TerminalNode + Container_expression() IContainer_expressionContext + DOT_SYMBOL() antlr.TerminalNode + Property_name() IProperty_nameContext + LS_BRACKET_SYMBOL() antlr.TerminalNode + RS_BRACKET_SYMBOL() antlr.TerminalNode + DOUBLE_QUOTE_STRING_LITERAL() antlr.TerminalNode + SINGLE_QUOTE_STRING_LITERAL() antlr.TerminalNode + Array_index() IArray_indexContext // IsContainer_expressionContext differentiates from other interfaces. IsContainer_expressionContext() @@ -2750,6 +2931,10 @@ func NewContainer_expressionContext(parser antlr.Parser, parent antlr.ParserRule func (s *Container_expressionContext) GetParser() antlr.Parser { return s.parser } +func (s *Container_expressionContext) ROOT_SYMBOL() antlr.TerminalNode { + return s.GetToken(CosmosDBParserROOT_SYMBOL, 0) +} + func (s *Container_expressionContext) Container_name() IContainer_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { @@ -2766,10 +2951,14 @@ func (s *Container_expressionContext) Container_name() IContainer_nameContext { return t.(IContainer_nameContext) } -func (s *Container_expressionContext) Identifier() IIdentifierContext { +func (s *Container_expressionContext) LR_BRACKET_SYMBOL() antlr.TerminalNode { + return s.GetToken(CosmosDBParserLR_BRACKET_SYMBOL, 0) +} + +func (s *Container_expressionContext) Select_() ISelectContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IIdentifierContext); ok { + if _, ok := ctx.(ISelectContext); ok { t = ctx.(antlr.RuleContext) break } @@ -2779,34 +2968,102 @@ func (s *Container_expressionContext) Identifier() IIdentifierContext { return nil } - return t.(IIdentifierContext) + return t.(ISelectContext) } -func (s *Container_expressionContext) AS_SYMBOL() antlr.TerminalNode { - return s.GetToken(CosmosDBParserAS_SYMBOL, 0) +func (s *Container_expressionContext) RR_BRACKET_SYMBOL() antlr.TerminalNode { + return s.GetToken(CosmosDBParserRR_BRACKET_SYMBOL, 0) } -func (s *Container_expressionContext) GetRuleContext() antlr.RuleContext { - return s +func (s *Container_expressionContext) Container_expression() IContainer_expressionContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IContainer_expressionContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IContainer_expressionContext) } -func (s *Container_expressionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { - return antlr.TreesStringTree(s, ruleNames, recog) +func (s *Container_expressionContext) DOT_SYMBOL() antlr.TerminalNode { + return s.GetToken(CosmosDBParserDOT_SYMBOL, 0) } -func (s *Container_expressionContext) EnterRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(CosmosDBParserListener); ok { - listenerT.EnterContainer_expression(s) +func (s *Container_expressionContext) Property_name() IProperty_nameContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IProperty_nameContext); ok { + t = ctx.(antlr.RuleContext) + break + } } -} -func (s *Container_expressionContext) ExitRule(listener antlr.ParseTreeListener) { - if listenerT, ok := listener.(CosmosDBParserListener); ok { - listenerT.ExitContainer_expression(s) + if t == nil { + return nil } + + return t.(IProperty_nameContext) } -func (s *Container_expressionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { +func (s *Container_expressionContext) LS_BRACKET_SYMBOL() antlr.TerminalNode { + return s.GetToken(CosmosDBParserLS_BRACKET_SYMBOL, 0) +} + +func (s *Container_expressionContext) RS_BRACKET_SYMBOL() antlr.TerminalNode { + return s.GetToken(CosmosDBParserRS_BRACKET_SYMBOL, 0) +} + +func (s *Container_expressionContext) DOUBLE_QUOTE_STRING_LITERAL() antlr.TerminalNode { + return s.GetToken(CosmosDBParserDOUBLE_QUOTE_STRING_LITERAL, 0) +} + +func (s *Container_expressionContext) SINGLE_QUOTE_STRING_LITERAL() antlr.TerminalNode { + return s.GetToken(CosmosDBParserSINGLE_QUOTE_STRING_LITERAL, 0) +} + +func (s *Container_expressionContext) Array_index() IArray_indexContext { + var t antlr.RuleContext + for _, ctx := range s.GetChildren() { + if _, ok := ctx.(IArray_indexContext); ok { + t = ctx.(antlr.RuleContext) + break + } + } + + if t == nil { + return nil + } + + return t.(IArray_indexContext) +} + +func (s *Container_expressionContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *Container_expressionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *Container_expressionContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(CosmosDBParserListener); ok { + listenerT.EnterContainer_expression(s) + } +} + +func (s *Container_expressionContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(CosmosDBParserListener); ok { + listenerT.ExitContainer_expression(s) + } +} + +func (s *Container_expressionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { switch t := visitor.(type) { case CosmosDBParserVisitor: return t.VisitContainer_expression(s) @@ -2817,44 +3074,191 @@ func (s *Container_expressionContext) Accept(visitor antlr.ParseTreeVisitor) int } func (p *CosmosDBParser) Container_expression() (localctx IContainer_expressionContext) { - localctx = NewContainer_expressionContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 28, CosmosDBParserRULE_container_expression) - var _la int + return p.container_expression(0) +} + +func (p *CosmosDBParser) container_expression(_p int) (localctx IContainer_expressionContext) { + var _parentctx antlr.ParserRuleContext = p.GetParserRuleContext() + + _parentState := p.GetState() + localctx = NewContainer_expressionContext(p, p.GetParserRuleContext(), _parentState) + var _prevctx IContainer_expressionContext = localctx + var _ antlr.ParserRuleContext = _prevctx // TODO: To prevent unused variable warning. + _startState := 28 + p.EnterRecursionRule(localctx, 28, CosmosDBParserRULE_container_expression, _p) + var _alt int p.EnterOuterAlt(localctx, 1) - { - p.SetState(180) - p.Container_name() - } - p.SetState(185) + p.SetState(202) p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 15, p.GetParserRuleContext()) == 1 { - p.SetState(182) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 18, p.GetParserRuleContext()) { + case 1: + { + p.SetState(196) + p.Match(CosmosDBParserROOT_SYMBOL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } - _la = p.GetTokenStream().LA(1) - if _la == CosmosDBParserAS_SYMBOL { - { - p.SetState(181) - p.Match(CosmosDBParserAS_SYMBOL) + case 2: + { + p.SetState(197) + p.Container_name() + } + + case 3: + { + p.SetState(198) + p.Match(CosmosDBParserLR_BRACKET_SYMBOL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(199) + p.Select_() + } + { + p.SetState(200) + p.Match(CosmosDBParserRR_BRACKET_SYMBOL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case antlr.ATNInvalidAltNumber: + goto errorExit + } + p.GetParserRuleContext().SetStop(p.GetTokenStream().LT(-1)) + p.SetState(217) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 21, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit + } + for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { + if _alt == 1 { + if p.GetParseListeners() != nil { + p.TriggerExitRuleEvent() + } + _prevctx = localctx + p.SetState(215) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 20, p.GetParserRuleContext()) { + case 1: + localctx = NewContainer_expressionContext(p, _parentctx, _parentState) + p.PushNewRecursionContext(localctx, _startState, CosmosDBParserRULE_container_expression) + p.SetState(204) + + if !(p.Precpred(p.GetParserRuleContext(), 3)) { + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 3)", "")) + goto errorExit + } + { + p.SetState(205) + p.Match(CosmosDBParserDOT_SYMBOL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(206) + p.Property_name() + } + + case 2: + localctx = NewContainer_expressionContext(p, _parentctx, _parentState) + p.PushNewRecursionContext(localctx, _startState, CosmosDBParserRULE_container_expression) + p.SetState(207) + + if !(p.Precpred(p.GetParserRuleContext(), 2)) { + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 2)", "")) + goto errorExit + } + { + p.SetState(208) + p.Match(CosmosDBParserLS_BRACKET_SYMBOL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + p.SetState(212) + p.GetErrorHandler().Sync(p) if p.HasError() { - // Recognition error - abort rule goto errorExit } + + switch p.GetTokenStream().LA(1) { + case CosmosDBParserDOUBLE_QUOTE_STRING_LITERAL: + { + p.SetState(209) + p.Match(CosmosDBParserDOUBLE_QUOTE_STRING_LITERAL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case CosmosDBParserSINGLE_QUOTE_STRING_LITERAL: + { + p.SetState(210) + p.Match(CosmosDBParserSINGLE_QUOTE_STRING_LITERAL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case CosmosDBParserDECIMAL: + { + p.SetState(211) + p.Array_index() + } + + default: + p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + goto errorExit + } + { + p.SetState(214) + p.Match(CosmosDBParserRS_BRACKET_SYMBOL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case antlr.ATNInvalidAltNumber: + goto errorExit } } - { - p.SetState(184) - p.Identifier() + p.SetState(219) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 21, p.GetParserRuleContext()) + if p.HasError() { + goto errorExit } - - } else if p.HasError() { // JIM - goto errorExit } errorExit: @@ -2865,7 +3269,7 @@ errorExit: p.GetErrorHandler().Recover(p, v) p.SetError(nil) } - p.ExitRule() + p.UnrollRecursionContexts(_parentctx) return localctx goto errorExit // Trick to prevent compiler error if the label is not used } @@ -2879,9 +3283,7 @@ type IJoin_clauseContext interface { // Getter signatures JOIN_SYMBOL() antlr.TerminalNode - Identifier() IIdentifierContext - IN_SYMBOL() antlr.TerminalNode - Scalar_expression() IScalar_expressionContext + From_source() IFrom_sourceContext // IsJoin_clauseContext differentiates from other interfaces. IsJoin_clauseContext() @@ -2923,30 +3325,10 @@ func (s *Join_clauseContext) JOIN_SYMBOL() antlr.TerminalNode { return s.GetToken(CosmosDBParserJOIN_SYMBOL, 0) } -func (s *Join_clauseContext) Identifier() IIdentifierContext { - var t antlr.RuleContext - for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IIdentifierContext); ok { - t = ctx.(antlr.RuleContext) - break - } - } - - if t == nil { - return nil - } - - return t.(IIdentifierContext) -} - -func (s *Join_clauseContext) IN_SYMBOL() antlr.TerminalNode { - return s.GetToken(CosmosDBParserIN_SYMBOL, 0) -} - -func (s *Join_clauseContext) Scalar_expression() IScalar_expressionContext { +func (s *Join_clauseContext) From_source() IFrom_sourceContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { - if _, ok := ctx.(IScalar_expressionContext); ok { + if _, ok := ctx.(IFrom_sourceContext); ok { t = ctx.(antlr.RuleContext) break } @@ -2956,7 +3338,7 @@ func (s *Join_clauseContext) Scalar_expression() IScalar_expressionContext { return nil } - return t.(IScalar_expressionContext) + return t.(IFrom_sourceContext) } func (s *Join_clauseContext) GetRuleContext() antlr.RuleContext { @@ -2994,7 +3376,7 @@ func (p *CosmosDBParser) Join_clause() (localctx IJoin_clauseContext) { p.EnterRule(localctx, 30, CosmosDBParserRULE_join_clause) p.EnterOuterAlt(localctx, 1) { - p.SetState(187) + p.SetState(220) p.Match(CosmosDBParserJOIN_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -3002,20 +3384,8 @@ func (p *CosmosDBParser) Join_clause() (localctx IJoin_clauseContext) { } } { - p.SetState(188) - p.Identifier() - } - { - p.SetState(189) - p.Match(CosmosDBParserIN_SYMBOL) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - { - p.SetState(190) - p.scalar_expression(0) + p.SetState(221) + p.From_source() } errorExit: @@ -3128,7 +3498,7 @@ func (p *CosmosDBParser) Container_name() (localctx IContainer_nameContext) { p.EnterRule(localctx, 32, CosmosDBParserRULE_container_name) p.EnterOuterAlt(localctx, 1) { - p.SetState(192) + p.SetState(223) p.Identifier() } @@ -3280,10 +3650,10 @@ func (p *CosmosDBParser) Object_property_list() (localctx IObject_property_listC p.EnterOuterAlt(localctx, 1) { - p.SetState(194) + p.SetState(225) p.Object_property() } - p.SetState(199) + p.SetState(230) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -3292,7 +3662,7 @@ func (p *CosmosDBParser) Object_property_list() (localctx IObject_property_listC for _la == CosmosDBParserCOMMA_SYMBOL { { - p.SetState(195) + p.SetState(226) p.Match(CosmosDBParserCOMMA_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -3300,11 +3670,11 @@ func (p *CosmosDBParser) Object_property_list() (localctx IObject_property_listC } } { - p.SetState(196) + p.SetState(227) p.Object_property() } - p.SetState(201) + p.SetState(232) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -3446,14 +3816,14 @@ func (p *CosmosDBParser) Object_property() (localctx IObject_propertyContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(202) + p.SetState(233) p.scalar_expression(0) } - p.SetState(207) + p.SetState(238) p.GetErrorHandler().Sync(p) - if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 18, p.GetParserRuleContext()) == 1 { - p.SetState(204) + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 24, p.GetParserRuleContext()) == 1 { + p.SetState(235) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -3462,7 +3832,7 @@ func (p *CosmosDBParser) Object_property() (localctx IObject_propertyContext) { if _la == CosmosDBParserAS_SYMBOL { { - p.SetState(203) + p.SetState(234) p.Match(CosmosDBParserAS_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -3472,7 +3842,7 @@ func (p *CosmosDBParser) Object_property() (localctx IObject_propertyContext) { } { - p.SetState(206) + p.SetState(237) p.Property_alias() } @@ -3590,7 +3960,7 @@ func (p *CosmosDBParser) Property_alias() (localctx IProperty_aliasContext) { p.EnterRule(localctx, 38, CosmosDBParserRULE_property_alias) p.EnterOuterAlt(localctx, 1) { - p.SetState(209) + p.SetState(240) p.Identifier() } @@ -3627,6 +3997,7 @@ type IScalar_expressionContext interface { RR_BRACKET_SYMBOL() antlr.TerminalNode Select_() ISelectContext EXISTS_SYMBOL() antlr.TerminalNode + ARRAY_SYMBOL() antlr.TerminalNode Unary_operator() IUnary_operatorContext NOT_SYMBOL() antlr.TerminalNode Multiplicative_operator() IMultiplicative_operatorContext @@ -3639,8 +4010,8 @@ type IScalar_expressionContext interface { Comparison_operator() IComparison_operatorContext BETWEEN_SYMBOL() antlr.TerminalNode AND_SYMBOL() antlr.TerminalNode - LIKE_SYMBOL() antlr.TerminalNode OR_SYMBOL() antlr.TerminalNode + DOUBLE_QUESTION_MARK_SYMBOL() antlr.TerminalNode QUESTION_MARK_SYMBOL() antlr.TerminalNode COLON_SYMBOL() antlr.TerminalNode DOT_SYMBOL() antlr.TerminalNode @@ -3653,6 +4024,8 @@ type IScalar_expressionContext interface { IN_SYMBOL() antlr.TerminalNode AllCOMMA_SYMBOL() []antlr.TerminalNode COMMA_SYMBOL(i int) antlr.TerminalNode + LIKE_SYMBOL() antlr.TerminalNode + ESCAPE_SYMBOL() antlr.TerminalNode // IsScalar_expressionContext differentiates from other interfaces. IsScalar_expressionContext() @@ -3855,6 +4228,10 @@ func (s *Scalar_expressionContext) EXISTS_SYMBOL() antlr.TerminalNode { return s.GetToken(CosmosDBParserEXISTS_SYMBOL, 0) } +func (s *Scalar_expressionContext) ARRAY_SYMBOL() antlr.TerminalNode { + return s.GetToken(CosmosDBParserARRAY_SYMBOL, 0) +} + func (s *Scalar_expressionContext) Unary_operator() IUnary_operatorContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { @@ -3963,15 +4340,15 @@ func (s *Scalar_expressionContext) AND_SYMBOL() antlr.TerminalNode { return s.GetToken(CosmosDBParserAND_SYMBOL, 0) } -func (s *Scalar_expressionContext) LIKE_SYMBOL() antlr.TerminalNode { - return s.GetToken(CosmosDBParserLIKE_SYMBOL, 0) -} - func (s *Scalar_expressionContext) OR_SYMBOL() antlr.TerminalNode { return s.GetToken(CosmosDBParserOR_SYMBOL, 0) } -func (s *Scalar_expressionContext) QUESTION_MARK_SYMBOL() antlr.TerminalNode { +func (s *Scalar_expressionContext) DOUBLE_QUESTION_MARK_SYMBOL() antlr.TerminalNode { + return s.GetToken(CosmosDBParserDOUBLE_QUESTION_MARK_SYMBOL, 0) +} + +func (s *Scalar_expressionContext) QUESTION_MARK_SYMBOL() antlr.TerminalNode { return s.GetToken(CosmosDBParserQUESTION_MARK_SYMBOL, 0) } @@ -4043,6 +4420,14 @@ func (s *Scalar_expressionContext) COMMA_SYMBOL(i int) antlr.TerminalNode { return s.GetToken(CosmosDBParserCOMMA_SYMBOL, i) } +func (s *Scalar_expressionContext) LIKE_SYMBOL() antlr.TerminalNode { + return s.GetToken(CosmosDBParserLIKE_SYMBOL, 0) +} + +func (s *Scalar_expressionContext) ESCAPE_SYMBOL() antlr.TerminalNode { + return s.GetToken(CosmosDBParserESCAPE_SYMBOL, 0) +} + func (s *Scalar_expressionContext) GetRuleContext() antlr.RuleContext { return s } @@ -4091,52 +4476,52 @@ func (p *CosmosDBParser) scalar_expression(_p int) (localctx IScalar_expressionC var _alt int p.EnterOuterAlt(localctx, 1) - p.SetState(236) + p.SetState(272) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 19, p.GetParserRuleContext()) { + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 25, p.GetParserRuleContext()) { case 1: { - p.SetState(212) + p.SetState(243) p.Constant() } case 2: { - p.SetState(213) + p.SetState(244) p.Input_alias() } case 3: { - p.SetState(214) + p.SetState(245) p.Parameter_name() } case 4: { - p.SetState(215) + p.SetState(246) p.Scalar_function_expression() } case 5: { - p.SetState(216) + p.SetState(247) p.Create_object_expression() } case 6: { - p.SetState(217) + p.SetState(248) p.Create_array_expression() } case 7: { - p.SetState(218) + p.SetState(249) p.Match(CosmosDBParserLR_BRACKET_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -4144,11 +4529,11 @@ func (p *CosmosDBParser) scalar_expression(_p int) (localctx IScalar_expressionC } } { - p.SetState(219) + p.SetState(250) p.scalar_expression(0) } { - p.SetState(220) + p.SetState(251) p.Match(CosmosDBParserRR_BRACKET_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -4158,7 +4543,7 @@ func (p *CosmosDBParser) scalar_expression(_p int) (localctx IScalar_expressionC case 8: { - p.SetState(222) + p.SetState(253) p.Match(CosmosDBParserLR_BRACKET_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -4166,11 +4551,11 @@ func (p *CosmosDBParser) scalar_expression(_p int) (localctx IScalar_expressionC } } { - p.SetState(223) + p.SetState(254) p.Select_() } { - p.SetState(224) + p.SetState(255) p.Match(CosmosDBParserRR_BRACKET_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -4180,7 +4565,7 @@ func (p *CosmosDBParser) scalar_expression(_p int) (localctx IScalar_expressionC case 9: { - p.SetState(226) + p.SetState(257) p.Match(CosmosDBParserEXISTS_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -4188,7 +4573,7 @@ func (p *CosmosDBParser) scalar_expression(_p int) (localctx IScalar_expressionC } } { - p.SetState(227) + p.SetState(258) p.Match(CosmosDBParserLR_BRACKET_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -4196,11 +4581,11 @@ func (p *CosmosDBParser) scalar_expression(_p int) (localctx IScalar_expressionC } } { - p.SetState(228) + p.SetState(259) p.Select_() } { - p.SetState(229) + p.SetState(260) p.Match(CosmosDBParserRR_BRACKET_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -4210,17 +4595,47 @@ func (p *CosmosDBParser) scalar_expression(_p int) (localctx IScalar_expressionC case 10: { - p.SetState(231) - p.Unary_operator() + p.SetState(262) + p.Match(CosmosDBParserARRAY_SYMBOL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } { - p.SetState(232) - p.scalar_expression(16) + p.SetState(263) + p.Match(CosmosDBParserLR_BRACKET_SYMBOL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(264) + p.Select_() + } + { + p.SetState(265) + p.Match(CosmosDBParserRR_BRACKET_SYMBOL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } } case 11: { - p.SetState(234) + p.SetState(267) + p.Unary_operator() + } + { + p.SetState(268) + p.scalar_expression(17) + } + + case 12: + { + p.SetState(270) p.Match(CosmosDBParserNOT_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -4228,20 +4643,20 @@ func (p *CosmosDBParser) scalar_expression(_p int) (localctx IScalar_expressionC } } { - p.SetState(235) - p.scalar_expression(15) + p.SetState(271) + p.scalar_expression(16) } case antlr.ATNInvalidAltNumber: goto errorExit } p.GetParserRuleContext().SetStop(p.GetTokenStream().LT(-1)) - p.SetState(323) + p.SetState(367) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 27, p.GetParserRuleContext()) + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 34, p.GetParserRuleContext()) if p.HasError() { goto errorExit } @@ -4251,78 +4666,78 @@ func (p *CosmosDBParser) scalar_expression(_p int) (localctx IScalar_expressionC p.TriggerExitRuleEvent() } _prevctx = localctx - p.SetState(321) + p.SetState(365) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 26, p.GetParserRuleContext()) { + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 33, p.GetParserRuleContext()) { case 1: localctx = NewScalar_expressionContext(p, _parentctx, _parentState) p.PushNewRecursionContext(localctx, _startState, CosmosDBParserRULE_scalar_expression) - p.SetState(238) + p.SetState(274) - if !(p.Precpred(p.GetParserRuleContext(), 14)) { - p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 14)", "")) + if !(p.Precpred(p.GetParserRuleContext(), 15)) { + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 15)", "")) goto errorExit } { - p.SetState(239) + p.SetState(275) p.Multiplicative_operator() } { - p.SetState(240) - p.scalar_expression(15) + p.SetState(276) + p.scalar_expression(16) } case 2: localctx = NewScalar_expressionContext(p, _parentctx, _parentState) p.PushNewRecursionContext(localctx, _startState, CosmosDBParserRULE_scalar_expression) - p.SetState(242) + p.SetState(278) - if !(p.Precpred(p.GetParserRuleContext(), 13)) { - p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 13)", "")) + if !(p.Precpred(p.GetParserRuleContext(), 14)) { + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 14)", "")) goto errorExit } { - p.SetState(243) + p.SetState(279) p.Additive_operator() } { - p.SetState(244) - p.scalar_expression(14) + p.SetState(280) + p.scalar_expression(15) } case 3: localctx = NewScalar_expressionContext(p, _parentctx, _parentState) p.PushNewRecursionContext(localctx, _startState, CosmosDBParserRULE_scalar_expression) - p.SetState(246) + p.SetState(282) - if !(p.Precpred(p.GetParserRuleContext(), 12)) { - p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 12)", "")) + if !(p.Precpred(p.GetParserRuleContext(), 13)) { + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 13)", "")) goto errorExit } { - p.SetState(247) + p.SetState(283) p.Shift_operator() } { - p.SetState(248) - p.scalar_expression(13) + p.SetState(284) + p.scalar_expression(14) } case 4: localctx = NewScalar_expressionContext(p, _parentctx, _parentState) p.PushNewRecursionContext(localctx, _startState, CosmosDBParserRULE_scalar_expression) - p.SetState(250) + p.SetState(286) - if !(p.Precpred(p.GetParserRuleContext(), 11)) { - p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 11)", "")) + if !(p.Precpred(p.GetParserRuleContext(), 12)) { + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 12)", "")) goto errorExit } { - p.SetState(251) + p.SetState(287) p.Match(CosmosDBParserBIT_AND_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -4330,21 +4745,21 @@ func (p *CosmosDBParser) scalar_expression(_p int) (localctx IScalar_expressionC } } { - p.SetState(252) - p.scalar_expression(12) + p.SetState(288) + p.scalar_expression(13) } case 5: localctx = NewScalar_expressionContext(p, _parentctx, _parentState) p.PushNewRecursionContext(localctx, _startState, CosmosDBParserRULE_scalar_expression) - p.SetState(253) + p.SetState(289) - if !(p.Precpred(p.GetParserRuleContext(), 10)) { - p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 10)", "")) + if !(p.Precpred(p.GetParserRuleContext(), 11)) { + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 11)", "")) goto errorExit } { - p.SetState(254) + p.SetState(290) p.Match(CosmosDBParserBIT_XOR_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -4352,21 +4767,21 @@ func (p *CosmosDBParser) scalar_expression(_p int) (localctx IScalar_expressionC } } { - p.SetState(255) - p.scalar_expression(11) + p.SetState(291) + p.scalar_expression(12) } case 6: localctx = NewScalar_expressionContext(p, _parentctx, _parentState) p.PushNewRecursionContext(localctx, _startState, CosmosDBParserRULE_scalar_expression) - p.SetState(256) + p.SetState(292) - if !(p.Precpred(p.GetParserRuleContext(), 9)) { - p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 9)", "")) + if !(p.Precpred(p.GetParserRuleContext(), 10)) { + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 10)", "")) goto errorExit } { - p.SetState(257) + p.SetState(293) p.Match(CosmosDBParserBIT_OR_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -4374,21 +4789,21 @@ func (p *CosmosDBParser) scalar_expression(_p int) (localctx IScalar_expressionC } } { - p.SetState(258) - p.scalar_expression(10) + p.SetState(294) + p.scalar_expression(11) } case 7: localctx = NewScalar_expressionContext(p, _parentctx, _parentState) p.PushNewRecursionContext(localctx, _startState, CosmosDBParserRULE_scalar_expression) - p.SetState(259) + p.SetState(295) - if !(p.Precpred(p.GetParserRuleContext(), 8)) { - p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 8)", "")) + if !(p.Precpred(p.GetParserRuleContext(), 9)) { + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 9)", "")) goto errorExit } { - p.SetState(260) + p.SetState(296) p.Match(CosmosDBParserDOUBLE_BAR_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -4396,38 +4811,38 @@ func (p *CosmosDBParser) scalar_expression(_p int) (localctx IScalar_expressionC } } { - p.SetState(261) - p.scalar_expression(9) + p.SetState(297) + p.scalar_expression(10) } case 8: localctx = NewScalar_expressionContext(p, _parentctx, _parentState) p.PushNewRecursionContext(localctx, _startState, CosmosDBParserRULE_scalar_expression) - p.SetState(262) + p.SetState(298) - if !(p.Precpred(p.GetParserRuleContext(), 7)) { - p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 7)", "")) + if !(p.Precpred(p.GetParserRuleContext(), 8)) { + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 8)", "")) goto errorExit } { - p.SetState(263) + p.SetState(299) p.Comparison_operator() } { - p.SetState(264) - p.scalar_expression(8) + p.SetState(300) + p.scalar_expression(9) } case 9: localctx = NewScalar_expressionContext(p, _parentctx, _parentState) p.PushNewRecursionContext(localctx, _startState, CosmosDBParserRULE_scalar_expression) - p.SetState(266) + p.SetState(302) - if !(p.Precpred(p.GetParserRuleContext(), 5)) { - p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 5)", "")) + if !(p.Precpred(p.GetParserRuleContext(), 6)) { + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 6)", "")) goto errorExit } - p.SetState(268) + p.SetState(304) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -4436,7 +4851,7 @@ func (p *CosmosDBParser) scalar_expression(_p int) (localctx IScalar_expressionC if _la == CosmosDBParserNOT_SYMBOL { { - p.SetState(267) + p.SetState(303) p.Match(CosmosDBParserNOT_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -4446,7 +4861,7 @@ func (p *CosmosDBParser) scalar_expression(_p int) (localctx IScalar_expressionC } { - p.SetState(270) + p.SetState(306) p.Match(CosmosDBParserBETWEEN_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -4454,11 +4869,11 @@ func (p *CosmosDBParser) scalar_expression(_p int) (localctx IScalar_expressionC } } { - p.SetState(271) + p.SetState(307) p.scalar_expression(0) } { - p.SetState(272) + p.SetState(308) p.Match(CosmosDBParserAND_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -4466,105 +4881,87 @@ func (p *CosmosDBParser) scalar_expression(_p int) (localctx IScalar_expressionC } } { - p.SetState(273) - p.scalar_expression(6) + p.SetState(309) + p.scalar_expression(7) } case 10: localctx = NewScalar_expressionContext(p, _parentctx, _parentState) p.PushNewRecursionContext(localctx, _startState, CosmosDBParserRULE_scalar_expression) - p.SetState(275) + p.SetState(311) if !(p.Precpred(p.GetParserRuleContext(), 4)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 4)", "")) goto errorExit } - p.SetState(277) - p.GetErrorHandler().Sync(p) - if p.HasError() { - goto errorExit - } - _la = p.GetTokenStream().LA(1) - - if _la == CosmosDBParserNOT_SYMBOL { - { - p.SetState(276) - p.Match(CosmosDBParserNOT_SYMBOL) - if p.HasError() { - // Recognition error - abort rule - goto errorExit - } - } - - } { - p.SetState(279) - p.Match(CosmosDBParserLIKE_SYMBOL) + p.SetState(312) + p.Match(CosmosDBParserAND_SYMBOL) if p.HasError() { // Recognition error - abort rule goto errorExit } } { - p.SetState(280) + p.SetState(313) p.scalar_expression(5) } case 11: localctx = NewScalar_expressionContext(p, _parentctx, _parentState) p.PushNewRecursionContext(localctx, _startState, CosmosDBParserRULE_scalar_expression) - p.SetState(281) + p.SetState(314) if !(p.Precpred(p.GetParserRuleContext(), 3)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 3)", "")) goto errorExit } { - p.SetState(282) - p.Match(CosmosDBParserAND_SYMBOL) + p.SetState(315) + p.Match(CosmosDBParserOR_SYMBOL) if p.HasError() { // Recognition error - abort rule goto errorExit } } { - p.SetState(283) + p.SetState(316) p.scalar_expression(4) } case 12: localctx = NewScalar_expressionContext(p, _parentctx, _parentState) p.PushNewRecursionContext(localctx, _startState, CosmosDBParserRULE_scalar_expression) - p.SetState(284) + p.SetState(317) if !(p.Precpred(p.GetParserRuleContext(), 2)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 2)", "")) goto errorExit } { - p.SetState(285) - p.Match(CosmosDBParserOR_SYMBOL) + p.SetState(318) + p.Match(CosmosDBParserDOUBLE_QUESTION_MARK_SYMBOL) if p.HasError() { // Recognition error - abort rule goto errorExit } } { - p.SetState(286) + p.SetState(319) p.scalar_expression(3) } case 13: localctx = NewScalar_expressionContext(p, _parentctx, _parentState) p.PushNewRecursionContext(localctx, _startState, CosmosDBParserRULE_scalar_expression) - p.SetState(287) + p.SetState(320) if !(p.Precpred(p.GetParserRuleContext(), 1)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 1)", "")) goto errorExit } { - p.SetState(288) + p.SetState(321) p.Match(CosmosDBParserQUESTION_MARK_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -4572,11 +4969,11 @@ func (p *CosmosDBParser) scalar_expression(_p int) (localctx IScalar_expressionC } } { - p.SetState(289) + p.SetState(322) p.scalar_expression(0) } { - p.SetState(290) + p.SetState(323) p.Match(CosmosDBParserCOLON_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -4584,21 +4981,21 @@ func (p *CosmosDBParser) scalar_expression(_p int) (localctx IScalar_expressionC } } { - p.SetState(291) + p.SetState(324) p.scalar_expression(2) } case 14: localctx = NewScalar_expressionContext(p, _parentctx, _parentState) p.PushNewRecursionContext(localctx, _startState, CosmosDBParserRULE_scalar_expression) - p.SetState(293) + p.SetState(326) - if !(p.Precpred(p.GetParserRuleContext(), 18)) { - p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 18)", "")) + if !(p.Precpred(p.GetParserRuleContext(), 19)) { + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 19)", "")) goto errorExit } { - p.SetState(294) + p.SetState(327) p.Match(CosmosDBParserDOT_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -4606,28 +5003,28 @@ func (p *CosmosDBParser) scalar_expression(_p int) (localctx IScalar_expressionC } } { - p.SetState(295) + p.SetState(328) p.Property_name() } case 15: localctx = NewScalar_expressionContext(p, _parentctx, _parentState) p.PushNewRecursionContext(localctx, _startState, CosmosDBParserRULE_scalar_expression) - p.SetState(296) + p.SetState(329) - if !(p.Precpred(p.GetParserRuleContext(), 17)) { - p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 17)", "")) + if !(p.Precpred(p.GetParserRuleContext(), 18)) { + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 18)", "")) goto errorExit } { - p.SetState(297) + p.SetState(330) p.Match(CosmosDBParserLS_BRACKET_SYMBOL) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(301) + p.SetState(335) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -4636,7 +5033,7 @@ func (p *CosmosDBParser) scalar_expression(_p int) (localctx IScalar_expressionC switch p.GetTokenStream().LA(1) { case CosmosDBParserDOUBLE_QUOTE_STRING_LITERAL: { - p.SetState(298) + p.SetState(331) p.Match(CosmosDBParserDOUBLE_QUOTE_STRING_LITERAL) if p.HasError() { // Recognition error - abort rule @@ -4646,7 +5043,7 @@ func (p *CosmosDBParser) scalar_expression(_p int) (localctx IScalar_expressionC case CosmosDBParserSINGLE_QUOTE_STRING_LITERAL: { - p.SetState(299) + p.SetState(332) p.Match(CosmosDBParserSINGLE_QUOTE_STRING_LITERAL) if p.HasError() { // Recognition error - abort rule @@ -4656,16 +5053,22 @@ func (p *CosmosDBParser) scalar_expression(_p int) (localctx IScalar_expressionC case CosmosDBParserDECIMAL: { - p.SetState(300) + p.SetState(333) p.Array_index() } + case CosmosDBParserAT_SYMBOL: + { + p.SetState(334) + p.Parameter_name() + } + default: p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) goto errorExit } { - p.SetState(303) + p.SetState(337) p.Match(CosmosDBParserRS_BRACKET_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -4676,13 +5079,13 @@ func (p *CosmosDBParser) scalar_expression(_p int) (localctx IScalar_expressionC case 16: localctx = NewScalar_expressionContext(p, _parentctx, _parentState) p.PushNewRecursionContext(localctx, _startState, CosmosDBParserRULE_scalar_expression) - p.SetState(304) + p.SetState(338) - if !(p.Precpred(p.GetParserRuleContext(), 6)) { - p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 6)", "")) + if !(p.Precpred(p.GetParserRuleContext(), 7)) { + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 7)", "")) goto errorExit } - p.SetState(306) + p.SetState(340) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -4691,7 +5094,7 @@ func (p *CosmosDBParser) scalar_expression(_p int) (localctx IScalar_expressionC if _la == CosmosDBParserNOT_SYMBOL { { - p.SetState(305) + p.SetState(339) p.Match(CosmosDBParserNOT_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -4701,7 +5104,7 @@ func (p *CosmosDBParser) scalar_expression(_p int) (localctx IScalar_expressionC } { - p.SetState(308) + p.SetState(342) p.Match(CosmosDBParserIN_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -4709,26 +5112,26 @@ func (p *CosmosDBParser) scalar_expression(_p int) (localctx IScalar_expressionC } } { - p.SetState(309) + p.SetState(343) p.Match(CosmosDBParserLR_BRACKET_SYMBOL) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(318) + p.SetState(352) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) - if (int64((_la-6)) & ^0x3f) == 0 && ((int64(1)<<(_la-6))&9115286608608755263) != 0 { + if ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&1971080751189952) != 0) || ((int64((_la-67)) & ^0x3f) == 0 && ((int64(1)<<(_la-67))&2023) != 0) { { - p.SetState(310) + p.SetState(344) p.scalar_expression(0) } - p.SetState(315) + p.SetState(349) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -4737,7 +5140,7 @@ func (p *CosmosDBParser) scalar_expression(_p int) (localctx IScalar_expressionC for _la == CosmosDBParserCOMMA_SYMBOL { { - p.SetState(311) + p.SetState(345) p.Match(CosmosDBParserCOMMA_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -4745,11 +5148,11 @@ func (p *CosmosDBParser) scalar_expression(_p int) (localctx IScalar_expressionC } } { - p.SetState(312) + p.SetState(346) p.scalar_expression(0) } - p.SetState(317) + p.SetState(351) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -4759,7 +5162,7 @@ func (p *CosmosDBParser) scalar_expression(_p int) (localctx IScalar_expressionC } { - p.SetState(320) + p.SetState(354) p.Match(CosmosDBParserRR_BRACKET_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -4767,17 +5170,77 @@ func (p *CosmosDBParser) scalar_expression(_p int) (localctx IScalar_expressionC } } + case 17: + localctx = NewScalar_expressionContext(p, _parentctx, _parentState) + p.PushNewRecursionContext(localctx, _startState, CosmosDBParserRULE_scalar_expression) + p.SetState(355) + + if !(p.Precpred(p.GetParserRuleContext(), 5)) { + p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 5)", "")) + goto errorExit + } + p.SetState(357) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + _la = p.GetTokenStream().LA(1) + + if _la == CosmosDBParserNOT_SYMBOL { + { + p.SetState(356) + p.Match(CosmosDBParserNOT_SYMBOL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + } + { + p.SetState(359) + p.Match(CosmosDBParserLIKE_SYMBOL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(360) + p.scalar_expression(0) + } + p.SetState(363) + p.GetErrorHandler().Sync(p) + + if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 32, p.GetParserRuleContext()) == 1 { + { + p.SetState(361) + p.Match(CosmosDBParserESCAPE_SYMBOL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(362) + p.scalar_expression(0) + } + + } else if p.HasError() { // JIM + goto errorExit + } + case antlr.ATNInvalidAltNumber: goto errorExit } } - p.SetState(325) + p.SetState(369) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } - _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 27, p.GetParserRuleContext()) + _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 34, p.GetParserRuleContext()) if p.HasError() { goto errorExit } @@ -4941,26 +5404,26 @@ func (p *CosmosDBParser) Create_array_expression() (localctx ICreate_array_expre p.EnterOuterAlt(localctx, 1) { - p.SetState(326) + p.SetState(370) p.Match(CosmosDBParserLS_BRACKET_SYMBOL) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(335) + p.SetState(379) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) - if (int64((_la-6)) & ^0x3f) == 0 && ((int64(1)<<(_la-6))&9115286608608755263) != 0 { + if ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&1971080751189952) != 0) || ((int64((_la-67)) & ^0x3f) == 0 && ((int64(1)<<(_la-67))&2023) != 0) { { - p.SetState(327) + p.SetState(371) p.scalar_expression(0) } - p.SetState(332) + p.SetState(376) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -4969,7 +5432,7 @@ func (p *CosmosDBParser) Create_array_expression() (localctx ICreate_array_expre for _la == CosmosDBParserCOMMA_SYMBOL { { - p.SetState(328) + p.SetState(372) p.Match(CosmosDBParserCOMMA_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -4977,11 +5440,11 @@ func (p *CosmosDBParser) Create_array_expression() (localctx ICreate_array_expre } } { - p.SetState(329) + p.SetState(373) p.scalar_expression(0) } - p.SetState(334) + p.SetState(378) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -4991,7 +5454,7 @@ func (p *CosmosDBParser) Create_array_expression() (localctx ICreate_array_expre } { - p.SetState(337) + p.SetState(381) p.Match(CosmosDBParserRS_BRACKET_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -5157,26 +5620,26 @@ func (p *CosmosDBParser) Create_object_expression() (localctx ICreate_object_exp p.EnterOuterAlt(localctx, 1) { - p.SetState(339) + p.SetState(383) p.Match(CosmosDBParserLC_BRACKET_SYMBOL) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(348) + p.SetState(392) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) - if (int64((_la-15)) & ^0x3f) == 0 && ((int64(1)<<(_la-15))&13581167626321919) != 0 { + if ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&17179869180) != 0) || ((int64((_la-69)) & ^0x3f) == 0 && ((int64(1)<<(_la-69))&385) != 0) { { - p.SetState(340) + p.SetState(384) p.Object_field_pair() } - p.SetState(345) + p.SetState(389) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -5185,7 +5648,7 @@ func (p *CosmosDBParser) Create_object_expression() (localctx ICreate_object_exp for _la == CosmosDBParserCOMMA_SYMBOL { { - p.SetState(341) + p.SetState(385) p.Match(CosmosDBParserCOMMA_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -5193,11 +5656,11 @@ func (p *CosmosDBParser) Create_object_expression() (localctx ICreate_object_exp } } { - p.SetState(342) + p.SetState(386) p.Object_field_pair() } - p.SetState(347) + p.SetState(391) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -5207,7 +5670,7 @@ func (p *CosmosDBParser) Create_object_expression() (localctx ICreate_object_exp } { - p.SetState(350) + p.SetState(394) p.Match(CosmosDBParserRC_BRACKET_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -5363,7 +5826,7 @@ func (p *CosmosDBParser) Object_field_pair() (localctx IObject_field_pairContext localctx = NewObject_field_pairContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 46, CosmosDBParserRULE_object_field_pair) p.EnterOuterAlt(localctx, 1) - p.SetState(354) + p.SetState(398) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -5372,13 +5835,13 @@ func (p *CosmosDBParser) Object_field_pair() (localctx IObject_field_pairContext switch p.GetTokenStream().LA(1) { case CosmosDBParserSINGLE_QUOTE_STRING_LITERAL, CosmosDBParserDOUBLE_QUOTE_STRING_LITERAL: { - p.SetState(352) + p.SetState(396) p.String_literal() } - case CosmosDBParserIN_SYMBOL, CosmosDBParserBETWEEN_SYMBOL, CosmosDBParserTOP_SYMBOL, CosmosDBParserVALUE_SYMBOL, CosmosDBParserORDER_SYMBOL, CosmosDBParserBY_SYMBOL, CosmosDBParserGROUP_SYMBOL, CosmosDBParserOFFSET_SYMBOL, CosmosDBParserLIMIT_SYMBOL, CosmosDBParserASC_SYMBOL, CosmosDBParserDESC_SYMBOL, CosmosDBParserEXISTS_SYMBOL, CosmosDBParserLIKE_SYMBOL, CosmosDBParserHAVING_SYMBOL, CosmosDBParserJOIN_SYMBOL, CosmosDBParserIDENTIFIER: + case CosmosDBParserAS_SYMBOL, CosmosDBParserSELECT_SYMBOL, CosmosDBParserFROM_SYMBOL, CosmosDBParserDISTINCT_SYMBOL, CosmosDBParserUNDEFINED_SYMBOL, CosmosDBParserNULL_SYMBOL, CosmosDBParserFALSE_SYMBOL, CosmosDBParserTRUE_SYMBOL, CosmosDBParserNOT_SYMBOL, CosmosDBParserUDF_SYMBOL, CosmosDBParserWHERE_SYMBOL, CosmosDBParserAND_SYMBOL, CosmosDBParserOR_SYMBOL, CosmosDBParserIN_SYMBOL, CosmosDBParserBETWEEN_SYMBOL, CosmosDBParserTOP_SYMBOL, CosmosDBParserVALUE_SYMBOL, CosmosDBParserORDER_SYMBOL, CosmosDBParserBY_SYMBOL, CosmosDBParserGROUP_SYMBOL, CosmosDBParserOFFSET_SYMBOL, CosmosDBParserLIMIT_SYMBOL, CosmosDBParserASC_SYMBOL, CosmosDBParserDESC_SYMBOL, CosmosDBParserEXISTS_SYMBOL, CosmosDBParserLIKE_SYMBOL, CosmosDBParserHAVING_SYMBOL, CosmosDBParserJOIN_SYMBOL, CosmosDBParserESCAPE_SYMBOL, CosmosDBParserARRAY_SYMBOL, CosmosDBParserROOT_SYMBOL, CosmosDBParserRANK_SYMBOL, CosmosDBParserIDENTIFIER: { - p.SetState(353) + p.SetState(397) p.Property_name() } @@ -5387,7 +5850,7 @@ func (p *CosmosDBParser) Object_field_pair() (localctx IObject_field_pairContext goto errorExit } { - p.SetState(356) + p.SetState(400) p.Match(CosmosDBParserCOLON_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -5395,7 +5858,7 @@ func (p *CosmosDBParser) Object_field_pair() (localctx IObject_field_pairContext } } { - p.SetState(357) + p.SetState(401) p.scalar_expression(0) } @@ -5524,7 +5987,7 @@ func (s *Scalar_function_expressionContext) Accept(visitor antlr.ParseTreeVisito func (p *CosmosDBParser) Scalar_function_expression() (localctx IScalar_function_expressionContext) { localctx = NewScalar_function_expressionContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 48, CosmosDBParserRULE_scalar_function_expression) - p.SetState(361) + p.SetState(405) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -5534,14 +5997,14 @@ func (p *CosmosDBParser) Scalar_function_expression() (localctx IScalar_function case CosmosDBParserUDF_SYMBOL: p.EnterOuterAlt(localctx, 1) { - p.SetState(359) + p.SetState(403) p.Udf_scalar_function_expression() } - case CosmosDBParserIN_SYMBOL, CosmosDBParserBETWEEN_SYMBOL, CosmosDBParserTOP_SYMBOL, CosmosDBParserVALUE_SYMBOL, CosmosDBParserORDER_SYMBOL, CosmosDBParserBY_SYMBOL, CosmosDBParserGROUP_SYMBOL, CosmosDBParserOFFSET_SYMBOL, CosmosDBParserLIMIT_SYMBOL, CosmosDBParserASC_SYMBOL, CosmosDBParserDESC_SYMBOL, CosmosDBParserEXISTS_SYMBOL, CosmosDBParserLIKE_SYMBOL, CosmosDBParserHAVING_SYMBOL, CosmosDBParserJOIN_SYMBOL, CosmosDBParserIDENTIFIER: + case CosmosDBParserIN_SYMBOL, CosmosDBParserBETWEEN_SYMBOL, CosmosDBParserTOP_SYMBOL, CosmosDBParserVALUE_SYMBOL, CosmosDBParserORDER_SYMBOL, CosmosDBParserBY_SYMBOL, CosmosDBParserGROUP_SYMBOL, CosmosDBParserOFFSET_SYMBOL, CosmosDBParserLIMIT_SYMBOL, CosmosDBParserASC_SYMBOL, CosmosDBParserDESC_SYMBOL, CosmosDBParserEXISTS_SYMBOL, CosmosDBParserLIKE_SYMBOL, CosmosDBParserHAVING_SYMBOL, CosmosDBParserJOIN_SYMBOL, CosmosDBParserESCAPE_SYMBOL, CosmosDBParserARRAY_SYMBOL, CosmosDBParserROOT_SYMBOL, CosmosDBParserRANK_SYMBOL, CosmosDBParserIDENTIFIER: p.EnterOuterAlt(localctx, 2) { - p.SetState(360) + p.SetState(404) p.Builtin_function_expression() } @@ -5735,7 +6198,7 @@ func (p *CosmosDBParser) Udf_scalar_function_expression() (localctx IUdf_scalar_ p.EnterOuterAlt(localctx, 1) { - p.SetState(363) + p.SetState(407) p.Match(CosmosDBParserUDF_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -5743,7 +6206,7 @@ func (p *CosmosDBParser) Udf_scalar_function_expression() (localctx IUdf_scalar_ } } { - p.SetState(364) + p.SetState(408) p.Match(CosmosDBParserDOT_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -5751,30 +6214,30 @@ func (p *CosmosDBParser) Udf_scalar_function_expression() (localctx IUdf_scalar_ } } { - p.SetState(365) + p.SetState(409) p.Identifier() } { - p.SetState(366) + p.SetState(410) p.Match(CosmosDBParserLR_BRACKET_SYMBOL) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(375) + p.SetState(419) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) - if (int64((_la-6)) & ^0x3f) == 0 && ((int64(1)<<(_la-6))&9115286608608755263) != 0 { + if ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&1971080751189952) != 0) || ((int64((_la-67)) & ^0x3f) == 0 && ((int64(1)<<(_la-67))&2023) != 0) { { - p.SetState(367) + p.SetState(411) p.scalar_expression(0) } - p.SetState(372) + p.SetState(416) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -5783,7 +6246,7 @@ func (p *CosmosDBParser) Udf_scalar_function_expression() (localctx IUdf_scalar_ for _la == CosmosDBParserCOMMA_SYMBOL { { - p.SetState(368) + p.SetState(412) p.Match(CosmosDBParserCOMMA_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -5791,11 +6254,11 @@ func (p *CosmosDBParser) Udf_scalar_function_expression() (localctx IUdf_scalar_ } } { - p.SetState(369) + p.SetState(413) p.scalar_expression(0) } - p.SetState(374) + p.SetState(418) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -5805,7 +6268,7 @@ func (p *CosmosDBParser) Udf_scalar_function_expression() (localctx IUdf_scalar_ } { - p.SetState(377) + p.SetState(421) p.Match(CosmosDBParserRR_BRACKET_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -5993,26 +6456,26 @@ func (p *CosmosDBParser) Builtin_function_expression() (localctx IBuiltin_functi p.EnterOuterAlt(localctx, 1) { - p.SetState(379) + p.SetState(423) p.Identifier() } { - p.SetState(380) + p.SetState(424) p.Match(CosmosDBParserLR_BRACKET_SYMBOL) if p.HasError() { // Recognition error - abort rule goto errorExit } } - p.SetState(392) + p.SetState(436) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) - if ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&-6917467407745314878) != 0) || ((int64((_la-64)) & ^0x3f) == 0 && ((int64(1)<<(_la-64))&31) != 0) { - p.SetState(383) + if ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&1971080751189954) != 0) || ((int64((_la-67)) & ^0x3f) == 0 && ((int64(1)<<(_la-67))&2023) != 0) { + p.SetState(427) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -6021,7 +6484,7 @@ func (p *CosmosDBParser) Builtin_function_expression() (localctx IBuiltin_functi switch p.GetTokenStream().LA(1) { case CosmosDBParserMULTIPLY_OPERATOR: { - p.SetState(381) + p.SetState(425) p.Match(CosmosDBParserMULTIPLY_OPERATOR) if p.HasError() { // Recognition error - abort rule @@ -6029,9 +6492,9 @@ func (p *CosmosDBParser) Builtin_function_expression() (localctx IBuiltin_functi } } - case CosmosDBParserUNDEFINED_SYMBOL, CosmosDBParserNULL_SYMBOL, CosmosDBParserFALSE_SYMBOL, CosmosDBParserTRUE_SYMBOL, CosmosDBParserNOT_SYMBOL, CosmosDBParserUDF_SYMBOL, CosmosDBParserIN_SYMBOL, CosmosDBParserBETWEEN_SYMBOL, CosmosDBParserTOP_SYMBOL, CosmosDBParserVALUE_SYMBOL, CosmosDBParserORDER_SYMBOL, CosmosDBParserBY_SYMBOL, CosmosDBParserGROUP_SYMBOL, CosmosDBParserOFFSET_SYMBOL, CosmosDBParserLIMIT_SYMBOL, CosmosDBParserASC_SYMBOL, CosmosDBParserDESC_SYMBOL, CosmosDBParserEXISTS_SYMBOL, CosmosDBParserLIKE_SYMBOL, CosmosDBParserHAVING_SYMBOL, CosmosDBParserJOIN_SYMBOL, CosmosDBParserAT_SYMBOL, CosmosDBParserLC_BRACKET_SYMBOL, CosmosDBParserLS_BRACKET_SYMBOL, CosmosDBParserLR_BRACKET_SYMBOL, CosmosDBParserPLUS_SYMBOL, CosmosDBParserMINUS_SYMBOL, CosmosDBParserBIT_NOT_SYMBOL, CosmosDBParserIDENTIFIER, CosmosDBParserDECIMAL, CosmosDBParserREAL, CosmosDBParserFLOAT, CosmosDBParserHEXADECIMAL, CosmosDBParserSINGLE_QUOTE_STRING_LITERAL, CosmosDBParserDOUBLE_QUOTE_STRING_LITERAL: + case CosmosDBParserUNDEFINED_SYMBOL, CosmosDBParserNULL_SYMBOL, CosmosDBParserFALSE_SYMBOL, CosmosDBParserTRUE_SYMBOL, CosmosDBParserNOT_SYMBOL, CosmosDBParserUDF_SYMBOL, CosmosDBParserIN_SYMBOL, CosmosDBParserBETWEEN_SYMBOL, CosmosDBParserTOP_SYMBOL, CosmosDBParserVALUE_SYMBOL, CosmosDBParserORDER_SYMBOL, CosmosDBParserBY_SYMBOL, CosmosDBParserGROUP_SYMBOL, CosmosDBParserOFFSET_SYMBOL, CosmosDBParserLIMIT_SYMBOL, CosmosDBParserASC_SYMBOL, CosmosDBParserDESC_SYMBOL, CosmosDBParserEXISTS_SYMBOL, CosmosDBParserLIKE_SYMBOL, CosmosDBParserHAVING_SYMBOL, CosmosDBParserJOIN_SYMBOL, CosmosDBParserESCAPE_SYMBOL, CosmosDBParserARRAY_SYMBOL, CosmosDBParserROOT_SYMBOL, CosmosDBParserRANK_SYMBOL, CosmosDBParserAT_SYMBOL, CosmosDBParserLC_BRACKET_SYMBOL, CosmosDBParserLS_BRACKET_SYMBOL, CosmosDBParserLR_BRACKET_SYMBOL, CosmosDBParserPLUS_SYMBOL, CosmosDBParserMINUS_SYMBOL, CosmosDBParserBIT_NOT_SYMBOL, CosmosDBParserINFINITY_SYMBOL, CosmosDBParserNAN_SYMBOL, CosmosDBParserIDENTIFIER, CosmosDBParserDECIMAL, CosmosDBParserREAL, CosmosDBParserFLOAT, CosmosDBParserHEXADECIMAL, CosmosDBParserSINGLE_QUOTE_STRING_LITERAL, CosmosDBParserDOUBLE_QUOTE_STRING_LITERAL: { - p.SetState(382) + p.SetState(426) p.scalar_expression(0) } @@ -6039,7 +6502,7 @@ func (p *CosmosDBParser) Builtin_function_expression() (localctx IBuiltin_functi p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) goto errorExit } - p.SetState(389) + p.SetState(433) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -6048,7 +6511,7 @@ func (p *CosmosDBParser) Builtin_function_expression() (localctx IBuiltin_functi for _la == CosmosDBParserCOMMA_SYMBOL { { - p.SetState(385) + p.SetState(429) p.Match(CosmosDBParserCOMMA_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -6056,11 +6519,11 @@ func (p *CosmosDBParser) Builtin_function_expression() (localctx IBuiltin_functi } } { - p.SetState(386) + p.SetState(430) p.scalar_expression(0) } - p.SetState(391) + p.SetState(435) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -6070,7 +6533,7 @@ func (p *CosmosDBParser) Builtin_function_expression() (localctx IBuiltin_functi } { - p.SetState(394) + p.SetState(438) p.Match(CosmosDBParserRR_BRACKET_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -6188,10 +6651,10 @@ func (p *CosmosDBParser) Multiplicative_operator() (localctx IMultiplicative_ope p.EnterOuterAlt(localctx, 1) { - p.SetState(396) + p.SetState(440) _la = p.GetTokenStream().LA(1) - if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&211106232532994) != 0) { + if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&6755399441055746) != 0) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) @@ -6304,7 +6767,7 @@ func (p *CosmosDBParser) Additive_operator() (localctx IAdditive_operatorContext p.EnterOuterAlt(localctx, 1) { - p.SetState(398) + p.SetState(442) _la = p.GetTokenStream().LA(1) if !(_la == CosmosDBParserPLUS_SYMBOL || _la == CosmosDBParserMINUS_SYMBOL) { @@ -6425,10 +6888,10 @@ func (p *CosmosDBParser) Shift_operator() (localctx IShift_operatorContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(400) + p.SetState(444) _la = p.GetTokenStream().LA(1) - if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&1008806316530991104) != 0) { + if !((int64((_la-62)) & ^0x3f) == 0 && ((int64(1)<<(_la-62))&7) != 0) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) @@ -6459,6 +6922,7 @@ type IComparison_operatorContext interface { // Getter signatures EQUAL_SYMBOL() antlr.TerminalNode NOT_EQUAL_OPERATOR() antlr.TerminalNode + NOT_EQUAL_OPERATOR_2() antlr.TerminalNode LESS_THAN_OPERATOR() antlr.TerminalNode LESS_THAN_EQUAL_OPERATOR() antlr.TerminalNode GREATER_THAN_OPERATOR() antlr.TerminalNode @@ -6508,6 +6972,10 @@ func (s *Comparison_operatorContext) NOT_EQUAL_OPERATOR() antlr.TerminalNode { return s.GetToken(CosmosDBParserNOT_EQUAL_OPERATOR, 0) } +func (s *Comparison_operatorContext) NOT_EQUAL_OPERATOR_2() antlr.TerminalNode { + return s.GetToken(CosmosDBParserNOT_EQUAL_OPERATOR_2, 0) +} + func (s *Comparison_operatorContext) LESS_THAN_OPERATOR() antlr.TerminalNode { return s.GetToken(CosmosDBParserLESS_THAN_OPERATOR, 0) } @@ -6561,10 +7029,10 @@ func (p *CosmosDBParser) Comparison_operator() (localctx IComparison_operatorCon p.EnterOuterAlt(localctx, 1) { - p.SetState(402) + p.SetState(446) _la = p.GetTokenStream().LA(1) - if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&1292533093055332352) != 0) { + if !((int64((_la-57)) & ^0x3f) == 0 && ((int64(1)<<(_la-57))&799) != 0) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) @@ -6682,10 +7150,10 @@ func (p *CosmosDBParser) Unary_operator() (localctx IUnary_operatorContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(404) + p.SetState(448) _la = p.GetTokenStream().LA(1) - if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&61572651155456) != 0) { + if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&1970324836974592) != 0) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) @@ -6808,7 +7276,7 @@ func (p *CosmosDBParser) Parameter_name() (localctx IParameter_nameContext) { p.EnterRule(localctx, 64, CosmosDBParserRULE_parameter_name) p.EnterOuterAlt(localctx, 1) { - p.SetState(406) + p.SetState(450) p.Match(CosmosDBParserAT_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -6816,7 +7284,7 @@ func (p *CosmosDBParser) Parameter_name() (localctx IParameter_nameContext) { } } { - p.SetState(407) + p.SetState(451) p.Identifier() } @@ -6996,7 +7464,7 @@ func (s *ConstantContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { func (p *CosmosDBParser) Constant() (localctx IConstantContext) { localctx = NewConstantContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 66, CosmosDBParserRULE_constant) - p.SetState(414) + p.SetState(458) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -7006,35 +7474,35 @@ func (p *CosmosDBParser) Constant() (localctx IConstantContext) { case CosmosDBParserUNDEFINED_SYMBOL: p.EnterOuterAlt(localctx, 1) { - p.SetState(409) + p.SetState(453) p.Undefined_constant() } case CosmosDBParserNULL_SYMBOL: p.EnterOuterAlt(localctx, 2) { - p.SetState(410) + p.SetState(454) p.Null_constant() } case CosmosDBParserFALSE_SYMBOL, CosmosDBParserTRUE_SYMBOL: p.EnterOuterAlt(localctx, 3) { - p.SetState(411) + p.SetState(455) p.Boolean_constant() } - case CosmosDBParserDECIMAL, CosmosDBParserREAL, CosmosDBParserFLOAT, CosmosDBParserHEXADECIMAL: + case CosmosDBParserINFINITY_SYMBOL, CosmosDBParserNAN_SYMBOL, CosmosDBParserDECIMAL, CosmosDBParserREAL, CosmosDBParserFLOAT, CosmosDBParserHEXADECIMAL: p.EnterOuterAlt(localctx, 4) { - p.SetState(412) + p.SetState(456) p.Number_constant() } case CosmosDBParserSINGLE_QUOTE_STRING_LITERAL, CosmosDBParserDOUBLE_QUOTE_STRING_LITERAL: p.EnterOuterAlt(localctx, 5) { - p.SetState(413) + p.SetState(457) p.String_constant() } @@ -7141,7 +7609,7 @@ func (p *CosmosDBParser) Undefined_constant() (localctx IUndefined_constantConte p.EnterRule(localctx, 68, CosmosDBParserRULE_undefined_constant) p.EnterOuterAlt(localctx, 1) { - p.SetState(416) + p.SetState(460) p.Match(CosmosDBParserUNDEFINED_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -7247,7 +7715,7 @@ func (p *CosmosDBParser) Null_constant() (localctx INull_constantContext) { p.EnterRule(localctx, 70, CosmosDBParserRULE_null_constant) p.EnterOuterAlt(localctx, 1) { - p.SetState(418) + p.SetState(462) p.Match(CosmosDBParserNULL_SYMBOL) if p.HasError() { // Recognition error - abort rule @@ -7360,7 +7828,7 @@ func (p *CosmosDBParser) Boolean_constant() (localctx IBoolean_constantContext) p.EnterOuterAlt(localctx, 1) { - p.SetState(420) + p.SetState(464) _la = p.GetTokenStream().LA(1) if !(_la == CosmosDBParserFALSE_SYMBOL || _la == CosmosDBParserTRUE_SYMBOL) { @@ -7394,6 +7862,8 @@ type INumber_constantContext interface { // Getter signatures Decimal_literal() IDecimal_literalContext Hexadecimal_literal() IHexadecimal_literalContext + INFINITY_SYMBOL() antlr.TerminalNode + NAN_SYMBOL() antlr.TerminalNode // IsNumber_constantContext differentiates from other interfaces. IsNumber_constantContext() @@ -7463,6 +7933,14 @@ func (s *Number_constantContext) Hexadecimal_literal() IHexadecimal_literalConte return t.(IHexadecimal_literalContext) } +func (s *Number_constantContext) INFINITY_SYMBOL() antlr.TerminalNode { + return s.GetToken(CosmosDBParserINFINITY_SYMBOL, 0) +} + +func (s *Number_constantContext) NAN_SYMBOL() antlr.TerminalNode { + return s.GetToken(CosmosDBParserNAN_SYMBOL, 0) +} + func (s *Number_constantContext) GetRuleContext() antlr.RuleContext { return s } @@ -7496,7 +7974,7 @@ func (s *Number_constantContext) Accept(visitor antlr.ParseTreeVisitor) interfac func (p *CosmosDBParser) Number_constant() (localctx INumber_constantContext) { localctx = NewNumber_constantContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 74, CosmosDBParserRULE_number_constant) - p.SetState(424) + p.SetState(470) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -7506,17 +7984,39 @@ func (p *CosmosDBParser) Number_constant() (localctx INumber_constantContext) { case CosmosDBParserDECIMAL, CosmosDBParserREAL, CosmosDBParserFLOAT: p.EnterOuterAlt(localctx, 1) { - p.SetState(422) + p.SetState(466) p.Decimal_literal() } case CosmosDBParserHEXADECIMAL: p.EnterOuterAlt(localctx, 2) { - p.SetState(423) + p.SetState(467) p.Hexadecimal_literal() } + case CosmosDBParserINFINITY_SYMBOL: + p.EnterOuterAlt(localctx, 3) + { + p.SetState(468) + p.Match(CosmosDBParserINFINITY_SYMBOL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case CosmosDBParserNAN_SYMBOL: + p.EnterOuterAlt(localctx, 4) + { + p.SetState(469) + p.Match(CosmosDBParserNAN_SYMBOL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + default: p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) goto errorExit @@ -7632,7 +8132,7 @@ func (p *CosmosDBParser) String_constant() (localctx IString_constantContext) { p.EnterRule(localctx, 76, CosmosDBParserRULE_string_constant) p.EnterOuterAlt(localctx, 1) { - p.SetState(426) + p.SetState(472) p.String_literal() } @@ -7741,7 +8241,7 @@ func (p *CosmosDBParser) String_literal() (localctx IString_literalContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(428) + p.SetState(474) _la = p.GetTokenStream().LA(1) if !(_la == CosmosDBParserSINGLE_QUOTE_STRING_LITERAL || _la == CosmosDBParserDOUBLE_QUOTE_STRING_LITERAL) { @@ -7862,10 +8362,10 @@ func (p *CosmosDBParser) Decimal_literal() (localctx IDecimal_literalContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(430) + p.SetState(476) _la = p.GetTokenStream().LA(1) - if !((int64((_la-63)) & ^0x3f) == 0 && ((int64(1)<<(_la-63))&7) != 0) { + if !((int64((_la-72)) & ^0x3f) == 0 && ((int64(1)<<(_la-72))&7) != 0) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) @@ -7971,7 +8471,7 @@ func (p *CosmosDBParser) Hexadecimal_literal() (localctx IHexadecimal_literalCon p.EnterRule(localctx, 82, CosmosDBParserRULE_hexadecimal_literal) p.EnterOuterAlt(localctx, 1) { - p.SetState(432) + p.SetState(478) p.Match(CosmosDBParserHEXADECIMAL) if p.HasError() { // Recognition error - abort rule @@ -8016,6 +8516,10 @@ type IIdentifierContext interface { LIKE_SYMBOL() antlr.TerminalNode HAVING_SYMBOL() antlr.TerminalNode JOIN_SYMBOL() antlr.TerminalNode + ESCAPE_SYMBOL() antlr.TerminalNode + ARRAY_SYMBOL() antlr.TerminalNode + ROOT_SYMBOL() antlr.TerminalNode + RANK_SYMBOL() antlr.TerminalNode // IsIdentifierContext differentiates from other interfaces. IsIdentifierContext() @@ -8117,6 +8621,22 @@ func (s *IdentifierContext) JOIN_SYMBOL() antlr.TerminalNode { return s.GetToken(CosmosDBParserJOIN_SYMBOL, 0) } +func (s *IdentifierContext) ESCAPE_SYMBOL() antlr.TerminalNode { + return s.GetToken(CosmosDBParserESCAPE_SYMBOL, 0) +} + +func (s *IdentifierContext) ARRAY_SYMBOL() antlr.TerminalNode { + return s.GetToken(CosmosDBParserARRAY_SYMBOL, 0) +} + +func (s *IdentifierContext) ROOT_SYMBOL() antlr.TerminalNode { + return s.GetToken(CosmosDBParserROOT_SYMBOL, 0) +} + +func (s *IdentifierContext) RANK_SYMBOL() antlr.TerminalNode { + return s.GetToken(CosmosDBParserRANK_SYMBOL, 0) +} + func (s *IdentifierContext) GetRuleContext() antlr.RuleContext { return s } @@ -8154,10 +8674,10 @@ func (p *CosmosDBParser) Identifier() (localctx IIdentifierContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(434) + p.SetState(480) _la = p.GetTokenStream().LA(1) - if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&2305843010287403008) != 0) { + if !((int64((_la-15)) & ^0x3f) == 0 && ((int64(1)<<(_la-15))&18014398510006271) != 0) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) @@ -8187,6 +8707,23 @@ type IProperty_nameContext interface { // Getter signatures Identifier() IIdentifierContext + SELECT_SYMBOL() antlr.TerminalNode + FROM_SYMBOL() antlr.TerminalNode + WHERE_SYMBOL() antlr.TerminalNode + NOT_SYMBOL() antlr.TerminalNode + AND_SYMBOL() antlr.TerminalNode + OR_SYMBOL() antlr.TerminalNode + AS_SYMBOL() antlr.TerminalNode + TRUE_SYMBOL() antlr.TerminalNode + FALSE_SYMBOL() antlr.TerminalNode + NULL_SYMBOL() antlr.TerminalNode + UNDEFINED_SYMBOL() antlr.TerminalNode + UDF_SYMBOL() antlr.TerminalNode + DISTINCT_SYMBOL() antlr.TerminalNode + ARRAY_SYMBOL() antlr.TerminalNode + ROOT_SYMBOL() antlr.TerminalNode + ESCAPE_SYMBOL() antlr.TerminalNode + RANK_SYMBOL() antlr.TerminalNode // IsProperty_nameContext differentiates from other interfaces. IsProperty_nameContext() @@ -8240,6 +8777,74 @@ func (s *Property_nameContext) Identifier() IIdentifierContext { return t.(IIdentifierContext) } +func (s *Property_nameContext) SELECT_SYMBOL() antlr.TerminalNode { + return s.GetToken(CosmosDBParserSELECT_SYMBOL, 0) +} + +func (s *Property_nameContext) FROM_SYMBOL() antlr.TerminalNode { + return s.GetToken(CosmosDBParserFROM_SYMBOL, 0) +} + +func (s *Property_nameContext) WHERE_SYMBOL() antlr.TerminalNode { + return s.GetToken(CosmosDBParserWHERE_SYMBOL, 0) +} + +func (s *Property_nameContext) NOT_SYMBOL() antlr.TerminalNode { + return s.GetToken(CosmosDBParserNOT_SYMBOL, 0) +} + +func (s *Property_nameContext) AND_SYMBOL() antlr.TerminalNode { + return s.GetToken(CosmosDBParserAND_SYMBOL, 0) +} + +func (s *Property_nameContext) OR_SYMBOL() antlr.TerminalNode { + return s.GetToken(CosmosDBParserOR_SYMBOL, 0) +} + +func (s *Property_nameContext) AS_SYMBOL() antlr.TerminalNode { + return s.GetToken(CosmosDBParserAS_SYMBOL, 0) +} + +func (s *Property_nameContext) TRUE_SYMBOL() antlr.TerminalNode { + return s.GetToken(CosmosDBParserTRUE_SYMBOL, 0) +} + +func (s *Property_nameContext) FALSE_SYMBOL() antlr.TerminalNode { + return s.GetToken(CosmosDBParserFALSE_SYMBOL, 0) +} + +func (s *Property_nameContext) NULL_SYMBOL() antlr.TerminalNode { + return s.GetToken(CosmosDBParserNULL_SYMBOL, 0) +} + +func (s *Property_nameContext) UNDEFINED_SYMBOL() antlr.TerminalNode { + return s.GetToken(CosmosDBParserUNDEFINED_SYMBOL, 0) +} + +func (s *Property_nameContext) UDF_SYMBOL() antlr.TerminalNode { + return s.GetToken(CosmosDBParserUDF_SYMBOL, 0) +} + +func (s *Property_nameContext) DISTINCT_SYMBOL() antlr.TerminalNode { + return s.GetToken(CosmosDBParserDISTINCT_SYMBOL, 0) +} + +func (s *Property_nameContext) ARRAY_SYMBOL() antlr.TerminalNode { + return s.GetToken(CosmosDBParserARRAY_SYMBOL, 0) +} + +func (s *Property_nameContext) ROOT_SYMBOL() antlr.TerminalNode { + return s.GetToken(CosmosDBParserROOT_SYMBOL, 0) +} + +func (s *Property_nameContext) ESCAPE_SYMBOL() antlr.TerminalNode { + return s.GetToken(CosmosDBParserESCAPE_SYMBOL, 0) +} + +func (s *Property_nameContext) RANK_SYMBOL() antlr.TerminalNode { + return s.GetToken(CosmosDBParserRANK_SYMBOL, 0) +} + func (s *Property_nameContext) GetRuleContext() antlr.RuleContext { return s } @@ -8273,10 +8878,209 @@ func (s *Property_nameContext) Accept(visitor antlr.ParseTreeVisitor) interface{ func (p *CosmosDBParser) Property_name() (localctx IProperty_nameContext) { localctx = NewProperty_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 86, CosmosDBParserRULE_property_name) - p.EnterOuterAlt(localctx, 1) - { - p.SetState(436) - p.Identifier() + p.SetState(500) + p.GetErrorHandler().Sync(p) + if p.HasError() { + goto errorExit + } + + switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 48, p.GetParserRuleContext()) { + case 1: + p.EnterOuterAlt(localctx, 1) + { + p.SetState(482) + p.Identifier() + } + + case 2: + p.EnterOuterAlt(localctx, 2) + { + p.SetState(483) + p.Match(CosmosDBParserSELECT_SYMBOL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 3: + p.EnterOuterAlt(localctx, 3) + { + p.SetState(484) + p.Match(CosmosDBParserFROM_SYMBOL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 4: + p.EnterOuterAlt(localctx, 4) + { + p.SetState(485) + p.Match(CosmosDBParserWHERE_SYMBOL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 5: + p.EnterOuterAlt(localctx, 5) + { + p.SetState(486) + p.Match(CosmosDBParserNOT_SYMBOL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 6: + p.EnterOuterAlt(localctx, 6) + { + p.SetState(487) + p.Match(CosmosDBParserAND_SYMBOL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 7: + p.EnterOuterAlt(localctx, 7) + { + p.SetState(488) + p.Match(CosmosDBParserOR_SYMBOL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 8: + p.EnterOuterAlt(localctx, 8) + { + p.SetState(489) + p.Match(CosmosDBParserAS_SYMBOL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 9: + p.EnterOuterAlt(localctx, 9) + { + p.SetState(490) + p.Match(CosmosDBParserTRUE_SYMBOL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 10: + p.EnterOuterAlt(localctx, 10) + { + p.SetState(491) + p.Match(CosmosDBParserFALSE_SYMBOL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 11: + p.EnterOuterAlt(localctx, 11) + { + p.SetState(492) + p.Match(CosmosDBParserNULL_SYMBOL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 12: + p.EnterOuterAlt(localctx, 12) + { + p.SetState(493) + p.Match(CosmosDBParserUNDEFINED_SYMBOL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 13: + p.EnterOuterAlt(localctx, 13) + { + p.SetState(494) + p.Match(CosmosDBParserUDF_SYMBOL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 14: + p.EnterOuterAlt(localctx, 14) + { + p.SetState(495) + p.Match(CosmosDBParserDISTINCT_SYMBOL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 15: + p.EnterOuterAlt(localctx, 15) + { + p.SetState(496) + p.Match(CosmosDBParserARRAY_SYMBOL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 16: + p.EnterOuterAlt(localctx, 16) + { + p.SetState(497) + p.Match(CosmosDBParserROOT_SYMBOL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 17: + p.EnterOuterAlt(localctx, 17) + { + p.SetState(498) + p.Match(CosmosDBParserESCAPE_SYMBOL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case 18: + p.EnterOuterAlt(localctx, 18) + { + p.SetState(499) + p.Match(CosmosDBParserRANK_SYMBOL) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + + case antlr.ATNInvalidAltNumber: + goto errorExit } errorExit: @@ -8377,7 +9181,7 @@ func (p *CosmosDBParser) Array_index() (localctx IArray_indexContext) { p.EnterRule(localctx, 88, CosmosDBParserRULE_array_index) p.EnterOuterAlt(localctx, 1) { - p.SetState(438) + p.SetState(502) p.Match(CosmosDBParserDECIMAL) if p.HasError() { // Recognition error - abort rule @@ -8495,7 +9299,7 @@ func (p *CosmosDBParser) Input_alias() (localctx IInput_aliasContext) { p.EnterRule(localctx, 90, CosmosDBParserRULE_input_alias) p.EnterOuterAlt(localctx, 1) { - p.SetState(440) + p.SetState(504) p.Identifier() } @@ -8514,6 +9318,13 @@ errorExit: func (p *CosmosDBParser) Sempred(localctx antlr.RuleContext, ruleIndex, predIndex int) bool { switch ruleIndex { + case 14: + var t *Container_expressionContext = nil + if localctx != nil { + t = localctx.(*Container_expressionContext) + } + return p.Container_expression_Sempred(t, predIndex) + case 20: var t *Scalar_expressionContext = nil if localctx != nil { @@ -8526,55 +9337,71 @@ func (p *CosmosDBParser) Sempred(localctx antlr.RuleContext, ruleIndex, predInde } } -func (p *CosmosDBParser) Scalar_expression_Sempred(localctx antlr.RuleContext, predIndex int) bool { +func (p *CosmosDBParser) Container_expression_Sempred(localctx antlr.RuleContext, predIndex int) bool { switch predIndex { case 0: - return p.Precpred(p.GetParserRuleContext(), 14) + return p.Precpred(p.GetParserRuleContext(), 3) case 1: - return p.Precpred(p.GetParserRuleContext(), 13) + return p.Precpred(p.GetParserRuleContext(), 2) + + default: + panic("No predicate with index: " + fmt.Sprint(predIndex)) + } +} +func (p *CosmosDBParser) Scalar_expression_Sempred(localctx antlr.RuleContext, predIndex int) bool { + switch predIndex { case 2: - return p.Precpred(p.GetParserRuleContext(), 12) + return p.Precpred(p.GetParserRuleContext(), 15) case 3: - return p.Precpred(p.GetParserRuleContext(), 11) + return p.Precpred(p.GetParserRuleContext(), 14) case 4: - return p.Precpred(p.GetParserRuleContext(), 10) + return p.Precpred(p.GetParserRuleContext(), 13) case 5: - return p.Precpred(p.GetParserRuleContext(), 9) + return p.Precpred(p.GetParserRuleContext(), 12) case 6: - return p.Precpred(p.GetParserRuleContext(), 8) + return p.Precpred(p.GetParserRuleContext(), 11) case 7: - return p.Precpred(p.GetParserRuleContext(), 7) + return p.Precpred(p.GetParserRuleContext(), 10) case 8: - return p.Precpred(p.GetParserRuleContext(), 5) + return p.Precpred(p.GetParserRuleContext(), 9) case 9: - return p.Precpred(p.GetParserRuleContext(), 4) + return p.Precpred(p.GetParserRuleContext(), 8) case 10: - return p.Precpred(p.GetParserRuleContext(), 3) + return p.Precpred(p.GetParserRuleContext(), 6) case 11: - return p.Precpred(p.GetParserRuleContext(), 2) + return p.Precpred(p.GetParserRuleContext(), 4) case 12: - return p.Precpred(p.GetParserRuleContext(), 1) + return p.Precpred(p.GetParserRuleContext(), 3) case 13: - return p.Precpred(p.GetParserRuleContext(), 18) + return p.Precpred(p.GetParserRuleContext(), 2) case 14: - return p.Precpred(p.GetParserRuleContext(), 17) + return p.Precpred(p.GetParserRuleContext(), 1) case 15: - return p.Precpred(p.GetParserRuleContext(), 6) + return p.Precpred(p.GetParserRuleContext(), 19) + + case 16: + return p.Precpred(p.GetParserRuleContext(), 18) + + case 17: + return p.Precpred(p.GetParserRuleContext(), 7) + + case 18: + return p.Precpred(p.GetParserRuleContext(), 5) default: panic("No predicate with index: " + fmt.Sprint(predIndex)) diff --git a/cosmosdb/examples/array_subquery.sql b/cosmosdb/examples/array_subquery.sql new file mode 100644 index 0000000..87b7825 --- /dev/null +++ b/cosmosdb/examples/array_subquery.sql @@ -0,0 +1 @@ +SELECT c.name, ARRAY(SELECT VALUE t FROM t IN c.tags WHERE t.active = true) AS activeTags FROM c diff --git a/cosmosdb/examples/bracket_parameter.sql b/cosmosdb/examples/bracket_parameter.sql new file mode 100644 index 0000000..ed19984 --- /dev/null +++ b/cosmosdb/examples/bracket_parameter.sql @@ -0,0 +1 @@ +SELECT c.id, c[@fieldName] AS fieldValue FROM c WHERE c[@filterField] = @filterValue diff --git a/cosmosdb/examples/coalesce_operator.sql b/cosmosdb/examples/coalesce_operator.sql new file mode 100644 index 0000000..00d7ce0 --- /dev/null +++ b/cosmosdb/examples/coalesce_operator.sql @@ -0,0 +1 @@ +SELECT c.name ?? "unknown" AS displayName, c.nickname ?? c.name ?? "anonymous" AS nick FROM c diff --git a/cosmosdb/examples/from_in_iteration.sql b/cosmosdb/examples/from_in_iteration.sql new file mode 100644 index 0000000..2ee1252 --- /dev/null +++ b/cosmosdb/examples/from_in_iteration.sql @@ -0,0 +1 @@ +SELECT VALUE s FROM s IN products.sizes WHERE s.key = 'l' diff --git a/cosmosdb/examples/from_root.sql b/cosmosdb/examples/from_root.sql new file mode 100644 index 0000000..29eace5 --- /dev/null +++ b/cosmosdb/examples/from_root.sql @@ -0,0 +1 @@ +SELECT * FROM ROOT r WHERE r.id = '1' diff --git a/cosmosdb/examples/from_subquery.sql b/cosmosdb/examples/from_subquery.sql new file mode 100644 index 0000000..26359f9 --- /dev/null +++ b/cosmosdb/examples/from_subquery.sql @@ -0,0 +1 @@ +SELECT sub.name FROM (SELECT c.name, c.city FROM c) AS sub diff --git a/cosmosdb/examples/from_subroot.sql b/cosmosdb/examples/from_subroot.sql new file mode 100644 index 0000000..0683bad --- /dev/null +++ b/cosmosdb/examples/from_subroot.sql @@ -0,0 +1 @@ +SELECT VALUE s FROM products.sizes s diff --git a/cosmosdb/examples/fulltext_search.sql b/cosmosdb/examples/fulltext_search.sql new file mode 100644 index 0000000..dc913ca --- /dev/null +++ b/cosmosdb/examples/fulltext_search.sql @@ -0,0 +1 @@ +SELECT TOP 10 c.name, c.description FROM c WHERE FullTextContains(c.description, 'bicycle') ORDER BY RANK FullTextScore(c.description, ['bicycle']) diff --git a/cosmosdb/examples/infinity_nan.sql b/cosmosdb/examples/infinity_nan.sql new file mode 100644 index 0000000..7273300 --- /dev/null +++ b/cosmosdb/examples/infinity_nan.sql @@ -0,0 +1 @@ +SELECT c.name, c.value = Infinity AS isInfinite, IS_NUMBER(NaN) AS nanCheck FROM c diff --git a/cosmosdb/examples/join_subquery.sql b/cosmosdb/examples/join_subquery.sql new file mode 100644 index 0000000..fb8e8a7 --- /dev/null +++ b/cosmosdb/examples/join_subquery.sql @@ -0,0 +1 @@ +SELECT p.name, t.tag FROM products p JOIN t IN p.tags WHERE t.active = true diff --git a/cosmosdb/examples/keyword_property_names.sql b/cosmosdb/examples/keyword_property_names.sql new file mode 100644 index 0000000..4fcd781 --- /dev/null +++ b/cosmosdb/examples/keyword_property_names.sql @@ -0,0 +1 @@ +SELECT c.id, c.value, c.order, c.type, c["select"], c["from"], c["where"] FROM c diff --git a/cosmosdb/examples/like_escape.sql b/cosmosdb/examples/like_escape.sql new file mode 100644 index 0000000..eaecd64 --- /dev/null +++ b/cosmosdb/examples/like_escape.sql @@ -0,0 +1 @@ +SELECT * FROM c WHERE c.name LIKE '%20^%%' ESCAPE '^' diff --git a/cosmosdb/examples/line_comment.sql b/cosmosdb/examples/line_comment.sql new file mode 100644 index 0000000..b63b5b8 --- /dev/null +++ b/cosmosdb/examples/line_comment.sql @@ -0,0 +1 @@ +SELECT c.name, c.city FROM c WHERE c.city = 'New York' -- filter by city diff --git a/cosmosdb/examples/not_equal_diamond.sql b/cosmosdb/examples/not_equal_diamond.sql new file mode 100644 index 0000000..45b1bfb --- /dev/null +++ b/cosmosdb/examples/not_equal_diamond.sql @@ -0,0 +1 @@ +SELECT * FROM c WHERE c.status <> 'active'