From 862fe612e0ceef0c7c6a1979a4df55c34d4b698f Mon Sep 17 00:00:00 2001 From: Marios Trivyzas Date: Sat, 30 Mar 2019 12:51:13 +0100 Subject: [PATCH] SQL: Fix precedence of `::` psql like CAST operator (#40665) Previously, an expression like `10 + 2::long` would be interpreted as `CAST(10 + 2 AS LONG)` instead of `10 + CAST(2 AS LONG)`. (cherry picked from commit e34cc2f38b1477e78788ee377938f42cc47187c7) --- x-pack/plugin/sql/src/main/antlr/SqlBase.g4 | 2 +- .../xpack/sql/parser/ExpressionBuilder.java | 2 +- .../xpack/sql/parser/SqlBaseBaseListener.java | 120 +- .../xpack/sql/parser/SqlBaseBaseVisitor.java | 70 +- .../xpack/sql/parser/SqlBaseListener.java | 120 +- .../xpack/sql/parser/SqlBaseParser.java | 1034 +++++++++-------- .../xpack/sql/parser/SqlBaseVisitor.java | 70 +- .../xpack/sql/parser/ExpressionTests.java | 13 + 8 files changed, 744 insertions(+), 687 deletions(-) diff --git a/x-pack/plugin/sql/src/main/antlr/SqlBase.g4 b/x-pack/plugin/sql/src/main/antlr/SqlBase.g4 index eca6f270871..d1f1d15cab9 100644 --- a/x-pack/plugin/sql/src/main/antlr/SqlBase.g4 +++ b/x-pack/plugin/sql/src/main/antlr/SqlBase.g4 @@ -210,11 +210,11 @@ valueExpression | left=valueExpression operator=(ASTERISK | SLASH | PERCENT) right=valueExpression #arithmeticBinary | left=valueExpression operator=(PLUS | MINUS) right=valueExpression #arithmeticBinary | left=valueExpression comparisonOperator right=valueExpression #comparison - | valueExpression CAST_OP dataType #castOperatorExpression ; primaryExpression : castExpression #cast + | primaryExpression CAST_OP dataType #castOperatorExpression | extractExpression #extract | builtinDateTimeFunction #currentDateTimeFunction | constant #constantDefault diff --git a/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/parser/ExpressionBuilder.java b/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/parser/ExpressionBuilder.java index 46d8148ed25..c3d5ba22284 100644 --- a/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/parser/ExpressionBuilder.java +++ b/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/parser/ExpressionBuilder.java @@ -416,7 +416,7 @@ abstract class ExpressionBuilder extends IdentifierBuilder { @Override public Object visitCastOperatorExpression(SqlBaseParser.CastOperatorExpressionContext ctx) { - return new Cast(source(ctx), expression(ctx.valueExpression()), typedParsing(ctx.dataType(), DataType.class)); + return new Cast(source(ctx), expression(ctx.primaryExpression()), typedParsing(ctx.dataType(), DataType.class)); } @Override diff --git a/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/parser/SqlBaseBaseListener.java b/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/parser/SqlBaseBaseListener.java index 07352baa93e..bf5055ae216 100644 --- a/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/parser/SqlBaseBaseListener.java +++ b/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/parser/SqlBaseBaseListener.java @@ -599,18 +599,6 @@ class SqlBaseBaseListener implements SqlBaseListener { *

The default implementation does nothing.

*/ @Override public void exitComparison(SqlBaseParser.ComparisonContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterCastOperatorExpression(SqlBaseParser.CastOperatorExpressionContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitCastOperatorExpression(SqlBaseParser.CastOperatorExpressionContext ctx) { } /** * {@inheritDoc} * @@ -635,6 +623,18 @@ class SqlBaseBaseListener implements SqlBaseListener { *

The default implementation does nothing.

*/ @Override public void exitArithmeticUnary(SqlBaseParser.ArithmeticUnaryContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterDereference(SqlBaseParser.DereferenceContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitDereference(SqlBaseParser.DereferenceContext ctx) { } /** * {@inheritDoc} * @@ -647,30 +647,6 @@ class SqlBaseBaseListener implements SqlBaseListener { *

The default implementation does nothing.

*/ @Override public void exitCast(SqlBaseParser.CastContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterExtract(SqlBaseParser.ExtractContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitExtract(SqlBaseParser.ExtractContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterCurrentDateTimeFunction(SqlBaseParser.CurrentDateTimeFunctionContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitCurrentDateTimeFunction(SqlBaseParser.CurrentDateTimeFunctionContext ctx) { } /** * {@inheritDoc} * @@ -683,6 +659,30 @@ class SqlBaseBaseListener implements SqlBaseListener { *

The default implementation does nothing.

*/ @Override public void exitConstantDefault(SqlBaseParser.ConstantDefaultContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExtract(SqlBaseParser.ExtractContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExtract(SqlBaseParser.ExtractContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterParenthesizedExpression(SqlBaseParser.ParenthesizedExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitParenthesizedExpression(SqlBaseParser.ParenthesizedExpressionContext ctx) { } /** * {@inheritDoc} * @@ -695,6 +695,18 @@ class SqlBaseBaseListener implements SqlBaseListener { *

The default implementation does nothing.

*/ @Override public void exitStar(SqlBaseParser.StarContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterCastOperatorExpression(SqlBaseParser.CastOperatorExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitCastOperatorExpression(SqlBaseParser.CastOperatorExpressionContext ctx) { } /** * {@inheritDoc} * @@ -707,6 +719,18 @@ class SqlBaseBaseListener implements SqlBaseListener { *

The default implementation does nothing.

*/ @Override public void exitFunction(SqlBaseParser.FunctionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterCurrentDateTimeFunction(SqlBaseParser.CurrentDateTimeFunctionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitCurrentDateTimeFunction(SqlBaseParser.CurrentDateTimeFunctionContext ctx) { } /** * {@inheritDoc} * @@ -719,30 +743,6 @@ class SqlBaseBaseListener implements SqlBaseListener { *

The default implementation does nothing.

*/ @Override public void exitSubqueryExpression(SqlBaseParser.SubqueryExpressionContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterDereference(SqlBaseParser.DereferenceContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitDereference(SqlBaseParser.DereferenceContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterParenthesizedExpression(SqlBaseParser.ParenthesizedExpressionContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitParenthesizedExpression(SqlBaseParser.ParenthesizedExpressionContext ctx) { } /** * {@inheritDoc} * diff --git a/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/parser/SqlBaseBaseVisitor.java b/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/parser/SqlBaseBaseVisitor.java index dbede024d73..02d92832149 100644 --- a/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/parser/SqlBaseBaseVisitor.java +++ b/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/parser/SqlBaseBaseVisitor.java @@ -354,13 +354,6 @@ class SqlBaseBaseVisitor extends AbstractParseTreeVisitor implements SqlBa * {@link #visitChildren} on {@code ctx}.

*/ @Override public T visitComparison(SqlBaseParser.ComparisonContext ctx) { return visitChildren(ctx); } - /** - * {@inheritDoc} - * - *

The default implementation returns the result of calling - * {@link #visitChildren} on {@code ctx}.

- */ - @Override public T visitCastOperatorExpression(SqlBaseParser.CastOperatorExpressionContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * @@ -375,6 +368,13 @@ class SqlBaseBaseVisitor extends AbstractParseTreeVisitor implements SqlBa * {@link #visitChildren} on {@code ctx}.

*/ @Override public T visitArithmeticUnary(SqlBaseParser.ArithmeticUnaryContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitDereference(SqlBaseParser.DereferenceContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * @@ -382,20 +382,6 @@ class SqlBaseBaseVisitor extends AbstractParseTreeVisitor implements SqlBa * {@link #visitChildren} on {@code ctx}.

*/ @Override public T visitCast(SqlBaseParser.CastContext ctx) { return visitChildren(ctx); } - /** - * {@inheritDoc} - * - *

The default implementation returns the result of calling - * {@link #visitChildren} on {@code ctx}.

- */ - @Override public T visitExtract(SqlBaseParser.ExtractContext ctx) { return visitChildren(ctx); } - /** - * {@inheritDoc} - * - *

The default implementation returns the result of calling - * {@link #visitChildren} on {@code ctx}.

- */ - @Override public T visitCurrentDateTimeFunction(SqlBaseParser.CurrentDateTimeFunctionContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * @@ -403,6 +389,20 @@ class SqlBaseBaseVisitor extends AbstractParseTreeVisitor implements SqlBa * {@link #visitChildren} on {@code ctx}.

*/ @Override public T visitConstantDefault(SqlBaseParser.ConstantDefaultContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitExtract(SqlBaseParser.ExtractContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitParenthesizedExpression(SqlBaseParser.ParenthesizedExpressionContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * @@ -410,6 +410,13 @@ class SqlBaseBaseVisitor extends AbstractParseTreeVisitor implements SqlBa * {@link #visitChildren} on {@code ctx}.

*/ @Override public T visitStar(SqlBaseParser.StarContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitCastOperatorExpression(SqlBaseParser.CastOperatorExpressionContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * @@ -417,6 +424,13 @@ class SqlBaseBaseVisitor extends AbstractParseTreeVisitor implements SqlBa * {@link #visitChildren} on {@code ctx}.

*/ @Override public T visitFunction(SqlBaseParser.FunctionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitCurrentDateTimeFunction(SqlBaseParser.CurrentDateTimeFunctionContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * @@ -424,20 +438,6 @@ class SqlBaseBaseVisitor extends AbstractParseTreeVisitor implements SqlBa * {@link #visitChildren} on {@code ctx}.

*/ @Override public T visitSubqueryExpression(SqlBaseParser.SubqueryExpressionContext ctx) { return visitChildren(ctx); } - /** - * {@inheritDoc} - * - *

The default implementation returns the result of calling - * {@link #visitChildren} on {@code ctx}.

- */ - @Override public T visitDereference(SqlBaseParser.DereferenceContext ctx) { return visitChildren(ctx); } - /** - * {@inheritDoc} - * - *

The default implementation returns the result of calling - * {@link #visitChildren} on {@code ctx}.

- */ - @Override public T visitParenthesizedExpression(SqlBaseParser.ParenthesizedExpressionContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * diff --git a/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/parser/SqlBaseListener.java b/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/parser/SqlBaseListener.java index d6ad9907b6f..9d9bc1a23c0 100644 --- a/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/parser/SqlBaseListener.java +++ b/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/parser/SqlBaseListener.java @@ -549,18 +549,6 @@ interface SqlBaseListener extends ParseTreeListener { * @param ctx the parse tree */ void exitComparison(SqlBaseParser.ComparisonContext ctx); - /** - * Enter a parse tree produced by the {@code castOperatorExpression} - * labeled alternative in {@link SqlBaseParser#valueExpression}. - * @param ctx the parse tree - */ - void enterCastOperatorExpression(SqlBaseParser.CastOperatorExpressionContext ctx); - /** - * Exit a parse tree produced by the {@code castOperatorExpression} - * labeled alternative in {@link SqlBaseParser#valueExpression}. - * @param ctx the parse tree - */ - void exitCastOperatorExpression(SqlBaseParser.CastOperatorExpressionContext ctx); /** * Enter a parse tree produced by the {@code arithmeticBinary} * labeled alternative in {@link SqlBaseParser#valueExpression}. @@ -585,6 +573,18 @@ interface SqlBaseListener extends ParseTreeListener { * @param ctx the parse tree */ void exitArithmeticUnary(SqlBaseParser.ArithmeticUnaryContext ctx); + /** + * Enter a parse tree produced by the {@code dereference} + * labeled alternative in {@link SqlBaseParser#primaryExpression}. + * @param ctx the parse tree + */ + void enterDereference(SqlBaseParser.DereferenceContext ctx); + /** + * Exit a parse tree produced by the {@code dereference} + * labeled alternative in {@link SqlBaseParser#primaryExpression}. + * @param ctx the parse tree + */ + void exitDereference(SqlBaseParser.DereferenceContext ctx); /** * Enter a parse tree produced by the {@code cast} * labeled alternative in {@link SqlBaseParser#primaryExpression}. @@ -597,30 +597,6 @@ interface SqlBaseListener extends ParseTreeListener { * @param ctx the parse tree */ void exitCast(SqlBaseParser.CastContext ctx); - /** - * Enter a parse tree produced by the {@code extract} - * labeled alternative in {@link SqlBaseParser#primaryExpression}. - * @param ctx the parse tree - */ - void enterExtract(SqlBaseParser.ExtractContext ctx); - /** - * Exit a parse tree produced by the {@code extract} - * labeled alternative in {@link SqlBaseParser#primaryExpression}. - * @param ctx the parse tree - */ - void exitExtract(SqlBaseParser.ExtractContext ctx); - /** - * Enter a parse tree produced by the {@code currentDateTimeFunction} - * labeled alternative in {@link SqlBaseParser#primaryExpression}. - * @param ctx the parse tree - */ - void enterCurrentDateTimeFunction(SqlBaseParser.CurrentDateTimeFunctionContext ctx); - /** - * Exit a parse tree produced by the {@code currentDateTimeFunction} - * labeled alternative in {@link SqlBaseParser#primaryExpression}. - * @param ctx the parse tree - */ - void exitCurrentDateTimeFunction(SqlBaseParser.CurrentDateTimeFunctionContext ctx); /** * Enter a parse tree produced by the {@code constantDefault} * labeled alternative in {@link SqlBaseParser#primaryExpression}. @@ -633,6 +609,30 @@ interface SqlBaseListener extends ParseTreeListener { * @param ctx the parse tree */ void exitConstantDefault(SqlBaseParser.ConstantDefaultContext ctx); + /** + * Enter a parse tree produced by the {@code extract} + * labeled alternative in {@link SqlBaseParser#primaryExpression}. + * @param ctx the parse tree + */ + void enterExtract(SqlBaseParser.ExtractContext ctx); + /** + * Exit a parse tree produced by the {@code extract} + * labeled alternative in {@link SqlBaseParser#primaryExpression}. + * @param ctx the parse tree + */ + void exitExtract(SqlBaseParser.ExtractContext ctx); + /** + * Enter a parse tree produced by the {@code parenthesizedExpression} + * labeled alternative in {@link SqlBaseParser#primaryExpression}. + * @param ctx the parse tree + */ + void enterParenthesizedExpression(SqlBaseParser.ParenthesizedExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code parenthesizedExpression} + * labeled alternative in {@link SqlBaseParser#primaryExpression}. + * @param ctx the parse tree + */ + void exitParenthesizedExpression(SqlBaseParser.ParenthesizedExpressionContext ctx); /** * Enter a parse tree produced by the {@code star} * labeled alternative in {@link SqlBaseParser#primaryExpression}. @@ -645,6 +645,18 @@ interface SqlBaseListener extends ParseTreeListener { * @param ctx the parse tree */ void exitStar(SqlBaseParser.StarContext ctx); + /** + * Enter a parse tree produced by the {@code castOperatorExpression} + * labeled alternative in {@link SqlBaseParser#primaryExpression}. + * @param ctx the parse tree + */ + void enterCastOperatorExpression(SqlBaseParser.CastOperatorExpressionContext ctx); + /** + * Exit a parse tree produced by the {@code castOperatorExpression} + * labeled alternative in {@link SqlBaseParser#primaryExpression}. + * @param ctx the parse tree + */ + void exitCastOperatorExpression(SqlBaseParser.CastOperatorExpressionContext ctx); /** * Enter a parse tree produced by the {@code function} * labeled alternative in {@link SqlBaseParser#primaryExpression}. @@ -657,6 +669,18 @@ interface SqlBaseListener extends ParseTreeListener { * @param ctx the parse tree */ void exitFunction(SqlBaseParser.FunctionContext ctx); + /** + * Enter a parse tree produced by the {@code currentDateTimeFunction} + * labeled alternative in {@link SqlBaseParser#primaryExpression}. + * @param ctx the parse tree + */ + void enterCurrentDateTimeFunction(SqlBaseParser.CurrentDateTimeFunctionContext ctx); + /** + * Exit a parse tree produced by the {@code currentDateTimeFunction} + * labeled alternative in {@link SqlBaseParser#primaryExpression}. + * @param ctx the parse tree + */ + void exitCurrentDateTimeFunction(SqlBaseParser.CurrentDateTimeFunctionContext ctx); /** * Enter a parse tree produced by the {@code subqueryExpression} * labeled alternative in {@link SqlBaseParser#primaryExpression}. @@ -669,30 +693,6 @@ interface SqlBaseListener extends ParseTreeListener { * @param ctx the parse tree */ void exitSubqueryExpression(SqlBaseParser.SubqueryExpressionContext ctx); - /** - * Enter a parse tree produced by the {@code dereference} - * labeled alternative in {@link SqlBaseParser#primaryExpression}. - * @param ctx the parse tree - */ - void enterDereference(SqlBaseParser.DereferenceContext ctx); - /** - * Exit a parse tree produced by the {@code dereference} - * labeled alternative in {@link SqlBaseParser#primaryExpression}. - * @param ctx the parse tree - */ - void exitDereference(SqlBaseParser.DereferenceContext ctx); - /** - * Enter a parse tree produced by the {@code parenthesizedExpression} - * labeled alternative in {@link SqlBaseParser#primaryExpression}. - * @param ctx the parse tree - */ - void enterParenthesizedExpression(SqlBaseParser.ParenthesizedExpressionContext ctx); - /** - * Exit a parse tree produced by the {@code parenthesizedExpression} - * labeled alternative in {@link SqlBaseParser#primaryExpression}. - * @param ctx the parse tree - */ - void exitParenthesizedExpression(SqlBaseParser.ParenthesizedExpressionContext ctx); /** * Enter a parse tree produced by {@link SqlBaseParser#builtinDateTimeFunction}. * @param ctx the parse tree diff --git a/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/parser/SqlBaseParser.java b/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/parser/SqlBaseParser.java index 34af98c1afc..4f94d8d191a 100644 --- a/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/parser/SqlBaseParser.java +++ b/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/parser/SqlBaseParser.java @@ -3723,29 +3723,6 @@ class SqlBaseParser extends Parser { else return visitor.visitChildren(this); } } - public static class CastOperatorExpressionContext extends ValueExpressionContext { - public ValueExpressionContext valueExpression() { - return getRuleContext(ValueExpressionContext.class,0); - } - public TerminalNode CAST_OP() { return getToken(SqlBaseParser.CAST_OP, 0); } - public DataTypeContext dataType() { - return getRuleContext(DataTypeContext.class,0); - } - public CastOperatorExpressionContext(ValueExpressionContext ctx) { copyFrom(ctx); } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof SqlBaseListener ) ((SqlBaseListener)listener).enterCastOperatorExpression(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof SqlBaseListener ) ((SqlBaseListener)listener).exitCastOperatorExpression(this); - } - @Override - public T accept(ParseTreeVisitor visitor) { - if ( visitor instanceof SqlBaseVisitor ) return ((SqlBaseVisitor)visitor).visitCastOperatorExpression(this); - else return visitor.visitChildren(this); - } - } public static class ArithmeticBinaryContext extends ValueExpressionContext { public ValueExpressionContext left; public Token operator; @@ -3884,7 +3861,7 @@ class SqlBaseParser extends Parser { _prevctx = _localctx; setState(549); - primaryExpression(); + primaryExpression(0); } break; case PLUS: @@ -3902,14 +3879,14 @@ class SqlBaseParser extends Parser { consume(); } setState(551); - valueExpression(5); + valueExpression(4); } break; default: throw new NoViableAltException(this); } _ctx.stop = _input.LT(-1); - setState(569); + setState(566); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,77,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { @@ -3917,7 +3894,7 @@ class SqlBaseParser extends Parser { if ( _parseListeners!=null ) triggerExitRuleEvent(); _prevctx = _localctx; { - setState(567); + setState(564); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,76,_ctx) ) { case 1: @@ -3926,7 +3903,7 @@ class SqlBaseParser extends Parser { ((ArithmeticBinaryContext)_localctx).left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_valueExpression); setState(554); - if (!(precpred(_ctx, 4))) throw new FailedPredicateException(this, "precpred(_ctx, 4)"); + if (!(precpred(_ctx, 3))) throw new FailedPredicateException(this, "precpred(_ctx, 3)"); setState(555); ((ArithmeticBinaryContext)_localctx).operator = _input.LT(1); _la = _input.LA(1); @@ -3936,7 +3913,7 @@ class SqlBaseParser extends Parser { consume(); } setState(556); - ((ArithmeticBinaryContext)_localctx).right = valueExpression(5); + ((ArithmeticBinaryContext)_localctx).right = valueExpression(4); } break; case 2: @@ -3945,7 +3922,7 @@ class SqlBaseParser extends Parser { ((ArithmeticBinaryContext)_localctx).left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_valueExpression); setState(557); - if (!(precpred(_ctx, 3))) throw new FailedPredicateException(this, "precpred(_ctx, 3)"); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); setState(558); ((ArithmeticBinaryContext)_localctx).operator = _input.LT(1); _la = _input.LA(1); @@ -3955,7 +3932,7 @@ class SqlBaseParser extends Parser { consume(); } setState(559); - ((ArithmeticBinaryContext)_localctx).right = valueExpression(4); + ((ArithmeticBinaryContext)_localctx).right = valueExpression(3); } break; case 3: @@ -3964,29 +3941,17 @@ class SqlBaseParser extends Parser { ((ComparisonContext)_localctx).left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_valueExpression); setState(560); - if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); setState(561); comparisonOperator(); setState(562); - ((ComparisonContext)_localctx).right = valueExpression(3); - } - break; - case 4: - { - _localctx = new CastOperatorExpressionContext(new ValueExpressionContext(_parentctx, _parentState)); - pushNewRecursionContext(_localctx, _startState, RULE_valueExpression); - setState(564); - if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); - setState(565); - match(CAST_OP); - setState(566); - dataType(); + ((ComparisonContext)_localctx).right = valueExpression(2); } break; } } } - setState(571); + setState(568); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,77,_ctx); } @@ -4130,6 +4095,29 @@ class SqlBaseParser extends Parser { else return visitor.visitChildren(this); } } + public static class CastOperatorExpressionContext extends PrimaryExpressionContext { + public PrimaryExpressionContext primaryExpression() { + return getRuleContext(PrimaryExpressionContext.class,0); + } + public TerminalNode CAST_OP() { return getToken(SqlBaseParser.CAST_OP, 0); } + public DataTypeContext dataType() { + return getRuleContext(DataTypeContext.class,0); + } + public CastOperatorExpressionContext(PrimaryExpressionContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof SqlBaseListener ) ((SqlBaseListener)listener).enterCastOperatorExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof SqlBaseListener ) ((SqlBaseListener)listener).exitCastOperatorExpression(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof SqlBaseVisitor ) return ((SqlBaseVisitor)visitor).visitCastOperatorExpression(this); + else return visitor.visitChildren(this); + } + } public static class FunctionContext extends PrimaryExpressionContext { public FunctionExpressionContext functionExpression() { return getRuleContext(FunctionExpressionContext.class,0); @@ -4189,105 +4177,152 @@ class SqlBaseParser extends Parser { } public final PrimaryExpressionContext primaryExpression() throws RecognitionException { - PrimaryExpressionContext _localctx = new PrimaryExpressionContext(_ctx, getState()); - enterRule(_localctx, 60, RULE_primaryExpression); + return primaryExpression(0); + } + + private PrimaryExpressionContext primaryExpression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + PrimaryExpressionContext _localctx = new PrimaryExpressionContext(_ctx, _parentState); + PrimaryExpressionContext _prevctx = _localctx; + int _startState = 60; + enterRecursionRule(_localctx, 60, RULE_primaryExpression, _p); int _la; try { - setState(592); + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(590); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,79,_ctx) ) { case 1: - _localctx = new CastContext(_localctx); - enterOuterAlt(_localctx, 1); { - setState(572); + _localctx = new CastContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + + setState(570); castExpression(); } break; case 2: - _localctx = new ExtractContext(_localctx); - enterOuterAlt(_localctx, 2); { - setState(573); + _localctx = new ExtractContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(571); extractExpression(); } break; case 3: - _localctx = new CurrentDateTimeFunctionContext(_localctx); - enterOuterAlt(_localctx, 3); { - setState(574); + _localctx = new CurrentDateTimeFunctionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(572); builtinDateTimeFunction(); } break; case 4: - _localctx = new ConstantDefaultContext(_localctx); - enterOuterAlt(_localctx, 4); { - setState(575); + _localctx = new ConstantDefaultContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(573); constant(); } break; case 5: - _localctx = new StarContext(_localctx); - enterOuterAlt(_localctx, 5); { - setState(579); + _localctx = new StarContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(577); _la = _input.LA(1); if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ANALYZE) | (1L << ANALYZED) | (1L << CATALOGS) | (1L << COLUMNS) | (1L << DAY) | (1L << DEBUG) | (1L << EXECUTABLE) | (1L << EXPLAIN) | (1L << FIRST) | (1L << FORMAT) | (1L << FULL) | (1L << FUNCTIONS) | (1L << GRAPHVIZ) | (1L << HOUR) | (1L << INTERVAL) | (1L << LAST) | (1L << LIMIT) | (1L << MAPPED) | (1L << MINUTE) | (1L << MONTH) | (1L << OPTIMIZED))) != 0) || ((((_la - 67)) & ~0x3f) == 0 && ((1L << (_la - 67)) & ((1L << (PARSED - 67)) | (1L << (PHYSICAL - 67)) | (1L << (PLAN - 67)) | (1L << (RLIKE - 67)) | (1L << (QUERY - 67)) | (1L << (SCHEMAS - 67)) | (1L << (SECOND - 67)) | (1L << (SHOW - 67)) | (1L << (SYS - 67)) | (1L << (TABLES - 67)) | (1L << (TEXT - 67)) | (1L << (TYPE - 67)) | (1L << (TYPES - 67)) | (1L << (VERIFY - 67)) | (1L << (YEAR - 67)) | (1L << (IDENTIFIER - 67)) | (1L << (DIGIT_IDENTIFIER - 67)) | (1L << (QUOTED_IDENTIFIER - 67)) | (1L << (BACKQUOTED_IDENTIFIER - 67)))) != 0)) { { - setState(576); + setState(574); qualifiedName(); - setState(577); + setState(575); match(DOT); } } - setState(581); + setState(579); match(ASTERISK); } break; case 6: - _localctx = new FunctionContext(_localctx); - enterOuterAlt(_localctx, 6); { - setState(582); + _localctx = new FunctionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(580); functionExpression(); } break; case 7: - _localctx = new SubqueryExpressionContext(_localctx); - enterOuterAlt(_localctx, 7); { - setState(583); + _localctx = new SubqueryExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(581); match(T__0); - setState(584); + setState(582); query(); - setState(585); + setState(583); match(T__1); } break; case 8: - _localctx = new DereferenceContext(_localctx); - enterOuterAlt(_localctx, 8); { - setState(587); + _localctx = new DereferenceContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(585); qualifiedName(); } break; case 9: - _localctx = new ParenthesizedExpressionContext(_localctx); - enterOuterAlt(_localctx, 9); { - setState(588); + _localctx = new ParenthesizedExpressionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(586); match(T__0); - setState(589); + setState(587); expression(); - setState(590); + setState(588); match(T__1); } break; } + _ctx.stop = _input.LT(-1); + setState(597); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,80,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new CastOperatorExpressionContext(new PrimaryExpressionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_primaryExpression); + setState(592); + if (!(precpred(_ctx, 9))) throw new FailedPredicateException(this, "precpred(_ctx, 9)"); + setState(593); + match(CAST_OP); + setState(594); + dataType(); + } + } + } + setState(599); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,80,_ctx); + } + } } catch (RecognitionException re) { _localctx.exception = re; @@ -4295,7 +4330,7 @@ class SqlBaseParser extends Parser { _errHandler.recover(this, re); } finally { - exitRule(); + unrollRecursionContexts(_parentctx); } return _localctx; } @@ -4330,21 +4365,21 @@ class SqlBaseParser extends Parser { enterRule(_localctx, 62, RULE_builtinDateTimeFunction); int _la; try { - setState(607); + setState(613); switch (_input.LA(1)) { case CURRENT_DATE: enterOuterAlt(_localctx, 1); { - setState(594); + setState(600); ((BuiltinDateTimeFunctionContext)_localctx).name = match(CURRENT_DATE); - setState(597); + setState(603); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,80,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,81,_ctx) ) { case 1: { - setState(595); + setState(601); match(T__0); - setState(596); + setState(602); match(T__1); } break; @@ -4354,25 +4389,25 @@ class SqlBaseParser extends Parser { case CURRENT_TIMESTAMP: enterOuterAlt(_localctx, 2); { - setState(599); - ((BuiltinDateTimeFunctionContext)_localctx).name = match(CURRENT_TIMESTAMP); setState(605); + ((BuiltinDateTimeFunctionContext)_localctx).name = match(CURRENT_TIMESTAMP); + setState(611); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,82,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,83,_ctx) ) { case 1: { - setState(600); + setState(606); match(T__0); - setState(602); + setState(608); _la = _input.LA(1); if (_la==INTEGER_VALUE) { { - setState(601); + setState(607); ((BuiltinDateTimeFunctionContext)_localctx).precision = match(INTEGER_VALUE); } } - setState(604); + setState(610); match(T__1); } break; @@ -4426,42 +4461,42 @@ class SqlBaseParser extends Parser { CastExpressionContext _localctx = new CastExpressionContext(_ctx, getState()); enterRule(_localctx, 64, RULE_castExpression); try { - setState(619); + setState(625); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,84,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,85,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { - setState(609); + setState(615); castTemplate(); } break; case 2: enterOuterAlt(_localctx, 2); { - setState(610); + setState(616); match(FUNCTION_ESC); - setState(611); + setState(617); castTemplate(); - setState(612); + setState(618); match(ESC_END); } break; case 3: enterOuterAlt(_localctx, 3); { - setState(614); + setState(620); convertTemplate(); } break; case 4: enterOuterAlt(_localctx, 4); { - setState(615); + setState(621); match(FUNCTION_ESC); - setState(616); + setState(622); convertTemplate(); - setState(617); + setState(623); match(ESC_END); } break; @@ -4512,17 +4547,17 @@ class SqlBaseParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(621); + setState(627); match(CAST); - setState(622); + setState(628); match(T__0); - setState(623); + setState(629); expression(); - setState(624); + setState(630); match(AS); - setState(625); + setState(631); dataType(); - setState(626); + setState(632); match(T__1); } } @@ -4570,17 +4605,17 @@ class SqlBaseParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(628); + setState(634); match(CONVERT); - setState(629); + setState(635); match(T__0); - setState(630); + setState(636); expression(); - setState(631); + setState(637); match(T__2); - setState(632); + setState(638); dataType(); - setState(633); + setState(639); match(T__1); } } @@ -4624,23 +4659,23 @@ class SqlBaseParser extends Parser { ExtractExpressionContext _localctx = new ExtractExpressionContext(_ctx, getState()); enterRule(_localctx, 70, RULE_extractExpression); try { - setState(640); + setState(646); switch (_input.LA(1)) { case EXTRACT: enterOuterAlt(_localctx, 1); { - setState(635); + setState(641); extractTemplate(); } break; case FUNCTION_ESC: enterOuterAlt(_localctx, 2); { - setState(636); + setState(642); match(FUNCTION_ESC); - setState(637); + setState(643); extractTemplate(); - setState(638); + setState(644); match(ESC_END); } break; @@ -4694,17 +4729,17 @@ class SqlBaseParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(642); + setState(648); match(EXTRACT); - setState(643); + setState(649); match(T__0); - setState(644); + setState(650); ((ExtractTemplateContext)_localctx).field = identifier(); - setState(645); + setState(651); match(FROM); - setState(646); + setState(652); valueExpression(0); - setState(647); + setState(653); match(T__1); } } @@ -4747,7 +4782,7 @@ class SqlBaseParser extends Parser { FunctionExpressionContext _localctx = new FunctionExpressionContext(_ctx, getState()); enterRule(_localctx, 74, RULE_functionExpression); try { - setState(654); + setState(660); switch (_input.LA(1)) { case ANALYZE: case ANALYZED: @@ -4793,18 +4828,18 @@ class SqlBaseParser extends Parser { case BACKQUOTED_IDENTIFIER: enterOuterAlt(_localctx, 1); { - setState(649); + setState(655); functionTemplate(); } break; case FUNCTION_ESC: enterOuterAlt(_localctx, 2); { - setState(650); + setState(656); match(FUNCTION_ESC); - setState(651); + setState(657); functionTemplate(); - setState(652); + setState(658); match(ESC_END); } break; @@ -4862,45 +4897,45 @@ class SqlBaseParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(656); + setState(662); functionName(); - setState(657); + setState(663); match(T__0); - setState(669); + setState(675); _la = _input.LA(1); if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << ALL) | (1L << ANALYZE) | (1L << ANALYZED) | (1L << CAST) | (1L << CATALOGS) | (1L << COLUMNS) | (1L << CONVERT) | (1L << CURRENT_DATE) | (1L << CURRENT_TIMESTAMP) | (1L << DAY) | (1L << DEBUG) | (1L << DISTINCT) | (1L << EXECUTABLE) | (1L << EXISTS) | (1L << EXPLAIN) | (1L << EXTRACT) | (1L << FALSE) | (1L << FIRST) | (1L << FORMAT) | (1L << FULL) | (1L << FUNCTIONS) | (1L << GRAPHVIZ) | (1L << HOUR) | (1L << INTERVAL) | (1L << LAST) | (1L << LEFT) | (1L << LIMIT) | (1L << MAPPED) | (1L << MATCH) | (1L << MINUTE) | (1L << MONTH) | (1L << NOT) | (1L << NULL) | (1L << OPTIMIZED))) != 0) || ((((_la - 67)) & ~0x3f) == 0 && ((1L << (_la - 67)) & ((1L << (PARSED - 67)) | (1L << (PHYSICAL - 67)) | (1L << (PLAN - 67)) | (1L << (RIGHT - 67)) | (1L << (RLIKE - 67)) | (1L << (QUERY - 67)) | (1L << (SCHEMAS - 67)) | (1L << (SECOND - 67)) | (1L << (SHOW - 67)) | (1L << (SYS - 67)) | (1L << (TABLES - 67)) | (1L << (TEXT - 67)) | (1L << (TRUE - 67)) | (1L << (TYPE - 67)) | (1L << (TYPES - 67)) | (1L << (VERIFY - 67)) | (1L << (YEAR - 67)) | (1L << (FUNCTION_ESC - 67)) | (1L << (DATE_ESC - 67)) | (1L << (TIME_ESC - 67)) | (1L << (TIMESTAMP_ESC - 67)) | (1L << (GUID_ESC - 67)) | (1L << (PLUS - 67)) | (1L << (MINUS - 67)) | (1L << (ASTERISK - 67)) | (1L << (PARAM - 67)) | (1L << (STRING - 67)) | (1L << (INTEGER_VALUE - 67)) | (1L << (DECIMAL_VALUE - 67)) | (1L << (IDENTIFIER - 67)) | (1L << (DIGIT_IDENTIFIER - 67)) | (1L << (QUOTED_IDENTIFIER - 67)) | (1L << (BACKQUOTED_IDENTIFIER - 67)))) != 0)) { { - setState(659); + setState(665); _la = _input.LA(1); if (_la==ALL || _la==DISTINCT) { { - setState(658); + setState(664); setQuantifier(); } } - setState(661); + setState(667); expression(); - setState(666); + setState(672); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__2) { { { - setState(662); + setState(668); match(T__2); - setState(663); + setState(669); expression(); } } - setState(668); + setState(674); _errHandler.sync(this); _la = _input.LA(1); } } } - setState(671); + setState(677); match(T__1); } } @@ -4944,19 +4979,19 @@ class SqlBaseParser extends Parser { FunctionNameContext _localctx = new FunctionNameContext(_ctx, getState()); enterRule(_localctx, 78, RULE_functionName); try { - setState(676); + setState(682); switch (_input.LA(1)) { case LEFT: enterOuterAlt(_localctx, 1); { - setState(673); + setState(679); match(LEFT); } break; case RIGHT: enterOuterAlt(_localctx, 2); { - setState(674); + setState(680); match(RIGHT); } break; @@ -5002,7 +5037,7 @@ class SqlBaseParser extends Parser { case BACKQUOTED_IDENTIFIER: enterOuterAlt(_localctx, 3); { - setState(675); + setState(681); identifier(); } break; @@ -5233,13 +5268,13 @@ class SqlBaseParser extends Parser { enterRule(_localctx, 80, RULE_constant); try { int _alt; - setState(704); + setState(710); switch (_input.LA(1)) { case NULL: _localctx = new NullLiteralContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(678); + setState(684); match(NULL); } break; @@ -5247,7 +5282,7 @@ class SqlBaseParser extends Parser { _localctx = new IntervalLiteralContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(679); + setState(685); interval(); } break; @@ -5256,7 +5291,7 @@ class SqlBaseParser extends Parser { _localctx = new NumericLiteralContext(_localctx); enterOuterAlt(_localctx, 3); { - setState(680); + setState(686); number(); } break; @@ -5265,7 +5300,7 @@ class SqlBaseParser extends Parser { _localctx = new BooleanLiteralContext(_localctx); enterOuterAlt(_localctx, 4); { - setState(681); + setState(687); booleanValue(); } break; @@ -5273,7 +5308,7 @@ class SqlBaseParser extends Parser { _localctx = new StringLiteralContext(_localctx); enterOuterAlt(_localctx, 5); { - setState(683); + setState(689); _errHandler.sync(this); _alt = 1; do { @@ -5281,7 +5316,7 @@ class SqlBaseParser extends Parser { case 1: { { - setState(682); + setState(688); match(STRING); } } @@ -5289,9 +5324,9 @@ class SqlBaseParser extends Parser { default: throw new NoViableAltException(this); } - setState(685); + setState(691); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,91,_ctx); + _alt = getInterpreter().adaptivePredict(_input,92,_ctx); } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); } break; @@ -5299,7 +5334,7 @@ class SqlBaseParser extends Parser { _localctx = new ParamLiteralContext(_localctx); enterOuterAlt(_localctx, 6); { - setState(687); + setState(693); match(PARAM); } break; @@ -5307,11 +5342,11 @@ class SqlBaseParser extends Parser { _localctx = new DateEscapedLiteralContext(_localctx); enterOuterAlt(_localctx, 7); { - setState(688); + setState(694); match(DATE_ESC); - setState(689); + setState(695); string(); - setState(690); + setState(696); match(ESC_END); } break; @@ -5319,11 +5354,11 @@ class SqlBaseParser extends Parser { _localctx = new TimeEscapedLiteralContext(_localctx); enterOuterAlt(_localctx, 8); { - setState(692); + setState(698); match(TIME_ESC); - setState(693); + setState(699); string(); - setState(694); + setState(700); match(ESC_END); } break; @@ -5331,11 +5366,11 @@ class SqlBaseParser extends Parser { _localctx = new TimestampEscapedLiteralContext(_localctx); enterOuterAlt(_localctx, 9); { - setState(696); + setState(702); match(TIMESTAMP_ESC); - setState(697); + setState(703); string(); - setState(698); + setState(704); match(ESC_END); } break; @@ -5343,11 +5378,11 @@ class SqlBaseParser extends Parser { _localctx = new GuidEscapedLiteralContext(_localctx); enterOuterAlt(_localctx, 10); { - setState(700); + setState(706); match(GUID_ESC); - setState(701); + setState(707); string(); - setState(702); + setState(708); match(ESC_END); } break; @@ -5400,7 +5435,7 @@ class SqlBaseParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(706); + setState(712); _la = _input.LA(1); if ( !(((((_la - 100)) & ~0x3f) == 0 && ((1L << (_la - 100)) & ((1L << (EQ - 100)) | (1L << (NULLEQ - 100)) | (1L << (NEQ - 100)) | (1L << (LT - 100)) | (1L << (LTE - 100)) | (1L << (GT - 100)) | (1L << (GTE - 100)))) != 0)) ) { _errHandler.recoverInline(this); @@ -5449,7 +5484,7 @@ class SqlBaseParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(708); + setState(714); _la = _input.LA(1); if ( !(_la==FALSE || _la==TRUE) ) { _errHandler.recoverInline(this); @@ -5517,13 +5552,13 @@ class SqlBaseParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(710); + setState(716); match(INTERVAL); - setState(712); + setState(718); _la = _input.LA(1); if (_la==PLUS || _la==MINUS) { { - setState(711); + setState(717); ((IntervalContext)_localctx).sign = _input.LT(1); _la = _input.LA(1); if ( !(_la==PLUS || _la==MINUS) ) { @@ -5534,35 +5569,35 @@ class SqlBaseParser extends Parser { } } - setState(716); + setState(722); switch (_input.LA(1)) { case INTEGER_VALUE: case DECIMAL_VALUE: { - setState(714); + setState(720); ((IntervalContext)_localctx).valueNumeric = number(); } break; case PARAM: case STRING: { - setState(715); + setState(721); ((IntervalContext)_localctx).valuePattern = string(); } break; default: throw new NoViableAltException(this); } - setState(718); + setState(724); ((IntervalContext)_localctx).leading = intervalField(); - setState(721); + setState(727); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,95,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,96,_ctx) ) { case 1: { - setState(719); + setState(725); match(TO); - setState(720); + setState(726); ((IntervalContext)_localctx).trailing = intervalField(); } break; @@ -5619,7 +5654,7 @@ class SqlBaseParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(723); + setState(729); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << DAY) | (1L << DAYS) | (1L << HOUR) | (1L << HOURS) | (1L << MINUTE) | (1L << MINUTES) | (1L << MONTH) | (1L << MONTHS))) != 0) || ((((_la - 74)) & ~0x3f) == 0 && ((1L << (_la - 74)) & ((1L << (SECOND - 74)) | (1L << (SECONDS - 74)) | (1L << (YEAR - 74)) | (1L << (YEARS - 74)))) != 0)) ) { _errHandler.recoverInline(this); @@ -5677,7 +5712,7 @@ class SqlBaseParser extends Parser { _localctx = new PrimitiveDataTypeContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(725); + setState(731); identifier(); } } @@ -5729,25 +5764,25 @@ class SqlBaseParser extends Parser { int _alt; enterOuterAlt(_localctx, 1); { - setState(732); + setState(738); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,96,_ctx); + _alt = getInterpreter().adaptivePredict(_input,97,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(727); + setState(733); identifier(); - setState(728); + setState(734); match(DOT); } } } - setState(734); + setState(740); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,96,_ctx); + _alt = getInterpreter().adaptivePredict(_input,97,_ctx); } - setState(735); + setState(741); identifier(); } } @@ -5792,13 +5827,13 @@ class SqlBaseParser extends Parser { IdentifierContext _localctx = new IdentifierContext(_ctx, getState()); enterRule(_localctx, 94, RULE_identifier); try { - setState(739); + setState(745); switch (_input.LA(1)) { case QUOTED_IDENTIFIER: case BACKQUOTED_IDENTIFIER: enterOuterAlt(_localctx, 1); { - setState(737); + setState(743); quoteIdentifier(); } break; @@ -5842,7 +5877,7 @@ class SqlBaseParser extends Parser { case DIGIT_IDENTIFIER: enterOuterAlt(_localctx, 2); { - setState(738); + setState(744); unquoteIdentifier(); } break; @@ -5895,43 +5930,43 @@ class SqlBaseParser extends Parser { enterRule(_localctx, 96, RULE_tableIdentifier); int _la; try { - setState(753); + setState(759); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,100,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,101,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { - setState(744); + setState(750); _la = _input.LA(1); if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ANALYZE) | (1L << ANALYZED) | (1L << CATALOGS) | (1L << COLUMNS) | (1L << DAY) | (1L << DEBUG) | (1L << EXECUTABLE) | (1L << EXPLAIN) | (1L << FIRST) | (1L << FORMAT) | (1L << FULL) | (1L << FUNCTIONS) | (1L << GRAPHVIZ) | (1L << HOUR) | (1L << INTERVAL) | (1L << LAST) | (1L << LIMIT) | (1L << MAPPED) | (1L << MINUTE) | (1L << MONTH) | (1L << OPTIMIZED))) != 0) || ((((_la - 67)) & ~0x3f) == 0 && ((1L << (_la - 67)) & ((1L << (PARSED - 67)) | (1L << (PHYSICAL - 67)) | (1L << (PLAN - 67)) | (1L << (RLIKE - 67)) | (1L << (QUERY - 67)) | (1L << (SCHEMAS - 67)) | (1L << (SECOND - 67)) | (1L << (SHOW - 67)) | (1L << (SYS - 67)) | (1L << (TABLES - 67)) | (1L << (TEXT - 67)) | (1L << (TYPE - 67)) | (1L << (TYPES - 67)) | (1L << (VERIFY - 67)) | (1L << (YEAR - 67)) | (1L << (IDENTIFIER - 67)) | (1L << (DIGIT_IDENTIFIER - 67)) | (1L << (QUOTED_IDENTIFIER - 67)) | (1L << (BACKQUOTED_IDENTIFIER - 67)))) != 0)) { - { - setState(741); - ((TableIdentifierContext)_localctx).catalog = identifier(); - setState(742); - match(T__3); - } - } - - setState(746); - match(TABLE_IDENTIFIER); - } - break; - case 2: - enterOuterAlt(_localctx, 2); - { - setState(750); - _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,99,_ctx) ) { - case 1: { setState(747); ((TableIdentifierContext)_localctx).catalog = identifier(); setState(748); match(T__3); } + } + + setState(752); + match(TABLE_IDENTIFIER); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(756); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,100,_ctx) ) { + case 1: + { + setState(753); + ((TableIdentifierContext)_localctx).catalog = identifier(); + setState(754); + match(T__3); + } break; } - setState(752); + setState(758); ((TableIdentifierContext)_localctx).name = identifier(); } break; @@ -5998,13 +6033,13 @@ class SqlBaseParser extends Parser { QuoteIdentifierContext _localctx = new QuoteIdentifierContext(_ctx, getState()); enterRule(_localctx, 98, RULE_quoteIdentifier); try { - setState(757); + setState(763); switch (_input.LA(1)) { case QUOTED_IDENTIFIER: _localctx = new QuotedIdentifierContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(755); + setState(761); match(QUOTED_IDENTIFIER); } break; @@ -6012,7 +6047,7 @@ class SqlBaseParser extends Parser { _localctx = new BackQuotedIdentifierContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(756); + setState(762); match(BACKQUOTED_IDENTIFIER); } break; @@ -6084,13 +6119,13 @@ class SqlBaseParser extends Parser { UnquoteIdentifierContext _localctx = new UnquoteIdentifierContext(_ctx, getState()); enterRule(_localctx, 100, RULE_unquoteIdentifier); try { - setState(762); + setState(768); switch (_input.LA(1)) { case IDENTIFIER: _localctx = new UnquotedIdentifierContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(759); + setState(765); match(IDENTIFIER); } break; @@ -6133,7 +6168,7 @@ class SqlBaseParser extends Parser { _localctx = new UnquotedIdentifierContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(760); + setState(766); nonReserved(); } break; @@ -6141,7 +6176,7 @@ class SqlBaseParser extends Parser { _localctx = new DigitIdentifierContext(_localctx); enterOuterAlt(_localctx, 3); { - setState(761); + setState(767); match(DIGIT_IDENTIFIER); } break; @@ -6210,13 +6245,13 @@ class SqlBaseParser extends Parser { NumberContext _localctx = new NumberContext(_ctx, getState()); enterRule(_localctx, 102, RULE_number); try { - setState(766); + setState(772); switch (_input.LA(1)) { case DECIMAL_VALUE: _localctx = new DecimalLiteralContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(764); + setState(770); match(DECIMAL_VALUE); } break; @@ -6224,7 +6259,7 @@ class SqlBaseParser extends Parser { _localctx = new IntegerLiteralContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(765); + setState(771); match(INTEGER_VALUE); } break; @@ -6272,7 +6307,7 @@ class SqlBaseParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(768); + setState(774); _la = _input.LA(1); if ( !(_la==PARAM || _la==STRING) ) { _errHandler.recoverInline(this); @@ -6355,7 +6390,7 @@ class SqlBaseParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(770); + setState(776); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ANALYZE) | (1L << ANALYZED) | (1L << CATALOGS) | (1L << COLUMNS) | (1L << DAY) | (1L << DEBUG) | (1L << EXECUTABLE) | (1L << EXPLAIN) | (1L << FIRST) | (1L << FORMAT) | (1L << FULL) | (1L << FUNCTIONS) | (1L << GRAPHVIZ) | (1L << HOUR) | (1L << INTERVAL) | (1L << LAST) | (1L << LIMIT) | (1L << MAPPED) | (1L << MINUTE) | (1L << MONTH) | (1L << OPTIMIZED))) != 0) || ((((_la - 67)) & ~0x3f) == 0 && ((1L << (_la - 67)) & ((1L << (PARSED - 67)) | (1L << (PHYSICAL - 67)) | (1L << (PLAN - 67)) | (1L << (RLIKE - 67)) | (1L << (QUERY - 67)) | (1L << (SCHEMAS - 67)) | (1L << (SECOND - 67)) | (1L << (SHOW - 67)) | (1L << (SYS - 67)) | (1L << (TABLES - 67)) | (1L << (TEXT - 67)) | (1L << (TYPE - 67)) | (1L << (TYPES - 67)) | (1L << (VERIFY - 67)) | (1L << (YEAR - 67)))) != 0)) ) { _errHandler.recoverInline(this); @@ -6381,6 +6416,8 @@ class SqlBaseParser extends Parser { return booleanExpression_sempred((BooleanExpressionContext)_localctx, predIndex); case 29: return valueExpression_sempred((ValueExpressionContext)_localctx, predIndex); + case 30: + return primaryExpression_sempred((PrimaryExpressionContext)_localctx, predIndex); } return true; } @@ -6396,19 +6433,24 @@ class SqlBaseParser extends Parser { private boolean valueExpression_sempred(ValueExpressionContext _localctx, int predIndex) { switch (predIndex) { case 2: - return precpred(_ctx, 4); - case 3: return precpred(_ctx, 3); - case 4: + case 3: return precpred(_ctx, 2); - case 5: + case 4: return precpred(_ctx, 1); } return true; } + private boolean primaryExpression_sempred(PrimaryExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 5: + return precpred(_ctx, 9); + } + return true; + } public static final String _serializedATN = - "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3\u0082\u0307\4\2\t"+ + "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3\u0082\u030d\4\2\t"+ "\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13"+ "\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+ "\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+ @@ -6452,270 +6494,272 @@ class SqlBaseParser extends Parser { "\n\33\3\33\3\33\3\33\5\33\u020d\n\33\3\33\3\33\3\33\3\33\5\33\u0213\n"+ "\33\3\33\5\33\u0216\n\33\3\34\3\34\3\34\3\35\3\35\5\35\u021d\n\35\3\36"+ "\3\36\3\36\3\36\3\36\3\36\5\36\u0225\n\36\3\37\3\37\3\37\3\37\5\37\u022b"+ - "\n\37\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3\37"+ - "\7\37\u023a\n\37\f\37\16\37\u023d\13\37\3 \3 \3 \3 \3 \3 \3 \5 \u0246"+ - "\n \3 \3 \3 \3 \3 \3 \3 \3 \3 \3 \3 \5 \u0253\n \3!\3!\3!\5!\u0258\n!"+ - "\3!\3!\3!\5!\u025d\n!\3!\5!\u0260\n!\5!\u0262\n!\3\"\3\"\3\"\3\"\3\"\3"+ - "\"\3\"\3\"\3\"\3\"\5\"\u026e\n\"\3#\3#\3#\3#\3#\3#\3#\3$\3$\3$\3$\3$\3"+ - "$\3$\3%\3%\3%\3%\3%\5%\u0283\n%\3&\3&\3&\3&\3&\3&\3&\3\'\3\'\3\'\3\'\3"+ - "\'\5\'\u0291\n\'\3(\3(\3(\5(\u0296\n(\3(\3(\3(\7(\u029b\n(\f(\16(\u029e"+ - "\13(\5(\u02a0\n(\3(\3(\3)\3)\3)\5)\u02a7\n)\3*\3*\3*\3*\3*\6*\u02ae\n"+ - "*\r*\16*\u02af\3*\3*\3*\3*\3*\3*\3*\3*\3*\3*\3*\3*\3*\3*\3*\3*\3*\5*\u02c3"+ - "\n*\3+\3+\3,\3,\3-\3-\5-\u02cb\n-\3-\3-\5-\u02cf\n-\3-\3-\3-\5-\u02d4"+ - "\n-\3.\3.\3/\3/\3\60\3\60\3\60\7\60\u02dd\n\60\f\60\16\60\u02e0\13\60"+ - "\3\60\3\60\3\61\3\61\5\61\u02e6\n\61\3\62\3\62\3\62\5\62\u02eb\n\62\3"+ - "\62\3\62\3\62\3\62\5\62\u02f1\n\62\3\62\5\62\u02f4\n\62\3\63\3\63\5\63"+ - "\u02f8\n\63\3\64\3\64\3\64\5\64\u02fd\n\64\3\65\3\65\5\65\u0301\n\65\3"+ - "\66\3\66\3\67\3\67\3\67\2\4.<8\2\4\6\b\n\f\16\20\22\24\26\30\32\34\36"+ - " \"$&(*,.\60\62\64\668:<>@BDFHJLNPRTVXZ\\^`bdfhjl\2\22\b\2\7\7\t\t\36"+ - "\36\66\66AAEE\4\2((SS\4\2\t\tAA\4\2%%--\3\2\32\33\3\2mn\4\2\7\7ww\4\2"+ - "\r\r\32\32\4\2##\62\62\4\2\7\7\34\34\3\2oq\3\2fl\4\2\"\"TT\7\2\27\30+"+ - ",8;LM\\]\3\2uv\30\2\b\t\22\23\27\27\31\31\36\36 #$&(++//\62\62\65\66"+ - "88::AAEGILOPRSVWYY\\\\\u0365\2n\3\2\2\2\4q\3\2\2\2\6\u00d9\3\2\2\2\b\u00e4"+ - "\3\2\2\2\n\u00e8\3\2\2\2\f\u00fd\3\2\2\2\16\u0104\3\2\2\2\20\u0106\3\2"+ - "\2\2\22\u010e\3\2\2\2\24\u012a\3\2\2\2\26\u0134\3\2\2\2\30\u013e\3\2\2"+ - "\2\32\u014d\3\2\2\2\34\u014f\3\2\2\2\36\u0155\3\2\2\2 \u0157\3\2\2\2\""+ - "\u015e\3\2\2\2$\u0170\3\2\2\2&\u0181\3\2\2\2(\u0191\3\2\2\2*\u01ac\3\2"+ - "\2\2,\u01ae\3\2\2\2.\u01cf\3\2\2\2\60\u01e0\3\2\2\2\62\u01e3\3\2\2\2\64"+ - "\u0215\3\2\2\2\66\u0217\3\2\2\28\u021a\3\2\2\2:\u0224\3\2\2\2<\u022a\3"+ - "\2\2\2>\u0252\3\2\2\2@\u0261\3\2\2\2B\u026d\3\2\2\2D\u026f\3\2\2\2F\u0276"+ - "\3\2\2\2H\u0282\3\2\2\2J\u0284\3\2\2\2L\u0290\3\2\2\2N\u0292\3\2\2\2P"+ - "\u02a6\3\2\2\2R\u02c2\3\2\2\2T\u02c4\3\2\2\2V\u02c6\3\2\2\2X\u02c8\3\2"+ - "\2\2Z\u02d5\3\2\2\2\\\u02d7\3\2\2\2^\u02de\3\2\2\2`\u02e5\3\2\2\2b\u02f3"+ - "\3\2\2\2d\u02f7\3\2\2\2f\u02fc\3\2\2\2h\u0300\3\2\2\2j\u0302\3\2\2\2l"+ - "\u0304\3\2\2\2no\5\6\4\2op\7\2\2\3p\3\3\2\2\2qr\5,\27\2rs\7\2\2\3s\5\3"+ - "\2\2\2t\u00da\5\b\5\2u\u0083\7 \2\2v\177\7\3\2\2wx\7G\2\2x~\t\2\2\2yz"+ - "\7$\2\2z~\t\3\2\2{|\7Y\2\2|~\5V,\2}w\3\2\2\2}y\3\2\2\2}{\3\2\2\2~\u0081"+ - "\3\2\2\2\177}\3\2\2\2\177\u0080\3\2\2\2\u0080\u0082\3\2\2\2\u0081\177"+ - "\3\2\2\2\u0082\u0084\7\4\2\2\u0083v\3\2\2\2\u0083\u0084\3\2\2\2\u0084"+ - "\u0085\3\2\2\2\u0085\u00da\5\6\4\2\u0086\u0092\7\31\2\2\u0087\u008e\7"+ - "\3\2\2\u0088\u0089\7G\2\2\u0089\u008d\t\4\2\2\u008a\u008b\7$\2\2\u008b"+ - "\u008d\t\3\2\2\u008c\u0088\3\2\2\2\u008c\u008a\3\2\2\2\u008d\u0090\3\2"+ - "\2\2\u008e\u008c\3\2\2\2\u008e\u008f\3\2\2\2\u008f\u0091\3\2\2\2\u0090"+ - "\u008e\3\2\2\2\u0091\u0093\7\4\2\2\u0092\u0087\3\2\2\2\u0092\u0093\3\2"+ - "\2\2\u0093\u0094\3\2\2\2\u0094\u00da\5\6\4\2\u0095\u0096\7O\2\2\u0096"+ - "\u0099\7R\2\2\u0097\u009a\5\66\34\2\u0098\u009a\5b\62\2\u0099\u0097\3"+ - "\2\2\2\u0099\u0098\3\2\2\2\u0099\u009a\3\2\2\2\u009a\u00da\3\2\2\2\u009b"+ - "\u009c\7O\2\2\u009c\u009d\7\23\2\2\u009d\u00a0\t\5\2\2\u009e\u00a1\5\66"+ - "\34\2\u009f\u00a1\5b\62\2\u00a0\u009e\3\2\2\2\u00a0\u009f\3\2\2\2\u00a1"+ - "\u00da\3\2\2\2\u00a2\u00a5\t\6\2\2\u00a3\u00a6\5\66\34\2\u00a4\u00a6\5"+ - "b\62\2\u00a5\u00a3\3\2\2\2\u00a5\u00a4\3\2\2\2\u00a6\u00da\3\2\2\2\u00a7"+ - "\u00a8\7O\2\2\u00a8\u00aa\7\'\2\2\u00a9\u00ab\5\66\34\2\u00aa\u00a9\3"+ - "\2\2\2\u00aa\u00ab\3\2\2\2\u00ab\u00da\3\2\2\2\u00ac\u00ad\7O\2\2\u00ad"+ - "\u00da\7K\2\2\u00ae\u00af\7P\2\2\u00af\u00b2\7R\2\2\u00b0\u00b1\7\21\2"+ - "\2\u00b1\u00b3\5\66\34\2\u00b2\u00b0\3\2\2\2\u00b2\u00b3\3\2\2\2\u00b3"+ - "\u00b6\3\2\2\2\u00b4\u00b7\5\66\34\2\u00b5\u00b7\5b\62\2\u00b6\u00b4\3"+ - "\2\2\2\u00b6\u00b5\3\2\2\2\u00b6\u00b7\3\2\2\2\u00b7\u00c1\3\2\2\2\u00b8"+ - "\u00b9\7V\2\2\u00b9\u00be\5j\66\2\u00ba\u00bb\7\5\2\2\u00bb\u00bd\5j\66"+ - "\2\u00bc\u00ba\3\2\2\2\u00bd\u00c0\3\2\2\2\u00be\u00bc\3\2\2\2\u00be\u00bf"+ - "\3\2\2\2\u00bf\u00c2\3\2\2\2\u00c0\u00be\3\2\2\2\u00c1\u00b8\3\2\2\2\u00c1"+ - "\u00c2\3\2\2\2\u00c2\u00da\3\2\2\2\u00c3\u00c4\7P\2\2\u00c4\u00c7\7\23"+ - "\2\2\u00c5\u00c6\7\21\2\2\u00c6\u00c8\5j\66\2\u00c7\u00c5\3\2\2\2\u00c7"+ - "\u00c8\3\2\2\2\u00c8\u00cc\3\2\2\2\u00c9\u00ca\7Q\2\2\u00ca\u00cd\5\66"+ - "\34\2\u00cb\u00cd\5b\62\2\u00cc\u00c9\3\2\2\2\u00cc\u00cb\3\2\2\2\u00cc"+ - "\u00cd\3\2\2\2\u00cd\u00cf\3\2\2\2\u00ce\u00d0\5\66\34\2\u00cf\u00ce\3"+ - "\2\2\2\u00cf\u00d0\3\2\2\2\u00d0\u00da\3\2\2\2\u00d1\u00d2\7P\2\2\u00d2"+ - "\u00d7\7W\2\2\u00d3\u00d5\t\7\2\2\u00d4\u00d3\3\2\2\2\u00d4\u00d5\3\2"+ - "\2\2\u00d5\u00d6\3\2\2\2\u00d6\u00d8\5h\65\2\u00d7\u00d4\3\2\2\2\u00d7"+ - "\u00d8\3\2\2\2\u00d8\u00da\3\2\2\2\u00d9t\3\2\2\2\u00d9u\3\2\2\2\u00d9"+ - "\u0086\3\2\2\2\u00d9\u0095\3\2\2\2\u00d9\u009b\3\2\2\2\u00d9\u00a2\3\2"+ - "\2\2\u00d9\u00a7\3\2\2\2\u00d9\u00ac\3\2\2\2\u00d9\u00ae\3\2\2\2\u00d9"+ - "\u00c3\3\2\2\2\u00d9\u00d1\3\2\2\2\u00da\7\3\2\2\2\u00db\u00dc\7[\2\2"+ - "\u00dc\u00e1\5\34\17\2\u00dd\u00de\7\5\2\2\u00de\u00e0\5\34\17\2\u00df"+ - "\u00dd\3\2\2\2\u00e0\u00e3\3\2\2\2\u00e1\u00df\3\2\2\2\u00e1\u00e2\3\2"+ - "\2\2\u00e2\u00e5\3\2\2\2\u00e3\u00e1\3\2\2\2\u00e4\u00db\3\2\2\2\u00e4"+ - "\u00e5\3\2\2\2\u00e5\u00e6\3\2\2\2\u00e6\u00e7\5\n\6\2\u00e7\t\3\2\2\2"+ - "\u00e8\u00f3\5\16\b\2\u00e9\u00ea\7C\2\2\u00ea\u00eb\7\17\2\2\u00eb\u00f0"+ - "\5\20\t\2\u00ec\u00ed\7\5\2\2\u00ed\u00ef\5\20\t\2\u00ee\u00ec\3\2\2\2"+ - "\u00ef\u00f2\3\2\2\2\u00f0\u00ee\3\2\2\2\u00f0\u00f1\3\2\2\2\u00f1\u00f4"+ - "\3\2\2\2\u00f2\u00f0\3\2\2\2\u00f3\u00e9\3\2\2\2\u00f3\u00f4\3\2\2\2\u00f4"+ - "\u00f6\3\2\2\2\u00f5\u00f7\5\f\7\2\u00f6\u00f5\3\2\2\2\u00f6\u00f7\3\2"+ - "\2\2\u00f7\13\3\2\2\2\u00f8\u00f9\7\65\2\2\u00f9\u00fe\t\b\2\2\u00fa\u00fb"+ - "\7`\2\2\u00fb\u00fc\t\b\2\2\u00fc\u00fe\7e\2\2\u00fd\u00f8\3\2\2\2\u00fd"+ - "\u00fa\3\2\2\2\u00fe\r\3\2\2\2\u00ff\u0105\5\22\n\2\u0100\u0101\7\3\2"+ - "\2\u0101\u0102\5\n\6\2\u0102\u0103\7\4\2\2\u0103\u0105\3\2\2\2\u0104\u00ff"+ - "\3\2\2\2\u0104\u0100\3\2\2\2\u0105\17\3\2\2\2\u0106\u0108\5,\27\2\u0107"+ - "\u0109\t\t\2\2\u0108\u0107\3\2\2\2\u0108\u0109\3\2\2\2\u0109\u010c\3\2"+ - "\2\2\u010a\u010b\7?\2\2\u010b\u010d\t\n\2\2\u010c\u010a\3\2\2\2\u010c"+ - "\u010d\3\2\2\2\u010d\21\3\2\2\2\u010e\u0110\7N\2\2\u010f\u0111\5\36\20"+ - "\2\u0110\u010f\3\2\2\2\u0110\u0111\3\2\2\2\u0111\u0112\3\2\2\2\u0112\u0117"+ - "\5 \21\2\u0113\u0114\7\5\2\2\u0114\u0116\5 \21\2\u0115\u0113\3\2\2\2\u0116"+ - "\u0119\3\2\2\2\u0117\u0115\3\2\2\2\u0117\u0118\3\2\2\2\u0118\u011b\3\2"+ - "\2\2\u0119\u0117\3\2\2\2\u011a\u011c\5\24\13\2\u011b\u011a\3\2\2\2\u011b"+ - "\u011c\3\2\2\2\u011c\u011f\3\2\2\2\u011d\u011e\7Z\2\2\u011e\u0120\5.\30"+ - "\2\u011f\u011d\3\2\2\2\u011f\u0120\3\2\2\2\u0120\u0124\3\2\2\2\u0121\u0122"+ - "\7)\2\2\u0122\u0123\7\17\2\2\u0123\u0125\5\26\f\2\u0124\u0121\3\2\2\2"+ - "\u0124\u0125\3\2\2\2\u0125\u0128\3\2\2\2\u0126\u0127\7*\2\2\u0127\u0129"+ - "\5.\30\2\u0128\u0126\3\2\2\2\u0128\u0129\3\2\2\2\u0129\23\3\2\2\2\u012a"+ - "\u012b\7%\2\2\u012b\u0130\5\"\22\2\u012c\u012d\7\5\2\2\u012d\u012f\5\""+ - "\22\2\u012e\u012c\3\2\2\2\u012f\u0132\3\2\2\2\u0130\u012e\3\2\2\2\u0130"+ - "\u0131\3\2\2\2\u0131\25\3\2\2\2\u0132\u0130\3\2\2\2\u0133\u0135\5\36\20"+ - "\2\u0134\u0133\3\2\2\2\u0134\u0135\3\2\2\2\u0135\u0136\3\2\2\2\u0136\u013b"+ - "\5\30\r\2\u0137\u0138\7\5\2\2\u0138\u013a\5\30\r\2\u0139\u0137\3\2\2\2"+ - "\u013a\u013d\3\2\2\2\u013b\u0139\3\2\2\2\u013b\u013c\3\2\2\2\u013c\27"+ - "\3\2\2\2\u013d\u013b\3\2\2\2\u013e\u013f\5\32\16\2\u013f\31\3\2\2\2\u0140"+ - "\u0149\7\3\2\2\u0141\u0146\5,\27\2\u0142\u0143\7\5\2\2\u0143\u0145\5,"+ - "\27\2\u0144\u0142\3\2\2\2\u0145\u0148\3\2\2\2\u0146\u0144\3\2\2\2\u0146"+ - "\u0147\3\2\2\2\u0147\u014a\3\2\2\2\u0148\u0146\3\2\2\2\u0149\u0141\3\2"+ - "\2\2\u0149\u014a\3\2\2\2\u014a\u014b\3\2\2\2\u014b\u014e\7\4\2\2\u014c"+ - "\u014e\5,\27\2\u014d\u0140\3\2\2\2\u014d\u014c\3\2\2\2\u014e\33\3\2\2"+ - "\2\u014f\u0150\5`\61\2\u0150\u0151\7\f\2\2\u0151\u0152\7\3\2\2\u0152\u0153"+ - "\5\n\6\2\u0153\u0154\7\4\2\2\u0154\35\3\2\2\2\u0155\u0156\t\13\2\2\u0156"+ - "\37\3\2\2\2\u0157\u015c\5,\27\2\u0158\u015a\7\f\2\2\u0159\u0158\3\2\2"+ - "\2\u0159\u015a\3\2\2\2\u015a\u015b\3\2\2\2\u015b\u015d\5`\61\2\u015c\u0159"+ - "\3\2\2\2\u015c\u015d\3\2\2\2\u015d!\3\2\2\2\u015e\u0162\5*\26\2\u015f"+ - "\u0161\5$\23\2\u0160\u015f\3\2\2\2\u0161\u0164\3\2\2\2\u0162\u0160\3\2"+ - "\2\2\u0162\u0163\3\2\2\2\u0163#\3\2\2\2\u0164\u0162\3\2\2\2\u0165\u0166"+ - "\5&\24\2\u0166\u0167\7\61\2\2\u0167\u0169\5*\26\2\u0168\u016a\5(\25\2"+ - "\u0169\u0168\3\2\2\2\u0169\u016a\3\2\2\2\u016a\u0171\3\2\2\2\u016b\u016c"+ - "\7<\2\2\u016c\u016d\5&\24\2\u016d\u016e\7\61\2\2\u016e\u016f\5*\26\2\u016f"+ - "\u0171\3\2\2\2\u0170\u0165\3\2\2\2\u0170\u016b\3\2\2\2\u0171%\3\2\2\2"+ - "\u0172\u0174\7.\2\2\u0173\u0172\3\2\2\2\u0173\u0174\3\2\2\2\u0174\u0182"+ - "\3\2\2\2\u0175\u0177\7\63\2\2\u0176\u0178\7D\2\2\u0177\u0176\3\2\2\2\u0177"+ - "\u0178\3\2\2\2\u0178\u0182\3\2\2\2\u0179\u017b\7H\2\2\u017a\u017c\7D\2"+ - "\2\u017b\u017a\3\2\2\2\u017b\u017c\3\2\2\2\u017c\u0182\3\2\2\2\u017d\u017f"+ - "\7&\2\2\u017e\u0180\7D\2\2\u017f\u017e\3\2\2\2\u017f\u0180\3\2\2\2\u0180"+ - "\u0182\3\2\2\2\u0181\u0173\3\2\2\2\u0181\u0175\3\2\2\2\u0181\u0179\3\2"+ - "\2\2\u0181\u017d\3\2\2\2\u0182\'\3\2\2\2\u0183\u0184\7@\2\2\u0184\u0192"+ - "\5.\30\2\u0185\u0186\7X\2\2\u0186\u0187\7\3\2\2\u0187\u018c\5`\61\2\u0188"+ - "\u0189\7\5\2\2\u0189\u018b\5`\61\2\u018a\u0188\3\2\2\2\u018b\u018e\3\2"+ - "\2\2\u018c\u018a\3\2\2\2\u018c\u018d\3\2\2\2\u018d\u018f\3\2\2\2\u018e"+ - "\u018c\3\2\2\2\u018f\u0190\7\4\2\2\u0190\u0192\3\2\2\2\u0191\u0183\3\2"+ - "\2\2\u0191\u0185\3\2\2\2\u0192)\3\2\2\2\u0193\u0198\5b\62\2\u0194\u0196"+ - "\7\f\2\2\u0195\u0194\3\2\2\2\u0195\u0196\3\2\2\2\u0196\u0197\3\2\2\2\u0197"+ - "\u0199\5^\60\2\u0198\u0195\3\2\2\2\u0198\u0199\3\2\2\2\u0199\u01ad\3\2"+ - "\2\2\u019a\u019b\7\3\2\2\u019b\u019c\5\n\6\2\u019c\u01a1\7\4\2\2\u019d"+ - "\u019f\7\f\2\2\u019e\u019d\3\2\2\2\u019e\u019f\3\2\2\2\u019f\u01a0\3\2"+ - "\2\2\u01a0\u01a2\5^\60\2\u01a1\u019e\3\2\2\2\u01a1\u01a2\3\2\2\2\u01a2"+ - "\u01ad\3\2\2\2\u01a3\u01a4\7\3\2\2\u01a4\u01a5\5\"\22\2\u01a5\u01aa\7"+ - "\4\2\2\u01a6\u01a8\7\f\2\2\u01a7\u01a6\3\2\2\2\u01a7\u01a8\3\2\2\2\u01a8"+ - "\u01a9\3\2\2\2\u01a9\u01ab\5^\60\2\u01aa\u01a7\3\2\2\2\u01aa\u01ab\3\2"+ - "\2\2\u01ab\u01ad\3\2\2\2\u01ac\u0193\3\2\2\2\u01ac\u019a\3\2\2\2\u01ac"+ - "\u01a3\3\2\2\2\u01ad+\3\2\2\2\u01ae\u01af\5.\30\2\u01af-\3\2\2\2\u01b0"+ - "\u01b1\b\30\1\2\u01b1\u01b2\7=\2\2\u01b2\u01d0\5.\30\n\u01b3\u01b4\7\37"+ - "\2\2\u01b4\u01b5\7\3\2\2\u01b5\u01b6\5\b\5\2\u01b6\u01b7\7\4\2\2\u01b7"+ - "\u01d0\3\2\2\2\u01b8\u01b9\7J\2\2\u01b9\u01ba\7\3\2\2\u01ba\u01bb\5j\66"+ - "\2\u01bb\u01bc\5\60\31\2\u01bc\u01bd\7\4\2\2\u01bd\u01d0\3\2\2\2\u01be"+ - "\u01bf\7\67\2\2\u01bf\u01c0\7\3\2\2\u01c0\u01c1\5^\60\2\u01c1\u01c2\7"+ - "\5\2\2\u01c2\u01c3\5j\66\2\u01c3\u01c4\5\60\31\2\u01c4\u01c5\7\4\2\2\u01c5"+ - "\u01d0\3\2\2\2\u01c6\u01c7\7\67\2\2\u01c7\u01c8\7\3\2\2\u01c8\u01c9\5"+ - "j\66\2\u01c9\u01ca\7\5\2\2\u01ca\u01cb\5j\66\2\u01cb\u01cc\5\60\31\2\u01cc"+ - "\u01cd\7\4\2\2\u01cd\u01d0\3\2\2\2\u01ce\u01d0\5\62\32\2\u01cf\u01b0\3"+ - "\2\2\2\u01cf\u01b3\3\2\2\2\u01cf\u01b8\3\2\2\2\u01cf\u01be\3\2\2\2\u01cf"+ - "\u01c6\3\2\2\2\u01cf\u01ce\3\2\2\2\u01d0\u01d9\3\2\2\2\u01d1\u01d2\f\4"+ - "\2\2\u01d2\u01d3\7\n\2\2\u01d3\u01d8\5.\30\5\u01d4\u01d5\f\3\2\2\u01d5"+ - "\u01d6\7B\2\2\u01d6\u01d8\5.\30\4\u01d7\u01d1\3\2\2\2\u01d7\u01d4\3\2"+ - "\2\2\u01d8\u01db\3\2\2\2\u01d9\u01d7\3\2\2\2\u01d9\u01da\3\2\2\2\u01da"+ - "/\3\2\2\2\u01db\u01d9\3\2\2\2\u01dc\u01dd\7\5\2\2\u01dd\u01df\5j\66\2"+ - "\u01de\u01dc\3\2\2\2\u01df\u01e2\3\2\2\2\u01e0\u01de\3\2\2\2\u01e0\u01e1"+ - "\3\2\2\2\u01e1\61\3\2\2\2\u01e2\u01e0\3\2\2\2\u01e3\u01e5\5<\37\2\u01e4"+ - "\u01e6\5\64\33\2\u01e5\u01e4\3\2\2\2\u01e5\u01e6\3\2\2\2\u01e6\63\3\2"+ - "\2\2\u01e7\u01e9\7=\2\2\u01e8\u01e7\3\2\2\2\u01e8\u01e9\3\2\2\2\u01e9"+ - "\u01ea\3\2\2\2\u01ea\u01eb\7\16\2\2\u01eb\u01ec\5<\37\2\u01ec\u01ed\7"+ - "\n\2\2\u01ed\u01ee\5<\37\2\u01ee\u0216\3\2\2\2\u01ef\u01f1\7=\2\2\u01f0"+ - "\u01ef\3\2\2\2\u01f0\u01f1\3\2\2\2\u01f1\u01f2\3\2\2\2\u01f2\u01f3\7-"+ - "\2\2\u01f3\u01f4\7\3\2\2\u01f4\u01f9\5<\37\2\u01f5\u01f6\7\5\2\2\u01f6"+ - "\u01f8\5<\37\2\u01f7\u01f5\3\2\2\2\u01f8\u01fb\3\2\2\2\u01f9\u01f7\3\2"+ - "\2\2\u01f9\u01fa\3\2\2\2\u01fa\u01fc\3\2\2\2\u01fb\u01f9\3\2\2\2\u01fc"+ - "\u01fd\7\4\2\2\u01fd\u0216\3\2\2\2\u01fe\u0200\7=\2\2\u01ff\u01fe\3\2"+ - "\2\2\u01ff\u0200\3\2\2\2\u0200\u0201\3\2\2\2\u0201\u0202\7-\2\2\u0202"+ - "\u0203\7\3\2\2\u0203\u0204\5\b\5\2\u0204\u0205\7\4\2\2\u0205\u0216\3\2"+ - "\2\2\u0206\u0208\7=\2\2\u0207\u0206\3\2\2\2\u0207\u0208\3\2\2\2\u0208"+ - "\u0209\3\2\2\2\u0209\u020a\7\64\2\2\u020a\u0216\58\35\2\u020b\u020d\7"+ - "=\2\2\u020c\u020b\3\2\2\2\u020c\u020d\3\2\2\2\u020d\u020e\3\2\2\2\u020e"+ - "\u020f\7I\2\2\u020f\u0216\5j\66\2\u0210\u0212\7\60\2\2\u0211\u0213\7="+ - "\2\2\u0212\u0211\3\2\2\2\u0212\u0213\3\2\2\2\u0213\u0214\3\2\2\2\u0214"+ - "\u0216\7>\2\2\u0215\u01e8\3\2\2\2\u0215\u01f0\3\2\2\2\u0215\u01ff\3\2"+ - "\2\2\u0215\u0207\3\2\2\2\u0215\u020c\3\2\2\2\u0215\u0210\3\2\2\2\u0216"+ - "\65\3\2\2\2\u0217\u0218\7\64\2\2\u0218\u0219\58\35\2\u0219\67\3\2\2\2"+ - "\u021a\u021c\5j\66\2\u021b\u021d\5:\36\2\u021c\u021b\3\2\2\2\u021c\u021d"+ - "\3\2\2\2\u021d9\3\2\2\2\u021e\u021f\7\35\2\2\u021f\u0225\5j\66\2\u0220"+ - "\u0221\7^\2\2\u0221\u0222\5j\66\2\u0222\u0223\7e\2\2\u0223\u0225\3\2\2"+ - "\2\u0224\u021e\3\2\2\2\u0224\u0220\3\2\2\2\u0225;\3\2\2\2\u0226\u0227"+ - "\b\37\1\2\u0227\u022b\5> \2\u0228\u0229\t\7\2\2\u0229\u022b\5<\37\7\u022a"+ - "\u0226\3\2\2\2\u022a\u0228\3\2\2\2\u022b\u023b\3\2\2\2\u022c\u022d\f\6"+ - "\2\2\u022d\u022e\t\f\2\2\u022e\u023a\5<\37\7\u022f\u0230\f\5\2\2\u0230"+ - "\u0231\t\7\2\2\u0231\u023a\5<\37\6\u0232\u0233\f\4\2\2\u0233\u0234\5T"+ - "+\2\u0234\u0235\5<\37\5\u0235\u023a\3\2\2\2\u0236\u0237\f\3\2\2\u0237"+ - "\u0238\7r\2\2\u0238\u023a\5\\/\2\u0239\u022c\3\2\2\2\u0239\u022f\3\2\2"+ - "\2\u0239\u0232\3\2\2\2\u0239\u0236\3\2\2\2\u023a\u023d\3\2\2\2\u023b\u0239"+ - "\3\2\2\2\u023b\u023c\3\2\2\2\u023c=\3\2\2\2\u023d\u023b\3\2\2\2\u023e"+ - "\u0253\5B\"\2\u023f\u0253\5H%\2\u0240\u0253\5@!\2\u0241\u0253\5R*\2\u0242"+ - "\u0243\5^\60\2\u0243\u0244\7t\2\2\u0244\u0246\3\2\2\2\u0245\u0242\3\2"+ - "\2\2\u0245\u0246\3\2\2\2\u0246\u0247\3\2\2\2\u0247\u0253\7o\2\2\u0248"+ - "\u0253\5L\'\2\u0249\u024a\7\3\2\2\u024a\u024b\5\b\5\2\u024b\u024c\7\4"+ - "\2\2\u024c\u0253\3\2\2\2\u024d\u0253\5^\60\2\u024e\u024f\7\3\2\2\u024f"+ - "\u0250\5,\27\2\u0250\u0251\7\4\2\2\u0251\u0253\3\2\2\2\u0252\u023e\3\2"+ - "\2\2\u0252\u023f\3\2\2\2\u0252\u0240\3\2\2\2\u0252\u0241\3\2\2\2\u0252"+ - "\u0245\3\2\2\2\u0252\u0248\3\2\2\2\u0252\u0249\3\2\2\2\u0252\u024d\3\2"+ - "\2\2\u0252\u024e\3\2\2\2\u0253?\3\2\2\2\u0254\u0257\7\25\2\2\u0255\u0256"+ - "\7\3\2\2\u0256\u0258\7\4\2\2\u0257\u0255\3\2\2\2\u0257\u0258\3\2\2\2\u0258"+ - "\u0262\3\2\2\2\u0259\u025f\7\26\2\2\u025a\u025c\7\3\2\2\u025b\u025d\7"+ - "w\2\2\u025c\u025b\3\2\2\2\u025c\u025d\3\2\2\2\u025d\u025e\3\2\2\2\u025e"+ - "\u0260\7\4\2\2\u025f\u025a\3\2\2\2\u025f\u0260\3\2\2\2\u0260\u0262\3\2"+ - "\2\2\u0261\u0254\3\2\2\2\u0261\u0259\3\2\2\2\u0262A\3\2\2\2\u0263\u026e"+ - "\5D#\2\u0264\u0265\7_\2\2\u0265\u0266\5D#\2\u0266\u0267\7e\2\2\u0267\u026e"+ - "\3\2\2\2\u0268\u026e\5F$\2\u0269\u026a\7_\2\2\u026a\u026b\5F$\2\u026b"+ - "\u026c\7e\2\2\u026c\u026e\3\2\2\2\u026d\u0263\3\2\2\2\u026d\u0264\3\2"+ - "\2\2\u026d\u0268\3\2\2\2\u026d\u0269\3\2\2\2\u026eC\3\2\2\2\u026f\u0270"+ - "\7\20\2\2\u0270\u0271\7\3\2\2\u0271\u0272\5,\27\2\u0272\u0273\7\f\2\2"+ - "\u0273\u0274\5\\/\2\u0274\u0275\7\4\2\2\u0275E\3\2\2\2\u0276\u0277\7\24"+ - "\2\2\u0277\u0278\7\3\2\2\u0278\u0279\5,\27\2\u0279\u027a\7\5\2\2\u027a"+ - "\u027b\5\\/\2\u027b\u027c\7\4\2\2\u027cG\3\2\2\2\u027d\u0283\5J&\2\u027e"+ - "\u027f\7_\2\2\u027f\u0280\5J&\2\u0280\u0281\7e\2\2\u0281\u0283\3\2\2\2"+ - "\u0282\u027d\3\2\2\2\u0282\u027e\3\2\2\2\u0283I\3\2\2\2\u0284\u0285\7"+ - "!\2\2\u0285\u0286\7\3\2\2\u0286\u0287\5`\61\2\u0287\u0288\7%\2\2\u0288"+ - "\u0289\5<\37\2\u0289\u028a\7\4\2\2\u028aK\3\2\2\2\u028b\u0291\5N(\2\u028c"+ - "\u028d\7_\2\2\u028d\u028e\5N(\2\u028e\u028f\7e\2\2\u028f\u0291\3\2\2\2"+ - "\u0290\u028b\3\2\2\2\u0290\u028c\3\2\2\2\u0291M\3\2\2\2\u0292\u0293\5"+ - "P)\2\u0293\u029f\7\3\2\2\u0294\u0296\5\36\20\2\u0295\u0294\3\2\2\2\u0295"+ - "\u0296\3\2\2\2\u0296\u0297\3\2\2\2\u0297\u029c\5,\27\2\u0298\u0299\7\5"+ - "\2\2\u0299\u029b\5,\27\2\u029a\u0298\3\2\2\2\u029b\u029e\3\2\2\2\u029c"+ - "\u029a\3\2\2\2\u029c\u029d\3\2\2\2\u029d\u02a0\3\2\2\2\u029e\u029c\3\2"+ - "\2\2\u029f\u0295\3\2\2\2\u029f\u02a0\3\2\2\2\u02a0\u02a1\3\2\2\2\u02a1"+ - "\u02a2\7\4\2\2\u02a2O\3\2\2\2\u02a3\u02a7\7\63\2\2\u02a4\u02a7\7H\2\2"+ - "\u02a5\u02a7\5`\61\2\u02a6\u02a3\3\2\2\2\u02a6\u02a4\3\2\2\2\u02a6\u02a5"+ - "\3\2\2\2\u02a7Q\3\2\2\2\u02a8\u02c3\7>\2\2\u02a9\u02c3\5X-\2\u02aa\u02c3"+ - "\5h\65\2\u02ab\u02c3\5V,\2\u02ac\u02ae\7v\2\2\u02ad\u02ac\3\2\2\2\u02ae"+ - "\u02af\3\2\2\2\u02af\u02ad\3\2\2\2\u02af\u02b0\3\2\2\2\u02b0\u02c3\3\2"+ - "\2\2\u02b1\u02c3\7u\2\2\u02b2\u02b3\7a\2\2\u02b3\u02b4\5j\66\2\u02b4\u02b5"+ - "\7e\2\2\u02b5\u02c3\3\2\2\2\u02b6\u02b7\7b\2\2\u02b7\u02b8\5j\66\2\u02b8"+ - "\u02b9\7e\2\2\u02b9\u02c3\3\2\2\2\u02ba\u02bb\7c\2\2\u02bb\u02bc\5j\66"+ - "\2\u02bc\u02bd\7e\2\2\u02bd\u02c3\3\2\2\2\u02be\u02bf\7d\2\2\u02bf\u02c0"+ - "\5j\66\2\u02c0\u02c1\7e\2\2\u02c1\u02c3\3\2\2\2\u02c2\u02a8\3\2\2\2\u02c2"+ - "\u02a9\3\2\2\2\u02c2\u02aa\3\2\2\2\u02c2\u02ab\3\2\2\2\u02c2\u02ad\3\2"+ - "\2\2\u02c2\u02b1\3\2\2\2\u02c2\u02b2\3\2\2\2\u02c2\u02b6\3\2\2\2\u02c2"+ - "\u02ba\3\2\2\2\u02c2\u02be\3\2\2\2\u02c3S\3\2\2\2\u02c4\u02c5\t\r\2\2"+ - "\u02c5U\3\2\2\2\u02c6\u02c7\t\16\2\2\u02c7W\3\2\2\2\u02c8\u02ca\7/\2\2"+ - "\u02c9\u02cb\t\7\2\2\u02ca\u02c9\3\2\2\2\u02ca\u02cb\3\2\2\2\u02cb\u02ce"+ - "\3\2\2\2\u02cc\u02cf\5h\65\2\u02cd\u02cf\5j\66\2\u02ce\u02cc\3\2\2\2\u02ce"+ - "\u02cd\3\2\2\2\u02cf\u02d0\3\2\2\2\u02d0\u02d3\5Z.\2\u02d1\u02d2\7U\2"+ - "\2\u02d2\u02d4\5Z.\2\u02d3\u02d1\3\2\2\2\u02d3\u02d4\3\2\2\2\u02d4Y\3"+ - "\2\2\2\u02d5\u02d6\t\17\2\2\u02d6[\3\2\2\2\u02d7\u02d8\5`\61\2\u02d8]"+ - "\3\2\2\2\u02d9\u02da\5`\61\2\u02da\u02db\7t\2\2\u02db\u02dd\3\2\2\2\u02dc"+ - "\u02d9\3\2\2\2\u02dd\u02e0\3\2\2\2\u02de\u02dc\3\2\2\2\u02de\u02df\3\2"+ - "\2\2\u02df\u02e1\3\2\2\2\u02e0\u02de\3\2\2\2\u02e1\u02e2\5`\61\2\u02e2"+ - "_\3\2\2\2\u02e3\u02e6\5d\63\2\u02e4\u02e6\5f\64\2\u02e5\u02e3\3\2\2\2"+ - "\u02e5\u02e4\3\2\2\2\u02e6a\3\2\2\2\u02e7\u02e8\5`\61\2\u02e8\u02e9\7"+ - "\6\2\2\u02e9\u02eb\3\2\2\2\u02ea\u02e7\3\2\2\2\u02ea\u02eb\3\2\2\2\u02eb"+ - "\u02ec\3\2\2\2\u02ec\u02f4\7{\2\2\u02ed\u02ee\5`\61\2\u02ee\u02ef\7\6"+ - "\2\2\u02ef\u02f1\3\2\2\2\u02f0\u02ed\3\2\2\2\u02f0\u02f1\3\2\2\2\u02f1"+ - "\u02f2\3\2\2\2\u02f2\u02f4\5`\61\2\u02f3\u02ea\3\2\2\2\u02f3\u02f0\3\2"+ - "\2\2\u02f4c\3\2\2\2\u02f5\u02f8\7|\2\2\u02f6\u02f8\7}\2\2\u02f7\u02f5"+ - "\3\2\2\2\u02f7\u02f6\3\2\2\2\u02f8e\3\2\2\2\u02f9\u02fd\7y\2\2\u02fa\u02fd"+ - "\5l\67\2\u02fb\u02fd\7z\2\2\u02fc\u02f9\3\2\2\2\u02fc\u02fa\3\2\2\2\u02fc"+ - "\u02fb\3\2\2\2\u02fdg\3\2\2\2\u02fe\u0301\7x\2\2\u02ff\u0301\7w\2\2\u0300"+ - "\u02fe\3\2\2\2\u0300\u02ff\3\2\2\2\u0301i\3\2\2\2\u0302\u0303\t\20\2\2"+ - "\u0303k\3\2\2\2\u0304\u0305\t\21\2\2\u0305m\3\2\2\2j}\177\u0083\u008c"+ + "\n\37\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3\37\7\37\u0237\n\37"+ + "\f\37\16\37\u023a\13\37\3 \3 \3 \3 \3 \3 \3 \3 \5 \u0244\n \3 \3 \3 \3"+ + " \3 \3 \3 \3 \3 \3 \3 \5 \u0251\n \3 \3 \3 \7 \u0256\n \f \16 \u0259\13"+ + " \3!\3!\3!\5!\u025e\n!\3!\3!\3!\5!\u0263\n!\3!\5!\u0266\n!\5!\u0268\n"+ + "!\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\5\"\u0274\n\"\3#\3#\3#\3#\3"+ + "#\3#\3#\3$\3$\3$\3$\3$\3$\3$\3%\3%\3%\3%\3%\5%\u0289\n%\3&\3&\3&\3&\3"+ + "&\3&\3&\3\'\3\'\3\'\3\'\3\'\5\'\u0297\n\'\3(\3(\3(\5(\u029c\n(\3(\3(\3"+ + "(\7(\u02a1\n(\f(\16(\u02a4\13(\5(\u02a6\n(\3(\3(\3)\3)\3)\5)\u02ad\n)"+ + "\3*\3*\3*\3*\3*\6*\u02b4\n*\r*\16*\u02b5\3*\3*\3*\3*\3*\3*\3*\3*\3*\3"+ + "*\3*\3*\3*\3*\3*\3*\3*\5*\u02c9\n*\3+\3+\3,\3,\3-\3-\5-\u02d1\n-\3-\3"+ + "-\5-\u02d5\n-\3-\3-\3-\5-\u02da\n-\3.\3.\3/\3/\3\60\3\60\3\60\7\60\u02e3"+ + "\n\60\f\60\16\60\u02e6\13\60\3\60\3\60\3\61\3\61\5\61\u02ec\n\61\3\62"+ + "\3\62\3\62\5\62\u02f1\n\62\3\62\3\62\3\62\3\62\5\62\u02f7\n\62\3\62\5"+ + "\62\u02fa\n\62\3\63\3\63\5\63\u02fe\n\63\3\64\3\64\3\64\5\64\u0303\n\64"+ + "\3\65\3\65\5\65\u0307\n\65\3\66\3\66\3\67\3\67\3\67\2\5.<>8\2\4\6\b\n"+ + "\f\16\20\22\24\26\30\32\34\36 \"$&(*,.\60\62\64\668:<>@BDFHJLNPRTVXZ\\"+ + "^`bdfhjl\2\22\b\2\7\7\t\t\36\36\66\66AAEE\4\2((SS\4\2\t\tAA\4\2%%--\3"+ + "\2\32\33\3\2mn\4\2\7\7ww\4\2\r\r\32\32\4\2##\62\62\4\2\7\7\34\34\3\2o"+ + "q\3\2fl\4\2\"\"TT\7\2\27\30+,8;LM\\]\3\2uv\30\2\b\t\22\23\27\27\31\31"+ + "\36\36 #$&(++//\62\62\65\6688::AAEGILOPRSVWYY\\\\\u036b\2n\3\2\2\2\4"+ + "q\3\2\2\2\6\u00d9\3\2\2\2\b\u00e4\3\2\2\2\n\u00e8\3\2\2\2\f\u00fd\3\2"+ + "\2\2\16\u0104\3\2\2\2\20\u0106\3\2\2\2\22\u010e\3\2\2\2\24\u012a\3\2\2"+ + "\2\26\u0134\3\2\2\2\30\u013e\3\2\2\2\32\u014d\3\2\2\2\34\u014f\3\2\2\2"+ + "\36\u0155\3\2\2\2 \u0157\3\2\2\2\"\u015e\3\2\2\2$\u0170\3\2\2\2&\u0181"+ + "\3\2\2\2(\u0191\3\2\2\2*\u01ac\3\2\2\2,\u01ae\3\2\2\2.\u01cf\3\2\2\2\60"+ + "\u01e0\3\2\2\2\62\u01e3\3\2\2\2\64\u0215\3\2\2\2\66\u0217\3\2\2\28\u021a"+ + "\3\2\2\2:\u0224\3\2\2\2<\u022a\3\2\2\2>\u0250\3\2\2\2@\u0267\3\2\2\2B"+ + "\u0273\3\2\2\2D\u0275\3\2\2\2F\u027c\3\2\2\2H\u0288\3\2\2\2J\u028a\3\2"+ + "\2\2L\u0296\3\2\2\2N\u0298\3\2\2\2P\u02ac\3\2\2\2R\u02c8\3\2\2\2T\u02ca"+ + "\3\2\2\2V\u02cc\3\2\2\2X\u02ce\3\2\2\2Z\u02db\3\2\2\2\\\u02dd\3\2\2\2"+ + "^\u02e4\3\2\2\2`\u02eb\3\2\2\2b\u02f9\3\2\2\2d\u02fd\3\2\2\2f\u0302\3"+ + "\2\2\2h\u0306\3\2\2\2j\u0308\3\2\2\2l\u030a\3\2\2\2no\5\6\4\2op\7\2\2"+ + "\3p\3\3\2\2\2qr\5,\27\2rs\7\2\2\3s\5\3\2\2\2t\u00da\5\b\5\2u\u0083\7 "+ + "\2\2v\177\7\3\2\2wx\7G\2\2x~\t\2\2\2yz\7$\2\2z~\t\3\2\2{|\7Y\2\2|~\5V"+ + ",\2}w\3\2\2\2}y\3\2\2\2}{\3\2\2\2~\u0081\3\2\2\2\177}\3\2\2\2\177\u0080"+ + "\3\2\2\2\u0080\u0082\3\2\2\2\u0081\177\3\2\2\2\u0082\u0084\7\4\2\2\u0083"+ + "v\3\2\2\2\u0083\u0084\3\2\2\2\u0084\u0085\3\2\2\2\u0085\u00da\5\6\4\2"+ + "\u0086\u0092\7\31\2\2\u0087\u008e\7\3\2\2\u0088\u0089\7G\2\2\u0089\u008d"+ + "\t\4\2\2\u008a\u008b\7$\2\2\u008b\u008d\t\3\2\2\u008c\u0088\3\2\2\2\u008c"+ + "\u008a\3\2\2\2\u008d\u0090\3\2\2\2\u008e\u008c\3\2\2\2\u008e\u008f\3\2"+ + "\2\2\u008f\u0091\3\2\2\2\u0090\u008e\3\2\2\2\u0091\u0093\7\4\2\2\u0092"+ + "\u0087\3\2\2\2\u0092\u0093\3\2\2\2\u0093\u0094\3\2\2\2\u0094\u00da\5\6"+ + "\4\2\u0095\u0096\7O\2\2\u0096\u0099\7R\2\2\u0097\u009a\5\66\34\2\u0098"+ + "\u009a\5b\62\2\u0099\u0097\3\2\2\2\u0099\u0098\3\2\2\2\u0099\u009a\3\2"+ + "\2\2\u009a\u00da\3\2\2\2\u009b\u009c\7O\2\2\u009c\u009d\7\23\2\2\u009d"+ + "\u00a0\t\5\2\2\u009e\u00a1\5\66\34\2\u009f\u00a1\5b\62\2\u00a0\u009e\3"+ + "\2\2\2\u00a0\u009f\3\2\2\2\u00a1\u00da\3\2\2\2\u00a2\u00a5\t\6\2\2\u00a3"+ + "\u00a6\5\66\34\2\u00a4\u00a6\5b\62\2\u00a5\u00a3\3\2\2\2\u00a5\u00a4\3"+ + "\2\2\2\u00a6\u00da\3\2\2\2\u00a7\u00a8\7O\2\2\u00a8\u00aa\7\'\2\2\u00a9"+ + "\u00ab\5\66\34\2\u00aa\u00a9\3\2\2\2\u00aa\u00ab\3\2\2\2\u00ab\u00da\3"+ + "\2\2\2\u00ac\u00ad\7O\2\2\u00ad\u00da\7K\2\2\u00ae\u00af\7P\2\2\u00af"+ + "\u00b2\7R\2\2\u00b0\u00b1\7\21\2\2\u00b1\u00b3\5\66\34\2\u00b2\u00b0\3"+ + "\2\2\2\u00b2\u00b3\3\2\2\2\u00b3\u00b6\3\2\2\2\u00b4\u00b7\5\66\34\2\u00b5"+ + "\u00b7\5b\62\2\u00b6\u00b4\3\2\2\2\u00b6\u00b5\3\2\2\2\u00b6\u00b7\3\2"+ + "\2\2\u00b7\u00c1\3\2\2\2\u00b8\u00b9\7V\2\2\u00b9\u00be\5j\66\2\u00ba"+ + "\u00bb\7\5\2\2\u00bb\u00bd\5j\66\2\u00bc\u00ba\3\2\2\2\u00bd\u00c0\3\2"+ + "\2\2\u00be\u00bc\3\2\2\2\u00be\u00bf\3\2\2\2\u00bf\u00c2\3\2\2\2\u00c0"+ + "\u00be\3\2\2\2\u00c1\u00b8\3\2\2\2\u00c1\u00c2\3\2\2\2\u00c2\u00da\3\2"+ + "\2\2\u00c3\u00c4\7P\2\2\u00c4\u00c7\7\23\2\2\u00c5\u00c6\7\21\2\2\u00c6"+ + "\u00c8\5j\66\2\u00c7\u00c5\3\2\2\2\u00c7\u00c8\3\2\2\2\u00c8\u00cc\3\2"+ + "\2\2\u00c9\u00ca\7Q\2\2\u00ca\u00cd\5\66\34\2\u00cb\u00cd\5b\62\2\u00cc"+ + "\u00c9\3\2\2\2\u00cc\u00cb\3\2\2\2\u00cc\u00cd\3\2\2\2\u00cd\u00cf\3\2"+ + "\2\2\u00ce\u00d0\5\66\34\2\u00cf\u00ce\3\2\2\2\u00cf\u00d0\3\2\2\2\u00d0"+ + "\u00da\3\2\2\2\u00d1\u00d2\7P\2\2\u00d2\u00d7\7W\2\2\u00d3\u00d5\t\7\2"+ + "\2\u00d4\u00d3\3\2\2\2\u00d4\u00d5\3\2\2\2\u00d5\u00d6\3\2\2\2\u00d6\u00d8"+ + "\5h\65\2\u00d7\u00d4\3\2\2\2\u00d7\u00d8\3\2\2\2\u00d8\u00da\3\2\2\2\u00d9"+ + "t\3\2\2\2\u00d9u\3\2\2\2\u00d9\u0086\3\2\2\2\u00d9\u0095\3\2\2\2\u00d9"+ + "\u009b\3\2\2\2\u00d9\u00a2\3\2\2\2\u00d9\u00a7\3\2\2\2\u00d9\u00ac\3\2"+ + "\2\2\u00d9\u00ae\3\2\2\2\u00d9\u00c3\3\2\2\2\u00d9\u00d1\3\2\2\2\u00da"+ + "\7\3\2\2\2\u00db\u00dc\7[\2\2\u00dc\u00e1\5\34\17\2\u00dd\u00de\7\5\2"+ + "\2\u00de\u00e0\5\34\17\2\u00df\u00dd\3\2\2\2\u00e0\u00e3\3\2\2\2\u00e1"+ + "\u00df\3\2\2\2\u00e1\u00e2\3\2\2\2\u00e2\u00e5\3\2\2\2\u00e3\u00e1\3\2"+ + "\2\2\u00e4\u00db\3\2\2\2\u00e4\u00e5\3\2\2\2\u00e5\u00e6\3\2\2\2\u00e6"+ + "\u00e7\5\n\6\2\u00e7\t\3\2\2\2\u00e8\u00f3\5\16\b\2\u00e9\u00ea\7C\2\2"+ + "\u00ea\u00eb\7\17\2\2\u00eb\u00f0\5\20\t\2\u00ec\u00ed\7\5\2\2\u00ed\u00ef"+ + "\5\20\t\2\u00ee\u00ec\3\2\2\2\u00ef\u00f2\3\2\2\2\u00f0\u00ee\3\2\2\2"+ + "\u00f0\u00f1\3\2\2\2\u00f1\u00f4\3\2\2\2\u00f2\u00f0\3\2\2\2\u00f3\u00e9"+ + "\3\2\2\2\u00f3\u00f4\3\2\2\2\u00f4\u00f6\3\2\2\2\u00f5\u00f7\5\f\7\2\u00f6"+ + "\u00f5\3\2\2\2\u00f6\u00f7\3\2\2\2\u00f7\13\3\2\2\2\u00f8\u00f9\7\65\2"+ + "\2\u00f9\u00fe\t\b\2\2\u00fa\u00fb\7`\2\2\u00fb\u00fc\t\b\2\2\u00fc\u00fe"+ + "\7e\2\2\u00fd\u00f8\3\2\2\2\u00fd\u00fa\3\2\2\2\u00fe\r\3\2\2\2\u00ff"+ + "\u0105\5\22\n\2\u0100\u0101\7\3\2\2\u0101\u0102\5\n\6\2\u0102\u0103\7"+ + "\4\2\2\u0103\u0105\3\2\2\2\u0104\u00ff\3\2\2\2\u0104\u0100\3\2\2\2\u0105"+ + "\17\3\2\2\2\u0106\u0108\5,\27\2\u0107\u0109\t\t\2\2\u0108\u0107\3\2\2"+ + "\2\u0108\u0109\3\2\2\2\u0109\u010c\3\2\2\2\u010a\u010b\7?\2\2\u010b\u010d"+ + "\t\n\2\2\u010c\u010a\3\2\2\2\u010c\u010d\3\2\2\2\u010d\21\3\2\2\2\u010e"+ + "\u0110\7N\2\2\u010f\u0111\5\36\20\2\u0110\u010f\3\2\2\2\u0110\u0111\3"+ + "\2\2\2\u0111\u0112\3\2\2\2\u0112\u0117\5 \21\2\u0113\u0114\7\5\2\2\u0114"+ + "\u0116\5 \21\2\u0115\u0113\3\2\2\2\u0116\u0119\3\2\2\2\u0117\u0115\3\2"+ + "\2\2\u0117\u0118\3\2\2\2\u0118\u011b\3\2\2\2\u0119\u0117\3\2\2\2\u011a"+ + "\u011c\5\24\13\2\u011b\u011a\3\2\2\2\u011b\u011c\3\2\2\2\u011c\u011f\3"+ + "\2\2\2\u011d\u011e\7Z\2\2\u011e\u0120\5.\30\2\u011f\u011d\3\2\2\2\u011f"+ + "\u0120\3\2\2\2\u0120\u0124\3\2\2\2\u0121\u0122\7)\2\2\u0122\u0123\7\17"+ + "\2\2\u0123\u0125\5\26\f\2\u0124\u0121\3\2\2\2\u0124\u0125\3\2\2\2\u0125"+ + "\u0128\3\2\2\2\u0126\u0127\7*\2\2\u0127\u0129\5.\30\2\u0128\u0126\3\2"+ + "\2\2\u0128\u0129\3\2\2\2\u0129\23\3\2\2\2\u012a\u012b\7%\2\2\u012b\u0130"+ + "\5\"\22\2\u012c\u012d\7\5\2\2\u012d\u012f\5\"\22\2\u012e\u012c\3\2\2\2"+ + "\u012f\u0132\3\2\2\2\u0130\u012e\3\2\2\2\u0130\u0131\3\2\2\2\u0131\25"+ + "\3\2\2\2\u0132\u0130\3\2\2\2\u0133\u0135\5\36\20\2\u0134\u0133\3\2\2\2"+ + "\u0134\u0135\3\2\2\2\u0135\u0136\3\2\2\2\u0136\u013b\5\30\r\2\u0137\u0138"+ + "\7\5\2\2\u0138\u013a\5\30\r\2\u0139\u0137\3\2\2\2\u013a\u013d\3\2\2\2"+ + "\u013b\u0139\3\2\2\2\u013b\u013c\3\2\2\2\u013c\27\3\2\2\2\u013d\u013b"+ + "\3\2\2\2\u013e\u013f\5\32\16\2\u013f\31\3\2\2\2\u0140\u0149\7\3\2\2\u0141"+ + "\u0146\5,\27\2\u0142\u0143\7\5\2\2\u0143\u0145\5,\27\2\u0144\u0142\3\2"+ + "\2\2\u0145\u0148\3\2\2\2\u0146\u0144\3\2\2\2\u0146\u0147\3\2\2\2\u0147"+ + "\u014a\3\2\2\2\u0148\u0146\3\2\2\2\u0149\u0141\3\2\2\2\u0149\u014a\3\2"+ + "\2\2\u014a\u014b\3\2\2\2\u014b\u014e\7\4\2\2\u014c\u014e\5,\27\2\u014d"+ + "\u0140\3\2\2\2\u014d\u014c\3\2\2\2\u014e\33\3\2\2\2\u014f\u0150\5`\61"+ + "\2\u0150\u0151\7\f\2\2\u0151\u0152\7\3\2\2\u0152\u0153\5\n\6\2\u0153\u0154"+ + "\7\4\2\2\u0154\35\3\2\2\2\u0155\u0156\t\13\2\2\u0156\37\3\2\2\2\u0157"+ + "\u015c\5,\27\2\u0158\u015a\7\f\2\2\u0159\u0158\3\2\2\2\u0159\u015a\3\2"+ + "\2\2\u015a\u015b\3\2\2\2\u015b\u015d\5`\61\2\u015c\u0159\3\2\2\2\u015c"+ + "\u015d\3\2\2\2\u015d!\3\2\2\2\u015e\u0162\5*\26\2\u015f\u0161\5$\23\2"+ + "\u0160\u015f\3\2\2\2\u0161\u0164\3\2\2\2\u0162\u0160\3\2\2\2\u0162\u0163"+ + "\3\2\2\2\u0163#\3\2\2\2\u0164\u0162\3\2\2\2\u0165\u0166\5&\24\2\u0166"+ + "\u0167\7\61\2\2\u0167\u0169\5*\26\2\u0168\u016a\5(\25\2\u0169\u0168\3"+ + "\2\2\2\u0169\u016a\3\2\2\2\u016a\u0171\3\2\2\2\u016b\u016c\7<\2\2\u016c"+ + "\u016d\5&\24\2\u016d\u016e\7\61\2\2\u016e\u016f\5*\26\2\u016f\u0171\3"+ + "\2\2\2\u0170\u0165\3\2\2\2\u0170\u016b\3\2\2\2\u0171%\3\2\2\2\u0172\u0174"+ + "\7.\2\2\u0173\u0172\3\2\2\2\u0173\u0174\3\2\2\2\u0174\u0182\3\2\2\2\u0175"+ + "\u0177\7\63\2\2\u0176\u0178\7D\2\2\u0177\u0176\3\2\2\2\u0177\u0178\3\2"+ + "\2\2\u0178\u0182\3\2\2\2\u0179\u017b\7H\2\2\u017a\u017c\7D\2\2\u017b\u017a"+ + "\3\2\2\2\u017b\u017c\3\2\2\2\u017c\u0182\3\2\2\2\u017d\u017f\7&\2\2\u017e"+ + "\u0180\7D\2\2\u017f\u017e\3\2\2\2\u017f\u0180\3\2\2\2\u0180\u0182\3\2"+ + "\2\2\u0181\u0173\3\2\2\2\u0181\u0175\3\2\2\2\u0181\u0179\3\2\2\2\u0181"+ + "\u017d\3\2\2\2\u0182\'\3\2\2\2\u0183\u0184\7@\2\2\u0184\u0192\5.\30\2"+ + "\u0185\u0186\7X\2\2\u0186\u0187\7\3\2\2\u0187\u018c\5`\61\2\u0188\u0189"+ + "\7\5\2\2\u0189\u018b\5`\61\2\u018a\u0188\3\2\2\2\u018b\u018e\3\2\2\2\u018c"+ + "\u018a\3\2\2\2\u018c\u018d\3\2\2\2\u018d\u018f\3\2\2\2\u018e\u018c\3\2"+ + "\2\2\u018f\u0190\7\4\2\2\u0190\u0192\3\2\2\2\u0191\u0183\3\2\2\2\u0191"+ + "\u0185\3\2\2\2\u0192)\3\2\2\2\u0193\u0198\5b\62\2\u0194\u0196\7\f\2\2"+ + "\u0195\u0194\3\2\2\2\u0195\u0196\3\2\2\2\u0196\u0197\3\2\2\2\u0197\u0199"+ + "\5^\60\2\u0198\u0195\3\2\2\2\u0198\u0199\3\2\2\2\u0199\u01ad\3\2\2\2\u019a"+ + "\u019b\7\3\2\2\u019b\u019c\5\n\6\2\u019c\u01a1\7\4\2\2\u019d\u019f\7\f"+ + "\2\2\u019e\u019d\3\2\2\2\u019e\u019f\3\2\2\2\u019f\u01a0\3\2\2\2\u01a0"+ + "\u01a2\5^\60\2\u01a1\u019e\3\2\2\2\u01a1\u01a2\3\2\2\2\u01a2\u01ad\3\2"+ + "\2\2\u01a3\u01a4\7\3\2\2\u01a4\u01a5\5\"\22\2\u01a5\u01aa\7\4\2\2\u01a6"+ + "\u01a8\7\f\2\2\u01a7\u01a6\3\2\2\2\u01a7\u01a8\3\2\2\2\u01a8\u01a9\3\2"+ + "\2\2\u01a9\u01ab\5^\60\2\u01aa\u01a7\3\2\2\2\u01aa\u01ab\3\2\2\2\u01ab"+ + "\u01ad\3\2\2\2\u01ac\u0193\3\2\2\2\u01ac\u019a\3\2\2\2\u01ac\u01a3\3\2"+ + "\2\2\u01ad+\3\2\2\2\u01ae\u01af\5.\30\2\u01af-\3\2\2\2\u01b0\u01b1\b\30"+ + "\1\2\u01b1\u01b2\7=\2\2\u01b2\u01d0\5.\30\n\u01b3\u01b4\7\37\2\2\u01b4"+ + "\u01b5\7\3\2\2\u01b5\u01b6\5\b\5\2\u01b6\u01b7\7\4\2\2\u01b7\u01d0\3\2"+ + "\2\2\u01b8\u01b9\7J\2\2\u01b9\u01ba\7\3\2\2\u01ba\u01bb\5j\66\2\u01bb"+ + "\u01bc\5\60\31\2\u01bc\u01bd\7\4\2\2\u01bd\u01d0\3\2\2\2\u01be\u01bf\7"+ + "\67\2\2\u01bf\u01c0\7\3\2\2\u01c0\u01c1\5^\60\2\u01c1\u01c2\7\5\2\2\u01c2"+ + "\u01c3\5j\66\2\u01c3\u01c4\5\60\31\2\u01c4\u01c5\7\4\2\2\u01c5\u01d0\3"+ + "\2\2\2\u01c6\u01c7\7\67\2\2\u01c7\u01c8\7\3\2\2\u01c8\u01c9\5j\66\2\u01c9"+ + "\u01ca\7\5\2\2\u01ca\u01cb\5j\66\2\u01cb\u01cc\5\60\31\2\u01cc\u01cd\7"+ + "\4\2\2\u01cd\u01d0\3\2\2\2\u01ce\u01d0\5\62\32\2\u01cf\u01b0\3\2\2\2\u01cf"+ + "\u01b3\3\2\2\2\u01cf\u01b8\3\2\2\2\u01cf\u01be\3\2\2\2\u01cf\u01c6\3\2"+ + "\2\2\u01cf\u01ce\3\2\2\2\u01d0\u01d9\3\2\2\2\u01d1\u01d2\f\4\2\2\u01d2"+ + "\u01d3\7\n\2\2\u01d3\u01d8\5.\30\5\u01d4\u01d5\f\3\2\2\u01d5\u01d6\7B"+ + "\2\2\u01d6\u01d8\5.\30\4\u01d7\u01d1\3\2\2\2\u01d7\u01d4\3\2\2\2\u01d8"+ + "\u01db\3\2\2\2\u01d9\u01d7\3\2\2\2\u01d9\u01da\3\2\2\2\u01da/\3\2\2\2"+ + "\u01db\u01d9\3\2\2\2\u01dc\u01dd\7\5\2\2\u01dd\u01df\5j\66\2\u01de\u01dc"+ + "\3\2\2\2\u01df\u01e2\3\2\2\2\u01e0\u01de\3\2\2\2\u01e0\u01e1\3\2\2\2\u01e1"+ + "\61\3\2\2\2\u01e2\u01e0\3\2\2\2\u01e3\u01e5\5<\37\2\u01e4\u01e6\5\64\33"+ + "\2\u01e5\u01e4\3\2\2\2\u01e5\u01e6\3\2\2\2\u01e6\63\3\2\2\2\u01e7\u01e9"+ + "\7=\2\2\u01e8\u01e7\3\2\2\2\u01e8\u01e9\3\2\2\2\u01e9\u01ea\3\2\2\2\u01ea"+ + "\u01eb\7\16\2\2\u01eb\u01ec\5<\37\2\u01ec\u01ed\7\n\2\2\u01ed\u01ee\5"+ + "<\37\2\u01ee\u0216\3\2\2\2\u01ef\u01f1\7=\2\2\u01f0\u01ef\3\2\2\2\u01f0"+ + "\u01f1\3\2\2\2\u01f1\u01f2\3\2\2\2\u01f2\u01f3\7-\2\2\u01f3\u01f4\7\3"+ + "\2\2\u01f4\u01f9\5<\37\2\u01f5\u01f6\7\5\2\2\u01f6\u01f8\5<\37\2\u01f7"+ + "\u01f5\3\2\2\2\u01f8\u01fb\3\2\2\2\u01f9\u01f7\3\2\2\2\u01f9\u01fa\3\2"+ + "\2\2\u01fa\u01fc\3\2\2\2\u01fb\u01f9\3\2\2\2\u01fc\u01fd\7\4\2\2\u01fd"+ + "\u0216\3\2\2\2\u01fe\u0200\7=\2\2\u01ff\u01fe\3\2\2\2\u01ff\u0200\3\2"+ + "\2\2\u0200\u0201\3\2\2\2\u0201\u0202\7-\2\2\u0202\u0203\7\3\2\2\u0203"+ + "\u0204\5\b\5\2\u0204\u0205\7\4\2\2\u0205\u0216\3\2\2\2\u0206\u0208\7="+ + "\2\2\u0207\u0206\3\2\2\2\u0207\u0208\3\2\2\2\u0208\u0209\3\2\2\2\u0209"+ + "\u020a\7\64\2\2\u020a\u0216\58\35\2\u020b\u020d\7=\2\2\u020c\u020b\3\2"+ + "\2\2\u020c\u020d\3\2\2\2\u020d\u020e\3\2\2\2\u020e\u020f\7I\2\2\u020f"+ + "\u0216\5j\66\2\u0210\u0212\7\60\2\2\u0211\u0213\7=\2\2\u0212\u0211\3\2"+ + "\2\2\u0212\u0213\3\2\2\2\u0213\u0214\3\2\2\2\u0214\u0216\7>\2\2\u0215"+ + "\u01e8\3\2\2\2\u0215\u01f0\3\2\2\2\u0215\u01ff\3\2\2\2\u0215\u0207\3\2"+ + "\2\2\u0215\u020c\3\2\2\2\u0215\u0210\3\2\2\2\u0216\65\3\2\2\2\u0217\u0218"+ + "\7\64\2\2\u0218\u0219\58\35\2\u0219\67\3\2\2\2\u021a\u021c\5j\66\2\u021b"+ + "\u021d\5:\36\2\u021c\u021b\3\2\2\2\u021c\u021d\3\2\2\2\u021d9\3\2\2\2"+ + "\u021e\u021f\7\35\2\2\u021f\u0225\5j\66\2\u0220\u0221\7^\2\2\u0221\u0222"+ + "\5j\66\2\u0222\u0223\7e\2\2\u0223\u0225\3\2\2\2\u0224\u021e\3\2\2\2\u0224"+ + "\u0220\3\2\2\2\u0225;\3\2\2\2\u0226\u0227\b\37\1\2\u0227\u022b\5> \2\u0228"+ + "\u0229\t\7\2\2\u0229\u022b\5<\37\6\u022a\u0226\3\2\2\2\u022a\u0228\3\2"+ + "\2\2\u022b\u0238\3\2\2\2\u022c\u022d\f\5\2\2\u022d\u022e\t\f\2\2\u022e"+ + "\u0237\5<\37\6\u022f\u0230\f\4\2\2\u0230\u0231\t\7\2\2\u0231\u0237\5<"+ + "\37\5\u0232\u0233\f\3\2\2\u0233\u0234\5T+\2\u0234\u0235\5<\37\4\u0235"+ + "\u0237\3\2\2\2\u0236\u022c\3\2\2\2\u0236\u022f\3\2\2\2\u0236\u0232\3\2"+ + "\2\2\u0237\u023a\3\2\2\2\u0238\u0236\3\2\2\2\u0238\u0239\3\2\2\2\u0239"+ + "=\3\2\2\2\u023a\u0238\3\2\2\2\u023b\u023c\b \1\2\u023c\u0251\5B\"\2\u023d"+ + "\u0251\5H%\2\u023e\u0251\5@!\2\u023f\u0251\5R*\2\u0240\u0241\5^\60\2\u0241"+ + "\u0242\7t\2\2\u0242\u0244\3\2\2\2\u0243\u0240\3\2\2\2\u0243\u0244\3\2"+ + "\2\2\u0244\u0245\3\2\2\2\u0245\u0251\7o\2\2\u0246\u0251\5L\'\2\u0247\u0248"+ + "\7\3\2\2\u0248\u0249\5\b\5\2\u0249\u024a\7\4\2\2\u024a\u0251\3\2\2\2\u024b"+ + "\u0251\5^\60\2\u024c\u024d\7\3\2\2\u024d\u024e\5,\27\2\u024e\u024f\7\4"+ + "\2\2\u024f\u0251\3\2\2\2\u0250\u023b\3\2\2\2\u0250\u023d\3\2\2\2\u0250"+ + "\u023e\3\2\2\2\u0250\u023f\3\2\2\2\u0250\u0243\3\2\2\2\u0250\u0246\3\2"+ + "\2\2\u0250\u0247\3\2\2\2\u0250\u024b\3\2\2\2\u0250\u024c\3\2\2\2\u0251"+ + "\u0257\3\2\2\2\u0252\u0253\f\13\2\2\u0253\u0254\7r\2\2\u0254\u0256\5\\"+ + "/\2\u0255\u0252\3\2\2\2\u0256\u0259\3\2\2\2\u0257\u0255\3\2\2\2\u0257"+ + "\u0258\3\2\2\2\u0258?\3\2\2\2\u0259\u0257\3\2\2\2\u025a\u025d\7\25\2\2"+ + "\u025b\u025c\7\3\2\2\u025c\u025e\7\4\2\2\u025d\u025b\3\2\2\2\u025d\u025e"+ + "\3\2\2\2\u025e\u0268\3\2\2\2\u025f\u0265\7\26\2\2\u0260\u0262\7\3\2\2"+ + "\u0261\u0263\7w\2\2\u0262\u0261\3\2\2\2\u0262\u0263\3\2\2\2\u0263\u0264"+ + "\3\2\2\2\u0264\u0266\7\4\2\2\u0265\u0260\3\2\2\2\u0265\u0266\3\2\2\2\u0266"+ + "\u0268\3\2\2\2\u0267\u025a\3\2\2\2\u0267\u025f\3\2\2\2\u0268A\3\2\2\2"+ + "\u0269\u0274\5D#\2\u026a\u026b\7_\2\2\u026b\u026c\5D#\2\u026c\u026d\7"+ + "e\2\2\u026d\u0274\3\2\2\2\u026e\u0274\5F$\2\u026f\u0270\7_\2\2\u0270\u0271"+ + "\5F$\2\u0271\u0272\7e\2\2\u0272\u0274\3\2\2\2\u0273\u0269\3\2\2\2\u0273"+ + "\u026a\3\2\2\2\u0273\u026e\3\2\2\2\u0273\u026f\3\2\2\2\u0274C\3\2\2\2"+ + "\u0275\u0276\7\20\2\2\u0276\u0277\7\3\2\2\u0277\u0278\5,\27\2\u0278\u0279"+ + "\7\f\2\2\u0279\u027a\5\\/\2\u027a\u027b\7\4\2\2\u027bE\3\2\2\2\u027c\u027d"+ + "\7\24\2\2\u027d\u027e\7\3\2\2\u027e\u027f\5,\27\2\u027f\u0280\7\5\2\2"+ + "\u0280\u0281\5\\/\2\u0281\u0282\7\4\2\2\u0282G\3\2\2\2\u0283\u0289\5J"+ + "&\2\u0284\u0285\7_\2\2\u0285\u0286\5J&\2\u0286\u0287\7e\2\2\u0287\u0289"+ + "\3\2\2\2\u0288\u0283\3\2\2\2\u0288\u0284\3\2\2\2\u0289I\3\2\2\2\u028a"+ + "\u028b\7!\2\2\u028b\u028c\7\3\2\2\u028c\u028d\5`\61\2\u028d\u028e\7%\2"+ + "\2\u028e\u028f\5<\37\2\u028f\u0290\7\4\2\2\u0290K\3\2\2\2\u0291\u0297"+ + "\5N(\2\u0292\u0293\7_\2\2\u0293\u0294\5N(\2\u0294\u0295\7e\2\2\u0295\u0297"+ + "\3\2\2\2\u0296\u0291\3\2\2\2\u0296\u0292\3\2\2\2\u0297M\3\2\2\2\u0298"+ + "\u0299\5P)\2\u0299\u02a5\7\3\2\2\u029a\u029c\5\36\20\2\u029b\u029a\3\2"+ + "\2\2\u029b\u029c\3\2\2\2\u029c\u029d\3\2\2\2\u029d\u02a2\5,\27\2\u029e"+ + "\u029f\7\5\2\2\u029f\u02a1\5,\27\2\u02a0\u029e\3\2\2\2\u02a1\u02a4\3\2"+ + "\2\2\u02a2\u02a0\3\2\2\2\u02a2\u02a3\3\2\2\2\u02a3\u02a6\3\2\2\2\u02a4"+ + "\u02a2\3\2\2\2\u02a5\u029b\3\2\2\2\u02a5\u02a6\3\2\2\2\u02a6\u02a7\3\2"+ + "\2\2\u02a7\u02a8\7\4\2\2\u02a8O\3\2\2\2\u02a9\u02ad\7\63\2\2\u02aa\u02ad"+ + "\7H\2\2\u02ab\u02ad\5`\61\2\u02ac\u02a9\3\2\2\2\u02ac\u02aa\3\2\2\2\u02ac"+ + "\u02ab\3\2\2\2\u02adQ\3\2\2\2\u02ae\u02c9\7>\2\2\u02af\u02c9\5X-\2\u02b0"+ + "\u02c9\5h\65\2\u02b1\u02c9\5V,\2\u02b2\u02b4\7v\2\2\u02b3\u02b2\3\2\2"+ + "\2\u02b4\u02b5\3\2\2\2\u02b5\u02b3\3\2\2\2\u02b5\u02b6\3\2\2\2\u02b6\u02c9"+ + "\3\2\2\2\u02b7\u02c9\7u\2\2\u02b8\u02b9\7a\2\2\u02b9\u02ba\5j\66\2\u02ba"+ + "\u02bb\7e\2\2\u02bb\u02c9\3\2\2\2\u02bc\u02bd\7b\2\2\u02bd\u02be\5j\66"+ + "\2\u02be\u02bf\7e\2\2\u02bf\u02c9\3\2\2\2\u02c0\u02c1\7c\2\2\u02c1\u02c2"+ + "\5j\66\2\u02c2\u02c3\7e\2\2\u02c3\u02c9\3\2\2\2\u02c4\u02c5\7d\2\2\u02c5"+ + "\u02c6\5j\66\2\u02c6\u02c7\7e\2\2\u02c7\u02c9\3\2\2\2\u02c8\u02ae\3\2"+ + "\2\2\u02c8\u02af\3\2\2\2\u02c8\u02b0\3\2\2\2\u02c8\u02b1\3\2\2\2\u02c8"+ + "\u02b3\3\2\2\2\u02c8\u02b7\3\2\2\2\u02c8\u02b8\3\2\2\2\u02c8\u02bc\3\2"+ + "\2\2\u02c8\u02c0\3\2\2\2\u02c8\u02c4\3\2\2\2\u02c9S\3\2\2\2\u02ca\u02cb"+ + "\t\r\2\2\u02cbU\3\2\2\2\u02cc\u02cd\t\16\2\2\u02cdW\3\2\2\2\u02ce\u02d0"+ + "\7/\2\2\u02cf\u02d1\t\7\2\2\u02d0\u02cf\3\2\2\2\u02d0\u02d1\3\2\2\2\u02d1"+ + "\u02d4\3\2\2\2\u02d2\u02d5\5h\65\2\u02d3\u02d5\5j\66\2\u02d4\u02d2\3\2"+ + "\2\2\u02d4\u02d3\3\2\2\2\u02d5\u02d6\3\2\2\2\u02d6\u02d9\5Z.\2\u02d7\u02d8"+ + "\7U\2\2\u02d8\u02da\5Z.\2\u02d9\u02d7\3\2\2\2\u02d9\u02da\3\2\2\2\u02da"+ + "Y\3\2\2\2\u02db\u02dc\t\17\2\2\u02dc[\3\2\2\2\u02dd\u02de\5`\61\2\u02de"+ + "]\3\2\2\2\u02df\u02e0\5`\61\2\u02e0\u02e1\7t\2\2\u02e1\u02e3\3\2\2\2\u02e2"+ + "\u02df\3\2\2\2\u02e3\u02e6\3\2\2\2\u02e4\u02e2\3\2\2\2\u02e4\u02e5\3\2"+ + "\2\2\u02e5\u02e7\3\2\2\2\u02e6\u02e4\3\2\2\2\u02e7\u02e8\5`\61\2\u02e8"+ + "_\3\2\2\2\u02e9\u02ec\5d\63\2\u02ea\u02ec\5f\64\2\u02eb\u02e9\3\2\2\2"+ + "\u02eb\u02ea\3\2\2\2\u02eca\3\2\2\2\u02ed\u02ee\5`\61\2\u02ee\u02ef\7"+ + "\6\2\2\u02ef\u02f1\3\2\2\2\u02f0\u02ed\3\2\2\2\u02f0\u02f1\3\2\2\2\u02f1"+ + "\u02f2\3\2\2\2\u02f2\u02fa\7{\2\2\u02f3\u02f4\5`\61\2\u02f4\u02f5\7\6"+ + "\2\2\u02f5\u02f7\3\2\2\2\u02f6\u02f3\3\2\2\2\u02f6\u02f7\3\2\2\2\u02f7"+ + "\u02f8\3\2\2\2\u02f8\u02fa\5`\61\2\u02f9\u02f0\3\2\2\2\u02f9\u02f6\3\2"+ + "\2\2\u02fac\3\2\2\2\u02fb\u02fe\7|\2\2\u02fc\u02fe\7}\2\2\u02fd\u02fb"+ + "\3\2\2\2\u02fd\u02fc\3\2\2\2\u02fee\3\2\2\2\u02ff\u0303\7y\2\2\u0300\u0303"+ + "\5l\67\2\u0301\u0303\7z\2\2\u0302\u02ff\3\2\2\2\u0302\u0300\3\2\2\2\u0302"+ + "\u0301\3\2\2\2\u0303g\3\2\2\2\u0304\u0307\7x\2\2\u0305\u0307\7w\2\2\u0306"+ + "\u0304\3\2\2\2\u0306\u0305\3\2\2\2\u0307i\3\2\2\2\u0308\u0309\t\20\2\2"+ + "\u0309k\3\2\2\2\u030a\u030b\t\21\2\2\u030bm\3\2\2\2k}\177\u0083\u008c"+ "\u008e\u0092\u0099\u00a0\u00a5\u00aa\u00b2\u00b6\u00be\u00c1\u00c7\u00cc"+ "\u00cf\u00d4\u00d7\u00d9\u00e1\u00e4\u00f0\u00f3\u00f6\u00fd\u0104\u0108"+ "\u010c\u0110\u0117\u011b\u011f\u0124\u0128\u0130\u0134\u013b\u0146\u0149"+ "\u014d\u0159\u015c\u0162\u0169\u0170\u0173\u0177\u017b\u017f\u0181\u018c"+ "\u0191\u0195\u0198\u019e\u01a1\u01a7\u01aa\u01ac\u01cf\u01d7\u01d9\u01e0"+ "\u01e5\u01e8\u01f0\u01f9\u01ff\u0207\u020c\u0212\u0215\u021c\u0224\u022a"+ - "\u0239\u023b\u0245\u0252\u0257\u025c\u025f\u0261\u026d\u0282\u0290\u0295"+ - "\u029c\u029f\u02a6\u02af\u02c2\u02ca\u02ce\u02d3\u02de\u02e5\u02ea\u02f0"+ - "\u02f3\u02f7\u02fc\u0300"; + "\u0236\u0238\u0243\u0250\u0257\u025d\u0262\u0265\u0267\u0273\u0288\u0296"+ + "\u029b\u02a2\u02a5\u02ac\u02b5\u02c8\u02d0\u02d4\u02d9\u02e4\u02eb\u02f0"+ + "\u02f6\u02f9\u02fd\u0302\u0306"; public static final ATN _ATN = new ATNDeserializer().deserialize(_serializedATN.toCharArray()); static { diff --git a/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/parser/SqlBaseVisitor.java b/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/parser/SqlBaseVisitor.java index 8e8b9e5ab9e..56310aa66eb 100644 --- a/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/parser/SqlBaseVisitor.java +++ b/x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/parser/SqlBaseVisitor.java @@ -330,13 +330,6 @@ interface SqlBaseVisitor extends ParseTreeVisitor { * @return the visitor result */ T visitComparison(SqlBaseParser.ComparisonContext ctx); - /** - * Visit a parse tree produced by the {@code castOperatorExpression} - * labeled alternative in {@link SqlBaseParser#valueExpression}. - * @param ctx the parse tree - * @return the visitor result - */ - T visitCastOperatorExpression(SqlBaseParser.CastOperatorExpressionContext ctx); /** * Visit a parse tree produced by the {@code arithmeticBinary} * labeled alternative in {@link SqlBaseParser#valueExpression}. @@ -351,6 +344,13 @@ interface SqlBaseVisitor extends ParseTreeVisitor { * @return the visitor result */ T visitArithmeticUnary(SqlBaseParser.ArithmeticUnaryContext ctx); + /** + * Visit a parse tree produced by the {@code dereference} + * labeled alternative in {@link SqlBaseParser#primaryExpression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitDereference(SqlBaseParser.DereferenceContext ctx); /** * Visit a parse tree produced by the {@code cast} * labeled alternative in {@link SqlBaseParser#primaryExpression}. @@ -358,20 +358,6 @@ interface SqlBaseVisitor extends ParseTreeVisitor { * @return the visitor result */ T visitCast(SqlBaseParser.CastContext ctx); - /** - * Visit a parse tree produced by the {@code extract} - * labeled alternative in {@link SqlBaseParser#primaryExpression}. - * @param ctx the parse tree - * @return the visitor result - */ - T visitExtract(SqlBaseParser.ExtractContext ctx); - /** - * Visit a parse tree produced by the {@code currentDateTimeFunction} - * labeled alternative in {@link SqlBaseParser#primaryExpression}. - * @param ctx the parse tree - * @return the visitor result - */ - T visitCurrentDateTimeFunction(SqlBaseParser.CurrentDateTimeFunctionContext ctx); /** * Visit a parse tree produced by the {@code constantDefault} * labeled alternative in {@link SqlBaseParser#primaryExpression}. @@ -379,6 +365,20 @@ interface SqlBaseVisitor extends ParseTreeVisitor { * @return the visitor result */ T visitConstantDefault(SqlBaseParser.ConstantDefaultContext ctx); + /** + * Visit a parse tree produced by the {@code extract} + * labeled alternative in {@link SqlBaseParser#primaryExpression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitExtract(SqlBaseParser.ExtractContext ctx); + /** + * Visit a parse tree produced by the {@code parenthesizedExpression} + * labeled alternative in {@link SqlBaseParser#primaryExpression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitParenthesizedExpression(SqlBaseParser.ParenthesizedExpressionContext ctx); /** * Visit a parse tree produced by the {@code star} * labeled alternative in {@link SqlBaseParser#primaryExpression}. @@ -386,6 +386,13 @@ interface SqlBaseVisitor extends ParseTreeVisitor { * @return the visitor result */ T visitStar(SqlBaseParser.StarContext ctx); + /** + * Visit a parse tree produced by the {@code castOperatorExpression} + * labeled alternative in {@link SqlBaseParser#primaryExpression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitCastOperatorExpression(SqlBaseParser.CastOperatorExpressionContext ctx); /** * Visit a parse tree produced by the {@code function} * labeled alternative in {@link SqlBaseParser#primaryExpression}. @@ -393,6 +400,13 @@ interface SqlBaseVisitor extends ParseTreeVisitor { * @return the visitor result */ T visitFunction(SqlBaseParser.FunctionContext ctx); + /** + * Visit a parse tree produced by the {@code currentDateTimeFunction} + * labeled alternative in {@link SqlBaseParser#primaryExpression}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitCurrentDateTimeFunction(SqlBaseParser.CurrentDateTimeFunctionContext ctx); /** * Visit a parse tree produced by the {@code subqueryExpression} * labeled alternative in {@link SqlBaseParser#primaryExpression}. @@ -400,20 +414,6 @@ interface SqlBaseVisitor extends ParseTreeVisitor { * @return the visitor result */ T visitSubqueryExpression(SqlBaseParser.SubqueryExpressionContext ctx); - /** - * Visit a parse tree produced by the {@code dereference} - * labeled alternative in {@link SqlBaseParser#primaryExpression}. - * @param ctx the parse tree - * @return the visitor result - */ - T visitDereference(SqlBaseParser.DereferenceContext ctx); - /** - * Visit a parse tree produced by the {@code parenthesizedExpression} - * labeled alternative in {@link SqlBaseParser#primaryExpression}. - * @param ctx the parse tree - * @return the visitor result - */ - T visitParenthesizedExpression(SqlBaseParser.ParenthesizedExpressionContext ctx); /** * Visit a parse tree produced by {@link SqlBaseParser#builtinDateTimeFunction}. * @param ctx the parse tree diff --git a/x-pack/plugin/sql/src/test/java/org/elasticsearch/xpack/sql/parser/ExpressionTests.java b/x-pack/plugin/sql/src/test/java/org/elasticsearch/xpack/sql/parser/ExpressionTests.java index 3ffcedae0a6..112aabf55da 100644 --- a/x-pack/plugin/sql/src/test/java/org/elasticsearch/xpack/sql/parser/ExpressionTests.java +++ b/x-pack/plugin/sql/src/test/java/org/elasticsearch/xpack/sql/parser/ExpressionTests.java @@ -282,6 +282,19 @@ public class ExpressionTests extends ESTestCase { assertEquals("line 1:12: Does not recognize type [InVaLiD]", ex.getMessage()); } + public void testCastOperatorPrecedence() { + Expression expr = parser.createExpression("(10* 2::long)"); + assertEquals(Mul.class, expr.getClass()); + Mul mul = (Mul) expr; + assertEquals(DataType.LONG, mul.dataType()); + assertEquals(DataType.INTEGER, mul.left().dataType()); + assertEquals(Cast.class, mul.right().getClass()); + Cast cast = (Cast) mul.right(); + assertEquals(DataType.INTEGER, cast.from()); + assertEquals(DataType.LONG, cast.to()); + assertEquals(DataType.LONG, cast.dataType()); + } + public void testCastOperatorWithUnquotedDataType() { Expression expr = parser.createExpression("(10* 2)::long"); assertEquals(Cast.class, expr.getClass());