SeQueryParser.java
package org.gringlobal.compatibility.parser;
// Generated from SeQueryParser.g4 by ANTLR 4.9.2
import org.antlr.v4.runtime.atn.*;
import org.antlr.v4.runtime.dfa.DFA;
import org.antlr.v4.runtime.*;
import org.antlr.v4.runtime.misc.*;
import org.antlr.v4.runtime.tree.*;
import java.util.List;
import java.util.Iterator;
import java.util.ArrayList;
@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
public class SeQueryParser extends Parser {
static { RuntimeMetaData.checkVersion("4.9.2", RuntimeMetaData.VERSION); }
protected static final DFA[] _decisionToDFA;
protected static final PredictionContextCache _sharedContextCache =
new PredictionContextCache();
public static final int
AT=1, KEY_WHERE=2, EOL_COMMENT=3, COMMENT=4, WhiteSpace=5, ATSIGN=6, PLUS=7,
MINUS=8, TIMES=9, SLASH=10, PERCENT=11, DOT=12, COMMA=13, EQUAL=14, LT=15,
GT=16, LTEQ=17, GTEQ=18, NEQ=19, BANGEQ=20, LPAREN=21, RPAREN=22, K_ALL=23,
K_AND=24, K_ANY=25, K_AS=26, K_ASC=27, K_BETWEEN=28, K_BY=29, K_CASE=30,
K_COLLATE=31, K_COUNT=32, K_DESC=33, K_DISTINCT=34, K_ELSE=35, K_END=36,
K_ESCAPE=37, K_EXCEPT=38, K_EXISTS=39, K_FROM=40, K_IN=41, K_INTERSECT=42,
K_INNER=43, K_IS=44, K_JOIN=45, K_LEFT=46, K_LIKE=47, K_MINUS=48, K_NOT=49,
K_NULL=50, K_ON=51, K_OR=52, K_ORDER=53, K_OUTER=54, K_RIGHT=55, K_SELECT=56,
K_SOME=57, K_THEN=58, K_TOP=59, K_UNION=60, K_WHEN=61, K_WHERE=62, STRING=63,
DQSTRING=64, FLOAT=65, INT=66, ID=67, SINGLE_LINE_COMMENT=68, MULTI_LINE_COMMENT=69,
BARESTRING=70, WS=71, FREEOPEN=72, FREECLOSE=73;
public static final int
RULE_mixedQuery = 0, RULE_mixedBool = 1, RULE_freeExpr = 2, RULE_freeUnit = 3,
RULE_formattedBlock = 4, RULE_multiSelect = 5, RULE_singleSelect = 6,
RULE_searchCondition = 7, RULE_criterion = 8, RULE_expr = 9, RULE_parenList = 10,
RULE_subSelect = 11, RULE_selectStatement = 12, RULE_selectColumn = 13,
RULE_fromClause = 14, RULE_join = 15, RULE_joinOp = 16, RULE_fromTable = 17,
RULE_field = 18, RULE_table = 19, RULE_function = 20, RULE_embeddedFreeform = 21,
RULE_compOp = 22, RULE_boolOp = 23, RULE_setOp = 24, RULE_literal = 25,
RULE_number = 26, RULE_string = 27, RULE_lparen = 28, RULE_rparen = 29;
private static String[] makeRuleNames() {
return new String[] {
"mixedQuery", "mixedBool", "freeExpr", "freeUnit", "formattedBlock",
"multiSelect", "singleSelect", "searchCondition", "criterion", "expr",
"parenList", "subSelect", "selectStatement", "selectColumn", "fromClause",
"join", "joinOp", "fromTable", "field", "table", "function", "embeddedFreeform",
"compOp", "boolOp", "setOp", "literal", "number", "string", "lparen",
"rparen"
};
}
public static final String[] ruleNames = makeRuleNames();
private static String[] makeLiteralNames() {
return new String[] {
null, null, null, null, null, null, null, "'+'", "'-'", "'*'", "'/'",
"'%'", "'.'", "','", "'='", "'<'", "'>'", "'<='", "'>='", "'<>'", "'!='"
};
}
private static final String[] _LITERAL_NAMES = makeLiteralNames();
private static String[] makeSymbolicNames() {
return new String[] {
null, "AT", "KEY_WHERE", "EOL_COMMENT", "COMMENT", "WhiteSpace", "ATSIGN",
"PLUS", "MINUS", "TIMES", "SLASH", "PERCENT", "DOT", "COMMA", "EQUAL",
"LT", "GT", "LTEQ", "GTEQ", "NEQ", "BANGEQ", "LPAREN", "RPAREN", "K_ALL",
"K_AND", "K_ANY", "K_AS", "K_ASC", "K_BETWEEN", "K_BY", "K_CASE", "K_COLLATE",
"K_COUNT", "K_DESC", "K_DISTINCT", "K_ELSE", "K_END", "K_ESCAPE", "K_EXCEPT",
"K_EXISTS", "K_FROM", "K_IN", "K_INTERSECT", "K_INNER", "K_IS", "K_JOIN",
"K_LEFT", "K_LIKE", "K_MINUS", "K_NOT", "K_NULL", "K_ON", "K_OR", "K_ORDER",
"K_OUTER", "K_RIGHT", "K_SELECT", "K_SOME", "K_THEN", "K_TOP", "K_UNION",
"K_WHEN", "K_WHERE", "STRING", "DQSTRING", "FLOAT", "INT", "ID", "SINGLE_LINE_COMMENT",
"MULTI_LINE_COMMENT", "BARESTRING", "WS", "FREEOPEN", "FREECLOSE"
};
}
private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
/**
* @deprecated Use {@link #VOCABULARY} instead.
*/
@Deprecated
public static final String[] tokenNames;
static {
tokenNames = new String[_SYMBOLIC_NAMES.length];
for (int i = 0; i < tokenNames.length; i++) {
tokenNames[i] = VOCABULARY.getLiteralName(i);
if (tokenNames[i] == null) {
tokenNames[i] = VOCABULARY.getSymbolicName(i);
}
if (tokenNames[i] == null) {
tokenNames[i] = "<INVALID>";
}
}
}
@Override
@Deprecated
public String[] getTokenNames() {
return tokenNames;
}
@Override
public Vocabulary getVocabulary() {
return VOCABULARY;
}
@Override
public String getGrammarFileName() { return "SeQueryParser.g4"; }
@Override
public String[] getRuleNames() { return ruleNames; }
@Override
public String getSerializedATN() { return _serializedATN; }
@Override
public ATN getATN() { return _ATN; }
public SeQueryParser(TokenStream input) {
super(input);
_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
public static class MixedQueryContext extends ParserRuleContext {
public FreeExprContext freeExpr() {
return getRuleContext(FreeExprContext.class,0);
}
public MixedBoolContext mixedBool() {
return getRuleContext(MixedBoolContext.class,0);
}
public TerminalNode KEY_WHERE() { return getToken(SeQueryParser.KEY_WHERE, 0); }
public FormattedBlockContext formattedBlock() {
return getRuleContext(FormattedBlockContext.class,0);
}
public MixedQueryContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_mixedQuery; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).enterMixedQuery(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).exitMixedQuery(this);
}
@Override
public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
if ( visitor instanceof SeQueryParserVisitor ) return ((SeQueryParserVisitor<? extends T>)visitor).visitMixedQuery(this);
else return visitor.visitChildren(this);
}
}
public final MixedQueryContext mixedQuery() throws RecognitionException {
MixedQueryContext _localctx = new MixedQueryContext(_ctx, getState());
enterRule(_localctx, 0, RULE_mixedQuery);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(61);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,0,_ctx) ) {
case 1:
{
setState(60);
freeExpr(0);
}
break;
}
setState(64);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==K_AND || _la==K_OR) {
{
setState(63);
mixedBool();
}
}
setState(67);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==KEY_WHERE) {
{
setState(66);
match(KEY_WHERE);
}
}
setState(70);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << AT) | (1L << ATSIGN) | (1L << PLUS) | (1L << MINUS) | (1L << LPAREN) | (1L << K_CASE) | (1L << K_EXISTS) | (1L << K_NOT) | (1L << STRING))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (DQSTRING - 64)) | (1L << (FLOAT - 64)) | (1L << (INT - 64)) | (1L << (ID - 64)) | (1L << (BARESTRING - 64)) | (1L << (FREEOPEN - 64)))) != 0)) {
{
setState(69);
formattedBlock();
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class MixedBoolContext extends ParserRuleContext {
public TerminalNode K_AND() { return getToken(SeQueryParser.K_AND, 0); }
public TerminalNode K_OR() { return getToken(SeQueryParser.K_OR, 0); }
public MixedBoolContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_mixedBool; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).enterMixedBool(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).exitMixedBool(this);
}
@Override
public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
if ( visitor instanceof SeQueryParserVisitor ) return ((SeQueryParserVisitor<? extends T>)visitor).visitMixedBool(this);
else return visitor.visitChildren(this);
}
}
public final MixedBoolContext mixedBool() throws RecognitionException {
MixedBoolContext _localctx = new MixedBoolContext(_ctx, getState());
enterRule(_localctx, 2, RULE_mixedBool);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(72);
_la = _input.LA(1);
if ( !(_la==K_AND || _la==K_OR) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class FreeExprContext extends ParserRuleContext {
public FreeExprContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_freeExpr; }
public FreeExprContext() { }
public void copyFrom(FreeExprContext ctx) {
super.copyFrom(ctx);
}
}
public static class FreeParenContext extends FreeExprContext {
public TerminalNode LPAREN() { return getToken(SeQueryParser.LPAREN, 0); }
public FreeExprContext freeExpr() {
return getRuleContext(FreeExprContext.class,0);
}
public TerminalNode RPAREN() { return getToken(SeQueryParser.RPAREN, 0); }
public FreeParenContext(FreeExprContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).enterFreeParen(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).exitFreeParen(this);
}
@Override
public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
if ( visitor instanceof SeQueryParserVisitor ) return ((SeQueryParserVisitor<? extends T>)visitor).visitFreeParen(this);
else return visitor.visitChildren(this);
}
}
public static class FreeWhatContext extends FreeExprContext {
public List<FreeExprContext> freeExpr() {
return getRuleContexts(FreeExprContext.class);
}
public FreeExprContext freeExpr(int i) {
return getRuleContext(FreeExprContext.class,i);
}
public FreeWhatContext(FreeExprContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).enterFreeWhat(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).exitFreeWhat(this);
}
@Override
public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
if ( visitor instanceof SeQueryParserVisitor ) return ((SeQueryParserVisitor<? extends T>)visitor).visitFreeWhat(this);
else return visitor.visitChildren(this);
}
}
public static class FreeSingleContext extends FreeExprContext {
public FreeUnitContext freeUnit() {
return getRuleContext(FreeUnitContext.class,0);
}
public FreeSingleContext(FreeExprContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).enterFreeSingle(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).exitFreeSingle(this);
}
@Override
public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
if ( visitor instanceof SeQueryParserVisitor ) return ((SeQueryParserVisitor<? extends T>)visitor).visitFreeSingle(this);
else return visitor.visitChildren(this);
}
}
public static class FreeNotContext extends FreeExprContext {
public List<FreeExprContext> freeExpr() {
return getRuleContexts(FreeExprContext.class);
}
public FreeExprContext freeExpr(int i) {
return getRuleContext(FreeExprContext.class,i);
}
public TerminalNode K_AND() { return getToken(SeQueryParser.K_AND, 0); }
public TerminalNode K_NOT() { return getToken(SeQueryParser.K_NOT, 0); }
public FreeNotContext(FreeExprContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).enterFreeNot(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).exitFreeNot(this);
}
@Override
public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
if ( visitor instanceof SeQueryParserVisitor ) return ((SeQueryParserVisitor<? extends T>)visitor).visitFreeNot(this);
else return visitor.visitChildren(this);
}
}
public static class FreeAndContext extends FreeExprContext {
public List<FreeExprContext> freeExpr() {
return getRuleContexts(FreeExprContext.class);
}
public FreeExprContext freeExpr(int i) {
return getRuleContext(FreeExprContext.class,i);
}
public TerminalNode K_AND() { return getToken(SeQueryParser.K_AND, 0); }
public FreeAndContext(FreeExprContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).enterFreeAnd(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).exitFreeAnd(this);
}
@Override
public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
if ( visitor instanceof SeQueryParserVisitor ) return ((SeQueryParserVisitor<? extends T>)visitor).visitFreeAnd(this);
else return visitor.visitChildren(this);
}
}
public static class FreeOrContext extends FreeExprContext {
public List<FreeExprContext> freeExpr() {
return getRuleContexts(FreeExprContext.class);
}
public FreeExprContext freeExpr(int i) {
return getRuleContext(FreeExprContext.class,i);
}
public TerminalNode K_OR() { return getToken(SeQueryParser.K_OR, 0); }
public FreeOrContext(FreeExprContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).enterFreeOr(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).exitFreeOr(this);
}
@Override
public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
if ( visitor instanceof SeQueryParserVisitor ) return ((SeQueryParserVisitor<? extends T>)visitor).visitFreeOr(this);
else return visitor.visitChildren(this);
}
}
public final FreeExprContext freeExpr() throws RecognitionException {
return freeExpr(0);
}
private FreeExprContext freeExpr(int _p) throws RecognitionException {
ParserRuleContext _parentctx = _ctx;
int _parentState = getState();
FreeExprContext _localctx = new FreeExprContext(_ctx, _parentState);
FreeExprContext _prevctx = _localctx;
int _startState = 4;
enterRecursionRule(_localctx, 4, RULE_freeExpr, _p);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(80);
_errHandler.sync(this);
switch (_input.LA(1)) {
case LPAREN:
{
_localctx = new FreeParenContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(75);
match(LPAREN);
setState(76);
freeExpr(0);
setState(77);
match(RPAREN);
}
break;
case STRING:
case DQSTRING:
case BARESTRING:
{
_localctx = new FreeSingleContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(79);
freeUnit();
}
break;
default:
throw new NoViableAltException(this);
}
_ctx.stop = _input.LT(-1);
setState(100);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,7,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
if ( _parseListeners!=null ) triggerExitRuleEvent();
_prevctx = _localctx;
{
setState(98);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,6,_ctx) ) {
case 1:
{
_localctx = new FreeNotContext(new FreeExprContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_freeExpr);
setState(82);
if (!(precpred(_ctx, 6))) throw new FailedPredicateException(this, "precpred(_ctx, 6)");
setState(83);
match(K_AND);
setState(84);
match(K_NOT);
setState(85);
freeExpr(7);
}
break;
case 2:
{
_localctx = new FreeAndContext(new FreeExprContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_freeExpr);
setState(86);
if (!(precpred(_ctx, 5))) throw new FailedPredicateException(this, "precpred(_ctx, 5)");
setState(87);
match(K_AND);
setState(88);
freeExpr(6);
}
break;
case 3:
{
_localctx = new FreeOrContext(new FreeExprContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_freeExpr);
setState(89);
if (!(precpred(_ctx, 4))) throw new FailedPredicateException(this, "precpred(_ctx, 4)");
setState(90);
match(K_OR);
setState(91);
freeExpr(5);
}
break;
case 4:
{
_localctx = new FreeWhatContext(new FreeExprContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_freeExpr);
setState(92);
if (!(precpred(_ctx, 3))) throw new FailedPredicateException(this, "precpred(_ctx, 3)");
setState(94);
_errHandler.sync(this);
_alt = 1;
do {
switch (_alt) {
case 1:
{
{
setState(93);
freeExpr(0);
}
}
break;
default:
throw new NoViableAltException(this);
}
setState(96);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,5,_ctx);
} while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
}
break;
}
}
}
setState(102);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,7,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
unrollRecursionContexts(_parentctx);
}
return _localctx;
}
public static class FreeUnitContext extends ParserRuleContext {
public TerminalNode DQSTRING() { return getToken(SeQueryParser.DQSTRING, 0); }
public TerminalNode STRING() { return getToken(SeQueryParser.STRING, 0); }
public TerminalNode BARESTRING() { return getToken(SeQueryParser.BARESTRING, 0); }
public FreeUnitContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_freeUnit; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).enterFreeUnit(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).exitFreeUnit(this);
}
@Override
public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
if ( visitor instanceof SeQueryParserVisitor ) return ((SeQueryParserVisitor<? extends T>)visitor).visitFreeUnit(this);
else return visitor.visitChildren(this);
}
}
public final FreeUnitContext freeUnit() throws RecognitionException {
FreeUnitContext _localctx = new FreeUnitContext(_ctx, getState());
enterRule(_localctx, 6, RULE_freeUnit);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(103);
_la = _input.LA(1);
if ( !(((((_la - 63)) & ~0x3f) == 0 && ((1L << (_la - 63)) & ((1L << (STRING - 63)) | (1L << (DQSTRING - 63)) | (1L << (BARESTRING - 63)))) != 0)) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class FormattedBlockContext extends ParserRuleContext {
public MultiSelectContext multiSelect() {
return getRuleContext(MultiSelectContext.class,0);
}
public FormattedBlockContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_formattedBlock; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).enterFormattedBlock(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).exitFormattedBlock(this);
}
@Override
public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
if ( visitor instanceof SeQueryParserVisitor ) return ((SeQueryParserVisitor<? extends T>)visitor).visitFormattedBlock(this);
else return visitor.visitChildren(this);
}
}
public final FormattedBlockContext formattedBlock() throws RecognitionException {
FormattedBlockContext _localctx = new FormattedBlockContext(_ctx, getState());
enterRule(_localctx, 8, RULE_formattedBlock);
try {
enterOuterAlt(_localctx, 1);
{
setState(105);
multiSelect(0);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class MultiSelectContext extends ParserRuleContext {
public LparenContext lparen() {
return getRuleContext(LparenContext.class,0);
}
public List<MultiSelectContext> multiSelect() {
return getRuleContexts(MultiSelectContext.class);
}
public MultiSelectContext multiSelect(int i) {
return getRuleContext(MultiSelectContext.class,i);
}
public RparenContext rparen() {
return getRuleContext(RparenContext.class,0);
}
public SingleSelectContext singleSelect() {
return getRuleContext(SingleSelectContext.class,0);
}
public SetOpContext setOp() {
return getRuleContext(SetOpContext.class,0);
}
public MultiSelectContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_multiSelect; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).enterMultiSelect(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).exitMultiSelect(this);
}
@Override
public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
if ( visitor instanceof SeQueryParserVisitor ) return ((SeQueryParserVisitor<? extends T>)visitor).visitMultiSelect(this);
else return visitor.visitChildren(this);
}
}
public final MultiSelectContext multiSelect() throws RecognitionException {
return multiSelect(0);
}
private MultiSelectContext multiSelect(int _p) throws RecognitionException {
ParserRuleContext _parentctx = _ctx;
int _parentState = getState();
MultiSelectContext _localctx = new MultiSelectContext(_ctx, _parentState);
MultiSelectContext _prevctx = _localctx;
int _startState = 10;
enterRecursionRule(_localctx, 10, RULE_multiSelect, _p);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(113);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,8,_ctx) ) {
case 1:
{
setState(108);
lparen();
setState(109);
multiSelect(0);
setState(110);
rparen();
}
break;
case 2:
{
setState(112);
singleSelect();
}
break;
}
_ctx.stop = _input.LT(-1);
setState(121);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,9,_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 MultiSelectContext(_parentctx, _parentState);
pushNewRecursionContext(_localctx, _startState, RULE_multiSelect);
setState(115);
if (!(precpred(_ctx, 3))) throw new FailedPredicateException(this, "precpred(_ctx, 3)");
setState(116);
setOp();
setState(117);
multiSelect(4);
}
}
}
setState(123);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,9,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
unrollRecursionContexts(_parentctx);
}
return _localctx;
}
public static class SingleSelectContext extends ParserRuleContext {
public SearchConditionContext searchCondition() {
return getRuleContext(SearchConditionContext.class,0);
}
public SingleSelectContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_singleSelect; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).enterSingleSelect(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).exitSingleSelect(this);
}
@Override
public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
if ( visitor instanceof SeQueryParserVisitor ) return ((SeQueryParserVisitor<? extends T>)visitor).visitSingleSelect(this);
else return visitor.visitChildren(this);
}
}
public final SingleSelectContext singleSelect() throws RecognitionException {
SingleSelectContext _localctx = new SingleSelectContext(_ctx, getState());
enterRule(_localctx, 12, RULE_singleSelect);
try {
enterOuterAlt(_localctx, 1);
{
setState(124);
searchCondition(0);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class SearchConditionContext extends ParserRuleContext {
public TerminalNode K_NOT() { return getToken(SeQueryParser.K_NOT, 0); }
public List<SearchConditionContext> searchCondition() {
return getRuleContexts(SearchConditionContext.class);
}
public SearchConditionContext searchCondition(int i) {
return getRuleContext(SearchConditionContext.class,i);
}
public LparenContext lparen() {
return getRuleContext(LparenContext.class,0);
}
public RparenContext rparen() {
return getRuleContext(RparenContext.class,0);
}
public CriterionContext criterion() {
return getRuleContext(CriterionContext.class,0);
}
public EmbeddedFreeformContext embeddedFreeform() {
return getRuleContext(EmbeddedFreeformContext.class,0);
}
public BoolOpContext boolOp() {
return getRuleContext(BoolOpContext.class,0);
}
public SearchConditionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_searchCondition; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).enterSearchCondition(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).exitSearchCondition(this);
}
@Override
public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
if ( visitor instanceof SeQueryParserVisitor ) return ((SeQueryParserVisitor<? extends T>)visitor).visitSearchCondition(this);
else return visitor.visitChildren(this);
}
}
public final SearchConditionContext searchCondition() throws RecognitionException {
return searchCondition(0);
}
private SearchConditionContext searchCondition(int _p) throws RecognitionException {
ParserRuleContext _parentctx = _ctx;
int _parentState = getState();
SearchConditionContext _localctx = new SearchConditionContext(_ctx, _parentState);
SearchConditionContext _prevctx = _localctx;
int _startState = 14;
enterRecursionRule(_localctx, 14, RULE_searchCondition, _p);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(135);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,10,_ctx) ) {
case 1:
{
setState(127);
match(K_NOT);
setState(128);
searchCondition(5);
}
break;
case 2:
{
setState(129);
lparen();
setState(130);
searchCondition(0);
setState(131);
rparen();
}
break;
case 3:
{
setState(133);
criterion();
}
break;
case 4:
{
setState(134);
embeddedFreeform();
}
break;
}
_ctx.stop = _input.LT(-1);
setState(144);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,12,_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 SearchConditionContext(_parentctx, _parentState);
pushNewRecursionContext(_localctx, _startState, RULE_searchCondition);
setState(137);
if (!(precpred(_ctx, 4))) throw new FailedPredicateException(this, "precpred(_ctx, 4)");
setState(139);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==K_AND || _la==K_OR) {
{
setState(138);
boolOp();
}
}
setState(141);
searchCondition(5);
}
}
}
setState(146);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,12,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
unrollRecursionContexts(_parentctx);
}
return _localctx;
}
public static class CriterionContext extends ParserRuleContext {
public List<ExprContext> expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public CompOpContext compOp() {
return getRuleContext(CompOpContext.class,0);
}
public TerminalNode K_LIKE() { return getToken(SeQueryParser.K_LIKE, 0); }
public TerminalNode K_NOT() { return getToken(SeQueryParser.K_NOT, 0); }
public TerminalNode K_ESCAPE() { return getToken(SeQueryParser.K_ESCAPE, 0); }
public StringContext string() {
return getRuleContext(StringContext.class,0);
}
public TerminalNode K_BETWEEN() { return getToken(SeQueryParser.K_BETWEEN, 0); }
public TerminalNode K_AND() { return getToken(SeQueryParser.K_AND, 0); }
public TerminalNode K_IS() { return getToken(SeQueryParser.K_IS, 0); }
public TerminalNode K_NULL() { return getToken(SeQueryParser.K_NULL, 0); }
public TerminalNode K_IN() { return getToken(SeQueryParser.K_IN, 0); }
public ParenListContext parenList() {
return getRuleContext(ParenListContext.class,0);
}
public SubSelectContext subSelect() {
return getRuleContext(SubSelectContext.class,0);
}
public TerminalNode K_ALL() { return getToken(SeQueryParser.K_ALL, 0); }
public TerminalNode K_SOME() { return getToken(SeQueryParser.K_SOME, 0); }
public TerminalNode K_ANY() { return getToken(SeQueryParser.K_ANY, 0); }
public TerminalNode K_EXISTS() { return getToken(SeQueryParser.K_EXISTS, 0); }
public CriterionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_criterion; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).enterCriterion(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).exitCriterion(this);
}
@Override
public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
if ( visitor instanceof SeQueryParserVisitor ) return ((SeQueryParserVisitor<? extends T>)visitor).visitCriterion(this);
else return visitor.visitChildren(this);
}
}
public final CriterionContext criterion() throws RecognitionException {
CriterionContext _localctx = new CriterionContext(_ctx, getState());
enterRule(_localctx, 16, RULE_criterion);
int _la;
try {
setState(193);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,19,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(147);
expr(0);
setState(148);
compOp();
setState(149);
expr(0);
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(151);
expr(0);
setState(153);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==K_NOT) {
{
setState(152);
match(K_NOT);
}
}
setState(155);
match(K_LIKE);
setState(156);
expr(0);
setState(159);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,14,_ctx) ) {
case 1:
{
setState(157);
match(K_ESCAPE);
setState(158);
string();
}
break;
}
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(161);
expr(0);
setState(163);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==K_NOT) {
{
setState(162);
match(K_NOT);
}
}
setState(165);
match(K_BETWEEN);
setState(166);
expr(0);
setState(167);
match(K_AND);
setState(168);
expr(0);
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(170);
expr(0);
setState(171);
match(K_IS);
setState(173);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==K_NOT) {
{
setState(172);
match(K_NOT);
}
}
setState(175);
match(K_NULL);
}
break;
case 5:
enterOuterAlt(_localctx, 5);
{
setState(177);
expr(0);
setState(179);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==K_NOT) {
{
setState(178);
match(K_NOT);
}
}
setState(181);
match(K_IN);
setState(184);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,18,_ctx) ) {
case 1:
{
setState(182);
parenList();
}
break;
case 2:
{
setState(183);
subSelect();
}
break;
}
}
break;
case 6:
enterOuterAlt(_localctx, 6);
{
setState(186);
expr(0);
setState(187);
compOp();
setState(188);
_la = _input.LA(1);
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << K_ALL) | (1L << K_ANY) | (1L << K_SOME))) != 0)) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(189);
subSelect();
}
break;
case 7:
enterOuterAlt(_localctx, 7);
{
setState(191);
match(K_EXISTS);
setState(192);
subSelect();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ExprContext extends ParserRuleContext {
public FieldContext field() {
return getRuleContext(FieldContext.class,0);
}
public LiteralContext literal() {
return getRuleContext(LiteralContext.class,0);
}
public List<ExprContext> expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public TerminalNode PLUS() { return getToken(SeQueryParser.PLUS, 0); }
public TerminalNode MINUS() { return getToken(SeQueryParser.MINUS, 0); }
public FunctionContext function() {
return getRuleContext(FunctionContext.class,0);
}
public ParenListContext parenList() {
return getRuleContext(ParenListContext.class,0);
}
public TerminalNode LPAREN() { return getToken(SeQueryParser.LPAREN, 0); }
public TerminalNode RPAREN() { return getToken(SeQueryParser.RPAREN, 0); }
public SubSelectContext subSelect() {
return getRuleContext(SubSelectContext.class,0);
}
public TerminalNode K_CASE() { return getToken(SeQueryParser.K_CASE, 0); }
public TerminalNode K_END() { return getToken(SeQueryParser.K_END, 0); }
public List<TerminalNode> K_WHEN() { return getTokens(SeQueryParser.K_WHEN); }
public TerminalNode K_WHEN(int i) {
return getToken(SeQueryParser.K_WHEN, i);
}
public List<SearchConditionContext> searchCondition() {
return getRuleContexts(SearchConditionContext.class);
}
public SearchConditionContext searchCondition(int i) {
return getRuleContext(SearchConditionContext.class,i);
}
public List<TerminalNode> K_THEN() { return getTokens(SeQueryParser.K_THEN); }
public TerminalNode K_THEN(int i) {
return getToken(SeQueryParser.K_THEN, i);
}
public TerminalNode K_ELSE() { return getToken(SeQueryParser.K_ELSE, 0); }
public TerminalNode TIMES() { return getToken(SeQueryParser.TIMES, 0); }
public TerminalNode SLASH() { return getToken(SeQueryParser.SLASH, 0); }
public TerminalNode PERCENT() { return getToken(SeQueryParser.PERCENT, 0); }
public TerminalNode K_COLLATE() { return getToken(SeQueryParser.K_COLLATE, 0); }
public TerminalNode ID() { return getToken(SeQueryParser.ID, 0); }
public ExprContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_expr; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).enterExpr(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).exitExpr(this);
}
@Override
public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
if ( visitor instanceof SeQueryParserVisitor ) return ((SeQueryParserVisitor<? extends T>)visitor).visitExpr(this);
else return visitor.visitChildren(this);
}
}
public final ExprContext expr() throws RecognitionException {
return expr(0);
}
private ExprContext expr(int _p) throws RecognitionException {
ParserRuleContext _parentctx = _ctx;
int _parentState = getState();
ExprContext _localctx = new ExprContext(_ctx, _parentState);
ExprContext _prevctx = _localctx;
int _startState = 18;
enterRecursionRule(_localctx, 18, RULE_expr, _p);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(241);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,24,_ctx) ) {
case 1:
{
setState(196);
field();
}
break;
case 2:
{
setState(197);
literal();
}
break;
case 3:
{
setState(198);
_la = _input.LA(1);
if ( !(_la==PLUS || _la==MINUS) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(199);
expr(8);
}
break;
case 4:
{
setState(200);
function();
setState(201);
parenList();
}
break;
case 5:
{
setState(203);
match(LPAREN);
setState(204);
expr(0);
setState(205);
match(RPAREN);
}
break;
case 6:
{
setState(207);
subSelect();
}
break;
case 7:
{
setState(208);
match(K_CASE);
setState(214);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
setState(209);
match(K_WHEN);
setState(210);
searchCondition(0);
setState(211);
match(K_THEN);
setState(212);
expr(0);
}
}
setState(216);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( _la==K_WHEN );
setState(220);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==K_ELSE) {
{
setState(218);
match(K_ELSE);
setState(219);
expr(0);
}
}
setState(222);
match(K_END);
}
break;
case 8:
{
setState(224);
match(K_CASE);
setState(225);
expr(0);
setState(231);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
setState(226);
match(K_WHEN);
setState(227);
expr(0);
setState(228);
match(K_THEN);
setState(229);
expr(0);
}
}
setState(233);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( _la==K_WHEN );
setState(237);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==K_ELSE) {
{
setState(235);
match(K_ELSE);
setState(236);
expr(0);
}
}
setState(239);
match(K_END);
}
break;
}
_ctx.stop = _input.LT(-1);
setState(251);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,26,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
if ( _parseListeners!=null ) triggerExitRuleEvent();
_prevctx = _localctx;
{
setState(249);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,25,_ctx) ) {
case 1:
{
_localctx = new ExprContext(_parentctx, _parentState);
pushNewRecursionContext(_localctx, _startState, RULE_expr);
setState(243);
if (!(precpred(_ctx, 7))) throw new FailedPredicateException(this, "precpred(_ctx, 7)");
setState(244);
_la = _input.LA(1);
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << PLUS) | (1L << MINUS) | (1L << TIMES) | (1L << SLASH) | (1L << PERCENT))) != 0)) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(245);
expr(8);
}
break;
case 2:
{
_localctx = new ExprContext(_parentctx, _parentState);
pushNewRecursionContext(_localctx, _startState, RULE_expr);
setState(246);
if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)");
setState(247);
match(K_COLLATE);
setState(248);
match(ID);
}
break;
}
}
}
setState(253);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,26,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
unrollRecursionContexts(_parentctx);
}
return _localctx;
}
public static class ParenListContext extends ParserRuleContext {
public LparenContext lparen() {
return getRuleContext(LparenContext.class,0);
}
public RparenContext rparen() {
return getRuleContext(RparenContext.class,0);
}
public List<ExprContext> expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public List<TerminalNode> COMMA() { return getTokens(SeQueryParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(SeQueryParser.COMMA, i);
}
public ParenListContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_parenList; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).enterParenList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).exitParenList(this);
}
@Override
public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
if ( visitor instanceof SeQueryParserVisitor ) return ((SeQueryParserVisitor<? extends T>)visitor).visitParenList(this);
else return visitor.visitChildren(this);
}
}
public final ParenListContext parenList() throws RecognitionException {
ParenListContext _localctx = new ParenListContext(_ctx, getState());
enterRule(_localctx, 20, RULE_parenList);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(254);
lparen();
setState(263);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << AT) | (1L << ATSIGN) | (1L << PLUS) | (1L << MINUS) | (1L << LPAREN) | (1L << K_CASE) | (1L << STRING))) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & ((1L << (FLOAT - 65)) | (1L << (INT - 65)) | (1L << (ID - 65)) | (1L << (FREEOPEN - 65)))) != 0)) {
{
setState(255);
expr(0);
setState(260);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==COMMA) {
{
{
setState(256);
match(COMMA);
setState(257);
expr(0);
}
}
setState(262);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
}
setState(265);
rparen();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class SubSelectContext extends ParserRuleContext {
public LparenContext lparen() {
return getRuleContext(LparenContext.class,0);
}
public SelectStatementContext selectStatement() {
return getRuleContext(SelectStatementContext.class,0);
}
public RparenContext rparen() {
return getRuleContext(RparenContext.class,0);
}
public SubSelectContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_subSelect; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).enterSubSelect(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).exitSubSelect(this);
}
@Override
public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
if ( visitor instanceof SeQueryParserVisitor ) return ((SeQueryParserVisitor<? extends T>)visitor).visitSubSelect(this);
else return visitor.visitChildren(this);
}
}
public final SubSelectContext subSelect() throws RecognitionException {
SubSelectContext _localctx = new SubSelectContext(_ctx, getState());
enterRule(_localctx, 22, RULE_subSelect);
try {
enterOuterAlt(_localctx, 1);
{
setState(267);
lparen();
setState(268);
selectStatement();
setState(269);
rparen();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class SelectStatementContext extends ParserRuleContext {
public TerminalNode K_SELECT() { return getToken(SeQueryParser.K_SELECT, 0); }
public List<SelectColumnContext> selectColumn() {
return getRuleContexts(SelectColumnContext.class);
}
public SelectColumnContext selectColumn(int i) {
return getRuleContext(SelectColumnContext.class,i);
}
public FromClauseContext fromClause() {
return getRuleContext(FromClauseContext.class,0);
}
public TerminalNode K_DISTINCT() { return getToken(SeQueryParser.K_DISTINCT, 0); }
public TerminalNode K_TOP() { return getToken(SeQueryParser.K_TOP, 0); }
public TerminalNode INT() { return getToken(SeQueryParser.INT, 0); }
public List<TerminalNode> COMMA() { return getTokens(SeQueryParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(SeQueryParser.COMMA, i);
}
public TerminalNode K_WHERE() { return getToken(SeQueryParser.K_WHERE, 0); }
public SearchConditionContext searchCondition() {
return getRuleContext(SearchConditionContext.class,0);
}
public TerminalNode K_ORDER() { return getToken(SeQueryParser.K_ORDER, 0); }
public TerminalNode K_BY() { return getToken(SeQueryParser.K_BY, 0); }
public List<ExprContext> expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public TerminalNode K_ASC() { return getToken(SeQueryParser.K_ASC, 0); }
public TerminalNode K_DESC() { return getToken(SeQueryParser.K_DESC, 0); }
public SelectStatementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_selectStatement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).enterSelectStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).exitSelectStatement(this);
}
@Override
public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
if ( visitor instanceof SeQueryParserVisitor ) return ((SeQueryParserVisitor<? extends T>)visitor).visitSelectStatement(this);
else return visitor.visitChildren(this);
}
}
public final SelectStatementContext selectStatement() throws RecognitionException {
SelectStatementContext _localctx = new SelectStatementContext(_ctx, getState());
enterRule(_localctx, 24, RULE_selectStatement);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(271);
match(K_SELECT);
setState(273);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==K_DISTINCT) {
{
setState(272);
match(K_DISTINCT);
}
}
setState(277);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==K_TOP) {
{
setState(275);
match(K_TOP);
setState(276);
match(INT);
}
}
setState(279);
selectColumn();
setState(284);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==COMMA) {
{
{
setState(280);
match(COMMA);
setState(281);
selectColumn();
}
}
setState(286);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(287);
fromClause();
setState(290);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==K_WHERE) {
{
setState(288);
match(K_WHERE);
setState(289);
searchCondition(0);
}
}
setState(305);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==K_ORDER) {
{
setState(292);
match(K_ORDER);
setState(293);
match(K_BY);
setState(294);
expr(0);
setState(299);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==COMMA) {
{
{
setState(295);
match(COMMA);
setState(296);
expr(0);
}
}
setState(301);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(303);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==K_ASC || _la==K_DESC) {
{
setState(302);
_la = _input.LA(1);
if ( !(_la==K_ASC || _la==K_DESC) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class SelectColumnContext extends ParserRuleContext {
public TerminalNode TIMES() { return getToken(SeQueryParser.TIMES, 0); }
public TerminalNode ID() { return getToken(SeQueryParser.ID, 0); }
public TerminalNode K_COUNT() { return getToken(SeQueryParser.K_COUNT, 0); }
public LparenContext lparen() {
return getRuleContext(LparenContext.class,0);
}
public RparenContext rparen() {
return getRuleContext(RparenContext.class,0);
}
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode K_ALL() { return getToken(SeQueryParser.K_ALL, 0); }
public TerminalNode K_DISTINCT() { return getToken(SeQueryParser.K_DISTINCT, 0); }
public TerminalNode K_AS() { return getToken(SeQueryParser.K_AS, 0); }
public SelectColumnContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_selectColumn; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).enterSelectColumn(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).exitSelectColumn(this);
}
@Override
public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
if ( visitor instanceof SeQueryParserVisitor ) return ((SeQueryParserVisitor<? extends T>)visitor).visitSelectColumn(this);
else return visitor.visitChildren(this);
}
}
public final SelectColumnContext selectColumn() throws RecognitionException {
SelectColumnContext _localctx = new SelectColumnContext(_ctx, getState());
enterRule(_localctx, 26, RULE_selectColumn);
int _la;
try {
setState(334);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,42,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(307);
match(TIMES);
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(308);
match(ID);
setState(309);
matchWildcard();
setState(310);
match(TIMES);
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(311);
match(K_COUNT);
setState(312);
lparen();
setState(318);
_errHandler.sync(this);
switch (_input.LA(1)) {
case TIMES:
{
setState(313);
match(TIMES);
}
break;
case AT:
case ATSIGN:
case PLUS:
case MINUS:
case LPAREN:
case K_ALL:
case K_CASE:
case K_DISTINCT:
case STRING:
case FLOAT:
case INT:
case ID:
case FREEOPEN:
{
setState(315);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==K_ALL || _la==K_DISTINCT) {
{
setState(314);
_la = _input.LA(1);
if ( !(_la==K_ALL || _la==K_DISTINCT) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
setState(317);
expr(0);
}
break;
default:
throw new NoViableAltException(this);
}
setState(320);
rparen();
setState(325);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==K_AS || _la==ID) {
{
setState(322);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==K_AS) {
{
setState(321);
match(K_AS);
}
}
setState(324);
match(ID);
}
}
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(327);
expr(0);
setState(332);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==K_AS || _la==ID) {
{
setState(329);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==K_AS) {
{
setState(328);
match(K_AS);
}
}
setState(331);
match(ID);
}
}
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class FromClauseContext extends ParserRuleContext {
public TerminalNode K_FROM() { return getToken(SeQueryParser.K_FROM, 0); }
public List<FromTableContext> fromTable() {
return getRuleContexts(FromTableContext.class);
}
public FromTableContext fromTable(int i) {
return getRuleContext(FromTableContext.class,i);
}
public List<TerminalNode> COMMA() { return getTokens(SeQueryParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(SeQueryParser.COMMA, i);
}
public List<JoinContext> join() {
return getRuleContexts(JoinContext.class);
}
public JoinContext join(int i) {
return getRuleContext(JoinContext.class,i);
}
public FromClauseContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_fromClause; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).enterFromClause(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).exitFromClause(this);
}
@Override
public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
if ( visitor instanceof SeQueryParserVisitor ) return ((SeQueryParserVisitor<? extends T>)visitor).visitFromClause(this);
else return visitor.visitChildren(this);
}
}
public final FromClauseContext fromClause() throws RecognitionException {
FromClauseContext _localctx = new FromClauseContext(_ctx, getState());
enterRule(_localctx, 28, RULE_fromClause);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(336);
match(K_FROM);
setState(337);
fromTable();
setState(351);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,45,_ctx) ) {
case 1:
{
setState(342);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==COMMA) {
{
{
setState(338);
match(COMMA);
setState(339);
fromTable();
}
}
setState(344);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
break;
case 2:
{
setState(348);
_errHandler.sync(this);
_la = _input.LA(1);
while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << K_INNER) | (1L << K_JOIN) | (1L << K_LEFT) | (1L << K_OUTER) | (1L << K_RIGHT))) != 0)) {
{
{
setState(345);
join();
}
}
setState(350);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class JoinContext extends ParserRuleContext {
public JoinOpContext joinOp() {
return getRuleContext(JoinOpContext.class,0);
}
public FromTableContext fromTable() {
return getRuleContext(FromTableContext.class,0);
}
public TerminalNode K_ON() { return getToken(SeQueryParser.K_ON, 0); }
public SearchConditionContext searchCondition() {
return getRuleContext(SearchConditionContext.class,0);
}
public JoinContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_join; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).enterJoin(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).exitJoin(this);
}
@Override
public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
if ( visitor instanceof SeQueryParserVisitor ) return ((SeQueryParserVisitor<? extends T>)visitor).visitJoin(this);
else return visitor.visitChildren(this);
}
}
public final JoinContext join() throws RecognitionException {
JoinContext _localctx = new JoinContext(_ctx, getState());
enterRule(_localctx, 30, RULE_join);
try {
enterOuterAlt(_localctx, 1);
{
setState(353);
joinOp();
setState(354);
fromTable();
setState(355);
match(K_ON);
setState(356);
searchCondition(0);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class JoinOpContext extends ParserRuleContext {
public TerminalNode K_JOIN() { return getToken(SeQueryParser.K_JOIN, 0); }
public TerminalNode K_INNER() { return getToken(SeQueryParser.K_INNER, 0); }
public TerminalNode K_OUTER() { return getToken(SeQueryParser.K_OUTER, 0); }
public TerminalNode K_LEFT() { return getToken(SeQueryParser.K_LEFT, 0); }
public TerminalNode K_RIGHT() { return getToken(SeQueryParser.K_RIGHT, 0); }
public JoinOpContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_joinOp; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).enterJoinOp(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).exitJoinOp(this);
}
@Override
public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
if ( visitor instanceof SeQueryParserVisitor ) return ((SeQueryParserVisitor<? extends T>)visitor).visitJoinOp(this);
else return visitor.visitChildren(this);
}
}
public final JoinOpContext joinOp() throws RecognitionException {
JoinOpContext _localctx = new JoinOpContext(_ctx, getState());
enterRule(_localctx, 32, RULE_joinOp);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(359);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << K_INNER) | (1L << K_LEFT) | (1L << K_OUTER) | (1L << K_RIGHT))) != 0)) {
{
setState(358);
_la = _input.LA(1);
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << K_INNER) | (1L << K_LEFT) | (1L << K_OUTER) | (1L << K_RIGHT))) != 0)) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
setState(361);
match(K_JOIN);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class FromTableContext extends ParserRuleContext {
public List<TerminalNode> ID() { return getTokens(SeQueryParser.ID); }
public TerminalNode ID(int i) {
return getToken(SeQueryParser.ID, i);
}
public TerminalNode K_AS() { return getToken(SeQueryParser.K_AS, 0); }
public FromTableContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_fromTable; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).enterFromTable(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).exitFromTable(this);
}
@Override
public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
if ( visitor instanceof SeQueryParserVisitor ) return ((SeQueryParserVisitor<? extends T>)visitor).visitFromTable(this);
else return visitor.visitChildren(this);
}
}
public final FromTableContext fromTable() throws RecognitionException {
FromTableContext _localctx = new FromTableContext(_ctx, getState());
enterRule(_localctx, 34, RULE_fromTable);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(363);
match(ID);
setState(368);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==K_AS || _la==ID) {
{
setState(365);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==K_AS) {
{
setState(364);
match(K_AS);
}
}
setState(367);
match(ID);
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class FieldContext extends ParserRuleContext {
public TerminalNode ID() { return getToken(SeQueryParser.ID, 0); }
public TableContext table() {
return getRuleContext(TableContext.class,0);
}
public TerminalNode DOT() { return getToken(SeQueryParser.DOT, 0); }
public TerminalNode AT() { return getToken(SeQueryParser.AT, 0); }
public TerminalNode ATSIGN() { return getToken(SeQueryParser.ATSIGN, 0); }
public FieldContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_field; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).enterField(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).exitField(this);
}
@Override
public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
if ( visitor instanceof SeQueryParserVisitor ) return ((SeQueryParserVisitor<? extends T>)visitor).visitField(this);
else return visitor.visitChildren(this);
}
}
public final FieldContext field() throws RecognitionException {
FieldContext _localctx = new FieldContext(_ctx, getState());
enterRule(_localctx, 36, RULE_field);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(371);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==AT || _la==ATSIGN) {
{
setState(370);
_la = _input.LA(1);
if ( !(_la==AT || _la==ATSIGN) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
setState(376);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,50,_ctx) ) {
case 1:
{
setState(373);
table();
setState(374);
match(DOT);
}
break;
}
setState(378);
match(ID);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class TableContext extends ParserRuleContext {
public TerminalNode ID() { return getToken(SeQueryParser.ID, 0); }
public TableContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_table; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).enterTable(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).exitTable(this);
}
@Override
public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
if ( visitor instanceof SeQueryParserVisitor ) return ((SeQueryParserVisitor<? extends T>)visitor).visitTable(this);
else return visitor.visitChildren(this);
}
}
public final TableContext table() throws RecognitionException {
TableContext _localctx = new TableContext(_ctx, getState());
enterRule(_localctx, 38, RULE_table);
try {
enterOuterAlt(_localctx, 1);
{
setState(380);
match(ID);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class FunctionContext extends ParserRuleContext {
public List<TerminalNode> ID() { return getTokens(SeQueryParser.ID); }
public TerminalNode ID(int i) {
return getToken(SeQueryParser.ID, i);
}
public TerminalNode DOT() { return getToken(SeQueryParser.DOT, 0); }
public FunctionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_function; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).enterFunction(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).exitFunction(this);
}
@Override
public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
if ( visitor instanceof SeQueryParserVisitor ) return ((SeQueryParserVisitor<? extends T>)visitor).visitFunction(this);
else return visitor.visitChildren(this);
}
}
public final FunctionContext function() throws RecognitionException {
FunctionContext _localctx = new FunctionContext(_ctx, getState());
enterRule(_localctx, 40, RULE_function);
try {
enterOuterAlt(_localctx, 1);
{
setState(384);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,51,_ctx) ) {
case 1:
{
setState(382);
match(ID);
setState(383);
match(DOT);
}
break;
}
setState(386);
match(ID);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class EmbeddedFreeformContext extends ParserRuleContext {
public TerminalNode STRING() { return getToken(SeQueryParser.STRING, 0); }
public TerminalNode DQSTRING() { return getToken(SeQueryParser.DQSTRING, 0); }
public TerminalNode ID() { return getToken(SeQueryParser.ID, 0); }
public TerminalNode INT() { return getToken(SeQueryParser.INT, 0); }
public TerminalNode FLOAT() { return getToken(SeQueryParser.FLOAT, 0); }
public TerminalNode BARESTRING() { return getToken(SeQueryParser.BARESTRING, 0); }
public EmbeddedFreeformContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_embeddedFreeform; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).enterEmbeddedFreeform(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).exitEmbeddedFreeform(this);
}
@Override
public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
if ( visitor instanceof SeQueryParserVisitor ) return ((SeQueryParserVisitor<? extends T>)visitor).visitEmbeddedFreeform(this);
else return visitor.visitChildren(this);
}
}
public final EmbeddedFreeformContext embeddedFreeform() throws RecognitionException {
EmbeddedFreeformContext _localctx = new EmbeddedFreeformContext(_ctx, getState());
enterRule(_localctx, 42, RULE_embeddedFreeform);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(388);
_la = _input.LA(1);
if ( !(((((_la - 63)) & ~0x3f) == 0 && ((1L << (_la - 63)) & ((1L << (STRING - 63)) | (1L << (DQSTRING - 63)) | (1L << (FLOAT - 63)) | (1L << (INT - 63)) | (1L << (ID - 63)) | (1L << (BARESTRING - 63)))) != 0)) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class CompOpContext extends ParserRuleContext {
public TerminalNode EQUAL() { return getToken(SeQueryParser.EQUAL, 0); }
public TerminalNode BANGEQ() { return getToken(SeQueryParser.BANGEQ, 0); }
public TerminalNode NEQ() { return getToken(SeQueryParser.NEQ, 0); }
public TerminalNode LTEQ() { return getToken(SeQueryParser.LTEQ, 0); }
public TerminalNode GTEQ() { return getToken(SeQueryParser.GTEQ, 0); }
public TerminalNode LT() { return getToken(SeQueryParser.LT, 0); }
public TerminalNode GT() { return getToken(SeQueryParser.GT, 0); }
public CompOpContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_compOp; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).enterCompOp(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).exitCompOp(this);
}
@Override
public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
if ( visitor instanceof SeQueryParserVisitor ) return ((SeQueryParserVisitor<? extends T>)visitor).visitCompOp(this);
else return visitor.visitChildren(this);
}
}
public final CompOpContext compOp() throws RecognitionException {
CompOpContext _localctx = new CompOpContext(_ctx, getState());
enterRule(_localctx, 44, RULE_compOp);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(390);
_la = _input.LA(1);
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << EQUAL) | (1L << LT) | (1L << GT) | (1L << LTEQ) | (1L << GTEQ) | (1L << NEQ) | (1L << BANGEQ))) != 0)) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class BoolOpContext extends ParserRuleContext {
public TerminalNode K_AND() { return getToken(SeQueryParser.K_AND, 0); }
public TerminalNode K_OR() { return getToken(SeQueryParser.K_OR, 0); }
public BoolOpContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_boolOp; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).enterBoolOp(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).exitBoolOp(this);
}
@Override
public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
if ( visitor instanceof SeQueryParserVisitor ) return ((SeQueryParserVisitor<? extends T>)visitor).visitBoolOp(this);
else return visitor.visitChildren(this);
}
}
public final BoolOpContext boolOp() throws RecognitionException {
BoolOpContext _localctx = new BoolOpContext(_ctx, getState());
enterRule(_localctx, 46, RULE_boolOp);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(392);
_la = _input.LA(1);
if ( !(_la==K_AND || _la==K_OR) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class SetOpContext extends ParserRuleContext {
public TerminalNode K_UNION() { return getToken(SeQueryParser.K_UNION, 0); }
public TerminalNode K_MINUS() { return getToken(SeQueryParser.K_MINUS, 0); }
public TerminalNode K_EXCEPT() { return getToken(SeQueryParser.K_EXCEPT, 0); }
public TerminalNode K_INTERSECT() { return getToken(SeQueryParser.K_INTERSECT, 0); }
public SetOpContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_setOp; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).enterSetOp(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).exitSetOp(this);
}
@Override
public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
if ( visitor instanceof SeQueryParserVisitor ) return ((SeQueryParserVisitor<? extends T>)visitor).visitSetOp(this);
else return visitor.visitChildren(this);
}
}
public final SetOpContext setOp() throws RecognitionException {
SetOpContext _localctx = new SetOpContext(_ctx, getState());
enterRule(_localctx, 48, RULE_setOp);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(394);
_la = _input.LA(1);
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << K_EXCEPT) | (1L << K_INTERSECT) | (1L << K_MINUS) | (1L << K_UNION))) != 0)) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class LiteralContext extends ParserRuleContext {
public NumberContext number() {
return getRuleContext(NumberContext.class,0);
}
public StringContext string() {
return getRuleContext(StringContext.class,0);
}
public LiteralContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_literal; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).enterLiteral(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).exitLiteral(this);
}
@Override
public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
if ( visitor instanceof SeQueryParserVisitor ) return ((SeQueryParserVisitor<? extends T>)visitor).visitLiteral(this);
else return visitor.visitChildren(this);
}
}
public final LiteralContext literal() throws RecognitionException {
LiteralContext _localctx = new LiteralContext(_ctx, getState());
enterRule(_localctx, 50, RULE_literal);
try {
setState(398);
_errHandler.sync(this);
switch (_input.LA(1)) {
case FLOAT:
case INT:
enterOuterAlt(_localctx, 1);
{
setState(396);
number();
}
break;
case STRING:
enterOuterAlt(_localctx, 2);
{
setState(397);
string();
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class NumberContext extends ParserRuleContext {
public TerminalNode FLOAT() { return getToken(SeQueryParser.FLOAT, 0); }
public TerminalNode INT() { return getToken(SeQueryParser.INT, 0); }
public NumberContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_number; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).enterNumber(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).exitNumber(this);
}
@Override
public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
if ( visitor instanceof SeQueryParserVisitor ) return ((SeQueryParserVisitor<? extends T>)visitor).visitNumber(this);
else return visitor.visitChildren(this);
}
}
public final NumberContext number() throws RecognitionException {
NumberContext _localctx = new NumberContext(_ctx, getState());
enterRule(_localctx, 52, RULE_number);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(400);
_la = _input.LA(1);
if ( !(_la==FLOAT || _la==INT) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class StringContext extends ParserRuleContext {
public TerminalNode STRING() { return getToken(SeQueryParser.STRING, 0); }
public StringContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_string; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).enterString(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).exitString(this);
}
@Override
public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
if ( visitor instanceof SeQueryParserVisitor ) return ((SeQueryParserVisitor<? extends T>)visitor).visitString(this);
else return visitor.visitChildren(this);
}
}
public final StringContext string() throws RecognitionException {
StringContext _localctx = new StringContext(_ctx, getState());
enterRule(_localctx, 54, RULE_string);
try {
enterOuterAlt(_localctx, 1);
{
setState(402);
match(STRING);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class LparenContext extends ParserRuleContext {
public TerminalNode LPAREN() { return getToken(SeQueryParser.LPAREN, 0); }
public TerminalNode FREEOPEN() { return getToken(SeQueryParser.FREEOPEN, 0); }
public LparenContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_lparen; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).enterLparen(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).exitLparen(this);
}
@Override
public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
if ( visitor instanceof SeQueryParserVisitor ) return ((SeQueryParserVisitor<? extends T>)visitor).visitLparen(this);
else return visitor.visitChildren(this);
}
}
public final LparenContext lparen() throws RecognitionException {
LparenContext _localctx = new LparenContext(_ctx, getState());
enterRule(_localctx, 56, RULE_lparen);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(404);
_la = _input.LA(1);
if ( !(_la==LPAREN || _la==FREEOPEN) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class RparenContext extends ParserRuleContext {
public TerminalNode RPAREN() { return getToken(SeQueryParser.RPAREN, 0); }
public TerminalNode FREECLOSE() { return getToken(SeQueryParser.FREECLOSE, 0); }
public RparenContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_rparen; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).enterRparen(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof SeQueryParserListener ) ((SeQueryParserListener)listener).exitRparen(this);
}
@Override
public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
if ( visitor instanceof SeQueryParserVisitor ) return ((SeQueryParserVisitor<? extends T>)visitor).visitRparen(this);
else return visitor.visitChildren(this);
}
}
public final RparenContext rparen() throws RecognitionException {
RparenContext _localctx = new RparenContext(_ctx, getState());
enterRule(_localctx, 58, RULE_rparen);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(406);
_la = _input.LA(1);
if ( !(_la==RPAREN || _la==FREECLOSE) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) {
switch (ruleIndex) {
case 2:
return freeExpr_sempred((FreeExprContext)_localctx, predIndex);
case 5:
return multiSelect_sempred((MultiSelectContext)_localctx, predIndex);
case 7:
return searchCondition_sempred((SearchConditionContext)_localctx, predIndex);
case 9:
return expr_sempred((ExprContext)_localctx, predIndex);
}
return true;
}
private boolean freeExpr_sempred(FreeExprContext _localctx, int predIndex) {
switch (predIndex) {
case 0:
return precpred(_ctx, 6);
case 1:
return precpred(_ctx, 5);
case 2:
return precpred(_ctx, 4);
case 3:
return precpred(_ctx, 3);
}
return true;
}
private boolean multiSelect_sempred(MultiSelectContext _localctx, int predIndex) {
switch (predIndex) {
case 4:
return precpred(_ctx, 3);
}
return true;
}
private boolean searchCondition_sempred(SearchConditionContext _localctx, int predIndex) {
switch (predIndex) {
case 5:
return precpred(_ctx, 4);
}
return true;
}
private boolean expr_sempred(ExprContext _localctx, int predIndex) {
switch (predIndex) {
case 6:
return precpred(_ctx, 7);
case 7:
return precpred(_ctx, 1);
}
return true;
}
public static final String _serializedATN =
"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3K\u019b\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"+
"\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\3\2\5\2@"+
"\n\2\3\2\5\2C\n\2\3\2\5\2F\n\2\3\2\5\2I\n\2\3\3\3\3\3\4\3\4\3\4\3\4\3"+
"\4\3\4\5\4S\n\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\6\4a\n"+
"\4\r\4\16\4b\7\4e\n\4\f\4\16\4h\13\4\3\5\3\5\3\6\3\6\3\7\3\7\3\7\3\7\3"+
"\7\3\7\5\7t\n\7\3\7\3\7\3\7\3\7\7\7z\n\7\f\7\16\7}\13\7\3\b\3\b\3\t\3"+
"\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\5\t\u008a\n\t\3\t\3\t\5\t\u008e\n\t\3\t"+
"\7\t\u0091\n\t\f\t\16\t\u0094\13\t\3\n\3\n\3\n\3\n\3\n\3\n\5\n\u009c\n"+
"\n\3\n\3\n\3\n\3\n\5\n\u00a2\n\n\3\n\3\n\5\n\u00a6\n\n\3\n\3\n\3\n\3\n"+
"\3\n\3\n\3\n\3\n\5\n\u00b0\n\n\3\n\3\n\3\n\3\n\5\n\u00b6\n\n\3\n\3\n\3"+
"\n\5\n\u00bb\n\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\5\n\u00c4\n\n\3\13\3\13\3"+
"\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3"+
"\13\3\13\3\13\6\13\u00d9\n\13\r\13\16\13\u00da\3\13\3\13\5\13\u00df\n"+
"\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\6\13\u00ea\n\13\r\13"+
"\16\13\u00eb\3\13\3\13\5\13\u00f0\n\13\3\13\3\13\5\13\u00f4\n\13\3\13"+
"\3\13\3\13\3\13\3\13\3\13\7\13\u00fc\n\13\f\13\16\13\u00ff\13\13\3\f\3"+
"\f\3\f\3\f\7\f\u0105\n\f\f\f\16\f\u0108\13\f\5\f\u010a\n\f\3\f\3\f\3\r"+
"\3\r\3\r\3\r\3\16\3\16\5\16\u0114\n\16\3\16\3\16\5\16\u0118\n\16\3\16"+
"\3\16\3\16\7\16\u011d\n\16\f\16\16\16\u0120\13\16\3\16\3\16\3\16\5\16"+
"\u0125\n\16\3\16\3\16\3\16\3\16\3\16\7\16\u012c\n\16\f\16\16\16\u012f"+
"\13\16\3\16\5\16\u0132\n\16\5\16\u0134\n\16\3\17\3\17\3\17\3\17\3\17\3"+
"\17\3\17\3\17\5\17\u013e\n\17\3\17\5\17\u0141\n\17\3\17\3\17\5\17\u0145"+
"\n\17\3\17\5\17\u0148\n\17\3\17\3\17\5\17\u014c\n\17\3\17\5\17\u014f\n"+
"\17\5\17\u0151\n\17\3\20\3\20\3\20\3\20\7\20\u0157\n\20\f\20\16\20\u015a"+
"\13\20\3\20\7\20\u015d\n\20\f\20\16\20\u0160\13\20\5\20\u0162\n\20\3\21"+
"\3\21\3\21\3\21\3\21\3\22\5\22\u016a\n\22\3\22\3\22\3\23\3\23\5\23\u0170"+
"\n\23\3\23\5\23\u0173\n\23\3\24\5\24\u0176\n\24\3\24\3\24\3\24\5\24\u017b"+
"\n\24\3\24\3\24\3\25\3\25\3\26\3\26\5\26\u0183\n\26\3\26\3\26\3\27\3\27"+
"\3\30\3\30\3\31\3\31\3\32\3\32\3\33\3\33\5\33\u0191\n\33\3\34\3\34\3\35"+
"\3\35\3\36\3\36\3\37\3\37\3\37\2\6\6\f\20\24 \2\4\6\b\n\f\16\20\22\24"+
"\26\30\32\34\36 \"$&(*,.\60\62\64\668:<\2\21\4\2\32\32\66\66\4\2ABHH\5"+
"\2\31\31\33\33;;\3\2\t\n\3\2\t\r\4\2\35\35##\4\2\31\31$$\5\2--\60\608"+
"9\4\2\3\3\b\b\4\2AEHH\3\2\20\26\6\2((,,\62\62>>\3\2CD\4\2\27\27JJ\4\2"+
"\30\30KK\2\u01c2\2?\3\2\2\2\4J\3\2\2\2\6R\3\2\2\2\bi\3\2\2\2\nk\3\2\2"+
"\2\fs\3\2\2\2\16~\3\2\2\2\20\u0089\3\2\2\2\22\u00c3\3\2\2\2\24\u00f3\3"+
"\2\2\2\26\u0100\3\2\2\2\30\u010d\3\2\2\2\32\u0111\3\2\2\2\34\u0150\3\2"+
"\2\2\36\u0152\3\2\2\2 \u0163\3\2\2\2\"\u0169\3\2\2\2$\u016d\3\2\2\2&\u0175"+
"\3\2\2\2(\u017e\3\2\2\2*\u0182\3\2\2\2,\u0186\3\2\2\2.\u0188\3\2\2\2\60"+
"\u018a\3\2\2\2\62\u018c\3\2\2\2\64\u0190\3\2\2\2\66\u0192\3\2\2\28\u0194"+
"\3\2\2\2:\u0196\3\2\2\2<\u0198\3\2\2\2>@\5\6\4\2?>\3\2\2\2?@\3\2\2\2@"+
"B\3\2\2\2AC\5\4\3\2BA\3\2\2\2BC\3\2\2\2CE\3\2\2\2DF\7\4\2\2ED\3\2\2\2"+
"EF\3\2\2\2FH\3\2\2\2GI\5\n\6\2HG\3\2\2\2HI\3\2\2\2I\3\3\2\2\2JK\t\2\2"+
"\2K\5\3\2\2\2LM\b\4\1\2MN\7\27\2\2NO\5\6\4\2OP\7\30\2\2PS\3\2\2\2QS\5"+
"\b\5\2RL\3\2\2\2RQ\3\2\2\2Sf\3\2\2\2TU\f\b\2\2UV\7\32\2\2VW\7\63\2\2W"+
"e\5\6\4\tXY\f\7\2\2YZ\7\32\2\2Ze\5\6\4\b[\\\f\6\2\2\\]\7\66\2\2]e\5\6"+
"\4\7^`\f\5\2\2_a\5\6\4\2`_\3\2\2\2ab\3\2\2\2b`\3\2\2\2bc\3\2\2\2ce\3\2"+
"\2\2dT\3\2\2\2dX\3\2\2\2d[\3\2\2\2d^\3\2\2\2eh\3\2\2\2fd\3\2\2\2fg\3\2"+
"\2\2g\7\3\2\2\2hf\3\2\2\2ij\t\3\2\2j\t\3\2\2\2kl\5\f\7\2l\13\3\2\2\2m"+
"n\b\7\1\2no\5:\36\2op\5\f\7\2pq\5<\37\2qt\3\2\2\2rt\5\16\b\2sm\3\2\2\2"+
"sr\3\2\2\2t{\3\2\2\2uv\f\5\2\2vw\5\62\32\2wx\5\f\7\6xz\3\2\2\2yu\3\2\2"+
"\2z}\3\2\2\2{y\3\2\2\2{|\3\2\2\2|\r\3\2\2\2}{\3\2\2\2~\177\5\20\t\2\177"+
"\17\3\2\2\2\u0080\u0081\b\t\1\2\u0081\u0082\7\63\2\2\u0082\u008a\5\20"+
"\t\7\u0083\u0084\5:\36\2\u0084\u0085\5\20\t\2\u0085\u0086\5<\37\2\u0086"+
"\u008a\3\2\2\2\u0087\u008a\5\22\n\2\u0088\u008a\5,\27\2\u0089\u0080\3"+
"\2\2\2\u0089\u0083\3\2\2\2\u0089\u0087\3\2\2\2\u0089\u0088\3\2\2\2\u008a"+
"\u0092\3\2\2\2\u008b\u008d\f\6\2\2\u008c\u008e\5\60\31\2\u008d\u008c\3"+
"\2\2\2\u008d\u008e\3\2\2\2\u008e\u008f\3\2\2\2\u008f\u0091\5\20\t\7\u0090"+
"\u008b\3\2\2\2\u0091\u0094\3\2\2\2\u0092\u0090\3\2\2\2\u0092\u0093\3\2"+
"\2\2\u0093\21\3\2\2\2\u0094\u0092\3\2\2\2\u0095\u0096\5\24\13\2\u0096"+
"\u0097\5.\30\2\u0097\u0098\5\24\13\2\u0098\u00c4\3\2\2\2\u0099\u009b\5"+
"\24\13\2\u009a\u009c\7\63\2\2\u009b\u009a\3\2\2\2\u009b\u009c\3\2\2\2"+
"\u009c\u009d\3\2\2\2\u009d\u009e\7\61\2\2\u009e\u00a1\5\24\13\2\u009f"+
"\u00a0\7\'\2\2\u00a0\u00a2\58\35\2\u00a1\u009f\3\2\2\2\u00a1\u00a2\3\2"+
"\2\2\u00a2\u00c4\3\2\2\2\u00a3\u00a5\5\24\13\2\u00a4\u00a6\7\63\2\2\u00a5"+
"\u00a4\3\2\2\2\u00a5\u00a6\3\2\2\2\u00a6\u00a7\3\2\2\2\u00a7\u00a8\7\36"+
"\2\2\u00a8\u00a9\5\24\13\2\u00a9\u00aa\7\32\2\2\u00aa\u00ab\5\24\13\2"+
"\u00ab\u00c4\3\2\2\2\u00ac\u00ad\5\24\13\2\u00ad\u00af\7.\2\2\u00ae\u00b0"+
"\7\63\2\2\u00af\u00ae\3\2\2\2\u00af\u00b0\3\2\2\2\u00b0\u00b1\3\2\2\2"+
"\u00b1\u00b2\7\64\2\2\u00b2\u00c4\3\2\2\2\u00b3\u00b5\5\24\13\2\u00b4"+
"\u00b6\7\63\2\2\u00b5\u00b4\3\2\2\2\u00b5\u00b6\3\2\2\2\u00b6\u00b7\3"+
"\2\2\2\u00b7\u00ba\7+\2\2\u00b8\u00bb\5\26\f\2\u00b9\u00bb\5\30\r\2\u00ba"+
"\u00b8\3\2\2\2\u00ba\u00b9\3\2\2\2\u00bb\u00c4\3\2\2\2\u00bc\u00bd\5\24"+
"\13\2\u00bd\u00be\5.\30\2\u00be\u00bf\t\4\2\2\u00bf\u00c0\5\30\r\2\u00c0"+
"\u00c4\3\2\2\2\u00c1\u00c2\7)\2\2\u00c2\u00c4\5\30\r\2\u00c3\u0095\3\2"+
"\2\2\u00c3\u0099\3\2\2\2\u00c3\u00a3\3\2\2\2\u00c3\u00ac\3\2\2\2\u00c3"+
"\u00b3\3\2\2\2\u00c3\u00bc\3\2\2\2\u00c3\u00c1\3\2\2\2\u00c4\23\3\2\2"+
"\2\u00c5\u00c6\b\13\1\2\u00c6\u00f4\5&\24\2\u00c7\u00f4\5\64\33\2\u00c8"+
"\u00c9\t\5\2\2\u00c9\u00f4\5\24\13\n\u00ca\u00cb\5*\26\2\u00cb\u00cc\5"+
"\26\f\2\u00cc\u00f4\3\2\2\2\u00cd\u00ce\7\27\2\2\u00ce\u00cf\5\24\13\2"+
"\u00cf\u00d0\7\30\2\2\u00d0\u00f4\3\2\2\2\u00d1\u00f4\5\30\r\2\u00d2\u00d8"+
"\7 \2\2\u00d3\u00d4\7?\2\2\u00d4\u00d5\5\20\t\2\u00d5\u00d6\7<\2\2\u00d6"+
"\u00d7\5\24\13\2\u00d7\u00d9\3\2\2\2\u00d8\u00d3\3\2\2\2\u00d9\u00da\3"+
"\2\2\2\u00da\u00d8\3\2\2\2\u00da\u00db\3\2\2\2\u00db\u00de\3\2\2\2\u00dc"+
"\u00dd\7%\2\2\u00dd\u00df\5\24\13\2\u00de\u00dc\3\2\2\2\u00de\u00df\3"+
"\2\2\2\u00df\u00e0\3\2\2\2\u00e0\u00e1\7&\2\2\u00e1\u00f4\3\2\2\2\u00e2"+
"\u00e3\7 \2\2\u00e3\u00e9\5\24\13\2\u00e4\u00e5\7?\2\2\u00e5\u00e6\5\24"+
"\13\2\u00e6\u00e7\7<\2\2\u00e7\u00e8\5\24\13\2\u00e8\u00ea\3\2\2\2\u00e9"+
"\u00e4\3\2\2\2\u00ea\u00eb\3\2\2\2\u00eb\u00e9\3\2\2\2\u00eb\u00ec\3\2"+
"\2\2\u00ec\u00ef\3\2\2\2\u00ed\u00ee\7%\2\2\u00ee\u00f0\5\24\13\2\u00ef"+
"\u00ed\3\2\2\2\u00ef\u00f0\3\2\2\2\u00f0\u00f1\3\2\2\2\u00f1\u00f2\7&"+
"\2\2\u00f2\u00f4\3\2\2\2\u00f3\u00c5\3\2\2\2\u00f3\u00c7\3\2\2\2\u00f3"+
"\u00c8\3\2\2\2\u00f3\u00ca\3\2\2\2\u00f3\u00cd\3\2\2\2\u00f3\u00d1\3\2"+
"\2\2\u00f3\u00d2\3\2\2\2\u00f3\u00e2\3\2\2\2\u00f4\u00fd\3\2\2\2\u00f5"+
"\u00f6\f\t\2\2\u00f6\u00f7\t\6\2\2\u00f7\u00fc\5\24\13\n\u00f8\u00f9\f"+
"\3\2\2\u00f9\u00fa\7!\2\2\u00fa\u00fc\7E\2\2\u00fb\u00f5\3\2\2\2\u00fb"+
"\u00f8\3\2\2\2\u00fc\u00ff\3\2\2\2\u00fd\u00fb\3\2\2\2\u00fd\u00fe\3\2"+
"\2\2\u00fe\25\3\2\2\2\u00ff\u00fd\3\2\2\2\u0100\u0109\5:\36\2\u0101\u0106"+
"\5\24\13\2\u0102\u0103\7\17\2\2\u0103\u0105\5\24\13\2\u0104\u0102\3\2"+
"\2\2\u0105\u0108\3\2\2\2\u0106\u0104\3\2\2\2\u0106\u0107\3\2\2\2\u0107"+
"\u010a\3\2\2\2\u0108\u0106\3\2\2\2\u0109\u0101\3\2\2\2\u0109\u010a\3\2"+
"\2\2\u010a\u010b\3\2\2\2\u010b\u010c\5<\37\2\u010c\27\3\2\2\2\u010d\u010e"+
"\5:\36\2\u010e\u010f\5\32\16\2\u010f\u0110\5<\37\2\u0110\31\3\2\2\2\u0111"+
"\u0113\7:\2\2\u0112\u0114\7$\2\2\u0113\u0112\3\2\2\2\u0113\u0114\3\2\2"+
"\2\u0114\u0117\3\2\2\2\u0115\u0116\7=\2\2\u0116\u0118\7D\2\2\u0117\u0115"+
"\3\2\2\2\u0117\u0118\3\2\2\2\u0118\u0119\3\2\2\2\u0119\u011e\5\34\17\2"+
"\u011a\u011b\7\17\2\2\u011b\u011d\5\34\17\2\u011c\u011a\3\2\2\2\u011d"+
"\u0120\3\2\2\2\u011e\u011c\3\2\2\2\u011e\u011f\3\2\2\2\u011f\u0121\3\2"+
"\2\2\u0120\u011e\3\2\2\2\u0121\u0124\5\36\20\2\u0122\u0123\7@\2\2\u0123"+
"\u0125\5\20\t\2\u0124\u0122\3\2\2\2\u0124\u0125\3\2\2\2\u0125\u0133\3"+
"\2\2\2\u0126\u0127\7\67\2\2\u0127\u0128\7\37\2\2\u0128\u012d\5\24\13\2"+
"\u0129\u012a\7\17\2\2\u012a\u012c\5\24\13\2\u012b\u0129\3\2\2\2\u012c"+
"\u012f\3\2\2\2\u012d\u012b\3\2\2\2\u012d\u012e\3\2\2\2\u012e\u0131\3\2"+
"\2\2\u012f\u012d\3\2\2\2\u0130\u0132\t\7\2\2\u0131\u0130\3\2\2\2\u0131"+
"\u0132\3\2\2\2\u0132\u0134\3\2\2\2\u0133\u0126\3\2\2\2\u0133\u0134\3\2"+
"\2\2\u0134\33\3\2\2\2\u0135\u0151\7\13\2\2\u0136\u0137\7E\2\2\u0137\u0138"+
"\13\2\2\2\u0138\u0151\7\13\2\2\u0139\u013a\7\"\2\2\u013a\u0140\5:\36\2"+
"\u013b\u0141\7\13\2\2\u013c\u013e\t\b\2\2\u013d\u013c\3\2\2\2\u013d\u013e"+
"\3\2\2\2\u013e\u013f\3\2\2\2\u013f\u0141\5\24\13\2\u0140\u013b\3\2\2\2"+
"\u0140\u013d\3\2\2\2\u0141\u0142\3\2\2\2\u0142\u0147\5<\37\2\u0143\u0145"+
"\7\34\2\2\u0144\u0143\3\2\2\2\u0144\u0145\3\2\2\2\u0145\u0146\3\2\2\2"+
"\u0146\u0148\7E\2\2\u0147\u0144\3\2\2\2\u0147\u0148\3\2\2\2\u0148\u0151"+
"\3\2\2\2\u0149\u014e\5\24\13\2\u014a\u014c\7\34\2\2\u014b\u014a\3\2\2"+
"\2\u014b\u014c\3\2\2\2\u014c\u014d\3\2\2\2\u014d\u014f\7E\2\2\u014e\u014b"+
"\3\2\2\2\u014e\u014f\3\2\2\2\u014f\u0151\3\2\2\2\u0150\u0135\3\2\2\2\u0150"+
"\u0136\3\2\2\2\u0150\u0139\3\2\2\2\u0150\u0149\3\2\2\2\u0151\35\3\2\2"+
"\2\u0152\u0153\7*\2\2\u0153\u0161\5$\23\2\u0154\u0155\7\17\2\2\u0155\u0157"+
"\5$\23\2\u0156\u0154\3\2\2\2\u0157\u015a\3\2\2\2\u0158\u0156\3\2\2\2\u0158"+
"\u0159\3\2\2\2\u0159\u0162\3\2\2\2\u015a\u0158\3\2\2\2\u015b\u015d\5 "+
"\21\2\u015c\u015b\3\2\2\2\u015d\u0160\3\2\2\2\u015e\u015c\3\2\2\2\u015e"+
"\u015f\3\2\2\2\u015f\u0162\3\2\2\2\u0160\u015e\3\2\2\2\u0161\u0158\3\2"+
"\2\2\u0161\u015e\3\2\2\2\u0162\37\3\2\2\2\u0163\u0164\5\"\22\2\u0164\u0165"+
"\5$\23\2\u0165\u0166\7\65\2\2\u0166\u0167\5\20\t\2\u0167!\3\2\2\2\u0168"+
"\u016a\t\t\2\2\u0169\u0168\3\2\2\2\u0169\u016a\3\2\2\2\u016a\u016b\3\2"+
"\2\2\u016b\u016c\7/\2\2\u016c#\3\2\2\2\u016d\u0172\7E\2\2\u016e\u0170"+
"\7\34\2\2\u016f\u016e\3\2\2\2\u016f\u0170\3\2\2\2\u0170\u0171\3\2\2\2"+
"\u0171\u0173\7E\2\2\u0172\u016f\3\2\2\2\u0172\u0173\3\2\2\2\u0173%\3\2"+
"\2\2\u0174\u0176\t\n\2\2\u0175\u0174\3\2\2\2\u0175\u0176\3\2\2\2\u0176"+
"\u017a\3\2\2\2\u0177\u0178\5(\25\2\u0178\u0179\7\16\2\2\u0179\u017b\3"+
"\2\2\2\u017a\u0177\3\2\2\2\u017a\u017b\3\2\2\2\u017b\u017c\3\2\2\2\u017c"+
"\u017d\7E\2\2\u017d\'\3\2\2\2\u017e\u017f\7E\2\2\u017f)\3\2\2\2\u0180"+
"\u0181\7E\2\2\u0181\u0183\7\16\2\2\u0182\u0180\3\2\2\2\u0182\u0183\3\2"+
"\2\2\u0183\u0184\3\2\2\2\u0184\u0185\7E\2\2\u0185+\3\2\2\2\u0186\u0187"+
"\t\13\2\2\u0187-\3\2\2\2\u0188\u0189\t\f\2\2\u0189/\3\2\2\2\u018a\u018b"+
"\t\2\2\2\u018b\61\3\2\2\2\u018c\u018d\t\r\2\2\u018d\63\3\2\2\2\u018e\u0191"+
"\5\66\34\2\u018f\u0191\58\35\2\u0190\u018e\3\2\2\2\u0190\u018f\3\2\2\2"+
"\u0191\65\3\2\2\2\u0192\u0193\t\16\2\2\u0193\67\3\2\2\2\u0194\u0195\7"+
"A\2\2\u01959\3\2\2\2\u0196\u0197\t\17\2\2\u0197;\3\2\2\2\u0198\u0199\t"+
"\20\2\2\u0199=\3\2\2\2\67?BEHRbdfs{\u0089\u008d\u0092\u009b\u00a1\u00a5"+
"\u00af\u00b5\u00ba\u00c3\u00da\u00de\u00eb\u00ef\u00f3\u00fb\u00fd\u0106"+
"\u0109\u0113\u0117\u011e\u0124\u012d\u0131\u0133\u013d\u0140\u0144\u0147"+
"\u014b\u014e\u0150\u0158\u015e\u0161\u0169\u016f\u0172\u0175\u017a\u0182"+
"\u0190";
public static final ATN _ATN =
new ATNDeserializer().deserialize(_serializedATN.toCharArray());
static {
_decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
_decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
}
}
}