Improve grammar so keywords have priority over identifiers

Original commit: elastic/x-pack-elasticsearch@8222e30060
This commit is contained in:
Costin Leau 2017-11-09 21:40:09 +02:00
parent af453a3fa4
commit 8f55a4192c
6 changed files with 372 additions and 359 deletions

View File

@ -148,14 +148,14 @@ expression
;
booleanExpression
: predicated #booleanDefault
| NOT booleanExpression #logicalNot
| left=booleanExpression operator=AND right=booleanExpression #logicalBinary
| left=booleanExpression operator=OR right=booleanExpression #logicalBinary
: NOT booleanExpression #logicalNot
| EXISTS '(' query ')' #exists
| QUERY '(' queryString=STRING (',' options=STRING)* ')' #stringQuery
| MATCH '(' singleField=qualifiedName ',' queryString=STRING (',' options=STRING)* ')' #matchQuery
| MATCH '(' multiFields=STRING ',' queryString=STRING (',' options=STRING)* ')' #multiMatchQuery
| predicated #booleanDefault
| left=booleanExpression operator=AND right=booleanExpression #logicalBinary
| left=booleanExpression operator=OR right=booleanExpression #logicalBinary
;
// workaround for:
@ -184,7 +184,9 @@ valueExpression
;
primaryExpression
: constant #constantDefault
: CAST '(' expression AS dataType ')' #cast
| EXTRACT '(' field=identifier FROM valueExpression ')' #extract
| constant #constantDefault
| ASTERISK #star
| (qualifier=columnExpression '.')? ASTERISK #star
| identifier '(' (setQuantifier? expression (',' expression)*)? ')' #functionCall
@ -192,8 +194,6 @@ primaryExpression
| columnExpression #columnReference
| base=columnExpression '.' fieldName=identifier #dereference
| '(' expression ')' #parenthesizedExpression
| CAST '(' expression AS dataType ')' #cast
| EXTRACT '(' field=identifier FROM valueExpression ')' #extract
;
columnExpression
@ -255,9 +255,22 @@ number
// http://developer.mimer.se/validator/sql-reserved-words.tml
nonReserved
: ANALYZE | ANALYZED | COLUMNS | DEBUG | EXECUTABLE | EXPLAIN | FORMAT | FUNCTIONS | FROM
| GRAPHVIZ | LOGICAL | MAPPED | OPTIMIZED | PARSED | PHYSICAL | PLAN | QUERY | RESET
| RLIKE | SCHEMAS | SESSION | SETS | SHOW | TABLES | TEXT | TYPE | USE | VERIFY
: ANALYZE | ANALYZED
| COLUMNS
| DEBUG
| EXECUTABLE | EXPLAIN
| FORMAT | FUNCTIONS | FROM
| GRAPHVIZ
| LOGICAL
| MAPPED
| OPTIMIZED
| PARSED | PHYSICAL | PLAN
| QUERY
| RESET | RLIKE
| SCHEMAS | SESSION | SETS | SHOW
| TABLES | TEXT | TYPE
| USE
| VERIFY
;
ALL: 'ALL';

View File

