From f2b4ff00519388308609d2857cd13227b15a2821 Mon Sep 17 00:00:00 2001 From: Martin Davis Date: Wed, 2 Mar 2022 16:53:48 -0800 Subject: [PATCH 1/3] Add CQl arithmetic expressions --- FEATURES.md | 10 +- hugo/content/usage/cql.md | 11 + internal/cql/CQL.g4 | 20 +- internal/cql/CQL.tokens | 145 ++-- internal/cql/CqlLexer.g4 | 6 + internal/cql/CqlLexer.tokens | 145 ++-- internal/cql/cql.go | 29 +- internal/cql/cql_base_listener.go | 14 +- internal/cql/cql_lexer.go | 677 ++++++++--------- internal/cql/cql_listener.go | 14 +- internal/cql/cql_parser.go | 1138 +++++++++++++++++------------ internal/cql/cql_test.go | 9 + 12 files changed, 1257 insertions(+), 961 deletions(-) diff --git a/FEATURES.md b/FEATURES.md index f6160f26..7fb1a59a 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -64,9 +64,8 @@ It includes [*OGC API - Features*](http://docs.opengeospatial.org/is/17-069r3/17 - [x] property names - [x] character literals - [x] numeric literals -- [x] geometry literals - - `POINT`,`LINESTRING`,`POLYGON`,`MULTIPOINT`,`MULTILINESTRING`,`MULTIPOLYGON`,`GEOMETRYCOLLECTION`,`ENVELOPE` -- [ ] temporal literals +- [x] arithemetic expressions + - `+`,`-`,`*`,`/`, `%`, parentheses - [x] binary comparisons - `<`,`<=`,`>`,`>=`,`=`,`<>` - [x] `property [NOT] BETWEEN a AND B` @@ -74,11 +73,14 @@ It includes [*OGC API - Features*](http://docs.opengeospatial.org/is/17-069r3/17 - [x] `property [NOT] (LIKE | ILIKE) pattern` - `pattern` can include `%` wildcards - [x] `property [NOT] IS NULL` -- [x] boolean combinations (`AND`,`OR`,`NOT`) +- [x] boolean combinations (`AND`,`OR`,`NOT`, parentheses) +- [x] geometry literals + - `POINT`,`LINESTRING`,`POLYGON`,`MULTIPOINT`,`MULTILINESTRING`,`MULTIPOLYGON`,`GEOMETRYCOLLECTION`,`ENVELOPE` - [x] spatial predicates - `INTERSECTS`,`DISJOINT`,`CONTAINS`,`WITHIN`,`EQUALS`,`CROSSES`,`OVERLAPS`,`TOUCHES` - [x] distance predicate - `DWITHIN` +- [ ] temporal literals - [ ] temporal predicates - [ ] functions diff --git a/hugo/content/usage/cql.md b/hugo/content/usage/cql.md index 1f4c7cca..e76aa738 100644 --- a/hugo/content/usage/cql.md +++ b/hugo/content/usage/cql.md @@ -42,6 +42,17 @@ true 'it''s easy' ``` +## Arithmetic expressions + +Numeric values can be combined using the +arithmetic operators `+`,`-`,`*`,`/` and `%` (modulo), with parentheses if needed +for operator precedence. +``` +x + 3 +2 * (y - 3) +p % 10 +``` + ## Comparisons Values can be compared using conditional operators: diff --git a/internal/cql/CQL.g4 b/internal/cql/CQL.g4 index cbff50e9..beed39b0 100644 --- a/internal/cql/CQL.g4 +++ b/internal/cql/CQL.g4 @@ -45,26 +45,34 @@ predicate : binaryComparisonPredicate # an operator to test if a scalar expression is NULL or not. #============================================================================*/ -binaryComparisonPredicate : scalarExpression ComparisonOperator scalarExpression; +binaryComparisonPredicate : arithmeticExpression ComparisonOperator arithmeticExpression; likePredicate : propertyName (NOT)? ( LIKE | ILIKE ) characterLiteral; betweenPredicate : propertyName (NOT)? BETWEEN - scalarExpression AND scalarExpression ; -// (scalarExpression | temporalExpression) AND (scalarExpression | temporalExpression); + arithmeticExpression AND arithmeticExpression ; +// (scalarValue | temporalExpression) AND (scalarValue | temporalExpression); isNullPredicate : propertyName IS (NOT)? NULL; +/*============================================================================ +# Arithmetic expressions +#============================================================================*/ + +arithmeticExpression : scalarValue + | LEFTPAREN arithmeticExpression RIGHTPAREN + | arithmeticExpression ArithmeticOperator arithmeticExpression + ; + /* -# A scalar expression is the property name, a chracter literal, a numeric +# A scalar value is a property name, a chracter literal, a numeric # literal or a function/method invocation that returns a scalar value. */ -scalarExpression : propertyName +scalarValue : propertyName | characterLiteral | numericLiteral | booleanLiteral // | function -// | arithmeticExpression ; propertyName: Identifier; diff --git a/internal/cql/CQL.tokens b/internal/cql/CQL.tokens index 7c8defe6..b6b82070 100644 --- a/internal/cql/CQL.tokens +++ b/internal/cql/CQL.tokens @@ -15,78 +15,79 @@ BETWEEN=14 IS=15 NULL=16 IN=17 -SpatialOperator=18 -DistanceOperator=19 -POINT=20 -LINESTRING=21 -POLYGON=22 -MULTIPOINT=23 -MULTILINESTRING=24 -MULTIPOLYGON=25 -GEOMETRYCOLLECTION=26 -ENVELOPE=27 -NumericLiteral=28 -Identifier=29 -IdentifierStart=30 -IdentifierPart=31 -ALPHA=32 -DIGIT=33 -OCTOTHORP=34 -DOLLAR=35 -UNDERSCORE=36 -DOUBLEQUOTE=37 -PERCENT=38 -AMPERSAND=39 -QUOTE=40 -LEFTPAREN=41 -RIGHTPAREN=42 -LEFTSQUAREBRACKET=43 -RIGHTSQUAREBRACKET=44 -ASTERISK=45 -PLUS=46 -COMMA=47 -MINUS=48 -PERIOD=49 -SOLIDUS=50 -COLON=51 -SEMICOLON=52 -QUESTIONMARK=53 -VERTICALBAR=54 -BIT=55 -HEXIT=56 -UnsignedNumericLiteral=57 -SignedNumericLiteral=58 -ExactNumericLiteral=59 -ApproximateNumericLiteral=60 -Mantissa=61 -Exponent=62 -SignedInteger=63 -UnsignedInteger=64 -Sign=65 -WS=66 -CharacterStringLiteral=67 -QuotedQuote=68 +ArithmeticOperator=18 +SpatialOperator=19 +DistanceOperator=20 +POINT=21 +LINESTRING=22 +POLYGON=23 +MULTIPOINT=24 +MULTILINESTRING=25 +MULTIPOLYGON=26 +GEOMETRYCOLLECTION=27 +ENVELOPE=28 +NumericLiteral=29 +Identifier=30 +IdentifierStart=31 +IdentifierPart=32 +ALPHA=33 +DIGIT=34 +OCTOTHORP=35 +DOLLAR=36 +UNDERSCORE=37 +DOUBLEQUOTE=38 +PERCENT=39 +AMPERSAND=40 +QUOTE=41 +LEFTPAREN=42 +RIGHTPAREN=43 +LEFTSQUAREBRACKET=44 +RIGHTSQUAREBRACKET=45 +ASTERISK=46 +PLUS=47 +COMMA=48 +MINUS=49 +PERIOD=50 +SOLIDUS=51 +COLON=52 +SEMICOLON=53 +QUESTIONMARK=54 +VERTICALBAR=55 +BIT=56 +HEXIT=57 +UnsignedNumericLiteral=58 +SignedNumericLiteral=59 +ExactNumericLiteral=60 +ApproximateNumericLiteral=61 +Mantissa=62 +Exponent=63 +SignedInteger=64 +UnsignedInteger=65 +Sign=66 +WS=67 +CharacterStringLiteral=68 +QuotedQuote=69 '<'=2 '='=3 '>'=4 -'#'=34 -'$'=35 -'_'=36 -'"'=37 -'%'=38 -'&'=39 -'('=41 -')'=42 -'['=43 -']'=44 -'*'=45 -'+'=46 -','=47 -'-'=48 -'.'=49 -'/'=50 -':'=51 -';'=52 -'?'=53 -'|'=54 -'\'\''=68 +'#'=35 +'$'=36 +'_'=37 +'"'=38 +'%'=39 +'&'=40 +'('=42 +')'=43 +'['=44 +']'=45 +'*'=46 +'+'=47 +','=48 +'-'=49 +'.'=50 +'/'=51 +':'=52 +';'=53 +'?'=54 +'|'=55 +'\'\''=69 diff --git a/internal/cql/CqlLexer.g4 b/internal/cql/CqlLexer.g4 index 75b9a08d..07bba1d2 100644 --- a/internal/cql/CqlLexer.g4 +++ b/internal/cql/CqlLexer.g4 @@ -68,6 +68,12 @@ IS : I S; NULL: N U L L; IN: I N; +/*============================================================================ +# Definition of ARITHMETIC operators +#============================================================================*/ + +ArithmeticOperator : PLUS | MINUS | ASTERISK | SOLIDUS | PERCENT; + /*============================================================================ # Definition of SPATIAL operators #============================================================================*/ diff --git a/internal/cql/CqlLexer.tokens b/internal/cql/CqlLexer.tokens index 7c8defe6..b6b82070 100644 --- a/internal/cql/CqlLexer.tokens +++ b/internal/cql/CqlLexer.tokens @@ -15,78 +15,79 @@ BETWEEN=14 IS=15 NULL=16 IN=17 -SpatialOperator=18 -DistanceOperator=19 -POINT=20 -LINESTRING=21 -POLYGON=22 -MULTIPOINT=23 -MULTILINESTRING=24 -MULTIPOLYGON=25 -GEOMETRYCOLLECTION=26 -ENVELOPE=27 -NumericLiteral=28 -Identifier=29 -IdentifierStart=30 -IdentifierPart=31 -ALPHA=32 -DIGIT=33 -OCTOTHORP=34 -DOLLAR=35 -UNDERSCORE=36 -DOUBLEQUOTE=37 -PERCENT=38 -AMPERSAND=39 -QUOTE=40 -LEFTPAREN=41 -RIGHTPAREN=42 -LEFTSQUAREBRACKET=43 -RIGHTSQUAREBRACKET=44 -ASTERISK=45 -PLUS=46 -COMMA=47 -MINUS=48 -PERIOD=49 -SOLIDUS=50 -COLON=51 -SEMICOLON=52 -QUESTIONMARK=53 -VERTICALBAR=54 -BIT=55 -HEXIT=56 -UnsignedNumericLiteral=57 -SignedNumericLiteral=58 -ExactNumericLiteral=59 -ApproximateNumericLiteral=60 -Mantissa=61 -Exponent=62 -SignedInteger=63 -UnsignedInteger=64 -Sign=65 -WS=66 -CharacterStringLiteral=67 -QuotedQuote=68 +ArithmeticOperator=18 +SpatialOperator=19 +DistanceOperator=20 +POINT=21 +LINESTRING=22 +POLYGON=23 +MULTIPOINT=24 +MULTILINESTRING=25 +MULTIPOLYGON=26 +GEOMETRYCOLLECTION=27 +ENVELOPE=28 +NumericLiteral=29 +Identifier=30 +IdentifierStart=31 +IdentifierPart=32 +ALPHA=33 +DIGIT=34 +OCTOTHORP=35 +DOLLAR=36 +UNDERSCORE=37 +DOUBLEQUOTE=38 +PERCENT=39 +AMPERSAND=40 +QUOTE=41 +LEFTPAREN=42 +RIGHTPAREN=43 +LEFTSQUAREBRACKET=44 +RIGHTSQUAREBRACKET=45 +ASTERISK=46 +PLUS=47 +COMMA=48 +MINUS=49 +PERIOD=50 +SOLIDUS=51 +COLON=52 +SEMICOLON=53 +QUESTIONMARK=54 +VERTICALBAR=55 +BIT=56 +HEXIT=57 +UnsignedNumericLiteral=58 +SignedNumericLiteral=59 +ExactNumericLiteral=60 +ApproximateNumericLiteral=61 +Mantissa=62 +Exponent=63 +SignedInteger=64 +UnsignedInteger=65 +Sign=66 +WS=67 +CharacterStringLiteral=68 +QuotedQuote=69 '<'=2 '='=3 '>'=4 -'#'=34 -'$'=35 -'_'=36 -'"'=37 -'%'=38 -'&'=39 -'('=41 -')'=42 -'['=43 -']'=44 -'*'=45 -'+'=46 -','=47 -'-'=48 -'.'=49 -'/'=50 -':'=51 -';'=52 -'?'=53 -'|'=54 -'\'\''=68 +'#'=35 +'$'=36 +'_'=37 +'"'=38 +'%'=39 +'&'=40 +'('=42 +')'=43 +'['=44 +']'=45 +'*'=46 +'+'=47 +','=48 +'-'=49 +'.'=50 +'/'=51 +':'=52 +';'=53 +'?'=54 +'|'=55 +'\'\''=69 diff --git a/internal/cql/cql.go b/internal/cql/cql.go index 966cb4cf..be8115a7 100644 --- a/internal/cql/cql.go +++ b/internal/cql/cql.go @@ -58,7 +58,7 @@ func syntaxErrorMsg(input string, col int) string { } //-- extract parts and insert error flag - before := input[start : col-1] + before := input[start:col] after := input[col:end] msg := "\"" + dots1 + before + " !!>> " + after + dots2 + "\"" return msg @@ -232,14 +232,16 @@ func (l *cqlListener) ExitPredicate(ctx *PredicateContext) { } func (l *cqlListener) ExitBinaryComparisonPredicate(ctx *BinaryComparisonPredicateContext) { - expr1 := l.sqlFor(ctx.ScalarExpression(0)) - expr2 := l.sqlFor(ctx.ScalarExpression(1)) + //expr1 := l.sqlFor(ctx.ScalarExpression(0)) + //expr2 := l.sqlFor(ctx.ScalarExpression(1)) + expr1 := l.sqlFor(ctx.ArithmeticExpression(0)) + expr2 := l.sqlFor(ctx.ArithmeticExpression(1)) op := getNodeText(ctx.ComparisonOperator()) sql := expr1 + " " + op + " " + expr2 l.saveSql(ctx, sql) } -func (l *cqlListener) ExitScalarExpression(ctx *ScalarExpressionContext) { +func (l *cqlListener) ExitScalarValue(ctx *ScalarValueContext) { var sql string if ctx.PropertyName() != nil { sql = quotedName(getText(ctx.PropertyName())) @@ -253,6 +255,21 @@ func (l *cqlListener) ExitScalarExpression(ctx *ScalarExpressionContext) { l.saveSql(ctx, sql) } +func (l *cqlListener) ExitArithmeticExpression(ctx *ArithmeticExpressionContext) { + var sql string + if ctx.LEFTPAREN() != nil { + sql = "(" + l.sqlFor(ctx.ArithmeticExpression(0)) + ")" + } else if ctx.ArithmeticOperator() != nil { + expr1 := l.sqlFor(ctx.ArithmeticExpression(0)) + expr2 := l.sqlFor(ctx.ArithmeticExpression(1)) + op := getNodeText(ctx.ArithmeticOperator()) + sql = expr1 + " " + op + " " + expr2 + } else { + sql = l.sqlFor(ctx.ScalarValue()) + } + l.saveSql(ctx, sql) +} + func (l *cqlListener) ExitLikePredicate(ctx *LikePredicateContext) { var sb strings.Builder sb.WriteString(quotedName(getText(ctx.PropertyName()))) @@ -274,8 +291,8 @@ func (l *cqlListener) ExitBetweenPredicate(ctx *BetweenPredicateContext) { if ctx.NOT() != nil { not = " NOT" } - expr1 := l.sqlFor(ctx.ScalarExpression(0)) - expr2 := l.sqlFor(ctx.ScalarExpression(1)) + expr1 := l.sqlFor(ctx.ArithmeticExpression(0)) + expr2 := l.sqlFor(ctx.ArithmeticExpression(1)) sql := " " + prop + not + " BETWEEN " + expr1 + " AND " + expr2 l.saveSql(ctx, sql) } diff --git a/internal/cql/cql_base_listener.go b/internal/cql/cql_base_listener.go index 14737b75..853ca958 100644 --- a/internal/cql/cql_base_listener.go +++ b/internal/cql/cql_base_listener.go @@ -80,11 +80,17 @@ func (s *BaseCQLListener) EnterIsNullPredicate(ctx *IsNullPredicateContext) {} // ExitIsNullPredicate is called when production isNullPredicate is exited. func (s *BaseCQLListener) ExitIsNullPredicate(ctx *IsNullPredicateContext) {} -// EnterScalarExpression is called when production scalarExpression is entered. -func (s *BaseCQLListener) EnterScalarExpression(ctx *ScalarExpressionContext) {} +// EnterArithmeticExpression is called when production arithmeticExpression is entered. +func (s *BaseCQLListener) EnterArithmeticExpression(ctx *ArithmeticExpressionContext) {} -// ExitScalarExpression is called when production scalarExpression is exited. -func (s *BaseCQLListener) ExitScalarExpression(ctx *ScalarExpressionContext) {} +// ExitArithmeticExpression is called when production arithmeticExpression is exited. +func (s *BaseCQLListener) ExitArithmeticExpression(ctx *ArithmeticExpressionContext) {} + +// EnterScalarValue is called when production scalarValue is entered. +func (s *BaseCQLListener) EnterScalarValue(ctx *ScalarValueContext) {} + +// ExitScalarValue is called when production scalarValue is exited. +func (s *BaseCQLListener) ExitScalarValue(ctx *ScalarValueContext) {} // EnterPropertyName is called when production propertyName is entered. func (s *BaseCQLListener) EnterPropertyName(ctx *PropertyNameContext) {} diff --git a/internal/cql/cql_lexer.go b/internal/cql/cql_lexer.go index bac97bb9..cf8dd91d 100644 --- a/internal/cql/cql_lexer.go +++ b/internal/cql/cql_lexer.go @@ -14,7 +14,7 @@ var _ = fmt.Printf var _ = unicode.IsLetter var serializedLexerAtn = []uint16{ - 3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 70, 648, + 3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 71, 657, 8, 1, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, @@ -33,276 +33,281 @@ var serializedLexerAtn = []uint16{ 80, 4, 81, 9, 81, 4, 82, 9, 82, 4, 83, 9, 83, 4, 84, 9, 84, 4, 85, 9, 85, 4, 86, 9, 86, 4, 87, 9, 87, 4, 88, 9, 88, 4, 89, 9, 89, 4, 90, 9, 90, 4, 91, 9, 91, 4, 92, 9, 92, 4, 93, 9, 93, 4, 94, 9, 94, 4, 95, 9, 95, 4, 96, - 9, 96, 4, 97, 9, 97, 3, 2, 3, 2, 3, 3, 3, 3, 3, 4, 3, 4, 3, 5, 3, 5, 3, - 6, 3, 6, 3, 7, 3, 7, 3, 8, 3, 8, 3, 9, 3, 9, 3, 10, 3, 10, 3, 11, 3, 11, - 3, 12, 3, 12, 3, 13, 3, 13, 3, 14, 3, 14, 3, 15, 3, 15, 3, 16, 3, 16, 3, - 17, 3, 17, 3, 18, 3, 18, 3, 19, 3, 19, 3, 20, 3, 20, 3, 21, 3, 21, 3, 22, - 3, 22, 3, 23, 3, 23, 3, 24, 3, 24, 3, 25, 3, 25, 3, 26, 3, 26, 3, 27, 3, - 27, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 5, 28, 255, 10, 28, 3, 29, - 3, 29, 3, 30, 3, 30, 3, 31, 3, 31, 3, 32, 3, 32, 3, 32, 3, 33, 3, 33, 3, - 33, 3, 34, 3, 34, 3, 34, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, - 3, 35, 3, 35, 3, 35, 3, 35, 5, 35, 283, 10, 35, 3, 36, 3, 36, 3, 36, 3, - 36, 3, 37, 3, 37, 3, 37, 3, 38, 3, 38, 3, 38, 3, 38, 3, 39, 3, 39, 3, 39, - 3, 39, 3, 39, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 41, 3, 41, 3, - 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 42, 3, 42, 3, 42, 3, 43, 3, 43, - 3, 43, 3, 43, 3, 43, 3, 44, 3, 44, 3, 44, 3, 45, 3, 45, 3, 45, 3, 45, 3, - 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, - 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, - 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, - 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, - 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, - 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, - 45, 5, 45, 394, 10, 45, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, - 3, 46, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 48, 3, 48, 3, 48, 3, - 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, 49, 3, 49, 3, 49, - 3, 49, 3, 49, 3, 49, 3, 49, 3, 49, 3, 50, 3, 50, 3, 50, 3, 50, 3, 50, 3, - 50, 3, 50, 3, 50, 3, 50, 3, 50, 3, 50, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, - 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, - 51, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, - 3, 52, 3, 52, 3, 52, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, 3, - 53, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, - 3, 53, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, - 55, 3, 55, 5, 55, 499, 10, 55, 3, 56, 3, 56, 3, 56, 3, 56, 3, 56, 3, 57, - 3, 57, 7, 57, 508, 10, 57, 12, 57, 14, 57, 511, 11, 57, 3, 57, 3, 57, 3, - 57, 3, 57, 5, 57, 517, 10, 57, 3, 58, 3, 58, 3, 59, 3, 59, 3, 59, 3, 59, - 5, 59, 525, 10, 59, 3, 60, 3, 60, 3, 61, 3, 61, 3, 62, 3, 62, 3, 63, 3, - 63, 3, 64, 3, 64, 3, 65, 3, 65, 3, 66, 3, 66, 3, 67, 3, 67, 3, 68, 3, 68, - 3, 69, 3, 69, 3, 70, 3, 70, 3, 71, 3, 71, 3, 72, 3, 72, 3, 73, 3, 73, 3, - 74, 3, 74, 3, 75, 3, 75, 3, 76, 3, 76, 3, 77, 3, 77, 3, 78, 3, 78, 3, 79, - 3, 79, 3, 80, 3, 80, 3, 81, 3, 81, 3, 82, 3, 82, 3, 83, 3, 83, 3, 84, 3, - 84, 3, 84, 3, 84, 3, 84, 3, 84, 3, 84, 5, 84, 582, 10, 84, 3, 85, 3, 85, - 5, 85, 586, 10, 85, 3, 86, 5, 86, 589, 10, 86, 3, 86, 3, 86, 5, 86, 593, - 10, 86, 3, 87, 3, 87, 3, 87, 5, 87, 598, 10, 87, 5, 87, 600, 10, 87, 3, - 87, 3, 87, 3, 87, 5, 87, 605, 10, 87, 3, 88, 3, 88, 3, 88, 3, 88, 3, 89, - 3, 89, 3, 90, 3, 90, 3, 91, 5, 91, 616, 10, 91, 3, 91, 3, 91, 3, 92, 6, - 92, 621, 10, 92, 13, 92, 14, 92, 622, 3, 93, 3, 93, 5, 93, 627, 10, 93, - 3, 94, 6, 94, 630, 10, 94, 13, 94, 14, 94, 631, 3, 94, 3, 94, 3, 95, 3, - 95, 3, 95, 3, 95, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, 97, 3, 97, 3, 97, - 3, 97, 2, 2, 98, 4, 2, 6, 2, 8, 2, 10, 2, 12, 2, 14, 2, 16, 2, 18, 2, 20, + 9, 96, 4, 97, 9, 97, 4, 98, 9, 98, 3, 2, 3, 2, 3, 3, 3, 3, 3, 4, 3, 4, + 3, 5, 3, 5, 3, 6, 3, 6, 3, 7, 3, 7, 3, 8, 3, 8, 3, 9, 3, 9, 3, 10, 3, 10, + 3, 11, 3, 11, 3, 12, 3, 12, 3, 13, 3, 13, 3, 14, 3, 14, 3, 15, 3, 15, 3, + 16, 3, 16, 3, 17, 3, 17, 3, 18, 3, 18, 3, 19, 3, 19, 3, 20, 3, 20, 3, 21, + 3, 21, 3, 22, 3, 22, 3, 23, 3, 23, 3, 24, 3, 24, 3, 25, 3, 25, 3, 26, 3, + 26, 3, 27, 3, 27, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 5, 28, 257, + 10, 28, 3, 29, 3, 29, 3, 30, 3, 30, 3, 31, 3, 31, 3, 32, 3, 32, 3, 32, + 3, 33, 3, 33, 3, 33, 3, 34, 3, 34, 3, 34, 3, 35, 3, 35, 3, 35, 3, 35, 3, + 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 5, 35, 285, 10, 35, 3, 36, + 3, 36, 3, 36, 3, 36, 3, 37, 3, 37, 3, 37, 3, 38, 3, 38, 3, 38, 3, 38, 3, + 39, 3, 39, 3, 39, 3, 39, 3, 39, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, + 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 42, 3, 42, 3, + 42, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 44, 3, 44, 3, 44, 3, 45, 3, 45, + 3, 45, 3, 45, 3, 45, 5, 45, 333, 10, 45, 3, 46, 3, 46, 3, 46, 3, 46, 3, + 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, + 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, + 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, + 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, + 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, + 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, + 46, 5, 46, 403, 10, 46, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, + 3, 47, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, 49, 3, 49, 3, 49, 3, + 49, 3, 49, 3, 49, 3, 49, 3, 49, 3, 49, 3, 49, 3, 49, 3, 50, 3, 50, 3, 50, + 3, 50, 3, 50, 3, 50, 3, 50, 3, 50, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, + 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, + 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, + 52, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, + 3, 53, 3, 53, 3, 53, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, + 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, + 3, 54, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, + 56, 3, 56, 5, 56, 508, 10, 56, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 58, + 3, 58, 7, 58, 517, 10, 58, 12, 58, 14, 58, 520, 11, 58, 3, 58, 3, 58, 3, + 58, 3, 58, 5, 58, 526, 10, 58, 3, 59, 3, 59, 3, 60, 3, 60, 3, 60, 3, 60, + 5, 60, 534, 10, 60, 3, 61, 3, 61, 3, 62, 3, 62, 3, 63, 3, 63, 3, 64, 3, + 64, 3, 65, 3, 65, 3, 66, 3, 66, 3, 67, 3, 67, 3, 68, 3, 68, 3, 69, 3, 69, + 3, 70, 3, 70, 3, 71, 3, 71, 3, 72, 3, 72, 3, 73, 3, 73, 3, 74, 3, 74, 3, + 75, 3, 75, 3, 76, 3, 76, 3, 77, 3, 77, 3, 78, 3, 78, 3, 79, 3, 79, 3, 80, + 3, 80, 3, 81, 3, 81, 3, 82, 3, 82, 3, 83, 3, 83, 3, 84, 3, 84, 3, 85, 3, + 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 5, 85, 591, 10, 85, 3, 86, 3, 86, + 5, 86, 595, 10, 86, 3, 87, 5, 87, 598, 10, 87, 3, 87, 3, 87, 5, 87, 602, + 10, 87, 3, 88, 3, 88, 3, 88, 5, 88, 607, 10, 88, 5, 88, 609, 10, 88, 3, + 88, 3, 88, 3, 88, 5, 88, 614, 10, 88, 3, 89, 3, 89, 3, 89, 3, 89, 3, 90, + 3, 90, 3, 91, 3, 91, 3, 92, 5, 92, 625, 10, 92, 3, 92, 3, 92, 3, 93, 6, + 93, 630, 10, 93, 13, 93, 14, 93, 631, 3, 94, 3, 94, 5, 94, 636, 10, 94, + 3, 95, 6, 95, 639, 10, 95, 13, 95, 14, 95, 640, 3, 95, 3, 95, 3, 96, 3, + 96, 3, 96, 3, 96, 3, 97, 3, 97, 3, 97, 3, 97, 3, 97, 3, 98, 3, 98, 3, 98, + 3, 98, 2, 2, 99, 4, 2, 6, 2, 8, 2, 10, 2, 12, 2, 14, 2, 16, 2, 18, 2, 20, 2, 22, 2, 24, 2, 26, 2, 28, 2, 30, 2, 32, 2, 34, 2, 36, 2, 38, 2, 40, 2, 42, 2, 44, 2, 46, 2, 48, 2, 50, 2, 52, 2, 54, 2, 56, 3, 58, 4, 60, 5, 62, 6, 64, 7, 66, 8, 68, 9, 70, 10, 72, 11, 74, 12, 76, 13, 78, 14, 80, 15, 82, 16, 84, 17, 86, 18, 88, 19, 90, 20, 92, 21, 94, 22, 96, 23, 98, 24, - 100, 25, 102, 26, 104, 27, 106, 28, 108, 29, 110, 30, 112, 2, 114, 31, + 100, 25, 102, 26, 104, 27, 106, 28, 108, 29, 110, 30, 112, 31, 114, 2, 116, 32, 118, 33, 120, 34, 122, 35, 124, 36, 126, 37, 128, 38, 130, 39, 132, 40, 134, 41, 136, 42, 138, 43, 140, 44, 142, 45, 144, 46, 146, 47, 148, 48, 150, 49, 152, 50, 154, 51, 156, 52, 158, 53, 160, 54, 162, 55, 164, 56, 166, 57, 168, 58, 170, 59, 172, 60, 174, 61, 176, 62, 178, 63, - 180, 64, 182, 65, 184, 66, 186, 67, 188, 68, 190, 69, 192, 70, 194, 2, - 4, 2, 3, 32, 4, 2, 67, 67, 99, 99, 4, 2, 68, 68, 100, 100, 4, 2, 69, 69, - 101, 101, 4, 2, 70, 70, 102, 102, 4, 2, 71, 71, 103, 103, 4, 2, 72, 72, - 104, 104, 4, 2, 73, 73, 105, 105, 4, 2, 74, 74, 106, 106, 4, 2, 75, 75, - 107, 107, 4, 2, 76, 76, 108, 108, 4, 2, 77, 77, 109, 109, 4, 2, 78, 78, - 110, 110, 4, 2, 79, 79, 111, 111, 4, 2, 80, 80, 112, 112, 4, 2, 81, 81, - 113, 113, 4, 2, 82, 82, 114, 114, 4, 2, 83, 83, 115, 115, 4, 2, 84, 84, - 116, 116, 4, 2, 85, 85, 117, 117, 4, 2, 86, 86, 118, 118, 4, 2, 87, 87, - 119, 119, 4, 2, 88, 88, 120, 120, 4, 2, 89, 89, 121, 121, 4, 2, 90, 90, - 122, 122, 4, 2, 91, 91, 123, 123, 4, 2, 92, 92, 124, 124, 4, 2, 67, 92, - 99, 124, 3, 2, 50, 59, 5, 2, 11, 12, 15, 15, 34, 34, 3, 2, 41, 41, 2, 655, - 2, 56, 3, 2, 2, 2, 2, 58, 3, 2, 2, 2, 2, 60, 3, 2, 2, 2, 2, 62, 3, 2, 2, - 2, 2, 64, 3, 2, 2, 2, 2, 66, 3, 2, 2, 2, 2, 68, 3, 2, 2, 2, 2, 70, 3, 2, - 2, 2, 2, 72, 3, 2, 2, 2, 2, 74, 3, 2, 2, 2, 2, 76, 3, 2, 2, 2, 2, 78, 3, - 2, 2, 2, 2, 80, 3, 2, 2, 2, 2, 82, 3, 2, 2, 2, 2, 84, 3, 2, 2, 2, 2, 86, - 3, 2, 2, 2, 2, 88, 3, 2, 2, 2, 2, 90, 3, 2, 2, 2, 2, 92, 3, 2, 2, 2, 2, - 94, 3, 2, 2, 2, 2, 96, 3, 2, 2, 2, 2, 98, 3, 2, 2, 2, 2, 100, 3, 2, 2, - 2, 2, 102, 3, 2, 2, 2, 2, 104, 3, 2, 2, 2, 2, 106, 3, 2, 2, 2, 2, 108, - 3, 2, 2, 2, 2, 110, 3, 2, 2, 2, 2, 112, 3, 2, 2, 2, 2, 114, 3, 2, 2, 2, - 2, 116, 3, 2, 2, 2, 2, 118, 3, 2, 2, 2, 2, 120, 3, 2, 2, 2, 2, 122, 3, - 2, 2, 2, 2, 124, 3, 2, 2, 2, 2, 126, 3, 2, 2, 2, 2, 128, 3, 2, 2, 2, 2, - 130, 3, 2, 2, 2, 2, 132, 3, 2, 2, 2, 2, 134, 3, 2, 2, 2, 2, 136, 3, 2, - 2, 2, 2, 138, 3, 2, 2, 2, 2, 140, 3, 2, 2, 2, 2, 142, 3, 2, 2, 2, 2, 144, - 3, 2, 2, 2, 2, 146, 3, 2, 2, 2, 2, 148, 3, 2, 2, 2, 2, 150, 3, 2, 2, 2, - 2, 152, 3, 2, 2, 2, 2, 154, 3, 2, 2, 2, 2, 156, 3, 2, 2, 2, 2, 158, 3, - 2, 2, 2, 2, 160, 3, 2, 2, 2, 2, 162, 3, 2, 2, 2, 2, 164, 3, 2, 2, 2, 2, - 166, 3, 2, 2, 2, 2, 168, 3, 2, 2, 2, 2, 170, 3, 2, 2, 2, 2, 172, 3, 2, - 2, 2, 2, 174, 3, 2, 2, 2, 2, 176, 3, 2, 2, 2, 2, 178, 3, 2, 2, 2, 2, 180, - 3, 2, 2, 2, 2, 182, 3, 2, 2, 2, 2, 184, 3, 2, 2, 2, 2, 186, 3, 2, 2, 2, - 2, 188, 3, 2, 2, 2, 3, 190, 3, 2, 2, 2, 3, 192, 3, 2, 2, 2, 3, 194, 3, - 2, 2, 2, 4, 196, 3, 2, 2, 2, 6, 198, 3, 2, 2, 2, 8, 200, 3, 2, 2, 2, 10, - 202, 3, 2, 2, 2, 12, 204, 3, 2, 2, 2, 14, 206, 3, 2, 2, 2, 16, 208, 3, - 2, 2, 2, 18, 210, 3, 2, 2, 2, 20, 212, 3, 2, 2, 2, 22, 214, 3, 2, 2, 2, - 24, 216, 3, 2, 2, 2, 26, 218, 3, 2, 2, 2, 28, 220, 3, 2, 2, 2, 30, 222, - 3, 2, 2, 2, 32, 224, 3, 2, 2, 2, 34, 226, 3, 2, 2, 2, 36, 228, 3, 2, 2, - 2, 38, 230, 3, 2, 2, 2, 40, 232, 3, 2, 2, 2, 42, 234, 3, 2, 2, 2, 44, 236, - 3, 2, 2, 2, 46, 238, 3, 2, 2, 2, 48, 240, 3, 2, 2, 2, 50, 242, 3, 2, 2, - 2, 52, 244, 3, 2, 2, 2, 54, 246, 3, 2, 2, 2, 56, 254, 3, 2, 2, 2, 58, 256, - 3, 2, 2, 2, 60, 258, 3, 2, 2, 2, 62, 260, 3, 2, 2, 2, 64, 262, 3, 2, 2, - 2, 66, 265, 3, 2, 2, 2, 68, 268, 3, 2, 2, 2, 70, 282, 3, 2, 2, 2, 72, 284, - 3, 2, 2, 2, 74, 288, 3, 2, 2, 2, 76, 291, 3, 2, 2, 2, 78, 295, 3, 2, 2, - 2, 80, 300, 3, 2, 2, 2, 82, 306, 3, 2, 2, 2, 84, 314, 3, 2, 2, 2, 86, 317, - 3, 2, 2, 2, 88, 322, 3, 2, 2, 2, 90, 393, 3, 2, 2, 2, 92, 395, 3, 2, 2, - 2, 94, 403, 3, 2, 2, 2, 96, 409, 3, 2, 2, 2, 98, 420, 3, 2, 2, 2, 100, - 428, 3, 2, 2, 2, 102, 439, 3, 2, 2, 2, 104, 455, 3, 2, 2, 2, 106, 468, - 3, 2, 2, 2, 108, 487, 3, 2, 2, 2, 110, 498, 3, 2, 2, 2, 112, 500, 3, 2, - 2, 2, 114, 516, 3, 2, 2, 2, 116, 518, 3, 2, 2, 2, 118, 524, 3, 2, 2, 2, - 120, 526, 3, 2, 2, 2, 122, 528, 3, 2, 2, 2, 124, 530, 3, 2, 2, 2, 126, - 532, 3, 2, 2, 2, 128, 534, 3, 2, 2, 2, 130, 536, 3, 2, 2, 2, 132, 538, - 3, 2, 2, 2, 134, 540, 3, 2, 2, 2, 136, 542, 3, 2, 2, 2, 138, 544, 3, 2, - 2, 2, 140, 546, 3, 2, 2, 2, 142, 548, 3, 2, 2, 2, 144, 550, 3, 2, 2, 2, - 146, 552, 3, 2, 2, 2, 148, 554, 3, 2, 2, 2, 150, 556, 3, 2, 2, 2, 152, - 558, 3, 2, 2, 2, 154, 560, 3, 2, 2, 2, 156, 562, 3, 2, 2, 2, 158, 564, - 3, 2, 2, 2, 160, 566, 3, 2, 2, 2, 162, 568, 3, 2, 2, 2, 164, 570, 3, 2, - 2, 2, 166, 572, 3, 2, 2, 2, 168, 581, 3, 2, 2, 2, 170, 585, 3, 2, 2, 2, - 172, 592, 3, 2, 2, 2, 174, 604, 3, 2, 2, 2, 176, 606, 3, 2, 2, 2, 178, - 610, 3, 2, 2, 2, 180, 612, 3, 2, 2, 2, 182, 615, 3, 2, 2, 2, 184, 620, - 3, 2, 2, 2, 186, 626, 3, 2, 2, 2, 188, 629, 3, 2, 2, 2, 190, 635, 3, 2, - 2, 2, 192, 639, 3, 2, 2, 2, 194, 644, 3, 2, 2, 2, 196, 197, 9, 2, 2, 2, - 197, 5, 3, 2, 2, 2, 198, 199, 9, 3, 2, 2, 199, 7, 3, 2, 2, 2, 200, 201, - 9, 4, 2, 2, 201, 9, 3, 2, 2, 2, 202, 203, 9, 5, 2, 2, 203, 11, 3, 2, 2, - 2, 204, 205, 9, 6, 2, 2, 205, 13, 3, 2, 2, 2, 206, 207, 9, 7, 2, 2, 207, - 15, 3, 2, 2, 2, 208, 209, 9, 8, 2, 2, 209, 17, 3, 2, 2, 2, 210, 211, 9, - 9, 2, 2, 211, 19, 3, 2, 2, 2, 212, 213, 9, 10, 2, 2, 213, 21, 3, 2, 2, - 2, 214, 215, 9, 11, 2, 2, 215, 23, 3, 2, 2, 2, 216, 217, 9, 12, 2, 2, 217, - 25, 3, 2, 2, 2, 218, 219, 9, 13, 2, 2, 219, 27, 3, 2, 2, 2, 220, 221, 9, - 14, 2, 2, 221, 29, 3, 2, 2, 2, 222, 223, 9, 15, 2, 2, 223, 31, 3, 2, 2, - 2, 224, 225, 9, 16, 2, 2, 225, 33, 3, 2, 2, 2, 226, 227, 9, 17, 2, 2, 227, - 35, 3, 2, 2, 2, 228, 229, 9, 18, 2, 2, 229, 37, 3, 2, 2, 2, 230, 231, 9, - 19, 2, 2, 231, 39, 3, 2, 2, 2, 232, 233, 9, 20, 2, 2, 233, 41, 3, 2, 2, - 2, 234, 235, 9, 21, 2, 2, 235, 43, 3, 2, 2, 2, 236, 237, 9, 22, 2, 2, 237, - 45, 3, 2, 2, 2, 238, 239, 9, 23, 2, 2, 239, 47, 3, 2, 2, 2, 240, 241, 9, - 24, 2, 2, 241, 49, 3, 2, 2, 2, 242, 243, 9, 25, 2, 2, 243, 51, 3, 2, 2, - 2, 244, 245, 9, 26, 2, 2, 245, 53, 3, 2, 2, 2, 246, 247, 9, 27, 2, 2, 247, - 55, 3, 2, 2, 2, 248, 255, 5, 60, 30, 2, 249, 255, 5, 64, 32, 2, 250, 255, - 5, 58, 29, 2, 251, 255, 5, 62, 31, 2, 252, 255, 5, 68, 34, 2, 253, 255, - 5, 66, 33, 2, 254, 248, 3, 2, 2, 2, 254, 249, 3, 2, 2, 2, 254, 250, 3, - 2, 2, 2, 254, 251, 3, 2, 2, 2, 254, 252, 3, 2, 2, 2, 254, 253, 3, 2, 2, - 2, 255, 57, 3, 2, 2, 2, 256, 257, 7, 62, 2, 2, 257, 59, 3, 2, 2, 2, 258, - 259, 7, 63, 2, 2, 259, 61, 3, 2, 2, 2, 260, 261, 7, 64, 2, 2, 261, 63, - 3, 2, 2, 2, 262, 263, 5, 58, 29, 2, 263, 264, 5, 62, 31, 2, 264, 65, 3, - 2, 2, 2, 265, 266, 5, 62, 31, 2, 266, 267, 5, 60, 30, 2, 267, 67, 3, 2, - 2, 2, 268, 269, 5, 58, 29, 2, 269, 270, 5, 60, 30, 2, 270, 69, 3, 2, 2, - 2, 271, 272, 5, 42, 21, 2, 272, 273, 5, 38, 19, 2, 273, 274, 5, 44, 22, - 2, 274, 275, 5, 12, 6, 2, 275, 283, 3, 2, 2, 2, 276, 277, 5, 14, 7, 2, - 277, 278, 5, 4, 2, 2, 278, 279, 5, 26, 13, 2, 279, 280, 5, 40, 20, 2, 280, - 281, 5, 12, 6, 2, 281, 283, 3, 2, 2, 2, 282, 271, 3, 2, 2, 2, 282, 276, - 3, 2, 2, 2, 283, 71, 3, 2, 2, 2, 284, 285, 5, 4, 2, 2, 285, 286, 5, 30, - 15, 2, 286, 287, 5, 10, 5, 2, 287, 73, 3, 2, 2, 2, 288, 289, 5, 32, 16, - 2, 289, 290, 5, 38, 19, 2, 290, 75, 3, 2, 2, 2, 291, 292, 5, 30, 15, 2, - 292, 293, 5, 32, 16, 2, 293, 294, 5, 42, 21, 2, 294, 77, 3, 2, 2, 2, 295, - 296, 5, 26, 13, 2, 296, 297, 5, 20, 10, 2, 297, 298, 5, 24, 12, 2, 298, - 299, 5, 12, 6, 2, 299, 79, 3, 2, 2, 2, 300, 301, 5, 20, 10, 2, 301, 302, - 5, 26, 13, 2, 302, 303, 5, 20, 10, 2, 303, 304, 5, 24, 12, 2, 304, 305, - 5, 12, 6, 2, 305, 81, 3, 2, 2, 2, 306, 307, 5, 6, 3, 2, 307, 308, 5, 12, - 6, 2, 308, 309, 5, 42, 21, 2, 309, 310, 5, 48, 24, 2, 310, 311, 5, 12, - 6, 2, 311, 312, 5, 12, 6, 2, 312, 313, 5, 30, 15, 2, 313, 83, 3, 2, 2, - 2, 314, 315, 5, 20, 10, 2, 315, 316, 5, 40, 20, 2, 316, 85, 3, 2, 2, 2, - 317, 318, 5, 30, 15, 2, 318, 319, 5, 44, 22, 2, 319, 320, 5, 26, 13, 2, - 320, 321, 5, 26, 13, 2, 321, 87, 3, 2, 2, 2, 322, 323, 5, 20, 10, 2, 323, - 324, 5, 30, 15, 2, 324, 89, 3, 2, 2, 2, 325, 326, 5, 12, 6, 2, 326, 327, - 5, 36, 18, 2, 327, 328, 5, 44, 22, 2, 328, 329, 5, 4, 2, 2, 329, 330, 5, - 26, 13, 2, 330, 331, 5, 40, 20, 2, 331, 394, 3, 2, 2, 2, 332, 333, 5, 10, - 5, 2, 333, 334, 5, 20, 10, 2, 334, 335, 5, 40, 20, 2, 335, 336, 5, 22, - 11, 2, 336, 337, 5, 32, 16, 2, 337, 338, 5, 20, 10, 2, 338, 339, 5, 30, - 15, 2, 339, 340, 5, 42, 21, 2, 340, 394, 3, 2, 2, 2, 341, 342, 5, 42, 21, - 2, 342, 343, 5, 32, 16, 2, 343, 344, 5, 44, 22, 2, 344, 345, 5, 8, 4, 2, - 345, 346, 5, 18, 9, 2, 346, 347, 5, 12, 6, 2, 347, 348, 5, 40, 20, 2, 348, - 394, 3, 2, 2, 2, 349, 350, 5, 48, 24, 2, 350, 351, 5, 20, 10, 2, 351, 352, - 5, 42, 21, 2, 352, 353, 5, 18, 9, 2, 353, 354, 5, 20, 10, 2, 354, 355, - 5, 30, 15, 2, 355, 394, 3, 2, 2, 2, 356, 357, 5, 32, 16, 2, 357, 358, 5, - 46, 23, 2, 358, 359, 5, 12, 6, 2, 359, 360, 5, 38, 19, 2, 360, 361, 5, - 26, 13, 2, 361, 362, 5, 4, 2, 2, 362, 363, 5, 34, 17, 2, 363, 364, 5, 40, - 20, 2, 364, 394, 3, 2, 2, 2, 365, 366, 5, 8, 4, 2, 366, 367, 5, 38, 19, - 2, 367, 368, 5, 32, 16, 2, 368, 369, 5, 40, 20, 2, 369, 370, 5, 40, 20, - 2, 370, 371, 5, 12, 6, 2, 371, 372, 5, 40, 20, 2, 372, 394, 3, 2, 2, 2, - 373, 374, 5, 20, 10, 2, 374, 375, 5, 30, 15, 2, 375, 376, 5, 42, 21, 2, - 376, 377, 5, 12, 6, 2, 377, 378, 5, 38, 19, 2, 378, 379, 5, 40, 20, 2, - 379, 380, 5, 12, 6, 2, 380, 381, 5, 8, 4, 2, 381, 382, 5, 42, 21, 2, 382, - 383, 5, 40, 20, 2, 383, 394, 3, 2, 2, 2, 384, 385, 5, 8, 4, 2, 385, 386, - 5, 32, 16, 2, 386, 387, 5, 30, 15, 2, 387, 388, 5, 42, 21, 2, 388, 389, - 5, 4, 2, 2, 389, 390, 5, 20, 10, 2, 390, 391, 5, 30, 15, 2, 391, 392, 5, - 40, 20, 2, 392, 394, 3, 2, 2, 2, 393, 325, 3, 2, 2, 2, 393, 332, 3, 2, - 2, 2, 393, 341, 3, 2, 2, 2, 393, 349, 3, 2, 2, 2, 393, 356, 3, 2, 2, 2, - 393, 365, 3, 2, 2, 2, 393, 373, 3, 2, 2, 2, 393, 384, 3, 2, 2, 2, 394, - 91, 3, 2, 2, 2, 395, 396, 5, 10, 5, 2, 396, 397, 5, 48, 24, 2, 397, 398, - 5, 20, 10, 2, 398, 399, 5, 42, 21, 2, 399, 400, 5, 18, 9, 2, 400, 401, - 5, 20, 10, 2, 401, 402, 5, 30, 15, 2, 402, 93, 3, 2, 2, 2, 403, 404, 5, - 34, 17, 2, 404, 405, 5, 32, 16, 2, 405, 406, 5, 20, 10, 2, 406, 407, 5, - 30, 15, 2, 407, 408, 5, 42, 21, 2, 408, 95, 3, 2, 2, 2, 409, 410, 5, 26, - 13, 2, 410, 411, 5, 20, 10, 2, 411, 412, 5, 30, 15, 2, 412, 413, 5, 12, - 6, 2, 413, 414, 5, 40, 20, 2, 414, 415, 5, 42, 21, 2, 415, 416, 5, 38, - 19, 2, 416, 417, 5, 20, 10, 2, 417, 418, 5, 30, 15, 2, 418, 419, 5, 16, - 8, 2, 419, 97, 3, 2, 2, 2, 420, 421, 5, 34, 17, 2, 421, 422, 5, 32, 16, - 2, 422, 423, 5, 26, 13, 2, 423, 424, 5, 52, 26, 2, 424, 425, 5, 16, 8, - 2, 425, 426, 5, 32, 16, 2, 426, 427, 5, 30, 15, 2, 427, 99, 3, 2, 2, 2, - 428, 429, 5, 28, 14, 2, 429, 430, 5, 44, 22, 2, 430, 431, 5, 26, 13, 2, - 431, 432, 5, 42, 21, 2, 432, 433, 5, 20, 10, 2, 433, 434, 5, 34, 17, 2, - 434, 435, 5, 32, 16, 2, 435, 436, 5, 20, 10, 2, 436, 437, 5, 30, 15, 2, - 437, 438, 5, 42, 21, 2, 438, 101, 3, 2, 2, 2, 439, 440, 5, 28, 14, 2, 440, - 441, 5, 44, 22, 2, 441, 442, 5, 26, 13, 2, 442, 443, 5, 42, 21, 2, 443, - 444, 5, 20, 10, 2, 444, 445, 5, 26, 13, 2, 445, 446, 5, 20, 10, 2, 446, - 447, 5, 30, 15, 2, 447, 448, 5, 12, 6, 2, 448, 449, 5, 40, 20, 2, 449, - 450, 5, 42, 21, 2, 450, 451, 5, 38, 19, 2, 451, 452, 5, 20, 10, 2, 452, - 453, 5, 30, 15, 2, 453, 454, 5, 16, 8, 2, 454, 103, 3, 2, 2, 2, 455, 456, - 5, 28, 14, 2, 456, 457, 5, 44, 22, 2, 457, 458, 5, 26, 13, 2, 458, 459, - 5, 42, 21, 2, 459, 460, 5, 20, 10, 2, 460, 461, 5, 34, 17, 2, 461, 462, - 5, 32, 16, 2, 462, 463, 5, 26, 13, 2, 463, 464, 5, 52, 26, 2, 464, 465, - 5, 16, 8, 2, 465, 466, 5, 32, 16, 2, 466, 467, 5, 30, 15, 2, 467, 105, - 3, 2, 2, 2, 468, 469, 5, 16, 8, 2, 469, 470, 5, 12, 6, 2, 470, 471, 5, - 32, 16, 2, 471, 472, 5, 28, 14, 2, 472, 473, 5, 12, 6, 2, 473, 474, 5, - 42, 21, 2, 474, 475, 5, 38, 19, 2, 475, 476, 5, 52, 26, 2, 476, 477, 5, - 8, 4, 2, 477, 478, 5, 32, 16, 2, 478, 479, 5, 26, 13, 2, 479, 480, 5, 26, - 13, 2, 480, 481, 5, 12, 6, 2, 481, 482, 5, 8, 4, 2, 482, 483, 5, 42, 21, - 2, 483, 484, 5, 20, 10, 2, 484, 485, 5, 32, 16, 2, 485, 486, 5, 30, 15, - 2, 486, 107, 3, 2, 2, 2, 487, 488, 5, 12, 6, 2, 488, 489, 5, 30, 15, 2, - 489, 490, 5, 46, 23, 2, 490, 491, 5, 12, 6, 2, 491, 492, 5, 26, 13, 2, - 492, 493, 5, 32, 16, 2, 493, 494, 5, 34, 17, 2, 494, 495, 5, 12, 6, 2, - 495, 109, 3, 2, 2, 2, 496, 499, 5, 170, 85, 2, 497, 499, 5, 172, 86, 2, - 498, 496, 3, 2, 2, 2, 498, 497, 3, 2, 2, 2, 499, 111, 3, 2, 2, 2, 500, - 501, 5, 136, 68, 2, 501, 502, 3, 2, 2, 2, 502, 503, 8, 56, 2, 2, 503, 504, - 8, 56, 3, 2, 504, 113, 3, 2, 2, 2, 505, 509, 5, 116, 58, 2, 506, 508, 5, - 118, 59, 2, 507, 506, 3, 2, 2, 2, 508, 511, 3, 2, 2, 2, 509, 507, 3, 2, - 2, 2, 509, 510, 3, 2, 2, 2, 510, 517, 3, 2, 2, 2, 511, 509, 3, 2, 2, 2, - 512, 513, 5, 130, 65, 2, 513, 514, 5, 114, 57, 2, 514, 515, 5, 130, 65, - 2, 515, 517, 3, 2, 2, 2, 516, 505, 3, 2, 2, 2, 516, 512, 3, 2, 2, 2, 517, - 115, 3, 2, 2, 2, 518, 519, 5, 120, 60, 2, 519, 117, 3, 2, 2, 2, 520, 525, - 5, 120, 60, 2, 521, 525, 5, 122, 61, 2, 522, 525, 5, 128, 64, 2, 523, 525, - 5, 126, 63, 2, 524, 520, 3, 2, 2, 2, 524, 521, 3, 2, 2, 2, 524, 522, 3, - 2, 2, 2, 524, 523, 3, 2, 2, 2, 525, 119, 3, 2, 2, 2, 526, 527, 9, 28, 2, - 2, 527, 121, 3, 2, 2, 2, 528, 529, 9, 29, 2, 2, 529, 123, 3, 2, 2, 2, 530, - 531, 7, 37, 2, 2, 531, 125, 3, 2, 2, 2, 532, 533, 7, 38, 2, 2, 533, 127, - 3, 2, 2, 2, 534, 535, 7, 97, 2, 2, 535, 129, 3, 2, 2, 2, 536, 537, 7, 36, - 2, 2, 537, 131, 3, 2, 2, 2, 538, 539, 7, 39, 2, 2, 539, 133, 3, 2, 2, 2, - 540, 541, 7, 40, 2, 2, 541, 135, 3, 2, 2, 2, 542, 543, 7, 41, 2, 2, 543, - 137, 3, 2, 2, 2, 544, 545, 7, 42, 2, 2, 545, 139, 3, 2, 2, 2, 546, 547, - 7, 43, 2, 2, 547, 141, 3, 2, 2, 2, 548, 549, 7, 93, 2, 2, 549, 143, 3, - 2, 2, 2, 550, 551, 7, 95, 2, 2, 551, 145, 3, 2, 2, 2, 552, 553, 7, 44, - 2, 2, 553, 147, 3, 2, 2, 2, 554, 555, 7, 45, 2, 2, 555, 149, 3, 2, 2, 2, - 556, 557, 7, 46, 2, 2, 557, 151, 3, 2, 2, 2, 558, 559, 7, 47, 2, 2, 559, - 153, 3, 2, 2, 2, 560, 561, 7, 48, 2, 2, 561, 155, 3, 2, 2, 2, 562, 563, - 7, 49, 2, 2, 563, 157, 3, 2, 2, 2, 564, 565, 7, 60, 2, 2, 565, 159, 3, - 2, 2, 2, 566, 567, 7, 61, 2, 2, 567, 161, 3, 2, 2, 2, 568, 569, 7, 65, - 2, 2, 569, 163, 3, 2, 2, 2, 570, 571, 7, 126, 2, 2, 571, 165, 3, 2, 2, - 2, 572, 573, 4, 50, 51, 2, 573, 167, 3, 2, 2, 2, 574, 582, 5, 122, 61, - 2, 575, 582, 5, 4, 2, 2, 576, 582, 5, 6, 3, 2, 577, 582, 5, 8, 4, 2, 578, - 582, 5, 10, 5, 2, 579, 582, 5, 12, 6, 2, 580, 582, 5, 14, 7, 2, 581, 574, - 3, 2, 2, 2, 581, 575, 3, 2, 2, 2, 581, 576, 3, 2, 2, 2, 581, 577, 3, 2, - 2, 2, 581, 578, 3, 2, 2, 2, 581, 579, 3, 2, 2, 2, 581, 580, 3, 2, 2, 2, - 582, 169, 3, 2, 2, 2, 583, 586, 5, 174, 87, 2, 584, 586, 5, 176, 88, 2, - 585, 583, 3, 2, 2, 2, 585, 584, 3, 2, 2, 2, 586, 171, 3, 2, 2, 2, 587, - 589, 5, 186, 93, 2, 588, 587, 3, 2, 2, 2, 588, 589, 3, 2, 2, 2, 589, 590, - 3, 2, 2, 2, 590, 593, 5, 174, 87, 2, 591, 593, 5, 176, 88, 2, 592, 588, - 3, 2, 2, 2, 592, 591, 3, 2, 2, 2, 593, 173, 3, 2, 2, 2, 594, 599, 5, 184, - 92, 2, 595, 597, 5, 154, 77, 2, 596, 598, 5, 184, 92, 2, 597, 596, 3, 2, - 2, 2, 597, 598, 3, 2, 2, 2, 598, 600, 3, 2, 2, 2, 599, 595, 3, 2, 2, 2, - 599, 600, 3, 2, 2, 2, 600, 605, 3, 2, 2, 2, 601, 602, 5, 154, 77, 2, 602, - 603, 5, 184, 92, 2, 603, 605, 3, 2, 2, 2, 604, 594, 3, 2, 2, 2, 604, 601, - 3, 2, 2, 2, 605, 175, 3, 2, 2, 2, 606, 607, 5, 178, 89, 2, 607, 608, 7, - 71, 2, 2, 608, 609, 5, 180, 90, 2, 609, 177, 3, 2, 2, 2, 610, 611, 5, 174, - 87, 2, 611, 179, 3, 2, 2, 2, 612, 613, 5, 182, 91, 2, 613, 181, 3, 2, 2, - 2, 614, 616, 5, 186, 93, 2, 615, 614, 3, 2, 2, 2, 615, 616, 3, 2, 2, 2, - 616, 617, 3, 2, 2, 2, 617, 618, 5, 184, 92, 2, 618, 183, 3, 2, 2, 2, 619, - 621, 5, 122, 61, 2, 620, 619, 3, 2, 2, 2, 621, 622, 3, 2, 2, 2, 622, 620, - 3, 2, 2, 2, 622, 623, 3, 2, 2, 2, 623, 185, 3, 2, 2, 2, 624, 627, 5, 148, - 74, 2, 625, 627, 5, 152, 76, 2, 626, 624, 3, 2, 2, 2, 626, 625, 3, 2, 2, - 2, 627, 187, 3, 2, 2, 2, 628, 630, 9, 30, 2, 2, 629, 628, 3, 2, 2, 2, 630, - 631, 3, 2, 2, 2, 631, 629, 3, 2, 2, 2, 631, 632, 3, 2, 2, 2, 632, 633, - 3, 2, 2, 2, 633, 634, 8, 94, 4, 2, 634, 189, 3, 2, 2, 2, 635, 636, 7, 41, - 2, 2, 636, 637, 3, 2, 2, 2, 637, 638, 8, 95, 5, 2, 638, 191, 3, 2, 2, 2, - 639, 640, 7, 41, 2, 2, 640, 641, 7, 41, 2, 2, 641, 642, 3, 2, 2, 2, 642, - 643, 8, 96, 2, 2, 643, 193, 3, 2, 2, 2, 644, 645, 10, 31, 2, 2, 645, 646, - 3, 2, 2, 2, 646, 647, 8, 97, 2, 2, 647, 195, 3, 2, 2, 2, 22, 2, 3, 254, - 282, 393, 498, 509, 516, 524, 581, 585, 588, 592, 597, 599, 604, 615, 622, - 626, 631, 6, 5, 2, 2, 4, 3, 2, 8, 2, 2, 4, 2, 2, + 180, 64, 182, 65, 184, 66, 186, 67, 188, 68, 190, 69, 192, 70, 194, 71, + 196, 2, 4, 2, 3, 32, 4, 2, 67, 67, 99, 99, 4, 2, 68, 68, 100, 100, 4, 2, + 69, 69, 101, 101, 4, 2, 70, 70, 102, 102, 4, 2, 71, 71, 103, 103, 4, 2, + 72, 72, 104, 104, 4, 2, 73, 73, 105, 105, 4, 2, 74, 74, 106, 106, 4, 2, + 75, 75, 107, 107, 4, 2, 76, 76, 108, 108, 4, 2, 77, 77, 109, 109, 4, 2, + 78, 78, 110, 110, 4, 2, 79, 79, 111, 111, 4, 2, 80, 80, 112, 112, 4, 2, + 81, 81, 113, 113, 4, 2, 82, 82, 114, 114, 4, 2, 83, 83, 115, 115, 4, 2, + 84, 84, 116, 116, 4, 2, 85, 85, 117, 117, 4, 2, 86, 86, 118, 118, 4, 2, + 87, 87, 119, 119, 4, 2, 88, 88, 120, 120, 4, 2, 89, 89, 121, 121, 4, 2, + 90, 90, 122, 122, 4, 2, 91, 91, 123, 123, 4, 2, 92, 92, 124, 124, 4, 2, + 67, 92, 99, 124, 3, 2, 50, 59, 5, 2, 11, 12, 15, 15, 34, 34, 3, 2, 41, + 41, 2, 668, 2, 56, 3, 2, 2, 2, 2, 58, 3, 2, 2, 2, 2, 60, 3, 2, 2, 2, 2, + 62, 3, 2, 2, 2, 2, 64, 3, 2, 2, 2, 2, 66, 3, 2, 2, 2, 2, 68, 3, 2, 2, 2, + 2, 70, 3, 2, 2, 2, 2, 72, 3, 2, 2, 2, 2, 74, 3, 2, 2, 2, 2, 76, 3, 2, 2, + 2, 2, 78, 3, 2, 2, 2, 2, 80, 3, 2, 2, 2, 2, 82, 3, 2, 2, 2, 2, 84, 3, 2, + 2, 2, 2, 86, 3, 2, 2, 2, 2, 88, 3, 2, 2, 2, 2, 90, 3, 2, 2, 2, 2, 92, 3, + 2, 2, 2, 2, 94, 3, 2, 2, 2, 2, 96, 3, 2, 2, 2, 2, 98, 3, 2, 2, 2, 2, 100, + 3, 2, 2, 2, 2, 102, 3, 2, 2, 2, 2, 104, 3, 2, 2, 2, 2, 106, 3, 2, 2, 2, + 2, 108, 3, 2, 2, 2, 2, 110, 3, 2, 2, 2, 2, 112, 3, 2, 2, 2, 2, 114, 3, + 2, 2, 2, 2, 116, 3, 2, 2, 2, 2, 118, 3, 2, 2, 2, 2, 120, 3, 2, 2, 2, 2, + 122, 3, 2, 2, 2, 2, 124, 3, 2, 2, 2, 2, 126, 3, 2, 2, 2, 2, 128, 3, 2, + 2, 2, 2, 130, 3, 2, 2, 2, 2, 132, 3, 2, 2, 2, 2, 134, 3, 2, 2, 2, 2, 136, + 3, 2, 2, 2, 2, 138, 3, 2, 2, 2, 2, 140, 3, 2, 2, 2, 2, 142, 3, 2, 2, 2, + 2, 144, 3, 2, 2, 2, 2, 146, 3, 2, 2, 2, 2, 148, 3, 2, 2, 2, 2, 150, 3, + 2, 2, 2, 2, 152, 3, 2, 2, 2, 2, 154, 3, 2, 2, 2, 2, 156, 3, 2, 2, 2, 2, + 158, 3, 2, 2, 2, 2, 160, 3, 2, 2, 2, 2, 162, 3, 2, 2, 2, 2, 164, 3, 2, + 2, 2, 2, 166, 3, 2, 2, 2, 2, 168, 3, 2, 2, 2, 2, 170, 3, 2, 2, 2, 2, 172, + 3, 2, 2, 2, 2, 174, 3, 2, 2, 2, 2, 176, 3, 2, 2, 2, 2, 178, 3, 2, 2, 2, + 2, 180, 3, 2, 2, 2, 2, 182, 3, 2, 2, 2, 2, 184, 3, 2, 2, 2, 2, 186, 3, + 2, 2, 2, 2, 188, 3, 2, 2, 2, 2, 190, 3, 2, 2, 2, 3, 192, 3, 2, 2, 2, 3, + 194, 3, 2, 2, 2, 3, 196, 3, 2, 2, 2, 4, 198, 3, 2, 2, 2, 6, 200, 3, 2, + 2, 2, 8, 202, 3, 2, 2, 2, 10, 204, 3, 2, 2, 2, 12, 206, 3, 2, 2, 2, 14, + 208, 3, 2, 2, 2, 16, 210, 3, 2, 2, 2, 18, 212, 3, 2, 2, 2, 20, 214, 3, + 2, 2, 2, 22, 216, 3, 2, 2, 2, 24, 218, 3, 2, 2, 2, 26, 220, 3, 2, 2, 2, + 28, 222, 3, 2, 2, 2, 30, 224, 3, 2, 2, 2, 32, 226, 3, 2, 2, 2, 34, 228, + 3, 2, 2, 2, 36, 230, 3, 2, 2, 2, 38, 232, 3, 2, 2, 2, 40, 234, 3, 2, 2, + 2, 42, 236, 3, 2, 2, 2, 44, 238, 3, 2, 2, 2, 46, 240, 3, 2, 2, 2, 48, 242, + 3, 2, 2, 2, 50, 244, 3, 2, 2, 2, 52, 246, 3, 2, 2, 2, 54, 248, 3, 2, 2, + 2, 56, 256, 3, 2, 2, 2, 58, 258, 3, 2, 2, 2, 60, 260, 3, 2, 2, 2, 62, 262, + 3, 2, 2, 2, 64, 264, 3, 2, 2, 2, 66, 267, 3, 2, 2, 2, 68, 270, 3, 2, 2, + 2, 70, 284, 3, 2, 2, 2, 72, 286, 3, 2, 2, 2, 74, 290, 3, 2, 2, 2, 76, 293, + 3, 2, 2, 2, 78, 297, 3, 2, 2, 2, 80, 302, 3, 2, 2, 2, 82, 308, 3, 2, 2, + 2, 84, 316, 3, 2, 2, 2, 86, 319, 3, 2, 2, 2, 88, 324, 3, 2, 2, 2, 90, 332, + 3, 2, 2, 2, 92, 402, 3, 2, 2, 2, 94, 404, 3, 2, 2, 2, 96, 412, 3, 2, 2, + 2, 98, 418, 3, 2, 2, 2, 100, 429, 3, 2, 2, 2, 102, 437, 3, 2, 2, 2, 104, + 448, 3, 2, 2, 2, 106, 464, 3, 2, 2, 2, 108, 477, 3, 2, 2, 2, 110, 496, + 3, 2, 2, 2, 112, 507, 3, 2, 2, 2, 114, 509, 3, 2, 2, 2, 116, 525, 3, 2, + 2, 2, 118, 527, 3, 2, 2, 2, 120, 533, 3, 2, 2, 2, 122, 535, 3, 2, 2, 2, + 124, 537, 3, 2, 2, 2, 126, 539, 3, 2, 2, 2, 128, 541, 3, 2, 2, 2, 130, + 543, 3, 2, 2, 2, 132, 545, 3, 2, 2, 2, 134, 547, 3, 2, 2, 2, 136, 549, + 3, 2, 2, 2, 138, 551, 3, 2, 2, 2, 140, 553, 3, 2, 2, 2, 142, 555, 3, 2, + 2, 2, 144, 557, 3, 2, 2, 2, 146, 559, 3, 2, 2, 2, 148, 561, 3, 2, 2, 2, + 150, 563, 3, 2, 2, 2, 152, 565, 3, 2, 2, 2, 154, 567, 3, 2, 2, 2, 156, + 569, 3, 2, 2, 2, 158, 571, 3, 2, 2, 2, 160, 573, 3, 2, 2, 2, 162, 575, + 3, 2, 2, 2, 164, 577, 3, 2, 2, 2, 166, 579, 3, 2, 2, 2, 168, 581, 3, 2, + 2, 2, 170, 590, 3, 2, 2, 2, 172, 594, 3, 2, 2, 2, 174, 601, 3, 2, 2, 2, + 176, 613, 3, 2, 2, 2, 178, 615, 3, 2, 2, 2, 180, 619, 3, 2, 2, 2, 182, + 621, 3, 2, 2, 2, 184, 624, 3, 2, 2, 2, 186, 629, 3, 2, 2, 2, 188, 635, + 3, 2, 2, 2, 190, 638, 3, 2, 2, 2, 192, 644, 3, 2, 2, 2, 194, 648, 3, 2, + 2, 2, 196, 653, 3, 2, 2, 2, 198, 199, 9, 2, 2, 2, 199, 5, 3, 2, 2, 2, 200, + 201, 9, 3, 2, 2, 201, 7, 3, 2, 2, 2, 202, 203, 9, 4, 2, 2, 203, 9, 3, 2, + 2, 2, 204, 205, 9, 5, 2, 2, 205, 11, 3, 2, 2, 2, 206, 207, 9, 6, 2, 2, + 207, 13, 3, 2, 2, 2, 208, 209, 9, 7, 2, 2, 209, 15, 3, 2, 2, 2, 210, 211, + 9, 8, 2, 2, 211, 17, 3, 2, 2, 2, 212, 213, 9, 9, 2, 2, 213, 19, 3, 2, 2, + 2, 214, 215, 9, 10, 2, 2, 215, 21, 3, 2, 2, 2, 216, 217, 9, 11, 2, 2, 217, + 23, 3, 2, 2, 2, 218, 219, 9, 12, 2, 2, 219, 25, 3, 2, 2, 2, 220, 221, 9, + 13, 2, 2, 221, 27, 3, 2, 2, 2, 222, 223, 9, 14, 2, 2, 223, 29, 3, 2, 2, + 2, 224, 225, 9, 15, 2, 2, 225, 31, 3, 2, 2, 2, 226, 227, 9, 16, 2, 2, 227, + 33, 3, 2, 2, 2, 228, 229, 9, 17, 2, 2, 229, 35, 3, 2, 2, 2, 230, 231, 9, + 18, 2, 2, 231, 37, 3, 2, 2, 2, 232, 233, 9, 19, 2, 2, 233, 39, 3, 2, 2, + 2, 234, 235, 9, 20, 2, 2, 235, 41, 3, 2, 2, 2, 236, 237, 9, 21, 2, 2, 237, + 43, 3, 2, 2, 2, 238, 239, 9, 22, 2, 2, 239, 45, 3, 2, 2, 2, 240, 241, 9, + 23, 2, 2, 241, 47, 3, 2, 2, 2, 242, 243, 9, 24, 2, 2, 243, 49, 3, 2, 2, + 2, 244, 245, 9, 25, 2, 2, 245, 51, 3, 2, 2, 2, 246, 247, 9, 26, 2, 2, 247, + 53, 3, 2, 2, 2, 248, 249, 9, 27, 2, 2, 249, 55, 3, 2, 2, 2, 250, 257, 5, + 60, 30, 2, 251, 257, 5, 64, 32, 2, 252, 257, 5, 58, 29, 2, 253, 257, 5, + 62, 31, 2, 254, 257, 5, 68, 34, 2, 255, 257, 5, 66, 33, 2, 256, 250, 3, + 2, 2, 2, 256, 251, 3, 2, 2, 2, 256, 252, 3, 2, 2, 2, 256, 253, 3, 2, 2, + 2, 256, 254, 3, 2, 2, 2, 256, 255, 3, 2, 2, 2, 257, 57, 3, 2, 2, 2, 258, + 259, 7, 62, 2, 2, 259, 59, 3, 2, 2, 2, 260, 261, 7, 63, 2, 2, 261, 61, + 3, 2, 2, 2, 262, 263, 7, 64, 2, 2, 263, 63, 3, 2, 2, 2, 264, 265, 5, 58, + 29, 2, 265, 266, 5, 62, 31, 2, 266, 65, 3, 2, 2, 2, 267, 268, 5, 62, 31, + 2, 268, 269, 5, 60, 30, 2, 269, 67, 3, 2, 2, 2, 270, 271, 5, 58, 29, 2, + 271, 272, 5, 60, 30, 2, 272, 69, 3, 2, 2, 2, 273, 274, 5, 42, 21, 2, 274, + 275, 5, 38, 19, 2, 275, 276, 5, 44, 22, 2, 276, 277, 5, 12, 6, 2, 277, + 285, 3, 2, 2, 2, 278, 279, 5, 14, 7, 2, 279, 280, 5, 4, 2, 2, 280, 281, + 5, 26, 13, 2, 281, 282, 5, 40, 20, 2, 282, 283, 5, 12, 6, 2, 283, 285, + 3, 2, 2, 2, 284, 273, 3, 2, 2, 2, 284, 278, 3, 2, 2, 2, 285, 71, 3, 2, + 2, 2, 286, 287, 5, 4, 2, 2, 287, 288, 5, 30, 15, 2, 288, 289, 5, 10, 5, + 2, 289, 73, 3, 2, 2, 2, 290, 291, 5, 32, 16, 2, 291, 292, 5, 38, 19, 2, + 292, 75, 3, 2, 2, 2, 293, 294, 5, 30, 15, 2, 294, 295, 5, 32, 16, 2, 295, + 296, 5, 42, 21, 2, 296, 77, 3, 2, 2, 2, 297, 298, 5, 26, 13, 2, 298, 299, + 5, 20, 10, 2, 299, 300, 5, 24, 12, 2, 300, 301, 5, 12, 6, 2, 301, 79, 3, + 2, 2, 2, 302, 303, 5, 20, 10, 2, 303, 304, 5, 26, 13, 2, 304, 305, 5, 20, + 10, 2, 305, 306, 5, 24, 12, 2, 306, 307, 5, 12, 6, 2, 307, 81, 3, 2, 2, + 2, 308, 309, 5, 6, 3, 2, 309, 310, 5, 12, 6, 2, 310, 311, 5, 42, 21, 2, + 311, 312, 5, 48, 24, 2, 312, 313, 5, 12, 6, 2, 313, 314, 5, 12, 6, 2, 314, + 315, 5, 30, 15, 2, 315, 83, 3, 2, 2, 2, 316, 317, 5, 20, 10, 2, 317, 318, + 5, 40, 20, 2, 318, 85, 3, 2, 2, 2, 319, 320, 5, 30, 15, 2, 320, 321, 5, + 44, 22, 2, 321, 322, 5, 26, 13, 2, 322, 323, 5, 26, 13, 2, 323, 87, 3, + 2, 2, 2, 324, 325, 5, 20, 10, 2, 325, 326, 5, 30, 15, 2, 326, 89, 3, 2, + 2, 2, 327, 333, 5, 150, 75, 2, 328, 333, 5, 154, 77, 2, 329, 333, 5, 148, + 74, 2, 330, 333, 5, 158, 79, 2, 331, 333, 5, 134, 67, 2, 332, 327, 3, 2, + 2, 2, 332, 328, 3, 2, 2, 2, 332, 329, 3, 2, 2, 2, 332, 330, 3, 2, 2, 2, + 332, 331, 3, 2, 2, 2, 333, 91, 3, 2, 2, 2, 334, 335, 5, 12, 6, 2, 335, + 336, 5, 36, 18, 2, 336, 337, 5, 44, 22, 2, 337, 338, 5, 4, 2, 2, 338, 339, + 5, 26, 13, 2, 339, 340, 5, 40, 20, 2, 340, 403, 3, 2, 2, 2, 341, 342, 5, + 10, 5, 2, 342, 343, 5, 20, 10, 2, 343, 344, 5, 40, 20, 2, 344, 345, 5, + 22, 11, 2, 345, 346, 5, 32, 16, 2, 346, 347, 5, 20, 10, 2, 347, 348, 5, + 30, 15, 2, 348, 349, 5, 42, 21, 2, 349, 403, 3, 2, 2, 2, 350, 351, 5, 42, + 21, 2, 351, 352, 5, 32, 16, 2, 352, 353, 5, 44, 22, 2, 353, 354, 5, 8, + 4, 2, 354, 355, 5, 18, 9, 2, 355, 356, 5, 12, 6, 2, 356, 357, 5, 40, 20, + 2, 357, 403, 3, 2, 2, 2, 358, 359, 5, 48, 24, 2, 359, 360, 5, 20, 10, 2, + 360, 361, 5, 42, 21, 2, 361, 362, 5, 18, 9, 2, 362, 363, 5, 20, 10, 2, + 363, 364, 5, 30, 15, 2, 364, 403, 3, 2, 2, 2, 365, 366, 5, 32, 16, 2, 366, + 367, 5, 46, 23, 2, 367, 368, 5, 12, 6, 2, 368, 369, 5, 38, 19, 2, 369, + 370, 5, 26, 13, 2, 370, 371, 5, 4, 2, 2, 371, 372, 5, 34, 17, 2, 372, 373, + 5, 40, 20, 2, 373, 403, 3, 2, 2, 2, 374, 375, 5, 8, 4, 2, 375, 376, 5, + 38, 19, 2, 376, 377, 5, 32, 16, 2, 377, 378, 5, 40, 20, 2, 378, 379, 5, + 40, 20, 2, 379, 380, 5, 12, 6, 2, 380, 381, 5, 40, 20, 2, 381, 403, 3, + 2, 2, 2, 382, 383, 5, 20, 10, 2, 383, 384, 5, 30, 15, 2, 384, 385, 5, 42, + 21, 2, 385, 386, 5, 12, 6, 2, 386, 387, 5, 38, 19, 2, 387, 388, 5, 40, + 20, 2, 388, 389, 5, 12, 6, 2, 389, 390, 5, 8, 4, 2, 390, 391, 5, 42, 21, + 2, 391, 392, 5, 40, 20, 2, 392, 403, 3, 2, 2, 2, 393, 394, 5, 8, 4, 2, + 394, 395, 5, 32, 16, 2, 395, 396, 5, 30, 15, 2, 396, 397, 5, 42, 21, 2, + 397, 398, 5, 4, 2, 2, 398, 399, 5, 20, 10, 2, 399, 400, 5, 30, 15, 2, 400, + 401, 5, 40, 20, 2, 401, 403, 3, 2, 2, 2, 402, 334, 3, 2, 2, 2, 402, 341, + 3, 2, 2, 2, 402, 350, 3, 2, 2, 2, 402, 358, 3, 2, 2, 2, 402, 365, 3, 2, + 2, 2, 402, 374, 3, 2, 2, 2, 402, 382, 3, 2, 2, 2, 402, 393, 3, 2, 2, 2, + 403, 93, 3, 2, 2, 2, 404, 405, 5, 10, 5, 2, 405, 406, 5, 48, 24, 2, 406, + 407, 5, 20, 10, 2, 407, 408, 5, 42, 21, 2, 408, 409, 5, 18, 9, 2, 409, + 410, 5, 20, 10, 2, 410, 411, 5, 30, 15, 2, 411, 95, 3, 2, 2, 2, 412, 413, + 5, 34, 17, 2, 413, 414, 5, 32, 16, 2, 414, 415, 5, 20, 10, 2, 415, 416, + 5, 30, 15, 2, 416, 417, 5, 42, 21, 2, 417, 97, 3, 2, 2, 2, 418, 419, 5, + 26, 13, 2, 419, 420, 5, 20, 10, 2, 420, 421, 5, 30, 15, 2, 421, 422, 5, + 12, 6, 2, 422, 423, 5, 40, 20, 2, 423, 424, 5, 42, 21, 2, 424, 425, 5, + 38, 19, 2, 425, 426, 5, 20, 10, 2, 426, 427, 5, 30, 15, 2, 427, 428, 5, + 16, 8, 2, 428, 99, 3, 2, 2, 2, 429, 430, 5, 34, 17, 2, 430, 431, 5, 32, + 16, 2, 431, 432, 5, 26, 13, 2, 432, 433, 5, 52, 26, 2, 433, 434, 5, 16, + 8, 2, 434, 435, 5, 32, 16, 2, 435, 436, 5, 30, 15, 2, 436, 101, 3, 2, 2, + 2, 437, 438, 5, 28, 14, 2, 438, 439, 5, 44, 22, 2, 439, 440, 5, 26, 13, + 2, 440, 441, 5, 42, 21, 2, 441, 442, 5, 20, 10, 2, 442, 443, 5, 34, 17, + 2, 443, 444, 5, 32, 16, 2, 444, 445, 5, 20, 10, 2, 445, 446, 5, 30, 15, + 2, 446, 447, 5, 42, 21, 2, 447, 103, 3, 2, 2, 2, 448, 449, 5, 28, 14, 2, + 449, 450, 5, 44, 22, 2, 450, 451, 5, 26, 13, 2, 451, 452, 5, 42, 21, 2, + 452, 453, 5, 20, 10, 2, 453, 454, 5, 26, 13, 2, 454, 455, 5, 20, 10, 2, + 455, 456, 5, 30, 15, 2, 456, 457, 5, 12, 6, 2, 457, 458, 5, 40, 20, 2, + 458, 459, 5, 42, 21, 2, 459, 460, 5, 38, 19, 2, 460, 461, 5, 20, 10, 2, + 461, 462, 5, 30, 15, 2, 462, 463, 5, 16, 8, 2, 463, 105, 3, 2, 2, 2, 464, + 465, 5, 28, 14, 2, 465, 466, 5, 44, 22, 2, 466, 467, 5, 26, 13, 2, 467, + 468, 5, 42, 21, 2, 468, 469, 5, 20, 10, 2, 469, 470, 5, 34, 17, 2, 470, + 471, 5, 32, 16, 2, 471, 472, 5, 26, 13, 2, 472, 473, 5, 52, 26, 2, 473, + 474, 5, 16, 8, 2, 474, 475, 5, 32, 16, 2, 475, 476, 5, 30, 15, 2, 476, + 107, 3, 2, 2, 2, 477, 478, 5, 16, 8, 2, 478, 479, 5, 12, 6, 2, 479, 480, + 5, 32, 16, 2, 480, 481, 5, 28, 14, 2, 481, 482, 5, 12, 6, 2, 482, 483, + 5, 42, 21, 2, 483, 484, 5, 38, 19, 2, 484, 485, 5, 52, 26, 2, 485, 486, + 5, 8, 4, 2, 486, 487, 5, 32, 16, 2, 487, 488, 5, 26, 13, 2, 488, 489, 5, + 26, 13, 2, 489, 490, 5, 12, 6, 2, 490, 491, 5, 8, 4, 2, 491, 492, 5, 42, + 21, 2, 492, 493, 5, 20, 10, 2, 493, 494, 5, 32, 16, 2, 494, 495, 5, 30, + 15, 2, 495, 109, 3, 2, 2, 2, 496, 497, 5, 12, 6, 2, 497, 498, 5, 30, 15, + 2, 498, 499, 5, 46, 23, 2, 499, 500, 5, 12, 6, 2, 500, 501, 5, 26, 13, + 2, 501, 502, 5, 32, 16, 2, 502, 503, 5, 34, 17, 2, 503, 504, 5, 12, 6, + 2, 504, 111, 3, 2, 2, 2, 505, 508, 5, 172, 86, 2, 506, 508, 5, 174, 87, + 2, 507, 505, 3, 2, 2, 2, 507, 506, 3, 2, 2, 2, 508, 113, 3, 2, 2, 2, 509, + 510, 5, 138, 69, 2, 510, 511, 3, 2, 2, 2, 511, 512, 8, 57, 2, 2, 512, 513, + 8, 57, 3, 2, 513, 115, 3, 2, 2, 2, 514, 518, 5, 118, 59, 2, 515, 517, 5, + 120, 60, 2, 516, 515, 3, 2, 2, 2, 517, 520, 3, 2, 2, 2, 518, 516, 3, 2, + 2, 2, 518, 519, 3, 2, 2, 2, 519, 526, 3, 2, 2, 2, 520, 518, 3, 2, 2, 2, + 521, 522, 5, 132, 66, 2, 522, 523, 5, 116, 58, 2, 523, 524, 5, 132, 66, + 2, 524, 526, 3, 2, 2, 2, 525, 514, 3, 2, 2, 2, 525, 521, 3, 2, 2, 2, 526, + 117, 3, 2, 2, 2, 527, 528, 5, 122, 61, 2, 528, 119, 3, 2, 2, 2, 529, 534, + 5, 122, 61, 2, 530, 534, 5, 124, 62, 2, 531, 534, 5, 130, 65, 2, 532, 534, + 5, 128, 64, 2, 533, 529, 3, 2, 2, 2, 533, 530, 3, 2, 2, 2, 533, 531, 3, + 2, 2, 2, 533, 532, 3, 2, 2, 2, 534, 121, 3, 2, 2, 2, 535, 536, 9, 28, 2, + 2, 536, 123, 3, 2, 2, 2, 537, 538, 9, 29, 2, 2, 538, 125, 3, 2, 2, 2, 539, + 540, 7, 37, 2, 2, 540, 127, 3, 2, 2, 2, 541, 542, 7, 38, 2, 2, 542, 129, + 3, 2, 2, 2, 543, 544, 7, 97, 2, 2, 544, 131, 3, 2, 2, 2, 545, 546, 7, 36, + 2, 2, 546, 133, 3, 2, 2, 2, 547, 548, 7, 39, 2, 2, 548, 135, 3, 2, 2, 2, + 549, 550, 7, 40, 2, 2, 550, 137, 3, 2, 2, 2, 551, 552, 7, 41, 2, 2, 552, + 139, 3, 2, 2, 2, 553, 554, 7, 42, 2, 2, 554, 141, 3, 2, 2, 2, 555, 556, + 7, 43, 2, 2, 556, 143, 3, 2, 2, 2, 557, 558, 7, 93, 2, 2, 558, 145, 3, + 2, 2, 2, 559, 560, 7, 95, 2, 2, 560, 147, 3, 2, 2, 2, 561, 562, 7, 44, + 2, 2, 562, 149, 3, 2, 2, 2, 563, 564, 7, 45, 2, 2, 564, 151, 3, 2, 2, 2, + 565, 566, 7, 46, 2, 2, 566, 153, 3, 2, 2, 2, 567, 568, 7, 47, 2, 2, 568, + 155, 3, 2, 2, 2, 569, 570, 7, 48, 2, 2, 570, 157, 3, 2, 2, 2, 571, 572, + 7, 49, 2, 2, 572, 159, 3, 2, 2, 2, 573, 574, 7, 60, 2, 2, 574, 161, 3, + 2, 2, 2, 575, 576, 7, 61, 2, 2, 576, 163, 3, 2, 2, 2, 577, 578, 7, 65, + 2, 2, 578, 165, 3, 2, 2, 2, 579, 580, 7, 126, 2, 2, 580, 167, 3, 2, 2, + 2, 581, 582, 4, 50, 51, 2, 582, 169, 3, 2, 2, 2, 583, 591, 5, 124, 62, + 2, 584, 591, 5, 4, 2, 2, 585, 591, 5, 6, 3, 2, 586, 591, 5, 8, 4, 2, 587, + 591, 5, 10, 5, 2, 588, 591, 5, 12, 6, 2, 589, 591, 5, 14, 7, 2, 590, 583, + 3, 2, 2, 2, 590, 584, 3, 2, 2, 2, 590, 585, 3, 2, 2, 2, 590, 586, 3, 2, + 2, 2, 590, 587, 3, 2, 2, 2, 590, 588, 3, 2, 2, 2, 590, 589, 3, 2, 2, 2, + 591, 171, 3, 2, 2, 2, 592, 595, 5, 176, 88, 2, 593, 595, 5, 178, 89, 2, + 594, 592, 3, 2, 2, 2, 594, 593, 3, 2, 2, 2, 595, 173, 3, 2, 2, 2, 596, + 598, 5, 188, 94, 2, 597, 596, 3, 2, 2, 2, 597, 598, 3, 2, 2, 2, 598, 599, + 3, 2, 2, 2, 599, 602, 5, 176, 88, 2, 600, 602, 5, 178, 89, 2, 601, 597, + 3, 2, 2, 2, 601, 600, 3, 2, 2, 2, 602, 175, 3, 2, 2, 2, 603, 608, 5, 186, + 93, 2, 604, 606, 5, 156, 78, 2, 605, 607, 5, 186, 93, 2, 606, 605, 3, 2, + 2, 2, 606, 607, 3, 2, 2, 2, 607, 609, 3, 2, 2, 2, 608, 604, 3, 2, 2, 2, + 608, 609, 3, 2, 2, 2, 609, 614, 3, 2, 2, 2, 610, 611, 5, 156, 78, 2, 611, + 612, 5, 186, 93, 2, 612, 614, 3, 2, 2, 2, 613, 603, 3, 2, 2, 2, 613, 610, + 3, 2, 2, 2, 614, 177, 3, 2, 2, 2, 615, 616, 5, 180, 90, 2, 616, 617, 7, + 71, 2, 2, 617, 618, 5, 182, 91, 2, 618, 179, 3, 2, 2, 2, 619, 620, 5, 176, + 88, 2, 620, 181, 3, 2, 2, 2, 621, 622, 5, 184, 92, 2, 622, 183, 3, 2, 2, + 2, 623, 625, 5, 188, 94, 2, 624, 623, 3, 2, 2, 2, 624, 625, 3, 2, 2, 2, + 625, 626, 3, 2, 2, 2, 626, 627, 5, 186, 93, 2, 627, 185, 3, 2, 2, 2, 628, + 630, 5, 124, 62, 2, 629, 628, 3, 2, 2, 2, 630, 631, 3, 2, 2, 2, 631, 629, + 3, 2, 2, 2, 631, 632, 3, 2, 2, 2, 632, 187, 3, 2, 2, 2, 633, 636, 5, 150, + 75, 2, 634, 636, 5, 154, 77, 2, 635, 633, 3, 2, 2, 2, 635, 634, 3, 2, 2, + 2, 636, 189, 3, 2, 2, 2, 637, 639, 9, 30, 2, 2, 638, 637, 3, 2, 2, 2, 639, + 640, 3, 2, 2, 2, 640, 638, 3, 2, 2, 2, 640, 641, 3, 2, 2, 2, 641, 642, + 3, 2, 2, 2, 642, 643, 8, 95, 4, 2, 643, 191, 3, 2, 2, 2, 644, 645, 7, 41, + 2, 2, 645, 646, 3, 2, 2, 2, 646, 647, 8, 96, 5, 2, 647, 193, 3, 2, 2, 2, + 648, 649, 7, 41, 2, 2, 649, 650, 7, 41, 2, 2, 650, 651, 3, 2, 2, 2, 651, + 652, 8, 97, 2, 2, 652, 195, 3, 2, 2, 2, 653, 654, 10, 31, 2, 2, 654, 655, + 3, 2, 2, 2, 655, 656, 8, 98, 2, 2, 656, 197, 3, 2, 2, 2, 23, 2, 3, 256, + 284, 332, 402, 507, 518, 525, 533, 590, 594, 597, 601, 606, 608, 613, 624, + 631, 635, 640, 6, 5, 2, 2, 4, 3, 2, 8, 2, 2, 4, 2, 2, } var lexerDeserializer = antlr.NewATNDeserializer(nil) @@ -319,37 +324,38 @@ var lexerModeNames = []string{ var lexerLiteralNames = []string{ "", "", "'<'", "'='", "'>'", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", - "'#'", "'$'", "'_'", "'\"'", "'%'", "'&'", "", "'('", "')'", "'['", "']'", - "'*'", "'+'", "','", "'-'", "'.'", "'/'", "':'", "';'", "'?'", "'|'", "", - "", "", "", "", "", "", "", "", "", "", "", "", "''''", + "", "'#'", "'$'", "'_'", "'\"'", "'%'", "'&'", "", "'('", "')'", "'['", + "']'", "'*'", "'+'", "','", "'-'", "'.'", "'/'", "':'", "';'", "'?'", "'|'", + "", "", "", "", "", "", "", "", "", "", "", "", "", "''''", } var lexerSymbolicNames = []string{ "", "ComparisonOperator", "LT", "EQ", "GT", "NEQ", "GTEQ", "LTEQ", "BooleanLiteral", - "AND", "OR", "NOT", "LIKE", "ILIKE", "BETWEEN", "IS", "NULL", "IN", "SpatialOperator", - "DistanceOperator", "POINT", "LINESTRING", "POLYGON", "MULTIPOINT", "MULTILINESTRING", - "MULTIPOLYGON", "GEOMETRYCOLLECTION", "ENVELOPE", "NumericLiteral", "Identifier", - "IdentifierStart", "IdentifierPart", "ALPHA", "DIGIT", "OCTOTHORP", "DOLLAR", - "UNDERSCORE", "DOUBLEQUOTE", "PERCENT", "AMPERSAND", "QUOTE", "LEFTPAREN", - "RIGHTPAREN", "LEFTSQUAREBRACKET", "RIGHTSQUAREBRACKET", "ASTERISK", "PLUS", - "COMMA", "MINUS", "PERIOD", "SOLIDUS", "COLON", "SEMICOLON", "QUESTIONMARK", - "VERTICALBAR", "BIT", "HEXIT", "UnsignedNumericLiteral", "SignedNumericLiteral", - "ExactNumericLiteral", "ApproximateNumericLiteral", "Mantissa", "Exponent", - "SignedInteger", "UnsignedInteger", "Sign", "WS", "CharacterStringLiteral", - "QuotedQuote", + "AND", "OR", "NOT", "LIKE", "ILIKE", "BETWEEN", "IS", "NULL", "IN", "ArithmeticOperator", + "SpatialOperator", "DistanceOperator", "POINT", "LINESTRING", "POLYGON", + "MULTIPOINT", "MULTILINESTRING", "MULTIPOLYGON", "GEOMETRYCOLLECTION", + "ENVELOPE", "NumericLiteral", "Identifier", "IdentifierStart", "IdentifierPart", + "ALPHA", "DIGIT", "OCTOTHORP", "DOLLAR", "UNDERSCORE", "DOUBLEQUOTE", "PERCENT", + "AMPERSAND", "QUOTE", "LEFTPAREN", "RIGHTPAREN", "LEFTSQUAREBRACKET", "RIGHTSQUAREBRACKET", + "ASTERISK", "PLUS", "COMMA", "MINUS", "PERIOD", "SOLIDUS", "COLON", "SEMICOLON", + "QUESTIONMARK", "VERTICALBAR", "BIT", "HEXIT", "UnsignedNumericLiteral", + "SignedNumericLiteral", "ExactNumericLiteral", "ApproximateNumericLiteral", + "Mantissa", "Exponent", "SignedInteger", "UnsignedInteger", "Sign", "WS", + "CharacterStringLiteral", "QuotedQuote", } var lexerRuleNames = []string{ "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "ComparisonOperator", "LT", "EQ", "GT", "NEQ", "GTEQ", "LTEQ", "BooleanLiteral", "AND", "OR", - "NOT", "LIKE", "ILIKE", "BETWEEN", "IS", "NULL", "IN", "SpatialOperator", - "DistanceOperator", "POINT", "LINESTRING", "POLYGON", "MULTIPOINT", "MULTILINESTRING", - "MULTIPOLYGON", "GEOMETRYCOLLECTION", "ENVELOPE", "NumericLiteral", "CharacterStringLiteralStart", - "Identifier", "IdentifierStart", "IdentifierPart", "ALPHA", "DIGIT", "OCTOTHORP", - "DOLLAR", "UNDERSCORE", "DOUBLEQUOTE", "PERCENT", "AMPERSAND", "QUOTE", - "LEFTPAREN", "RIGHTPAREN", "LEFTSQUAREBRACKET", "RIGHTSQUAREBRACKET", "ASTERISK", - "PLUS", "COMMA", "MINUS", "PERIOD", "SOLIDUS", "COLON", "SEMICOLON", "QUESTIONMARK", + "NOT", "LIKE", "ILIKE", "BETWEEN", "IS", "NULL", "IN", "ArithmeticOperator", + "SpatialOperator", "DistanceOperator", "POINT", "LINESTRING", "POLYGON", + "MULTIPOINT", "MULTILINESTRING", "MULTIPOLYGON", "GEOMETRYCOLLECTION", + "ENVELOPE", "NumericLiteral", "CharacterStringLiteralStart", "Identifier", + "IdentifierStart", "IdentifierPart", "ALPHA", "DIGIT", "OCTOTHORP", "DOLLAR", + "UNDERSCORE", "DOUBLEQUOTE", "PERCENT", "AMPERSAND", "QUOTE", "LEFTPAREN", + "RIGHTPAREN", "LEFTSQUAREBRACKET", "RIGHTSQUAREBRACKET", "ASTERISK", "PLUS", + "COMMA", "MINUS", "PERIOD", "SOLIDUS", "COLON", "SEMICOLON", "QUESTIONMARK", "VERTICALBAR", "BIT", "HEXIT", "UnsignedNumericLiteral", "SignedNumericLiteral", "ExactNumericLiteral", "ApproximateNumericLiteral", "Mantissa", "Exponent", "SignedInteger", "UnsignedInteger", "Sign", "WS", "CharacterStringLiteral", @@ -408,57 +414,58 @@ const ( CqlLexerIS = 15 CqlLexerNULL = 16 CqlLexerIN = 17 - CqlLexerSpatialOperator = 18 - CqlLexerDistanceOperator = 19 - CqlLexerPOINT = 20 - CqlLexerLINESTRING = 21 - CqlLexerPOLYGON = 22 - CqlLexerMULTIPOINT = 23 - CqlLexerMULTILINESTRING = 24 - CqlLexerMULTIPOLYGON = 25 - CqlLexerGEOMETRYCOLLECTION = 26 - CqlLexerENVELOPE = 27 - CqlLexerNumericLiteral = 28 - CqlLexerIdentifier = 29 - CqlLexerIdentifierStart = 30 - CqlLexerIdentifierPart = 31 - CqlLexerALPHA = 32 - CqlLexerDIGIT = 33 - CqlLexerOCTOTHORP = 34 - CqlLexerDOLLAR = 35 - CqlLexerUNDERSCORE = 36 - CqlLexerDOUBLEQUOTE = 37 - CqlLexerPERCENT = 38 - CqlLexerAMPERSAND = 39 - CqlLexerQUOTE = 40 - CqlLexerLEFTPAREN = 41 - CqlLexerRIGHTPAREN = 42 - CqlLexerLEFTSQUAREBRACKET = 43 - CqlLexerRIGHTSQUAREBRACKET = 44 - CqlLexerASTERISK = 45 - CqlLexerPLUS = 46 - CqlLexerCOMMA = 47 - CqlLexerMINUS = 48 - CqlLexerPERIOD = 49 - CqlLexerSOLIDUS = 50 - CqlLexerCOLON = 51 - CqlLexerSEMICOLON = 52 - CqlLexerQUESTIONMARK = 53 - CqlLexerVERTICALBAR = 54 - CqlLexerBIT = 55 - CqlLexerHEXIT = 56 - CqlLexerUnsignedNumericLiteral = 57 - CqlLexerSignedNumericLiteral = 58 - CqlLexerExactNumericLiteral = 59 - CqlLexerApproximateNumericLiteral = 60 - CqlLexerMantissa = 61 - CqlLexerExponent = 62 - CqlLexerSignedInteger = 63 - CqlLexerUnsignedInteger = 64 - CqlLexerSign = 65 - CqlLexerWS = 66 - CqlLexerCharacterStringLiteral = 67 - CqlLexerQuotedQuote = 68 + CqlLexerArithmeticOperator = 18 + CqlLexerSpatialOperator = 19 + CqlLexerDistanceOperator = 20 + CqlLexerPOINT = 21 + CqlLexerLINESTRING = 22 + CqlLexerPOLYGON = 23 + CqlLexerMULTIPOINT = 24 + CqlLexerMULTILINESTRING = 25 + CqlLexerMULTIPOLYGON = 26 + CqlLexerGEOMETRYCOLLECTION = 27 + CqlLexerENVELOPE = 28 + CqlLexerNumericLiteral = 29 + CqlLexerIdentifier = 30 + CqlLexerIdentifierStart = 31 + CqlLexerIdentifierPart = 32 + CqlLexerALPHA = 33 + CqlLexerDIGIT = 34 + CqlLexerOCTOTHORP = 35 + CqlLexerDOLLAR = 36 + CqlLexerUNDERSCORE = 37 + CqlLexerDOUBLEQUOTE = 38 + CqlLexerPERCENT = 39 + CqlLexerAMPERSAND = 40 + CqlLexerQUOTE = 41 + CqlLexerLEFTPAREN = 42 + CqlLexerRIGHTPAREN = 43 + CqlLexerLEFTSQUAREBRACKET = 44 + CqlLexerRIGHTSQUAREBRACKET = 45 + CqlLexerASTERISK = 46 + CqlLexerPLUS = 47 + CqlLexerCOMMA = 48 + CqlLexerMINUS = 49 + CqlLexerPERIOD = 50 + CqlLexerSOLIDUS = 51 + CqlLexerCOLON = 52 + CqlLexerSEMICOLON = 53 + CqlLexerQUESTIONMARK = 54 + CqlLexerVERTICALBAR = 55 + CqlLexerBIT = 56 + CqlLexerHEXIT = 57 + CqlLexerUnsignedNumericLiteral = 58 + CqlLexerSignedNumericLiteral = 59 + CqlLexerExactNumericLiteral = 60 + CqlLexerApproximateNumericLiteral = 61 + CqlLexerMantissa = 62 + CqlLexerExponent = 63 + CqlLexerSignedInteger = 64 + CqlLexerUnsignedInteger = 65 + CqlLexerSign = 66 + CqlLexerWS = 67 + CqlLexerCharacterStringLiteral = 68 + CqlLexerQuotedQuote = 69 ) // CqlLexerSTR is the CqlLexer mode. diff --git a/internal/cql/cql_listener.go b/internal/cql/cql_listener.go index 5ba95e65..2b4376f8 100644 --- a/internal/cql/cql_listener.go +++ b/internal/cql/cql_listener.go @@ -37,8 +37,11 @@ type CQLListener interface { // EnterIsNullPredicate is called when entering the isNullPredicate production. EnterIsNullPredicate(c *IsNullPredicateContext) - // EnterScalarExpression is called when entering the scalarExpression production. - EnterScalarExpression(c *ScalarExpressionContext) + // EnterArithmeticExpression is called when entering the arithmeticExpression production. + EnterArithmeticExpression(c *ArithmeticExpressionContext) + + // EnterScalarValue is called when entering the scalarValue production. + EnterScalarValue(c *ScalarValueContext) // EnterPropertyName is called when entering the propertyName production. EnterPropertyName(c *PropertyNameContext) @@ -133,8 +136,11 @@ type CQLListener interface { // ExitIsNullPredicate is called when exiting the isNullPredicate production. ExitIsNullPredicate(c *IsNullPredicateContext) - // ExitScalarExpression is called when exiting the scalarExpression production. - ExitScalarExpression(c *ScalarExpressionContext) + // ExitArithmeticExpression is called when exiting the arithmeticExpression production. + ExitArithmeticExpression(c *ArithmeticExpressionContext) + + // ExitScalarValue is called when exiting the scalarValue production. + ExitScalarValue(c *ScalarValueContext) // ExitPropertyName is called when exiting the propertyName production. ExitPropertyName(c *PropertyNameContext) diff --git a/internal/cql/cql_parser.go b/internal/cql/cql_parser.go index 096d985b..3852c7ac 100644 --- a/internal/cql/cql_parser.go +++ b/internal/cql/cql_parser.go @@ -15,136 +15,144 @@ var _ = reflect.Copy var _ = strconv.Itoa var parserATN = []uint16{ - 3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 70, 307, + 3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 71, 325, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, - 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 3, 2, - 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 3, 76, 10, 3, 12, 3, - 14, 3, 79, 11, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 7, 4, 87, 10, 4, - 12, 4, 14, 4, 90, 11, 4, 3, 5, 5, 5, 93, 10, 5, 3, 5, 3, 5, 3, 6, 3, 6, - 3, 6, 3, 6, 3, 6, 5, 6, 102, 10, 6, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, - 3, 7, 5, 7, 111, 10, 7, 3, 8, 3, 8, 3, 8, 3, 8, 3, 9, 3, 9, 5, 9, 119, - 10, 9, 3, 9, 3, 9, 3, 9, 3, 10, 3, 10, 5, 10, 126, 10, 10, 3, 10, 3, 10, - 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 5, 11, 136, 10, 11, 3, 11, 3, - 11, 3, 12, 3, 12, 3, 12, 3, 12, 5, 12, 144, 10, 12, 3, 13, 3, 13, 3, 14, - 3, 14, 3, 15, 3, 15, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, - 17, 3, 17, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, - 3, 19, 3, 19, 5, 19, 172, 10, 19, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, - 20, 3, 20, 3, 20, 5, 20, 182, 10, 20, 3, 21, 3, 21, 3, 21, 3, 22, 3, 22, - 3, 22, 3, 22, 3, 23, 3, 23, 3, 23, 3, 24, 3, 24, 3, 24, 3, 25, 3, 25, 3, - 25, 3, 25, 7, 25, 201, 10, 25, 12, 25, 14, 25, 204, 11, 25, 3, 25, 3, 25, - 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 7, 26, 213, 10, 26, 12, 26, 14, 26, - 216, 11, 26, 3, 26, 3, 26, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 7, 27, 225, - 10, 27, 12, 27, 14, 27, 228, 11, 27, 3, 27, 3, 27, 3, 28, 3, 28, 3, 28, - 3, 28, 3, 28, 7, 28, 237, 10, 28, 12, 28, 14, 28, 240, 11, 28, 3, 28, 3, - 28, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 7, 29, 249, 10, 29, 12, 29, 14, - 29, 252, 11, 29, 3, 29, 3, 29, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, - 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 31, 3, 31, 3, 31, 3, 31, 7, 31, 271, - 10, 31, 12, 31, 14, 31, 274, 11, 31, 3, 31, 3, 31, 3, 32, 3, 32, 3, 32, - 3, 33, 3, 33, 5, 33, 283, 10, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 7, - 33, 290, 10, 33, 12, 33, 14, 33, 293, 11, 33, 3, 33, 3, 33, 3, 33, 7, 33, - 298, 10, 33, 12, 33, 14, 33, 301, 11, 33, 5, 33, 303, 10, 33, 3, 33, 3, - 33, 3, 33, 2, 4, 4, 6, 34, 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, 2, 3, 3, 2, 14, 15, 2, 308, 2, 66, 3, 2, 2, 2, 4, 69, 3, 2, 2, - 2, 6, 80, 3, 2, 2, 2, 8, 92, 3, 2, 2, 2, 10, 101, 3, 2, 2, 2, 12, 110, - 3, 2, 2, 2, 14, 112, 3, 2, 2, 2, 16, 116, 3, 2, 2, 2, 18, 123, 3, 2, 2, - 2, 20, 132, 3, 2, 2, 2, 22, 143, 3, 2, 2, 2, 24, 145, 3, 2, 2, 2, 26, 147, - 3, 2, 2, 2, 28, 149, 3, 2, 2, 2, 30, 151, 3, 2, 2, 2, 32, 153, 3, 2, 2, - 2, 34, 160, 3, 2, 2, 2, 36, 171, 3, 2, 2, 2, 38, 181, 3, 2, 2, 2, 40, 183, - 3, 2, 2, 2, 42, 186, 3, 2, 2, 2, 44, 190, 3, 2, 2, 2, 46, 193, 3, 2, 2, - 2, 48, 196, 3, 2, 2, 2, 50, 207, 3, 2, 2, 2, 52, 219, 3, 2, 2, 2, 54, 231, - 3, 2, 2, 2, 56, 243, 3, 2, 2, 2, 58, 255, 3, 2, 2, 2, 60, 266, 3, 2, 2, - 2, 62, 277, 3, 2, 2, 2, 64, 280, 3, 2, 2, 2, 66, 67, 5, 4, 3, 2, 67, 68, - 7, 2, 2, 3, 68, 3, 3, 2, 2, 2, 69, 70, 8, 3, 1, 2, 70, 71, 5, 6, 4, 2, - 71, 77, 3, 2, 2, 2, 72, 73, 12, 3, 2, 2, 73, 74, 7, 12, 2, 2, 74, 76, 5, - 6, 4, 2, 75, 72, 3, 2, 2, 2, 76, 79, 3, 2, 2, 2, 77, 75, 3, 2, 2, 2, 77, - 78, 3, 2, 2, 2, 78, 5, 3, 2, 2, 2, 79, 77, 3, 2, 2, 2, 80, 81, 8, 4, 1, - 2, 81, 82, 5, 8, 5, 2, 82, 88, 3, 2, 2, 2, 83, 84, 12, 3, 2, 2, 84, 85, - 7, 11, 2, 2, 85, 87, 5, 8, 5, 2, 86, 83, 3, 2, 2, 2, 87, 90, 3, 2, 2, 2, - 88, 86, 3, 2, 2, 2, 88, 89, 3, 2, 2, 2, 89, 7, 3, 2, 2, 2, 90, 88, 3, 2, - 2, 2, 91, 93, 7, 13, 2, 2, 92, 91, 3, 2, 2, 2, 92, 93, 3, 2, 2, 2, 93, - 94, 3, 2, 2, 2, 94, 95, 5, 10, 6, 2, 95, 9, 3, 2, 2, 2, 96, 102, 5, 12, - 7, 2, 97, 98, 7, 43, 2, 2, 98, 99, 5, 4, 3, 2, 99, 100, 7, 44, 2, 2, 100, - 102, 3, 2, 2, 2, 101, 96, 3, 2, 2, 2, 101, 97, 3, 2, 2, 2, 102, 11, 3, - 2, 2, 2, 103, 111, 5, 14, 8, 2, 104, 111, 5, 16, 9, 2, 105, 111, 5, 18, - 10, 2, 106, 111, 5, 20, 11, 2, 107, 111, 5, 64, 33, 2, 108, 111, 5, 32, - 17, 2, 109, 111, 5, 34, 18, 2, 110, 103, 3, 2, 2, 2, 110, 104, 3, 2, 2, - 2, 110, 105, 3, 2, 2, 2, 110, 106, 3, 2, 2, 2, 110, 107, 3, 2, 2, 2, 110, - 108, 3, 2, 2, 2, 110, 109, 3, 2, 2, 2, 111, 13, 3, 2, 2, 2, 112, 113, 5, - 22, 12, 2, 113, 114, 7, 3, 2, 2, 114, 115, 5, 22, 12, 2, 115, 15, 3, 2, - 2, 2, 116, 118, 5, 24, 13, 2, 117, 119, 7, 13, 2, 2, 118, 117, 3, 2, 2, - 2, 118, 119, 3, 2, 2, 2, 119, 120, 3, 2, 2, 2, 120, 121, 9, 2, 2, 2, 121, - 122, 5, 26, 14, 2, 122, 17, 3, 2, 2, 2, 123, 125, 5, 24, 13, 2, 124, 126, - 7, 13, 2, 2, 125, 124, 3, 2, 2, 2, 125, 126, 3, 2, 2, 2, 126, 127, 3, 2, - 2, 2, 127, 128, 7, 16, 2, 2, 128, 129, 5, 22, 12, 2, 129, 130, 7, 11, 2, - 2, 130, 131, 5, 22, 12, 2, 131, 19, 3, 2, 2, 2, 132, 133, 5, 24, 13, 2, - 133, 135, 7, 17, 2, 2, 134, 136, 7, 13, 2, 2, 135, 134, 3, 2, 2, 2, 135, - 136, 3, 2, 2, 2, 136, 137, 3, 2, 2, 2, 137, 138, 7, 18, 2, 2, 138, 21, - 3, 2, 2, 2, 139, 144, 5, 24, 13, 2, 140, 144, 5, 26, 14, 2, 141, 144, 5, - 28, 15, 2, 142, 144, 5, 30, 16, 2, 143, 139, 3, 2, 2, 2, 143, 140, 3, 2, - 2, 2, 143, 141, 3, 2, 2, 2, 143, 142, 3, 2, 2, 2, 144, 23, 3, 2, 2, 2, - 145, 146, 7, 31, 2, 2, 146, 25, 3, 2, 2, 2, 147, 148, 7, 69, 2, 2, 148, - 27, 3, 2, 2, 2, 149, 150, 7, 30, 2, 2, 150, 29, 3, 2, 2, 2, 151, 152, 7, - 10, 2, 2, 152, 31, 3, 2, 2, 2, 153, 154, 7, 20, 2, 2, 154, 155, 7, 43, - 2, 2, 155, 156, 5, 36, 19, 2, 156, 157, 7, 49, 2, 2, 157, 158, 5, 36, 19, - 2, 158, 159, 7, 44, 2, 2, 159, 33, 3, 2, 2, 2, 160, 161, 7, 21, 2, 2, 161, - 162, 7, 43, 2, 2, 162, 163, 5, 36, 19, 2, 163, 164, 7, 49, 2, 2, 164, 165, - 5, 36, 19, 2, 165, 166, 7, 49, 2, 2, 166, 167, 7, 30, 2, 2, 167, 168, 7, - 44, 2, 2, 168, 35, 3, 2, 2, 2, 169, 172, 5, 24, 13, 2, 170, 172, 5, 38, - 20, 2, 171, 169, 3, 2, 2, 2, 171, 170, 3, 2, 2, 2, 172, 37, 3, 2, 2, 2, - 173, 182, 5, 40, 21, 2, 174, 182, 5, 44, 23, 2, 175, 182, 5, 46, 24, 2, - 176, 182, 5, 50, 26, 2, 177, 182, 5, 52, 27, 2, 178, 182, 5, 54, 28, 2, - 179, 182, 5, 56, 29, 2, 180, 182, 5, 58, 30, 2, 181, 173, 3, 2, 2, 2, 181, - 174, 3, 2, 2, 2, 181, 175, 3, 2, 2, 2, 181, 176, 3, 2, 2, 2, 181, 177, - 3, 2, 2, 2, 181, 178, 3, 2, 2, 2, 181, 179, 3, 2, 2, 2, 181, 180, 3, 2, - 2, 2, 182, 39, 3, 2, 2, 2, 183, 184, 7, 22, 2, 2, 184, 185, 5, 42, 22, - 2, 185, 41, 3, 2, 2, 2, 186, 187, 7, 43, 2, 2, 187, 188, 5, 62, 32, 2, - 188, 189, 7, 44, 2, 2, 189, 43, 3, 2, 2, 2, 190, 191, 7, 23, 2, 2, 191, - 192, 5, 60, 31, 2, 192, 45, 3, 2, 2, 2, 193, 194, 7, 24, 2, 2, 194, 195, - 5, 48, 25, 2, 195, 47, 3, 2, 2, 2, 196, 197, 7, 43, 2, 2, 197, 202, 5, - 60, 31, 2, 198, 199, 7, 49, 2, 2, 199, 201, 5, 60, 31, 2, 200, 198, 3, - 2, 2, 2, 201, 204, 3, 2, 2, 2, 202, 200, 3, 2, 2, 2, 202, 203, 3, 2, 2, - 2, 203, 205, 3, 2, 2, 2, 204, 202, 3, 2, 2, 2, 205, 206, 7, 44, 2, 2, 206, - 49, 3, 2, 2, 2, 207, 208, 7, 25, 2, 2, 208, 209, 7, 43, 2, 2, 209, 214, - 5, 42, 22, 2, 210, 211, 7, 49, 2, 2, 211, 213, 5, 42, 22, 2, 212, 210, - 3, 2, 2, 2, 213, 216, 3, 2, 2, 2, 214, 212, 3, 2, 2, 2, 214, 215, 3, 2, - 2, 2, 215, 217, 3, 2, 2, 2, 216, 214, 3, 2, 2, 2, 217, 218, 7, 44, 2, 2, - 218, 51, 3, 2, 2, 2, 219, 220, 7, 26, 2, 2, 220, 221, 7, 43, 2, 2, 221, - 226, 5, 60, 31, 2, 222, 223, 7, 49, 2, 2, 223, 225, 5, 60, 31, 2, 224, - 222, 3, 2, 2, 2, 225, 228, 3, 2, 2, 2, 226, 224, 3, 2, 2, 2, 226, 227, - 3, 2, 2, 2, 227, 229, 3, 2, 2, 2, 228, 226, 3, 2, 2, 2, 229, 230, 7, 44, - 2, 2, 230, 53, 3, 2, 2, 2, 231, 232, 7, 27, 2, 2, 232, 233, 7, 43, 2, 2, - 233, 238, 5, 48, 25, 2, 234, 235, 7, 49, 2, 2, 235, 237, 5, 48, 25, 2, - 236, 234, 3, 2, 2, 2, 237, 240, 3, 2, 2, 2, 238, 236, 3, 2, 2, 2, 238, - 239, 3, 2, 2, 2, 239, 241, 3, 2, 2, 2, 240, 238, 3, 2, 2, 2, 241, 242, - 7, 44, 2, 2, 242, 55, 3, 2, 2, 2, 243, 244, 7, 28, 2, 2, 244, 245, 7, 43, - 2, 2, 245, 250, 5, 38, 20, 2, 246, 247, 7, 49, 2, 2, 247, 249, 5, 38, 20, - 2, 248, 246, 3, 2, 2, 2, 249, 252, 3, 2, 2, 2, 250, 248, 3, 2, 2, 2, 250, - 251, 3, 2, 2, 2, 251, 253, 3, 2, 2, 2, 252, 250, 3, 2, 2, 2, 253, 254, - 7, 44, 2, 2, 254, 57, 3, 2, 2, 2, 255, 256, 7, 29, 2, 2, 256, 257, 7, 43, - 2, 2, 257, 258, 7, 30, 2, 2, 258, 259, 7, 49, 2, 2, 259, 260, 7, 30, 2, - 2, 260, 261, 7, 49, 2, 2, 261, 262, 7, 30, 2, 2, 262, 263, 7, 49, 2, 2, - 263, 264, 7, 30, 2, 2, 264, 265, 7, 44, 2, 2, 265, 59, 3, 2, 2, 2, 266, - 267, 7, 43, 2, 2, 267, 272, 5, 62, 32, 2, 268, 269, 7, 49, 2, 2, 269, 271, - 5, 62, 32, 2, 270, 268, 3, 2, 2, 2, 271, 274, 3, 2, 2, 2, 272, 270, 3, - 2, 2, 2, 272, 273, 3, 2, 2, 2, 273, 275, 3, 2, 2, 2, 274, 272, 3, 2, 2, - 2, 275, 276, 7, 44, 2, 2, 276, 61, 3, 2, 2, 2, 277, 278, 7, 30, 2, 2, 278, - 279, 7, 30, 2, 2, 279, 63, 3, 2, 2, 2, 280, 282, 5, 24, 13, 2, 281, 283, - 7, 13, 2, 2, 282, 281, 3, 2, 2, 2, 282, 283, 3, 2, 2, 2, 283, 284, 3, 2, - 2, 2, 284, 285, 7, 19, 2, 2, 285, 302, 7, 43, 2, 2, 286, 291, 5, 26, 14, - 2, 287, 288, 7, 49, 2, 2, 288, 290, 5, 26, 14, 2, 289, 287, 3, 2, 2, 2, - 290, 293, 3, 2, 2, 2, 291, 289, 3, 2, 2, 2, 291, 292, 3, 2, 2, 2, 292, - 303, 3, 2, 2, 2, 293, 291, 3, 2, 2, 2, 294, 299, 5, 28, 15, 2, 295, 296, - 7, 49, 2, 2, 296, 298, 5, 28, 15, 2, 297, 295, 3, 2, 2, 2, 298, 301, 3, - 2, 2, 2, 299, 297, 3, 2, 2, 2, 299, 300, 3, 2, 2, 2, 300, 303, 3, 2, 2, - 2, 301, 299, 3, 2, 2, 2, 302, 286, 3, 2, 2, 2, 302, 294, 3, 2, 2, 2, 303, - 304, 3, 2, 2, 2, 304, 305, 7, 44, 2, 2, 305, 65, 3, 2, 2, 2, 23, 77, 88, - 92, 101, 110, 118, 125, 135, 143, 171, 181, 202, 214, 226, 238, 250, 272, - 282, 291, 299, 302, + 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, + 9, 34, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 3, 78, + 10, 3, 12, 3, 14, 3, 81, 11, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 7, + 4, 89, 10, 4, 12, 4, 14, 4, 92, 11, 4, 3, 5, 5, 5, 95, 10, 5, 3, 5, 3, + 5, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 5, 6, 104, 10, 6, 3, 7, 3, 7, 3, 7, 3, + 7, 3, 7, 3, 7, 3, 7, 5, 7, 113, 10, 7, 3, 8, 3, 8, 3, 8, 3, 8, 3, 9, 3, + 9, 5, 9, 121, 10, 9, 3, 9, 3, 9, 3, 9, 3, 10, 3, 10, 5, 10, 128, 10, 10, + 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 5, 11, 138, 10, + 11, 3, 11, 3, 11, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 5, 12, 148, + 10, 12, 3, 12, 3, 12, 3, 12, 7, 12, 153, 10, 12, 12, 12, 14, 12, 156, 11, + 12, 3, 13, 3, 13, 3, 13, 3, 13, 5, 13, 162, 10, 13, 3, 14, 3, 14, 3, 15, + 3, 15, 3, 16, 3, 16, 3, 17, 3, 17, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, + 18, 3, 18, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, + 3, 20, 3, 20, 5, 20, 190, 10, 20, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, + 21, 3, 21, 3, 21, 5, 21, 200, 10, 21, 3, 22, 3, 22, 3, 22, 3, 23, 3, 23, + 3, 23, 3, 23, 3, 24, 3, 24, 3, 24, 3, 25, 3, 25, 3, 25, 3, 26, 3, 26, 3, + 26, 3, 26, 7, 26, 219, 10, 26, 12, 26, 14, 26, 222, 11, 26, 3, 26, 3, 26, + 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 7, 27, 231, 10, 27, 12, 27, 14, 27, + 234, 11, 27, 3, 27, 3, 27, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 7, 28, 243, + 10, 28, 12, 28, 14, 28, 246, 11, 28, 3, 28, 3, 28, 3, 29, 3, 29, 3, 29, + 3, 29, 3, 29, 7, 29, 255, 10, 29, 12, 29, 14, 29, 258, 11, 29, 3, 29, 3, + 29, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 7, 30, 267, 10, 30, 12, 30, 14, + 30, 270, 11, 30, 3, 30, 3, 30, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, + 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 32, 3, 32, 3, 32, 3, 32, 7, 32, 289, + 10, 32, 12, 32, 14, 32, 292, 11, 32, 3, 32, 3, 32, 3, 33, 3, 33, 3, 33, + 3, 34, 3, 34, 5, 34, 301, 10, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 7, + 34, 308, 10, 34, 12, 34, 14, 34, 311, 11, 34, 3, 34, 3, 34, 3, 34, 7, 34, + 316, 10, 34, 12, 34, 14, 34, 319, 11, 34, 5, 34, 321, 10, 34, 3, 34, 3, + 34, 3, 34, 2, 5, 4, 6, 22, 35, 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, 2, 3, 3, 2, 14, 15, 2, 327, 2, 68, 3, 2, 2, 2, 4, 71, 3, + 2, 2, 2, 6, 82, 3, 2, 2, 2, 8, 94, 3, 2, 2, 2, 10, 103, 3, 2, 2, 2, 12, + 112, 3, 2, 2, 2, 14, 114, 3, 2, 2, 2, 16, 118, 3, 2, 2, 2, 18, 125, 3, + 2, 2, 2, 20, 134, 3, 2, 2, 2, 22, 147, 3, 2, 2, 2, 24, 161, 3, 2, 2, 2, + 26, 163, 3, 2, 2, 2, 28, 165, 3, 2, 2, 2, 30, 167, 3, 2, 2, 2, 32, 169, + 3, 2, 2, 2, 34, 171, 3, 2, 2, 2, 36, 178, 3, 2, 2, 2, 38, 189, 3, 2, 2, + 2, 40, 199, 3, 2, 2, 2, 42, 201, 3, 2, 2, 2, 44, 204, 3, 2, 2, 2, 46, 208, + 3, 2, 2, 2, 48, 211, 3, 2, 2, 2, 50, 214, 3, 2, 2, 2, 52, 225, 3, 2, 2, + 2, 54, 237, 3, 2, 2, 2, 56, 249, 3, 2, 2, 2, 58, 261, 3, 2, 2, 2, 60, 273, + 3, 2, 2, 2, 62, 284, 3, 2, 2, 2, 64, 295, 3, 2, 2, 2, 66, 298, 3, 2, 2, + 2, 68, 69, 5, 4, 3, 2, 69, 70, 7, 2, 2, 3, 70, 3, 3, 2, 2, 2, 71, 72, 8, + 3, 1, 2, 72, 73, 5, 6, 4, 2, 73, 79, 3, 2, 2, 2, 74, 75, 12, 3, 2, 2, 75, + 76, 7, 12, 2, 2, 76, 78, 5, 6, 4, 2, 77, 74, 3, 2, 2, 2, 78, 81, 3, 2, + 2, 2, 79, 77, 3, 2, 2, 2, 79, 80, 3, 2, 2, 2, 80, 5, 3, 2, 2, 2, 81, 79, + 3, 2, 2, 2, 82, 83, 8, 4, 1, 2, 83, 84, 5, 8, 5, 2, 84, 90, 3, 2, 2, 2, + 85, 86, 12, 3, 2, 2, 86, 87, 7, 11, 2, 2, 87, 89, 5, 8, 5, 2, 88, 85, 3, + 2, 2, 2, 89, 92, 3, 2, 2, 2, 90, 88, 3, 2, 2, 2, 90, 91, 3, 2, 2, 2, 91, + 7, 3, 2, 2, 2, 92, 90, 3, 2, 2, 2, 93, 95, 7, 13, 2, 2, 94, 93, 3, 2, 2, + 2, 94, 95, 3, 2, 2, 2, 95, 96, 3, 2, 2, 2, 96, 97, 5, 10, 6, 2, 97, 9, + 3, 2, 2, 2, 98, 104, 5, 12, 7, 2, 99, 100, 7, 44, 2, 2, 100, 101, 5, 4, + 3, 2, 101, 102, 7, 45, 2, 2, 102, 104, 3, 2, 2, 2, 103, 98, 3, 2, 2, 2, + 103, 99, 3, 2, 2, 2, 104, 11, 3, 2, 2, 2, 105, 113, 5, 14, 8, 2, 106, 113, + 5, 16, 9, 2, 107, 113, 5, 18, 10, 2, 108, 113, 5, 20, 11, 2, 109, 113, + 5, 66, 34, 2, 110, 113, 5, 34, 18, 2, 111, 113, 5, 36, 19, 2, 112, 105, + 3, 2, 2, 2, 112, 106, 3, 2, 2, 2, 112, 107, 3, 2, 2, 2, 112, 108, 3, 2, + 2, 2, 112, 109, 3, 2, 2, 2, 112, 110, 3, 2, 2, 2, 112, 111, 3, 2, 2, 2, + 113, 13, 3, 2, 2, 2, 114, 115, 5, 22, 12, 2, 115, 116, 7, 3, 2, 2, 116, + 117, 5, 22, 12, 2, 117, 15, 3, 2, 2, 2, 118, 120, 5, 26, 14, 2, 119, 121, + 7, 13, 2, 2, 120, 119, 3, 2, 2, 2, 120, 121, 3, 2, 2, 2, 121, 122, 3, 2, + 2, 2, 122, 123, 9, 2, 2, 2, 123, 124, 5, 28, 15, 2, 124, 17, 3, 2, 2, 2, + 125, 127, 5, 26, 14, 2, 126, 128, 7, 13, 2, 2, 127, 126, 3, 2, 2, 2, 127, + 128, 3, 2, 2, 2, 128, 129, 3, 2, 2, 2, 129, 130, 7, 16, 2, 2, 130, 131, + 5, 22, 12, 2, 131, 132, 7, 11, 2, 2, 132, 133, 5, 22, 12, 2, 133, 19, 3, + 2, 2, 2, 134, 135, 5, 26, 14, 2, 135, 137, 7, 17, 2, 2, 136, 138, 7, 13, + 2, 2, 137, 136, 3, 2, 2, 2, 137, 138, 3, 2, 2, 2, 138, 139, 3, 2, 2, 2, + 139, 140, 7, 18, 2, 2, 140, 21, 3, 2, 2, 2, 141, 142, 8, 12, 1, 2, 142, + 148, 5, 24, 13, 2, 143, 144, 7, 44, 2, 2, 144, 145, 5, 22, 12, 2, 145, + 146, 7, 45, 2, 2, 146, 148, 3, 2, 2, 2, 147, 141, 3, 2, 2, 2, 147, 143, + 3, 2, 2, 2, 148, 154, 3, 2, 2, 2, 149, 150, 12, 3, 2, 2, 150, 151, 7, 20, + 2, 2, 151, 153, 5, 22, 12, 4, 152, 149, 3, 2, 2, 2, 153, 156, 3, 2, 2, + 2, 154, 152, 3, 2, 2, 2, 154, 155, 3, 2, 2, 2, 155, 23, 3, 2, 2, 2, 156, + 154, 3, 2, 2, 2, 157, 162, 5, 26, 14, 2, 158, 162, 5, 28, 15, 2, 159, 162, + 5, 30, 16, 2, 160, 162, 5, 32, 17, 2, 161, 157, 3, 2, 2, 2, 161, 158, 3, + 2, 2, 2, 161, 159, 3, 2, 2, 2, 161, 160, 3, 2, 2, 2, 162, 25, 3, 2, 2, + 2, 163, 164, 7, 32, 2, 2, 164, 27, 3, 2, 2, 2, 165, 166, 7, 70, 2, 2, 166, + 29, 3, 2, 2, 2, 167, 168, 7, 31, 2, 2, 168, 31, 3, 2, 2, 2, 169, 170, 7, + 10, 2, 2, 170, 33, 3, 2, 2, 2, 171, 172, 7, 21, 2, 2, 172, 173, 7, 44, + 2, 2, 173, 174, 5, 38, 20, 2, 174, 175, 7, 50, 2, 2, 175, 176, 5, 38, 20, + 2, 176, 177, 7, 45, 2, 2, 177, 35, 3, 2, 2, 2, 178, 179, 7, 22, 2, 2, 179, + 180, 7, 44, 2, 2, 180, 181, 5, 38, 20, 2, 181, 182, 7, 50, 2, 2, 182, 183, + 5, 38, 20, 2, 183, 184, 7, 50, 2, 2, 184, 185, 7, 31, 2, 2, 185, 186, 7, + 45, 2, 2, 186, 37, 3, 2, 2, 2, 187, 190, 5, 26, 14, 2, 188, 190, 5, 40, + 21, 2, 189, 187, 3, 2, 2, 2, 189, 188, 3, 2, 2, 2, 190, 39, 3, 2, 2, 2, + 191, 200, 5, 42, 22, 2, 192, 200, 5, 46, 24, 2, 193, 200, 5, 48, 25, 2, + 194, 200, 5, 52, 27, 2, 195, 200, 5, 54, 28, 2, 196, 200, 5, 56, 29, 2, + 197, 200, 5, 58, 30, 2, 198, 200, 5, 60, 31, 2, 199, 191, 3, 2, 2, 2, 199, + 192, 3, 2, 2, 2, 199, 193, 3, 2, 2, 2, 199, 194, 3, 2, 2, 2, 199, 195, + 3, 2, 2, 2, 199, 196, 3, 2, 2, 2, 199, 197, 3, 2, 2, 2, 199, 198, 3, 2, + 2, 2, 200, 41, 3, 2, 2, 2, 201, 202, 7, 23, 2, 2, 202, 203, 5, 44, 23, + 2, 203, 43, 3, 2, 2, 2, 204, 205, 7, 44, 2, 2, 205, 206, 5, 64, 33, 2, + 206, 207, 7, 45, 2, 2, 207, 45, 3, 2, 2, 2, 208, 209, 7, 24, 2, 2, 209, + 210, 5, 62, 32, 2, 210, 47, 3, 2, 2, 2, 211, 212, 7, 25, 2, 2, 212, 213, + 5, 50, 26, 2, 213, 49, 3, 2, 2, 2, 214, 215, 7, 44, 2, 2, 215, 220, 5, + 62, 32, 2, 216, 217, 7, 50, 2, 2, 217, 219, 5, 62, 32, 2, 218, 216, 3, + 2, 2, 2, 219, 222, 3, 2, 2, 2, 220, 218, 3, 2, 2, 2, 220, 221, 3, 2, 2, + 2, 221, 223, 3, 2, 2, 2, 222, 220, 3, 2, 2, 2, 223, 224, 7, 45, 2, 2, 224, + 51, 3, 2, 2, 2, 225, 226, 7, 26, 2, 2, 226, 227, 7, 44, 2, 2, 227, 232, + 5, 44, 23, 2, 228, 229, 7, 50, 2, 2, 229, 231, 5, 44, 23, 2, 230, 228, + 3, 2, 2, 2, 231, 234, 3, 2, 2, 2, 232, 230, 3, 2, 2, 2, 232, 233, 3, 2, + 2, 2, 233, 235, 3, 2, 2, 2, 234, 232, 3, 2, 2, 2, 235, 236, 7, 45, 2, 2, + 236, 53, 3, 2, 2, 2, 237, 238, 7, 27, 2, 2, 238, 239, 7, 44, 2, 2, 239, + 244, 5, 62, 32, 2, 240, 241, 7, 50, 2, 2, 241, 243, 5, 62, 32, 2, 242, + 240, 3, 2, 2, 2, 243, 246, 3, 2, 2, 2, 244, 242, 3, 2, 2, 2, 244, 245, + 3, 2, 2, 2, 245, 247, 3, 2, 2, 2, 246, 244, 3, 2, 2, 2, 247, 248, 7, 45, + 2, 2, 248, 55, 3, 2, 2, 2, 249, 250, 7, 28, 2, 2, 250, 251, 7, 44, 2, 2, + 251, 256, 5, 50, 26, 2, 252, 253, 7, 50, 2, 2, 253, 255, 5, 50, 26, 2, + 254, 252, 3, 2, 2, 2, 255, 258, 3, 2, 2, 2, 256, 254, 3, 2, 2, 2, 256, + 257, 3, 2, 2, 2, 257, 259, 3, 2, 2, 2, 258, 256, 3, 2, 2, 2, 259, 260, + 7, 45, 2, 2, 260, 57, 3, 2, 2, 2, 261, 262, 7, 29, 2, 2, 262, 263, 7, 44, + 2, 2, 263, 268, 5, 40, 21, 2, 264, 265, 7, 50, 2, 2, 265, 267, 5, 40, 21, + 2, 266, 264, 3, 2, 2, 2, 267, 270, 3, 2, 2, 2, 268, 266, 3, 2, 2, 2, 268, + 269, 3, 2, 2, 2, 269, 271, 3, 2, 2, 2, 270, 268, 3, 2, 2, 2, 271, 272, + 7, 45, 2, 2, 272, 59, 3, 2, 2, 2, 273, 274, 7, 30, 2, 2, 274, 275, 7, 44, + 2, 2, 275, 276, 7, 31, 2, 2, 276, 277, 7, 50, 2, 2, 277, 278, 7, 31, 2, + 2, 278, 279, 7, 50, 2, 2, 279, 280, 7, 31, 2, 2, 280, 281, 7, 50, 2, 2, + 281, 282, 7, 31, 2, 2, 282, 283, 7, 45, 2, 2, 283, 61, 3, 2, 2, 2, 284, + 285, 7, 44, 2, 2, 285, 290, 5, 64, 33, 2, 286, 287, 7, 50, 2, 2, 287, 289, + 5, 64, 33, 2, 288, 286, 3, 2, 2, 2, 289, 292, 3, 2, 2, 2, 290, 288, 3, + 2, 2, 2, 290, 291, 3, 2, 2, 2, 291, 293, 3, 2, 2, 2, 292, 290, 3, 2, 2, + 2, 293, 294, 7, 45, 2, 2, 294, 63, 3, 2, 2, 2, 295, 296, 7, 31, 2, 2, 296, + 297, 7, 31, 2, 2, 297, 65, 3, 2, 2, 2, 298, 300, 5, 26, 14, 2, 299, 301, + 7, 13, 2, 2, 300, 299, 3, 2, 2, 2, 300, 301, 3, 2, 2, 2, 301, 302, 3, 2, + 2, 2, 302, 303, 7, 19, 2, 2, 303, 320, 7, 44, 2, 2, 304, 309, 5, 28, 15, + 2, 305, 306, 7, 50, 2, 2, 306, 308, 5, 28, 15, 2, 307, 305, 3, 2, 2, 2, + 308, 311, 3, 2, 2, 2, 309, 307, 3, 2, 2, 2, 309, 310, 3, 2, 2, 2, 310, + 321, 3, 2, 2, 2, 311, 309, 3, 2, 2, 2, 312, 317, 5, 30, 16, 2, 313, 314, + 7, 50, 2, 2, 314, 316, 5, 30, 16, 2, 315, 313, 3, 2, 2, 2, 316, 319, 3, + 2, 2, 2, 317, 315, 3, 2, 2, 2, 317, 318, 3, 2, 2, 2, 318, 321, 3, 2, 2, + 2, 319, 317, 3, 2, 2, 2, 320, 304, 3, 2, 2, 2, 320, 312, 3, 2, 2, 2, 321, + 322, 3, 2, 2, 2, 322, 323, 7, 45, 2, 2, 323, 67, 3, 2, 2, 2, 25, 79, 90, + 94, 103, 112, 120, 127, 137, 147, 154, 161, 189, 199, 220, 232, 244, 256, + 268, 290, 300, 309, 317, 320, } var deserializer = antlr.NewATNDeserializer(nil) var deserializedATN = deserializer.DeserializeFromUInt16(parserATN) @@ -152,34 +160,34 @@ var deserializedATN = deserializer.DeserializeFromUInt16(parserATN) var literalNames = []string{ "", "", "'<'", "'='", "'>'", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", - "'#'", "'$'", "'_'", "'\"'", "'%'", "'&'", "", "'('", "')'", "'['", "']'", - "'*'", "'+'", "','", "'-'", "'.'", "'/'", "':'", "';'", "'?'", "'|'", "", - "", "", "", "", "", "", "", "", "", "", "", "", "''''", + "", "'#'", "'$'", "'_'", "'\"'", "'%'", "'&'", "", "'('", "')'", "'['", + "']'", "'*'", "'+'", "','", "'-'", "'.'", "'/'", "':'", "';'", "'?'", "'|'", + "", "", "", "", "", "", "", "", "", "", "", "", "", "''''", } var symbolicNames = []string{ "", "ComparisonOperator", "LT", "EQ", "GT", "NEQ", "GTEQ", "LTEQ", "BooleanLiteral", - "AND", "OR", "NOT", "LIKE", "ILIKE", "BETWEEN", "IS", "NULL", "IN", "SpatialOperator", - "DistanceOperator", "POINT", "LINESTRING", "POLYGON", "MULTIPOINT", "MULTILINESTRING", - "MULTIPOLYGON", "GEOMETRYCOLLECTION", "ENVELOPE", "NumericLiteral", "Identifier", - "IdentifierStart", "IdentifierPart", "ALPHA", "DIGIT", "OCTOTHORP", "DOLLAR", - "UNDERSCORE", "DOUBLEQUOTE", "PERCENT", "AMPERSAND", "QUOTE", "LEFTPAREN", - "RIGHTPAREN", "LEFTSQUAREBRACKET", "RIGHTSQUAREBRACKET", "ASTERISK", "PLUS", - "COMMA", "MINUS", "PERIOD", "SOLIDUS", "COLON", "SEMICOLON", "QUESTIONMARK", - "VERTICALBAR", "BIT", "HEXIT", "UnsignedNumericLiteral", "SignedNumericLiteral", - "ExactNumericLiteral", "ApproximateNumericLiteral", "Mantissa", "Exponent", - "SignedInteger", "UnsignedInteger", "Sign", "WS", "CharacterStringLiteral", - "QuotedQuote", + "AND", "OR", "NOT", "LIKE", "ILIKE", "BETWEEN", "IS", "NULL", "IN", "ArithmeticOperator", + "SpatialOperator", "DistanceOperator", "POINT", "LINESTRING", "POLYGON", + "MULTIPOINT", "MULTILINESTRING", "MULTIPOLYGON", "GEOMETRYCOLLECTION", + "ENVELOPE", "NumericLiteral", "Identifier", "IdentifierStart", "IdentifierPart", + "ALPHA", "DIGIT", "OCTOTHORP", "DOLLAR", "UNDERSCORE", "DOUBLEQUOTE", "PERCENT", + "AMPERSAND", "QUOTE", "LEFTPAREN", "RIGHTPAREN", "LEFTSQUAREBRACKET", "RIGHTSQUAREBRACKET", + "ASTERISK", "PLUS", "COMMA", "MINUS", "PERIOD", "SOLIDUS", "COLON", "SEMICOLON", + "QUESTIONMARK", "VERTICALBAR", "BIT", "HEXIT", "UnsignedNumericLiteral", + "SignedNumericLiteral", "ExactNumericLiteral", "ApproximateNumericLiteral", + "Mantissa", "Exponent", "SignedInteger", "UnsignedInteger", "Sign", "WS", + "CharacterStringLiteral", "QuotedQuote", } var ruleNames = []string{ "cqlFilter", "booleanValueExpression", "booleanTerm", "booleanFactor", "booleanPrimary", "predicate", "binaryComparisonPredicate", "likePredicate", - "betweenPredicate", "isNullPredicate", "scalarExpression", "propertyName", - "characterLiteral", "numericLiteral", "booleanLiteral", "spatialPredicate", - "distancePredicate", "geomExpression", "geomLiteral", "point", "pointList", - "linestring", "polygon", "polygonDef", "multiPoint", "multiLinestring", - "multiPolygon", "geometryCollection", "envelope", "coordList", "coordinate", - "inPredicate", + "betweenPredicate", "isNullPredicate", "arithmeticExpression", "scalarValue", + "propertyName", "characterLiteral", "numericLiteral", "booleanLiteral", + "spatialPredicate", "distancePredicate", "geomExpression", "geomLiteral", + "point", "pointList", "linestring", "polygon", "polygonDef", "multiPoint", + "multiLinestring", "multiPolygon", "geometryCollection", "envelope", "coordList", + "coordinate", "inPredicate", } var decisionToDFA = make([]*antlr.DFA, len(deserializedATN.DecisionToState)) @@ -227,57 +235,58 @@ const ( CQLIS = 15 CQLNULL = 16 CQLIN = 17 - CQLSpatialOperator = 18 - CQLDistanceOperator = 19 - CQLPOINT = 20 - CQLLINESTRING = 21 - CQLPOLYGON = 22 - CQLMULTIPOINT = 23 - CQLMULTILINESTRING = 24 - CQLMULTIPOLYGON = 25 - CQLGEOMETRYCOLLECTION = 26 - CQLENVELOPE = 27 - CQLNumericLiteral = 28 - CQLIdentifier = 29 - CQLIdentifierStart = 30 - CQLIdentifierPart = 31 - CQLALPHA = 32 - CQLDIGIT = 33 - CQLOCTOTHORP = 34 - CQLDOLLAR = 35 - CQLUNDERSCORE = 36 - CQLDOUBLEQUOTE = 37 - CQLPERCENT = 38 - CQLAMPERSAND = 39 - CQLQUOTE = 40 - CQLLEFTPAREN = 41 - CQLRIGHTPAREN = 42 - CQLLEFTSQUAREBRACKET = 43 - CQLRIGHTSQUAREBRACKET = 44 - CQLASTERISK = 45 - CQLPLUS = 46 - CQLCOMMA = 47 - CQLMINUS = 48 - CQLPERIOD = 49 - CQLSOLIDUS = 50 - CQLCOLON = 51 - CQLSEMICOLON = 52 - CQLQUESTIONMARK = 53 - CQLVERTICALBAR = 54 - CQLBIT = 55 - CQLHEXIT = 56 - CQLUnsignedNumericLiteral = 57 - CQLSignedNumericLiteral = 58 - CQLExactNumericLiteral = 59 - CQLApproximateNumericLiteral = 60 - CQLMantissa = 61 - CQLExponent = 62 - CQLSignedInteger = 63 - CQLUnsignedInteger = 64 - CQLSign = 65 - CQLWS = 66 - CQLCharacterStringLiteral = 67 - CQLQuotedQuote = 68 + CQLArithmeticOperator = 18 + CQLSpatialOperator = 19 + CQLDistanceOperator = 20 + CQLPOINT = 21 + CQLLINESTRING = 22 + CQLPOLYGON = 23 + CQLMULTIPOINT = 24 + CQLMULTILINESTRING = 25 + CQLMULTIPOLYGON = 26 + CQLGEOMETRYCOLLECTION = 27 + CQLENVELOPE = 28 + CQLNumericLiteral = 29 + CQLIdentifier = 30 + CQLIdentifierStart = 31 + CQLIdentifierPart = 32 + CQLALPHA = 33 + CQLDIGIT = 34 + CQLOCTOTHORP = 35 + CQLDOLLAR = 36 + CQLUNDERSCORE = 37 + CQLDOUBLEQUOTE = 38 + CQLPERCENT = 39 + CQLAMPERSAND = 40 + CQLQUOTE = 41 + CQLLEFTPAREN = 42 + CQLRIGHTPAREN = 43 + CQLLEFTSQUAREBRACKET = 44 + CQLRIGHTSQUAREBRACKET = 45 + CQLASTERISK = 46 + CQLPLUS = 47 + CQLCOMMA = 48 + CQLMINUS = 49 + CQLPERIOD = 50 + CQLSOLIDUS = 51 + CQLCOLON = 52 + CQLSEMICOLON = 53 + CQLQUESTIONMARK = 54 + CQLVERTICALBAR = 55 + CQLBIT = 56 + CQLHEXIT = 57 + CQLUnsignedNumericLiteral = 58 + CQLSignedNumericLiteral = 59 + CQLExactNumericLiteral = 60 + CQLApproximateNumericLiteral = 61 + CQLMantissa = 62 + CQLExponent = 63 + CQLSignedInteger = 64 + CQLUnsignedInteger = 65 + CQLSign = 66 + CQLWS = 67 + CQLCharacterStringLiteral = 68 + CQLQuotedQuote = 69 ) // CQL rules. @@ -292,28 +301,29 @@ const ( CQLRULE_likePredicate = 7 CQLRULE_betweenPredicate = 8 CQLRULE_isNullPredicate = 9 - CQLRULE_scalarExpression = 10 - CQLRULE_propertyName = 11 - CQLRULE_characterLiteral = 12 - CQLRULE_numericLiteral = 13 - CQLRULE_booleanLiteral = 14 - CQLRULE_spatialPredicate = 15 - CQLRULE_distancePredicate = 16 - CQLRULE_geomExpression = 17 - CQLRULE_geomLiteral = 18 - CQLRULE_point = 19 - CQLRULE_pointList = 20 - CQLRULE_linestring = 21 - CQLRULE_polygon = 22 - CQLRULE_polygonDef = 23 - CQLRULE_multiPoint = 24 - CQLRULE_multiLinestring = 25 - CQLRULE_multiPolygon = 26 - CQLRULE_geometryCollection = 27 - CQLRULE_envelope = 28 - CQLRULE_coordList = 29 - CQLRULE_coordinate = 30 - CQLRULE_inPredicate = 31 + CQLRULE_arithmeticExpression = 10 + CQLRULE_scalarValue = 11 + CQLRULE_propertyName = 12 + CQLRULE_characterLiteral = 13 + CQLRULE_numericLiteral = 14 + CQLRULE_booleanLiteral = 15 + CQLRULE_spatialPredicate = 16 + CQLRULE_distancePredicate = 17 + CQLRULE_geomExpression = 18 + CQLRULE_geomLiteral = 19 + CQLRULE_point = 20 + CQLRULE_pointList = 21 + CQLRULE_linestring = 22 + CQLRULE_polygon = 23 + CQLRULE_polygonDef = 24 + CQLRULE_multiPoint = 25 + CQLRULE_multiLinestring = 26 + CQLRULE_multiPolygon = 27 + CQLRULE_geometryCollection = 28 + CQLRULE_envelope = 29 + CQLRULE_coordList = 30 + CQLRULE_coordinate = 31 + CQLRULE_inPredicate = 32 ) // ICqlFilterContext is an interface to support dynamic dispatch. @@ -410,11 +420,11 @@ func (p *CQL) CqlFilter() (localctx ICqlFilterContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(64) + p.SetState(66) p.booleanValueExpression(0) } { - p.SetState(65) + p.SetState(67) p.Match(CQLEOF) } @@ -536,12 +546,12 @@ func (p *CQL) booleanValueExpression(_p int) (localctx IBooleanValueExpressionCo p.EnterOuterAlt(localctx, 1) { - p.SetState(68) + p.SetState(70) p.booleanTerm(0) } p.GetParserRuleContext().SetStop(p.GetTokenStream().LT(-1)) - p.SetState(75) + p.SetState(77) p.GetErrorHandler().Sync(p) _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 0, p.GetParserRuleContext()) @@ -553,22 +563,22 @@ func (p *CQL) booleanValueExpression(_p int) (localctx IBooleanValueExpressionCo _prevctx = localctx localctx = NewBooleanValueExpressionContext(p, _parentctx, _parentState) p.PushNewRecursionContext(localctx, _startState, CQLRULE_booleanValueExpression) - p.SetState(70) + p.SetState(72) if !(p.Precpred(p.GetParserRuleContext(), 1)) { panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 1)", "")) } { - p.SetState(71) + p.SetState(73) p.Match(CQLOR) } { - p.SetState(72) + p.SetState(74) p.booleanTerm(0) } } - p.SetState(77) + p.SetState(79) p.GetErrorHandler().Sync(p) _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 0, p.GetParserRuleContext()) } @@ -691,12 +701,12 @@ func (p *CQL) booleanTerm(_p int) (localctx IBooleanTermContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(79) + p.SetState(81) p.BooleanFactor() } p.GetParserRuleContext().SetStop(p.GetTokenStream().LT(-1)) - p.SetState(86) + p.SetState(88) p.GetErrorHandler().Sync(p) _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 1, p.GetParserRuleContext()) @@ -708,22 +718,22 @@ func (p *CQL) booleanTerm(_p int) (localctx IBooleanTermContext) { _prevctx = localctx localctx = NewBooleanTermContext(p, _parentctx, _parentState) p.PushNewRecursionContext(localctx, _startState, CQLRULE_booleanTerm) - p.SetState(81) + p.SetState(83) if !(p.Precpred(p.GetParserRuleContext(), 1)) { panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 1)", "")) } { - p.SetState(82) + p.SetState(84) p.Match(CQLAND) } { - p.SetState(83) + p.SetState(85) p.BooleanFactor() } } - p.SetState(88) + p.SetState(90) p.GetErrorHandler().Sync(p) _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 1, p.GetParserRuleContext()) } @@ -825,19 +835,19 @@ func (p *CQL) BooleanFactor() (localctx IBooleanFactorContext) { }() p.EnterOuterAlt(localctx, 1) - p.SetState(90) + p.SetState(92) p.GetErrorHandler().Sync(p) _la = p.GetTokenStream().LA(1) if _la == CQLNOT { { - p.SetState(89) + p.SetState(91) p.Match(CQLNOT) } } { - p.SetState(92) + p.SetState(94) p.BooleanPrimary() } @@ -950,34 +960,31 @@ func (p *CQL) BooleanPrimary() (localctx IBooleanPrimaryContext) { } }() - p.SetState(99) + p.SetState(101) p.GetErrorHandler().Sync(p) - - switch p.GetTokenStream().LA(1) { - case CQLBooleanLiteral, CQLSpatialOperator, CQLDistanceOperator, CQLNumericLiteral, CQLIdentifier, CQLCharacterStringLiteral: + switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 3, p.GetParserRuleContext()) { + case 1: p.EnterOuterAlt(localctx, 1) { - p.SetState(94) + p.SetState(96) p.Predicate() } - case CQLLEFTPAREN: + case 2: p.EnterOuterAlt(localctx, 2) { - p.SetState(95) + p.SetState(97) p.Match(CQLLEFTPAREN) } { - p.SetState(96) + p.SetState(98) p.booleanValueExpression(0) } { - p.SetState(97) + p.SetState(99) p.Match(CQLRIGHTPAREN) } - default: - panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) } return localctx @@ -1131,55 +1138,55 @@ func (p *CQL) Predicate() (localctx IPredicateContext) { } }() - p.SetState(108) + p.SetState(110) p.GetErrorHandler().Sync(p) switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 4, p.GetParserRuleContext()) { case 1: p.EnterOuterAlt(localctx, 1) { - p.SetState(101) + p.SetState(103) p.BinaryComparisonPredicate() } case 2: p.EnterOuterAlt(localctx, 2) { - p.SetState(102) + p.SetState(104) p.LikePredicate() } case 3: p.EnterOuterAlt(localctx, 3) { - p.SetState(103) + p.SetState(105) p.BetweenPredicate() } case 4: p.EnterOuterAlt(localctx, 4) { - p.SetState(104) + p.SetState(106) p.IsNullPredicate() } case 5: p.EnterOuterAlt(localctx, 5) { - p.SetState(105) + p.SetState(107) p.InPredicate() } case 6: p.EnterOuterAlt(localctx, 6) { - p.SetState(106) + p.SetState(108) p.SpatialPredicate() } case 7: p.EnterOuterAlt(localctx, 7) { - p.SetState(107) + p.SetState(109) p.DistancePredicate() } @@ -1226,27 +1233,27 @@ func NewBinaryComparisonPredicateContext(parser antlr.Parser, parent antlr.Parse func (s *BinaryComparisonPredicateContext) GetParser() antlr.Parser { return s.parser } -func (s *BinaryComparisonPredicateContext) AllScalarExpression() []IScalarExpressionContext { - var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IScalarExpressionContext)(nil)).Elem()) - var tst = make([]IScalarExpressionContext, len(ts)) +func (s *BinaryComparisonPredicateContext) AllArithmeticExpression() []IArithmeticExpressionContext { + var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IArithmeticExpressionContext)(nil)).Elem()) + var tst = make([]IArithmeticExpressionContext, len(ts)) for i, t := range ts { if t != nil { - tst[i] = t.(IScalarExpressionContext) + tst[i] = t.(IArithmeticExpressionContext) } } return tst } -func (s *BinaryComparisonPredicateContext) ScalarExpression(i int) IScalarExpressionContext { - var t = s.GetTypedRuleContext(reflect.TypeOf((*IScalarExpressionContext)(nil)).Elem(), i) +func (s *BinaryComparisonPredicateContext) ArithmeticExpression(i int) IArithmeticExpressionContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IArithmeticExpressionContext)(nil)).Elem(), i) if t == nil { return nil } - return t.(IScalarExpressionContext) + return t.(IArithmeticExpressionContext) } func (s *BinaryComparisonPredicateContext) ComparisonOperator() antlr.TerminalNode { @@ -1295,16 +1302,16 @@ func (p *CQL) BinaryComparisonPredicate() (localctx IBinaryComparisonPredicateCo p.EnterOuterAlt(localctx, 1) { - p.SetState(110) - p.ScalarExpression() + p.SetState(112) + p.arithmeticExpression(0) } { - p.SetState(111) + p.SetState(113) p.Match(CQLComparisonOperator) } { - p.SetState(112) - p.ScalarExpression() + p.SetState(114) + p.arithmeticExpression(0) } return localctx @@ -1423,21 +1430,21 @@ func (p *CQL) LikePredicate() (localctx ILikePredicateContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(114) + p.SetState(116) p.PropertyName() } - p.SetState(116) + p.SetState(118) p.GetErrorHandler().Sync(p) _la = p.GetTokenStream().LA(1) if _la == CQLNOT { { - p.SetState(115) + p.SetState(117) p.Match(CQLNOT) } } - p.SetState(118) + p.SetState(120) _la = p.GetTokenStream().LA(1) if !(_la == CQLLIKE || _la == CQLILIKE) { @@ -1447,7 +1454,7 @@ func (p *CQL) LikePredicate() (localctx ILikePredicateContext) { p.Consume() } { - p.SetState(119) + p.SetState(121) p.CharacterLiteral() } @@ -1506,27 +1513,27 @@ func (s *BetweenPredicateContext) BETWEEN() antlr.TerminalNode { return s.GetToken(CQLBETWEEN, 0) } -func (s *BetweenPredicateContext) AllScalarExpression() []IScalarExpressionContext { - var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IScalarExpressionContext)(nil)).Elem()) - var tst = make([]IScalarExpressionContext, len(ts)) +func (s *BetweenPredicateContext) AllArithmeticExpression() []IArithmeticExpressionContext { + var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IArithmeticExpressionContext)(nil)).Elem()) + var tst = make([]IArithmeticExpressionContext, len(ts)) for i, t := range ts { if t != nil { - tst[i] = t.(IScalarExpressionContext) + tst[i] = t.(IArithmeticExpressionContext) } } return tst } -func (s *BetweenPredicateContext) ScalarExpression(i int) IScalarExpressionContext { - var t = s.GetTypedRuleContext(reflect.TypeOf((*IScalarExpressionContext)(nil)).Elem(), i) +func (s *BetweenPredicateContext) ArithmeticExpression(i int) IArithmeticExpressionContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IArithmeticExpressionContext)(nil)).Elem(), i) if t == nil { return nil } - return t.(IScalarExpressionContext) + return t.(IArithmeticExpressionContext) } func (s *BetweenPredicateContext) AND() antlr.TerminalNode { @@ -1580,35 +1587,35 @@ func (p *CQL) BetweenPredicate() (localctx IBetweenPredicateContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(121) + p.SetState(123) p.PropertyName() } - p.SetState(123) + p.SetState(125) p.GetErrorHandler().Sync(p) _la = p.GetTokenStream().LA(1) if _la == CQLNOT { { - p.SetState(122) + p.SetState(124) p.Match(CQLNOT) } } { - p.SetState(125) + p.SetState(127) p.Match(CQLBETWEEN) } { - p.SetState(126) - p.ScalarExpression() + p.SetState(128) + p.arithmeticExpression(0) } { - p.SetState(127) + p.SetState(129) p.Match(CQLAND) } { - p.SetState(128) - p.ScalarExpression() + p.SetState(130) + p.arithmeticExpression(0) } return localctx @@ -1717,71 +1724,269 @@ func (p *CQL) IsNullPredicate() (localctx IIsNullPredicateContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(130) + p.SetState(132) p.PropertyName() } { - p.SetState(131) + p.SetState(133) p.Match(CQLIS) } - p.SetState(133) + p.SetState(135) p.GetErrorHandler().Sync(p) _la = p.GetTokenStream().LA(1) if _la == CQLNOT { { - p.SetState(132) + p.SetState(134) p.Match(CQLNOT) } } { - p.SetState(135) + p.SetState(137) p.Match(CQLNULL) } return localctx } -// IScalarExpressionContext is an interface to support dynamic dispatch. -type IScalarExpressionContext interface { +// IArithmeticExpressionContext is an interface to support dynamic dispatch. +type IArithmeticExpressionContext interface { + antlr.ParserRuleContext + + // GetParser returns the parser. + GetParser() antlr.Parser + + // IsArithmeticExpressionContext differentiates from other interfaces. + IsArithmeticExpressionContext() +} + +type ArithmeticExpressionContext struct { + *antlr.BaseParserRuleContext + parser antlr.Parser +} + +func NewEmptyArithmeticExpressionContext() *ArithmeticExpressionContext { + var p = new(ArithmeticExpressionContext) + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) + p.RuleIndex = CQLRULE_arithmeticExpression + return p +} + +func (*ArithmeticExpressionContext) IsArithmeticExpressionContext() {} + +func NewArithmeticExpressionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ArithmeticExpressionContext { + var p = new(ArithmeticExpressionContext) + + p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) + + p.parser = parser + p.RuleIndex = CQLRULE_arithmeticExpression + + return p +} + +func (s *ArithmeticExpressionContext) GetParser() antlr.Parser { return s.parser } + +func (s *ArithmeticExpressionContext) ScalarValue() IScalarValueContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IScalarValueContext)(nil)).Elem(), 0) + + if t == nil { + return nil + } + + return t.(IScalarValueContext) +} + +func (s *ArithmeticExpressionContext) LEFTPAREN() antlr.TerminalNode { + return s.GetToken(CQLLEFTPAREN, 0) +} + +func (s *ArithmeticExpressionContext) AllArithmeticExpression() []IArithmeticExpressionContext { + var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IArithmeticExpressionContext)(nil)).Elem()) + var tst = make([]IArithmeticExpressionContext, len(ts)) + + for i, t := range ts { + if t != nil { + tst[i] = t.(IArithmeticExpressionContext) + } + } + + return tst +} + +func (s *ArithmeticExpressionContext) ArithmeticExpression(i int) IArithmeticExpressionContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IArithmeticExpressionContext)(nil)).Elem(), i) + + if t == nil { + return nil + } + + return t.(IArithmeticExpressionContext) +} + +func (s *ArithmeticExpressionContext) RIGHTPAREN() antlr.TerminalNode { + return s.GetToken(CQLRIGHTPAREN, 0) +} + +func (s *ArithmeticExpressionContext) ArithmeticOperator() antlr.TerminalNode { + return s.GetToken(CQLArithmeticOperator, 0) +} + +func (s *ArithmeticExpressionContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ArithmeticExpressionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { + return antlr.TreesStringTree(s, ruleNames, recog) +} + +func (s *ArithmeticExpressionContext) EnterRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(CQLListener); ok { + listenerT.EnterArithmeticExpression(s) + } +} + +func (s *ArithmeticExpressionContext) ExitRule(listener antlr.ParseTreeListener) { + if listenerT, ok := listener.(CQLListener); ok { + listenerT.ExitArithmeticExpression(s) + } +} + +func (p *CQL) ArithmeticExpression() (localctx IArithmeticExpressionContext) { + return p.arithmeticExpression(0) +} + +func (p *CQL) arithmeticExpression(_p int) (localctx IArithmeticExpressionContext) { + var _parentctx antlr.ParserRuleContext = p.GetParserRuleContext() + _parentState := p.GetState() + localctx = NewArithmeticExpressionContext(p, p.GetParserRuleContext(), _parentState) + var _prevctx IArithmeticExpressionContext = localctx + var _ antlr.ParserRuleContext = _prevctx // TODO: To prevent unused variable warning. + _startState := 20 + p.EnterRecursionRule(localctx, 20, CQLRULE_arithmeticExpression, _p) + + defer func() { + p.UnrollRecursionContexts(_parentctx) + }() + + defer func() { + if err := recover(); err != nil { + if v, ok := err.(antlr.RecognitionException); ok { + localctx.SetException(v) + p.GetErrorHandler().ReportError(p, v) + p.GetErrorHandler().Recover(p, v) + } else { + panic(err) + } + } + }() + + var _alt int + + p.EnterOuterAlt(localctx, 1) + p.SetState(145) + p.GetErrorHandler().Sync(p) + + switch p.GetTokenStream().LA(1) { + case CQLBooleanLiteral, CQLNumericLiteral, CQLIdentifier, CQLCharacterStringLiteral: + { + p.SetState(140) + p.ScalarValue() + } + + case CQLLEFTPAREN: + { + p.SetState(141) + p.Match(CQLLEFTPAREN) + } + { + p.SetState(142) + p.arithmeticExpression(0) + } + { + p.SetState(143) + p.Match(CQLRIGHTPAREN) + } + + default: + panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) + } + p.GetParserRuleContext().SetStop(p.GetTokenStream().LT(-1)) + p.SetState(152) + p.GetErrorHandler().Sync(p) + _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 9, p.GetParserRuleContext()) + + for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { + if _alt == 1 { + if p.GetParseListeners() != nil { + p.TriggerExitRuleEvent() + } + _prevctx = localctx + localctx = NewArithmeticExpressionContext(p, _parentctx, _parentState) + p.PushNewRecursionContext(localctx, _startState, CQLRULE_arithmeticExpression) + p.SetState(147) + + if !(p.Precpred(p.GetParserRuleContext(), 1)) { + panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 1)", "")) + } + { + p.SetState(148) + p.Match(CQLArithmeticOperator) + } + { + p.SetState(149) + p.arithmeticExpression(2) + } + + } + p.SetState(154) + p.GetErrorHandler().Sync(p) + _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 9, p.GetParserRuleContext()) + } + + return localctx +} + +// IScalarValueContext is an interface to support dynamic dispatch. +type IScalarValueContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser - // IsScalarExpressionContext differentiates from other interfaces. - IsScalarExpressionContext() + // IsScalarValueContext differentiates from other interfaces. + IsScalarValueContext() } -type ScalarExpressionContext struct { +type ScalarValueContext struct { *antlr.BaseParserRuleContext parser antlr.Parser } -func NewEmptyScalarExpressionContext() *ScalarExpressionContext { - var p = new(ScalarExpressionContext) +func NewEmptyScalarValueContext() *ScalarValueContext { + var p = new(ScalarValueContext) p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1) - p.RuleIndex = CQLRULE_scalarExpression + p.RuleIndex = CQLRULE_scalarValue return p } -func (*ScalarExpressionContext) IsScalarExpressionContext() {} +func (*ScalarValueContext) IsScalarValueContext() {} -func NewScalarExpressionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ScalarExpressionContext { - var p = new(ScalarExpressionContext) +func NewScalarValueContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ScalarValueContext { + var p = new(ScalarValueContext) p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState) p.parser = parser - p.RuleIndex = CQLRULE_scalarExpression + p.RuleIndex = CQLRULE_scalarValue return p } -func (s *ScalarExpressionContext) GetParser() antlr.Parser { return s.parser } +func (s *ScalarValueContext) GetParser() antlr.Parser { return s.parser } -func (s *ScalarExpressionContext) PropertyName() IPropertyNameContext { +func (s *ScalarValueContext) PropertyName() IPropertyNameContext { var t = s.GetTypedRuleContext(reflect.TypeOf((*IPropertyNameContext)(nil)).Elem(), 0) if t == nil { @@ -1791,7 +1996,7 @@ func (s *ScalarExpressionContext) PropertyName() IPropertyNameContext { return t.(IPropertyNameContext) } -func (s *ScalarExpressionContext) CharacterLiteral() ICharacterLiteralContext { +func (s *ScalarValueContext) CharacterLiteral() ICharacterLiteralContext { var t = s.GetTypedRuleContext(reflect.TypeOf((*ICharacterLiteralContext)(nil)).Elem(), 0) if t == nil { @@ -1801,7 +2006,7 @@ func (s *ScalarExpressionContext) CharacterLiteral() ICharacterLiteralContext { return t.(ICharacterLiteralContext) } -func (s *ScalarExpressionContext) NumericLiteral() INumericLiteralContext { +func (s *ScalarValueContext) NumericLiteral() INumericLiteralContext { var t = s.GetTypedRuleContext(reflect.TypeOf((*INumericLiteralContext)(nil)).Elem(), 0) if t == nil { @@ -1811,7 +2016,7 @@ func (s *ScalarExpressionContext) NumericLiteral() INumericLiteralContext { return t.(INumericLiteralContext) } -func (s *ScalarExpressionContext) BooleanLiteral() IBooleanLiteralContext { +func (s *ScalarValueContext) BooleanLiteral() IBooleanLiteralContext { var t = s.GetTypedRuleContext(reflect.TypeOf((*IBooleanLiteralContext)(nil)).Elem(), 0) if t == nil { @@ -1821,29 +2026,29 @@ func (s *ScalarExpressionContext) BooleanLiteral() IBooleanLiteralContext { return t.(IBooleanLiteralContext) } -func (s *ScalarExpressionContext) GetRuleContext() antlr.RuleContext { +func (s *ScalarValueContext) GetRuleContext() antlr.RuleContext { return s } -func (s *ScalarExpressionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { +func (s *ScalarValueContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } -func (s *ScalarExpressionContext) EnterRule(listener antlr.ParseTreeListener) { +func (s *ScalarValueContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(CQLListener); ok { - listenerT.EnterScalarExpression(s) + listenerT.EnterScalarValue(s) } } -func (s *ScalarExpressionContext) ExitRule(listener antlr.ParseTreeListener) { +func (s *ScalarValueContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(CQLListener); ok { - listenerT.ExitScalarExpression(s) + listenerT.ExitScalarValue(s) } } -func (p *CQL) ScalarExpression() (localctx IScalarExpressionContext) { - localctx = NewScalarExpressionContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 20, CQLRULE_scalarExpression) +func (p *CQL) ScalarValue() (localctx IScalarValueContext) { + localctx = NewScalarValueContext(p, p.GetParserRuleContext(), p.GetState()) + p.EnterRule(localctx, 22, CQLRULE_scalarValue) defer func() { p.ExitRule() @@ -1861,35 +2066,35 @@ func (p *CQL) ScalarExpression() (localctx IScalarExpressionContext) { } }() - p.SetState(141) + p.SetState(159) p.GetErrorHandler().Sync(p) switch p.GetTokenStream().LA(1) { case CQLIdentifier: p.EnterOuterAlt(localctx, 1) { - p.SetState(137) + p.SetState(155) p.PropertyName() } case CQLCharacterStringLiteral: p.EnterOuterAlt(localctx, 2) { - p.SetState(138) + p.SetState(156) p.CharacterLiteral() } case CQLNumericLiteral: p.EnterOuterAlt(localctx, 3) { - p.SetState(139) + p.SetState(157) p.NumericLiteral() } case CQLBooleanLiteral: p.EnterOuterAlt(localctx, 4) { - p.SetState(140) + p.SetState(158) p.BooleanLiteral() } @@ -1964,7 +2169,7 @@ func (s *PropertyNameContext) ExitRule(listener antlr.ParseTreeListener) { func (p *CQL) PropertyName() (localctx IPropertyNameContext) { localctx = NewPropertyNameContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 22, CQLRULE_propertyName) + p.EnterRule(localctx, 24, CQLRULE_propertyName) defer func() { p.ExitRule() @@ -1984,7 +2189,7 @@ func (p *CQL) PropertyName() (localctx IPropertyNameContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(143) + p.SetState(161) p.Match(CQLIdentifier) } @@ -2055,7 +2260,7 @@ func (s *CharacterLiteralContext) ExitRule(listener antlr.ParseTreeListener) { func (p *CQL) CharacterLiteral() (localctx ICharacterLiteralContext) { localctx = NewCharacterLiteralContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 24, CQLRULE_characterLiteral) + p.EnterRule(localctx, 26, CQLRULE_characterLiteral) defer func() { p.ExitRule() @@ -2075,7 +2280,7 @@ func (p *CQL) CharacterLiteral() (localctx ICharacterLiteralContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(145) + p.SetState(163) p.Match(CQLCharacterStringLiteral) } @@ -2146,7 +2351,7 @@ func (s *NumericLiteralContext) ExitRule(listener antlr.ParseTreeListener) { func (p *CQL) NumericLiteral() (localctx INumericLiteralContext) { localctx = NewNumericLiteralContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 26, CQLRULE_numericLiteral) + p.EnterRule(localctx, 28, CQLRULE_numericLiteral) defer func() { p.ExitRule() @@ -2166,7 +2371,7 @@ func (p *CQL) NumericLiteral() (localctx INumericLiteralContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(147) + p.SetState(165) p.Match(CQLNumericLiteral) } @@ -2237,7 +2442,7 @@ func (s *BooleanLiteralContext) ExitRule(listener antlr.ParseTreeListener) { func (p *CQL) BooleanLiteral() (localctx IBooleanLiteralContext) { localctx = NewBooleanLiteralContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 28, CQLRULE_booleanLiteral) + p.EnterRule(localctx, 30, CQLRULE_booleanLiteral) defer func() { p.ExitRule() @@ -2257,7 +2462,7 @@ func (p *CQL) BooleanLiteral() (localctx IBooleanLiteralContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(149) + p.SetState(167) p.Match(CQLBooleanLiteral) } @@ -2363,7 +2568,7 @@ func (s *SpatialPredicateContext) ExitRule(listener antlr.ParseTreeListener) { func (p *CQL) SpatialPredicate() (localctx ISpatialPredicateContext) { localctx = NewSpatialPredicateContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 30, CQLRULE_spatialPredicate) + p.EnterRule(localctx, 32, CQLRULE_spatialPredicate) defer func() { p.ExitRule() @@ -2383,27 +2588,27 @@ func (p *CQL) SpatialPredicate() (localctx ISpatialPredicateContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(151) + p.SetState(169) p.Match(CQLSpatialOperator) } { - p.SetState(152) + p.SetState(170) p.Match(CQLLEFTPAREN) } { - p.SetState(153) + p.SetState(171) p.GeomExpression() } { - p.SetState(154) + p.SetState(172) p.Match(CQLCOMMA) } { - p.SetState(155) + p.SetState(173) p.GeomExpression() } { - p.SetState(156) + p.SetState(174) p.Match(CQLRIGHTPAREN) } @@ -2517,7 +2722,7 @@ func (s *DistancePredicateContext) ExitRule(listener antlr.ParseTreeListener) { func (p *CQL) DistancePredicate() (localctx IDistancePredicateContext) { localctx = NewDistancePredicateContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 32, CQLRULE_distancePredicate) + p.EnterRule(localctx, 34, CQLRULE_distancePredicate) defer func() { p.ExitRule() @@ -2537,35 +2742,35 @@ func (p *CQL) DistancePredicate() (localctx IDistancePredicateContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(158) + p.SetState(176) p.Match(CQLDistanceOperator) } { - p.SetState(159) + p.SetState(177) p.Match(CQLLEFTPAREN) } { - p.SetState(160) + p.SetState(178) p.GeomExpression() } { - p.SetState(161) + p.SetState(179) p.Match(CQLCOMMA) } { - p.SetState(162) + p.SetState(180) p.GeomExpression() } { - p.SetState(163) + p.SetState(181) p.Match(CQLCOMMA) } { - p.SetState(164) + p.SetState(182) p.Match(CQLNumericLiteral) } { - p.SetState(165) + p.SetState(183) p.Match(CQLRIGHTPAREN) } @@ -2652,7 +2857,7 @@ func (s *GeomExpressionContext) ExitRule(listener antlr.ParseTreeListener) { func (p *CQL) GeomExpression() (localctx IGeomExpressionContext) { localctx = NewGeomExpressionContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 34, CQLRULE_geomExpression) + p.EnterRule(localctx, 36, CQLRULE_geomExpression) defer func() { p.ExitRule() @@ -2670,21 +2875,21 @@ func (p *CQL) GeomExpression() (localctx IGeomExpressionContext) { } }() - p.SetState(169) + p.SetState(187) p.GetErrorHandler().Sync(p) switch p.GetTokenStream().LA(1) { case CQLIdentifier: p.EnterOuterAlt(localctx, 1) { - p.SetState(167) + p.SetState(185) p.PropertyName() } case CQLPOINT, CQLLINESTRING, CQLPOLYGON, CQLMULTIPOINT, CQLMULTILINESTRING, CQLMULTIPOLYGON, CQLGEOMETRYCOLLECTION, CQLENVELOPE: p.EnterOuterAlt(localctx, 2) { - p.SetState(168) + p.SetState(186) p.GeomLiteral() } @@ -2835,7 +3040,7 @@ func (s *GeomLiteralContext) ExitRule(listener antlr.ParseTreeListener) { func (p *CQL) GeomLiteral() (localctx IGeomLiteralContext) { localctx = NewGeomLiteralContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 36, CQLRULE_geomLiteral) + p.EnterRule(localctx, 38, CQLRULE_geomLiteral) defer func() { p.ExitRule() @@ -2853,63 +3058,63 @@ func (p *CQL) GeomLiteral() (localctx IGeomLiteralContext) { } }() - p.SetState(179) + p.SetState(197) p.GetErrorHandler().Sync(p) switch p.GetTokenStream().LA(1) { case CQLPOINT: p.EnterOuterAlt(localctx, 1) { - p.SetState(171) + p.SetState(189) p.Point() } case CQLLINESTRING: p.EnterOuterAlt(localctx, 2) { - p.SetState(172) + p.SetState(190) p.Linestring() } case CQLPOLYGON: p.EnterOuterAlt(localctx, 3) { - p.SetState(173) + p.SetState(191) p.Polygon() } case CQLMULTIPOINT: p.EnterOuterAlt(localctx, 4) { - p.SetState(174) + p.SetState(192) p.MultiPoint() } case CQLMULTILINESTRING: p.EnterOuterAlt(localctx, 5) { - p.SetState(175) + p.SetState(193) p.MultiLinestring() } case CQLMULTIPOLYGON: p.EnterOuterAlt(localctx, 6) { - p.SetState(176) + p.SetState(194) p.MultiPolygon() } case CQLGEOMETRYCOLLECTION: p.EnterOuterAlt(localctx, 7) { - p.SetState(177) + p.SetState(195) p.GeometryCollection() } case CQLENVELOPE: p.EnterOuterAlt(localctx, 8) { - p.SetState(178) + p.SetState(196) p.Envelope() } @@ -2994,7 +3199,7 @@ func (s *PointContext) ExitRule(listener antlr.ParseTreeListener) { func (p *CQL) Point() (localctx IPointContext) { localctx = NewPointContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 38, CQLRULE_point) + p.EnterRule(localctx, 40, CQLRULE_point) defer func() { p.ExitRule() @@ -3014,11 +3219,11 @@ func (p *CQL) Point() (localctx IPointContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(181) + p.SetState(199) p.Match(CQLPOINT) } { - p.SetState(182) + p.SetState(200) p.PointList() } @@ -3103,7 +3308,7 @@ func (s *PointListContext) ExitRule(listener antlr.ParseTreeListener) { func (p *CQL) PointList() (localctx IPointListContext) { localctx = NewPointListContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 40, CQLRULE_pointList) + p.EnterRule(localctx, 42, CQLRULE_pointList) defer func() { p.ExitRule() @@ -3123,15 +3328,15 @@ func (p *CQL) PointList() (localctx IPointListContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(184) + p.SetState(202) p.Match(CQLLEFTPAREN) } { - p.SetState(185) + p.SetState(203) p.Coordinate() } { - p.SetState(186) + p.SetState(204) p.Match(CQLRIGHTPAREN) } @@ -3212,7 +3417,7 @@ func (s *LinestringContext) ExitRule(listener antlr.ParseTreeListener) { func (p *CQL) Linestring() (localctx ILinestringContext) { localctx = NewLinestringContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 42, CQLRULE_linestring) + p.EnterRule(localctx, 44, CQLRULE_linestring) defer func() { p.ExitRule() @@ -3232,11 +3437,11 @@ func (p *CQL) Linestring() (localctx ILinestringContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(188) + p.SetState(206) p.Match(CQLLINESTRING) } { - p.SetState(189) + p.SetState(207) p.CoordList() } @@ -3317,7 +3522,7 @@ func (s *PolygonContext) ExitRule(listener antlr.ParseTreeListener) { func (p *CQL) Polygon() (localctx IPolygonContext) { localctx = NewPolygonContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 44, CQLRULE_polygon) + p.EnterRule(localctx, 46, CQLRULE_polygon) defer func() { p.ExitRule() @@ -3337,11 +3542,11 @@ func (p *CQL) Polygon() (localctx IPolygonContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(191) + p.SetState(209) p.Match(CQLPOLYGON) } { - p.SetState(192) + p.SetState(210) p.PolygonDef() } @@ -3447,7 +3652,7 @@ func (s *PolygonDefContext) ExitRule(listener antlr.ParseTreeListener) { func (p *CQL) PolygonDef() (localctx IPolygonDefContext) { localctx = NewPolygonDefContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 46, CQLRULE_polygonDef) + p.EnterRule(localctx, 48, CQLRULE_polygonDef) var _la int defer func() { @@ -3468,33 +3673,33 @@ func (p *CQL) PolygonDef() (localctx IPolygonDefContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(194) + p.SetState(212) p.Match(CQLLEFTPAREN) } { - p.SetState(195) + p.SetState(213) p.CoordList() } - p.SetState(200) + p.SetState(218) p.GetErrorHandler().Sync(p) _la = p.GetTokenStream().LA(1) for _la == CQLCOMMA { { - p.SetState(196) + p.SetState(214) p.Match(CQLCOMMA) } { - p.SetState(197) + p.SetState(215) p.CoordList() } - p.SetState(202) + p.SetState(220) p.GetErrorHandler().Sync(p) _la = p.GetTokenStream().LA(1) } { - p.SetState(203) + p.SetState(221) p.Match(CQLRIGHTPAREN) } @@ -3604,7 +3809,7 @@ func (s *MultiPointContext) ExitRule(listener antlr.ParseTreeListener) { func (p *CQL) MultiPoint() (localctx IMultiPointContext) { localctx = NewMultiPointContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 48, CQLRULE_multiPoint) + p.EnterRule(localctx, 50, CQLRULE_multiPoint) var _la int defer func() { @@ -3625,37 +3830,37 @@ func (p *CQL) MultiPoint() (localctx IMultiPointContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(205) + p.SetState(223) p.Match(CQLMULTIPOINT) } { - p.SetState(206) + p.SetState(224) p.Match(CQLLEFTPAREN) } { - p.SetState(207) + p.SetState(225) p.PointList() } - p.SetState(212) + p.SetState(230) p.GetErrorHandler().Sync(p) _la = p.GetTokenStream().LA(1) for _la == CQLCOMMA { { - p.SetState(208) + p.SetState(226) p.Match(CQLCOMMA) } { - p.SetState(209) + p.SetState(227) p.PointList() } - p.SetState(214) + p.SetState(232) p.GetErrorHandler().Sync(p) _la = p.GetTokenStream().LA(1) } { - p.SetState(215) + p.SetState(233) p.Match(CQLRIGHTPAREN) } @@ -3765,7 +3970,7 @@ func (s *MultiLinestringContext) ExitRule(listener antlr.ParseTreeListener) { func (p *CQL) MultiLinestring() (localctx IMultiLinestringContext) { localctx = NewMultiLinestringContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 50, CQLRULE_multiLinestring) + p.EnterRule(localctx, 52, CQLRULE_multiLinestring) var _la int defer func() { @@ -3786,37 +3991,37 @@ func (p *CQL) MultiLinestring() (localctx IMultiLinestringContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(217) + p.SetState(235) p.Match(CQLMULTILINESTRING) } { - p.SetState(218) + p.SetState(236) p.Match(CQLLEFTPAREN) } { - p.SetState(219) + p.SetState(237) p.CoordList() } - p.SetState(224) + p.SetState(242) p.GetErrorHandler().Sync(p) _la = p.GetTokenStream().LA(1) for _la == CQLCOMMA { { - p.SetState(220) + p.SetState(238) p.Match(CQLCOMMA) } { - p.SetState(221) + p.SetState(239) p.CoordList() } - p.SetState(226) + p.SetState(244) p.GetErrorHandler().Sync(p) _la = p.GetTokenStream().LA(1) } { - p.SetState(227) + p.SetState(245) p.Match(CQLRIGHTPAREN) } @@ -3926,7 +4131,7 @@ func (s *MultiPolygonContext) ExitRule(listener antlr.ParseTreeListener) { func (p *CQL) MultiPolygon() (localctx IMultiPolygonContext) { localctx = NewMultiPolygonContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 52, CQLRULE_multiPolygon) + p.EnterRule(localctx, 54, CQLRULE_multiPolygon) var _la int defer func() { @@ -3947,37 +4152,37 @@ func (p *CQL) MultiPolygon() (localctx IMultiPolygonContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(229) + p.SetState(247) p.Match(CQLMULTIPOLYGON) } { - p.SetState(230) + p.SetState(248) p.Match(CQLLEFTPAREN) } { - p.SetState(231) + p.SetState(249) p.PolygonDef() } - p.SetState(236) + p.SetState(254) p.GetErrorHandler().Sync(p) _la = p.GetTokenStream().LA(1) for _la == CQLCOMMA { { - p.SetState(232) + p.SetState(250) p.Match(CQLCOMMA) } { - p.SetState(233) + p.SetState(251) p.PolygonDef() } - p.SetState(238) + p.SetState(256) p.GetErrorHandler().Sync(p) _la = p.GetTokenStream().LA(1) } { - p.SetState(239) + p.SetState(257) p.Match(CQLRIGHTPAREN) } @@ -4087,7 +4292,7 @@ func (s *GeometryCollectionContext) ExitRule(listener antlr.ParseTreeListener) { func (p *CQL) GeometryCollection() (localctx IGeometryCollectionContext) { localctx = NewGeometryCollectionContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 54, CQLRULE_geometryCollection) + p.EnterRule(localctx, 56, CQLRULE_geometryCollection) var _la int defer func() { @@ -4108,37 +4313,37 @@ func (p *CQL) GeometryCollection() (localctx IGeometryCollectionContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(241) + p.SetState(259) p.Match(CQLGEOMETRYCOLLECTION) } { - p.SetState(242) + p.SetState(260) p.Match(CQLLEFTPAREN) } { - p.SetState(243) + p.SetState(261) p.GeomLiteral() } - p.SetState(248) + p.SetState(266) p.GetErrorHandler().Sync(p) _la = p.GetTokenStream().LA(1) for _la == CQLCOMMA { { - p.SetState(244) + p.SetState(262) p.Match(CQLCOMMA) } { - p.SetState(245) + p.SetState(263) p.GeomLiteral() } - p.SetState(250) + p.SetState(268) p.GetErrorHandler().Sync(p) _la = p.GetTokenStream().LA(1) } { - p.SetState(251) + p.SetState(269) p.Match(CQLRIGHTPAREN) } @@ -4233,7 +4438,7 @@ func (s *EnvelopeContext) ExitRule(listener antlr.ParseTreeListener) { func (p *CQL) Envelope() (localctx IEnvelopeContext) { localctx = NewEnvelopeContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 56, CQLRULE_envelope) + p.EnterRule(localctx, 58, CQLRULE_envelope) defer func() { p.ExitRule() @@ -4253,43 +4458,43 @@ func (p *CQL) Envelope() (localctx IEnvelopeContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(253) + p.SetState(271) p.Match(CQLENVELOPE) } { - p.SetState(254) + p.SetState(272) p.Match(CQLLEFTPAREN) } { - p.SetState(255) + p.SetState(273) p.Match(CQLNumericLiteral) } { - p.SetState(256) + p.SetState(274) p.Match(CQLCOMMA) } { - p.SetState(257) + p.SetState(275) p.Match(CQLNumericLiteral) } { - p.SetState(258) + p.SetState(276) p.Match(CQLCOMMA) } { - p.SetState(259) + p.SetState(277) p.Match(CQLNumericLiteral) } { - p.SetState(260) + p.SetState(278) p.Match(CQLCOMMA) } { - p.SetState(261) + p.SetState(279) p.Match(CQLNumericLiteral) } { - p.SetState(262) + p.SetState(280) p.Match(CQLRIGHTPAREN) } @@ -4395,7 +4600,7 @@ func (s *CoordListContext) ExitRule(listener antlr.ParseTreeListener) { func (p *CQL) CoordList() (localctx ICoordListContext) { localctx = NewCoordListContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 58, CQLRULE_coordList) + p.EnterRule(localctx, 60, CQLRULE_coordList) var _la int defer func() { @@ -4416,33 +4621,33 @@ func (p *CQL) CoordList() (localctx ICoordListContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(264) + p.SetState(282) p.Match(CQLLEFTPAREN) } { - p.SetState(265) + p.SetState(283) p.Coordinate() } - p.SetState(270) + p.SetState(288) p.GetErrorHandler().Sync(p) _la = p.GetTokenStream().LA(1) for _la == CQLCOMMA { { - p.SetState(266) + p.SetState(284) p.Match(CQLCOMMA) } { - p.SetState(267) + p.SetState(285) p.Coordinate() } - p.SetState(272) + p.SetState(290) p.GetErrorHandler().Sync(p) _la = p.GetTokenStream().LA(1) } { - p.SetState(273) + p.SetState(291) p.Match(CQLRIGHTPAREN) } @@ -4517,7 +4722,7 @@ func (s *CoordinateContext) ExitRule(listener antlr.ParseTreeListener) { func (p *CQL) Coordinate() (localctx ICoordinateContext) { localctx = NewCoordinateContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 60, CQLRULE_coordinate) + p.EnterRule(localctx, 62, CQLRULE_coordinate) defer func() { p.ExitRule() @@ -4537,11 +4742,11 @@ func (p *CQL) Coordinate() (localctx ICoordinateContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(275) + p.SetState(293) p.Match(CQLNumericLiteral) } { - p.SetState(276) + p.SetState(294) p.Match(CQLNumericLiteral) } @@ -4688,7 +4893,7 @@ func (s *InPredicateContext) ExitRule(listener antlr.ParseTreeListener) { func (p *CQL) InPredicate() (localctx IInPredicateContext) { localctx = NewInPredicateContext(p, p.GetParserRuleContext(), p.GetState()) - p.EnterRule(localctx, 62, CQLRULE_inPredicate) + p.EnterRule(localctx, 64, CQLRULE_inPredicate) var _la int defer func() { @@ -4709,76 +4914,76 @@ func (p *CQL) InPredicate() (localctx IInPredicateContext) { p.EnterOuterAlt(localctx, 1) { - p.SetState(278) + p.SetState(296) p.PropertyName() } - p.SetState(280) + p.SetState(298) p.GetErrorHandler().Sync(p) _la = p.GetTokenStream().LA(1) if _la == CQLNOT { { - p.SetState(279) + p.SetState(297) p.Match(CQLNOT) } } { - p.SetState(282) + p.SetState(300) p.Match(CQLIN) } { - p.SetState(283) + p.SetState(301) p.Match(CQLLEFTPAREN) } - p.SetState(300) + p.SetState(318) p.GetErrorHandler().Sync(p) switch p.GetTokenStream().LA(1) { case CQLCharacterStringLiteral: { - p.SetState(284) + p.SetState(302) p.CharacterLiteral() } - p.SetState(289) + p.SetState(307) p.GetErrorHandler().Sync(p) _la = p.GetTokenStream().LA(1) for _la == CQLCOMMA { { - p.SetState(285) + p.SetState(303) p.Match(CQLCOMMA) } { - p.SetState(286) + p.SetState(304) p.CharacterLiteral() } - p.SetState(291) + p.SetState(309) p.GetErrorHandler().Sync(p) _la = p.GetTokenStream().LA(1) } case CQLNumericLiteral: { - p.SetState(292) + p.SetState(310) p.NumericLiteral() } - p.SetState(297) + p.SetState(315) p.GetErrorHandler().Sync(p) _la = p.GetTokenStream().LA(1) for _la == CQLCOMMA { { - p.SetState(293) + p.SetState(311) p.Match(CQLCOMMA) } { - p.SetState(294) + p.SetState(312) p.NumericLiteral() } - p.SetState(299) + p.SetState(317) p.GetErrorHandler().Sync(p) _la = p.GetTokenStream().LA(1) } @@ -4787,7 +4992,7 @@ func (p *CQL) InPredicate() (localctx IInPredicateContext) { panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) } { - p.SetState(302) + p.SetState(320) p.Match(CQLRIGHTPAREN) } @@ -4810,6 +5015,13 @@ func (p *CQL) Sempred(localctx antlr.RuleContext, ruleIndex, predIndex int) bool } return p.BooleanTerm_Sempred(t, predIndex) + case 10: + var t *ArithmeticExpressionContext = nil + if localctx != nil { + t = localctx.(*ArithmeticExpressionContext) + } + return p.ArithmeticExpression_Sempred(t, predIndex) + default: panic("No predicate with index: " + fmt.Sprint(ruleIndex)) } @@ -4834,3 +5046,13 @@ func (p *CQL) BooleanTerm_Sempred(localctx antlr.RuleContext, predIndex int) boo panic("No predicate with index: " + fmt.Sprint(predIndex)) } } + +func (p *CQL) ArithmeticExpression_Sempred(localctx antlr.RuleContext, predIndex int) bool { + switch predIndex { + case 2: + return p.Precpred(p.GetParserRuleContext(), 1) + + default: + panic("No predicate with index: " + fmt.Sprint(predIndex)) + } +} diff --git a/internal/cql/cql_test.go b/internal/cql/cql_test.go index af01050e..71b069e9 100644 --- a/internal/cql/cql_test.go +++ b/internal/cql/cql_test.go @@ -63,6 +63,15 @@ func TestSpatialPredicate(t *testing.T) { checkCQL(t, "Dwithin(geom, POINT(0 0), 100)", "ST_DWithin(\"geom\",'SRID=4326;POINT(0 0)'::geometry,100)") } +func TestArithmetic(t *testing.T) { + checkCQL(t, "p > 1 + x", "\"p\" > 1 + \"x\"") + checkCQL(t, "p > 2 * 3 + x", "\"p\" > 2 * 3 + \"x\"") + checkCQL(t, "p > 2 * (3 + x)", "\"p\" > 2 * (3 + \"x\")") + checkCQL(t, "p > (y + 5) / (3 - x)", "\"p\" > (\"y\" + 5) / (3 - \"x\")") + checkCQL(t, "p = x % 10", "\"p\" = \"x\" % 10") + checkCQL(t, "p BETWEEN x + 10 AND x * 2", "\"p\" BETWEEN \"x\" + 10 AND \"x\" * 2") +} + func TestGeometryLiteral(t *testing.T) { checkCQL(t, "equals(geom, POINT(0 0))", "ST_Equals(\"geom\",'SRID=4326;POINT(0 0)'::geometry)") From cf146e93e92a2727c2d6db1061dbb2bf99eea4b4 Mon Sep 17 00:00:00 2001 From: Martin Davis Date: Wed, 2 Mar 2022 17:36:54 -0800 Subject: [PATCH 2/3] Update NEWS --- NEWS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index ebb9924f..d74621a8 100644 --- a/NEWS.md +++ b/NEWS.md @@ -15,7 +15,7 @@ * Add configuration to set base path (#88) * Add standard query parameters `crs` and `bbox-crs` (#98) * Allow configuring published function schemas (#99) -* Add support for CQL filtering with `filter` and `filter-crs` query parameters (#101, #102) +* Add support for CQL filtering with `filter` and `filter-crs` query parameters (#101, #102, #103) ### Performance Improvements From ad13f23b240cd0076f03b6ecbcda75ce64a7d73b Mon Sep 17 00:00:00 2001 From: Martin Davis Date: Wed, 2 Mar 2022 17:38:04 -0800 Subject: [PATCH 3/3] Add copyright --- internal/cql/cql.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/internal/cql/cql.go b/internal/cql/cql.go index be8115a7..5e0e9716 100644 --- a/internal/cql/cql.go +++ b/internal/cql/cql.go @@ -1,5 +1,18 @@ package cql +/* + Copyright 2019 Crunchy Data Solutions, Inc. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + import ( "fmt" "strings"