From 805dbfcb2736bf438c509d0a66db32e266c68c0e Mon Sep 17 00:00:00 2001 From: liuxy0551 Date: Wed, 20 May 2026 16:29:00 +0800 Subject: [PATCH] feat(generic): entity collector with empty column --- src/grammar/generic/GenericSql.g4 | 52 +- src/lib/generic/GenericSql.interp | 6 +- src/lib/generic/GenericSqlListener.ts | 95 +- src/lib/generic/GenericSqlParser.ts | 2288 ++++++++++------- src/lib/generic/GenericSqlVisitor.ts | 59 +- src/parser/generic/genericEntityCollector.ts | 66 +- src/parser/generic/index.ts | 15 + .../suggestion/fixtures/syntaxSuggestion.sql | 5 + .../suggestion/suggestionWithEntity.test.ts | 68 + .../suggestion/syntaxSuggestion.test.ts | 33 + 10 files changed, 1691 insertions(+), 996 deletions(-) diff --git a/src/grammar/generic/GenericSql.g4 b/src/grammar/generic/GenericSql.g4 index d77090e6..50a22cd3 100644 --- a/src/grammar/generic/GenericSql.g4 +++ b/src/grammar/generic/GenericSql.g4 @@ -82,9 +82,10 @@ setQuantifier ; selectItem - : expression (KW_AS? identifier)? - | qualifiedName '.' ASTERISK - | ASTERISK + : expression (KW_AS? identifier)? # selectExpressionElement + | qualifiedName '.' ASTERISK # selectStarElement + | ASTERISK # selectAllElement + | {this.shouldMatchEmpty()}? emptyColumn # selectEmptyElement ; fromClause @@ -114,7 +115,7 @@ relationPrimary ; whereClause - : KW_WHERE expression + : KW_WHERE (expression | emptyColumn) ; groupByClause @@ -122,7 +123,7 @@ groupByClause ; havingClause - : KW_HAVING expression + : KW_HAVING (expression | emptyColumn) ; orderByClause @@ -173,7 +174,11 @@ tableElement ; columnDefinition - : columnRef dataType (KW_NOT KW_NULL)? (KW_DEFAULT expression)? (KW_PRIMARY KW_KEY)? + : columnRefCreate colType=dataType (KW_NOT KW_NULL)? (KW_DEFAULT expression)? (KW_PRIMARY KW_KEY)? + ; + +columnRefCreate + : identifier ; tableConstraint @@ -247,17 +252,17 @@ valueExpression ; primaryExpression - : literal # literalExpression - | qualifiedName '(' (setQuantifier? expression (',' expression)*)? ')' # functionCall - | KW_CASE whenClause+ (KW_ELSE expression)? KW_END # searchedCaseExpression - | KW_CASE expression whenClause+ (KW_ELSE expression)? KW_END # simpleCaseExpression - | KW_CAST '(' expression KW_AS dataType ')' # castExpression - | KW_COALESCE '(' expression (',' expression)* ')' # coalesceExpression - | KW_NULLIF '(' valueExpression ',' valueExpression ')' # nullIfExpression - | '(' expression ')' # parenthesizedExpression - | KW_EXISTS '(' queryStatement ')' # existsExpression - | subqueryExpression # subqueryExpressionDefault - | qualifiedName # columnReference + : literal # literalExpression + | functionName '(' (setQuantifier? expression (',' expression)*)? ')' # functionCall + | KW_CASE whenClause+ (KW_ELSE expression)? KW_END # searchedCaseExpression + | KW_CASE expression whenClause+ (KW_ELSE expression)? KW_END # simpleCaseExpression + | KW_CAST '(' expression KW_AS dataType ')' # castExpression + | KW_COALESCE '(' expression (',' expression)* ')' # coalesceExpression + | KW_NULLIF '(' valueExpression ',' valueExpression ')' # nullIfExpression + | '(' expression ')' # parenthesizedExpression + | KW_EXISTS '(' queryStatement ')' # existsExpression + | subqueryExpression # subqueryExpressionDefault + | columnName # columnReference ; whenClause @@ -326,6 +331,15 @@ qualifiedName columnRef : identifier + | {this.shouldMatchEmpty()}? emptyColumn + ; + +columnName + : qualifiedName + ; + +emptyColumn + : ; tableName @@ -336,6 +350,10 @@ tableNameCreate : qualifiedName ; +functionName + : qualifiedName + ; + // 非保留关键字 — 可以用作标识符的关键字 // 核心结构关键字 (SELECT, FROM, WHERE, CREATE, TABLE, INSERT, UPDATE, DELETE, DROP, ALTER, SET 等) 是保留的,不能用作标识符 nonReserved diff --git a/src/lib/generic/GenericSql.interp b/src/lib/generic/GenericSql.interp index 89b4dae7..17492d96 100644 --- a/src/lib/generic/GenericSql.interp +++ b/src/lib/generic/GenericSql.interp @@ -281,6 +281,7 @@ deleteStatement createTableStatement tableElement columnDefinition +columnRefCreate tableConstraint alterTableStatement dropTableStatement @@ -300,10 +301,13 @@ literal identifier qualifiedName columnRef +columnName +emptyColumn tableName tableNameCreate +functionName nonReserved atn: -[4, 1, 122, 801, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 1, 0, 5, 0, 110, 8, 0, 10, 0, 12, 0, 113, 9, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 3, 2, 121, 8, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 130, 8, 3, 1, 4, 3, 4, 133, 8, 4, 1, 4, 1, 4, 1, 5, 1, 5, 3, 5, 139, 8, 5, 1, 5, 1, 5, 1, 5, 5, 5, 144, 8, 5, 10, 5, 12, 5, 147, 9, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 3, 7, 158, 8, 7, 1, 7, 5, 7, 161, 8, 7, 10, 7, 12, 7, 164, 9, 7, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 3, 9, 173, 8, 9, 1, 10, 1, 10, 3, 10, 177, 8, 10, 1, 10, 1, 10, 1, 10, 5, 10, 182, 8, 10, 10, 10, 12, 10, 185, 9, 10, 1, 10, 3, 10, 188, 8, 10, 1, 10, 3, 10, 191, 8, 10, 1, 10, 3, 10, 194, 8, 10, 1, 10, 3, 10, 197, 8, 10, 1, 10, 3, 10, 200, 8, 10, 1, 10, 3, 10, 203, 8, 10, 1, 11, 1, 11, 1, 12, 1, 12, 3, 12, 209, 8, 12, 1, 12, 3, 12, 212, 8, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 219, 8, 12, 1, 13, 1, 13, 1, 13, 1, 13, 5, 13, 225, 8, 13, 10, 13, 12, 13, 228, 9, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 5, 14, 240, 8, 14, 10, 14, 12, 14, 243, 9, 14, 1, 15, 3, 15, 246, 8, 15, 1, 15, 1, 15, 3, 15, 250, 8, 15, 1, 15, 1, 15, 3, 15, 254, 8, 15, 1, 15, 1, 15, 3, 15, 258, 8, 15, 1, 15, 3, 15, 261, 8, 15, 1, 16, 1, 16, 3, 16, 265, 8, 16, 1, 16, 3, 16, 268, 8, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 3, 17, 275, 8, 17, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 3, 19, 283, 8, 19, 1, 19, 1, 19, 1, 19, 5, 19, 288, 8, 19, 10, 19, 12, 19, 291, 9, 19, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 5, 21, 301, 8, 21, 10, 21, 12, 21, 304, 9, 21, 1, 22, 1, 22, 3, 22, 308, 8, 22, 1, 22, 1, 22, 3, 22, 312, 8, 22, 1, 23, 1, 23, 1, 23, 1, 23, 3, 23, 318, 8, 23, 1, 24, 1, 24, 1, 24, 1, 24, 3, 24, 324, 8, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 5, 25, 332, 8, 25, 10, 25, 12, 25, 335, 9, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 5, 26, 345, 8, 26, 10, 26, 12, 26, 348, 9, 26, 1, 26, 3, 26, 351, 8, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 28, 3, 28, 361, 8, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 3, 29, 368, 8, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 5, 29, 375, 8, 29, 10, 29, 12, 29, 378, 9, 29, 1, 29, 1, 29, 1, 29, 3, 29, 383, 8, 29, 1, 30, 1, 30, 3, 30, 387, 8, 30, 1, 31, 1, 31, 1, 31, 1, 31, 3, 31, 393, 8, 31, 1, 31, 1, 31, 3, 31, 397, 8, 31, 1, 31, 1, 31, 3, 31, 401, 8, 31, 1, 32, 1, 32, 3, 32, 405, 8, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 5, 32, 413, 8, 32, 10, 32, 12, 32, 416, 9, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 5, 32, 425, 8, 32, 10, 32, 12, 32, 428, 9, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 5, 32, 443, 8, 32, 10, 32, 12, 32, 446, 9, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 5, 32, 455, 8, 32, 10, 32, 12, 32, 458, 9, 32, 1, 32, 1, 32, 3, 32, 462, 8, 32, 1, 33, 1, 33, 1, 33, 1, 33, 3, 33, 468, 8, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 3, 33, 476, 8, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 3, 33, 483, 8, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 3, 33, 502, 8, 33, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 508, 8, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 3, 36, 518, 8, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 5, 36, 526, 8, 36, 10, 36, 12, 36, 529, 9, 36, 1, 37, 1, 37, 3, 37, 533, 8, 37, 1, 38, 1, 38, 1, 38, 1, 38, 3, 38, 539, 8, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 5, 38, 546, 8, 38, 10, 38, 12, 38, 549, 9, 38, 1, 38, 1, 38, 1, 38, 3, 38, 554, 8, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 3, 38, 562, 8, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 3, 38, 570, 8, 38, 1, 38, 1, 38, 1, 38, 1, 38, 3, 38, 576, 8, 38, 1, 38, 1, 38, 3, 38, 580, 8, 38, 1, 38, 1, 38, 1, 38, 3, 38, 585, 8, 38, 1, 38, 1, 38, 1, 38, 3, 38, 590, 8, 38, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 3, 40, 598, 8, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 5, 40, 609, 8, 40, 10, 40, 12, 40, 612, 9, 40, 1, 41, 1, 41, 1, 41, 1, 41, 3, 41, 618, 8, 41, 1, 41, 1, 41, 1, 41, 5, 41, 623, 8, 41, 10, 41, 12, 41, 626, 9, 41, 3, 41, 628, 8, 41, 1, 41, 1, 41, 1, 41, 1, 41, 4, 41, 634, 8, 41, 11, 41, 12, 41, 635, 1, 41, 1, 41, 3, 41, 640, 8, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 4, 41, 647, 8, 41, 11, 41, 12, 41, 648, 1, 41, 1, 41, 3, 41, 653, 8, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 5, 41, 669, 8, 41, 10, 41, 12, 41, 672, 9, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 3, 41, 694, 8, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 3, 44, 718, 8, 44, 1, 44, 3, 44, 721, 8, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 3, 44, 728, 8, 44, 1, 44, 3, 44, 731, 8, 44, 1, 44, 1, 44, 1, 44, 1, 44, 3, 44, 737, 8, 44, 1, 44, 1, 44, 1, 44, 1, 44, 3, 44, 743, 8, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 3, 44, 751, 8, 44, 1, 45, 1, 45, 1, 45, 1, 45, 5, 45, 757, 8, 45, 10, 45, 12, 45, 760, 9, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 3, 47, 776, 8, 47, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 3, 48, 783, 8, 48, 1, 49, 1, 49, 1, 49, 5, 49, 788, 8, 49, 10, 49, 12, 49, 791, 9, 49, 1, 50, 1, 50, 1, 51, 1, 51, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 0, 3, 28, 72, 80, 54, 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, 92, 94, 96, 98, 100, 102, 104, 106, 0, 8, 3, 0, 36, 36, 52, 52, 87, 87, 2, 0, 6, 6, 30, 30, 2, 0, 10, 10, 29, 29, 2, 0, 39, 39, 57, 57, 1, 0, 95, 100, 1, 0, 101, 102, 1, 0, 103, 105, 22, 0, 5, 6, 10, 10, 12, 15, 18, 18, 20, 21, 24, 27, 29, 29, 31, 31, 38, 40, 43, 43, 46, 46, 50, 51, 56, 58, 60, 60, 63, 66, 70, 70, 75, 75, 78, 78, 80, 80, 82, 86, 88, 88, 90, 91, 895, 0, 111, 1, 0, 0, 0, 2, 116, 1, 0, 0, 0, 4, 118, 1, 0, 0, 0, 6, 129, 1, 0, 0, 0, 8, 132, 1, 0, 0, 0, 10, 136, 1, 0, 0, 0, 12, 148, 1, 0, 0, 0, 14, 154, 1, 0, 0, 0, 16, 165, 1, 0, 0, 0, 18, 172, 1, 0, 0, 0, 20, 174, 1, 0, 0, 0, 22, 204, 1, 0, 0, 0, 24, 218, 1, 0, 0, 0, 26, 220, 1, 0, 0, 0, 28, 229, 1, 0, 0, 0, 30, 260, 1, 0, 0, 0, 32, 262, 1, 0, 0, 0, 34, 274, 1, 0, 0, 0, 36, 276, 1, 0, 0, 0, 38, 279, 1, 0, 0, 0, 40, 292, 1, 0, 0, 0, 42, 295, 1, 0, 0, 0, 44, 305, 1, 0, 0, 0, 46, 313, 1, 0, 0, 0, 48, 319, 1, 0, 0, 0, 50, 327, 1, 0, 0, 0, 52, 338, 1, 0, 0, 0, 54, 352, 1, 0, 0, 0, 56, 356, 1, 0, 0, 0, 58, 362, 1, 0, 0, 0, 60, 386, 1, 0, 0, 0, 62, 388, 1, 0, 0, 0, 64, 404, 1, 0, 0, 0, 66, 463, 1, 0, 0, 0, 68, 503, 1, 0, 0, 0, 70, 511, 1, 0, 0, 0, 72, 517, 1, 0, 0, 0, 74, 530, 1, 0, 0, 0, 76, 589, 1, 0, 0, 0, 78, 591, 1, 0, 0, 0, 80, 597, 1, 0, 0, 0, 82, 693, 1, 0, 0, 0, 84, 695, 1, 0, 0, 0, 86, 700, 1, 0, 0, 0, 88, 750, 1, 0, 0, 0, 90, 752, 1, 0, 0, 0, 92, 763, 1, 0, 0, 0, 94, 775, 1, 0, 0, 0, 96, 782, 1, 0, 0, 0, 98, 784, 1, 0, 0, 0, 100, 792, 1, 0, 0, 0, 102, 794, 1, 0, 0, 0, 104, 796, 1, 0, 0, 0, 106, 798, 1, 0, 0, 0, 108, 110, 3, 2, 1, 0, 109, 108, 1, 0, 0, 0, 110, 113, 1, 0, 0, 0, 111, 109, 1, 0, 0, 0, 111, 112, 1, 0, 0, 0, 112, 114, 1, 0, 0, 0, 113, 111, 1, 0, 0, 0, 114, 115, 5, 0, 0, 1, 115, 1, 1, 0, 0, 0, 116, 117, 3, 4, 2, 0, 117, 3, 1, 0, 0, 0, 118, 120, 3, 6, 3, 0, 119, 121, 5, 108, 0, 0, 120, 119, 1, 0, 0, 0, 120, 121, 1, 0, 0, 0, 121, 5, 1, 0, 0, 0, 122, 130, 3, 8, 4, 0, 123, 130, 3, 48, 24, 0, 124, 130, 3, 52, 26, 0, 125, 130, 3, 56, 28, 0, 126, 130, 3, 58, 29, 0, 127, 130, 3, 66, 33, 0, 128, 130, 3, 68, 34, 0, 129, 122, 1, 0, 0, 0, 129, 123, 1, 0, 0, 0, 129, 124, 1, 0, 0, 0, 129, 125, 1, 0, 0, 0, 129, 126, 1, 0, 0, 0, 129, 127, 1, 0, 0, 0, 129, 128, 1, 0, 0, 0, 130, 7, 1, 0, 0, 0, 131, 133, 3, 10, 5, 0, 132, 131, 1, 0, 0, 0, 132, 133, 1, 0, 0, 0, 133, 134, 1, 0, 0, 0, 134, 135, 3, 14, 7, 0, 135, 9, 1, 0, 0, 0, 136, 138, 5, 94, 0, 0, 137, 139, 5, 72, 0, 0, 138, 137, 1, 0, 0, 0, 138, 139, 1, 0, 0, 0, 139, 140, 1, 0, 0, 0, 140, 145, 3, 12, 6, 0, 141, 142, 5, 1, 0, 0, 142, 144, 3, 12, 6, 0, 143, 141, 1, 0, 0, 0, 144, 147, 1, 0, 0, 0, 145, 143, 1, 0, 0, 0, 145, 146, 1, 0, 0, 0, 146, 11, 1, 0, 0, 0, 147, 145, 1, 0, 0, 0, 148, 149, 3, 96, 48, 0, 149, 150, 5, 9, 0, 0, 150, 151, 5, 2, 0, 0, 151, 152, 3, 8, 4, 0, 152, 153, 5, 3, 0, 0, 153, 13, 1, 0, 0, 0, 154, 162, 3, 16, 8, 0, 155, 157, 7, 0, 0, 0, 156, 158, 5, 6, 0, 0, 157, 156, 1, 0, 0, 0, 157, 158, 1, 0, 0, 0, 158, 159, 1, 0, 0, 0, 159, 161, 3, 16, 8, 0, 160, 155, 1, 0, 0, 0, 161, 164, 1, 0, 0, 0, 162, 160, 1, 0, 0, 0, 162, 163, 1, 0, 0, 0, 163, 15, 1, 0, 0, 0, 164, 162, 1, 0, 0, 0, 165, 166, 3, 18, 9, 0, 166, 17, 1, 0, 0, 0, 167, 173, 3, 20, 10, 0, 168, 169, 5, 2, 0, 0, 169, 170, 3, 8, 4, 0, 170, 171, 5, 3, 0, 0, 171, 173, 1, 0, 0, 0, 172, 167, 1, 0, 0, 0, 172, 168, 1, 0, 0, 0, 173, 19, 1, 0, 0, 0, 174, 176, 5, 76, 0, 0, 175, 177, 3, 22, 11, 0, 176, 175, 1, 0, 0, 0, 176, 177, 1, 0, 0, 0, 177, 178, 1, 0, 0, 0, 178, 183, 3, 24, 12, 0, 179, 180, 5, 1, 0, 0, 180, 182, 3, 24, 12, 0, 181, 179, 1, 0, 0, 0, 182, 185, 1, 0, 0, 0, 183, 181, 1, 0, 0, 0, 183, 184, 1, 0, 0, 0, 184, 187, 1, 0, 0, 0, 185, 183, 1, 0, 0, 0, 186, 188, 3, 26, 13, 0, 187, 186, 1, 0, 0, 0, 187, 188, 1, 0, 0, 0, 188, 190, 1, 0, 0, 0, 189, 191, 3, 36, 18, 0, 190, 189, 1, 0, 0, 0, 190, 191, 1, 0, 0, 0, 191, 193, 1, 0, 0, 0, 192, 194, 3, 38, 19, 0, 193, 192, 1, 0, 0, 0, 193, 194, 1, 0, 0, 0, 194, 196, 1, 0, 0, 0, 195, 197, 3, 40, 20, 0, 196, 195, 1, 0, 0, 0, 196, 197, 1, 0, 0, 0, 197, 199, 1, 0, 0, 0, 198, 200, 3, 42, 21, 0, 199, 198, 1, 0, 0, 0, 199, 200, 1, 0, 0, 0, 200, 202, 1, 0, 0, 0, 201, 203, 3, 46, 23, 0, 202, 201, 1, 0, 0, 0, 202, 203, 1, 0, 0, 0, 203, 21, 1, 0, 0, 0, 204, 205, 7, 1, 0, 0, 205, 23, 1, 0, 0, 0, 206, 211, 3, 70, 35, 0, 207, 209, 5, 9, 0, 0, 208, 207, 1, 0, 0, 0, 208, 209, 1, 0, 0, 0, 209, 210, 1, 0, 0, 0, 210, 212, 3, 96, 48, 0, 211, 208, 1, 0, 0, 0, 211, 212, 1, 0, 0, 0, 212, 219, 1, 0, 0, 0, 213, 214, 3, 98, 49, 0, 214, 215, 5, 4, 0, 0, 215, 216, 5, 103, 0, 0, 216, 219, 1, 0, 0, 0, 217, 219, 5, 103, 0, 0, 218, 206, 1, 0, 0, 0, 218, 213, 1, 0, 0, 0, 218, 217, 1, 0, 0, 0, 219, 25, 1, 0, 0, 0, 220, 221, 5, 42, 0, 0, 221, 226, 3, 28, 14, 0, 222, 223, 5, 1, 0, 0, 223, 225, 3, 28, 14, 0, 224, 222, 1, 0, 0, 0, 225, 228, 1, 0, 0, 0, 226, 224, 1, 0, 0, 0, 226, 227, 1, 0, 0, 0, 227, 27, 1, 0, 0, 0, 228, 226, 1, 0, 0, 0, 229, 230, 6, 14, -1, 0, 230, 231, 3, 32, 16, 0, 231, 241, 1, 0, 0, 0, 232, 233, 10, 2, 0, 0, 233, 234, 3, 30, 15, 0, 234, 235, 5, 55, 0, 0, 235, 236, 3, 28, 14, 0, 236, 237, 5, 67, 0, 0, 237, 238, 3, 70, 35, 0, 238, 240, 1, 0, 0, 0, 239, 232, 1, 0, 0, 0, 240, 243, 1, 0, 0, 0, 241, 239, 1, 0, 0, 0, 241, 242, 1, 0, 0, 0, 242, 29, 1, 0, 0, 0, 243, 241, 1, 0, 0, 0, 244, 246, 5, 48, 0, 0, 245, 244, 1, 0, 0, 0, 245, 246, 1, 0, 0, 0, 246, 261, 1, 0, 0, 0, 247, 249, 5, 58, 0, 0, 248, 250, 5, 70, 0, 0, 249, 248, 1, 0, 0, 0, 249, 250, 1, 0, 0, 0, 250, 261, 1, 0, 0, 0, 251, 253, 5, 75, 0, 0, 252, 254, 5, 70, 0, 0, 253, 252, 1, 0, 0, 0, 253, 254, 1, 0, 0, 0, 254, 261, 1, 0, 0, 0, 255, 257, 5, 43, 0, 0, 256, 258, 5, 70, 0, 0, 257, 256, 1, 0, 0, 0, 257, 258, 1, 0, 0, 0, 258, 261, 1, 0, 0, 0, 259, 261, 5, 24, 0, 0, 260, 245, 1, 0, 0, 0, 260, 247, 1, 0, 0, 0, 260, 251, 1, 0, 0, 0, 260, 255, 1, 0, 0, 0, 260, 259, 1, 0, 0, 0, 261, 31, 1, 0, 0, 0, 262, 267, 3, 34, 17, 0, 263, 265, 5, 9, 0, 0, 264, 263, 1, 0, 0, 0, 264, 265, 1, 0, 0, 0, 265, 266, 1, 0, 0, 0, 266, 268, 3, 96, 48, 0, 267, 264, 1, 0, 0, 0, 267, 268, 1, 0, 0, 0, 268, 33, 1, 0, 0, 0, 269, 275, 3, 102, 51, 0, 270, 271, 5, 2, 0, 0, 271, 272, 3, 8, 4, 0, 272, 273, 5, 3, 0, 0, 273, 275, 1, 0, 0, 0, 274, 269, 1, 0, 0, 0, 274, 270, 1, 0, 0, 0, 275, 35, 1, 0, 0, 0, 276, 277, 5, 93, 0, 0, 277, 278, 3, 70, 35, 0, 278, 37, 1, 0, 0, 0, 279, 280, 5, 44, 0, 0, 280, 282, 5, 15, 0, 0, 281, 283, 3, 22, 11, 0, 282, 281, 1, 0, 0, 0, 282, 283, 1, 0, 0, 0, 283, 284, 1, 0, 0, 0, 284, 289, 3, 70, 35, 0, 285, 286, 5, 1, 0, 0, 286, 288, 3, 70, 35, 0, 287, 285, 1, 0, 0, 0, 288, 291, 1, 0, 0, 0, 289, 287, 1, 0, 0, 0, 289, 290, 1, 0, 0, 0, 290, 39, 1, 0, 0, 0, 291, 289, 1, 0, 0, 0, 292, 293, 5, 45, 0, 0, 293, 294, 3, 70, 35, 0, 294, 41, 1, 0, 0, 0, 295, 296, 5, 69, 0, 0, 296, 297, 5, 15, 0, 0, 297, 302, 3, 44, 22, 0, 298, 299, 5, 1, 0, 0, 299, 301, 3, 44, 22, 0, 300, 298, 1, 0, 0, 0, 301, 304, 1, 0, 0, 0, 302, 300, 1, 0, 0, 0, 302, 303, 1, 0, 0, 0, 303, 43, 1, 0, 0, 0, 304, 302, 1, 0, 0, 0, 305, 307, 3, 70, 35, 0, 306, 308, 7, 2, 0, 0, 307, 306, 1, 0, 0, 0, 307, 308, 1, 0, 0, 0, 308, 311, 1, 0, 0, 0, 309, 310, 5, 64, 0, 0, 310, 312, 7, 3, 0, 0, 311, 309, 1, 0, 0, 0, 311, 312, 1, 0, 0, 0, 312, 45, 1, 0, 0, 0, 313, 314, 5, 60, 0, 0, 314, 317, 3, 70, 35, 0, 315, 316, 5, 66, 0, 0, 316, 318, 3, 70, 35, 0, 317, 315, 1, 0, 0, 0, 317, 318, 1, 0, 0, 0, 318, 47, 1, 0, 0, 0, 319, 320, 5, 49, 0, 0, 320, 321, 5, 53, 0, 0, 321, 323, 3, 102, 51, 0, 322, 324, 3, 50, 25, 0, 323, 322, 1, 0, 0, 0, 323, 324, 1, 0, 0, 0, 324, 325, 1, 0, 0, 0, 325, 326, 3, 8, 4, 0, 326, 49, 1, 0, 0, 0, 327, 328, 5, 2, 0, 0, 328, 333, 3, 100, 50, 0, 329, 330, 5, 1, 0, 0, 330, 332, 3, 100, 50, 0, 331, 329, 1, 0, 0, 0, 332, 335, 1, 0, 0, 0, 333, 331, 1, 0, 0, 0, 333, 334, 1, 0, 0, 0, 334, 336, 1, 0, 0, 0, 335, 333, 1, 0, 0, 0, 336, 337, 5, 3, 0, 0, 337, 51, 1, 0, 0, 0, 338, 339, 5, 89, 0, 0, 339, 340, 3, 102, 51, 0, 340, 341, 5, 77, 0, 0, 341, 346, 3, 54, 27, 0, 342, 343, 5, 1, 0, 0, 343, 345, 3, 54, 27, 0, 344, 342, 1, 0, 0, 0, 345, 348, 1, 0, 0, 0, 346, 344, 1, 0, 0, 0, 346, 347, 1, 0, 0, 0, 347, 350, 1, 0, 0, 0, 348, 346, 1, 0, 0, 0, 349, 351, 3, 36, 18, 0, 350, 349, 1, 0, 0, 0, 350, 351, 1, 0, 0, 0, 351, 53, 1, 0, 0, 0, 352, 353, 3, 100, 50, 0, 353, 354, 5, 95, 0, 0, 354, 355, 3, 70, 35, 0, 355, 55, 1, 0, 0, 0, 356, 357, 5, 28, 0, 0, 357, 358, 5, 42, 0, 0, 358, 360, 3, 102, 51, 0, 359, 361, 3, 36, 18, 0, 360, 359, 1, 0, 0, 0, 360, 361, 1, 0, 0, 0, 361, 57, 1, 0, 0, 0, 362, 363, 5, 23, 0, 0, 363, 367, 5, 79, 0, 0, 364, 365, 5, 46, 0, 0, 365, 366, 5, 61, 0, 0, 366, 368, 5, 37, 0, 0, 367, 364, 1, 0, 0, 0, 367, 368, 1, 0, 0, 0, 368, 369, 1, 0, 0, 0, 369, 370, 3, 104, 52, 0, 370, 371, 5, 2, 0, 0, 371, 376, 3, 60, 30, 0, 372, 373, 5, 1, 0, 0, 373, 375, 3, 60, 30, 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, 379, 1, 0, 0, 0, 378, 376, 1, 0, 0, 0, 379, 382, 5, 3, 0, 0, 380, 381, 5, 94, 0, 0, 381, 383, 3, 90, 45, 0, 382, 380, 1, 0, 0, 0, 382, 383, 1, 0, 0, 0, 383, 59, 1, 0, 0, 0, 384, 387, 3, 62, 31, 0, 385, 387, 3, 64, 32, 0, 386, 384, 1, 0, 0, 0, 386, 385, 1, 0, 0, 0, 387, 61, 1, 0, 0, 0, 388, 389, 3, 100, 50, 0, 389, 392, 3, 88, 44, 0, 390, 391, 5, 61, 0, 0, 391, 393, 5, 62, 0, 0, 392, 390, 1, 0, 0, 0, 392, 393, 1, 0, 0, 0, 393, 396, 1, 0, 0, 0, 394, 395, 5, 27, 0, 0, 395, 397, 3, 70, 35, 0, 396, 394, 1, 0, 0, 0, 396, 397, 1, 0, 0, 0, 397, 400, 1, 0, 0, 0, 398, 399, 5, 71, 0, 0, 399, 401, 5, 56, 0, 0, 400, 398, 1, 0, 0, 0, 400, 401, 1, 0, 0, 0, 401, 63, 1, 0, 0, 0, 402, 403, 5, 22, 0, 0, 403, 405, 3, 96, 48, 0, 404, 402, 1, 0, 0, 0, 404, 405, 1, 0, 0, 0, 405, 461, 1, 0, 0, 0, 406, 407, 5, 71, 0, 0, 407, 408, 5, 56, 0, 0, 408, 409, 5, 2, 0, 0, 409, 414, 3, 100, 50, 0, 410, 411, 5, 1, 0, 0, 411, 413, 3, 100, 50, 0, 412, 410, 1, 0, 0, 0, 413, 416, 1, 0, 0, 0, 414, 412, 1, 0, 0, 0, 414, 415, 1, 0, 0, 0, 415, 417, 1, 0, 0, 0, 416, 414, 1, 0, 0, 0, 417, 418, 5, 3, 0, 0, 418, 462, 1, 0, 0, 0, 419, 420, 5, 88, 0, 0, 420, 421, 5, 2, 0, 0, 421, 426, 3, 100, 50, 0, 422, 423, 5, 1, 0, 0, 423, 425, 3, 100, 50, 0, 424, 422, 1, 0, 0, 0, 425, 428, 1, 0, 0, 0, 426, 424, 1, 0, 0, 0, 426, 427, 1, 0, 0, 0, 427, 429, 1, 0, 0, 0, 428, 426, 1, 0, 0, 0, 429, 430, 5, 3, 0, 0, 430, 462, 1, 0, 0, 0, 431, 432, 5, 19, 0, 0, 432, 433, 5, 2, 0, 0, 433, 434, 3, 70, 35, 0, 434, 435, 5, 3, 0, 0, 435, 462, 1, 0, 0, 0, 436, 437, 5, 41, 0, 0, 437, 438, 5, 56, 0, 0, 438, 439, 5, 2, 0, 0, 439, 444, 3, 100, 50, 0, 440, 441, 5, 1, 0, 0, 441, 443, 3, 100, 50, 0, 442, 440, 1, 0, 0, 0, 443, 446, 1, 0, 0, 0, 444, 442, 1, 0, 0, 0, 444, 445, 1, 0, 0, 0, 445, 447, 1, 0, 0, 0, 446, 444, 1, 0, 0, 0, 447, 448, 5, 3, 0, 0, 448, 449, 5, 73, 0, 0, 449, 450, 3, 102, 51, 0, 450, 451, 5, 2, 0, 0, 451, 456, 3, 100, 50, 0, 452, 453, 5, 1, 0, 0, 453, 455, 3, 100, 50, 0, 454, 452, 1, 0, 0, 0, 455, 458, 1, 0, 0, 0, 456, 454, 1, 0, 0, 0, 456, 457, 1, 0, 0, 0, 457, 459, 1, 0, 0, 0, 458, 456, 1, 0, 0, 0, 459, 460, 5, 3, 0, 0, 460, 462, 1, 0, 0, 0, 461, 406, 1, 0, 0, 0, 461, 419, 1, 0, 0, 0, 461, 431, 1, 0, 0, 0, 461, 436, 1, 0, 0, 0, 462, 65, 1, 0, 0, 0, 463, 464, 5, 7, 0, 0, 464, 467, 5, 79, 0, 0, 465, 466, 5, 46, 0, 0, 466, 468, 5, 37, 0, 0, 467, 465, 1, 0, 0, 0, 467, 468, 1, 0, 0, 0, 468, 469, 1, 0, 0, 0, 469, 501, 3, 102, 51, 0, 470, 471, 5, 5, 0, 0, 471, 475, 5, 21, 0, 0, 472, 473, 5, 46, 0, 0, 473, 474, 5, 61, 0, 0, 474, 476, 5, 37, 0, 0, 475, 472, 1, 0, 0, 0, 475, 476, 1, 0, 0, 0, 476, 477, 1, 0, 0, 0, 477, 502, 3, 62, 31, 0, 478, 479, 5, 32, 0, 0, 479, 482, 5, 21, 0, 0, 480, 481, 5, 46, 0, 0, 481, 483, 5, 37, 0, 0, 482, 480, 1, 0, 0, 0, 482, 483, 1, 0, 0, 0, 483, 484, 1, 0, 0, 0, 484, 502, 3, 100, 50, 0, 485, 486, 5, 74, 0, 0, 486, 487, 5, 85, 0, 0, 487, 502, 3, 104, 52, 0, 488, 489, 5, 7, 0, 0, 489, 490, 5, 21, 0, 0, 490, 491, 3, 100, 50, 0, 491, 492, 5, 77, 0, 0, 492, 493, 5, 27, 0, 0, 493, 494, 3, 70, 35, 0, 494, 502, 1, 0, 0, 0, 495, 496, 5, 7, 0, 0, 496, 497, 5, 21, 0, 0, 497, 498, 3, 100, 50, 0, 498, 499, 5, 32, 0, 0, 499, 500, 5, 27, 0, 0, 500, 502, 1, 0, 0, 0, 501, 470, 1, 0, 0, 0, 501, 478, 1, 0, 0, 0, 501, 485, 1, 0, 0, 0, 501, 488, 1, 0, 0, 0, 501, 495, 1, 0, 0, 0, 502, 67, 1, 0, 0, 0, 503, 504, 5, 32, 0, 0, 504, 507, 5, 79, 0, 0, 505, 506, 5, 46, 0, 0, 506, 508, 5, 37, 0, 0, 507, 505, 1, 0, 0, 0, 507, 508, 1, 0, 0, 0, 508, 509, 1, 0, 0, 0, 509, 510, 3, 102, 51, 0, 510, 69, 1, 0, 0, 0, 511, 512, 3, 72, 36, 0, 512, 71, 1, 0, 0, 0, 513, 514, 6, 36, -1, 0, 514, 518, 3, 74, 37, 0, 515, 516, 5, 61, 0, 0, 516, 518, 3, 72, 36, 3, 517, 513, 1, 0, 0, 0, 517, 515, 1, 0, 0, 0, 518, 527, 1, 0, 0, 0, 519, 520, 10, 2, 0, 0, 520, 521, 5, 8, 0, 0, 521, 526, 3, 72, 36, 3, 522, 523, 10, 1, 0, 0, 523, 524, 5, 68, 0, 0, 524, 526, 3, 72, 36, 2, 525, 519, 1, 0, 0, 0, 525, 522, 1, 0, 0, 0, 526, 529, 1, 0, 0, 0, 527, 525, 1, 0, 0, 0, 527, 528, 1, 0, 0, 0, 528, 73, 1, 0, 0, 0, 529, 527, 1, 0, 0, 0, 530, 532, 3, 80, 40, 0, 531, 533, 3, 76, 38, 0, 532, 531, 1, 0, 0, 0, 532, 533, 1, 0, 0, 0, 533, 75, 1, 0, 0, 0, 534, 535, 3, 78, 39, 0, 535, 536, 3, 80, 40, 0, 536, 590, 1, 0, 0, 0, 537, 539, 5, 61, 0, 0, 538, 537, 1, 0, 0, 0, 538, 539, 1, 0, 0, 0, 539, 540, 1, 0, 0, 0, 540, 541, 5, 47, 0, 0, 541, 542, 5, 2, 0, 0, 542, 547, 3, 70, 35, 0, 543, 544, 5, 1, 0, 0, 544, 546, 3, 70, 35, 0, 545, 543, 1, 0, 0, 0, 546, 549, 1, 0, 0, 0, 547, 545, 1, 0, 0, 0, 547, 548, 1, 0, 0, 0, 548, 550, 1, 0, 0, 0, 549, 547, 1, 0, 0, 0, 550, 551, 5, 3, 0, 0, 551, 590, 1, 0, 0, 0, 552, 554, 5, 61, 0, 0, 553, 552, 1, 0, 0, 0, 553, 554, 1, 0, 0, 0, 554, 555, 1, 0, 0, 0, 555, 556, 5, 47, 0, 0, 556, 557, 5, 2, 0, 0, 557, 558, 3, 8, 4, 0, 558, 559, 5, 3, 0, 0, 559, 590, 1, 0, 0, 0, 560, 562, 5, 61, 0, 0, 561, 560, 1, 0, 0, 0, 561, 562, 1, 0, 0, 0, 562, 563, 1, 0, 0, 0, 563, 564, 5, 11, 0, 0, 564, 565, 3, 80, 40, 0, 565, 566, 5, 8, 0, 0, 566, 567, 3, 80, 40, 0, 567, 590, 1, 0, 0, 0, 568, 570, 5, 61, 0, 0, 569, 568, 1, 0, 0, 0, 569, 570, 1, 0, 0, 0, 570, 571, 1, 0, 0, 0, 571, 572, 5, 59, 0, 0, 572, 575, 3, 80, 40, 0, 573, 574, 5, 35, 0, 0, 574, 576, 3, 80, 40, 0, 575, 573, 1, 0, 0, 0, 575, 576, 1, 0, 0, 0, 576, 590, 1, 0, 0, 0, 577, 579, 5, 54, 0, 0, 578, 580, 5, 61, 0, 0, 579, 578, 1, 0, 0, 0, 579, 580, 1, 0, 0, 0, 580, 581, 1, 0, 0, 0, 581, 590, 5, 62, 0, 0, 582, 584, 5, 54, 0, 0, 583, 585, 5, 61, 0, 0, 584, 583, 1, 0, 0, 0, 584, 585, 1, 0, 0, 0, 585, 586, 1, 0, 0, 0, 586, 587, 5, 30, 0, 0, 587, 588, 5, 42, 0, 0, 588, 590, 3, 80, 40, 0, 589, 534, 1, 0, 0, 0, 589, 538, 1, 0, 0, 0, 589, 553, 1, 0, 0, 0, 589, 561, 1, 0, 0, 0, 589, 569, 1, 0, 0, 0, 589, 577, 1, 0, 0, 0, 589, 582, 1, 0, 0, 0, 590, 77, 1, 0, 0, 0, 591, 592, 7, 4, 0, 0, 592, 79, 1, 0, 0, 0, 593, 594, 6, 40, -1, 0, 594, 598, 3, 82, 41, 0, 595, 596, 7, 5, 0, 0, 596, 598, 3, 80, 40, 4, 597, 593, 1, 0, 0, 0, 597, 595, 1, 0, 0, 0, 598, 610, 1, 0, 0, 0, 599, 600, 10, 3, 0, 0, 600, 601, 7, 6, 0, 0, 601, 609, 3, 80, 40, 4, 602, 603, 10, 2, 0, 0, 603, 604, 7, 5, 0, 0, 604, 609, 3, 80, 40, 3, 605, 606, 10, 1, 0, 0, 606, 607, 5, 106, 0, 0, 607, 609, 3, 80, 40, 2, 608, 599, 1, 0, 0, 0, 608, 602, 1, 0, 0, 0, 608, 605, 1, 0, 0, 0, 609, 612, 1, 0, 0, 0, 610, 608, 1, 0, 0, 0, 610, 611, 1, 0, 0, 0, 611, 81, 1, 0, 0, 0, 612, 610, 1, 0, 0, 0, 613, 694, 3, 94, 47, 0, 614, 615, 3, 98, 49, 0, 615, 627, 5, 2, 0, 0, 616, 618, 3, 22, 11, 0, 617, 616, 1, 0, 0, 0, 617, 618, 1, 0, 0, 0, 618, 619, 1, 0, 0, 0, 619, 624, 3, 70, 35, 0, 620, 621, 5, 1, 0, 0, 621, 623, 3, 70, 35, 0, 622, 620, 1, 0, 0, 0, 623, 626, 1, 0, 0, 0, 624, 622, 1, 0, 0, 0, 624, 625, 1, 0, 0, 0, 625, 628, 1, 0, 0, 0, 626, 624, 1, 0, 0, 0, 627, 617, 1, 0, 0, 0, 627, 628, 1, 0, 0, 0, 628, 629, 1, 0, 0, 0, 629, 630, 5, 3, 0, 0, 630, 694, 1, 0, 0, 0, 631, 633, 5, 16, 0, 0, 632, 634, 3, 84, 42, 0, 633, 632, 1, 0, 0, 0, 634, 635, 1, 0, 0, 0, 635, 633, 1, 0, 0, 0, 635, 636, 1, 0, 0, 0, 636, 639, 1, 0, 0, 0, 637, 638, 5, 33, 0, 0, 638, 640, 3, 70, 35, 0, 639, 637, 1, 0, 0, 0, 639, 640, 1, 0, 0, 0, 640, 641, 1, 0, 0, 0, 641, 642, 5, 34, 0, 0, 642, 694, 1, 0, 0, 0, 643, 644, 5, 16, 0, 0, 644, 646, 3, 70, 35, 0, 645, 647, 3, 84, 42, 0, 646, 645, 1, 0, 0, 0, 647, 648, 1, 0, 0, 0, 648, 646, 1, 0, 0, 0, 648, 649, 1, 0, 0, 0, 649, 652, 1, 0, 0, 0, 650, 651, 5, 33, 0, 0, 651, 653, 3, 70, 35, 0, 652, 650, 1, 0, 0, 0, 652, 653, 1, 0, 0, 0, 653, 654, 1, 0, 0, 0, 654, 655, 5, 34, 0, 0, 655, 694, 1, 0, 0, 0, 656, 657, 5, 17, 0, 0, 657, 658, 5, 2, 0, 0, 658, 659, 3, 70, 35, 0, 659, 660, 5, 9, 0, 0, 660, 661, 3, 88, 44, 0, 661, 662, 5, 3, 0, 0, 662, 694, 1, 0, 0, 0, 663, 664, 5, 20, 0, 0, 664, 665, 5, 2, 0, 0, 665, 670, 3, 70, 35, 0, 666, 667, 5, 1, 0, 0, 667, 669, 3, 70, 35, 0, 668, 666, 1, 0, 0, 0, 669, 672, 1, 0, 0, 0, 670, 668, 1, 0, 0, 0, 670, 671, 1, 0, 0, 0, 671, 673, 1, 0, 0, 0, 672, 670, 1, 0, 0, 0, 673, 674, 5, 3, 0, 0, 674, 694, 1, 0, 0, 0, 675, 676, 5, 63, 0, 0, 676, 677, 5, 2, 0, 0, 677, 678, 3, 80, 40, 0, 678, 679, 5, 1, 0, 0, 679, 680, 3, 80, 40, 0, 680, 681, 5, 3, 0, 0, 681, 694, 1, 0, 0, 0, 682, 683, 5, 2, 0, 0, 683, 684, 3, 70, 35, 0, 684, 685, 5, 3, 0, 0, 685, 694, 1, 0, 0, 0, 686, 687, 5, 37, 0, 0, 687, 688, 5, 2, 0, 0, 688, 689, 3, 8, 4, 0, 689, 690, 5, 3, 0, 0, 690, 694, 1, 0, 0, 0, 691, 694, 3, 86, 43, 0, 692, 694, 3, 98, 49, 0, 693, 613, 1, 0, 0, 0, 693, 614, 1, 0, 0, 0, 693, 631, 1, 0, 0, 0, 693, 643, 1, 0, 0, 0, 693, 656, 1, 0, 0, 0, 693, 663, 1, 0, 0, 0, 693, 675, 1, 0, 0, 0, 693, 682, 1, 0, 0, 0, 693, 686, 1, 0, 0, 0, 693, 691, 1, 0, 0, 0, 693, 692, 1, 0, 0, 0, 694, 83, 1, 0, 0, 0, 695, 696, 5, 92, 0, 0, 696, 697, 3, 70, 35, 0, 697, 698, 5, 81, 0, 0, 698, 699, 3, 70, 35, 0, 699, 85, 1, 0, 0, 0, 700, 701, 5, 2, 0, 0, 701, 702, 3, 8, 4, 0, 702, 703, 5, 3, 0, 0, 703, 87, 1, 0, 0, 0, 704, 751, 5, 14, 0, 0, 705, 751, 5, 84, 0, 0, 706, 751, 5, 78, 0, 0, 707, 751, 5, 50, 0, 0, 708, 751, 5, 51, 0, 0, 709, 751, 5, 12, 0, 0, 710, 751, 5, 40, 0, 0, 711, 751, 5, 31, 0, 0, 712, 720, 5, 26, 0, 0, 713, 714, 5, 2, 0, 0, 714, 717, 5, 111, 0, 0, 715, 716, 5, 1, 0, 0, 716, 718, 5, 111, 0, 0, 717, 715, 1, 0, 0, 0, 717, 718, 1, 0, 0, 0, 718, 719, 1, 0, 0, 0, 719, 721, 5, 3, 0, 0, 720, 713, 1, 0, 0, 0, 720, 721, 1, 0, 0, 0, 721, 751, 1, 0, 0, 0, 722, 730, 5, 65, 0, 0, 723, 724, 5, 2, 0, 0, 724, 727, 5, 111, 0, 0, 725, 726, 5, 1, 0, 0, 726, 728, 5, 111, 0, 0, 727, 725, 1, 0, 0, 0, 727, 728, 1, 0, 0, 0, 728, 729, 1, 0, 0, 0, 729, 731, 5, 3, 0, 0, 730, 723, 1, 0, 0, 0, 730, 731, 1, 0, 0, 0, 731, 751, 1, 0, 0, 0, 732, 736, 5, 90, 0, 0, 733, 734, 5, 2, 0, 0, 734, 735, 5, 111, 0, 0, 735, 737, 5, 3, 0, 0, 736, 733, 1, 0, 0, 0, 736, 737, 1, 0, 0, 0, 737, 751, 1, 0, 0, 0, 738, 742, 5, 18, 0, 0, 739, 740, 5, 2, 0, 0, 740, 741, 5, 111, 0, 0, 741, 743, 5, 3, 0, 0, 742, 739, 1, 0, 0, 0, 742, 743, 1, 0, 0, 0, 743, 751, 1, 0, 0, 0, 744, 751, 5, 80, 0, 0, 745, 751, 5, 25, 0, 0, 746, 751, 5, 82, 0, 0, 747, 751, 5, 83, 0, 0, 748, 751, 5, 13, 0, 0, 749, 751, 5, 91, 0, 0, 750, 704, 1, 0, 0, 0, 750, 705, 1, 0, 0, 0, 750, 706, 1, 0, 0, 0, 750, 707, 1, 0, 0, 0, 750, 708, 1, 0, 0, 0, 750, 709, 1, 0, 0, 0, 750, 710, 1, 0, 0, 0, 750, 711, 1, 0, 0, 0, 750, 712, 1, 0, 0, 0, 750, 722, 1, 0, 0, 0, 750, 732, 1, 0, 0, 0, 750, 738, 1, 0, 0, 0, 750, 744, 1, 0, 0, 0, 750, 745, 1, 0, 0, 0, 750, 746, 1, 0, 0, 0, 750, 747, 1, 0, 0, 0, 750, 748, 1, 0, 0, 0, 750, 749, 1, 0, 0, 0, 751, 89, 1, 0, 0, 0, 752, 753, 5, 2, 0, 0, 753, 758, 3, 92, 46, 0, 754, 755, 5, 1, 0, 0, 755, 757, 3, 92, 46, 0, 756, 754, 1, 0, 0, 0, 757, 760, 1, 0, 0, 0, 758, 756, 1, 0, 0, 0, 758, 759, 1, 0, 0, 0, 759, 761, 1, 0, 0, 0, 760, 758, 1, 0, 0, 0, 761, 762, 5, 3, 0, 0, 762, 91, 1, 0, 0, 0, 763, 764, 3, 96, 48, 0, 764, 765, 5, 95, 0, 0, 765, 766, 3, 94, 47, 0, 766, 93, 1, 0, 0, 0, 767, 776, 5, 62, 0, 0, 768, 776, 5, 86, 0, 0, 769, 776, 5, 38, 0, 0, 770, 776, 5, 111, 0, 0, 771, 776, 5, 112, 0, 0, 772, 776, 5, 113, 0, 0, 773, 776, 5, 109, 0, 0, 774, 776, 5, 110, 0, 0, 775, 767, 1, 0, 0, 0, 775, 768, 1, 0, 0, 0, 775, 769, 1, 0, 0, 0, 775, 770, 1, 0, 0, 0, 775, 771, 1, 0, 0, 0, 775, 772, 1, 0, 0, 0, 775, 773, 1, 0, 0, 0, 775, 774, 1, 0, 0, 0, 776, 95, 1, 0, 0, 0, 777, 783, 5, 114, 0, 0, 778, 783, 5, 115, 0, 0, 779, 783, 5, 116, 0, 0, 780, 783, 5, 117, 0, 0, 781, 783, 3, 106, 53, 0, 782, 777, 1, 0, 0, 0, 782, 778, 1, 0, 0, 0, 782, 779, 1, 0, 0, 0, 782, 780, 1, 0, 0, 0, 782, 781, 1, 0, 0, 0, 783, 97, 1, 0, 0, 0, 784, 789, 3, 96, 48, 0, 785, 786, 5, 4, 0, 0, 786, 788, 3, 96, 48, 0, 787, 785, 1, 0, 0, 0, 788, 791, 1, 0, 0, 0, 789, 787, 1, 0, 0, 0, 789, 790, 1, 0, 0, 0, 790, 99, 1, 0, 0, 0, 791, 789, 1, 0, 0, 0, 792, 793, 3, 96, 48, 0, 793, 101, 1, 0, 0, 0, 794, 795, 3, 98, 49, 0, 795, 103, 1, 0, 0, 0, 796, 797, 3, 98, 49, 0, 797, 105, 1, 0, 0, 0, 798, 799, 7, 7, 0, 0, 799, 107, 1, 0, 0, 0, 95, 111, 120, 129, 132, 138, 145, 157, 162, 172, 176, 183, 187, 190, 193, 196, 199, 202, 208, 211, 218, 226, 241, 245, 249, 253, 257, 260, 264, 267, 274, 282, 289, 302, 307, 311, 317, 323, 333, 346, 350, 360, 367, 376, 382, 386, 392, 396, 400, 404, 414, 426, 444, 456, 461, 467, 475, 482, 501, 507, 517, 525, 527, 532, 538, 547, 553, 561, 569, 575, 579, 584, 589, 597, 608, 610, 617, 624, 627, 635, 639, 648, 652, 670, 693, 717, 720, 727, 730, 736, 742, 750, 758, 775, 782, 789] \ No newline at end of file +[4, 1, 122, 826, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 1, 0, 5, 0, 118, 8, 0, 10, 0, 12, 0, 121, 9, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 3, 2, 129, 8, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 138, 8, 3, 1, 4, 3, 4, 141, 8, 4, 1, 4, 1, 4, 1, 5, 1, 5, 3, 5, 147, 8, 5, 1, 5, 1, 5, 1, 5, 5, 5, 152, 8, 5, 10, 5, 12, 5, 155, 9, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 3, 7, 166, 8, 7, 1, 7, 5, 7, 169, 8, 7, 10, 7, 12, 7, 172, 9, 7, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 3, 9, 181, 8, 9, 1, 10, 1, 10, 3, 10, 185, 8, 10, 1, 10, 1, 10, 1, 10, 5, 10, 190, 8, 10, 10, 10, 12, 10, 193, 9, 10, 1, 10, 3, 10, 196, 8, 10, 1, 10, 3, 10, 199, 8, 10, 1, 10, 3, 10, 202, 8, 10, 1, 10, 3, 10, 205, 8, 10, 1, 10, 3, 10, 208, 8, 10, 1, 10, 3, 10, 211, 8, 10, 1, 11, 1, 11, 1, 12, 1, 12, 3, 12, 217, 8, 12, 1, 12, 3, 12, 220, 8, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 229, 8, 12, 1, 13, 1, 13, 1, 13, 1, 13, 5, 13, 235, 8, 13, 10, 13, 12, 13, 238, 9, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 5, 14, 250, 8, 14, 10, 14, 12, 14, 253, 9, 14, 1, 15, 3, 15, 256, 8, 15, 1, 15, 1, 15, 3, 15, 260, 8, 15, 1, 15, 1, 15, 3, 15, 264, 8, 15, 1, 15, 1, 15, 3, 15, 268, 8, 15, 1, 15, 3, 15, 271, 8, 15, 1, 16, 1, 16, 3, 16, 275, 8, 16, 1, 16, 3, 16, 278, 8, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 3, 17, 285, 8, 17, 1, 18, 1, 18, 1, 18, 3, 18, 290, 8, 18, 1, 19, 1, 19, 1, 19, 3, 19, 295, 8, 19, 1, 19, 1, 19, 1, 19, 5, 19, 300, 8, 19, 10, 19, 12, 19, 303, 9, 19, 1, 20, 1, 20, 1, 20, 3, 20, 308, 8, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 5, 21, 315, 8, 21, 10, 21, 12, 21, 318, 9, 21, 1, 22, 1, 22, 3, 22, 322, 8, 22, 1, 22, 1, 22, 3, 22, 326, 8, 22, 1, 23, 1, 23, 1, 23, 1, 23, 3, 23, 332, 8, 23, 1, 24, 1, 24, 1, 24, 1, 24, 3, 24, 338, 8, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 5, 25, 346, 8, 25, 10, 25, 12, 25, 349, 9, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 5, 26, 359, 8, 26, 10, 26, 12, 26, 362, 9, 26, 1, 26, 3, 26, 365, 8, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 28, 3, 28, 375, 8, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 3, 29, 382, 8, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 5, 29, 389, 8, 29, 10, 29, 12, 29, 392, 9, 29, 1, 29, 1, 29, 1, 29, 3, 29, 397, 8, 29, 1, 30, 1, 30, 3, 30, 401, 8, 30, 1, 31, 1, 31, 1, 31, 1, 31, 3, 31, 407, 8, 31, 1, 31, 1, 31, 3, 31, 411, 8, 31, 1, 31, 1, 31, 3, 31, 415, 8, 31, 1, 32, 1, 32, 1, 33, 1, 33, 3, 33, 421, 8, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 5, 33, 429, 8, 33, 10, 33, 12, 33, 432, 9, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 5, 33, 441, 8, 33, 10, 33, 12, 33, 444, 9, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 5, 33, 459, 8, 33, 10, 33, 12, 33, 462, 9, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 5, 33, 471, 8, 33, 10, 33, 12, 33, 474, 9, 33, 1, 33, 1, 33, 3, 33, 478, 8, 33, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 484, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 492, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 499, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 518, 8, 34, 1, 35, 1, 35, 1, 35, 1, 35, 3, 35, 524, 8, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 3, 37, 534, 8, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 5, 37, 542, 8, 37, 10, 37, 12, 37, 545, 9, 37, 1, 38, 1, 38, 3, 38, 549, 8, 38, 1, 39, 1, 39, 1, 39, 1, 39, 3, 39, 555, 8, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 5, 39, 562, 8, 39, 10, 39, 12, 39, 565, 9, 39, 1, 39, 1, 39, 1, 39, 3, 39, 570, 8, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 3, 39, 578, 8, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 3, 39, 586, 8, 39, 1, 39, 1, 39, 1, 39, 1, 39, 3, 39, 592, 8, 39, 1, 39, 1, 39, 3, 39, 596, 8, 39, 1, 39, 1, 39, 1, 39, 3, 39, 601, 8, 39, 1, 39, 1, 39, 1, 39, 3, 39, 606, 8, 39, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 41, 3, 41, 614, 8, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 5, 41, 625, 8, 41, 10, 41, 12, 41, 628, 9, 41, 1, 42, 1, 42, 1, 42, 1, 42, 3, 42, 634, 8, 42, 1, 42, 1, 42, 1, 42, 5, 42, 639, 8, 42, 10, 42, 12, 42, 642, 9, 42, 3, 42, 644, 8, 42, 1, 42, 1, 42, 1, 42, 1, 42, 4, 42, 650, 8, 42, 11, 42, 12, 42, 651, 1, 42, 1, 42, 3, 42, 656, 8, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 4, 42, 663, 8, 42, 11, 42, 12, 42, 664, 1, 42, 1, 42, 3, 42, 669, 8, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 5, 42, 685, 8, 42, 10, 42, 12, 42, 688, 9, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 3, 42, 710, 8, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 3, 45, 734, 8, 45, 1, 45, 3, 45, 737, 8, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 3, 45, 744, 8, 45, 1, 45, 3, 45, 747, 8, 45, 1, 45, 1, 45, 1, 45, 1, 45, 3, 45, 753, 8, 45, 1, 45, 1, 45, 1, 45, 1, 45, 3, 45, 759, 8, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 3, 45, 767, 8, 45, 1, 46, 1, 46, 1, 46, 1, 46, 5, 46, 773, 8, 46, 10, 46, 12, 46, 776, 9, 46, 1, 46, 1, 46, 1, 47, 1, 47, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 3, 48, 792, 8, 48, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 3, 49, 799, 8, 49, 1, 50, 1, 50, 1, 50, 5, 50, 804, 8, 50, 10, 50, 12, 50, 807, 9, 50, 1, 51, 1, 51, 1, 51, 3, 51, 812, 8, 51, 1, 52, 1, 52, 1, 53, 1, 53, 1, 54, 1, 54, 1, 55, 1, 55, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 0, 3, 28, 74, 82, 58, 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, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 0, 8, 3, 0, 36, 36, 52, 52, 87, 87, 2, 0, 6, 6, 30, 30, 2, 0, 10, 10, 29, 29, 2, 0, 39, 39, 57, 57, 1, 0, 95, 100, 1, 0, 101, 102, 1, 0, 103, 105, 22, 0, 5, 6, 10, 10, 12, 15, 18, 18, 20, 21, 24, 27, 29, 29, 31, 31, 38, 40, 43, 43, 46, 46, 50, 51, 56, 58, 60, 60, 63, 66, 70, 70, 75, 75, 78, 78, 80, 80, 82, 86, 88, 88, 90, 91, 920, 0, 119, 1, 0, 0, 0, 2, 124, 1, 0, 0, 0, 4, 126, 1, 0, 0, 0, 6, 137, 1, 0, 0, 0, 8, 140, 1, 0, 0, 0, 10, 144, 1, 0, 0, 0, 12, 156, 1, 0, 0, 0, 14, 162, 1, 0, 0, 0, 16, 173, 1, 0, 0, 0, 18, 180, 1, 0, 0, 0, 20, 182, 1, 0, 0, 0, 22, 212, 1, 0, 0, 0, 24, 228, 1, 0, 0, 0, 26, 230, 1, 0, 0, 0, 28, 239, 1, 0, 0, 0, 30, 270, 1, 0, 0, 0, 32, 272, 1, 0, 0, 0, 34, 284, 1, 0, 0, 0, 36, 286, 1, 0, 0, 0, 38, 291, 1, 0, 0, 0, 40, 304, 1, 0, 0, 0, 42, 309, 1, 0, 0, 0, 44, 319, 1, 0, 0, 0, 46, 327, 1, 0, 0, 0, 48, 333, 1, 0, 0, 0, 50, 341, 1, 0, 0, 0, 52, 352, 1, 0, 0, 0, 54, 366, 1, 0, 0, 0, 56, 370, 1, 0, 0, 0, 58, 376, 1, 0, 0, 0, 60, 400, 1, 0, 0, 0, 62, 402, 1, 0, 0, 0, 64, 416, 1, 0, 0, 0, 66, 420, 1, 0, 0, 0, 68, 479, 1, 0, 0, 0, 70, 519, 1, 0, 0, 0, 72, 527, 1, 0, 0, 0, 74, 533, 1, 0, 0, 0, 76, 546, 1, 0, 0, 0, 78, 605, 1, 0, 0, 0, 80, 607, 1, 0, 0, 0, 82, 613, 1, 0, 0, 0, 84, 709, 1, 0, 0, 0, 86, 711, 1, 0, 0, 0, 88, 716, 1, 0, 0, 0, 90, 766, 1, 0, 0, 0, 92, 768, 1, 0, 0, 0, 94, 779, 1, 0, 0, 0, 96, 791, 1, 0, 0, 0, 98, 798, 1, 0, 0, 0, 100, 800, 1, 0, 0, 0, 102, 811, 1, 0, 0, 0, 104, 813, 1, 0, 0, 0, 106, 815, 1, 0, 0, 0, 108, 817, 1, 0, 0, 0, 110, 819, 1, 0, 0, 0, 112, 821, 1, 0, 0, 0, 114, 823, 1, 0, 0, 0, 116, 118, 3, 2, 1, 0, 117, 116, 1, 0, 0, 0, 118, 121, 1, 0, 0, 0, 119, 117, 1, 0, 0, 0, 119, 120, 1, 0, 0, 0, 120, 122, 1, 0, 0, 0, 121, 119, 1, 0, 0, 0, 122, 123, 5, 0, 0, 1, 123, 1, 1, 0, 0, 0, 124, 125, 3, 4, 2, 0, 125, 3, 1, 0, 0, 0, 126, 128, 3, 6, 3, 0, 127, 129, 5, 108, 0, 0, 128, 127, 1, 0, 0, 0, 128, 129, 1, 0, 0, 0, 129, 5, 1, 0, 0, 0, 130, 138, 3, 8, 4, 0, 131, 138, 3, 48, 24, 0, 132, 138, 3, 52, 26, 0, 133, 138, 3, 56, 28, 0, 134, 138, 3, 58, 29, 0, 135, 138, 3, 68, 34, 0, 136, 138, 3, 70, 35, 0, 137, 130, 1, 0, 0, 0, 137, 131, 1, 0, 0, 0, 137, 132, 1, 0, 0, 0, 137, 133, 1, 0, 0, 0, 137, 134, 1, 0, 0, 0, 137, 135, 1, 0, 0, 0, 137, 136, 1, 0, 0, 0, 138, 7, 1, 0, 0, 0, 139, 141, 3, 10, 5, 0, 140, 139, 1, 0, 0, 0, 140, 141, 1, 0, 0, 0, 141, 142, 1, 0, 0, 0, 142, 143, 3, 14, 7, 0, 143, 9, 1, 0, 0, 0, 144, 146, 5, 94, 0, 0, 145, 147, 5, 72, 0, 0, 146, 145, 1, 0, 0, 0, 146, 147, 1, 0, 0, 0, 147, 148, 1, 0, 0, 0, 148, 153, 3, 12, 6, 0, 149, 150, 5, 1, 0, 0, 150, 152, 3, 12, 6, 0, 151, 149, 1, 0, 0, 0, 152, 155, 1, 0, 0, 0, 153, 151, 1, 0, 0, 0, 153, 154, 1, 0, 0, 0, 154, 11, 1, 0, 0, 0, 155, 153, 1, 0, 0, 0, 156, 157, 3, 98, 49, 0, 157, 158, 5, 9, 0, 0, 158, 159, 5, 2, 0, 0, 159, 160, 3, 8, 4, 0, 160, 161, 5, 3, 0, 0, 161, 13, 1, 0, 0, 0, 162, 170, 3, 16, 8, 0, 163, 165, 7, 0, 0, 0, 164, 166, 5, 6, 0, 0, 165, 164, 1, 0, 0, 0, 165, 166, 1, 0, 0, 0, 166, 167, 1, 0, 0, 0, 167, 169, 3, 16, 8, 0, 168, 163, 1, 0, 0, 0, 169, 172, 1, 0, 0, 0, 170, 168, 1, 0, 0, 0, 170, 171, 1, 0, 0, 0, 171, 15, 1, 0, 0, 0, 172, 170, 1, 0, 0, 0, 173, 174, 3, 18, 9, 0, 174, 17, 1, 0, 0, 0, 175, 181, 3, 20, 10, 0, 176, 177, 5, 2, 0, 0, 177, 178, 3, 8, 4, 0, 178, 179, 5, 3, 0, 0, 179, 181, 1, 0, 0, 0, 180, 175, 1, 0, 0, 0, 180, 176, 1, 0, 0, 0, 181, 19, 1, 0, 0, 0, 182, 184, 5, 76, 0, 0, 183, 185, 3, 22, 11, 0, 184, 183, 1, 0, 0, 0, 184, 185, 1, 0, 0, 0, 185, 186, 1, 0, 0, 0, 186, 191, 3, 24, 12, 0, 187, 188, 5, 1, 0, 0, 188, 190, 3, 24, 12, 0, 189, 187, 1, 0, 0, 0, 190, 193, 1, 0, 0, 0, 191, 189, 1, 0, 0, 0, 191, 192, 1, 0, 0, 0, 192, 195, 1, 0, 0, 0, 193, 191, 1, 0, 0, 0, 194, 196, 3, 26, 13, 0, 195, 194, 1, 0, 0, 0, 195, 196, 1, 0, 0, 0, 196, 198, 1, 0, 0, 0, 197, 199, 3, 36, 18, 0, 198, 197, 1, 0, 0, 0, 198, 199, 1, 0, 0, 0, 199, 201, 1, 0, 0, 0, 200, 202, 3, 38, 19, 0, 201, 200, 1, 0, 0, 0, 201, 202, 1, 0, 0, 0, 202, 204, 1, 0, 0, 0, 203, 205, 3, 40, 20, 0, 204, 203, 1, 0, 0, 0, 204, 205, 1, 0, 0, 0, 205, 207, 1, 0, 0, 0, 206, 208, 3, 42, 21, 0, 207, 206, 1, 0, 0, 0, 207, 208, 1, 0, 0, 0, 208, 210, 1, 0, 0, 0, 209, 211, 3, 46, 23, 0, 210, 209, 1, 0, 0, 0, 210, 211, 1, 0, 0, 0, 211, 21, 1, 0, 0, 0, 212, 213, 7, 1, 0, 0, 213, 23, 1, 0, 0, 0, 214, 219, 3, 72, 36, 0, 215, 217, 5, 9, 0, 0, 216, 215, 1, 0, 0, 0, 216, 217, 1, 0, 0, 0, 217, 218, 1, 0, 0, 0, 218, 220, 3, 98, 49, 0, 219, 216, 1, 0, 0, 0, 219, 220, 1, 0, 0, 0, 220, 229, 1, 0, 0, 0, 221, 222, 3, 100, 50, 0, 222, 223, 5, 4, 0, 0, 223, 224, 5, 103, 0, 0, 224, 229, 1, 0, 0, 0, 225, 229, 5, 103, 0, 0, 226, 227, 4, 12, 0, 0, 227, 229, 3, 106, 53, 0, 228, 214, 1, 0, 0, 0, 228, 221, 1, 0, 0, 0, 228, 225, 1, 0, 0, 0, 228, 226, 1, 0, 0, 0, 229, 25, 1, 0, 0, 0, 230, 231, 5, 42, 0, 0, 231, 236, 3, 28, 14, 0, 232, 233, 5, 1, 0, 0, 233, 235, 3, 28, 14, 0, 234, 232, 1, 0, 0, 0, 235, 238, 1, 0, 0, 0, 236, 234, 1, 0, 0, 0, 236, 237, 1, 0, 0, 0, 237, 27, 1, 0, 0, 0, 238, 236, 1, 0, 0, 0, 239, 240, 6, 14, -1, 0, 240, 241, 3, 32, 16, 0, 241, 251, 1, 0, 0, 0, 242, 243, 10, 2, 0, 0, 243, 244, 3, 30, 15, 0, 244, 245, 5, 55, 0, 0, 245, 246, 3, 28, 14, 0, 246, 247, 5, 67, 0, 0, 247, 248, 3, 72, 36, 0, 248, 250, 1, 0, 0, 0, 249, 242, 1, 0, 0, 0, 250, 253, 1, 0, 0, 0, 251, 249, 1, 0, 0, 0, 251, 252, 1, 0, 0, 0, 252, 29, 1, 0, 0, 0, 253, 251, 1, 0, 0, 0, 254, 256, 5, 48, 0, 0, 255, 254, 1, 0, 0, 0, 255, 256, 1, 0, 0, 0, 256, 271, 1, 0, 0, 0, 257, 259, 5, 58, 0, 0, 258, 260, 5, 70, 0, 0, 259, 258, 1, 0, 0, 0, 259, 260, 1, 0, 0, 0, 260, 271, 1, 0, 0, 0, 261, 263, 5, 75, 0, 0, 262, 264, 5, 70, 0, 0, 263, 262, 1, 0, 0, 0, 263, 264, 1, 0, 0, 0, 264, 271, 1, 0, 0, 0, 265, 267, 5, 43, 0, 0, 266, 268, 5, 70, 0, 0, 267, 266, 1, 0, 0, 0, 267, 268, 1, 0, 0, 0, 268, 271, 1, 0, 0, 0, 269, 271, 5, 24, 0, 0, 270, 255, 1, 0, 0, 0, 270, 257, 1, 0, 0, 0, 270, 261, 1, 0, 0, 0, 270, 265, 1, 0, 0, 0, 270, 269, 1, 0, 0, 0, 271, 31, 1, 0, 0, 0, 272, 277, 3, 34, 17, 0, 273, 275, 5, 9, 0, 0, 274, 273, 1, 0, 0, 0, 274, 275, 1, 0, 0, 0, 275, 276, 1, 0, 0, 0, 276, 278, 3, 98, 49, 0, 277, 274, 1, 0, 0, 0, 277, 278, 1, 0, 0, 0, 278, 33, 1, 0, 0, 0, 279, 285, 3, 108, 54, 0, 280, 281, 5, 2, 0, 0, 281, 282, 3, 8, 4, 0, 282, 283, 5, 3, 0, 0, 283, 285, 1, 0, 0, 0, 284, 279, 1, 0, 0, 0, 284, 280, 1, 0, 0, 0, 285, 35, 1, 0, 0, 0, 286, 289, 5, 93, 0, 0, 287, 290, 3, 72, 36, 0, 288, 290, 3, 106, 53, 0, 289, 287, 1, 0, 0, 0, 289, 288, 1, 0, 0, 0, 290, 37, 1, 0, 0, 0, 291, 292, 5, 44, 0, 0, 292, 294, 5, 15, 0, 0, 293, 295, 3, 22, 11, 0, 294, 293, 1, 0, 0, 0, 294, 295, 1, 0, 0, 0, 295, 296, 1, 0, 0, 0, 296, 301, 3, 72, 36, 0, 297, 298, 5, 1, 0, 0, 298, 300, 3, 72, 36, 0, 299, 297, 1, 0, 0, 0, 300, 303, 1, 0, 0, 0, 301, 299, 1, 0, 0, 0, 301, 302, 1, 0, 0, 0, 302, 39, 1, 0, 0, 0, 303, 301, 1, 0, 0, 0, 304, 307, 5, 45, 0, 0, 305, 308, 3, 72, 36, 0, 306, 308, 3, 106, 53, 0, 307, 305, 1, 0, 0, 0, 307, 306, 1, 0, 0, 0, 308, 41, 1, 0, 0, 0, 309, 310, 5, 69, 0, 0, 310, 311, 5, 15, 0, 0, 311, 316, 3, 44, 22, 0, 312, 313, 5, 1, 0, 0, 313, 315, 3, 44, 22, 0, 314, 312, 1, 0, 0, 0, 315, 318, 1, 0, 0, 0, 316, 314, 1, 0, 0, 0, 316, 317, 1, 0, 0, 0, 317, 43, 1, 0, 0, 0, 318, 316, 1, 0, 0, 0, 319, 321, 3, 72, 36, 0, 320, 322, 7, 2, 0, 0, 321, 320, 1, 0, 0, 0, 321, 322, 1, 0, 0, 0, 322, 325, 1, 0, 0, 0, 323, 324, 5, 64, 0, 0, 324, 326, 7, 3, 0, 0, 325, 323, 1, 0, 0, 0, 325, 326, 1, 0, 0, 0, 326, 45, 1, 0, 0, 0, 327, 328, 5, 60, 0, 0, 328, 331, 3, 72, 36, 0, 329, 330, 5, 66, 0, 0, 330, 332, 3, 72, 36, 0, 331, 329, 1, 0, 0, 0, 331, 332, 1, 0, 0, 0, 332, 47, 1, 0, 0, 0, 333, 334, 5, 49, 0, 0, 334, 335, 5, 53, 0, 0, 335, 337, 3, 108, 54, 0, 336, 338, 3, 50, 25, 0, 337, 336, 1, 0, 0, 0, 337, 338, 1, 0, 0, 0, 338, 339, 1, 0, 0, 0, 339, 340, 3, 8, 4, 0, 340, 49, 1, 0, 0, 0, 341, 342, 5, 2, 0, 0, 342, 347, 3, 102, 51, 0, 343, 344, 5, 1, 0, 0, 344, 346, 3, 102, 51, 0, 345, 343, 1, 0, 0, 0, 346, 349, 1, 0, 0, 0, 347, 345, 1, 0, 0, 0, 347, 348, 1, 0, 0, 0, 348, 350, 1, 0, 0, 0, 349, 347, 1, 0, 0, 0, 350, 351, 5, 3, 0, 0, 351, 51, 1, 0, 0, 0, 352, 353, 5, 89, 0, 0, 353, 354, 3, 108, 54, 0, 354, 355, 5, 77, 0, 0, 355, 360, 3, 54, 27, 0, 356, 357, 5, 1, 0, 0, 357, 359, 3, 54, 27, 0, 358, 356, 1, 0, 0, 0, 359, 362, 1, 0, 0, 0, 360, 358, 1, 0, 0, 0, 360, 361, 1, 0, 0, 0, 361, 364, 1, 0, 0, 0, 362, 360, 1, 0, 0, 0, 363, 365, 3, 36, 18, 0, 364, 363, 1, 0, 0, 0, 364, 365, 1, 0, 0, 0, 365, 53, 1, 0, 0, 0, 366, 367, 3, 102, 51, 0, 367, 368, 5, 95, 0, 0, 368, 369, 3, 72, 36, 0, 369, 55, 1, 0, 0, 0, 370, 371, 5, 28, 0, 0, 371, 372, 5, 42, 0, 0, 372, 374, 3, 108, 54, 0, 373, 375, 3, 36, 18, 0, 374, 373, 1, 0, 0, 0, 374, 375, 1, 0, 0, 0, 375, 57, 1, 0, 0, 0, 376, 377, 5, 23, 0, 0, 377, 381, 5, 79, 0, 0, 378, 379, 5, 46, 0, 0, 379, 380, 5, 61, 0, 0, 380, 382, 5, 37, 0, 0, 381, 378, 1, 0, 0, 0, 381, 382, 1, 0, 0, 0, 382, 383, 1, 0, 0, 0, 383, 384, 3, 110, 55, 0, 384, 385, 5, 2, 0, 0, 385, 390, 3, 60, 30, 0, 386, 387, 5, 1, 0, 0, 387, 389, 3, 60, 30, 0, 388, 386, 1, 0, 0, 0, 389, 392, 1, 0, 0, 0, 390, 388, 1, 0, 0, 0, 390, 391, 1, 0, 0, 0, 391, 393, 1, 0, 0, 0, 392, 390, 1, 0, 0, 0, 393, 396, 5, 3, 0, 0, 394, 395, 5, 94, 0, 0, 395, 397, 3, 92, 46, 0, 396, 394, 1, 0, 0, 0, 396, 397, 1, 0, 0, 0, 397, 59, 1, 0, 0, 0, 398, 401, 3, 62, 31, 0, 399, 401, 3, 66, 33, 0, 400, 398, 1, 0, 0, 0, 400, 399, 1, 0, 0, 0, 401, 61, 1, 0, 0, 0, 402, 403, 3, 64, 32, 0, 403, 406, 3, 90, 45, 0, 404, 405, 5, 61, 0, 0, 405, 407, 5, 62, 0, 0, 406, 404, 1, 0, 0, 0, 406, 407, 1, 0, 0, 0, 407, 410, 1, 0, 0, 0, 408, 409, 5, 27, 0, 0, 409, 411, 3, 72, 36, 0, 410, 408, 1, 0, 0, 0, 410, 411, 1, 0, 0, 0, 411, 414, 1, 0, 0, 0, 412, 413, 5, 71, 0, 0, 413, 415, 5, 56, 0, 0, 414, 412, 1, 0, 0, 0, 414, 415, 1, 0, 0, 0, 415, 63, 1, 0, 0, 0, 416, 417, 3, 98, 49, 0, 417, 65, 1, 0, 0, 0, 418, 419, 5, 22, 0, 0, 419, 421, 3, 98, 49, 0, 420, 418, 1, 0, 0, 0, 420, 421, 1, 0, 0, 0, 421, 477, 1, 0, 0, 0, 422, 423, 5, 71, 0, 0, 423, 424, 5, 56, 0, 0, 424, 425, 5, 2, 0, 0, 425, 430, 3, 102, 51, 0, 426, 427, 5, 1, 0, 0, 427, 429, 3, 102, 51, 0, 428, 426, 1, 0, 0, 0, 429, 432, 1, 0, 0, 0, 430, 428, 1, 0, 0, 0, 430, 431, 1, 0, 0, 0, 431, 433, 1, 0, 0, 0, 432, 430, 1, 0, 0, 0, 433, 434, 5, 3, 0, 0, 434, 478, 1, 0, 0, 0, 435, 436, 5, 88, 0, 0, 436, 437, 5, 2, 0, 0, 437, 442, 3, 102, 51, 0, 438, 439, 5, 1, 0, 0, 439, 441, 3, 102, 51, 0, 440, 438, 1, 0, 0, 0, 441, 444, 1, 0, 0, 0, 442, 440, 1, 0, 0, 0, 442, 443, 1, 0, 0, 0, 443, 445, 1, 0, 0, 0, 444, 442, 1, 0, 0, 0, 445, 446, 5, 3, 0, 0, 446, 478, 1, 0, 0, 0, 447, 448, 5, 19, 0, 0, 448, 449, 5, 2, 0, 0, 449, 450, 3, 72, 36, 0, 450, 451, 5, 3, 0, 0, 451, 478, 1, 0, 0, 0, 452, 453, 5, 41, 0, 0, 453, 454, 5, 56, 0, 0, 454, 455, 5, 2, 0, 0, 455, 460, 3, 102, 51, 0, 456, 457, 5, 1, 0, 0, 457, 459, 3, 102, 51, 0, 458, 456, 1, 0, 0, 0, 459, 462, 1, 0, 0, 0, 460, 458, 1, 0, 0, 0, 460, 461, 1, 0, 0, 0, 461, 463, 1, 0, 0, 0, 462, 460, 1, 0, 0, 0, 463, 464, 5, 3, 0, 0, 464, 465, 5, 73, 0, 0, 465, 466, 3, 108, 54, 0, 466, 467, 5, 2, 0, 0, 467, 472, 3, 102, 51, 0, 468, 469, 5, 1, 0, 0, 469, 471, 3, 102, 51, 0, 470, 468, 1, 0, 0, 0, 471, 474, 1, 0, 0, 0, 472, 470, 1, 0, 0, 0, 472, 473, 1, 0, 0, 0, 473, 475, 1, 0, 0, 0, 474, 472, 1, 0, 0, 0, 475, 476, 5, 3, 0, 0, 476, 478, 1, 0, 0, 0, 477, 422, 1, 0, 0, 0, 477, 435, 1, 0, 0, 0, 477, 447, 1, 0, 0, 0, 477, 452, 1, 0, 0, 0, 478, 67, 1, 0, 0, 0, 479, 480, 5, 7, 0, 0, 480, 483, 5, 79, 0, 0, 481, 482, 5, 46, 0, 0, 482, 484, 5, 37, 0, 0, 483, 481, 1, 0, 0, 0, 483, 484, 1, 0, 0, 0, 484, 485, 1, 0, 0, 0, 485, 517, 3, 108, 54, 0, 486, 487, 5, 5, 0, 0, 487, 491, 5, 21, 0, 0, 488, 489, 5, 46, 0, 0, 489, 490, 5, 61, 0, 0, 490, 492, 5, 37, 0, 0, 491, 488, 1, 0, 0, 0, 491, 492, 1, 0, 0, 0, 492, 493, 1, 0, 0, 0, 493, 518, 3, 62, 31, 0, 494, 495, 5, 32, 0, 0, 495, 498, 5, 21, 0, 0, 496, 497, 5, 46, 0, 0, 497, 499, 5, 37, 0, 0, 498, 496, 1, 0, 0, 0, 498, 499, 1, 0, 0, 0, 499, 500, 1, 0, 0, 0, 500, 518, 3, 102, 51, 0, 501, 502, 5, 74, 0, 0, 502, 503, 5, 85, 0, 0, 503, 518, 3, 110, 55, 0, 504, 505, 5, 7, 0, 0, 505, 506, 5, 21, 0, 0, 506, 507, 3, 102, 51, 0, 507, 508, 5, 77, 0, 0, 508, 509, 5, 27, 0, 0, 509, 510, 3, 72, 36, 0, 510, 518, 1, 0, 0, 0, 511, 512, 5, 7, 0, 0, 512, 513, 5, 21, 0, 0, 513, 514, 3, 102, 51, 0, 514, 515, 5, 32, 0, 0, 515, 516, 5, 27, 0, 0, 516, 518, 1, 0, 0, 0, 517, 486, 1, 0, 0, 0, 517, 494, 1, 0, 0, 0, 517, 501, 1, 0, 0, 0, 517, 504, 1, 0, 0, 0, 517, 511, 1, 0, 0, 0, 518, 69, 1, 0, 0, 0, 519, 520, 5, 32, 0, 0, 520, 523, 5, 79, 0, 0, 521, 522, 5, 46, 0, 0, 522, 524, 5, 37, 0, 0, 523, 521, 1, 0, 0, 0, 523, 524, 1, 0, 0, 0, 524, 525, 1, 0, 0, 0, 525, 526, 3, 108, 54, 0, 526, 71, 1, 0, 0, 0, 527, 528, 3, 74, 37, 0, 528, 73, 1, 0, 0, 0, 529, 530, 6, 37, -1, 0, 530, 534, 3, 76, 38, 0, 531, 532, 5, 61, 0, 0, 532, 534, 3, 74, 37, 3, 533, 529, 1, 0, 0, 0, 533, 531, 1, 0, 0, 0, 534, 543, 1, 0, 0, 0, 535, 536, 10, 2, 0, 0, 536, 537, 5, 8, 0, 0, 537, 542, 3, 74, 37, 3, 538, 539, 10, 1, 0, 0, 539, 540, 5, 68, 0, 0, 540, 542, 3, 74, 37, 2, 541, 535, 1, 0, 0, 0, 541, 538, 1, 0, 0, 0, 542, 545, 1, 0, 0, 0, 543, 541, 1, 0, 0, 0, 543, 544, 1, 0, 0, 0, 544, 75, 1, 0, 0, 0, 545, 543, 1, 0, 0, 0, 546, 548, 3, 82, 41, 0, 547, 549, 3, 78, 39, 0, 548, 547, 1, 0, 0, 0, 548, 549, 1, 0, 0, 0, 549, 77, 1, 0, 0, 0, 550, 551, 3, 80, 40, 0, 551, 552, 3, 82, 41, 0, 552, 606, 1, 0, 0, 0, 553, 555, 5, 61, 0, 0, 554, 553, 1, 0, 0, 0, 554, 555, 1, 0, 0, 0, 555, 556, 1, 0, 0, 0, 556, 557, 5, 47, 0, 0, 557, 558, 5, 2, 0, 0, 558, 563, 3, 72, 36, 0, 559, 560, 5, 1, 0, 0, 560, 562, 3, 72, 36, 0, 561, 559, 1, 0, 0, 0, 562, 565, 1, 0, 0, 0, 563, 561, 1, 0, 0, 0, 563, 564, 1, 0, 0, 0, 564, 566, 1, 0, 0, 0, 565, 563, 1, 0, 0, 0, 566, 567, 5, 3, 0, 0, 567, 606, 1, 0, 0, 0, 568, 570, 5, 61, 0, 0, 569, 568, 1, 0, 0, 0, 569, 570, 1, 0, 0, 0, 570, 571, 1, 0, 0, 0, 571, 572, 5, 47, 0, 0, 572, 573, 5, 2, 0, 0, 573, 574, 3, 8, 4, 0, 574, 575, 5, 3, 0, 0, 575, 606, 1, 0, 0, 0, 576, 578, 5, 61, 0, 0, 577, 576, 1, 0, 0, 0, 577, 578, 1, 0, 0, 0, 578, 579, 1, 0, 0, 0, 579, 580, 5, 11, 0, 0, 580, 581, 3, 82, 41, 0, 581, 582, 5, 8, 0, 0, 582, 583, 3, 82, 41, 0, 583, 606, 1, 0, 0, 0, 584, 586, 5, 61, 0, 0, 585, 584, 1, 0, 0, 0, 585, 586, 1, 0, 0, 0, 586, 587, 1, 0, 0, 0, 587, 588, 5, 59, 0, 0, 588, 591, 3, 82, 41, 0, 589, 590, 5, 35, 0, 0, 590, 592, 3, 82, 41, 0, 591, 589, 1, 0, 0, 0, 591, 592, 1, 0, 0, 0, 592, 606, 1, 0, 0, 0, 593, 595, 5, 54, 0, 0, 594, 596, 5, 61, 0, 0, 595, 594, 1, 0, 0, 0, 595, 596, 1, 0, 0, 0, 596, 597, 1, 0, 0, 0, 597, 606, 5, 62, 0, 0, 598, 600, 5, 54, 0, 0, 599, 601, 5, 61, 0, 0, 600, 599, 1, 0, 0, 0, 600, 601, 1, 0, 0, 0, 601, 602, 1, 0, 0, 0, 602, 603, 5, 30, 0, 0, 603, 604, 5, 42, 0, 0, 604, 606, 3, 82, 41, 0, 605, 550, 1, 0, 0, 0, 605, 554, 1, 0, 0, 0, 605, 569, 1, 0, 0, 0, 605, 577, 1, 0, 0, 0, 605, 585, 1, 0, 0, 0, 605, 593, 1, 0, 0, 0, 605, 598, 1, 0, 0, 0, 606, 79, 1, 0, 0, 0, 607, 608, 7, 4, 0, 0, 608, 81, 1, 0, 0, 0, 609, 610, 6, 41, -1, 0, 610, 614, 3, 84, 42, 0, 611, 612, 7, 5, 0, 0, 612, 614, 3, 82, 41, 4, 613, 609, 1, 0, 0, 0, 613, 611, 1, 0, 0, 0, 614, 626, 1, 0, 0, 0, 615, 616, 10, 3, 0, 0, 616, 617, 7, 6, 0, 0, 617, 625, 3, 82, 41, 4, 618, 619, 10, 2, 0, 0, 619, 620, 7, 5, 0, 0, 620, 625, 3, 82, 41, 3, 621, 622, 10, 1, 0, 0, 622, 623, 5, 106, 0, 0, 623, 625, 3, 82, 41, 2, 624, 615, 1, 0, 0, 0, 624, 618, 1, 0, 0, 0, 624, 621, 1, 0, 0, 0, 625, 628, 1, 0, 0, 0, 626, 624, 1, 0, 0, 0, 626, 627, 1, 0, 0, 0, 627, 83, 1, 0, 0, 0, 628, 626, 1, 0, 0, 0, 629, 710, 3, 96, 48, 0, 630, 631, 3, 112, 56, 0, 631, 643, 5, 2, 0, 0, 632, 634, 3, 22, 11, 0, 633, 632, 1, 0, 0, 0, 633, 634, 1, 0, 0, 0, 634, 635, 1, 0, 0, 0, 635, 640, 3, 72, 36, 0, 636, 637, 5, 1, 0, 0, 637, 639, 3, 72, 36, 0, 638, 636, 1, 0, 0, 0, 639, 642, 1, 0, 0, 0, 640, 638, 1, 0, 0, 0, 640, 641, 1, 0, 0, 0, 641, 644, 1, 0, 0, 0, 642, 640, 1, 0, 0, 0, 643, 633, 1, 0, 0, 0, 643, 644, 1, 0, 0, 0, 644, 645, 1, 0, 0, 0, 645, 646, 5, 3, 0, 0, 646, 710, 1, 0, 0, 0, 647, 649, 5, 16, 0, 0, 648, 650, 3, 86, 43, 0, 649, 648, 1, 0, 0, 0, 650, 651, 1, 0, 0, 0, 651, 649, 1, 0, 0, 0, 651, 652, 1, 0, 0, 0, 652, 655, 1, 0, 0, 0, 653, 654, 5, 33, 0, 0, 654, 656, 3, 72, 36, 0, 655, 653, 1, 0, 0, 0, 655, 656, 1, 0, 0, 0, 656, 657, 1, 0, 0, 0, 657, 658, 5, 34, 0, 0, 658, 710, 1, 0, 0, 0, 659, 660, 5, 16, 0, 0, 660, 662, 3, 72, 36, 0, 661, 663, 3, 86, 43, 0, 662, 661, 1, 0, 0, 0, 663, 664, 1, 0, 0, 0, 664, 662, 1, 0, 0, 0, 664, 665, 1, 0, 0, 0, 665, 668, 1, 0, 0, 0, 666, 667, 5, 33, 0, 0, 667, 669, 3, 72, 36, 0, 668, 666, 1, 0, 0, 0, 668, 669, 1, 0, 0, 0, 669, 670, 1, 0, 0, 0, 670, 671, 5, 34, 0, 0, 671, 710, 1, 0, 0, 0, 672, 673, 5, 17, 0, 0, 673, 674, 5, 2, 0, 0, 674, 675, 3, 72, 36, 0, 675, 676, 5, 9, 0, 0, 676, 677, 3, 90, 45, 0, 677, 678, 5, 3, 0, 0, 678, 710, 1, 0, 0, 0, 679, 680, 5, 20, 0, 0, 680, 681, 5, 2, 0, 0, 681, 686, 3, 72, 36, 0, 682, 683, 5, 1, 0, 0, 683, 685, 3, 72, 36, 0, 684, 682, 1, 0, 0, 0, 685, 688, 1, 0, 0, 0, 686, 684, 1, 0, 0, 0, 686, 687, 1, 0, 0, 0, 687, 689, 1, 0, 0, 0, 688, 686, 1, 0, 0, 0, 689, 690, 5, 3, 0, 0, 690, 710, 1, 0, 0, 0, 691, 692, 5, 63, 0, 0, 692, 693, 5, 2, 0, 0, 693, 694, 3, 82, 41, 0, 694, 695, 5, 1, 0, 0, 695, 696, 3, 82, 41, 0, 696, 697, 5, 3, 0, 0, 697, 710, 1, 0, 0, 0, 698, 699, 5, 2, 0, 0, 699, 700, 3, 72, 36, 0, 700, 701, 5, 3, 0, 0, 701, 710, 1, 0, 0, 0, 702, 703, 5, 37, 0, 0, 703, 704, 5, 2, 0, 0, 704, 705, 3, 8, 4, 0, 705, 706, 5, 3, 0, 0, 706, 710, 1, 0, 0, 0, 707, 710, 3, 88, 44, 0, 708, 710, 3, 104, 52, 0, 709, 629, 1, 0, 0, 0, 709, 630, 1, 0, 0, 0, 709, 647, 1, 0, 0, 0, 709, 659, 1, 0, 0, 0, 709, 672, 1, 0, 0, 0, 709, 679, 1, 0, 0, 0, 709, 691, 1, 0, 0, 0, 709, 698, 1, 0, 0, 0, 709, 702, 1, 0, 0, 0, 709, 707, 1, 0, 0, 0, 709, 708, 1, 0, 0, 0, 710, 85, 1, 0, 0, 0, 711, 712, 5, 92, 0, 0, 712, 713, 3, 72, 36, 0, 713, 714, 5, 81, 0, 0, 714, 715, 3, 72, 36, 0, 715, 87, 1, 0, 0, 0, 716, 717, 5, 2, 0, 0, 717, 718, 3, 8, 4, 0, 718, 719, 5, 3, 0, 0, 719, 89, 1, 0, 0, 0, 720, 767, 5, 14, 0, 0, 721, 767, 5, 84, 0, 0, 722, 767, 5, 78, 0, 0, 723, 767, 5, 50, 0, 0, 724, 767, 5, 51, 0, 0, 725, 767, 5, 12, 0, 0, 726, 767, 5, 40, 0, 0, 727, 767, 5, 31, 0, 0, 728, 736, 5, 26, 0, 0, 729, 730, 5, 2, 0, 0, 730, 733, 5, 111, 0, 0, 731, 732, 5, 1, 0, 0, 732, 734, 5, 111, 0, 0, 733, 731, 1, 0, 0, 0, 733, 734, 1, 0, 0, 0, 734, 735, 1, 0, 0, 0, 735, 737, 5, 3, 0, 0, 736, 729, 1, 0, 0, 0, 736, 737, 1, 0, 0, 0, 737, 767, 1, 0, 0, 0, 738, 746, 5, 65, 0, 0, 739, 740, 5, 2, 0, 0, 740, 743, 5, 111, 0, 0, 741, 742, 5, 1, 0, 0, 742, 744, 5, 111, 0, 0, 743, 741, 1, 0, 0, 0, 743, 744, 1, 0, 0, 0, 744, 745, 1, 0, 0, 0, 745, 747, 5, 3, 0, 0, 746, 739, 1, 0, 0, 0, 746, 747, 1, 0, 0, 0, 747, 767, 1, 0, 0, 0, 748, 752, 5, 90, 0, 0, 749, 750, 5, 2, 0, 0, 750, 751, 5, 111, 0, 0, 751, 753, 5, 3, 0, 0, 752, 749, 1, 0, 0, 0, 752, 753, 1, 0, 0, 0, 753, 767, 1, 0, 0, 0, 754, 758, 5, 18, 0, 0, 755, 756, 5, 2, 0, 0, 756, 757, 5, 111, 0, 0, 757, 759, 5, 3, 0, 0, 758, 755, 1, 0, 0, 0, 758, 759, 1, 0, 0, 0, 759, 767, 1, 0, 0, 0, 760, 767, 5, 80, 0, 0, 761, 767, 5, 25, 0, 0, 762, 767, 5, 82, 0, 0, 763, 767, 5, 83, 0, 0, 764, 767, 5, 13, 0, 0, 765, 767, 5, 91, 0, 0, 766, 720, 1, 0, 0, 0, 766, 721, 1, 0, 0, 0, 766, 722, 1, 0, 0, 0, 766, 723, 1, 0, 0, 0, 766, 724, 1, 0, 0, 0, 766, 725, 1, 0, 0, 0, 766, 726, 1, 0, 0, 0, 766, 727, 1, 0, 0, 0, 766, 728, 1, 0, 0, 0, 766, 738, 1, 0, 0, 0, 766, 748, 1, 0, 0, 0, 766, 754, 1, 0, 0, 0, 766, 760, 1, 0, 0, 0, 766, 761, 1, 0, 0, 0, 766, 762, 1, 0, 0, 0, 766, 763, 1, 0, 0, 0, 766, 764, 1, 0, 0, 0, 766, 765, 1, 0, 0, 0, 767, 91, 1, 0, 0, 0, 768, 769, 5, 2, 0, 0, 769, 774, 3, 94, 47, 0, 770, 771, 5, 1, 0, 0, 771, 773, 3, 94, 47, 0, 772, 770, 1, 0, 0, 0, 773, 776, 1, 0, 0, 0, 774, 772, 1, 0, 0, 0, 774, 775, 1, 0, 0, 0, 775, 777, 1, 0, 0, 0, 776, 774, 1, 0, 0, 0, 777, 778, 5, 3, 0, 0, 778, 93, 1, 0, 0, 0, 779, 780, 3, 98, 49, 0, 780, 781, 5, 95, 0, 0, 781, 782, 3, 96, 48, 0, 782, 95, 1, 0, 0, 0, 783, 792, 5, 62, 0, 0, 784, 792, 5, 86, 0, 0, 785, 792, 5, 38, 0, 0, 786, 792, 5, 111, 0, 0, 787, 792, 5, 112, 0, 0, 788, 792, 5, 113, 0, 0, 789, 792, 5, 109, 0, 0, 790, 792, 5, 110, 0, 0, 791, 783, 1, 0, 0, 0, 791, 784, 1, 0, 0, 0, 791, 785, 1, 0, 0, 0, 791, 786, 1, 0, 0, 0, 791, 787, 1, 0, 0, 0, 791, 788, 1, 0, 0, 0, 791, 789, 1, 0, 0, 0, 791, 790, 1, 0, 0, 0, 792, 97, 1, 0, 0, 0, 793, 799, 5, 114, 0, 0, 794, 799, 5, 115, 0, 0, 795, 799, 5, 116, 0, 0, 796, 799, 5, 117, 0, 0, 797, 799, 3, 114, 57, 0, 798, 793, 1, 0, 0, 0, 798, 794, 1, 0, 0, 0, 798, 795, 1, 0, 0, 0, 798, 796, 1, 0, 0, 0, 798, 797, 1, 0, 0, 0, 799, 99, 1, 0, 0, 0, 800, 805, 3, 98, 49, 0, 801, 802, 5, 4, 0, 0, 802, 804, 3, 98, 49, 0, 803, 801, 1, 0, 0, 0, 804, 807, 1, 0, 0, 0, 805, 803, 1, 0, 0, 0, 805, 806, 1, 0, 0, 0, 806, 101, 1, 0, 0, 0, 807, 805, 1, 0, 0, 0, 808, 812, 3, 98, 49, 0, 809, 810, 4, 51, 7, 0, 810, 812, 3, 106, 53, 0, 811, 808, 1, 0, 0, 0, 811, 809, 1, 0, 0, 0, 812, 103, 1, 0, 0, 0, 813, 814, 3, 100, 50, 0, 814, 105, 1, 0, 0, 0, 815, 816, 1, 0, 0, 0, 816, 107, 1, 0, 0, 0, 817, 818, 3, 100, 50, 0, 818, 109, 1, 0, 0, 0, 819, 820, 3, 100, 50, 0, 820, 111, 1, 0, 0, 0, 821, 822, 3, 100, 50, 0, 822, 113, 1, 0, 0, 0, 823, 824, 7, 7, 0, 0, 824, 115, 1, 0, 0, 0, 98, 119, 128, 137, 140, 146, 153, 165, 170, 180, 184, 191, 195, 198, 201, 204, 207, 210, 216, 219, 228, 236, 251, 255, 259, 263, 267, 270, 274, 277, 284, 289, 294, 301, 307, 316, 321, 325, 331, 337, 347, 360, 364, 374, 381, 390, 396, 400, 406, 410, 414, 420, 430, 442, 460, 472, 477, 483, 491, 498, 517, 523, 533, 541, 543, 548, 554, 563, 569, 577, 585, 591, 595, 600, 605, 613, 624, 626, 633, 640, 643, 651, 655, 664, 668, 686, 709, 733, 736, 743, 746, 752, 758, 766, 774, 791, 798, 805, 811] \ No newline at end of file diff --git a/src/lib/generic/GenericSqlListener.ts b/src/lib/generic/GenericSqlListener.ts index 13444e23..f5f51d21 100644 --- a/src/lib/generic/GenericSqlListener.ts +++ b/src/lib/generic/GenericSqlListener.ts @@ -26,7 +26,10 @@ import { QueryTermContext } from "./GenericSqlParser.js"; import { QueryPrimaryContext } from "./GenericSqlParser.js"; import { QuerySpecificationContext } from "./GenericSqlParser.js"; import { SetQuantifierContext } from "./GenericSqlParser.js"; -import { SelectItemContext } from "./GenericSqlParser.js"; +import { SelectExpressionElementContext } from "./GenericSqlParser.js"; +import { SelectStarElementContext } from "./GenericSqlParser.js"; +import { SelectAllElementContext } from "./GenericSqlParser.js"; +import { SelectEmptyElementContext } from "./GenericSqlParser.js"; import { FromClauseContext } from "./GenericSqlParser.js"; import { SimpleRelationContext } from "./GenericSqlParser.js"; import { JoinRelationContext } from "./GenericSqlParser.js"; @@ -48,6 +51,7 @@ import { DeleteStatementContext } from "./GenericSqlParser.js"; import { CreateTableStatementContext } from "./GenericSqlParser.js"; import { TableElementContext } from "./GenericSqlParser.js"; import { ColumnDefinitionContext } from "./GenericSqlParser.js"; +import { ColumnRefCreateContext } from "./GenericSqlParser.js"; import { TableConstraintContext } from "./GenericSqlParser.js"; import { AlterTableStatementContext } from "./GenericSqlParser.js"; import { DropTableStatementContext } from "./GenericSqlParser.js"; @@ -95,8 +99,11 @@ import { BinaryLiteralContext } from "./GenericSqlParser.js"; import { IdentifierContext } from "./GenericSqlParser.js"; import { QualifiedNameContext } from "./GenericSqlParser.js"; import { ColumnRefContext } from "./GenericSqlParser.js"; +import { ColumnNameContext } from "./GenericSqlParser.js"; +import { EmptyColumnContext } from "./GenericSqlParser.js"; import { TableNameContext } from "./GenericSqlParser.js"; import { TableNameCreateContext } from "./GenericSqlParser.js"; +import { FunctionNameContext } from "./GenericSqlParser.js"; import { NonReservedContext } from "./GenericSqlParser.js"; @@ -300,15 +307,53 @@ export class GenericSqlListener implements ParseTreeListener { */ exitSetQuantifier?: (ctx: SetQuantifierContext) => void; /** - * Enter a parse tree produced by `GenericSqlParser.selectItem`. + * Enter a parse tree produced by the `selectExpressionElement` + * labeled alternative in `GenericSqlParser.selectItem`. * @param ctx the parse tree */ - enterSelectItem?: (ctx: SelectItemContext) => void; + enterSelectExpressionElement?: (ctx: SelectExpressionElementContext) => void; /** - * Exit a parse tree produced by `GenericSqlParser.selectItem`. + * Exit a parse tree produced by the `selectExpressionElement` + * labeled alternative in `GenericSqlParser.selectItem`. * @param ctx the parse tree */ - exitSelectItem?: (ctx: SelectItemContext) => void; + exitSelectExpressionElement?: (ctx: SelectExpressionElementContext) => void; + /** + * Enter a parse tree produced by the `selectStarElement` + * labeled alternative in `GenericSqlParser.selectItem`. + * @param ctx the parse tree + */ + enterSelectStarElement?: (ctx: SelectStarElementContext) => void; + /** + * Exit a parse tree produced by the `selectStarElement` + * labeled alternative in `GenericSqlParser.selectItem`. + * @param ctx the parse tree + */ + exitSelectStarElement?: (ctx: SelectStarElementContext) => void; + /** + * Enter a parse tree produced by the `selectAllElement` + * labeled alternative in `GenericSqlParser.selectItem`. + * @param ctx the parse tree + */ + enterSelectAllElement?: (ctx: SelectAllElementContext) => void; + /** + * Exit a parse tree produced by the `selectAllElement` + * labeled alternative in `GenericSqlParser.selectItem`. + * @param ctx the parse tree + */ + exitSelectAllElement?: (ctx: SelectAllElementContext) => void; + /** + * Enter a parse tree produced by the `selectEmptyElement` + * labeled alternative in `GenericSqlParser.selectItem`. + * @param ctx the parse tree + */ + enterSelectEmptyElement?: (ctx: SelectEmptyElementContext) => void; + /** + * Exit a parse tree produced by the `selectEmptyElement` + * labeled alternative in `GenericSqlParser.selectItem`. + * @param ctx the parse tree + */ + exitSelectEmptyElement?: (ctx: SelectEmptyElementContext) => void; /** * Enter a parse tree produced by `GenericSqlParser.fromClause`. * @param ctx the parse tree @@ -527,6 +572,16 @@ export class GenericSqlListener implements ParseTreeListener { * @param ctx the parse tree */ exitColumnDefinition?: (ctx: ColumnDefinitionContext) => void; + /** + * Enter a parse tree produced by `GenericSqlParser.columnRefCreate`. + * @param ctx the parse tree + */ + enterColumnRefCreate?: (ctx: ColumnRefCreateContext) => void; + /** + * Exit a parse tree produced by `GenericSqlParser.columnRefCreate`. + * @param ctx the parse tree + */ + exitColumnRefCreate?: (ctx: ColumnRefCreateContext) => void; /** * Enter a parse tree produced by `GenericSqlParser.tableConstraint`. * @param ctx the parse tree @@ -1063,6 +1118,26 @@ export class GenericSqlListener implements ParseTreeListener { * @param ctx the parse tree */ exitColumnRef?: (ctx: ColumnRefContext) => void; + /** + * Enter a parse tree produced by `GenericSqlParser.columnName`. + * @param ctx the parse tree + */ + enterColumnName?: (ctx: ColumnNameContext) => void; + /** + * Exit a parse tree produced by `GenericSqlParser.columnName`. + * @param ctx the parse tree + */ + exitColumnName?: (ctx: ColumnNameContext) => void; + /** + * Enter a parse tree produced by `GenericSqlParser.emptyColumn`. + * @param ctx the parse tree + */ + enterEmptyColumn?: (ctx: EmptyColumnContext) => void; + /** + * Exit a parse tree produced by `GenericSqlParser.emptyColumn`. + * @param ctx the parse tree + */ + exitEmptyColumn?: (ctx: EmptyColumnContext) => void; /** * Enter a parse tree produced by `GenericSqlParser.tableName`. * @param ctx the parse tree @@ -1083,6 +1158,16 @@ export class GenericSqlListener implements ParseTreeListener { * @param ctx the parse tree */ exitTableNameCreate?: (ctx: TableNameCreateContext) => void; + /** + * Enter a parse tree produced by `GenericSqlParser.functionName`. + * @param ctx the parse tree + */ + enterFunctionName?: (ctx: FunctionNameContext) => void; + /** + * Exit a parse tree produced by `GenericSqlParser.functionName`. + * @param ctx the parse tree + */ + exitFunctionName?: (ctx: FunctionNameContext) => void; /** * Enter a parse tree produced by `GenericSqlParser.nonReserved`. * @param ctx the parse tree diff --git a/src/lib/generic/GenericSqlParser.ts b/src/lib/generic/GenericSqlParser.ts index 89004fa8..d81773c3 100644 --- a/src/lib/generic/GenericSqlParser.ts +++ b/src/lib/generic/GenericSqlParser.ts @@ -171,28 +171,32 @@ export class GenericSqlParser extends SQLParserBase { public static readonly RULE_createTableStatement = 29; public static readonly RULE_tableElement = 30; public static readonly RULE_columnDefinition = 31; - public static readonly RULE_tableConstraint = 32; - public static readonly RULE_alterTableStatement = 33; - public static readonly RULE_dropTableStatement = 34; - public static readonly RULE_expression = 35; - public static readonly RULE_booleanExpression = 36; - public static readonly RULE_predicatedExpression = 37; - public static readonly RULE_predicate = 38; - public static readonly RULE_comparisonOperator = 39; - public static readonly RULE_valueExpression = 40; - public static readonly RULE_primaryExpression = 41; - public static readonly RULE_whenClause = 42; - public static readonly RULE_subqueryExpression = 43; - public static readonly RULE_dataType = 44; - public static readonly RULE_properties = 45; - public static readonly RULE_property = 46; - public static readonly RULE_literal = 47; - public static readonly RULE_identifier = 48; - public static readonly RULE_qualifiedName = 49; - public static readonly RULE_columnRef = 50; - public static readonly RULE_tableName = 51; - public static readonly RULE_tableNameCreate = 52; - public static readonly RULE_nonReserved = 53; + public static readonly RULE_columnRefCreate = 32; + public static readonly RULE_tableConstraint = 33; + public static readonly RULE_alterTableStatement = 34; + public static readonly RULE_dropTableStatement = 35; + public static readonly RULE_expression = 36; + public static readonly RULE_booleanExpression = 37; + public static readonly RULE_predicatedExpression = 38; + public static readonly RULE_predicate = 39; + public static readonly RULE_comparisonOperator = 40; + public static readonly RULE_valueExpression = 41; + public static readonly RULE_primaryExpression = 42; + public static readonly RULE_whenClause = 43; + public static readonly RULE_subqueryExpression = 44; + public static readonly RULE_dataType = 45; + public static readonly RULE_properties = 46; + public static readonly RULE_property = 47; + public static readonly RULE_literal = 48; + public static readonly RULE_identifier = 49; + public static readonly RULE_qualifiedName = 50; + public static readonly RULE_columnRef = 51; + public static readonly RULE_columnName = 52; + public static readonly RULE_emptyColumn = 53; + public static readonly RULE_tableName = 54; + public static readonly RULE_tableNameCreate = 55; + public static readonly RULE_functionName = 56; + public static readonly RULE_nonReserved = 57; public static readonly literalNames = [ null, "','", "'('", "')'", "'.'", "'ADD'", "'ALL'", "'ALTER'", "'AND'", @@ -246,12 +250,12 @@ export class GenericSqlParser extends SQLParserBase { "groupByClause", "havingClause", "orderByClause", "sortItem", "limitClause", "insertStatement", "columnList", "updateStatement", "updateAssignment", "deleteStatement", "createTableStatement", "tableElement", "columnDefinition", - "tableConstraint", "alterTableStatement", "dropTableStatement", + "columnRefCreate", "tableConstraint", "alterTableStatement", "dropTableStatement", "expression", "booleanExpression", "predicatedExpression", "predicate", "comparisonOperator", "valueExpression", "primaryExpression", "whenClause", "subqueryExpression", "dataType", "properties", "property", "literal", - "identifier", "qualifiedName", "columnRef", "tableName", "tableNameCreate", - "nonReserved", + "identifier", "qualifiedName", "columnRef", "columnName", "emptyColumn", + "tableName", "tableNameCreate", "functionName", "nonReserved", ]; public get grammarFileName(): string { return "GenericSql.g4"; } @@ -275,21 +279,21 @@ export class GenericSqlParser extends SQLParserBase { try { this.enterOuterAlt(localContext, 1); { - this.state = 111; + this.state = 119; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while ((((_la) & ~0x1F) === 0 && ((1 << _la) & 276824196) !== 0) || _la === 32 || _la === 49 || ((((_la - 76)) & ~0x1F) === 0 && ((1 << (_la - 76)) & 270337) !== 0)) { { { - this.state = 108; + this.state = 116; this.statements(); } } - this.state = 113; + this.state = 121; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } - this.state = 114; + this.state = 122; this.match(GenericSqlParser.EOF); } } @@ -313,7 +317,7 @@ export class GenericSqlParser extends SQLParserBase { try { this.enterOuterAlt(localContext, 1); { - this.state = 116; + this.state = 124; this.singleStatement(); } } @@ -338,14 +342,14 @@ export class GenericSqlParser extends SQLParserBase { try { this.enterOuterAlt(localContext, 1); { - this.state = 118; + this.state = 126; this.statement(); - this.state = 120; + this.state = 128; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 108) { { - this.state = 119; + this.state = 127; this.match(GenericSqlParser.SEMICOLON); } } @@ -370,7 +374,7 @@ export class GenericSqlParser extends SQLParserBase { let localContext = new StatementContext(this.context, this.state); this.enterRule(localContext, 6, GenericSqlParser.RULE_statement); try { - this.state = 129; + this.state = 137; this.errorHandler.sync(this); switch (this.tokenStream.LA(1)) { case GenericSqlParser.T__1: @@ -379,7 +383,7 @@ export class GenericSqlParser extends SQLParserBase { localContext = new StatementDefaultContext(localContext); this.enterOuterAlt(localContext, 1); { - this.state = 122; + this.state = 130; this.queryStatement(); } break; @@ -387,7 +391,7 @@ export class GenericSqlParser extends SQLParserBase { localContext = new InsertContext(localContext); this.enterOuterAlt(localContext, 2); { - this.state = 123; + this.state = 131; this.insertStatement(); } break; @@ -395,7 +399,7 @@ export class GenericSqlParser extends SQLParserBase { localContext = new UpdateContext(localContext); this.enterOuterAlt(localContext, 3); { - this.state = 124; + this.state = 132; this.updateStatement(); } break; @@ -403,7 +407,7 @@ export class GenericSqlParser extends SQLParserBase { localContext = new DeleteContext(localContext); this.enterOuterAlt(localContext, 4); { - this.state = 125; + this.state = 133; this.deleteStatement(); } break; @@ -411,7 +415,7 @@ export class GenericSqlParser extends SQLParserBase { localContext = new CreateTableContext(localContext); this.enterOuterAlt(localContext, 5); { - this.state = 126; + this.state = 134; this.createTableStatement(); } break; @@ -419,7 +423,7 @@ export class GenericSqlParser extends SQLParserBase { localContext = new AlterTableContext(localContext); this.enterOuterAlt(localContext, 6); { - this.state = 127; + this.state = 135; this.alterTableStatement(); } break; @@ -427,7 +431,7 @@ export class GenericSqlParser extends SQLParserBase { localContext = new DropTableContext(localContext); this.enterOuterAlt(localContext, 7); { - this.state = 128; + this.state = 136; this.dropTableStatement(); } break; @@ -456,17 +460,17 @@ export class GenericSqlParser extends SQLParserBase { try { this.enterOuterAlt(localContext, 1); { - this.state = 132; + this.state = 140; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 94) { { - this.state = 131; + this.state = 139; this.withClause(); } } - this.state = 134; + this.state = 142; this.queryNoWith(); } } @@ -491,33 +495,33 @@ export class GenericSqlParser extends SQLParserBase { try { this.enterOuterAlt(localContext, 1); { - this.state = 136; + this.state = 144; this.match(GenericSqlParser.KW_WITH); - this.state = 138; + this.state = 146; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 72) { { - this.state = 137; + this.state = 145; this.match(GenericSqlParser.KW_RECURSIVE); } } - this.state = 140; + this.state = 148; this.namedQuery(); - this.state = 145; + this.state = 153; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while (_la === 1) { { { - this.state = 141; + this.state = 149; this.match(GenericSqlParser.T__0); - this.state = 142; + this.state = 150; this.namedQuery(); } } - this.state = 147; + this.state = 155; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } @@ -543,15 +547,15 @@ export class GenericSqlParser extends SQLParserBase { try { this.enterOuterAlt(localContext, 1); { - this.state = 148; + this.state = 156; localContext._name = this.identifier(); - this.state = 149; + this.state = 157; this.match(GenericSqlParser.KW_AS); - this.state = 150; + this.state = 158; this.match(GenericSqlParser.T__1); - this.state = 151; + this.state = 159; this.queryStatement(); - this.state = 152; + this.state = 160; this.match(GenericSqlParser.T__2); } } @@ -576,15 +580,15 @@ export class GenericSqlParser extends SQLParserBase { try { this.enterOuterAlt(localContext, 1); { - this.state = 154; - this.queryTerm(); this.state = 162; + this.queryTerm(); + this.state = 170; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while (_la === 36 || _la === 52 || _la === 87) { { { - this.state = 155; + this.state = 163; _la = this.tokenStream.LA(1); if(!(_la === 36 || _la === 52 || _la === 87)) { this.errorHandler.recoverInline(this); @@ -593,21 +597,21 @@ export class GenericSqlParser extends SQLParserBase { this.errorHandler.reportMatch(this); this.consume(); } - this.state = 157; + this.state = 165; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 6) { { - this.state = 156; + this.state = 164; this.match(GenericSqlParser.KW_ALL); } } - this.state = 159; + this.state = 167; this.queryTerm(); } } - this.state = 164; + this.state = 172; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } @@ -633,7 +637,7 @@ export class GenericSqlParser extends SQLParserBase { try { this.enterOuterAlt(localContext, 1); { - this.state = 165; + this.state = 173; this.queryPrimary(); } } @@ -655,24 +659,24 @@ export class GenericSqlParser extends SQLParserBase { let localContext = new QueryPrimaryContext(this.context, this.state); this.enterRule(localContext, 18, GenericSqlParser.RULE_queryPrimary); try { - this.state = 172; + this.state = 180; this.errorHandler.sync(this); switch (this.tokenStream.LA(1)) { case GenericSqlParser.KW_SELECT: this.enterOuterAlt(localContext, 1); { - this.state = 167; + this.state = 175; this.querySpecification(); } break; case GenericSqlParser.T__1: this.enterOuterAlt(localContext, 2); { - this.state = 168; + this.state = 176; this.match(GenericSqlParser.T__1); - this.state = 169; + this.state = 177; this.queryStatement(); - this.state = 170; + this.state = 178; this.match(GenericSqlParser.T__2); } break; @@ -701,92 +705,92 @@ export class GenericSqlParser extends SQLParserBase { try { this.enterOuterAlt(localContext, 1); { - this.state = 174; + this.state = 182; this.match(GenericSqlParser.KW_SELECT); - this.state = 176; + this.state = 184; this.errorHandler.sync(this); switch (this.interpreter.adaptivePredict(this.tokenStream, 9, this.context) ) { case 1: { - this.state = 175; + this.state = 183; this.setQuantifier(); } break; } - this.state = 178; + this.state = 186; this.selectItem(); - this.state = 183; + this.state = 191; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while (_la === 1) { { { - this.state = 179; + this.state = 187; this.match(GenericSqlParser.T__0); - this.state = 180; + this.state = 188; this.selectItem(); } } - this.state = 185; + this.state = 193; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } - this.state = 187; + this.state = 195; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 42) { { - this.state = 186; + this.state = 194; this.fromClause(); } } - this.state = 190; + this.state = 198; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 93) { { - this.state = 189; + this.state = 197; this.whereClause(); } } - this.state = 193; + this.state = 201; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 44) { { - this.state = 192; + this.state = 200; this.groupByClause(); } } - this.state = 196; + this.state = 204; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 45) { { - this.state = 195; + this.state = 203; this.havingClause(); } } - this.state = 199; + this.state = 207; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 69) { { - this.state = 198; + this.state = 206; this.orderByClause(); } } - this.state = 202; + this.state = 210; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 60) { { - this.state = 201; + this.state = 209; this.limitClause(); } } @@ -814,7 +818,7 @@ export class GenericSqlParser extends SQLParserBase { try { this.enterOuterAlt(localContext, 1); { - this.state = 204; + this.state = 212; _la = this.tokenStream.LA(1); if(!(_la === 6 || _la === 30)) { this.errorHandler.recoverInline(this); @@ -844,30 +848,31 @@ export class GenericSqlParser extends SQLParserBase { this.enterRule(localContext, 24, GenericSqlParser.RULE_selectItem); let _la: number; try { - this.state = 218; + this.state = 228; this.errorHandler.sync(this); switch (this.interpreter.adaptivePredict(this.tokenStream, 19, this.context) ) { case 1: + localContext = new SelectExpressionElementContext(localContext); this.enterOuterAlt(localContext, 1); { - this.state = 206; + this.state = 214; this.expression(); - this.state = 211; + this.state = 219; this.errorHandler.sync(this); switch (this.interpreter.adaptivePredict(this.tokenStream, 18, this.context) ) { case 1: { - this.state = 208; + this.state = 216; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 9) { { - this.state = 207; + this.state = 215; this.match(GenericSqlParser.KW_AS); } } - this.state = 210; + this.state = 218; this.identifier(); } break; @@ -875,23 +880,37 @@ export class GenericSqlParser extends SQLParserBase { } break; case 2: + localContext = new SelectStarElementContext(localContext); this.enterOuterAlt(localContext, 2); { - this.state = 213; + this.state = 221; this.qualifiedName(); - this.state = 214; + this.state = 222; this.match(GenericSqlParser.T__3); - this.state = 215; + this.state = 223; this.match(GenericSqlParser.ASTERISK); } break; case 3: + localContext = new SelectAllElementContext(localContext); this.enterOuterAlt(localContext, 3); { - this.state = 217; + this.state = 225; this.match(GenericSqlParser.ASTERISK); } break; + case 4: + localContext = new SelectEmptyElementContext(localContext); + this.enterOuterAlt(localContext, 4); + { + this.state = 226; + if (!(this.shouldMatchEmpty())) { + throw this.createFailedPredicateException("this.shouldMatchEmpty()"); + } + this.state = 227; + this.emptyColumn(); + } + break; } } catch (re) { @@ -915,23 +934,23 @@ export class GenericSqlParser extends SQLParserBase { try { this.enterOuterAlt(localContext, 1); { - this.state = 220; + this.state = 230; this.match(GenericSqlParser.KW_FROM); - this.state = 221; + this.state = 231; this.relation(0); - this.state = 226; + this.state = 236; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while (_la === 1) { { { - this.state = 222; + this.state = 232; this.match(GenericSqlParser.T__0); - this.state = 223; + this.state = 233; this.relation(0); } } - this.state = 228; + this.state = 238; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } @@ -974,11 +993,11 @@ export class GenericSqlParser extends SQLParserBase { this.context = localContext; previousContext = localContext; - this.state = 230; + this.state = 240; this.aliasedRelation(); } this.context!.stop = this.tokenStream.LT(-1); - this.state = 241; + this.state = 251; this.errorHandler.sync(this); alternative = this.interpreter.adaptivePredict(this.tokenStream, 21, this.context); while (alternative !== 2 && alternative !== antlr.ATN.INVALID_ALT_NUMBER) { @@ -992,24 +1011,24 @@ export class GenericSqlParser extends SQLParserBase { localContext = new JoinRelationContext(new RelationContext(parentContext, parentState)); (localContext as JoinRelationContext)._left = previousContext; this.pushNewRecursionContext(localContext, _startState, GenericSqlParser.RULE_relation); - this.state = 232; + this.state = 242; if (!(this.precpred(this.context, 2))) { throw this.createFailedPredicateException("this.precpred(this.context, 2)"); } - this.state = 233; + this.state = 243; this.joinType(); - this.state = 234; + this.state = 244; this.match(GenericSqlParser.KW_JOIN); - this.state = 235; + this.state = 245; (localContext as JoinRelationContext)._right = this.relation(0); - this.state = 236; + this.state = 246; this.match(GenericSqlParser.KW_ON); - this.state = 237; + this.state = 247; (localContext as JoinRelationContext)._condition = this.expression(); } } } - this.state = 243; + this.state = 253; this.errorHandler.sync(this); alternative = this.interpreter.adaptivePredict(this.tokenStream, 21, this.context); } @@ -1034,19 +1053,19 @@ export class GenericSqlParser extends SQLParserBase { this.enterRule(localContext, 30, GenericSqlParser.RULE_joinType); let _la: number; try { - this.state = 260; + this.state = 270; this.errorHandler.sync(this); switch (this.tokenStream.LA(1)) { case GenericSqlParser.KW_INNER: case GenericSqlParser.KW_JOIN: this.enterOuterAlt(localContext, 1); { - this.state = 245; + this.state = 255; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 48) { { - this.state = 244; + this.state = 254; this.match(GenericSqlParser.KW_INNER); } } @@ -1056,14 +1075,14 @@ export class GenericSqlParser extends SQLParserBase { case GenericSqlParser.KW_LEFT: this.enterOuterAlt(localContext, 2); { - this.state = 247; + this.state = 257; this.match(GenericSqlParser.KW_LEFT); - this.state = 249; + this.state = 259; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 70) { { - this.state = 248; + this.state = 258; this.match(GenericSqlParser.KW_OUTER); } } @@ -1073,14 +1092,14 @@ export class GenericSqlParser extends SQLParserBase { case GenericSqlParser.KW_RIGHT: this.enterOuterAlt(localContext, 3); { - this.state = 251; + this.state = 261; this.match(GenericSqlParser.KW_RIGHT); - this.state = 253; + this.state = 263; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 70) { { - this.state = 252; + this.state = 262; this.match(GenericSqlParser.KW_OUTER); } } @@ -1090,14 +1109,14 @@ export class GenericSqlParser extends SQLParserBase { case GenericSqlParser.KW_FULL: this.enterOuterAlt(localContext, 4); { - this.state = 255; + this.state = 265; this.match(GenericSqlParser.KW_FULL); - this.state = 257; + this.state = 267; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 70) { { - this.state = 256; + this.state = 266; this.match(GenericSqlParser.KW_OUTER); } } @@ -1107,7 +1126,7 @@ export class GenericSqlParser extends SQLParserBase { case GenericSqlParser.KW_CROSS: this.enterOuterAlt(localContext, 5); { - this.state = 259; + this.state = 269; this.match(GenericSqlParser.KW_CROSS); } break; @@ -1136,24 +1155,24 @@ export class GenericSqlParser extends SQLParserBase { try { this.enterOuterAlt(localContext, 1); { - this.state = 262; + this.state = 272; this.relationPrimary(); - this.state = 267; + this.state = 277; this.errorHandler.sync(this); switch (this.interpreter.adaptivePredict(this.tokenStream, 28, this.context) ) { case 1: { - this.state = 264; + this.state = 274; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 9) { { - this.state = 263; + this.state = 273; this.match(GenericSqlParser.KW_AS); } } - this.state = 266; + this.state = 276; this.identifier(); } break; @@ -1178,7 +1197,7 @@ export class GenericSqlParser extends SQLParserBase { let localContext = new RelationPrimaryContext(this.context, this.state); this.enterRule(localContext, 34, GenericSqlParser.RULE_relationPrimary); try { - this.state = 274; + this.state = 284; this.errorHandler.sync(this); switch (this.tokenStream.LA(1)) { case GenericSqlParser.KW_ADD: @@ -1231,7 +1250,7 @@ export class GenericSqlParser extends SQLParserBase { localContext = new TableNameRelationContext(localContext); this.enterOuterAlt(localContext, 1); { - this.state = 269; + this.state = 279; this.tableName(); } break; @@ -1239,11 +1258,11 @@ export class GenericSqlParser extends SQLParserBase { localContext = new SubqueryRelationContext(localContext); this.enterOuterAlt(localContext, 2); { - this.state = 270; + this.state = 280; this.match(GenericSqlParser.T__1); - this.state = 271; + this.state = 281; this.queryStatement(); - this.state = 272; + this.state = 282; this.match(GenericSqlParser.T__2); } break; @@ -1271,10 +1290,24 @@ export class GenericSqlParser extends SQLParserBase { try { this.enterOuterAlt(localContext, 1); { - this.state = 276; + this.state = 286; this.match(GenericSqlParser.KW_WHERE); - this.state = 277; - this.expression(); + this.state = 289; + this.errorHandler.sync(this); + switch (this.interpreter.adaptivePredict(this.tokenStream, 30, this.context) ) { + case 1: + { + this.state = 287; + this.expression(); + } + break; + case 2: + { + this.state = 288; + this.emptyColumn(); + } + break; + } } } catch (re) { @@ -1298,35 +1331,35 @@ export class GenericSqlParser extends SQLParserBase { try { this.enterOuterAlt(localContext, 1); { - this.state = 279; + this.state = 291; this.match(GenericSqlParser.KW_GROUP); - this.state = 280; + this.state = 292; this.match(GenericSqlParser.KW_BY); - this.state = 282; + this.state = 294; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 30, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 31, this.context) ) { case 1: { - this.state = 281; + this.state = 293; this.setQuantifier(); } break; } - this.state = 284; + this.state = 296; this.expression(); - this.state = 289; + this.state = 301; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while (_la === 1) { { { - this.state = 285; + this.state = 297; this.match(GenericSqlParser.T__0); - this.state = 286; + this.state = 298; this.expression(); } } - this.state = 291; + this.state = 303; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } @@ -1352,10 +1385,24 @@ export class GenericSqlParser extends SQLParserBase { try { this.enterOuterAlt(localContext, 1); { - this.state = 292; + this.state = 304; this.match(GenericSqlParser.KW_HAVING); - this.state = 293; - this.expression(); + this.state = 307; + this.errorHandler.sync(this); + switch (this.interpreter.adaptivePredict(this.tokenStream, 33, this.context) ) { + case 1: + { + this.state = 305; + this.expression(); + } + break; + case 2: + { + this.state = 306; + this.emptyColumn(); + } + break; + } } } catch (re) { @@ -1379,25 +1426,25 @@ export class GenericSqlParser extends SQLParserBase { try { this.enterOuterAlt(localContext, 1); { - this.state = 295; + this.state = 309; this.match(GenericSqlParser.KW_ORDER); - this.state = 296; + this.state = 310; this.match(GenericSqlParser.KW_BY); - this.state = 297; + this.state = 311; this.sortItem(); - this.state = 302; + this.state = 316; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while (_la === 1) { { { - this.state = 298; + this.state = 312; this.match(GenericSqlParser.T__0); - this.state = 299; + this.state = 313; this.sortItem(); } } - this.state = 304; + this.state = 318; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } @@ -1424,14 +1471,14 @@ export class GenericSqlParser extends SQLParserBase { try { this.enterOuterAlt(localContext, 1); { - this.state = 305; + this.state = 319; this.expression(); - this.state = 307; + this.state = 321; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 10 || _la === 29) { { - this.state = 306; + this.state = 320; localContext._ordering = this.tokenStream.LT(1); _la = this.tokenStream.LA(1); if(!(_la === 10 || _la === 29)) { @@ -1444,14 +1491,14 @@ export class GenericSqlParser extends SQLParserBase { } } - this.state = 311; + this.state = 325; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 64) { { - this.state = 309; + this.state = 323; this.match(GenericSqlParser.KW_NULLS); - this.state = 310; + this.state = 324; localContext._nullOrdering = this.tokenStream.LT(1); _la = this.tokenStream.LA(1); if(!(_la === 39 || _la === 57)) { @@ -1487,18 +1534,18 @@ export class GenericSqlParser extends SQLParserBase { try { this.enterOuterAlt(localContext, 1); { - this.state = 313; + this.state = 327; this.match(GenericSqlParser.KW_LIMIT); - this.state = 314; + this.state = 328; localContext._limit = this.expression(); - this.state = 317; + this.state = 331; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 66) { { - this.state = 315; + this.state = 329; this.match(GenericSqlParser.KW_OFFSET); - this.state = 316; + this.state = 330; localContext._offset = this.expression(); } } @@ -1525,23 +1572,23 @@ export class GenericSqlParser extends SQLParserBase { try { this.enterOuterAlt(localContext, 1); { - this.state = 319; + this.state = 333; this.match(GenericSqlParser.KW_INSERT); - this.state = 320; + this.state = 334; this.match(GenericSqlParser.KW_INTO); - this.state = 321; + this.state = 335; this.tableName(); - this.state = 323; + this.state = 337; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 36, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 38, this.context) ) { case 1: { - this.state = 322; + this.state = 336; this.columnList(); } break; } - this.state = 325; + this.state = 339; this.queryStatement(); } } @@ -1566,27 +1613,27 @@ export class GenericSqlParser extends SQLParserBase { try { this.enterOuterAlt(localContext, 1); { - this.state = 327; + this.state = 341; this.match(GenericSqlParser.T__1); - this.state = 328; + this.state = 342; this.columnRef(); - this.state = 333; + this.state = 347; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while (_la === 1) { { { - this.state = 329; + this.state = 343; this.match(GenericSqlParser.T__0); - this.state = 330; + this.state = 344; this.columnRef(); } } - this.state = 335; + this.state = 349; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } - this.state = 336; + this.state = 350; this.match(GenericSqlParser.T__2); } } @@ -1611,36 +1658,36 @@ export class GenericSqlParser extends SQLParserBase { try { this.enterOuterAlt(localContext, 1); { - this.state = 338; + this.state = 352; this.match(GenericSqlParser.KW_UPDATE); - this.state = 339; + this.state = 353; this.tableName(); - this.state = 340; + this.state = 354; this.match(GenericSqlParser.KW_SET); - this.state = 341; + this.state = 355; this.updateAssignment(); - this.state = 346; + this.state = 360; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while (_la === 1) { { { - this.state = 342; + this.state = 356; this.match(GenericSqlParser.T__0); - this.state = 343; + this.state = 357; this.updateAssignment(); } } - this.state = 348; + this.state = 362; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } - this.state = 350; + this.state = 364; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 93) { { - this.state = 349; + this.state = 363; this.whereClause(); } } @@ -1667,11 +1714,11 @@ export class GenericSqlParser extends SQLParserBase { try { this.enterOuterAlt(localContext, 1); { - this.state = 352; + this.state = 366; this.columnRef(); - this.state = 353; + this.state = 367; this.match(GenericSqlParser.EQ); - this.state = 354; + this.state = 368; this.expression(); } } @@ -1696,18 +1743,18 @@ export class GenericSqlParser extends SQLParserBase { try { this.enterOuterAlt(localContext, 1); { - this.state = 356; + this.state = 370; this.match(GenericSqlParser.KW_DELETE); - this.state = 357; + this.state = 371; this.match(GenericSqlParser.KW_FROM); - this.state = 358; + this.state = 372; this.tableName(); - this.state = 360; + this.state = 374; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 93) { { - this.state = 359; + this.state = 373; this.whereClause(); } } @@ -1735,56 +1782,56 @@ export class GenericSqlParser extends SQLParserBase { try { this.enterOuterAlt(localContext, 1); { - this.state = 362; + this.state = 376; this.match(GenericSqlParser.KW_CREATE); - this.state = 363; + this.state = 377; this.match(GenericSqlParser.KW_TABLE); - this.state = 367; + this.state = 381; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 41, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 43, this.context) ) { case 1: { - this.state = 364; + this.state = 378; this.match(GenericSqlParser.KW_IF); - this.state = 365; + this.state = 379; this.match(GenericSqlParser.KW_NOT); - this.state = 366; + this.state = 380; this.match(GenericSqlParser.KW_EXISTS); } break; } - this.state = 369; + this.state = 383; this.tableNameCreate(); - this.state = 370; + this.state = 384; this.match(GenericSqlParser.T__1); - this.state = 371; + this.state = 385; this.tableElement(); - this.state = 376; + this.state = 390; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while (_la === 1) { { { - this.state = 372; + this.state = 386; this.match(GenericSqlParser.T__0); - this.state = 373; + this.state = 387; this.tableElement(); } } - this.state = 378; + this.state = 392; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } - this.state = 379; + this.state = 393; this.match(GenericSqlParser.T__2); - this.state = 382; + this.state = 396; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 43, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 45, this.context) ) { case 1: { - this.state = 380; + this.state = 394; this.match(GenericSqlParser.KW_WITH); - this.state = 381; + this.state = 395; this.properties(); } break; @@ -1809,20 +1856,20 @@ export class GenericSqlParser extends SQLParserBase { let localContext = new TableElementContext(this.context, this.state); this.enterRule(localContext, 60, GenericSqlParser.RULE_tableElement); try { - this.state = 386; + this.state = 400; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 44, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 46, this.context) ) { case 1: this.enterOuterAlt(localContext, 1); { - this.state = 384; + this.state = 398; this.columnDefinition(); } break; case 2: this.enterOuterAlt(localContext, 2); { - this.state = 385; + this.state = 399; this.tableConstraint(); } break; @@ -1849,42 +1896,42 @@ export class GenericSqlParser extends SQLParserBase { try { this.enterOuterAlt(localContext, 1); { - this.state = 388; - this.columnRef(); - this.state = 389; - this.dataType(); - this.state = 392; + this.state = 402; + this.columnRefCreate(); + this.state = 403; + localContext._colType = this.dataType(); + this.state = 406; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 61) { { - this.state = 390; + this.state = 404; this.match(GenericSqlParser.KW_NOT); - this.state = 391; + this.state = 405; this.match(GenericSqlParser.KW_NULL); } } - this.state = 396; + this.state = 410; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 27) { { - this.state = 394; + this.state = 408; this.match(GenericSqlParser.KW_DEFAULT); - this.state = 395; + this.state = 409; this.expression(); } } - this.state = 400; + this.state = 414; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 71) { { - this.state = 398; + this.state = 412; this.match(GenericSqlParser.KW_PRIMARY); - this.state = 399; + this.state = 413; this.match(GenericSqlParser.KW_KEY); } } @@ -1905,151 +1952,175 @@ export class GenericSqlParser extends SQLParserBase { } return localContext; } + public columnRefCreate(): ColumnRefCreateContext { + let localContext = new ColumnRefCreateContext(this.context, this.state); + this.enterRule(localContext, 64, GenericSqlParser.RULE_columnRefCreate); + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 416; + this.identifier(); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + localContext.exception = re; + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } public tableConstraint(): TableConstraintContext { let localContext = new TableConstraintContext(this.context, this.state); - this.enterRule(localContext, 64, GenericSqlParser.RULE_tableConstraint); + this.enterRule(localContext, 66, GenericSqlParser.RULE_tableConstraint); let _la: number; try { this.enterOuterAlt(localContext, 1); { - this.state = 404; + this.state = 420; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 22) { { - this.state = 402; + this.state = 418; this.match(GenericSqlParser.KW_CONSTRAINT); - this.state = 403; + this.state = 419; this.identifier(); } } - this.state = 461; + this.state = 477; this.errorHandler.sync(this); switch (this.tokenStream.LA(1)) { case GenericSqlParser.KW_PRIMARY: { - this.state = 406; + this.state = 422; this.match(GenericSqlParser.KW_PRIMARY); - this.state = 407; + this.state = 423; this.match(GenericSqlParser.KW_KEY); - this.state = 408; + this.state = 424; this.match(GenericSqlParser.T__1); - this.state = 409; + this.state = 425; this.columnRef(); - this.state = 414; + this.state = 430; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while (_la === 1) { { { - this.state = 410; + this.state = 426; this.match(GenericSqlParser.T__0); - this.state = 411; + this.state = 427; this.columnRef(); } } - this.state = 416; + this.state = 432; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } - this.state = 417; + this.state = 433; this.match(GenericSqlParser.T__2); } break; case GenericSqlParser.KW_UNIQUE: { - this.state = 419; + this.state = 435; this.match(GenericSqlParser.KW_UNIQUE); - this.state = 420; + this.state = 436; this.match(GenericSqlParser.T__1); - this.state = 421; + this.state = 437; this.columnRef(); - this.state = 426; + this.state = 442; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while (_la === 1) { { { - this.state = 422; + this.state = 438; this.match(GenericSqlParser.T__0); - this.state = 423; + this.state = 439; this.columnRef(); } } - this.state = 428; + this.state = 444; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } - this.state = 429; + this.state = 445; this.match(GenericSqlParser.T__2); } break; case GenericSqlParser.KW_CHECK: { - this.state = 431; + this.state = 447; this.match(GenericSqlParser.KW_CHECK); - this.state = 432; + this.state = 448; this.match(GenericSqlParser.T__1); - this.state = 433; + this.state = 449; this.expression(); - this.state = 434; + this.state = 450; this.match(GenericSqlParser.T__2); } break; case GenericSqlParser.KW_FOREIGN: { - this.state = 436; + this.state = 452; this.match(GenericSqlParser.KW_FOREIGN); - this.state = 437; + this.state = 453; this.match(GenericSqlParser.KW_KEY); - this.state = 438; + this.state = 454; this.match(GenericSqlParser.T__1); - this.state = 439; + this.state = 455; this.columnRef(); - this.state = 444; + this.state = 460; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while (_la === 1) { { { - this.state = 440; + this.state = 456; this.match(GenericSqlParser.T__0); - this.state = 441; + this.state = 457; this.columnRef(); } } - this.state = 446; + this.state = 462; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } - this.state = 447; + this.state = 463; this.match(GenericSqlParser.T__2); - this.state = 448; + this.state = 464; this.match(GenericSqlParser.KW_REFERENCES); - this.state = 449; + this.state = 465; this.tableName(); - this.state = 450; + this.state = 466; this.match(GenericSqlParser.T__1); - this.state = 451; + this.state = 467; this.columnRef(); - this.state = 456; + this.state = 472; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while (_la === 1) { { { - this.state = 452; + this.state = 468; this.match(GenericSqlParser.T__0); - this.state = 453; + this.state = 469; this.columnRef(); } } - this.state = 458; + this.state = 474; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } - this.state = 459; + this.state = 475; this.match(GenericSqlParser.T__2); } break; @@ -2074,114 +2145,114 @@ export class GenericSqlParser extends SQLParserBase { } public alterTableStatement(): AlterTableStatementContext { let localContext = new AlterTableStatementContext(this.context, this.state); - this.enterRule(localContext, 66, GenericSqlParser.RULE_alterTableStatement); + this.enterRule(localContext, 68, GenericSqlParser.RULE_alterTableStatement); try { this.enterOuterAlt(localContext, 1); { - this.state = 463; + this.state = 479; this.match(GenericSqlParser.KW_ALTER); - this.state = 464; + this.state = 480; this.match(GenericSqlParser.KW_TABLE); - this.state = 467; + this.state = 483; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 54, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 56, this.context) ) { case 1: { - this.state = 465; + this.state = 481; this.match(GenericSqlParser.KW_IF); - this.state = 466; + this.state = 482; this.match(GenericSqlParser.KW_EXISTS); } break; } - this.state = 469; + this.state = 485; this.tableName(); - this.state = 501; + this.state = 517; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 57, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 59, this.context) ) { case 1: { - this.state = 470; + this.state = 486; this.match(GenericSqlParser.KW_ADD); - this.state = 471; + this.state = 487; this.match(GenericSqlParser.KW_COLUMN); - this.state = 475; + this.state = 491; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 55, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 57, this.context) ) { case 1: { - this.state = 472; + this.state = 488; this.match(GenericSqlParser.KW_IF); - this.state = 473; + this.state = 489; this.match(GenericSqlParser.KW_NOT); - this.state = 474; + this.state = 490; this.match(GenericSqlParser.KW_EXISTS); } break; } - this.state = 477; + this.state = 493; this.columnDefinition(); } break; case 2: { - this.state = 478; + this.state = 494; this.match(GenericSqlParser.KW_DROP); - this.state = 479; + this.state = 495; this.match(GenericSqlParser.KW_COLUMN); - this.state = 482; + this.state = 498; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 56, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 58, this.context) ) { case 1: { - this.state = 480; + this.state = 496; this.match(GenericSqlParser.KW_IF); - this.state = 481; + this.state = 497; this.match(GenericSqlParser.KW_EXISTS); } break; } - this.state = 484; + this.state = 500; this.columnRef(); } break; case 3: { - this.state = 485; + this.state = 501; this.match(GenericSqlParser.KW_RENAME); - this.state = 486; + this.state = 502; this.match(GenericSqlParser.KW_TO); - this.state = 487; + this.state = 503; this.tableNameCreate(); } break; case 4: { - this.state = 488; + this.state = 504; this.match(GenericSqlParser.KW_ALTER); - this.state = 489; + this.state = 505; this.match(GenericSqlParser.KW_COLUMN); - this.state = 490; + this.state = 506; this.columnRef(); - this.state = 491; + this.state = 507; this.match(GenericSqlParser.KW_SET); - this.state = 492; + this.state = 508; this.match(GenericSqlParser.KW_DEFAULT); - this.state = 493; + this.state = 509; this.expression(); } break; case 5: { - this.state = 495; + this.state = 511; this.match(GenericSqlParser.KW_ALTER); - this.state = 496; + this.state = 512; this.match(GenericSqlParser.KW_COLUMN); - this.state = 497; + this.state = 513; this.columnRef(); - this.state = 498; + this.state = 514; this.match(GenericSqlParser.KW_DROP); - this.state = 499; + this.state = 515; this.match(GenericSqlParser.KW_DEFAULT); } break; @@ -2204,27 +2275,27 @@ export class GenericSqlParser extends SQLParserBase { } public dropTableStatement(): DropTableStatementContext { let localContext = new DropTableStatementContext(this.context, this.state); - this.enterRule(localContext, 68, GenericSqlParser.RULE_dropTableStatement); + this.enterRule(localContext, 70, GenericSqlParser.RULE_dropTableStatement); try { this.enterOuterAlt(localContext, 1); { - this.state = 503; + this.state = 519; this.match(GenericSqlParser.KW_DROP); - this.state = 504; + this.state = 520; this.match(GenericSqlParser.KW_TABLE); - this.state = 507; + this.state = 523; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 58, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 60, this.context) ) { case 1: { - this.state = 505; + this.state = 521; this.match(GenericSqlParser.KW_IF); - this.state = 506; + this.state = 522; this.match(GenericSqlParser.KW_EXISTS); } break; } - this.state = 509; + this.state = 525; this.tableName(); } } @@ -2244,11 +2315,11 @@ export class GenericSqlParser extends SQLParserBase { } public expression(): ExpressionContext { let localContext = new ExpressionContext(this.context, this.state); - this.enterRule(localContext, 70, GenericSqlParser.RULE_expression); + this.enterRule(localContext, 72, GenericSqlParser.RULE_expression); try { this.enterOuterAlt(localContext, 1); { - this.state = 511; + this.state = 527; this.booleanExpression(0); } } @@ -2278,13 +2349,13 @@ export class GenericSqlParser extends SQLParserBase { let parentState = this.state; let localContext = new BooleanExpressionContext(this.context, parentState); let previousContext = localContext; - let _startState = 72; - this.enterRecursionRule(localContext, 72, GenericSqlParser.RULE_booleanExpression, _p); + let _startState = 74; + this.enterRecursionRule(localContext, 74, GenericSqlParser.RULE_booleanExpression, _p); try { let alternative: number; this.enterOuterAlt(localContext, 1); { - this.state = 517; + this.state = 533; this.errorHandler.sync(this); switch (this.tokenStream.LA(1)) { case GenericSqlParser.T__1: @@ -2351,7 +2422,7 @@ export class GenericSqlParser extends SQLParserBase { this.context = localContext; previousContext = localContext; - this.state = 514; + this.state = 530; this.predicatedExpression(); } break; @@ -2360,9 +2431,9 @@ export class GenericSqlParser extends SQLParserBase { localContext = new NotExpressionContext(localContext); this.context = localContext; previousContext = localContext; - this.state = 515; + this.state = 531; this.match(GenericSqlParser.KW_NOT); - this.state = 516; + this.state = 532; this.booleanExpression(3); } break; @@ -2370,9 +2441,9 @@ export class GenericSqlParser extends SQLParserBase { throw new antlr.NoViableAltException(this); } this.context!.stop = this.tokenStream.LT(-1); - this.state = 527; + this.state = 543; this.errorHandler.sync(this); - alternative = this.interpreter.adaptivePredict(this.tokenStream, 61, this.context); + alternative = this.interpreter.adaptivePredict(this.tokenStream, 63, this.context); while (alternative !== 2 && alternative !== antlr.ATN.INVALID_ALT_NUMBER) { if (alternative === 1) { if (this._parseListeners != null) { @@ -2380,21 +2451,21 @@ export class GenericSqlParser extends SQLParserBase { } previousContext = localContext; { - this.state = 525; + this.state = 541; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 60, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 62, this.context) ) { case 1: { localContext = new AndExpressionContext(new BooleanExpressionContext(parentContext, parentState)); (localContext as AndExpressionContext)._left = previousContext; this.pushNewRecursionContext(localContext, _startState, GenericSqlParser.RULE_booleanExpression); - this.state = 519; + this.state = 535; if (!(this.precpred(this.context, 2))) { throw this.createFailedPredicateException("this.precpred(this.context, 2)"); } - this.state = 520; + this.state = 536; this.match(GenericSqlParser.KW_AND); - this.state = 521; + this.state = 537; (localContext as AndExpressionContext)._right = this.booleanExpression(3); } break; @@ -2403,22 +2474,22 @@ export class GenericSqlParser extends SQLParserBase { localContext = new OrExpressionContext(new BooleanExpressionContext(parentContext, parentState)); (localContext as OrExpressionContext)._left = previousContext; this.pushNewRecursionContext(localContext, _startState, GenericSqlParser.RULE_booleanExpression); - this.state = 522; + this.state = 538; if (!(this.precpred(this.context, 1))) { throw this.createFailedPredicateException("this.precpred(this.context, 1)"); } - this.state = 523; + this.state = 539; this.match(GenericSqlParser.KW_OR); - this.state = 524; + this.state = 540; (localContext as OrExpressionContext)._right = this.booleanExpression(2); } break; } } } - this.state = 529; + this.state = 545; this.errorHandler.sync(this); - alternative = this.interpreter.adaptivePredict(this.tokenStream, 61, this.context); + alternative = this.interpreter.adaptivePredict(this.tokenStream, 63, this.context); } } } @@ -2438,18 +2509,18 @@ export class GenericSqlParser extends SQLParserBase { } public predicatedExpression(): PredicatedExpressionContext { let localContext = new PredicatedExpressionContext(this.context, this.state); - this.enterRule(localContext, 74, GenericSqlParser.RULE_predicatedExpression); + this.enterRule(localContext, 76, GenericSqlParser.RULE_predicatedExpression); try { this.enterOuterAlt(localContext, 1); { - this.state = 530; + this.state = 546; this.valueExpression(0); - this.state = 532; + this.state = 548; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 62, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 64, this.context) ) { case 1: { - this.state = 531; + this.state = 547; this.predicate(); } break; @@ -2472,19 +2543,19 @@ export class GenericSqlParser extends SQLParserBase { } public predicate(): PredicateContext { let localContext = new PredicateContext(this.context, this.state); - this.enterRule(localContext, 76, GenericSqlParser.RULE_predicate); + this.enterRule(localContext, 78, GenericSqlParser.RULE_predicate); let _la: number; try { - this.state = 589; + this.state = 605; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 71, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 73, this.context) ) { case 1: localContext = new ComparisonPredicateContext(localContext); this.enterOuterAlt(localContext, 1); { - this.state = 534; + this.state = 550; this.comparisonOperator(); - this.state = 535; + this.state = 551; (localContext as ComparisonPredicateContext)._right = this.valueExpression(0); } break; @@ -2492,39 +2563,39 @@ export class GenericSqlParser extends SQLParserBase { localContext = new InPredicateContext(localContext); this.enterOuterAlt(localContext, 2); { - this.state = 538; + this.state = 554; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 61) { { - this.state = 537; + this.state = 553; this.match(GenericSqlParser.KW_NOT); } } - this.state = 540; + this.state = 556; this.match(GenericSqlParser.KW_IN); - this.state = 541; + this.state = 557; this.match(GenericSqlParser.T__1); - this.state = 542; + this.state = 558; this.expression(); - this.state = 547; + this.state = 563; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while (_la === 1) { { { - this.state = 543; + this.state = 559; this.match(GenericSqlParser.T__0); - this.state = 544; + this.state = 560; this.expression(); } } - this.state = 549; + this.state = 565; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } - this.state = 550; + this.state = 566; this.match(GenericSqlParser.T__2); } break; @@ -2532,23 +2603,23 @@ export class GenericSqlParser extends SQLParserBase { localContext = new InSubqueryPredicateContext(localContext); this.enterOuterAlt(localContext, 3); { - this.state = 553; + this.state = 569; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 61) { { - this.state = 552; + this.state = 568; this.match(GenericSqlParser.KW_NOT); } } - this.state = 555; + this.state = 571; this.match(GenericSqlParser.KW_IN); - this.state = 556; + this.state = 572; this.match(GenericSqlParser.T__1); - this.state = 557; + this.state = 573; this.queryStatement(); - this.state = 558; + this.state = 574; this.match(GenericSqlParser.T__2); } break; @@ -2556,23 +2627,23 @@ export class GenericSqlParser extends SQLParserBase { localContext = new BetweenPredicateContext(localContext); this.enterOuterAlt(localContext, 4); { - this.state = 561; + this.state = 577; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 61) { { - this.state = 560; + this.state = 576; this.match(GenericSqlParser.KW_NOT); } } - this.state = 563; + this.state = 579; this.match(GenericSqlParser.KW_BETWEEN); - this.state = 564; + this.state = 580; (localContext as BetweenPredicateContext)._lower = this.valueExpression(0); - this.state = 565; + this.state = 581; this.match(GenericSqlParser.KW_AND); - this.state = 566; + this.state = 582; (localContext as BetweenPredicateContext)._upper = this.valueExpression(0); } break; @@ -2580,28 +2651,28 @@ export class GenericSqlParser extends SQLParserBase { localContext = new LikePredicateContext(localContext); this.enterOuterAlt(localContext, 5); { - this.state = 569; + this.state = 585; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 61) { { - this.state = 568; + this.state = 584; this.match(GenericSqlParser.KW_NOT); } } - this.state = 571; + this.state = 587; this.match(GenericSqlParser.KW_LIKE); - this.state = 572; + this.state = 588; (localContext as LikePredicateContext)._pattern = this.valueExpression(0); - this.state = 575; + this.state = 591; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 68, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 70, this.context) ) { case 1: { - this.state = 573; + this.state = 589; this.match(GenericSqlParser.KW_ESCAPE); - this.state = 574; + this.state = 590; (localContext as LikePredicateContext)._escape = this.valueExpression(0); } break; @@ -2612,19 +2683,19 @@ export class GenericSqlParser extends SQLParserBase { localContext = new NullPredicateContext(localContext); this.enterOuterAlt(localContext, 6); { - this.state = 577; + this.state = 593; this.match(GenericSqlParser.KW_IS); - this.state = 579; + this.state = 595; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 61) { { - this.state = 578; + this.state = 594; this.match(GenericSqlParser.KW_NOT); } } - this.state = 581; + this.state = 597; this.match(GenericSqlParser.KW_NULL); } break; @@ -2632,23 +2703,23 @@ export class GenericSqlParser extends SQLParserBase { localContext = new DistinctFromPredicateContext(localContext); this.enterOuterAlt(localContext, 7); { - this.state = 582; + this.state = 598; this.match(GenericSqlParser.KW_IS); - this.state = 584; + this.state = 600; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 61) { { - this.state = 583; + this.state = 599; this.match(GenericSqlParser.KW_NOT); } } - this.state = 586; + this.state = 602; this.match(GenericSqlParser.KW_DISTINCT); - this.state = 587; + this.state = 603; this.match(GenericSqlParser.KW_FROM); - this.state = 588; + this.state = 604; (localContext as DistinctFromPredicateContext)._right = this.valueExpression(0); } break; @@ -2670,12 +2741,12 @@ export class GenericSqlParser extends SQLParserBase { } public comparisonOperator(): ComparisonOperatorContext { let localContext = new ComparisonOperatorContext(this.context, this.state); - this.enterRule(localContext, 78, GenericSqlParser.RULE_comparisonOperator); + this.enterRule(localContext, 80, GenericSqlParser.RULE_comparisonOperator); let _la: number; try { this.enterOuterAlt(localContext, 1); { - this.state = 591; + this.state = 607; _la = this.tokenStream.LA(1); if(!(((((_la - 95)) & ~0x1F) === 0 && ((1 << (_la - 95)) & 63) !== 0))) { this.errorHandler.recoverInline(this); @@ -2712,14 +2783,14 @@ export class GenericSqlParser extends SQLParserBase { let parentState = this.state; let localContext = new ValueExpressionContext(this.context, parentState); let previousContext = localContext; - let _startState = 80; - this.enterRecursionRule(localContext, 80, GenericSqlParser.RULE_valueExpression, _p); + let _startState = 82; + this.enterRecursionRule(localContext, 82, GenericSqlParser.RULE_valueExpression, _p); let _la: number; try { let alternative: number; this.enterOuterAlt(localContext, 1); { - this.state = 597; + this.state = 613; this.errorHandler.sync(this); switch (this.tokenStream.LA(1)) { case GenericSqlParser.T__1: @@ -2784,7 +2855,7 @@ export class GenericSqlParser extends SQLParserBase { this.context = localContext; previousContext = localContext; - this.state = 594; + this.state = 610; this.primaryExpression(); } break; @@ -2794,7 +2865,7 @@ export class GenericSqlParser extends SQLParserBase { localContext = new ArithmeticUnaryContext(localContext); this.context = localContext; previousContext = localContext; - this.state = 595; + this.state = 611; (localContext as ArithmeticUnaryContext)._operator = this.tokenStream.LT(1); _la = this.tokenStream.LA(1); if(!(_la === 101 || _la === 102)) { @@ -2804,7 +2875,7 @@ export class GenericSqlParser extends SQLParserBase { this.errorHandler.reportMatch(this); this.consume(); } - this.state = 596; + this.state = 612; this.valueExpression(4); } break; @@ -2812,9 +2883,9 @@ export class GenericSqlParser extends SQLParserBase { throw new antlr.NoViableAltException(this); } this.context!.stop = this.tokenStream.LT(-1); - this.state = 610; + this.state = 626; this.errorHandler.sync(this); - alternative = this.interpreter.adaptivePredict(this.tokenStream, 74, this.context); + alternative = this.interpreter.adaptivePredict(this.tokenStream, 76, this.context); while (alternative !== 2 && alternative !== antlr.ATN.INVALID_ALT_NUMBER) { if (alternative === 1) { if (this._parseListeners != null) { @@ -2822,19 +2893,19 @@ export class GenericSqlParser extends SQLParserBase { } previousContext = localContext; { - this.state = 608; + this.state = 624; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 73, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 75, this.context) ) { case 1: { localContext = new ArithmeticBinaryContext(new ValueExpressionContext(parentContext, parentState)); (localContext as ArithmeticBinaryContext)._left = previousContext; this.pushNewRecursionContext(localContext, _startState, GenericSqlParser.RULE_valueExpression); - this.state = 599; + this.state = 615; if (!(this.precpred(this.context, 3))) { throw this.createFailedPredicateException("this.precpred(this.context, 3)"); } - this.state = 600; + this.state = 616; (localContext as ArithmeticBinaryContext)._operator = this.tokenStream.LT(1); _la = this.tokenStream.LA(1); if(!(((((_la - 103)) & ~0x1F) === 0 && ((1 << (_la - 103)) & 7) !== 0))) { @@ -2844,7 +2915,7 @@ export class GenericSqlParser extends SQLParserBase { this.errorHandler.reportMatch(this); this.consume(); } - this.state = 601; + this.state = 617; (localContext as ArithmeticBinaryContext)._right = this.valueExpression(4); } break; @@ -2853,11 +2924,11 @@ export class GenericSqlParser extends SQLParserBase { localContext = new ArithmeticBinaryContext(new ValueExpressionContext(parentContext, parentState)); (localContext as ArithmeticBinaryContext)._left = previousContext; this.pushNewRecursionContext(localContext, _startState, GenericSqlParser.RULE_valueExpression); - this.state = 602; + this.state = 618; if (!(this.precpred(this.context, 2))) { throw this.createFailedPredicateException("this.precpred(this.context, 2)"); } - this.state = 603; + this.state = 619; (localContext as ArithmeticBinaryContext)._operator = this.tokenStream.LT(1); _la = this.tokenStream.LA(1); if(!(_la === 101 || _la === 102)) { @@ -2867,7 +2938,7 @@ export class GenericSqlParser extends SQLParserBase { this.errorHandler.reportMatch(this); this.consume(); } - this.state = 604; + this.state = 620; (localContext as ArithmeticBinaryContext)._right = this.valueExpression(3); } break; @@ -2876,22 +2947,22 @@ export class GenericSqlParser extends SQLParserBase { localContext = new ConcatenationContext(new ValueExpressionContext(parentContext, parentState)); (localContext as ConcatenationContext)._left = previousContext; this.pushNewRecursionContext(localContext, _startState, GenericSqlParser.RULE_valueExpression); - this.state = 605; + this.state = 621; if (!(this.precpred(this.context, 1))) { throw this.createFailedPredicateException("this.precpred(this.context, 1)"); } - this.state = 606; + this.state = 622; this.match(GenericSqlParser.CONCAT); - this.state = 607; + this.state = 623; (localContext as ConcatenationContext)._right = this.valueExpression(2); } break; } } } - this.state = 612; + this.state = 628; this.errorHandler.sync(this); - alternative = this.interpreter.adaptivePredict(this.tokenStream, 74, this.context); + alternative = this.interpreter.adaptivePredict(this.tokenStream, 76, this.context); } } } @@ -2911,17 +2982,17 @@ export class GenericSqlParser extends SQLParserBase { } public primaryExpression(): PrimaryExpressionContext { let localContext = new PrimaryExpressionContext(this.context, this.state); - this.enterRule(localContext, 82, GenericSqlParser.RULE_primaryExpression); + this.enterRule(localContext, 84, GenericSqlParser.RULE_primaryExpression); let _la: number; try { - this.state = 693; + this.state = 709; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 83, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 85, this.context) ) { case 1: localContext = new LiteralExpressionContext(localContext); this.enterOuterAlt(localContext, 1); { - this.state = 613; + this.state = 629; this.literal(); } break; @@ -2929,47 +3000,47 @@ export class GenericSqlParser extends SQLParserBase { localContext = new FunctionCallContext(localContext); this.enterOuterAlt(localContext, 2); { - this.state = 614; - this.qualifiedName(); - this.state = 615; + this.state = 630; + this.functionName(); + this.state = 631; this.match(GenericSqlParser.T__1); - this.state = 627; + this.state = 643; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if ((((_la) & ~0x1F) === 0 && ((1 << _la) & 4013421668) !== 0) || ((((_la - 37)) & ~0x1F) === 0 && ((1 << (_la - 37)) & 1069048399) !== 0) || ((((_la - 70)) & ~0x1F) === 0 && ((1 << (_la - 70)) & 2151019809) !== 0) || ((((_la - 102)) & ~0x1F) === 0 && ((1 << (_la - 102)) & 65409) !== 0)) { { - this.state = 617; + this.state = 633; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 75, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 77, this.context) ) { case 1: { - this.state = 616; + this.state = 632; this.setQuantifier(); } break; } - this.state = 619; + this.state = 635; this.expression(); - this.state = 624; + this.state = 640; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while (_la === 1) { { { - this.state = 620; + this.state = 636; this.match(GenericSqlParser.T__0); - this.state = 621; + this.state = 637; this.expression(); } } - this.state = 626; + this.state = 642; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } } } - this.state = 629; + this.state = 645; this.match(GenericSqlParser.T__2); } break; @@ -2977,35 +3048,35 @@ export class GenericSqlParser extends SQLParserBase { localContext = new SearchedCaseExpressionContext(localContext); this.enterOuterAlt(localContext, 3); { - this.state = 631; + this.state = 647; this.match(GenericSqlParser.KW_CASE); - this.state = 633; + this.state = 649; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); do { { { - this.state = 632; + this.state = 648; this.whenClause(); } } - this.state = 635; + this.state = 651; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } while (_la === 92); - this.state = 639; + this.state = 655; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 33) { { - this.state = 637; + this.state = 653; this.match(GenericSqlParser.KW_ELSE); - this.state = 638; + this.state = 654; this.expression(); } } - this.state = 641; + this.state = 657; this.match(GenericSqlParser.KW_END); } break; @@ -3013,37 +3084,37 @@ export class GenericSqlParser extends SQLParserBase { localContext = new SimpleCaseExpressionContext(localContext); this.enterOuterAlt(localContext, 4); { - this.state = 643; + this.state = 659; this.match(GenericSqlParser.KW_CASE); - this.state = 644; + this.state = 660; this.expression(); - this.state = 646; + this.state = 662; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); do { { { - this.state = 645; + this.state = 661; this.whenClause(); } } - this.state = 648; + this.state = 664; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } while (_la === 92); - this.state = 652; + this.state = 668; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 33) { { - this.state = 650; + this.state = 666; this.match(GenericSqlParser.KW_ELSE); - this.state = 651; + this.state = 667; this.expression(); } } - this.state = 654; + this.state = 670; this.match(GenericSqlParser.KW_END); } break; @@ -3051,17 +3122,17 @@ export class GenericSqlParser extends SQLParserBase { localContext = new CastExpressionContext(localContext); this.enterOuterAlt(localContext, 5); { - this.state = 656; + this.state = 672; this.match(GenericSqlParser.KW_CAST); - this.state = 657; + this.state = 673; this.match(GenericSqlParser.T__1); - this.state = 658; + this.state = 674; this.expression(); - this.state = 659; + this.state = 675; this.match(GenericSqlParser.KW_AS); - this.state = 660; + this.state = 676; this.dataType(); - this.state = 661; + this.state = 677; this.match(GenericSqlParser.T__2); } break; @@ -3069,29 +3140,29 @@ export class GenericSqlParser extends SQLParserBase { localContext = new CoalesceExpressionContext(localContext); this.enterOuterAlt(localContext, 6); { - this.state = 663; + this.state = 679; this.match(GenericSqlParser.KW_COALESCE); - this.state = 664; + this.state = 680; this.match(GenericSqlParser.T__1); - this.state = 665; + this.state = 681; this.expression(); - this.state = 670; + this.state = 686; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while (_la === 1) { { { - this.state = 666; + this.state = 682; this.match(GenericSqlParser.T__0); - this.state = 667; + this.state = 683; this.expression(); } } - this.state = 672; + this.state = 688; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } - this.state = 673; + this.state = 689; this.match(GenericSqlParser.T__2); } break; @@ -3099,17 +3170,17 @@ export class GenericSqlParser extends SQLParserBase { localContext = new NullIfExpressionContext(localContext); this.enterOuterAlt(localContext, 7); { - this.state = 675; + this.state = 691; this.match(GenericSqlParser.KW_NULLIF); - this.state = 676; + this.state = 692; this.match(GenericSqlParser.T__1); - this.state = 677; + this.state = 693; this.valueExpression(0); - this.state = 678; + this.state = 694; this.match(GenericSqlParser.T__0); - this.state = 679; + this.state = 695; this.valueExpression(0); - this.state = 680; + this.state = 696; this.match(GenericSqlParser.T__2); } break; @@ -3117,11 +3188,11 @@ export class GenericSqlParser extends SQLParserBase { localContext = new ParenthesizedExpressionContext(localContext); this.enterOuterAlt(localContext, 8); { - this.state = 682; + this.state = 698; this.match(GenericSqlParser.T__1); - this.state = 683; + this.state = 699; this.expression(); - this.state = 684; + this.state = 700; this.match(GenericSqlParser.T__2); } break; @@ -3129,13 +3200,13 @@ export class GenericSqlParser extends SQLParserBase { localContext = new ExistsExpressionContext(localContext); this.enterOuterAlt(localContext, 9); { - this.state = 686; + this.state = 702; this.match(GenericSqlParser.KW_EXISTS); - this.state = 687; + this.state = 703; this.match(GenericSqlParser.T__1); - this.state = 688; + this.state = 704; this.queryStatement(); - this.state = 689; + this.state = 705; this.match(GenericSqlParser.T__2); } break; @@ -3143,7 +3214,7 @@ export class GenericSqlParser extends SQLParserBase { localContext = new SubqueryExpressionDefaultContext(localContext); this.enterOuterAlt(localContext, 10); { - this.state = 691; + this.state = 707; this.subqueryExpression(); } break; @@ -3151,8 +3222,8 @@ export class GenericSqlParser extends SQLParserBase { localContext = new ColumnReferenceContext(localContext); this.enterOuterAlt(localContext, 11); { - this.state = 692; - this.qualifiedName(); + this.state = 708; + this.columnName(); } break; } @@ -3173,17 +3244,17 @@ export class GenericSqlParser extends SQLParserBase { } public whenClause(): WhenClauseContext { let localContext = new WhenClauseContext(this.context, this.state); - this.enterRule(localContext, 84, GenericSqlParser.RULE_whenClause); + this.enterRule(localContext, 86, GenericSqlParser.RULE_whenClause); try { this.enterOuterAlt(localContext, 1); { - this.state = 695; + this.state = 711; this.match(GenericSqlParser.KW_WHEN); - this.state = 696; + this.state = 712; localContext._condition = this.expression(); - this.state = 697; + this.state = 713; this.match(GenericSqlParser.KW_THEN); - this.state = 698; + this.state = 714; localContext._result = this.expression(); } } @@ -3203,15 +3274,15 @@ export class GenericSqlParser extends SQLParserBase { } public subqueryExpression(): SubqueryExpressionContext { let localContext = new SubqueryExpressionContext(this.context, this.state); - this.enterRule(localContext, 86, GenericSqlParser.RULE_subqueryExpression); + this.enterRule(localContext, 88, GenericSqlParser.RULE_subqueryExpression); try { this.enterOuterAlt(localContext, 1); { - this.state = 700; + this.state = 716; this.match(GenericSqlParser.T__1); - this.state = 701; + this.state = 717; this.queryStatement(); - this.state = 702; + this.state = 718; this.match(GenericSqlParser.T__2); } } @@ -3231,95 +3302,95 @@ export class GenericSqlParser extends SQLParserBase { } public dataType(): DataTypeContext { let localContext = new DataTypeContext(this.context, this.state); - this.enterRule(localContext, 88, GenericSqlParser.RULE_dataType); + this.enterRule(localContext, 90, GenericSqlParser.RULE_dataType); let _la: number; try { - this.state = 750; + this.state = 766; this.errorHandler.sync(this); switch (this.tokenStream.LA(1)) { case GenericSqlParser.KW_BOOLEAN: this.enterOuterAlt(localContext, 1); { - this.state = 704; + this.state = 720; this.match(GenericSqlParser.KW_BOOLEAN); } break; case GenericSqlParser.KW_TINYINT: this.enterOuterAlt(localContext, 2); { - this.state = 705; + this.state = 721; this.match(GenericSqlParser.KW_TINYINT); } break; case GenericSqlParser.KW_SMALLINT: this.enterOuterAlt(localContext, 3); { - this.state = 706; + this.state = 722; this.match(GenericSqlParser.KW_SMALLINT); } break; case GenericSqlParser.KW_INT: this.enterOuterAlt(localContext, 4); { - this.state = 707; + this.state = 723; this.match(GenericSqlParser.KW_INT); } break; case GenericSqlParser.KW_INTEGER: this.enterOuterAlt(localContext, 5); { - this.state = 708; + this.state = 724; this.match(GenericSqlParser.KW_INTEGER); } break; case GenericSqlParser.KW_BIGINT: this.enterOuterAlt(localContext, 6); { - this.state = 709; + this.state = 725; this.match(GenericSqlParser.KW_BIGINT); } break; case GenericSqlParser.KW_FLOAT: this.enterOuterAlt(localContext, 7); { - this.state = 710; + this.state = 726; this.match(GenericSqlParser.KW_FLOAT); } break; case GenericSqlParser.KW_DOUBLE: this.enterOuterAlt(localContext, 8); { - this.state = 711; + this.state = 727; this.match(GenericSqlParser.KW_DOUBLE); } break; case GenericSqlParser.KW_DECIMAL: this.enterOuterAlt(localContext, 9); { - this.state = 712; + this.state = 728; this.match(GenericSqlParser.KW_DECIMAL); - this.state = 720; + this.state = 736; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 85, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 87, this.context) ) { case 1: { - this.state = 713; + this.state = 729; this.match(GenericSqlParser.T__1); - this.state = 714; + this.state = 730; localContext._precision = this.match(GenericSqlParser.INTEGER_VALUE); - this.state = 717; + this.state = 733; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 1) { { - this.state = 715; + this.state = 731; this.match(GenericSqlParser.T__0); - this.state = 716; + this.state = 732; localContext._scale = this.match(GenericSqlParser.INTEGER_VALUE); } } - this.state = 719; + this.state = 735; this.match(GenericSqlParser.T__2); } break; @@ -3329,30 +3400,30 @@ export class GenericSqlParser extends SQLParserBase { case GenericSqlParser.KW_NUMERIC: this.enterOuterAlt(localContext, 10); { - this.state = 722; + this.state = 738; this.match(GenericSqlParser.KW_NUMERIC); - this.state = 730; + this.state = 746; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 87, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 89, this.context) ) { case 1: { - this.state = 723; + this.state = 739; this.match(GenericSqlParser.T__1); - this.state = 724; + this.state = 740; localContext._precision = this.match(GenericSqlParser.INTEGER_VALUE); - this.state = 727; + this.state = 743; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 1) { { - this.state = 725; + this.state = 741; this.match(GenericSqlParser.T__0); - this.state = 726; + this.state = 742; localContext._scale = this.match(GenericSqlParser.INTEGER_VALUE); } } - this.state = 729; + this.state = 745; this.match(GenericSqlParser.T__2); } break; @@ -3362,18 +3433,18 @@ export class GenericSqlParser extends SQLParserBase { case GenericSqlParser.KW_VARCHAR: this.enterOuterAlt(localContext, 11); { - this.state = 732; + this.state = 748; this.match(GenericSqlParser.KW_VARCHAR); - this.state = 736; + this.state = 752; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 88, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 90, this.context) ) { case 1: { - this.state = 733; + this.state = 749; this.match(GenericSqlParser.T__1); - this.state = 734; + this.state = 750; localContext._maxLength = this.match(GenericSqlParser.INTEGER_VALUE); - this.state = 735; + this.state = 751; this.match(GenericSqlParser.T__2); } break; @@ -3383,18 +3454,18 @@ export class GenericSqlParser extends SQLParserBase { case GenericSqlParser.KW_CHAR: this.enterOuterAlt(localContext, 12); { - this.state = 738; + this.state = 754; this.match(GenericSqlParser.KW_CHAR); - this.state = 742; + this.state = 758; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 89, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 91, this.context) ) { case 1: { - this.state = 739; + this.state = 755; this.match(GenericSqlParser.T__1); - this.state = 740; + this.state = 756; localContext._length = this.match(GenericSqlParser.INTEGER_VALUE); - this.state = 741; + this.state = 757; this.match(GenericSqlParser.T__2); } break; @@ -3404,42 +3475,42 @@ export class GenericSqlParser extends SQLParserBase { case GenericSqlParser.KW_TEXT: this.enterOuterAlt(localContext, 13); { - this.state = 744; + this.state = 760; this.match(GenericSqlParser.KW_TEXT); } break; case GenericSqlParser.KW_DATE: this.enterOuterAlt(localContext, 14); { - this.state = 745; + this.state = 761; this.match(GenericSqlParser.KW_DATE); } break; case GenericSqlParser.KW_TIME: this.enterOuterAlt(localContext, 15); { - this.state = 746; + this.state = 762; this.match(GenericSqlParser.KW_TIME); } break; case GenericSqlParser.KW_TIMESTAMP: this.enterOuterAlt(localContext, 16); { - this.state = 747; + this.state = 763; this.match(GenericSqlParser.KW_TIMESTAMP); } break; case GenericSqlParser.KW_BINARY: this.enterOuterAlt(localContext, 17); { - this.state = 748; + this.state = 764; this.match(GenericSqlParser.KW_BINARY); } break; case GenericSqlParser.KW_VARBINARY: this.enterOuterAlt(localContext, 18); { - this.state = 749; + this.state = 765; this.match(GenericSqlParser.KW_VARBINARY); } break; @@ -3463,32 +3534,32 @@ export class GenericSqlParser extends SQLParserBase { } public properties(): PropertiesContext { let localContext = new PropertiesContext(this.context, this.state); - this.enterRule(localContext, 90, GenericSqlParser.RULE_properties); + this.enterRule(localContext, 92, GenericSqlParser.RULE_properties); let _la: number; try { this.enterOuterAlt(localContext, 1); { - this.state = 752; + this.state = 768; this.match(GenericSqlParser.T__1); - this.state = 753; + this.state = 769; this.property(); - this.state = 758; + this.state = 774; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while (_la === 1) { { { - this.state = 754; + this.state = 770; this.match(GenericSqlParser.T__0); - this.state = 755; + this.state = 771; this.property(); } } - this.state = 760; + this.state = 776; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } - this.state = 761; + this.state = 777; this.match(GenericSqlParser.T__2); } } @@ -3508,15 +3579,15 @@ export class GenericSqlParser extends SQLParserBase { } public property(): PropertyContext { let localContext = new PropertyContext(this.context, this.state); - this.enterRule(localContext, 92, GenericSqlParser.RULE_property); + this.enterRule(localContext, 94, GenericSqlParser.RULE_property); try { this.enterOuterAlt(localContext, 1); { - this.state = 763; + this.state = 779; this.identifier(); - this.state = 764; + this.state = 780; this.match(GenericSqlParser.EQ); - this.state = 765; + this.state = 781; this.literal(); } } @@ -3536,16 +3607,16 @@ export class GenericSqlParser extends SQLParserBase { } public literal(): LiteralContext { let localContext = new LiteralContext(this.context, this.state); - this.enterRule(localContext, 94, GenericSqlParser.RULE_literal); + this.enterRule(localContext, 96, GenericSqlParser.RULE_literal); try { - this.state = 775; + this.state = 791; this.errorHandler.sync(this); switch (this.tokenStream.LA(1)) { case GenericSqlParser.KW_NULL: localContext = new NullLiteralContext(localContext); this.enterOuterAlt(localContext, 1); { - this.state = 767; + this.state = 783; this.match(GenericSqlParser.KW_NULL); } break; @@ -3553,7 +3624,7 @@ export class GenericSqlParser extends SQLParserBase { localContext = new BooleanLiteralContext(localContext); this.enterOuterAlt(localContext, 2); { - this.state = 768; + this.state = 784; this.match(GenericSqlParser.KW_TRUE); } break; @@ -3561,7 +3632,7 @@ export class GenericSqlParser extends SQLParserBase { localContext = new BooleanLiteralContext(localContext); this.enterOuterAlt(localContext, 3); { - this.state = 769; + this.state = 785; this.match(GenericSqlParser.KW_FALSE); } break; @@ -3569,7 +3640,7 @@ export class GenericSqlParser extends SQLParserBase { localContext = new IntegerLiteralContext(localContext); this.enterOuterAlt(localContext, 4); { - this.state = 770; + this.state = 786; this.match(GenericSqlParser.INTEGER_VALUE); } break; @@ -3577,7 +3648,7 @@ export class GenericSqlParser extends SQLParserBase { localContext = new DecimalLiteralContext(localContext); this.enterOuterAlt(localContext, 5); { - this.state = 771; + this.state = 787; this.match(GenericSqlParser.DECIMAL_VALUE); } break; @@ -3585,7 +3656,7 @@ export class GenericSqlParser extends SQLParserBase { localContext = new DoubleLiteralContext(localContext); this.enterOuterAlt(localContext, 6); { - this.state = 772; + this.state = 788; this.match(GenericSqlParser.DOUBLE_VALUE); } break; @@ -3593,7 +3664,7 @@ export class GenericSqlParser extends SQLParserBase { localContext = new StringLiteralContext(localContext); this.enterOuterAlt(localContext, 7); { - this.state = 773; + this.state = 789; this.match(GenericSqlParser.STRING); } break; @@ -3601,7 +3672,7 @@ export class GenericSqlParser extends SQLParserBase { localContext = new BinaryLiteralContext(localContext); this.enterOuterAlt(localContext, 8); { - this.state = 774; + this.state = 790; this.match(GenericSqlParser.BINARY_LITERAL); } break; @@ -3625,36 +3696,36 @@ export class GenericSqlParser extends SQLParserBase { } public identifier(): IdentifierContext { let localContext = new IdentifierContext(this.context, this.state); - this.enterRule(localContext, 96, GenericSqlParser.RULE_identifier); + this.enterRule(localContext, 98, GenericSqlParser.RULE_identifier); try { - this.state = 782; + this.state = 798; this.errorHandler.sync(this); switch (this.tokenStream.LA(1)) { case GenericSqlParser.IDENTIFIER: this.enterOuterAlt(localContext, 1); { - this.state = 777; + this.state = 793; this.match(GenericSqlParser.IDENTIFIER); } break; case GenericSqlParser.DIGIT_IDENTIFIER: this.enterOuterAlt(localContext, 2); { - this.state = 778; + this.state = 794; this.match(GenericSqlParser.DIGIT_IDENTIFIER); } break; case GenericSqlParser.QUOTED_IDENTIFIER: this.enterOuterAlt(localContext, 3); { - this.state = 779; + this.state = 795; this.match(GenericSqlParser.QUOTED_IDENTIFIER); } break; case GenericSqlParser.BACKQUOTED_IDENTIFIER: this.enterOuterAlt(localContext, 4); { - this.state = 780; + this.state = 796; this.match(GenericSqlParser.BACKQUOTED_IDENTIFIER); } break; @@ -3703,12 +3774,96 @@ export class GenericSqlParser extends SQLParserBase { case GenericSqlParser.KW_VARBINARY: this.enterOuterAlt(localContext, 5); { - this.state = 781; - this.nonReserved(); + this.state = 797; + this.nonReserved(); + } + break; + default: + throw new antlr.NoViableAltException(this); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + localContext.exception = re; + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public qualifiedName(): QualifiedNameContext { + let localContext = new QualifiedNameContext(this.context, this.state); + this.enterRule(localContext, 100, GenericSqlParser.RULE_qualifiedName); + try { + let alternative: number; + this.enterOuterAlt(localContext, 1); + { + this.state = 800; + this.identifier(); + this.state = 805; + this.errorHandler.sync(this); + alternative = this.interpreter.adaptivePredict(this.tokenStream, 96, this.context); + while (alternative !== 2 && alternative !== antlr.ATN.INVALID_ALT_NUMBER) { + if (alternative === 1) { + { + { + this.state = 801; + this.match(GenericSqlParser.T__3); + this.state = 802; + this.identifier(); + } + } + } + this.state = 807; + this.errorHandler.sync(this); + alternative = this.interpreter.adaptivePredict(this.tokenStream, 96, this.context); + } + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + localContext.exception = re; + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public columnRef(): ColumnRefContext { + let localContext = new ColumnRefContext(this.context, this.state); + this.enterRule(localContext, 102, GenericSqlParser.RULE_columnRef); + try { + this.state = 811; + this.errorHandler.sync(this); + switch (this.interpreter.adaptivePredict(this.tokenStream, 97, this.context) ) { + case 1: + this.enterOuterAlt(localContext, 1); + { + this.state = 808; + this.identifier(); + } + break; + case 2: + this.enterOuterAlt(localContext, 2); + { + this.state = 809; + if (!(this.shouldMatchEmpty())) { + throw this.createFailedPredicateException("this.shouldMatchEmpty()"); + } + this.state = 810; + this.emptyColumn(); } break; - default: - throw new antlr.NoViableAltException(this); } } catch (re) { @@ -3725,33 +3880,14 @@ export class GenericSqlParser extends SQLParserBase { } return localContext; } - public qualifiedName(): QualifiedNameContext { - let localContext = new QualifiedNameContext(this.context, this.state); - this.enterRule(localContext, 98, GenericSqlParser.RULE_qualifiedName); + public columnName(): ColumnNameContext { + let localContext = new ColumnNameContext(this.context, this.state); + this.enterRule(localContext, 104, GenericSqlParser.RULE_columnName); try { - let alternative: number; this.enterOuterAlt(localContext, 1); { - this.state = 784; - this.identifier(); - this.state = 789; - this.errorHandler.sync(this); - alternative = this.interpreter.adaptivePredict(this.tokenStream, 94, this.context); - while (alternative !== 2 && alternative !== antlr.ATN.INVALID_ALT_NUMBER) { - if (alternative === 1) { - { - { - this.state = 785; - this.match(GenericSqlParser.T__3); - this.state = 786; - this.identifier(); - } - } - } - this.state = 791; - this.errorHandler.sync(this); - alternative = this.interpreter.adaptivePredict(this.tokenStream, 94, this.context); - } + this.state = 813; + this.qualifiedName(); } } catch (re) { @@ -3768,14 +3904,13 @@ export class GenericSqlParser extends SQLParserBase { } return localContext; } - public columnRef(): ColumnRefContext { - let localContext = new ColumnRefContext(this.context, this.state); - this.enterRule(localContext, 100, GenericSqlParser.RULE_columnRef); + public emptyColumn(): EmptyColumnContext { + let localContext = new EmptyColumnContext(this.context, this.state); + this.enterRule(localContext, 106, GenericSqlParser.RULE_emptyColumn); try { this.enterOuterAlt(localContext, 1); + // tslint:disable-next-line:no-empty { - this.state = 792; - this.identifier(); } } catch (re) { @@ -3794,11 +3929,11 @@ export class GenericSqlParser extends SQLParserBase { } public tableName(): TableNameContext { let localContext = new TableNameContext(this.context, this.state); - this.enterRule(localContext, 102, GenericSqlParser.RULE_tableName); + this.enterRule(localContext, 108, GenericSqlParser.RULE_tableName); try { this.enterOuterAlt(localContext, 1); { - this.state = 794; + this.state = 817; this.qualifiedName(); } } @@ -3818,11 +3953,35 @@ export class GenericSqlParser extends SQLParserBase { } public tableNameCreate(): TableNameCreateContext { let localContext = new TableNameCreateContext(this.context, this.state); - this.enterRule(localContext, 104, GenericSqlParser.RULE_tableNameCreate); + this.enterRule(localContext, 110, GenericSqlParser.RULE_tableNameCreate); + try { + this.enterOuterAlt(localContext, 1); + { + this.state = 819; + this.qualifiedName(); + } + } + catch (re) { + if (re instanceof antlr.RecognitionException) { + localContext.exception = re; + this.errorHandler.reportError(this, re); + this.errorHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localContext; + } + public functionName(): FunctionNameContext { + let localContext = new FunctionNameContext(this.context, this.state); + this.enterRule(localContext, 112, GenericSqlParser.RULE_functionName); try { this.enterOuterAlt(localContext, 1); { - this.state = 796; + this.state = 821; this.qualifiedName(); } } @@ -3842,12 +4001,12 @@ export class GenericSqlParser extends SQLParserBase { } public nonReserved(): NonReservedContext { let localContext = new NonReservedContext(this.context, this.state); - this.enterRule(localContext, 106, GenericSqlParser.RULE_nonReserved); + this.enterRule(localContext, 114, GenericSqlParser.RULE_nonReserved); let _la: number; try { this.enterOuterAlt(localContext, 1); { - this.state = 798; + this.state = 823; _la = this.tokenStream.LA(1); if(!((((_la) & ~0x1F) === 0 && ((1 << _la) & 2939483232) !== 0) || ((((_la - 38)) & ~0x1F) === 0 && ((1 << (_la - 38)) & 509358375) !== 0) || ((((_la - 70)) & ~0x1F) === 0 && ((1 << (_la - 70)) & 3536161) !== 0))) { this.errorHandler.recoverInline(this); @@ -3875,45 +4034,63 @@ export class GenericSqlParser extends SQLParserBase { public override sempred(localContext: antlr.RuleContext | null, ruleIndex: number, predIndex: number): boolean { switch (ruleIndex) { + case 12: + return this.selectItem_sempred(localContext as SelectItemContext, predIndex); case 14: return this.relation_sempred(localContext as RelationContext, predIndex); - case 36: + case 37: return this.booleanExpression_sempred(localContext as BooleanExpressionContext, predIndex); - case 40: + case 41: return this.valueExpression_sempred(localContext as ValueExpressionContext, predIndex); + case 51: + return this.columnRef_sempred(localContext as ColumnRefContext, predIndex); } return true; } - private relation_sempred(localContext: RelationContext | null, predIndex: number): boolean { + private selectItem_sempred(localContext: SelectItemContext | null, predIndex: number): boolean { switch (predIndex) { case 0: - return this.precpred(this.context, 2); + return this.shouldMatchEmpty(); } return true; } - private booleanExpression_sempred(localContext: BooleanExpressionContext | null, predIndex: number): boolean { + private relation_sempred(localContext: RelationContext | null, predIndex: number): boolean { switch (predIndex) { case 1: return this.precpred(this.context, 2); + } + return true; + } + private booleanExpression_sempred(localContext: BooleanExpressionContext | null, predIndex: number): boolean { + switch (predIndex) { case 2: + return this.precpred(this.context, 2); + case 3: return this.precpred(this.context, 1); } return true; } private valueExpression_sempred(localContext: ValueExpressionContext | null, predIndex: number): boolean { switch (predIndex) { - case 3: - return this.precpred(this.context, 3); case 4: - return this.precpred(this.context, 2); + return this.precpred(this.context, 3); case 5: + return this.precpred(this.context, 2); + case 6: return this.precpred(this.context, 1); } return true; } + private columnRef_sempred(localContext: ColumnRefContext | null, predIndex: number): boolean { + switch (predIndex) { + case 7: + return this.shouldMatchEmpty(); + } + return true; + } public static readonly _serializedATN: number[] = [ - 4,1,122,801,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, + 4,1,122,826,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6, 7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7, 13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2, 20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7, @@ -3921,305 +4098,315 @@ export class GenericSqlParser extends SQLParserBase { 33,7,33,2,34,7,34,2,35,7,35,2,36,7,36,2,37,7,37,2,38,7,38,2,39,7, 39,2,40,7,40,2,41,7,41,2,42,7,42,2,43,7,43,2,44,7,44,2,45,7,45,2, 46,7,46,2,47,7,47,2,48,7,48,2,49,7,49,2,50,7,50,2,51,7,51,2,52,7, - 52,2,53,7,53,1,0,5,0,110,8,0,10,0,12,0,113,9,0,1,0,1,0,1,1,1,1,1, - 2,1,2,3,2,121,8,2,1,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,130,8,3,1,4,3, - 4,133,8,4,1,4,1,4,1,5,1,5,3,5,139,8,5,1,5,1,5,1,5,5,5,144,8,5,10, - 5,12,5,147,9,5,1,6,1,6,1,6,1,6,1,6,1,6,1,7,1,7,1,7,3,7,158,8,7,1, - 7,5,7,161,8,7,10,7,12,7,164,9,7,1,8,1,8,1,9,1,9,1,9,1,9,1,9,3,9, - 173,8,9,1,10,1,10,3,10,177,8,10,1,10,1,10,1,10,5,10,182,8,10,10, - 10,12,10,185,9,10,1,10,3,10,188,8,10,1,10,3,10,191,8,10,1,10,3,10, - 194,8,10,1,10,3,10,197,8,10,1,10,3,10,200,8,10,1,10,3,10,203,8,10, - 1,11,1,11,1,12,1,12,3,12,209,8,12,1,12,3,12,212,8,12,1,12,1,12,1, - 12,1,12,1,12,3,12,219,8,12,1,13,1,13,1,13,1,13,5,13,225,8,13,10, - 13,12,13,228,9,13,1,14,1,14,1,14,1,14,1,14,1,14,1,14,1,14,1,14,1, - 14,5,14,240,8,14,10,14,12,14,243,9,14,1,15,3,15,246,8,15,1,15,1, - 15,3,15,250,8,15,1,15,1,15,3,15,254,8,15,1,15,1,15,3,15,258,8,15, - 1,15,3,15,261,8,15,1,16,1,16,3,16,265,8,16,1,16,3,16,268,8,16,1, - 17,1,17,1,17,1,17,1,17,3,17,275,8,17,1,18,1,18,1,18,1,19,1,19,1, - 19,3,19,283,8,19,1,19,1,19,1,19,5,19,288,8,19,10,19,12,19,291,9, - 19,1,20,1,20,1,20,1,21,1,21,1,21,1,21,1,21,5,21,301,8,21,10,21,12, - 21,304,9,21,1,22,1,22,3,22,308,8,22,1,22,1,22,3,22,312,8,22,1,23, - 1,23,1,23,1,23,3,23,318,8,23,1,24,1,24,1,24,1,24,3,24,324,8,24,1, - 24,1,24,1,25,1,25,1,25,1,25,5,25,332,8,25,10,25,12,25,335,9,25,1, - 25,1,25,1,26,1,26,1,26,1,26,1,26,1,26,5,26,345,8,26,10,26,12,26, - 348,9,26,1,26,3,26,351,8,26,1,27,1,27,1,27,1,27,1,28,1,28,1,28,1, - 28,3,28,361,8,28,1,29,1,29,1,29,1,29,1,29,3,29,368,8,29,1,29,1,29, - 1,29,1,29,1,29,5,29,375,8,29,10,29,12,29,378,9,29,1,29,1,29,1,29, - 3,29,383,8,29,1,30,1,30,3,30,387,8,30,1,31,1,31,1,31,1,31,3,31,393, - 8,31,1,31,1,31,3,31,397,8,31,1,31,1,31,3,31,401,8,31,1,32,1,32,3, - 32,405,8,32,1,32,1,32,1,32,1,32,1,32,1,32,5,32,413,8,32,10,32,12, - 32,416,9,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,5,32,425,8,32,10, - 32,12,32,428,9,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1, - 32,1,32,1,32,1,32,5,32,443,8,32,10,32,12,32,446,9,32,1,32,1,32,1, - 32,1,32,1,32,1,32,1,32,5,32,455,8,32,10,32,12,32,458,9,32,1,32,1, - 32,3,32,462,8,32,1,33,1,33,1,33,1,33,3,33,468,8,33,1,33,1,33,1,33, - 1,33,1,33,1,33,3,33,476,8,33,1,33,1,33,1,33,1,33,1,33,3,33,483,8, - 33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1, - 33,1,33,1,33,1,33,1,33,3,33,502,8,33,1,34,1,34,1,34,1,34,3,34,508, - 8,34,1,34,1,34,1,35,1,35,1,36,1,36,1,36,1,36,3,36,518,8,36,1,36, - 1,36,1,36,1,36,1,36,1,36,5,36,526,8,36,10,36,12,36,529,9,36,1,37, - 1,37,3,37,533,8,37,1,38,1,38,1,38,1,38,3,38,539,8,38,1,38,1,38,1, - 38,1,38,1,38,5,38,546,8,38,10,38,12,38,549,9,38,1,38,1,38,1,38,3, - 38,554,8,38,1,38,1,38,1,38,1,38,1,38,1,38,3,38,562,8,38,1,38,1,38, - 1,38,1,38,1,38,1,38,3,38,570,8,38,1,38,1,38,1,38,1,38,3,38,576,8, - 38,1,38,1,38,3,38,580,8,38,1,38,1,38,1,38,3,38,585,8,38,1,38,1,38, - 1,38,3,38,590,8,38,1,39,1,39,1,40,1,40,1,40,1,40,3,40,598,8,40,1, - 40,1,40,1,40,1,40,1,40,1,40,1,40,1,40,1,40,5,40,609,8,40,10,40,12, - 40,612,9,40,1,41,1,41,1,41,1,41,3,41,618,8,41,1,41,1,41,1,41,5,41, - 623,8,41,10,41,12,41,626,9,41,3,41,628,8,41,1,41,1,41,1,41,1,41, - 4,41,634,8,41,11,41,12,41,635,1,41,1,41,3,41,640,8,41,1,41,1,41, - 1,41,1,41,1,41,4,41,647,8,41,11,41,12,41,648,1,41,1,41,3,41,653, - 8,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41, - 1,41,1,41,5,41,669,8,41,10,41,12,41,672,9,41,1,41,1,41,1,41,1,41, - 1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41, - 1,41,1,41,1,41,3,41,694,8,41,1,42,1,42,1,42,1,42,1,42,1,43,1,43, - 1,43,1,43,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44, - 1,44,1,44,3,44,718,8,44,1,44,3,44,721,8,44,1,44,1,44,1,44,1,44,1, - 44,3,44,728,8,44,1,44,3,44,731,8,44,1,44,1,44,1,44,1,44,3,44,737, - 8,44,1,44,1,44,1,44,1,44,3,44,743,8,44,1,44,1,44,1,44,1,44,1,44, - 1,44,3,44,751,8,44,1,45,1,45,1,45,1,45,5,45,757,8,45,10,45,12,45, - 760,9,45,1,45,1,45,1,46,1,46,1,46,1,46,1,47,1,47,1,47,1,47,1,47, - 1,47,1,47,1,47,3,47,776,8,47,1,48,1,48,1,48,1,48,1,48,3,48,783,8, - 48,1,49,1,49,1,49,5,49,788,8,49,10,49,12,49,791,9,49,1,50,1,50,1, - 51,1,51,1,52,1,52,1,53,1,53,1,53,0,3,28,72,80,54,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,92,94,96,98,100, - 102,104,106,0,8,3,0,36,36,52,52,87,87,2,0,6,6,30,30,2,0,10,10,29, - 29,2,0,39,39,57,57,1,0,95,100,1,0,101,102,1,0,103,105,22,0,5,6,10, - 10,12,15,18,18,20,21,24,27,29,29,31,31,38,40,43,43,46,46,50,51,56, - 58,60,60,63,66,70,70,75,75,78,78,80,80,82,86,88,88,90,91,895,0,111, - 1,0,0,0,2,116,1,0,0,0,4,118,1,0,0,0,6,129,1,0,0,0,8,132,1,0,0,0, - 10,136,1,0,0,0,12,148,1,0,0,0,14,154,1,0,0,0,16,165,1,0,0,0,18,172, - 1,0,0,0,20,174,1,0,0,0,22,204,1,0,0,0,24,218,1,0,0,0,26,220,1,0, - 0,0,28,229,1,0,0,0,30,260,1,0,0,0,32,262,1,0,0,0,34,274,1,0,0,0, - 36,276,1,0,0,0,38,279,1,0,0,0,40,292,1,0,0,0,42,295,1,0,0,0,44,305, - 1,0,0,0,46,313,1,0,0,0,48,319,1,0,0,0,50,327,1,0,0,0,52,338,1,0, - 0,0,54,352,1,0,0,0,56,356,1,0,0,0,58,362,1,0,0,0,60,386,1,0,0,0, - 62,388,1,0,0,0,64,404,1,0,0,0,66,463,1,0,0,0,68,503,1,0,0,0,70,511, - 1,0,0,0,72,517,1,0,0,0,74,530,1,0,0,0,76,589,1,0,0,0,78,591,1,0, - 0,0,80,597,1,0,0,0,82,693,1,0,0,0,84,695,1,0,0,0,86,700,1,0,0,0, - 88,750,1,0,0,0,90,752,1,0,0,0,92,763,1,0,0,0,94,775,1,0,0,0,96,782, - 1,0,0,0,98,784,1,0,0,0,100,792,1,0,0,0,102,794,1,0,0,0,104,796,1, - 0,0,0,106,798,1,0,0,0,108,110,3,2,1,0,109,108,1,0,0,0,110,113,1, - 0,0,0,111,109,1,0,0,0,111,112,1,0,0,0,112,114,1,0,0,0,113,111,1, - 0,0,0,114,115,5,0,0,1,115,1,1,0,0,0,116,117,3,4,2,0,117,3,1,0,0, - 0,118,120,3,6,3,0,119,121,5,108,0,0,120,119,1,0,0,0,120,121,1,0, - 0,0,121,5,1,0,0,0,122,130,3,8,4,0,123,130,3,48,24,0,124,130,3,52, - 26,0,125,130,3,56,28,0,126,130,3,58,29,0,127,130,3,66,33,0,128,130, - 3,68,34,0,129,122,1,0,0,0,129,123,1,0,0,0,129,124,1,0,0,0,129,125, - 1,0,0,0,129,126,1,0,0,0,129,127,1,0,0,0,129,128,1,0,0,0,130,7,1, - 0,0,0,131,133,3,10,5,0,132,131,1,0,0,0,132,133,1,0,0,0,133,134,1, - 0,0,0,134,135,3,14,7,0,135,9,1,0,0,0,136,138,5,94,0,0,137,139,5, - 72,0,0,138,137,1,0,0,0,138,139,1,0,0,0,139,140,1,0,0,0,140,145,3, - 12,6,0,141,142,5,1,0,0,142,144,3,12,6,0,143,141,1,0,0,0,144,147, - 1,0,0,0,145,143,1,0,0,0,145,146,1,0,0,0,146,11,1,0,0,0,147,145,1, - 0,0,0,148,149,3,96,48,0,149,150,5,9,0,0,150,151,5,2,0,0,151,152, - 3,8,4,0,152,153,5,3,0,0,153,13,1,0,0,0,154,162,3,16,8,0,155,157, - 7,0,0,0,156,158,5,6,0,0,157,156,1,0,0,0,157,158,1,0,0,0,158,159, - 1,0,0,0,159,161,3,16,8,0,160,155,1,0,0,0,161,164,1,0,0,0,162,160, - 1,0,0,0,162,163,1,0,0,0,163,15,1,0,0,0,164,162,1,0,0,0,165,166,3, - 18,9,0,166,17,1,0,0,0,167,173,3,20,10,0,168,169,5,2,0,0,169,170, - 3,8,4,0,170,171,5,3,0,0,171,173,1,0,0,0,172,167,1,0,0,0,172,168, - 1,0,0,0,173,19,1,0,0,0,174,176,5,76,0,0,175,177,3,22,11,0,176,175, - 1,0,0,0,176,177,1,0,0,0,177,178,1,0,0,0,178,183,3,24,12,0,179,180, - 5,1,0,0,180,182,3,24,12,0,181,179,1,0,0,0,182,185,1,0,0,0,183,181, - 1,0,0,0,183,184,1,0,0,0,184,187,1,0,0,0,185,183,1,0,0,0,186,188, - 3,26,13,0,187,186,1,0,0,0,187,188,1,0,0,0,188,190,1,0,0,0,189,191, - 3,36,18,0,190,189,1,0,0,0,190,191,1,0,0,0,191,193,1,0,0,0,192,194, - 3,38,19,0,193,192,1,0,0,0,193,194,1,0,0,0,194,196,1,0,0,0,195,197, - 3,40,20,0,196,195,1,0,0,0,196,197,1,0,0,0,197,199,1,0,0,0,198,200, - 3,42,21,0,199,198,1,0,0,0,199,200,1,0,0,0,200,202,1,0,0,0,201,203, - 3,46,23,0,202,201,1,0,0,0,202,203,1,0,0,0,203,21,1,0,0,0,204,205, - 7,1,0,0,205,23,1,0,0,0,206,211,3,70,35,0,207,209,5,9,0,0,208,207, - 1,0,0,0,208,209,1,0,0,0,209,210,1,0,0,0,210,212,3,96,48,0,211,208, - 1,0,0,0,211,212,1,0,0,0,212,219,1,0,0,0,213,214,3,98,49,0,214,215, - 5,4,0,0,215,216,5,103,0,0,216,219,1,0,0,0,217,219,5,103,0,0,218, - 206,1,0,0,0,218,213,1,0,0,0,218,217,1,0,0,0,219,25,1,0,0,0,220,221, - 5,42,0,0,221,226,3,28,14,0,222,223,5,1,0,0,223,225,3,28,14,0,224, - 222,1,0,0,0,225,228,1,0,0,0,226,224,1,0,0,0,226,227,1,0,0,0,227, - 27,1,0,0,0,228,226,1,0,0,0,229,230,6,14,-1,0,230,231,3,32,16,0,231, - 241,1,0,0,0,232,233,10,2,0,0,233,234,3,30,15,0,234,235,5,55,0,0, - 235,236,3,28,14,0,236,237,5,67,0,0,237,238,3,70,35,0,238,240,1,0, - 0,0,239,232,1,0,0,0,240,243,1,0,0,0,241,239,1,0,0,0,241,242,1,0, - 0,0,242,29,1,0,0,0,243,241,1,0,0,0,244,246,5,48,0,0,245,244,1,0, - 0,0,245,246,1,0,0,0,246,261,1,0,0,0,247,249,5,58,0,0,248,250,5,70, - 0,0,249,248,1,0,0,0,249,250,1,0,0,0,250,261,1,0,0,0,251,253,5,75, - 0,0,252,254,5,70,0,0,253,252,1,0,0,0,253,254,1,0,0,0,254,261,1,0, - 0,0,255,257,5,43,0,0,256,258,5,70,0,0,257,256,1,0,0,0,257,258,1, - 0,0,0,258,261,1,0,0,0,259,261,5,24,0,0,260,245,1,0,0,0,260,247,1, - 0,0,0,260,251,1,0,0,0,260,255,1,0,0,0,260,259,1,0,0,0,261,31,1,0, - 0,0,262,267,3,34,17,0,263,265,5,9,0,0,264,263,1,0,0,0,264,265,1, - 0,0,0,265,266,1,0,0,0,266,268,3,96,48,0,267,264,1,0,0,0,267,268, - 1,0,0,0,268,33,1,0,0,0,269,275,3,102,51,0,270,271,5,2,0,0,271,272, - 3,8,4,0,272,273,5,3,0,0,273,275,1,0,0,0,274,269,1,0,0,0,274,270, - 1,0,0,0,275,35,1,0,0,0,276,277,5,93,0,0,277,278,3,70,35,0,278,37, - 1,0,0,0,279,280,5,44,0,0,280,282,5,15,0,0,281,283,3,22,11,0,282, - 281,1,0,0,0,282,283,1,0,0,0,283,284,1,0,0,0,284,289,3,70,35,0,285, - 286,5,1,0,0,286,288,3,70,35,0,287,285,1,0,0,0,288,291,1,0,0,0,289, - 287,1,0,0,0,289,290,1,0,0,0,290,39,1,0,0,0,291,289,1,0,0,0,292,293, - 5,45,0,0,293,294,3,70,35,0,294,41,1,0,0,0,295,296,5,69,0,0,296,297, - 5,15,0,0,297,302,3,44,22,0,298,299,5,1,0,0,299,301,3,44,22,0,300, - 298,1,0,0,0,301,304,1,0,0,0,302,300,1,0,0,0,302,303,1,0,0,0,303, - 43,1,0,0,0,304,302,1,0,0,0,305,307,3,70,35,0,306,308,7,2,0,0,307, - 306,1,0,0,0,307,308,1,0,0,0,308,311,1,0,0,0,309,310,5,64,0,0,310, - 312,7,3,0,0,311,309,1,0,0,0,311,312,1,0,0,0,312,45,1,0,0,0,313,314, - 5,60,0,0,314,317,3,70,35,0,315,316,5,66,0,0,316,318,3,70,35,0,317, - 315,1,0,0,0,317,318,1,0,0,0,318,47,1,0,0,0,319,320,5,49,0,0,320, - 321,5,53,0,0,321,323,3,102,51,0,322,324,3,50,25,0,323,322,1,0,0, - 0,323,324,1,0,0,0,324,325,1,0,0,0,325,326,3,8,4,0,326,49,1,0,0,0, - 327,328,5,2,0,0,328,333,3,100,50,0,329,330,5,1,0,0,330,332,3,100, - 50,0,331,329,1,0,0,0,332,335,1,0,0,0,333,331,1,0,0,0,333,334,1,0, - 0,0,334,336,1,0,0,0,335,333,1,0,0,0,336,337,5,3,0,0,337,51,1,0,0, - 0,338,339,5,89,0,0,339,340,3,102,51,0,340,341,5,77,0,0,341,346,3, - 54,27,0,342,343,5,1,0,0,343,345,3,54,27,0,344,342,1,0,0,0,345,348, - 1,0,0,0,346,344,1,0,0,0,346,347,1,0,0,0,347,350,1,0,0,0,348,346, - 1,0,0,0,349,351,3,36,18,0,350,349,1,0,0,0,350,351,1,0,0,0,351,53, - 1,0,0,0,352,353,3,100,50,0,353,354,5,95,0,0,354,355,3,70,35,0,355, - 55,1,0,0,0,356,357,5,28,0,0,357,358,5,42,0,0,358,360,3,102,51,0, - 359,361,3,36,18,0,360,359,1,0,0,0,360,361,1,0,0,0,361,57,1,0,0,0, - 362,363,5,23,0,0,363,367,5,79,0,0,364,365,5,46,0,0,365,366,5,61, - 0,0,366,368,5,37,0,0,367,364,1,0,0,0,367,368,1,0,0,0,368,369,1,0, - 0,0,369,370,3,104,52,0,370,371,5,2,0,0,371,376,3,60,30,0,372,373, - 5,1,0,0,373,375,3,60,30,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,379,1,0,0,0,378,376,1,0,0,0,379,382, - 5,3,0,0,380,381,5,94,0,0,381,383,3,90,45,0,382,380,1,0,0,0,382,383, - 1,0,0,0,383,59,1,0,0,0,384,387,3,62,31,0,385,387,3,64,32,0,386,384, - 1,0,0,0,386,385,1,0,0,0,387,61,1,0,0,0,388,389,3,100,50,0,389,392, - 3,88,44,0,390,391,5,61,0,0,391,393,5,62,0,0,392,390,1,0,0,0,392, - 393,1,0,0,0,393,396,1,0,0,0,394,395,5,27,0,0,395,397,3,70,35,0,396, - 394,1,0,0,0,396,397,1,0,0,0,397,400,1,0,0,0,398,399,5,71,0,0,399, - 401,5,56,0,0,400,398,1,0,0,0,400,401,1,0,0,0,401,63,1,0,0,0,402, - 403,5,22,0,0,403,405,3,96,48,0,404,402,1,0,0,0,404,405,1,0,0,0,405, - 461,1,0,0,0,406,407,5,71,0,0,407,408,5,56,0,0,408,409,5,2,0,0,409, - 414,3,100,50,0,410,411,5,1,0,0,411,413,3,100,50,0,412,410,1,0,0, - 0,413,416,1,0,0,0,414,412,1,0,0,0,414,415,1,0,0,0,415,417,1,0,0, - 0,416,414,1,0,0,0,417,418,5,3,0,0,418,462,1,0,0,0,419,420,5,88,0, - 0,420,421,5,2,0,0,421,426,3,100,50,0,422,423,5,1,0,0,423,425,3,100, - 50,0,424,422,1,0,0,0,425,428,1,0,0,0,426,424,1,0,0,0,426,427,1,0, - 0,0,427,429,1,0,0,0,428,426,1,0,0,0,429,430,5,3,0,0,430,462,1,0, - 0,0,431,432,5,19,0,0,432,433,5,2,0,0,433,434,3,70,35,0,434,435,5, - 3,0,0,435,462,1,0,0,0,436,437,5,41,0,0,437,438,5,56,0,0,438,439, - 5,2,0,0,439,444,3,100,50,0,440,441,5,1,0,0,441,443,3,100,50,0,442, - 440,1,0,0,0,443,446,1,0,0,0,444,442,1,0,0,0,444,445,1,0,0,0,445, - 447,1,0,0,0,446,444,1,0,0,0,447,448,5,3,0,0,448,449,5,73,0,0,449, - 450,3,102,51,0,450,451,5,2,0,0,451,456,3,100,50,0,452,453,5,1,0, - 0,453,455,3,100,50,0,454,452,1,0,0,0,455,458,1,0,0,0,456,454,1,0, - 0,0,456,457,1,0,0,0,457,459,1,0,0,0,458,456,1,0,0,0,459,460,5,3, - 0,0,460,462,1,0,0,0,461,406,1,0,0,0,461,419,1,0,0,0,461,431,1,0, - 0,0,461,436,1,0,0,0,462,65,1,0,0,0,463,464,5,7,0,0,464,467,5,79, - 0,0,465,466,5,46,0,0,466,468,5,37,0,0,467,465,1,0,0,0,467,468,1, - 0,0,0,468,469,1,0,0,0,469,501,3,102,51,0,470,471,5,5,0,0,471,475, - 5,21,0,0,472,473,5,46,0,0,473,474,5,61,0,0,474,476,5,37,0,0,475, - 472,1,0,0,0,475,476,1,0,0,0,476,477,1,0,0,0,477,502,3,62,31,0,478, - 479,5,32,0,0,479,482,5,21,0,0,480,481,5,46,0,0,481,483,5,37,0,0, - 482,480,1,0,0,0,482,483,1,0,0,0,483,484,1,0,0,0,484,502,3,100,50, - 0,485,486,5,74,0,0,486,487,5,85,0,0,487,502,3,104,52,0,488,489,5, - 7,0,0,489,490,5,21,0,0,490,491,3,100,50,0,491,492,5,77,0,0,492,493, - 5,27,0,0,493,494,3,70,35,0,494,502,1,0,0,0,495,496,5,7,0,0,496,497, - 5,21,0,0,497,498,3,100,50,0,498,499,5,32,0,0,499,500,5,27,0,0,500, - 502,1,0,0,0,501,470,1,0,0,0,501,478,1,0,0,0,501,485,1,0,0,0,501, - 488,1,0,0,0,501,495,1,0,0,0,502,67,1,0,0,0,503,504,5,32,0,0,504, - 507,5,79,0,0,505,506,5,46,0,0,506,508,5,37,0,0,507,505,1,0,0,0,507, - 508,1,0,0,0,508,509,1,0,0,0,509,510,3,102,51,0,510,69,1,0,0,0,511, - 512,3,72,36,0,512,71,1,0,0,0,513,514,6,36,-1,0,514,518,3,74,37,0, - 515,516,5,61,0,0,516,518,3,72,36,3,517,513,1,0,0,0,517,515,1,0,0, - 0,518,527,1,0,0,0,519,520,10,2,0,0,520,521,5,8,0,0,521,526,3,72, - 36,3,522,523,10,1,0,0,523,524,5,68,0,0,524,526,3,72,36,2,525,519, - 1,0,0,0,525,522,1,0,0,0,526,529,1,0,0,0,527,525,1,0,0,0,527,528, - 1,0,0,0,528,73,1,0,0,0,529,527,1,0,0,0,530,532,3,80,40,0,531,533, - 3,76,38,0,532,531,1,0,0,0,532,533,1,0,0,0,533,75,1,0,0,0,534,535, - 3,78,39,0,535,536,3,80,40,0,536,590,1,0,0,0,537,539,5,61,0,0,538, - 537,1,0,0,0,538,539,1,0,0,0,539,540,1,0,0,0,540,541,5,47,0,0,541, - 542,5,2,0,0,542,547,3,70,35,0,543,544,5,1,0,0,544,546,3,70,35,0, - 545,543,1,0,0,0,546,549,1,0,0,0,547,545,1,0,0,0,547,548,1,0,0,0, - 548,550,1,0,0,0,549,547,1,0,0,0,550,551,5,3,0,0,551,590,1,0,0,0, - 552,554,5,61,0,0,553,552,1,0,0,0,553,554,1,0,0,0,554,555,1,0,0,0, - 555,556,5,47,0,0,556,557,5,2,0,0,557,558,3,8,4,0,558,559,5,3,0,0, - 559,590,1,0,0,0,560,562,5,61,0,0,561,560,1,0,0,0,561,562,1,0,0,0, - 562,563,1,0,0,0,563,564,5,11,0,0,564,565,3,80,40,0,565,566,5,8,0, - 0,566,567,3,80,40,0,567,590,1,0,0,0,568,570,5,61,0,0,569,568,1,0, - 0,0,569,570,1,0,0,0,570,571,1,0,0,0,571,572,5,59,0,0,572,575,3,80, - 40,0,573,574,5,35,0,0,574,576,3,80,40,0,575,573,1,0,0,0,575,576, - 1,0,0,0,576,590,1,0,0,0,577,579,5,54,0,0,578,580,5,61,0,0,579,578, - 1,0,0,0,579,580,1,0,0,0,580,581,1,0,0,0,581,590,5,62,0,0,582,584, - 5,54,0,0,583,585,5,61,0,0,584,583,1,0,0,0,584,585,1,0,0,0,585,586, - 1,0,0,0,586,587,5,30,0,0,587,588,5,42,0,0,588,590,3,80,40,0,589, - 534,1,0,0,0,589,538,1,0,0,0,589,553,1,0,0,0,589,561,1,0,0,0,589, - 569,1,0,0,0,589,577,1,0,0,0,589,582,1,0,0,0,590,77,1,0,0,0,591,592, - 7,4,0,0,592,79,1,0,0,0,593,594,6,40,-1,0,594,598,3,82,41,0,595,596, - 7,5,0,0,596,598,3,80,40,4,597,593,1,0,0,0,597,595,1,0,0,0,598,610, - 1,0,0,0,599,600,10,3,0,0,600,601,7,6,0,0,601,609,3,80,40,4,602,603, - 10,2,0,0,603,604,7,5,0,0,604,609,3,80,40,3,605,606,10,1,0,0,606, - 607,5,106,0,0,607,609,3,80,40,2,608,599,1,0,0,0,608,602,1,0,0,0, - 608,605,1,0,0,0,609,612,1,0,0,0,610,608,1,0,0,0,610,611,1,0,0,0, - 611,81,1,0,0,0,612,610,1,0,0,0,613,694,3,94,47,0,614,615,3,98,49, - 0,615,627,5,2,0,0,616,618,3,22,11,0,617,616,1,0,0,0,617,618,1,0, - 0,0,618,619,1,0,0,0,619,624,3,70,35,0,620,621,5,1,0,0,621,623,3, - 70,35,0,622,620,1,0,0,0,623,626,1,0,0,0,624,622,1,0,0,0,624,625, - 1,0,0,0,625,628,1,0,0,0,626,624,1,0,0,0,627,617,1,0,0,0,627,628, - 1,0,0,0,628,629,1,0,0,0,629,630,5,3,0,0,630,694,1,0,0,0,631,633, - 5,16,0,0,632,634,3,84,42,0,633,632,1,0,0,0,634,635,1,0,0,0,635,633, - 1,0,0,0,635,636,1,0,0,0,636,639,1,0,0,0,637,638,5,33,0,0,638,640, - 3,70,35,0,639,637,1,0,0,0,639,640,1,0,0,0,640,641,1,0,0,0,641,642, - 5,34,0,0,642,694,1,0,0,0,643,644,5,16,0,0,644,646,3,70,35,0,645, - 647,3,84,42,0,646,645,1,0,0,0,647,648,1,0,0,0,648,646,1,0,0,0,648, - 649,1,0,0,0,649,652,1,0,0,0,650,651,5,33,0,0,651,653,3,70,35,0,652, - 650,1,0,0,0,652,653,1,0,0,0,653,654,1,0,0,0,654,655,5,34,0,0,655, - 694,1,0,0,0,656,657,5,17,0,0,657,658,5,2,0,0,658,659,3,70,35,0,659, - 660,5,9,0,0,660,661,3,88,44,0,661,662,5,3,0,0,662,694,1,0,0,0,663, - 664,5,20,0,0,664,665,5,2,0,0,665,670,3,70,35,0,666,667,5,1,0,0,667, - 669,3,70,35,0,668,666,1,0,0,0,669,672,1,0,0,0,670,668,1,0,0,0,670, - 671,1,0,0,0,671,673,1,0,0,0,672,670,1,0,0,0,673,674,5,3,0,0,674, - 694,1,0,0,0,675,676,5,63,0,0,676,677,5,2,0,0,677,678,3,80,40,0,678, - 679,5,1,0,0,679,680,3,80,40,0,680,681,5,3,0,0,681,694,1,0,0,0,682, - 683,5,2,0,0,683,684,3,70,35,0,684,685,5,3,0,0,685,694,1,0,0,0,686, - 687,5,37,0,0,687,688,5,2,0,0,688,689,3,8,4,0,689,690,5,3,0,0,690, - 694,1,0,0,0,691,694,3,86,43,0,692,694,3,98,49,0,693,613,1,0,0,0, - 693,614,1,0,0,0,693,631,1,0,0,0,693,643,1,0,0,0,693,656,1,0,0,0, - 693,663,1,0,0,0,693,675,1,0,0,0,693,682,1,0,0,0,693,686,1,0,0,0, - 693,691,1,0,0,0,693,692,1,0,0,0,694,83,1,0,0,0,695,696,5,92,0,0, - 696,697,3,70,35,0,697,698,5,81,0,0,698,699,3,70,35,0,699,85,1,0, - 0,0,700,701,5,2,0,0,701,702,3,8,4,0,702,703,5,3,0,0,703,87,1,0,0, - 0,704,751,5,14,0,0,705,751,5,84,0,0,706,751,5,78,0,0,707,751,5,50, - 0,0,708,751,5,51,0,0,709,751,5,12,0,0,710,751,5,40,0,0,711,751,5, - 31,0,0,712,720,5,26,0,0,713,714,5,2,0,0,714,717,5,111,0,0,715,716, - 5,1,0,0,716,718,5,111,0,0,717,715,1,0,0,0,717,718,1,0,0,0,718,719, - 1,0,0,0,719,721,5,3,0,0,720,713,1,0,0,0,720,721,1,0,0,0,721,751, - 1,0,0,0,722,730,5,65,0,0,723,724,5,2,0,0,724,727,5,111,0,0,725,726, - 5,1,0,0,726,728,5,111,0,0,727,725,1,0,0,0,727,728,1,0,0,0,728,729, - 1,0,0,0,729,731,5,3,0,0,730,723,1,0,0,0,730,731,1,0,0,0,731,751, - 1,0,0,0,732,736,5,90,0,0,733,734,5,2,0,0,734,735,5,111,0,0,735,737, - 5,3,0,0,736,733,1,0,0,0,736,737,1,0,0,0,737,751,1,0,0,0,738,742, - 5,18,0,0,739,740,5,2,0,0,740,741,5,111,0,0,741,743,5,3,0,0,742,739, - 1,0,0,0,742,743,1,0,0,0,743,751,1,0,0,0,744,751,5,80,0,0,745,751, - 5,25,0,0,746,751,5,82,0,0,747,751,5,83,0,0,748,751,5,13,0,0,749, - 751,5,91,0,0,750,704,1,0,0,0,750,705,1,0,0,0,750,706,1,0,0,0,750, - 707,1,0,0,0,750,708,1,0,0,0,750,709,1,0,0,0,750,710,1,0,0,0,750, - 711,1,0,0,0,750,712,1,0,0,0,750,722,1,0,0,0,750,732,1,0,0,0,750, - 738,1,0,0,0,750,744,1,0,0,0,750,745,1,0,0,0,750,746,1,0,0,0,750, - 747,1,0,0,0,750,748,1,0,0,0,750,749,1,0,0,0,751,89,1,0,0,0,752,753, - 5,2,0,0,753,758,3,92,46,0,754,755,5,1,0,0,755,757,3,92,46,0,756, - 754,1,0,0,0,757,760,1,0,0,0,758,756,1,0,0,0,758,759,1,0,0,0,759, - 761,1,0,0,0,760,758,1,0,0,0,761,762,5,3,0,0,762,91,1,0,0,0,763,764, - 3,96,48,0,764,765,5,95,0,0,765,766,3,94,47,0,766,93,1,0,0,0,767, - 776,5,62,0,0,768,776,5,86,0,0,769,776,5,38,0,0,770,776,5,111,0,0, - 771,776,5,112,0,0,772,776,5,113,0,0,773,776,5,109,0,0,774,776,5, - 110,0,0,775,767,1,0,0,0,775,768,1,0,0,0,775,769,1,0,0,0,775,770, - 1,0,0,0,775,771,1,0,0,0,775,772,1,0,0,0,775,773,1,0,0,0,775,774, - 1,0,0,0,776,95,1,0,0,0,777,783,5,114,0,0,778,783,5,115,0,0,779,783, - 5,116,0,0,780,783,5,117,0,0,781,783,3,106,53,0,782,777,1,0,0,0,782, - 778,1,0,0,0,782,779,1,0,0,0,782,780,1,0,0,0,782,781,1,0,0,0,783, - 97,1,0,0,0,784,789,3,96,48,0,785,786,5,4,0,0,786,788,3,96,48,0,787, - 785,1,0,0,0,788,791,1,0,0,0,789,787,1,0,0,0,789,790,1,0,0,0,790, - 99,1,0,0,0,791,789,1,0,0,0,792,793,3,96,48,0,793,101,1,0,0,0,794, - 795,3,98,49,0,795,103,1,0,0,0,796,797,3,98,49,0,797,105,1,0,0,0, - 798,799,7,7,0,0,799,107,1,0,0,0,95,111,120,129,132,138,145,157,162, - 172,176,183,187,190,193,196,199,202,208,211,218,226,241,245,249, - 253,257,260,264,267,274,282,289,302,307,311,317,323,333,346,350, - 360,367,376,382,386,392,396,400,404,414,426,444,456,461,467,475, - 482,501,507,517,525,527,532,538,547,553,561,569,575,579,584,589, - 597,608,610,617,624,627,635,639,648,652,670,693,717,720,727,730, - 736,742,750,758,775,782,789 + 52,2,53,7,53,2,54,7,54,2,55,7,55,2,56,7,56,2,57,7,57,1,0,5,0,118, + 8,0,10,0,12,0,121,9,0,1,0,1,0,1,1,1,1,1,2,1,2,3,2,129,8,2,1,3,1, + 3,1,3,1,3,1,3,1,3,1,3,3,3,138,8,3,1,4,3,4,141,8,4,1,4,1,4,1,5,1, + 5,3,5,147,8,5,1,5,1,5,1,5,5,5,152,8,5,10,5,12,5,155,9,5,1,6,1,6, + 1,6,1,6,1,6,1,6,1,7,1,7,1,7,3,7,166,8,7,1,7,5,7,169,8,7,10,7,12, + 7,172,9,7,1,8,1,8,1,9,1,9,1,9,1,9,1,9,3,9,181,8,9,1,10,1,10,3,10, + 185,8,10,1,10,1,10,1,10,5,10,190,8,10,10,10,12,10,193,9,10,1,10, + 3,10,196,8,10,1,10,3,10,199,8,10,1,10,3,10,202,8,10,1,10,3,10,205, + 8,10,1,10,3,10,208,8,10,1,10,3,10,211,8,10,1,11,1,11,1,12,1,12,3, + 12,217,8,12,1,12,3,12,220,8,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12, + 3,12,229,8,12,1,13,1,13,1,13,1,13,5,13,235,8,13,10,13,12,13,238, + 9,13,1,14,1,14,1,14,1,14,1,14,1,14,1,14,1,14,1,14,1,14,5,14,250, + 8,14,10,14,12,14,253,9,14,1,15,3,15,256,8,15,1,15,1,15,3,15,260, + 8,15,1,15,1,15,3,15,264,8,15,1,15,1,15,3,15,268,8,15,1,15,3,15,271, + 8,15,1,16,1,16,3,16,275,8,16,1,16,3,16,278,8,16,1,17,1,17,1,17,1, + 17,1,17,3,17,285,8,17,1,18,1,18,1,18,3,18,290,8,18,1,19,1,19,1,19, + 3,19,295,8,19,1,19,1,19,1,19,5,19,300,8,19,10,19,12,19,303,9,19, + 1,20,1,20,1,20,3,20,308,8,20,1,21,1,21,1,21,1,21,1,21,5,21,315,8, + 21,10,21,12,21,318,9,21,1,22,1,22,3,22,322,8,22,1,22,1,22,3,22,326, + 8,22,1,23,1,23,1,23,1,23,3,23,332,8,23,1,24,1,24,1,24,1,24,3,24, + 338,8,24,1,24,1,24,1,25,1,25,1,25,1,25,5,25,346,8,25,10,25,12,25, + 349,9,25,1,25,1,25,1,26,1,26,1,26,1,26,1,26,1,26,5,26,359,8,26,10, + 26,12,26,362,9,26,1,26,3,26,365,8,26,1,27,1,27,1,27,1,27,1,28,1, + 28,1,28,1,28,3,28,375,8,28,1,29,1,29,1,29,1,29,1,29,3,29,382,8,29, + 1,29,1,29,1,29,1,29,1,29,5,29,389,8,29,10,29,12,29,392,9,29,1,29, + 1,29,1,29,3,29,397,8,29,1,30,1,30,3,30,401,8,30,1,31,1,31,1,31,1, + 31,3,31,407,8,31,1,31,1,31,3,31,411,8,31,1,31,1,31,3,31,415,8,31, + 1,32,1,32,1,33,1,33,3,33,421,8,33,1,33,1,33,1,33,1,33,1,33,1,33, + 5,33,429,8,33,10,33,12,33,432,9,33,1,33,1,33,1,33,1,33,1,33,1,33, + 1,33,5,33,441,8,33,10,33,12,33,444,9,33,1,33,1,33,1,33,1,33,1,33, + 1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,5,33,459,8,33,10,33,12,33, + 462,9,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,5,33,471,8,33,10,33, + 12,33,474,9,33,1,33,1,33,3,33,478,8,33,1,34,1,34,1,34,1,34,3,34, + 484,8,34,1,34,1,34,1,34,1,34,1,34,1,34,3,34,492,8,34,1,34,1,34,1, + 34,1,34,1,34,3,34,499,8,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1, + 34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,3,34,518,8,34,1, + 35,1,35,1,35,1,35,3,35,524,8,35,1,35,1,35,1,36,1,36,1,37,1,37,1, + 37,1,37,3,37,534,8,37,1,37,1,37,1,37,1,37,1,37,1,37,5,37,542,8,37, + 10,37,12,37,545,9,37,1,38,1,38,3,38,549,8,38,1,39,1,39,1,39,1,39, + 3,39,555,8,39,1,39,1,39,1,39,1,39,1,39,5,39,562,8,39,10,39,12,39, + 565,9,39,1,39,1,39,1,39,3,39,570,8,39,1,39,1,39,1,39,1,39,1,39,1, + 39,3,39,578,8,39,1,39,1,39,1,39,1,39,1,39,1,39,3,39,586,8,39,1,39, + 1,39,1,39,1,39,3,39,592,8,39,1,39,1,39,3,39,596,8,39,1,39,1,39,1, + 39,3,39,601,8,39,1,39,1,39,1,39,3,39,606,8,39,1,40,1,40,1,41,1,41, + 1,41,1,41,3,41,614,8,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41, + 1,41,5,41,625,8,41,10,41,12,41,628,9,41,1,42,1,42,1,42,1,42,3,42, + 634,8,42,1,42,1,42,1,42,5,42,639,8,42,10,42,12,42,642,9,42,3,42, + 644,8,42,1,42,1,42,1,42,1,42,4,42,650,8,42,11,42,12,42,651,1,42, + 1,42,3,42,656,8,42,1,42,1,42,1,42,1,42,1,42,4,42,663,8,42,11,42, + 12,42,664,1,42,1,42,3,42,669,8,42,1,42,1,42,1,42,1,42,1,42,1,42, + 1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,5,42,685,8,42,10,42,12,42, + 688,9,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42, + 1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,3,42,710,8,42,1,43, + 1,43,1,43,1,43,1,43,1,44,1,44,1,44,1,44,1,45,1,45,1,45,1,45,1,45, + 1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,3,45,734,8,45,1,45,3,45, + 737,8,45,1,45,1,45,1,45,1,45,1,45,3,45,744,8,45,1,45,3,45,747,8, + 45,1,45,1,45,1,45,1,45,3,45,753,8,45,1,45,1,45,1,45,1,45,3,45,759, + 8,45,1,45,1,45,1,45,1,45,1,45,1,45,3,45,767,8,45,1,46,1,46,1,46, + 1,46,5,46,773,8,46,10,46,12,46,776,9,46,1,46,1,46,1,47,1,47,1,47, + 1,47,1,48,1,48,1,48,1,48,1,48,1,48,1,48,1,48,3,48,792,8,48,1,49, + 1,49,1,49,1,49,1,49,3,49,799,8,49,1,50,1,50,1,50,5,50,804,8,50,10, + 50,12,50,807,9,50,1,51,1,51,1,51,3,51,812,8,51,1,52,1,52,1,53,1, + 53,1,54,1,54,1,55,1,55,1,56,1,56,1,57,1,57,1,57,0,3,28,74,82,58, + 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,92,94,96,98,100,102,104,106,108,110,112,114,0,8,3,0,36,36,52, + 52,87,87,2,0,6,6,30,30,2,0,10,10,29,29,2,0,39,39,57,57,1,0,95,100, + 1,0,101,102,1,0,103,105,22,0,5,6,10,10,12,15,18,18,20,21,24,27,29, + 29,31,31,38,40,43,43,46,46,50,51,56,58,60,60,63,66,70,70,75,75,78, + 78,80,80,82,86,88,88,90,91,920,0,119,1,0,0,0,2,124,1,0,0,0,4,126, + 1,0,0,0,6,137,1,0,0,0,8,140,1,0,0,0,10,144,1,0,0,0,12,156,1,0,0, + 0,14,162,1,0,0,0,16,173,1,0,0,0,18,180,1,0,0,0,20,182,1,0,0,0,22, + 212,1,0,0,0,24,228,1,0,0,0,26,230,1,0,0,0,28,239,1,0,0,0,30,270, + 1,0,0,0,32,272,1,0,0,0,34,284,1,0,0,0,36,286,1,0,0,0,38,291,1,0, + 0,0,40,304,1,0,0,0,42,309,1,0,0,0,44,319,1,0,0,0,46,327,1,0,0,0, + 48,333,1,0,0,0,50,341,1,0,0,0,52,352,1,0,0,0,54,366,1,0,0,0,56,370, + 1,0,0,0,58,376,1,0,0,0,60,400,1,0,0,0,62,402,1,0,0,0,64,416,1,0, + 0,0,66,420,1,0,0,0,68,479,1,0,0,0,70,519,1,0,0,0,72,527,1,0,0,0, + 74,533,1,0,0,0,76,546,1,0,0,0,78,605,1,0,0,0,80,607,1,0,0,0,82,613, + 1,0,0,0,84,709,1,0,0,0,86,711,1,0,0,0,88,716,1,0,0,0,90,766,1,0, + 0,0,92,768,1,0,0,0,94,779,1,0,0,0,96,791,1,0,0,0,98,798,1,0,0,0, + 100,800,1,0,0,0,102,811,1,0,0,0,104,813,1,0,0,0,106,815,1,0,0,0, + 108,817,1,0,0,0,110,819,1,0,0,0,112,821,1,0,0,0,114,823,1,0,0,0, + 116,118,3,2,1,0,117,116,1,0,0,0,118,121,1,0,0,0,119,117,1,0,0,0, + 119,120,1,0,0,0,120,122,1,0,0,0,121,119,1,0,0,0,122,123,5,0,0,1, + 123,1,1,0,0,0,124,125,3,4,2,0,125,3,1,0,0,0,126,128,3,6,3,0,127, + 129,5,108,0,0,128,127,1,0,0,0,128,129,1,0,0,0,129,5,1,0,0,0,130, + 138,3,8,4,0,131,138,3,48,24,0,132,138,3,52,26,0,133,138,3,56,28, + 0,134,138,3,58,29,0,135,138,3,68,34,0,136,138,3,70,35,0,137,130, + 1,0,0,0,137,131,1,0,0,0,137,132,1,0,0,0,137,133,1,0,0,0,137,134, + 1,0,0,0,137,135,1,0,0,0,137,136,1,0,0,0,138,7,1,0,0,0,139,141,3, + 10,5,0,140,139,1,0,0,0,140,141,1,0,0,0,141,142,1,0,0,0,142,143,3, + 14,7,0,143,9,1,0,0,0,144,146,5,94,0,0,145,147,5,72,0,0,146,145,1, + 0,0,0,146,147,1,0,0,0,147,148,1,0,0,0,148,153,3,12,6,0,149,150,5, + 1,0,0,150,152,3,12,6,0,151,149,1,0,0,0,152,155,1,0,0,0,153,151,1, + 0,0,0,153,154,1,0,0,0,154,11,1,0,0,0,155,153,1,0,0,0,156,157,3,98, + 49,0,157,158,5,9,0,0,158,159,5,2,0,0,159,160,3,8,4,0,160,161,5,3, + 0,0,161,13,1,0,0,0,162,170,3,16,8,0,163,165,7,0,0,0,164,166,5,6, + 0,0,165,164,1,0,0,0,165,166,1,0,0,0,166,167,1,0,0,0,167,169,3,16, + 8,0,168,163,1,0,0,0,169,172,1,0,0,0,170,168,1,0,0,0,170,171,1,0, + 0,0,171,15,1,0,0,0,172,170,1,0,0,0,173,174,3,18,9,0,174,17,1,0,0, + 0,175,181,3,20,10,0,176,177,5,2,0,0,177,178,3,8,4,0,178,179,5,3, + 0,0,179,181,1,0,0,0,180,175,1,0,0,0,180,176,1,0,0,0,181,19,1,0,0, + 0,182,184,5,76,0,0,183,185,3,22,11,0,184,183,1,0,0,0,184,185,1,0, + 0,0,185,186,1,0,0,0,186,191,3,24,12,0,187,188,5,1,0,0,188,190,3, + 24,12,0,189,187,1,0,0,0,190,193,1,0,0,0,191,189,1,0,0,0,191,192, + 1,0,0,0,192,195,1,0,0,0,193,191,1,0,0,0,194,196,3,26,13,0,195,194, + 1,0,0,0,195,196,1,0,0,0,196,198,1,0,0,0,197,199,3,36,18,0,198,197, + 1,0,0,0,198,199,1,0,0,0,199,201,1,0,0,0,200,202,3,38,19,0,201,200, + 1,0,0,0,201,202,1,0,0,0,202,204,1,0,0,0,203,205,3,40,20,0,204,203, + 1,0,0,0,204,205,1,0,0,0,205,207,1,0,0,0,206,208,3,42,21,0,207,206, + 1,0,0,0,207,208,1,0,0,0,208,210,1,0,0,0,209,211,3,46,23,0,210,209, + 1,0,0,0,210,211,1,0,0,0,211,21,1,0,0,0,212,213,7,1,0,0,213,23,1, + 0,0,0,214,219,3,72,36,0,215,217,5,9,0,0,216,215,1,0,0,0,216,217, + 1,0,0,0,217,218,1,0,0,0,218,220,3,98,49,0,219,216,1,0,0,0,219,220, + 1,0,0,0,220,229,1,0,0,0,221,222,3,100,50,0,222,223,5,4,0,0,223,224, + 5,103,0,0,224,229,1,0,0,0,225,229,5,103,0,0,226,227,4,12,0,0,227, + 229,3,106,53,0,228,214,1,0,0,0,228,221,1,0,0,0,228,225,1,0,0,0,228, + 226,1,0,0,0,229,25,1,0,0,0,230,231,5,42,0,0,231,236,3,28,14,0,232, + 233,5,1,0,0,233,235,3,28,14,0,234,232,1,0,0,0,235,238,1,0,0,0,236, + 234,1,0,0,0,236,237,1,0,0,0,237,27,1,0,0,0,238,236,1,0,0,0,239,240, + 6,14,-1,0,240,241,3,32,16,0,241,251,1,0,0,0,242,243,10,2,0,0,243, + 244,3,30,15,0,244,245,5,55,0,0,245,246,3,28,14,0,246,247,5,67,0, + 0,247,248,3,72,36,0,248,250,1,0,0,0,249,242,1,0,0,0,250,253,1,0, + 0,0,251,249,1,0,0,0,251,252,1,0,0,0,252,29,1,0,0,0,253,251,1,0,0, + 0,254,256,5,48,0,0,255,254,1,0,0,0,255,256,1,0,0,0,256,271,1,0,0, + 0,257,259,5,58,0,0,258,260,5,70,0,0,259,258,1,0,0,0,259,260,1,0, + 0,0,260,271,1,0,0,0,261,263,5,75,0,0,262,264,5,70,0,0,263,262,1, + 0,0,0,263,264,1,0,0,0,264,271,1,0,0,0,265,267,5,43,0,0,266,268,5, + 70,0,0,267,266,1,0,0,0,267,268,1,0,0,0,268,271,1,0,0,0,269,271,5, + 24,0,0,270,255,1,0,0,0,270,257,1,0,0,0,270,261,1,0,0,0,270,265,1, + 0,0,0,270,269,1,0,0,0,271,31,1,0,0,0,272,277,3,34,17,0,273,275,5, + 9,0,0,274,273,1,0,0,0,274,275,1,0,0,0,275,276,1,0,0,0,276,278,3, + 98,49,0,277,274,1,0,0,0,277,278,1,0,0,0,278,33,1,0,0,0,279,285,3, + 108,54,0,280,281,5,2,0,0,281,282,3,8,4,0,282,283,5,3,0,0,283,285, + 1,0,0,0,284,279,1,0,0,0,284,280,1,0,0,0,285,35,1,0,0,0,286,289,5, + 93,0,0,287,290,3,72,36,0,288,290,3,106,53,0,289,287,1,0,0,0,289, + 288,1,0,0,0,290,37,1,0,0,0,291,292,5,44,0,0,292,294,5,15,0,0,293, + 295,3,22,11,0,294,293,1,0,0,0,294,295,1,0,0,0,295,296,1,0,0,0,296, + 301,3,72,36,0,297,298,5,1,0,0,298,300,3,72,36,0,299,297,1,0,0,0, + 300,303,1,0,0,0,301,299,1,0,0,0,301,302,1,0,0,0,302,39,1,0,0,0,303, + 301,1,0,0,0,304,307,5,45,0,0,305,308,3,72,36,0,306,308,3,106,53, + 0,307,305,1,0,0,0,307,306,1,0,0,0,308,41,1,0,0,0,309,310,5,69,0, + 0,310,311,5,15,0,0,311,316,3,44,22,0,312,313,5,1,0,0,313,315,3,44, + 22,0,314,312,1,0,0,0,315,318,1,0,0,0,316,314,1,0,0,0,316,317,1,0, + 0,0,317,43,1,0,0,0,318,316,1,0,0,0,319,321,3,72,36,0,320,322,7,2, + 0,0,321,320,1,0,0,0,321,322,1,0,0,0,322,325,1,0,0,0,323,324,5,64, + 0,0,324,326,7,3,0,0,325,323,1,0,0,0,325,326,1,0,0,0,326,45,1,0,0, + 0,327,328,5,60,0,0,328,331,3,72,36,0,329,330,5,66,0,0,330,332,3, + 72,36,0,331,329,1,0,0,0,331,332,1,0,0,0,332,47,1,0,0,0,333,334,5, + 49,0,0,334,335,5,53,0,0,335,337,3,108,54,0,336,338,3,50,25,0,337, + 336,1,0,0,0,337,338,1,0,0,0,338,339,1,0,0,0,339,340,3,8,4,0,340, + 49,1,0,0,0,341,342,5,2,0,0,342,347,3,102,51,0,343,344,5,1,0,0,344, + 346,3,102,51,0,345,343,1,0,0,0,346,349,1,0,0,0,347,345,1,0,0,0,347, + 348,1,0,0,0,348,350,1,0,0,0,349,347,1,0,0,0,350,351,5,3,0,0,351, + 51,1,0,0,0,352,353,5,89,0,0,353,354,3,108,54,0,354,355,5,77,0,0, + 355,360,3,54,27,0,356,357,5,1,0,0,357,359,3,54,27,0,358,356,1,0, + 0,0,359,362,1,0,0,0,360,358,1,0,0,0,360,361,1,0,0,0,361,364,1,0, + 0,0,362,360,1,0,0,0,363,365,3,36,18,0,364,363,1,0,0,0,364,365,1, + 0,0,0,365,53,1,0,0,0,366,367,3,102,51,0,367,368,5,95,0,0,368,369, + 3,72,36,0,369,55,1,0,0,0,370,371,5,28,0,0,371,372,5,42,0,0,372,374, + 3,108,54,0,373,375,3,36,18,0,374,373,1,0,0,0,374,375,1,0,0,0,375, + 57,1,0,0,0,376,377,5,23,0,0,377,381,5,79,0,0,378,379,5,46,0,0,379, + 380,5,61,0,0,380,382,5,37,0,0,381,378,1,0,0,0,381,382,1,0,0,0,382, + 383,1,0,0,0,383,384,3,110,55,0,384,385,5,2,0,0,385,390,3,60,30,0, + 386,387,5,1,0,0,387,389,3,60,30,0,388,386,1,0,0,0,389,392,1,0,0, + 0,390,388,1,0,0,0,390,391,1,0,0,0,391,393,1,0,0,0,392,390,1,0,0, + 0,393,396,5,3,0,0,394,395,5,94,0,0,395,397,3,92,46,0,396,394,1,0, + 0,0,396,397,1,0,0,0,397,59,1,0,0,0,398,401,3,62,31,0,399,401,3,66, + 33,0,400,398,1,0,0,0,400,399,1,0,0,0,401,61,1,0,0,0,402,403,3,64, + 32,0,403,406,3,90,45,0,404,405,5,61,0,0,405,407,5,62,0,0,406,404, + 1,0,0,0,406,407,1,0,0,0,407,410,1,0,0,0,408,409,5,27,0,0,409,411, + 3,72,36,0,410,408,1,0,0,0,410,411,1,0,0,0,411,414,1,0,0,0,412,413, + 5,71,0,0,413,415,5,56,0,0,414,412,1,0,0,0,414,415,1,0,0,0,415,63, + 1,0,0,0,416,417,3,98,49,0,417,65,1,0,0,0,418,419,5,22,0,0,419,421, + 3,98,49,0,420,418,1,0,0,0,420,421,1,0,0,0,421,477,1,0,0,0,422,423, + 5,71,0,0,423,424,5,56,0,0,424,425,5,2,0,0,425,430,3,102,51,0,426, + 427,5,1,0,0,427,429,3,102,51,0,428,426,1,0,0,0,429,432,1,0,0,0,430, + 428,1,0,0,0,430,431,1,0,0,0,431,433,1,0,0,0,432,430,1,0,0,0,433, + 434,5,3,0,0,434,478,1,0,0,0,435,436,5,88,0,0,436,437,5,2,0,0,437, + 442,3,102,51,0,438,439,5,1,0,0,439,441,3,102,51,0,440,438,1,0,0, + 0,441,444,1,0,0,0,442,440,1,0,0,0,442,443,1,0,0,0,443,445,1,0,0, + 0,444,442,1,0,0,0,445,446,5,3,0,0,446,478,1,0,0,0,447,448,5,19,0, + 0,448,449,5,2,0,0,449,450,3,72,36,0,450,451,5,3,0,0,451,478,1,0, + 0,0,452,453,5,41,0,0,453,454,5,56,0,0,454,455,5,2,0,0,455,460,3, + 102,51,0,456,457,5,1,0,0,457,459,3,102,51,0,458,456,1,0,0,0,459, + 462,1,0,0,0,460,458,1,0,0,0,460,461,1,0,0,0,461,463,1,0,0,0,462, + 460,1,0,0,0,463,464,5,3,0,0,464,465,5,73,0,0,465,466,3,108,54,0, + 466,467,5,2,0,0,467,472,3,102,51,0,468,469,5,1,0,0,469,471,3,102, + 51,0,470,468,1,0,0,0,471,474,1,0,0,0,472,470,1,0,0,0,472,473,1,0, + 0,0,473,475,1,0,0,0,474,472,1,0,0,0,475,476,5,3,0,0,476,478,1,0, + 0,0,477,422,1,0,0,0,477,435,1,0,0,0,477,447,1,0,0,0,477,452,1,0, + 0,0,478,67,1,0,0,0,479,480,5,7,0,0,480,483,5,79,0,0,481,482,5,46, + 0,0,482,484,5,37,0,0,483,481,1,0,0,0,483,484,1,0,0,0,484,485,1,0, + 0,0,485,517,3,108,54,0,486,487,5,5,0,0,487,491,5,21,0,0,488,489, + 5,46,0,0,489,490,5,61,0,0,490,492,5,37,0,0,491,488,1,0,0,0,491,492, + 1,0,0,0,492,493,1,0,0,0,493,518,3,62,31,0,494,495,5,32,0,0,495,498, + 5,21,0,0,496,497,5,46,0,0,497,499,5,37,0,0,498,496,1,0,0,0,498,499, + 1,0,0,0,499,500,1,0,0,0,500,518,3,102,51,0,501,502,5,74,0,0,502, + 503,5,85,0,0,503,518,3,110,55,0,504,505,5,7,0,0,505,506,5,21,0,0, + 506,507,3,102,51,0,507,508,5,77,0,0,508,509,5,27,0,0,509,510,3,72, + 36,0,510,518,1,0,0,0,511,512,5,7,0,0,512,513,5,21,0,0,513,514,3, + 102,51,0,514,515,5,32,0,0,515,516,5,27,0,0,516,518,1,0,0,0,517,486, + 1,0,0,0,517,494,1,0,0,0,517,501,1,0,0,0,517,504,1,0,0,0,517,511, + 1,0,0,0,518,69,1,0,0,0,519,520,5,32,0,0,520,523,5,79,0,0,521,522, + 5,46,0,0,522,524,5,37,0,0,523,521,1,0,0,0,523,524,1,0,0,0,524,525, + 1,0,0,0,525,526,3,108,54,0,526,71,1,0,0,0,527,528,3,74,37,0,528, + 73,1,0,0,0,529,530,6,37,-1,0,530,534,3,76,38,0,531,532,5,61,0,0, + 532,534,3,74,37,3,533,529,1,0,0,0,533,531,1,0,0,0,534,543,1,0,0, + 0,535,536,10,2,0,0,536,537,5,8,0,0,537,542,3,74,37,3,538,539,10, + 1,0,0,539,540,5,68,0,0,540,542,3,74,37,2,541,535,1,0,0,0,541,538, + 1,0,0,0,542,545,1,0,0,0,543,541,1,0,0,0,543,544,1,0,0,0,544,75,1, + 0,0,0,545,543,1,0,0,0,546,548,3,82,41,0,547,549,3,78,39,0,548,547, + 1,0,0,0,548,549,1,0,0,0,549,77,1,0,0,0,550,551,3,80,40,0,551,552, + 3,82,41,0,552,606,1,0,0,0,553,555,5,61,0,0,554,553,1,0,0,0,554,555, + 1,0,0,0,555,556,1,0,0,0,556,557,5,47,0,0,557,558,5,2,0,0,558,563, + 3,72,36,0,559,560,5,1,0,0,560,562,3,72,36,0,561,559,1,0,0,0,562, + 565,1,0,0,0,563,561,1,0,0,0,563,564,1,0,0,0,564,566,1,0,0,0,565, + 563,1,0,0,0,566,567,5,3,0,0,567,606,1,0,0,0,568,570,5,61,0,0,569, + 568,1,0,0,0,569,570,1,0,0,0,570,571,1,0,0,0,571,572,5,47,0,0,572, + 573,5,2,0,0,573,574,3,8,4,0,574,575,5,3,0,0,575,606,1,0,0,0,576, + 578,5,61,0,0,577,576,1,0,0,0,577,578,1,0,0,0,578,579,1,0,0,0,579, + 580,5,11,0,0,580,581,3,82,41,0,581,582,5,8,0,0,582,583,3,82,41,0, + 583,606,1,0,0,0,584,586,5,61,0,0,585,584,1,0,0,0,585,586,1,0,0,0, + 586,587,1,0,0,0,587,588,5,59,0,0,588,591,3,82,41,0,589,590,5,35, + 0,0,590,592,3,82,41,0,591,589,1,0,0,0,591,592,1,0,0,0,592,606,1, + 0,0,0,593,595,5,54,0,0,594,596,5,61,0,0,595,594,1,0,0,0,595,596, + 1,0,0,0,596,597,1,0,0,0,597,606,5,62,0,0,598,600,5,54,0,0,599,601, + 5,61,0,0,600,599,1,0,0,0,600,601,1,0,0,0,601,602,1,0,0,0,602,603, + 5,30,0,0,603,604,5,42,0,0,604,606,3,82,41,0,605,550,1,0,0,0,605, + 554,1,0,0,0,605,569,1,0,0,0,605,577,1,0,0,0,605,585,1,0,0,0,605, + 593,1,0,0,0,605,598,1,0,0,0,606,79,1,0,0,0,607,608,7,4,0,0,608,81, + 1,0,0,0,609,610,6,41,-1,0,610,614,3,84,42,0,611,612,7,5,0,0,612, + 614,3,82,41,4,613,609,1,0,0,0,613,611,1,0,0,0,614,626,1,0,0,0,615, + 616,10,3,0,0,616,617,7,6,0,0,617,625,3,82,41,4,618,619,10,2,0,0, + 619,620,7,5,0,0,620,625,3,82,41,3,621,622,10,1,0,0,622,623,5,106, + 0,0,623,625,3,82,41,2,624,615,1,0,0,0,624,618,1,0,0,0,624,621,1, + 0,0,0,625,628,1,0,0,0,626,624,1,0,0,0,626,627,1,0,0,0,627,83,1,0, + 0,0,628,626,1,0,0,0,629,710,3,96,48,0,630,631,3,112,56,0,631,643, + 5,2,0,0,632,634,3,22,11,0,633,632,1,0,0,0,633,634,1,0,0,0,634,635, + 1,0,0,0,635,640,3,72,36,0,636,637,5,1,0,0,637,639,3,72,36,0,638, + 636,1,0,0,0,639,642,1,0,0,0,640,638,1,0,0,0,640,641,1,0,0,0,641, + 644,1,0,0,0,642,640,1,0,0,0,643,633,1,0,0,0,643,644,1,0,0,0,644, + 645,1,0,0,0,645,646,5,3,0,0,646,710,1,0,0,0,647,649,5,16,0,0,648, + 650,3,86,43,0,649,648,1,0,0,0,650,651,1,0,0,0,651,649,1,0,0,0,651, + 652,1,0,0,0,652,655,1,0,0,0,653,654,5,33,0,0,654,656,3,72,36,0,655, + 653,1,0,0,0,655,656,1,0,0,0,656,657,1,0,0,0,657,658,5,34,0,0,658, + 710,1,0,0,0,659,660,5,16,0,0,660,662,3,72,36,0,661,663,3,86,43,0, + 662,661,1,0,0,0,663,664,1,0,0,0,664,662,1,0,0,0,664,665,1,0,0,0, + 665,668,1,0,0,0,666,667,5,33,0,0,667,669,3,72,36,0,668,666,1,0,0, + 0,668,669,1,0,0,0,669,670,1,0,0,0,670,671,5,34,0,0,671,710,1,0,0, + 0,672,673,5,17,0,0,673,674,5,2,0,0,674,675,3,72,36,0,675,676,5,9, + 0,0,676,677,3,90,45,0,677,678,5,3,0,0,678,710,1,0,0,0,679,680,5, + 20,0,0,680,681,5,2,0,0,681,686,3,72,36,0,682,683,5,1,0,0,683,685, + 3,72,36,0,684,682,1,0,0,0,685,688,1,0,0,0,686,684,1,0,0,0,686,687, + 1,0,0,0,687,689,1,0,0,0,688,686,1,0,0,0,689,690,5,3,0,0,690,710, + 1,0,0,0,691,692,5,63,0,0,692,693,5,2,0,0,693,694,3,82,41,0,694,695, + 5,1,0,0,695,696,3,82,41,0,696,697,5,3,0,0,697,710,1,0,0,0,698,699, + 5,2,0,0,699,700,3,72,36,0,700,701,5,3,0,0,701,710,1,0,0,0,702,703, + 5,37,0,0,703,704,5,2,0,0,704,705,3,8,4,0,705,706,5,3,0,0,706,710, + 1,0,0,0,707,710,3,88,44,0,708,710,3,104,52,0,709,629,1,0,0,0,709, + 630,1,0,0,0,709,647,1,0,0,0,709,659,1,0,0,0,709,672,1,0,0,0,709, + 679,1,0,0,0,709,691,1,0,0,0,709,698,1,0,0,0,709,702,1,0,0,0,709, + 707,1,0,0,0,709,708,1,0,0,0,710,85,1,0,0,0,711,712,5,92,0,0,712, + 713,3,72,36,0,713,714,5,81,0,0,714,715,3,72,36,0,715,87,1,0,0,0, + 716,717,5,2,0,0,717,718,3,8,4,0,718,719,5,3,0,0,719,89,1,0,0,0,720, + 767,5,14,0,0,721,767,5,84,0,0,722,767,5,78,0,0,723,767,5,50,0,0, + 724,767,5,51,0,0,725,767,5,12,0,0,726,767,5,40,0,0,727,767,5,31, + 0,0,728,736,5,26,0,0,729,730,5,2,0,0,730,733,5,111,0,0,731,732,5, + 1,0,0,732,734,5,111,0,0,733,731,1,0,0,0,733,734,1,0,0,0,734,735, + 1,0,0,0,735,737,5,3,0,0,736,729,1,0,0,0,736,737,1,0,0,0,737,767, + 1,0,0,0,738,746,5,65,0,0,739,740,5,2,0,0,740,743,5,111,0,0,741,742, + 5,1,0,0,742,744,5,111,0,0,743,741,1,0,0,0,743,744,1,0,0,0,744,745, + 1,0,0,0,745,747,5,3,0,0,746,739,1,0,0,0,746,747,1,0,0,0,747,767, + 1,0,0,0,748,752,5,90,0,0,749,750,5,2,0,0,750,751,5,111,0,0,751,753, + 5,3,0,0,752,749,1,0,0,0,752,753,1,0,0,0,753,767,1,0,0,0,754,758, + 5,18,0,0,755,756,5,2,0,0,756,757,5,111,0,0,757,759,5,3,0,0,758,755, + 1,0,0,0,758,759,1,0,0,0,759,767,1,0,0,0,760,767,5,80,0,0,761,767, + 5,25,0,0,762,767,5,82,0,0,763,767,5,83,0,0,764,767,5,13,0,0,765, + 767,5,91,0,0,766,720,1,0,0,0,766,721,1,0,0,0,766,722,1,0,0,0,766, + 723,1,0,0,0,766,724,1,0,0,0,766,725,1,0,0,0,766,726,1,0,0,0,766, + 727,1,0,0,0,766,728,1,0,0,0,766,738,1,0,0,0,766,748,1,0,0,0,766, + 754,1,0,0,0,766,760,1,0,0,0,766,761,1,0,0,0,766,762,1,0,0,0,766, + 763,1,0,0,0,766,764,1,0,0,0,766,765,1,0,0,0,767,91,1,0,0,0,768,769, + 5,2,0,0,769,774,3,94,47,0,770,771,5,1,0,0,771,773,3,94,47,0,772, + 770,1,0,0,0,773,776,1,0,0,0,774,772,1,0,0,0,774,775,1,0,0,0,775, + 777,1,0,0,0,776,774,1,0,0,0,777,778,5,3,0,0,778,93,1,0,0,0,779,780, + 3,98,49,0,780,781,5,95,0,0,781,782,3,96,48,0,782,95,1,0,0,0,783, + 792,5,62,0,0,784,792,5,86,0,0,785,792,5,38,0,0,786,792,5,111,0,0, + 787,792,5,112,0,0,788,792,5,113,0,0,789,792,5,109,0,0,790,792,5, + 110,0,0,791,783,1,0,0,0,791,784,1,0,0,0,791,785,1,0,0,0,791,786, + 1,0,0,0,791,787,1,0,0,0,791,788,1,0,0,0,791,789,1,0,0,0,791,790, + 1,0,0,0,792,97,1,0,0,0,793,799,5,114,0,0,794,799,5,115,0,0,795,799, + 5,116,0,0,796,799,5,117,0,0,797,799,3,114,57,0,798,793,1,0,0,0,798, + 794,1,0,0,0,798,795,1,0,0,0,798,796,1,0,0,0,798,797,1,0,0,0,799, + 99,1,0,0,0,800,805,3,98,49,0,801,802,5,4,0,0,802,804,3,98,49,0,803, + 801,1,0,0,0,804,807,1,0,0,0,805,803,1,0,0,0,805,806,1,0,0,0,806, + 101,1,0,0,0,807,805,1,0,0,0,808,812,3,98,49,0,809,810,4,51,7,0,810, + 812,3,106,53,0,811,808,1,0,0,0,811,809,1,0,0,0,812,103,1,0,0,0,813, + 814,3,100,50,0,814,105,1,0,0,0,815,816,1,0,0,0,816,107,1,0,0,0,817, + 818,3,100,50,0,818,109,1,0,0,0,819,820,3,100,50,0,820,111,1,0,0, + 0,821,822,3,100,50,0,822,113,1,0,0,0,823,824,7,7,0,0,824,115,1,0, + 0,0,98,119,128,137,140,146,153,165,170,180,184,191,195,198,201,204, + 207,210,216,219,228,236,251,255,259,263,267,270,274,277,284,289, + 294,301,307,316,321,325,331,337,347,360,364,374,381,390,396,400, + 406,410,414,420,430,442,460,472,477,483,491,498,517,523,533,541, + 543,548,554,563,569,577,585,591,595,600,605,613,624,626,633,640, + 643,651,655,664,668,686,709,733,736,743,746,752,758,766,774,791, + 798,805,811 ]; private static __ATN: antlr.ATN; @@ -4882,8 +5069,20 @@ export class SelectItemContext extends antlr.ParserRuleContext { public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { super(parent, invokingState); } - public expression(): ExpressionContext | null { - return this.getRuleContext(0, ExpressionContext); + public override get ruleIndex(): number { + return GenericSqlParser.RULE_selectItem; + } + public override copyFrom(ctx: SelectItemContext): void { + super.copyFrom(ctx); + } +} +export class SelectExpressionElementContext extends SelectItemContext { + public constructor(ctx: SelectItemContext) { + super(ctx.parent, ctx.invokingState); + super.copyFrom(ctx); + } + public expression(): ExpressionContext { + return this.getRuleContext(0, ExpressionContext)!; } public identifier(): IdentifierContext | null { return this.getRuleContext(0, IdentifierContext); @@ -4891,28 +5090,100 @@ export class SelectItemContext extends antlr.ParserRuleContext { public KW_AS(): antlr.TerminalNode | null { return this.getToken(GenericSqlParser.KW_AS, 0); } - public qualifiedName(): QualifiedNameContext | null { - return this.getRuleContext(0, QualifiedNameContext); + public override enterRule(listener: GenericSqlListener): void { + if(listener.enterSelectExpressionElement) { + listener.enterSelectExpressionElement(this); + } } - public ASTERISK(): antlr.TerminalNode | null { - return this.getToken(GenericSqlParser.ASTERISK, 0); + public override exitRule(listener: GenericSqlListener): void { + if(listener.exitSelectExpressionElement) { + listener.exitSelectExpressionElement(this); + } } - public override get ruleIndex(): number { - return GenericSqlParser.RULE_selectItem; + public override accept(visitor: GenericSqlVisitor): Result | null { + if (visitor.visitSelectExpressionElement) { + return visitor.visitSelectExpressionElement(this); + } else { + return visitor.visitChildren(this); + } + } +} +export class SelectEmptyElementContext extends SelectItemContext { + public constructor(ctx: SelectItemContext) { + super(ctx.parent, ctx.invokingState); + super.copyFrom(ctx); + } + public emptyColumn(): EmptyColumnContext { + return this.getRuleContext(0, EmptyColumnContext)!; + } + public override enterRule(listener: GenericSqlListener): void { + if(listener.enterSelectEmptyElement) { + listener.enterSelectEmptyElement(this); + } + } + public override exitRule(listener: GenericSqlListener): void { + if(listener.exitSelectEmptyElement) { + listener.exitSelectEmptyElement(this); + } + } + public override accept(visitor: GenericSqlVisitor): Result | null { + if (visitor.visitSelectEmptyElement) { + return visitor.visitSelectEmptyElement(this); + } else { + return visitor.visitChildren(this); + } + } +} +export class SelectStarElementContext extends SelectItemContext { + public constructor(ctx: SelectItemContext) { + super(ctx.parent, ctx.invokingState); + super.copyFrom(ctx); + } + public qualifiedName(): QualifiedNameContext { + return this.getRuleContext(0, QualifiedNameContext)!; + } + public ASTERISK(): antlr.TerminalNode { + return this.getToken(GenericSqlParser.ASTERISK, 0)!; + } + public override enterRule(listener: GenericSqlListener): void { + if(listener.enterSelectStarElement) { + listener.enterSelectStarElement(this); + } + } + public override exitRule(listener: GenericSqlListener): void { + if(listener.exitSelectStarElement) { + listener.exitSelectStarElement(this); + } + } + public override accept(visitor: GenericSqlVisitor): Result | null { + if (visitor.visitSelectStarElement) { + return visitor.visitSelectStarElement(this); + } else { + return visitor.visitChildren(this); + } + } +} +export class SelectAllElementContext extends SelectItemContext { + public constructor(ctx: SelectItemContext) { + super(ctx.parent, ctx.invokingState); + super.copyFrom(ctx); + } + public ASTERISK(): antlr.TerminalNode { + return this.getToken(GenericSqlParser.ASTERISK, 0)!; } public override enterRule(listener: GenericSqlListener): void { - if(listener.enterSelectItem) { - listener.enterSelectItem(this); + if(listener.enterSelectAllElement) { + listener.enterSelectAllElement(this); } } public override exitRule(listener: GenericSqlListener): void { - if(listener.exitSelectItem) { - listener.exitSelectItem(this); + if(listener.exitSelectAllElement) { + listener.exitSelectAllElement(this); } } public override accept(visitor: GenericSqlVisitor): Result | null { - if (visitor.visitSelectItem) { - return visitor.visitSelectItem(this); + if (visitor.visitSelectAllElement) { + return visitor.visitSelectAllElement(this); } else { return visitor.visitChildren(this); } @@ -5198,8 +5469,11 @@ export class WhereClauseContext extends antlr.ParserRuleContext { public KW_WHERE(): antlr.TerminalNode { return this.getToken(GenericSqlParser.KW_WHERE, 0)!; } - public expression(): ExpressionContext { - return this.getRuleContext(0, ExpressionContext)!; + public expression(): ExpressionContext | null { + return this.getRuleContext(0, ExpressionContext); + } + public emptyColumn(): EmptyColumnContext | null { + return this.getRuleContext(0, EmptyColumnContext); } public override get ruleIndex(): number { return GenericSqlParser.RULE_whereClause; @@ -5276,8 +5550,11 @@ export class HavingClauseContext extends antlr.ParserRuleContext { public KW_HAVING(): antlr.TerminalNode { return this.getToken(GenericSqlParser.KW_HAVING, 0)!; } - public expression(): ExpressionContext { - return this.getRuleContext(0, ExpressionContext)!; + public expression(): ExpressionContext | null { + return this.getRuleContext(0, ExpressionContext); + } + public emptyColumn(): EmptyColumnContext | null { + return this.getRuleContext(0, EmptyColumnContext); } public override get ruleIndex(): number { return GenericSqlParser.RULE_havingClause; @@ -5730,11 +6007,12 @@ export class TableElementContext extends antlr.ParserRuleContext { export class ColumnDefinitionContext extends antlr.ParserRuleContext { + public _colType?: DataTypeContext; public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { super(parent, invokingState); } - public columnRef(): ColumnRefContext { - return this.getRuleContext(0, ColumnRefContext)!; + public columnRefCreate(): ColumnRefCreateContext { + return this.getRuleContext(0, ColumnRefCreateContext)!; } public dataType(): DataTypeContext { return this.getRuleContext(0, DataTypeContext)!; @@ -5780,6 +6058,36 @@ export class ColumnDefinitionContext extends antlr.ParserRuleContext { } +export class ColumnRefCreateContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public identifier(): IdentifierContext { + return this.getRuleContext(0, IdentifierContext)!; + } + public override get ruleIndex(): number { + return GenericSqlParser.RULE_columnRefCreate; + } + public override enterRule(listener: GenericSqlListener): void { + if(listener.enterColumnRefCreate) { + listener.enterColumnRefCreate(this); + } + } + public override exitRule(listener: GenericSqlListener): void { + if(listener.exitColumnRefCreate) { + listener.exitColumnRefCreate(this); + } + } + public override accept(visitor: GenericSqlVisitor): Result | null { + if (visitor.visitColumnRefCreate) { + return visitor.visitColumnRefCreate(this); + } else { + return visitor.visitChildren(this); + } + } +} + + export class TableConstraintContext extends antlr.ParserRuleContext { public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { super(parent, invokingState); @@ -6775,8 +7083,8 @@ export class ColumnReferenceContext extends PrimaryExpressionContext { super(ctx.parent, ctx.invokingState); super.copyFrom(ctx); } - public qualifiedName(): QualifiedNameContext { - return this.getRuleContext(0, QualifiedNameContext)!; + public columnName(): ColumnNameContext { + return this.getRuleContext(0, ColumnNameContext)!; } public override enterRule(listener: GenericSqlListener): void { if(listener.enterColumnReference) { @@ -6856,8 +7164,8 @@ export class FunctionCallContext extends PrimaryExpressionContext { super(ctx.parent, ctx.invokingState); super.copyFrom(ctx); } - public qualifiedName(): QualifiedNameContext { - return this.getRuleContext(0, QualifiedNameContext)!; + public functionName(): FunctionNameContext { + return this.getRuleContext(0, FunctionNameContext)!; } public expression(): ExpressionContext[]; public expression(i: number): ExpressionContext | null; @@ -7566,8 +7874,11 @@ export class ColumnRefContext extends antlr.ParserRuleContext { public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { super(parent, invokingState); } - public identifier(): IdentifierContext { - return this.getRuleContext(0, IdentifierContext)!; + public identifier(): IdentifierContext | null { + return this.getRuleContext(0, IdentifierContext); + } + public emptyColumn(): EmptyColumnContext | null { + return this.getRuleContext(0, EmptyColumnContext); } public override get ruleIndex(): number { return GenericSqlParser.RULE_columnRef; @@ -7592,6 +7903,63 @@ export class ColumnRefContext extends antlr.ParserRuleContext { } +export class ColumnNameContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public qualifiedName(): QualifiedNameContext { + return this.getRuleContext(0, QualifiedNameContext)!; + } + public override get ruleIndex(): number { + return GenericSqlParser.RULE_columnName; + } + public override enterRule(listener: GenericSqlListener): void { + if(listener.enterColumnName) { + listener.enterColumnName(this); + } + } + public override exitRule(listener: GenericSqlListener): void { + if(listener.exitColumnName) { + listener.exitColumnName(this); + } + } + public override accept(visitor: GenericSqlVisitor): Result | null { + if (visitor.visitColumnName) { + return visitor.visitColumnName(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class EmptyColumnContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public override get ruleIndex(): number { + return GenericSqlParser.RULE_emptyColumn; + } + public override enterRule(listener: GenericSqlListener): void { + if(listener.enterEmptyColumn) { + listener.enterEmptyColumn(this); + } + } + public override exitRule(listener: GenericSqlListener): void { + if(listener.exitEmptyColumn) { + listener.exitEmptyColumn(this); + } + } + public override accept(visitor: GenericSqlVisitor): Result | null { + if (visitor.visitEmptyColumn) { + return visitor.visitEmptyColumn(this); + } else { + return visitor.visitChildren(this); + } + } +} + + export class TableNameContext extends antlr.ParserRuleContext { public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { super(parent, invokingState); @@ -7652,6 +8020,36 @@ export class TableNameCreateContext extends antlr.ParserRuleContext { } +export class FunctionNameContext extends antlr.ParserRuleContext { + public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { + super(parent, invokingState); + } + public qualifiedName(): QualifiedNameContext { + return this.getRuleContext(0, QualifiedNameContext)!; + } + public override get ruleIndex(): number { + return GenericSqlParser.RULE_functionName; + } + public override enterRule(listener: GenericSqlListener): void { + if(listener.enterFunctionName) { + listener.enterFunctionName(this); + } + } + public override exitRule(listener: GenericSqlListener): void { + if(listener.exitFunctionName) { + listener.exitFunctionName(this); + } + } + public override accept(visitor: GenericSqlVisitor): Result | null { + if (visitor.visitFunctionName) { + return visitor.visitFunctionName(this); + } else { + return visitor.visitChildren(this); + } + } +} + + export class NonReservedContext extends antlr.ParserRuleContext { public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { super(parent, invokingState); diff --git a/src/lib/generic/GenericSqlVisitor.ts b/src/lib/generic/GenericSqlVisitor.ts index ab836337..e15929c3 100644 --- a/src/lib/generic/GenericSqlVisitor.ts +++ b/src/lib/generic/GenericSqlVisitor.ts @@ -26,7 +26,10 @@ import { QueryTermContext } from "./GenericSqlParser.js"; import { QueryPrimaryContext } from "./GenericSqlParser.js"; import { QuerySpecificationContext } from "./GenericSqlParser.js"; import { SetQuantifierContext } from "./GenericSqlParser.js"; -import { SelectItemContext } from "./GenericSqlParser.js"; +import { SelectExpressionElementContext } from "./GenericSqlParser.js"; +import { SelectStarElementContext } from "./GenericSqlParser.js"; +import { SelectAllElementContext } from "./GenericSqlParser.js"; +import { SelectEmptyElementContext } from "./GenericSqlParser.js"; import { FromClauseContext } from "./GenericSqlParser.js"; import { SimpleRelationContext } from "./GenericSqlParser.js"; import { JoinRelationContext } from "./GenericSqlParser.js"; @@ -48,6 +51,7 @@ import { DeleteStatementContext } from "./GenericSqlParser.js"; import { CreateTableStatementContext } from "./GenericSqlParser.js"; import { TableElementContext } from "./GenericSqlParser.js"; import { ColumnDefinitionContext } from "./GenericSqlParser.js"; +import { ColumnRefCreateContext } from "./GenericSqlParser.js"; import { TableConstraintContext } from "./GenericSqlParser.js"; import { AlterTableStatementContext } from "./GenericSqlParser.js"; import { DropTableStatementContext } from "./GenericSqlParser.js"; @@ -95,8 +99,11 @@ import { BinaryLiteralContext } from "./GenericSqlParser.js"; import { IdentifierContext } from "./GenericSqlParser.js"; import { QualifiedNameContext } from "./GenericSqlParser.js"; import { ColumnRefContext } from "./GenericSqlParser.js"; +import { ColumnNameContext } from "./GenericSqlParser.js"; +import { EmptyColumnContext } from "./GenericSqlParser.js"; import { TableNameContext } from "./GenericSqlParser.js"; import { TableNameCreateContext } from "./GenericSqlParser.js"; +import { FunctionNameContext } from "./GenericSqlParser.js"; import { NonReservedContext } from "./GenericSqlParser.js"; @@ -224,11 +231,33 @@ export class GenericSqlVisitor extends AbstractParseTreeVisitor */ visitSetQuantifier?: (ctx: SetQuantifierContext) => Result; /** - * Visit a parse tree produced by `GenericSqlParser.selectItem`. + * Visit a parse tree produced by the `selectExpressionElement` + * labeled alternative in `GenericSqlParser.selectItem`. * @param ctx the parse tree * @return the visitor result */ - visitSelectItem?: (ctx: SelectItemContext) => Result; + visitSelectExpressionElement?: (ctx: SelectExpressionElementContext) => Result; + /** + * Visit a parse tree produced by the `selectStarElement` + * labeled alternative in `GenericSqlParser.selectItem`. + * @param ctx the parse tree + * @return the visitor result + */ + visitSelectStarElement?: (ctx: SelectStarElementContext) => Result; + /** + * Visit a parse tree produced by the `selectAllElement` + * labeled alternative in `GenericSqlParser.selectItem`. + * @param ctx the parse tree + * @return the visitor result + */ + visitSelectAllElement?: (ctx: SelectAllElementContext) => Result; + /** + * Visit a parse tree produced by the `selectEmptyElement` + * labeled alternative in `GenericSqlParser.selectItem`. + * @param ctx the parse tree + * @return the visitor result + */ + visitSelectEmptyElement?: (ctx: SelectEmptyElementContext) => Result; /** * Visit a parse tree produced by `GenericSqlParser.fromClause`. * @param ctx the parse tree @@ -359,6 +388,12 @@ export class GenericSqlVisitor extends AbstractParseTreeVisitor * @return the visitor result */ visitColumnDefinition?: (ctx: ColumnDefinitionContext) => Result; + /** + * Visit a parse tree produced by `GenericSqlParser.columnRefCreate`. + * @param ctx the parse tree + * @return the visitor result + */ + visitColumnRefCreate?: (ctx: ColumnRefCreateContext) => Result; /** * Visit a parse tree produced by `GenericSqlParser.tableConstraint`. * @param ctx the parse tree @@ -674,6 +709,18 @@ export class GenericSqlVisitor extends AbstractParseTreeVisitor * @return the visitor result */ visitColumnRef?: (ctx: ColumnRefContext) => Result; + /** + * Visit a parse tree produced by `GenericSqlParser.columnName`. + * @param ctx the parse tree + * @return the visitor result + */ + visitColumnName?: (ctx: ColumnNameContext) => Result; + /** + * Visit a parse tree produced by `GenericSqlParser.emptyColumn`. + * @param ctx the parse tree + * @return the visitor result + */ + visitEmptyColumn?: (ctx: EmptyColumnContext) => Result; /** * Visit a parse tree produced by `GenericSqlParser.tableName`. * @param ctx the parse tree @@ -686,6 +733,12 @@ export class GenericSqlVisitor extends AbstractParseTreeVisitor * @return the visitor result */ visitTableNameCreate?: (ctx: TableNameCreateContext) => Result; + /** + * Visit a parse tree produced by `GenericSqlParser.functionName`. + * @param ctx the parse tree + * @return the visitor result + */ + visitFunctionName?: (ctx: FunctionNameContext) => Result; /** * Visit a parse tree produced by `GenericSqlParser.nonReserved`. * @param ctx the parse tree diff --git a/src/parser/generic/genericEntityCollector.ts b/src/parser/generic/genericEntityCollector.ts index b4fd5d17..a91cbf42 100644 --- a/src/parser/generic/genericEntityCollector.ts +++ b/src/parser/generic/genericEntityCollector.ts @@ -3,6 +3,7 @@ import { AlterTableContext, ColumnDefinitionContext, ColumnRefContext, + ColumnRefCreateContext, CreateTableContext, CreateTableStatementContext, DeleteContext, @@ -10,7 +11,10 @@ import { InsertContext, QuerySpecificationContext, QueryStatementContext, - SelectItemContext, + SelectAllElementContext, + SelectEmptyElementContext, + SelectExpressionElementContext, + SelectStarElementContext, SingleStatementContext, TableNameContext, TableNameCreateContext, @@ -47,7 +51,7 @@ export class GenericEntityCollector extends EntityCollector implements GenericSq this.pushEntity(ctx, EntityContextType.COLUMN); } - exitColumnDefinition(ctx: ColumnDefinitionContext) { + exitColumnRefCreate(ctx: ColumnRefCreateContext) { this.pushEntity(ctx, EntityContextType.COLUMN_CREATE, [ { attrName: AttrName.colType, @@ -64,32 +68,44 @@ export class GenericEntityCollector extends EntityCollector implements GenericSq this.pushEntity(ctx, EntityContextType.QUERY_RESULT); } - exitSelectItem(ctx: SelectItemContext) { - if (ctx.ASTERISK()) { - this.pushEntity(ctx, EntityContextType.COLUMN, [], { - declareType: ColumnDeclareType.ALL, - }); - } else { - const isSimpleColumn = this.isSimpleColumnReference(ctx); - this.pushEntity( - ctx, - EntityContextType.COLUMN, - [ - { - attrName: AttrName.alias, - endContextList: [SelectItemContext.name], - }, - ], + exitSelectExpressionElement(ctx: SelectExpressionElementContext) { + const isSimpleColumn = this.isSimpleColumnReference(ctx); + this.pushEntity( + ctx, + EntityContextType.COLUMN, + [ { - declareType: isSimpleColumn - ? ColumnDeclareType.LITERAL - : ColumnDeclareType.EXPRESSION, - } - ); - } + attrName: AttrName.alias, + endContextList: [SelectExpressionElementContext.name], + }, + ], + { + declareType: isSimpleColumn + ? ColumnDeclareType.LITERAL + : ColumnDeclareType.EXPRESSION, + } + ); + } + + exitSelectStarElement(ctx: SelectStarElementContext) { + this.pushEntity(ctx, EntityContextType.COLUMN, [], { + declareType: ColumnDeclareType.ALL, + }); + } + + exitSelectAllElement(ctx: SelectAllElementContext) { + this.pushEntity(ctx, EntityContextType.COLUMN, [], { + declareType: ColumnDeclareType.ALL, + }); + } + + exitSelectEmptyElement(ctx: SelectEmptyElementContext) { + this.pushEntity(ctx, EntityContextType.COLUMN, [], { + declareType: ColumnDeclareType.LITERAL, + }); } - private isSimpleColumnReference(ctx: SelectItemContext): boolean { + private isSimpleColumnReference(ctx: SelectExpressionElementContext): boolean { const text = ctx.getText(); // Simple column reference: no parentheses, no operators, no spaces return ( diff --git a/src/parser/generic/index.ts b/src/parser/generic/index.ts index 97c65e03..7c6bb616 100644 --- a/src/parser/generic/index.ts +++ b/src/parser/generic/index.ts @@ -56,6 +56,9 @@ export class GenericSQL extends BasicSQL { @@ -72,4 +73,71 @@ describe('GenericSQL Syntax Suggestion with collect entity', () => { expect(firstStmtEntities[0].belongStmt.isContainCaret).toBeFalsy(); } }); + + test('select with empty column after dot (a.)', () => { + const sql = `SELECT a. FROM tb1 a`; + const pos: CaretPosition = { + lineNumber: 1, + column: 9, + }; + + const syntaxes = parser.getSuggestionAtCaretPosition(sql, pos)?.syntax; + const suggestion = syntaxes?.find( + (syn) => syn.syntaxContextType === EntityContextType.COLUMN + ); + expect(suggestion).not.toBeUndefined(); + expect(suggestion?.wordRanges.map((token) => token.text)).toEqual(['a']); + + const entities = parser.getAllEntities(sql, pos); + const tableEntity = entities.find((e) => e.entityContextType === EntityContextType.TABLE); + expect(tableEntity).toBeDefined(); + expect(tableEntity?.text).toBe('tb1'); + expect(tableEntity?.belongStmt.isContainCaret).toBeTruthy(); + }); + + test('select with empty column (trailing comma)', () => { + const sql = `SELECT id, FROM tb`; + const pos: CaretPosition = { + lineNumber: 1, + column: 12, + }; + + const entities = parser.getAllEntities(sql, pos); + const tableEntity = entities.find((e) => e.entityContextType === EntityContextType.TABLE); + expect(tableEntity).toBeDefined(); + expect(tableEntity?.text).toBe('tb'); + expect(tableEntity?.belongStmt.isContainCaret).toBeTruthy(); + }); + + test('should get columns from CREATE TABLE for suggestion', () => { + const sql = `CREATE TABLE students (id int, name varchar(100), score decimal);\nSELECT FROM students;`; + const pos: CaretPosition = { + lineNumber: 2, + column: 8, + }; + + const entities = parser.getAllEntities(sql, pos); + + // Find the table in FROM clause + const tableEntity = entities.find( + (e) => e.entityContextType === EntityContextType.TABLE && e.text === 'students' + ); + expect(tableEntity).toBeDefined(); + + // Find the table definition in CREATE TABLE statement + const tableCreateEntity = entities.find( + (e) => e.entityContextType === EntityContextType.TABLE_CREATE && e.text === 'students' + ); + expect(tableCreateEntity).toBeDefined(); + + // Verify column information + if (isCommonEntityContext(tableCreateEntity)) { + expect(tableCreateEntity.columns?.length).toBe(3); + const columnTexts = tableCreateEntity.columns?.map((col) => col.text); + expect(columnTexts).toEqual(expect.arrayContaining(['id', 'name', 'score'])); + // Verify colType is extracted + const idColumn = tableCreateEntity.columns?.find((col) => col.text === 'id'); + expect(idColumn?.[AttrName.colType]?.text).toBe('int'); + } + }); }); diff --git a/test/parser/generic/suggestion/syntaxSuggestion.test.ts b/test/parser/generic/suggestion/syntaxSuggestion.test.ts index 6d43f3e3..eb626dd8 100644 --- a/test/parser/generic/suggestion/syntaxSuggestion.test.ts +++ b/test/parser/generic/suggestion/syntaxSuggestion.test.ts @@ -63,4 +63,37 @@ describe('GenericSQL Syntax Suggestion', () => { ); expect(suggestion).not.toBeUndefined(); }); + + test('Function call', () => { + const pos: CaretPosition = { + lineNumber: 29, + column: 9, + }; + const syntaxes = parser.getSuggestionAtCaretPosition( + commentOtherLine(syntaxSql, pos.lineNumber), + pos + )?.syntax; + + const suggestion = syntaxes?.find( + (syn) => syn.syntaxContextType === EntityContextType.FUNCTION + ); + expect(suggestion).not.toBeUndefined(); + expect(suggestion?.wordRanges.map((token) => token.text)).toEqual(['CONCAT']); + }); + + test('Create table column', () => { + const pos: CaretPosition = { + lineNumber: 31, + column: 26, + }; + const syntaxes = parser.getSuggestionAtCaretPosition( + commentOtherLine(syntaxSql, pos.lineNumber), + pos + )?.syntax; + + const suggestion = syntaxes?.find( + (syn) => syn.syntaxContextType === EntityContextType.COLUMN_CREATE + ); + expect(suggestion).not.toBeUndefined(); + }); });