@ -532,6 +532,30 @@ class SqlBaseBaseListener implements SqlBaseListener {
* <p>The default implementation does nothing.</p>
*/
@Override public void exitArithmeticUnary(SqlBaseParser.ArithmeticUnaryContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterCast(SqlBaseParser.CastContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitCast(SqlBaseParser.CastContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterExtract(SqlBaseParser.ExtractContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitExtract(SqlBaseParser.ExtractContext ctx) { }
/**
* {@inheritDoc}
*
@ -616,30 +640,6 @@ class SqlBaseBaseListener implements SqlBaseListener {
* <p>The default implementation does nothing.</p>
*/
@Override public void exitParenthesizedExpression(SqlBaseParser.ParenthesizedExpressionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterCast(SqlBaseParser.CastContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitCast(SqlBaseParser.CastContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterExtract(SqlBaseParser.ExtractContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitExtract(SqlBaseParser.ExtractContext ctx) { }
/**
* {@inheritDoc}
*

View File

@ -317,6 +317,20 @@ class SqlBaseBaseVisitor<T> extends AbstractParseTreeVisitor<T> implements SqlBa
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitArithmeticUnary(SqlBaseParser.ArithmeticUnaryContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitCast(SqlBaseParser.CastContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitExtract(SqlBaseParser.ExtractContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
@ -366,20 +380,6 @@ class SqlBaseBaseVisitor<T> extends AbstractParseTreeVisitor<T> implements SqlBa
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitParenthesizedExpression(SqlBaseParser.ParenthesizedExpressionContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitCast(SqlBaseParser.CastContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitExtract(SqlBaseParser.ExtractContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*

View File

@ -492,6 +492,30 @@ interface SqlBaseListener extends ParseTreeListener {
* @param ctx the parse tree
*/
void exitArithmeticUnary(SqlBaseParser.ArithmeticUnaryContext ctx);
/**
* Enter a parse tree produced by the {@code cast}
* labeled alternative in {@link SqlBaseParser#primaryExpression}.
* @param ctx the parse tree
*/
void enterCast(SqlBaseParser.CastContext ctx);
/**
* Exit a parse tree produced by the {@code cast}
* labeled alternative in {@link SqlBaseParser#primaryExpression}.
* @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 constantDefault}
* labeled alternative in {@link SqlBaseParser#primaryExpression}.
@ -576,30 +600,6 @@ interface SqlBaseListener extends ParseTreeListener {
* @param ctx the parse tree
*/
void exitParenthesizedExpression(SqlBaseParser.ParenthesizedExpressionContext ctx);
/**
* Enter a parse tree produced by the {@code cast}
* labeled alternative in {@link SqlBaseParser#primaryExpression}.
* @param ctx the parse tree
*/
void enterCast(SqlBaseParser.CastContext ctx);
/**
* Exit a parse tree produced by the {@code cast}
* labeled alternative in {@link SqlBaseParser#primaryExpression}.
* @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 {@link SqlBaseParser#columnExpression}.
* @param ctx the parse tree

View File

@ -2468,139 +2468,139 @@ class SqlBaseParser extends Parser {
switch ( getInterpreter().adaptivePredict(_input,52,_ctx) ) {
case 1:
{
_localctx = new BooleanDefaultContext(_localctx);
_localctx = new LogicalNotContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(347);
predicated();
match(NOT);
setState(348);
booleanExpression(8);
}
break;
case 2:
{
_localctx = new LogicalNotContext(_localctx);
_localctx = new ExistsContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(348);
match(NOT);
setState(349);
booleanExpression(7);
match(EXISTS);
setState(350);
match(T__0);
setState(351);
query();
setState(352);
match(T__1);
}
break;
case 3:
{
_localctx = new ExistsContext(_localctx);
_localctx = new StringQueryContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(350);
match(EXISTS);
setState(351);
setState(354);
match(QUERY);
setState(355);
match(T__0);
setState(352);
query();
setState(353);
setState(356);
((StringQueryContext)_localctx).queryString = match(STRING);
setState(361);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T__2) {
{
{
setState(357);
match(T__2);
setState(358);
((StringQueryContext)_localctx).options = match(STRING);
}
}
setState(363);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(364);
match(T__1);
}
break;
case 4:
{
_localctx = new StringQueryContext(_localctx);
_localctx = new MatchQueryContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(355);
match(QUERY);
setState(356);
setState(365);
match(MATCH);
setState(366);
match(T__0);
setState(357);
((StringQueryContext)_localctx).queryString = match(STRING);
setState(362);
setState(367);
((MatchQueryContext)_localctx).singleField = qualifiedName();
setState(368);
match(T__2);
setState(369);
((MatchQueryContext)_localctx).queryString = match(STRING);
setState(374);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T__2) {
{
{
setState(358);
setState(370);
match(T__2);
setState(359);
((StringQueryContext)_localctx).options = match(STRING);
setState(371);
((MatchQueryContext)_localctx).options = match(STRING);
}
}
setState(364);
setState(376);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(365);
setState(377);
match(T__1);
}
break;
case 5:
{
_localctx = new MatchQueryContext(_localctx);
_localctx = new MultiMatchQueryContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(366);
setState(379);
match(MATCH);
setState(367);
setState(380);
match(T__0);
setState(368);
((MatchQueryContext)_localctx).singleField = qualifiedName();
setState(369);
setState(381);
((MultiMatchQueryContext)_localctx).multiFields = match(STRING);
setState(382);
match(T__2);
setState(370);
((MatchQueryContext)_localctx).queryString = match(STRING);
setState(375);
setState(383);
((MultiMatchQueryContext)_localctx).queryString = match(STRING);
setState(388);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T__2) {
{
{
setState(371);
setState(384);
match(T__2);
setState(372);
((MatchQueryContext)_localctx).options = match(STRING);
setState(385);
((MultiMatchQueryContext)_localctx).options = match(STRING);
}
}
setState(377);
setState(390);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(378);
setState(391);
match(T__1);
}
break;
case 6:
{
_localctx = new MultiMatchQueryContext(_localctx);
_localctx = new BooleanDefaultContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(380);
match(MATCH);
setState(381);
match(T__0);
setState(382);
((MultiMatchQueryContext)_localctx).multiFields = match(STRING);
setState(383);
match(T__2);
setState(384);
((MultiMatchQueryContext)_localctx).queryString = match(STRING);
setState(389);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T__2) {
{
{
setState(385);
match(T__2);
setState(386);
((MultiMatchQueryContext)_localctx).options = match(STRING);
}
}
setState(391);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(392);
match(T__1);
predicated();
}
break;
}
@ -2622,11 +2622,11 @@ class SqlBaseParser extends Parser {
((LogicalBinaryContext)_localctx).left = _prevctx;
pushNewRecursionContext(_localctx, _startState, RULE_booleanExpression);
setState(395);
if (!(precpred(_ctx, 6))) throw new FailedPredicateException(this, "precpred(_ctx, 6)");
if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
setState(396);
((LogicalBinaryContext)_localctx).operator = match(AND);
setState(397);
((LogicalBinaryContext)_localctx).right = booleanExpression(7);
((LogicalBinaryContext)_localctx).right = booleanExpression(3);
}
break;
case 2:
@ -2635,11 +2635,11 @@ class SqlBaseParser extends Parser {
((LogicalBinaryContext)_localctx).left = _prevctx;
pushNewRecursionContext(_localctx, _startState, RULE_booleanExpression);
setState(398);
if (!(precpred(_ctx, 5))) throw new FailedPredicateException(this, "precpred(_ctx, 5)");
if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)");
setState(399);
((LogicalBinaryContext)_localctx).operator = match(OR);
setState(400);
((LogicalBinaryContext)_localctx).right = booleanExpression(6);
((LogicalBinaryContext)_localctx).right = booleanExpression(2);
}
break;
}
@ -3291,25 +3291,6 @@ class SqlBaseParser extends Parser {
else return visitor.visitChildren(this);
}
}
public static class ParenthesizedExpressionContext extends PrimaryExpressionContext {
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public ParenthesizedExpressionContext(PrimaryExpressionContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof SqlBaseListener ) ((SqlBaseListener)listener).enterParenthesizedExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof SqlBaseListener ) ((SqlBaseListener)listener).exitParenthesizedExpression(this);
}
@Override
public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
if ( visitor instanceof SqlBaseVisitor ) return ((SqlBaseVisitor<? extends T>)visitor).visitParenthesizedExpression(this);
else return visitor.visitChildren(this);
}
}
public static class ExtractContext extends PrimaryExpressionContext {
public IdentifierContext field;
public TerminalNode EXTRACT() { return getToken(SqlBaseParser.EXTRACT, 0); }
@ -3335,6 +3316,25 @@ class SqlBaseParser extends Parser {
else return visitor.visitChildren(this);
}
}
public static class ParenthesizedExpressionContext extends PrimaryExpressionContext {
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public ParenthesizedExpressionContext(PrimaryExpressionContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof SqlBaseListener ) ((SqlBaseListener)listener).enterParenthesizedExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof SqlBaseListener ) ((SqlBaseListener)listener).exitParenthesizedExpression(this);
}
@Override
public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
if ( visitor instanceof SqlBaseVisitor ) return ((SqlBaseVisitor<? extends T>)visitor).visitParenthesizedExpression(this);
else return visitor.visitChildren(this);
}
}
public static class StarContext extends PrimaryExpressionContext {
public ColumnExpressionContext qualifier;
public TerminalNode ASTERISK() { return getToken(SqlBaseParser.ASTERISK, 0); }
@ -3413,162 +3413,162 @@ class SqlBaseParser extends Parser {
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,70,_ctx) ) {
case 1:
_localctx = new ConstantDefaultContext(_localctx);
_localctx = new CastContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(474);
constant();
match(CAST);
setState(475);
match(T__0);
setState(476);
expression();
setState(477);
match(AS);
setState(478);
dataType();
setState(479);
match(T__1);
}
break;
case 2:
_localctx = new StarContext(_localctx);
_localctx = new ExtractContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(475);
match(ASTERISK);
setState(481);
match(EXTRACT);
setState(482);
match(T__0);
setState(483);
((ExtractContext)_localctx).field = identifier();
setState(484);
match(FROM);
setState(485);
valueExpression(0);
setState(486);
match(T__1);
}
break;
case 3:
_localctx = new StarContext(_localctx);
_localctx = new ConstantDefaultContext(_localctx);
enterOuterAlt(_localctx, 3);
{
setState(479);
setState(488);
constant();
}
break;
case 4:
_localctx = new StarContext(_localctx);
enterOuterAlt(_localctx, 4);
{
setState(489);
match(ASTERISK);
}
break;
case 5:
_localctx = new StarContext(_localctx);
enterOuterAlt(_localctx, 5);
{
setState(493);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ANALYZE) | (1L << ANALYZED) | (1L << COLUMNS) | (1L << DEBUG) | (1L << EXECUTABLE) | (1L << EXPLAIN) | (1L << FORMAT) | (1L << FROM) | (1L << FUNCTIONS) | (1L << GRAPHVIZ) | (1L << LOGICAL) | (1L << MAPPED) | (1L << OPTIMIZED) | (1L << PARSED) | (1L << PHYSICAL) | (1L << PLAN) | (1L << QUERY) | (1L << RESET))) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & ((1L << (RLIKE - 65)) | (1L << (SCHEMAS - 65)) | (1L << (SESSION - 65)) | (1L << (SETS - 65)) | (1L << (SHOW - 65)) | (1L << (TABLES - 65)) | (1L << (TEXT - 65)) | (1L << (TYPE - 65)) | (1L << (USE - 65)) | (1L << (VERIFY - 65)) | (1L << (IDENTIFIER - 65)) | (1L << (DIGIT_IDENTIFIER - 65)) | (1L << (QUOTED_IDENTIFIER - 65)) | (1L << (BACKQUOTED_IDENTIFIER - 65)))) != 0)) {
{
setState(476);
setState(490);
((StarContext)_localctx).qualifier = columnExpression();
setState(477);
setState(491);
match(T__3);
}
}
setState(481);
setState(495);
match(ASTERISK);
}
break;
case 4:
case 6:
_localctx = new FunctionCallContext(_localctx);
enterOuterAlt(_localctx, 4);
enterOuterAlt(_localctx, 6);
{
setState(482);
setState(496);
identifier();
setState(483);
setState(497);
match(T__0);
setState(495);
setState(509);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << ALL) | (1L << ANALYZE) | (1L << ANALYZED) | (1L << CAST) | (1L << COLUMNS) | (1L << DEBUG) | (1L << DISTINCT) | (1L << EXECUTABLE) | (1L << EXISTS) | (1L << EXPLAIN) | (1L << EXTRACT) | (1L << FALSE) | (1L << FORMAT) | (1L << FROM) | (1L << FUNCTIONS) | (1L << GRAPHVIZ) | (1L << LOGICAL) | (1L << MAPPED) | (1L << MATCH) | (1L << NOT) | (1L << NULL) | (1L << OPTIMIZED) | (1L << PARSED) | (1L << PHYSICAL) | (1L << PLAN) | (1L << QUERY) | (1L << RESET))) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & ((1L << (RLIKE - 65)) | (1L << (SCHEMAS - 65)) | (1L << (SESSION - 65)) | (1L << (SETS - 65)) | (1L << (SHOW - 65)) | (1L << (TABLES - 65)) | (1L << (TEXT - 65)) | (1L << (TRUE - 65)) | (1L << (TYPE - 65)) | (1L << (USE - 65)) | (1L << (VERIFY - 65)) | (1L << (PLUS - 65)) | (1L << (MINUS - 65)) | (1L << (ASTERISK - 65)) | (1L << (STRING - 65)) | (1L << (INTEGER_VALUE - 65)) | (1L << (DECIMAL_VALUE - 65)) | (1L << (IDENTIFIER - 65)) | (1L << (DIGIT_IDENTIFIER - 65)) | (1L << (QUOTED_IDENTIFIER - 65)) | (1L << (BACKQUOTED_IDENTIFIER - 65)))) != 0)) {
{
setState(485);
setState(499);
_la = _input.LA(1);
if (_la==ALL || _la==DISTINCT) {
{
setState(484);
setState(498);
setQuantifier();
}
}
setState(487);
setState(501);
expression();
setState(492);
setState(506);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T__2) {
{
{
setState(488);
setState(502);
match(T__2);
setState(489);
setState(503);
expression();
}
}
setState(494);
setState(508);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
}
setState(497);
setState(511);
match(T__1);
}
break;
case 5:
_localctx = new SubqueryExpressionContext(_localctx);
enterOuterAlt(_localctx, 5);
{
setState(499);
match(T__0);
setState(500);
query();
setState(501);
match(T__1);
}
break;
case 6:
_localctx = new ColumnReferenceContext(_localctx);
enterOuterAlt(_localctx, 6);
{
setState(503);
columnExpression();
}
break;
case 7:
_localctx = new DereferenceContext(_localctx);
_localctx = new SubqueryExpressionContext(_localctx);
enterOuterAlt(_localctx, 7);
{
setState(504);
((DereferenceContext)_localctx).base = columnExpression();
setState(505);
match(T__3);
setState(506);
((DereferenceContext)_localctx).fieldName = identifier();
}
break;
case 8:
_localctx = new ParenthesizedExpressionContext(_localctx);
enterOuterAlt(_localctx, 8);
{
setState(508);
match(T__0);
setState(509);
expression();
setState(510);
match(T__1);
}
break;
case 9:
_localctx = new CastContext(_localctx);
enterOuterAlt(_localctx, 9);
{
setState(512);
match(CAST);
setState(513);
match(T__0);
setState(514);
expression();
query();
setState(515);
match(AS);
setState(516);
dataType();
setState(517);
match(T__1);
}
break;
case 8:
_localctx = new ColumnReferenceContext(_localctx);
enterOuterAlt(_localctx, 8);
{
setState(517);
columnExpression();
}
break;
case 9:
_localctx = new DereferenceContext(_localctx);
enterOuterAlt(_localctx, 9);
{
setState(518);
((DereferenceContext)_localctx).base = columnExpression();
setState(519);
match(T__3);
setState(520);
((DereferenceContext)_localctx).fieldName = identifier();
}
break;
case 10:
_localctx = new ExtractContext(_localctx);
_localctx = new ParenthesizedExpressionContext(_localctx);
enterOuterAlt(_localctx, 10);
{
setState(519);
match(EXTRACT);
setState(520);
match(T__0);
setState(521);
((ExtractContext)_localctx).field = identifier();
setState(522);
match(FROM);
match(T__0);
setState(523);
valueExpression(0);
expression();
setState(524);
match(T__1);
}
@ -4673,9 +4673,9 @@ class SqlBaseParser extends Parser {
private boolean booleanExpression_sempred(BooleanExpressionContext _localctx, int predIndex) {
switch (predIndex) {
case 0:
return precpred(_ctx, 6);
return precpred(_ctx, 2);
case 1:
return precpred(_ctx, 5);
return precpred(_ctx, 1);
}
return true;
}
@ -4720,9 +4720,9 @@ class SqlBaseParser extends Parser {
"\n\25\3\25\3\25\3\25\3\25\5\25\u014b\n\25\3\25\5\25\u014e\n\25\3\25\3"+
"\25\3\25\3\25\5\25\u0154\n\25\3\25\5\25\u0157\n\25\5\25\u0159\n\25\3\26"+
"\3\26\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27"+
"\3\27\7\27\u016b\n\27\f\27\16\27\u016e\13\27\3\27\3\27\3\27\3\27\3\27"+
"\3\27\3\27\3\27\7\27\u0178\n\27\f\27\16\27\u017b\13\27\3\27\3\27\3\27"+
"\3\27\3\27\3\27\3\27\3\27\3\27\7\27\u0186\n\27\f\27\16\27\u0189\13\27"+
"\7\27\u016a\n\27\f\27\16\27\u016d\13\27\3\27\3\27\3\27\3\27\3\27\3\27"+
"\3\27\3\27\7\27\u0177\n\27\f\27\16\27\u017a\13\27\3\27\3\27\3\27\3\27"+
"\3\27\3\27\3\27\3\27\3\27\7\27\u0185\n\27\f\27\16\27\u0188\13\27\3\27"+
"\3\27\5\27\u018c\n\27\3\27\3\27\3\27\3\27\3\27\3\27\7\27\u0194\n\27\f"+
"\27\16\27\u0197\13\27\3\30\3\30\5\30\u019b\n\30\3\31\5\31\u019e\n\31\3"+
"\31\3\31\3\31\3\31\3\31\3\31\5\31\u01a6\n\31\3\31\3\31\3\31\3\31\3\31"+
@ -4730,10 +4730,10 @@ class SqlBaseParser extends Parser {
"\3\31\3\31\3\31\3\31\3\31\3\31\5\31\u01bd\n\31\3\31\3\31\3\31\3\31\5\31"+
"\u01c3\n\31\3\31\5\31\u01c6\n\31\3\32\3\32\3\32\3\32\5\32\u01cc\n\32\3"+
"\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\7\32\u01d8\n\32\f\32"+
"\16\32\u01db\13\32\3\33\3\33\3\33\3\33\3\33\5\33\u01e2\n\33\3\33\3\33"+
"\3\33\3\33\5\33\u01e8\n\33\3\33\3\33\3\33\7\33\u01ed\n\33\f\33\16\33\u01f0"+
"\13\33\5\33\u01f2\n\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3"+
"\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3"+
"\16\32\u01db\13\32\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3"+
"\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\5\33\u01f0\n\33\3\33\3\33"+
"\3\33\3\33\5\33\u01f6\n\33\3\33\3\33\3\33\7\33\u01fb\n\33\f\33\16\33\u01fe"+
"\13\33\5\33\u0200\n\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3"+
"\33\3\33\3\33\3\33\3\33\3\33\5\33\u0211\n\33\3\34\3\34\5\34\u0215\n\34"+
"\3\34\3\34\5\34\u0219\n\34\3\34\3\34\3\35\3\35\3\35\3\35\3\35\3\35\3\35"+
"\6\35\u0224\n\35\r\35\16\35\u0225\5\35\u0228\n\35\3\36\3\36\3\37\3\37"+
@ -4835,96 +4835,96 @@ class SqlBaseParser extends Parser {
"\u0152\3\2\2\2\u0153\u0154\3\2\2\2\u0154\u0155\3\2\2\2\u0155\u0157\5B"+
"\"\2\u0156\u0153\3\2\2\2\u0156\u0157\3\2\2\2\u0157\u0159\3\2\2\2\u0158"+
"\u013f\3\2\2\2\u0158\u0146\3\2\2\2\u0158\u014f\3\2\2\2\u0159)\3\2\2\2"+
"\u015a\u015b\5,\27\2\u015b+\3\2\2\2\u015c\u015d\b\27\1\2\u015d\u018c\5"+
".\30\2\u015e\u015f\7\65\2\2\u015f\u018c\5,\27\t\u0160\u0161\7\31\2\2\u0161"+
"\u0162\7\3\2\2\u0162\u0163\5\b\5\2\u0163\u0164\7\4\2\2\u0164\u018c\3\2"+
"\2\2\u0165\u0166\7@\2\2\u0166\u0167\7\3\2\2\u0167\u016c\7c\2\2\u0168\u0169"+
"\7\5\2\2\u0169\u016b\7c\2\2\u016a\u0168\3\2\2\2\u016b\u016e\3\2\2\2\u016c"+
"\u016a\3\2\2\2\u016c\u016d\3\2\2\2\u016d\u016f\3\2\2\2\u016e\u016c\3\2"+
"\2\2\u016f\u018c\7\4\2\2\u0170\u0171\7\62\2\2\u0171\u0172\7\3\2\2\u0172"+
"\u0173\5B\"\2\u0173\u0174\7\5\2\2\u0174\u0179\7c\2\2\u0175\u0176\7\5\2"+
"\2\u0176\u0178\7c\2\2\u0177\u0175\3\2\2\2\u0178\u017b\3\2\2\2\u0179\u0177"+
"\3\2\2\2\u0179\u017a\3\2\2\2\u017a\u017c\3\2\2\2\u017b\u0179\3\2\2\2\u017c"+
"\u017d\7\4\2\2\u017d\u018c\3\2\2\2\u017e\u017f\7\62\2\2\u017f\u0180\7"+
"\3\2\2\u0180\u0181\7c\2\2\u0181\u0182\7\5\2\2\u0182\u0187\7c\2\2\u0183"+
"\u0184\7\5\2\2\u0184\u0186\7c\2\2\u0185\u0183\3\2\2\2\u0186\u0189\3\2"+
"\2\2\u0187\u0185\3\2\2\2\u0187\u0188\3\2\2\2\u0188\u018a\3\2\2\2\u0189"+
"\u0187\3\2\2\2\u018a\u018c\7\4\2\2\u018b\u015c\3\2\2\2\u018b\u015e\3\2"+
"\2\2\u018b\u0160\3\2\2\2\u018b\u0165\3\2\2\2\u018b\u0170\3\2\2\2\u018b"+
"\u017e\3\2\2\2\u018c\u0195\3\2\2\2\u018d\u018e\f\b\2\2\u018e\u018f\7\n"+
"\2\2\u018f\u0194\5,\27\t\u0190\u0191\f\7\2\2\u0191\u0192\7:\2\2\u0192"+
"\u0194\5,\27\b\u0193\u018d\3\2\2\2\u0193\u0190\3\2\2\2\u0194\u0197\3\2"+
"\2\2\u0195\u0193\3\2\2\2\u0195\u0196\3\2\2\2\u0196-\3\2\2\2\u0197\u0195"+
"\3\2\2\2\u0198\u019a\5\62\32\2\u0199\u019b\5\60\31\2\u019a\u0199\3\2\2"+
"\2\u019a\u019b\3\2\2\2\u019b/\3\2\2\2\u019c\u019e\7\65\2\2\u019d\u019c"+
"\3\2\2\2\u019d\u019e\3\2\2\2\u019e\u019f\3\2\2\2\u019f\u01a0\7\16\2\2"+
"\u01a0\u01a1\5\62\32\2\u01a1\u01a2\7\n\2\2\u01a2\u01a3\5\62\32\2\u01a3"+
"\u01c6\3\2\2\2\u01a4\u01a6\7\65\2\2\u01a5\u01a4\3\2\2\2\u01a5\u01a6\3"+
"\2\2\2\u01a6\u01a7\3\2\2\2\u01a7\u01a8\7&\2\2\u01a8\u01a9\7\3\2\2\u01a9"+
"\u01ae\5*\26\2\u01aa\u01ab\7\5\2\2\u01ab\u01ad\5*\26\2\u01ac\u01aa\3\2"+
"\2\2\u01ad\u01b0\3\2\2\2\u01ae\u01ac\3\2\2\2\u01ae\u01af\3\2\2\2\u01af"+
"\u01b1\3\2\2\2\u01b0\u01ae\3\2\2\2\u01b1\u01b2\7\4\2\2\u01b2\u01c6\3\2"+
"\2\2\u01b3\u01b5\7\65\2\2\u01b4\u01b3\3\2\2\2\u01b4\u01b5\3\2\2\2\u01b5"+
"\u01b6\3\2\2\2\u01b6\u01b7\7&\2\2\u01b7\u01b8\7\3\2\2\u01b8\u01b9\5\b"+
"\5\2\u01b9\u01ba\7\4\2\2\u01ba\u01c6\3\2\2\2\u01bb\u01bd\7\65\2\2\u01bc"+
"\u01bb\3\2\2\2\u01bc\u01bd\3\2\2\2\u01bd\u01be\3\2\2\2\u01be\u01bf\t\n"+
"\2\2\u01bf\u01c6\5\62\32\2\u01c0\u01c2\7*\2\2\u01c1\u01c3\7\65\2\2\u01c2"+
"\u01c1\3\2\2\2\u01c2\u01c3\3\2\2\2\u01c3\u01c4\3\2\2\2\u01c4\u01c6\7\66"+
"\2\2\u01c5\u019d\3\2\2\2\u01c5\u01a5\3\2\2\2\u01c5\u01b4\3\2\2\2\u01c5"+
"\u01bc\3\2\2\2\u01c5\u01c0\3\2\2\2\u01c6\61\3\2\2\2\u01c7\u01c8\b\32\1"+
"\2\u01c8\u01cc\5\64\33\2\u01c9\u01ca\t\13\2\2\u01ca\u01cc\5\62\32\6\u01cb"+
"\u01c7\3\2\2\2\u01cb\u01c9\3\2\2\2\u01cc\u01d9\3\2\2\2\u01cd\u01ce\f\5"+
"\2\2\u01ce\u01cf\t\f\2\2\u01cf\u01d8\5\62\32\6\u01d0\u01d1\f\4\2\2\u01d1"+
"\u01d2\t\13\2\2\u01d2\u01d8\5\62\32\5\u01d3\u01d4\f\3\2\2\u01d4\u01d5"+
"\5:\36\2\u01d5\u01d6\5\62\32\4\u01d6\u01d8\3\2\2\2\u01d7\u01cd\3\2\2\2"+
"\u01d7\u01d0\3\2\2\2\u01d7\u01d3\3\2\2\2\u01d8\u01db\3\2\2\2\u01d9\u01d7"+
"\3\2\2\2\u01d9\u01da\3\2\2\2\u01da\63\3\2\2\2\u01db\u01d9\3\2\2\2\u01dc"+
"\u0211\58\35\2\u01dd\u0211\7_\2\2\u01de\u01df\5\66\34\2\u01df\u01e0\7"+
"\6\2\2\u01e0\u01e2\3\2\2\2\u01e1\u01de\3\2\2\2\u01e1\u01e2\3\2\2\2\u01e2"+
"\u01e3\3\2\2\2\u01e3\u0211\7_\2\2\u01e4\u01e5\5F$\2\u01e5\u01f1\7\3\2"+
"\2\u01e6\u01e8\5\34\17\2\u01e7\u01e6\3\2\2\2\u01e7\u01e8\3\2\2\2\u01e8"+
"\u01e9\3\2\2\2\u01e9\u01ee\5*\26\2\u01ea\u01eb\7\5\2\2\u01eb\u01ed\5*"+
"\26\2\u01ec\u01ea\3\2\2\2\u01ed\u01f0\3\2\2\2\u01ee\u01ec\3\2\2\2\u01ee"+
"\u01ef\3\2\2\2\u01ef\u01f2\3\2\2\2\u01f0\u01ee\3\2\2\2\u01f1\u01e7\3\2"+
"\2\2\u01f1\u01f2\3\2\2\2\u01f2\u01f3\3\2\2\2\u01f3\u01f4\7\4\2\2\u01f4"+
"\u0211\3\2\2\2\u01f5\u01f6\7\3\2\2\u01f6\u01f7\5\b\5\2\u01f7\u01f8\7\4"+
"\2\2\u01f8\u0211\3\2\2\2\u01f9\u0211\5\66\34\2\u01fa\u01fb\5\66\34\2\u01fb"+
"\u01fc\7\6\2\2\u01fc\u01fd\5F$\2\u01fd\u0211\3\2\2\2\u01fe\u01ff\7\3\2"+
"\2\u01ff\u0200\5*\26\2\u0200\u0201\7\4\2\2\u0201\u0211\3\2\2\2\u0202\u0203"+
"\7\20\2\2\u0203\u0204\7\3\2\2\u0204\u0205\5*\26\2\u0205\u0206\7\f\2\2"+
"\u0206\u0207\5> \2\u0207\u0208\7\4\2\2\u0208\u0211\3\2\2\2\u0209\u020a"+
"\7\33\2\2\u020a\u020b\7\3\2\2\u020b\u020c\5F$\2\u020c\u020d\7\37\2\2\u020d"+
"\u020e\5\62\32\2\u020e\u020f\7\4\2\2\u020f\u0211\3\2\2\2\u0210\u01dc\3"+
"\2\2\2\u0210\u01dd\3\2\2\2\u0210\u01e1\3\2\2\2\u0210\u01e4\3\2\2\2\u0210"+
"\u01f5\3\2\2\2\u0210\u01f9\3\2\2\2\u0210\u01fa\3\2\2\2\u0210\u01fe\3\2"+
"\2\2\u0210\u0202\3\2\2\2\u0210\u0209\3\2\2\2\u0211\65\3\2\2\2\u0212\u0215"+
"\5F$\2\u0213\u0215\5D#\2\u0214\u0212\3\2\2\2\u0214\u0213\3\2\2\2\u0215"+
"\u0216\3\2\2\2\u0216\u0217\7\6\2\2\u0217\u0219\3\2\2\2\u0218\u0214\3\2"+
"\2\2\u0218\u0219\3\2\2\2\u0219\u021a\3\2\2\2\u021a\u021b\5F$\2\u021b\67"+
"\3\2\2\2\u021c\u0228\7\66\2\2\u021d\u021e\5F$\2\u021e\u021f\7c\2\2\u021f"+
"\u0228\3\2\2\2\u0220\u0228\5L\'\2\u0221\u0228\5<\37\2\u0222\u0224\7c\2"+
"\2\u0223\u0222\3\2\2\2\u0224\u0225\3\2\2\2\u0225\u0223\3\2\2\2\u0225\u0226"+
"\3\2\2\2\u0226\u0228\3\2\2\2\u0227\u021c\3\2\2\2\u0227\u021d\3\2\2\2\u0227"+
"\u0220\3\2\2\2\u0227\u0221\3\2\2\2\u0227\u0223\3\2\2\2\u02289\3\2\2\2"+
"\u0229\u022a\t\r\2\2\u022a;\3\2\2\2\u022b\u022c\t\16\2\2\u022c=\3\2\2"+
"\2\u022d\u022e\5F$\2\u022e?\3\2\2\2\u022f\u0230\7T\2\2\u0230\u0231\5*"+
"\26\2\u0231\u0232\7M\2\2\u0232\u0233\5*\26\2\u0233A\3\2\2\2\u0234\u0239"+
"\5F$\2\u0235\u0236\7\6\2\2\u0236\u0238\5F$\2\u0237\u0235\3\2\2\2\u0238"+
"\u023b\3\2\2\2\u0239\u0237\3\2\2\2\u0239\u023a\3\2\2\2\u023aC\3\2\2\2"+
"\u023b\u0239\3\2\2\2\u023c\u023d\5F$\2\u023dE\3\2\2\2\u023e\u0241\5H%"+
"\2\u023f\u0241\5J&\2\u0240\u023e\3\2\2\2\u0240\u023f\3\2\2\2\u0241G\3"+
"\2\2\2\u0242\u0245\7h\2\2\u0243\u0245\7i\2\2\u0244\u0242\3\2\2\2\u0244"+
"\u0243\3\2\2\2\u0245I\3\2\2\2\u0246\u024a\7f\2\2\u0247\u024a\5N(\2\u0248"+
"\u024a\7g\2\2\u0249\u0246\3\2\2\2\u0249\u0247\3\2\2\2\u0249\u0248\3\2"+
"\2\2\u024aK\3\2\2\2\u024b\u024e\7e\2\2\u024c\u024e\7d\2\2\u024d\u024b"+
"\3\2\2\2\u024d\u024c\3\2\2\2\u024eM\3\2\2\2\u024f\u0250\t\17\2\2\u0250"+
"O\3\2\2\2R_aenptz}\u0088\u008b\u008f\u0097\u009a\u00a6\u00a9\u00ad\u00b4"+
"\u00b8\u00bc\u00c3\u00c7\u00cb\u00d0\u00d4\u00dc\u00e0\u00e7\u00f2\u00f5"+
"\u00f9\u0105\u0108\u010e\u0115\u011c\u011f\u0123\u0127\u012b\u012d\u0138"+
"\u013d\u0141\u0144\u014a\u014d\u0153\u0156\u0158\u016c\u0179\u0187\u018b"+
"\u0193\u0195\u019a\u019d\u01a5\u01ae\u01b4\u01bc\u01c2\u01c5\u01cb\u01d7"+
"\u01d9\u01e1\u01e7\u01ee\u01f1\u0210\u0214\u0218\u0225\u0227\u0239\u0240"+
"\u0244\u0249\u024d";
"\u015a\u015b\5,\27\2\u015b+\3\2\2\2\u015c\u015d\b\27\1\2\u015d\u015e\7"+
"\65\2\2\u015e\u018c\5,\27\n\u015f\u0160\7\31\2\2\u0160\u0161\7\3\2\2\u0161"+
"\u0162\5\b\5\2\u0162\u0163\7\4\2\2\u0163\u018c\3\2\2\2\u0164\u0165\7@"+
"\2\2\u0165\u0166\7\3\2\2\u0166\u016b\7c\2\2\u0167\u0168\7\5\2\2\u0168"+
"\u016a\7c\2\2\u0169\u0167\3\2\2\2\u016a\u016d\3\2\2\2\u016b\u0169\3\2"+
"\2\2\u016b\u016c\3\2\2\2\u016c\u016e\3\2\2\2\u016d\u016b\3\2\2\2\u016e"+
"\u018c\7\4\2\2\u016f\u0170\7\62\2\2\u0170\u0171\7\3\2\2\u0171\u0172\5"+
"B\"\2\u0172\u0173\7\5\2\2\u0173\u0178\7c\2\2\u0174\u0175\7\5\2\2\u0175"+
"\u0177\7c\2\2\u0176\u0174\3\2\2\2\u0177\u017a\3\2\2\2\u0178\u0176\3\2"+
"\2\2\u0178\u0179\3\2\2\2\u0179\u017b\3\2\2\2\u017a\u0178\3\2\2\2\u017b"+
"\u017c\7\4\2\2\u017c\u018c\3\2\2\2\u017d\u017e\7\62\2\2\u017e\u017f\7"+
"\3\2\2\u017f\u0180\7c\2\2\u0180\u0181\7\5\2\2\u0181\u0186\7c\2\2\u0182"+
"\u0183\7\5\2\2\u0183\u0185\7c\2\2\u0184\u0182\3\2\2\2\u0185\u0188\3\2"+
"\2\2\u0186\u0184\3\2\2\2\u0186\u0187\3\2\2\2\u0187\u0189\3\2\2\2\u0188"+
"\u0186\3\2\2\2\u0189\u018c\7\4\2\2\u018a\u018c\5.\30\2\u018b\u015c\3\2"+
"\2\2\u018b\u015f\3\2\2\2\u018b\u0164\3\2\2\2\u018b\u016f\3\2\2\2\u018b"+
"\u017d\3\2\2\2\u018b\u018a\3\2\2\2\u018c\u0195\3\2\2\2\u018d\u018e\f\4"+
"\2\2\u018e\u018f\7\n\2\2\u018f\u0194\5,\27\5\u0190\u0191\f\3\2\2\u0191"+
"\u0192\7:\2\2\u0192\u0194\5,\27\4\u0193\u018d\3\2\2\2\u0193\u0190\3\2"+
"\2\2\u0194\u0197\3\2\2\2\u0195\u0193\3\2\2\2\u0195\u0196\3\2\2\2\u0196"+
"-\3\2\2\2\u0197\u0195\3\2\2\2\u0198\u019a\5\62\32\2\u0199\u019b\5\60\31"+
"\2\u019a\u0199\3\2\2\2\u019a\u019b\3\2\2\2\u019b/\3\2\2\2\u019c\u019e"+
"\7\65\2\2\u019d\u019c\3\2\2\2\u019d\u019e\3\2\2\2\u019e\u019f\3\2\2\2"+
"\u019f\u01a0\7\16\2\2\u01a0\u01a1\5\62\32\2\u01a1\u01a2\7\n\2\2\u01a2"+
"\u01a3\5\62\32\2\u01a3\u01c6\3\2\2\2\u01a4\u01a6\7\65\2\2\u01a5\u01a4"+
"\3\2\2\2\u01a5\u01a6\3\2\2\2\u01a6\u01a7\3\2\2\2\u01a7\u01a8\7&\2\2\u01a8"+
"\u01a9\7\3\2\2\u01a9\u01ae\5*\26\2\u01aa\u01ab\7\5\2\2\u01ab\u01ad\5*"+
"\26\2\u01ac\u01aa\3\2\2\2\u01ad\u01b0\3\2\2\2\u01ae\u01ac\3\2\2\2\u01ae"+
"\u01af\3\2\2\2\u01af\u01b1\3\2\2\2\u01b0\u01ae\3\2\2\2\u01b1\u01b2\7\4"+
"\2\2\u01b2\u01c6\3\2\2\2\u01b3\u01b5\7\65\2\2\u01b4\u01b3\3\2\2\2\u01b4"+
"\u01b5\3\2\2\2\u01b5\u01b6\3\2\2\2\u01b6\u01b7\7&\2\2\u01b7\u01b8\7\3"+
"\2\2\u01b8\u01b9\5\b\5\2\u01b9\u01ba\7\4\2\2\u01ba\u01c6\3\2\2\2\u01bb"+
"\u01bd\7\65\2\2\u01bc\u01bb\3\2\2\2\u01bc\u01bd\3\2\2\2\u01bd\u01be\3"+
"\2\2\2\u01be\u01bf\t\n\2\2\u01bf\u01c6\5\62\32\2\u01c0\u01c2\7*\2\2\u01c1"+
"\u01c3\7\65\2\2\u01c2\u01c1\3\2\2\2\u01c2\u01c3\3\2\2\2\u01c3\u01c4\3"+
"\2\2\2\u01c4\u01c6\7\66\2\2\u01c5\u019d\3\2\2\2\u01c5\u01a5\3\2\2\2\u01c5"+
"\u01b4\3\2\2\2\u01c5\u01bc\3\2\2\2\u01c5\u01c0\3\2\2\2\u01c6\61\3\2\2"+
"\2\u01c7\u01c8\b\32\1\2\u01c8\u01cc\5\64\33\2\u01c9\u01ca\t\13\2\2\u01ca"+
"\u01cc\5\62\32\6\u01cb\u01c7\3\2\2\2\u01cb\u01c9\3\2\2\2\u01cc\u01d9\3"+
"\2\2\2\u01cd\u01ce\f\5\2\2\u01ce\u01cf\t\f\2\2\u01cf\u01d8\5\62\32\6\u01d0"+
"\u01d1\f\4\2\2\u01d1\u01d2\t\13\2\2\u01d2\u01d8\5\62\32\5\u01d3\u01d4"+
"\f\3\2\2\u01d4\u01d5\5:\36\2\u01d5\u01d6\5\62\32\4\u01d6\u01d8\3\2\2\2"+
"\u01d7\u01cd\3\2\2\2\u01d7\u01d0\3\2\2\2\u01d7\u01d3\3\2\2\2\u01d8\u01db"+
"\3\2\2\2\u01d9\u01d7\3\2\2\2\u01d9\u01da\3\2\2\2\u01da\63\3\2\2\2\u01db"+
"\u01d9\3\2\2\2\u01dc\u01dd\7\20\2\2\u01dd\u01de\7\3\2\2\u01de\u01df\5"+
"*\26\2\u01df\u01e0\7\f\2\2\u01e0\u01e1\5> \2\u01e1\u01e2\7\4\2\2\u01e2"+
"\u0211\3\2\2\2\u01e3\u01e4\7\33\2\2\u01e4\u01e5\7\3\2\2\u01e5\u01e6\5"+
"F$\2\u01e6\u01e7\7\37\2\2\u01e7\u01e8\5\62\32\2\u01e8\u01e9\7\4\2\2\u01e9"+
"\u0211\3\2\2\2\u01ea\u0211\58\35\2\u01eb\u0211\7_\2\2\u01ec\u01ed\5\66"+
"\34\2\u01ed\u01ee\7\6\2\2\u01ee\u01f0\3\2\2\2\u01ef\u01ec\3\2\2\2\u01ef"+
"\u01f0\3\2\2\2\u01f0\u01f1\3\2\2\2\u01f1\u0211\7_\2\2\u01f2\u01f3\5F$"+
"\2\u01f3\u01ff\7\3\2\2\u01f4\u01f6\5\34\17\2\u01f5\u01f4\3\2\2\2\u01f5"+
"\u01f6\3\2\2\2\u01f6\u01f7\3\2\2\2\u01f7\u01fc\5*\26\2\u01f8\u01f9\7\5"+
"\2\2\u01f9\u01fb\5*\26\2\u01fa\u01f8\3\2\2\2\u01fb\u01fe\3\2\2\2\u01fc"+
"\u01fa\3\2\2\2\u01fc\u01fd\3\2\2\2\u01fd\u0200\3\2\2\2\u01fe\u01fc\3\2"+
"\2\2\u01ff\u01f5\3\2\2\2\u01ff\u0200\3\2\2\2\u0200\u0201\3\2\2\2\u0201"+
"\u0202\7\4\2\2\u0202\u0211\3\2\2\2\u0203\u0204\7\3\2\2\u0204\u0205\5\b"+
"\5\2\u0205\u0206\7\4\2\2\u0206\u0211\3\2\2\2\u0207\u0211\5\66\34\2\u0208"+
"\u0209\5\66\34\2\u0209\u020a\7\6\2\2\u020a\u020b\5F$\2\u020b\u0211\3\2"+
"\2\2\u020c\u020d\7\3\2\2\u020d\u020e\5*\26\2\u020e\u020f\7\4\2\2\u020f"+
"\u0211\3\2\2\2\u0210\u01dc\3\2\2\2\u0210\u01e3\3\2\2\2\u0210\u01ea\3\2"+
"\2\2\u0210\u01eb\3\2\2\2\u0210\u01ef\3\2\2\2\u0210\u01f2\3\2\2\2\u0210"+
"\u0203\3\2\2\2\u0210\u0207\3\2\2\2\u0210\u0208\3\2\2\2\u0210\u020c\3\2"+
"\2\2\u0211\65\3\2\2\2\u0212\u0215\5F$\2\u0213\u0215\5D#\2\u0214\u0212"+
"\3\2\2\2\u0214\u0213\3\2\2\2\u0215\u0216\3\2\2\2\u0216\u0217\7\6\2\2\u0217"+
"\u0219\3\2\2\2\u0218\u0214\3\2\2\2\u0218\u0219\3\2\2\2\u0219\u021a\3\2"+
"\2\2\u021a\u021b\5F$\2\u021b\67\3\2\2\2\u021c\u0228\7\66\2\2\u021d\u021e"+
"\5F$\2\u021e\u021f\7c\2\2\u021f\u0228\3\2\2\2\u0220\u0228\5L\'\2\u0221"+
"\u0228\5<\37\2\u0222\u0224\7c\2\2\u0223\u0222\3\2\2\2\u0224\u0225\3\2"+
"\2\2\u0225\u0223\3\2\2\2\u0225\u0226\3\2\2\2\u0226\u0228\3\2\2\2\u0227"+
"\u021c\3\2\2\2\u0227\u021d\3\2\2\2\u0227\u0220\3\2\2\2\u0227\u0221\3\2"+
"\2\2\u0227\u0223\3\2\2\2\u02289\3\2\2\2\u0229\u022a\t\r\2\2\u022a;\3\2"+
"\2\2\u022b\u022c\t\16\2\2\u022c=\3\2\2\2\u022d\u022e\5F$\2\u022e?\3\2"+
"\2\2\u022f\u0230\7T\2\2\u0230\u0231\5*\26\2\u0231\u0232\7M\2\2\u0232\u0233"+
"\5*\26\2\u0233A\3\2\2\2\u0234\u0239\5F$\2\u0235\u0236\7\6\2\2\u0236\u0238"+
"\5F$\2\u0237\u0235\3\2\2\2\u0238\u023b\3\2\2\2\u0239\u0237\3\2\2\2\u0239"+
"\u023a\3\2\2\2\u023aC\3\2\2\2\u023b\u0239\3\2\2\2\u023c\u023d\5F$\2\u023d"+
"E\3\2\2\2\u023e\u0241\5H%\2\u023f\u0241\5J&\2\u0240\u023e\3\2\2\2\u0240"+
"\u023f\3\2\2\2\u0241G\3\2\2\2\u0242\u0245\7h\2\2\u0243\u0245\7i\2\2\u0244"+
"\u0242\3\2\2\2\u0244\u0243\3\2\2\2\u0245I\3\2\2\2\u0246\u024a\7f\2\2\u0247"+
"\u024a\5N(\2\u0248\u024a\7g\2\2\u0249\u0246\3\2\2\2\u0249\u0247\3\2\2"+
"\2\u0249\u0248\3\2\2\2\u024aK\3\2\2\2\u024b\u024e\7e\2\2\u024c\u024e\7"+
"d\2\2\u024d\u024b\3\2\2\2\u024d\u024c\3\2\2\2\u024eM\3\2\2\2\u024f\u0250"+
"\t\17\2\2\u0250O\3\2\2\2R_aenptz}\u0088\u008b\u008f\u0097\u009a\u00a6"+
"\u00a9\u00ad\u00b4\u00b8\u00bc\u00c3\u00c7\u00cb\u00d0\u00d4\u00dc\u00e0"+
"\u00e7\u00f2\u00f5\u00f9\u0105\u0108\u010e\u0115\u011c\u011f\u0123\u0127"+
"\u012b\u012d\u0138\u013d\u0141\u0144\u014a\u014d\u0153\u0156\u0158\u016b"+
"\u0178\u0186\u018b\u0193\u0195\u019a\u019d\u01a5\u01ae\u01b4\u01bc\u01c2"+
"\u01c5\u01cb\u01d7\u01d9\u01ef\u01f5\u01fc\u01ff\u0210\u0214\u0218\u0225"+
"\u0227\u0239\u0240\u0244\u0249\u024d";
public static final ATN _ATN =
new ATNDeserializer().deserialize(_serializedATN.toCharArray());
static {

View File

@ -298,6 +298,20 @@ interface SqlBaseVisitor<T> extends ParseTreeVisitor<T> {
* @return the visitor result
*/
T visitArithmeticUnary(SqlBaseParser.ArithmeticUnaryContext ctx);
/**
* Visit a parse tree produced by the {@code cast}
* labeled alternative in {@link SqlBaseParser#primaryExpression}.
* @param ctx the parse tree
* @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 constantDefault}
* labeled alternative in {@link SqlBaseParser#primaryExpression}.
@ -347,20 +361,6 @@ interface SqlBaseVisitor<T> extends ParseTreeVisitor<T> {
* @return the visitor result
*/
T visitParenthesizedExpression(SqlBaseParser.ParenthesizedExpressionContext ctx);
/**
* Visit a parse tree produced by the {@code cast}
* labeled alternative in {@link SqlBaseParser#primaryExpression}.
* @param ctx the parse tree
* @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 {@link SqlBaseParser#columnExpression}.
* @param ctx the parse tree