All Downloads are FREE. Search and download functionalities are using the official Maven repository.

.runtime.wavemaker-app-runtime-db.11.8.4.source-code.HqlFilterParser Maven / Gradle / Ivy

There is a newer version: 11.9.2.ee
Show newest version
// Generated from HqlFilter.g4 by ANTLR 4.13.2

/**
 * Copyright (C) 2020 WaveMaker, Inc.
 * 

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at *

* http://www.apache.org/licenses/LICENSE-2.0 *

* Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.wavemaker.runtime.data.filter.parser.antlr4; 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", "CheckReturnValue", "this-escape"}) public class HqlFilterParser extends Parser { static { RuntimeMetaData.checkVersion("4.13.2", RuntimeMetaData.VERSION); } protected static final DFA[] _decisionToDFA; protected static final PredictionContextCache _sharedContextCache = new PredictionContextCache(); public static final int WHITESPACE=1, COMMA=2, BRAC_OPEN=3, BRAC_CLOSE=4, SINGLE_QUOTE=5, HYPHEN=6, BETWEEN=7, IN=8, AND=9, LIKE=10, OR=11, IS=12, NOT=13, NULL=14, FUNCTION=15, OPERATOR=16, BOOLEAN_VALUE=17, NUMBER_VALUE=18, STRING_VALUE=19, KEY=20; public static final int RULE_whereClause = 0, RULE_logicalExpression = 1, RULE_expression = 2, RULE_condition = 3, RULE_comparison = 4, RULE_between = 5, RULE_in = 6, RULE_notIn = 7, RULE_like = 8, RULE_notLike = 9, RULE_isNull = 10, RULE_isNotNull = 11, RULE_commaSeparatedValues = 12, RULE_key = 13, RULE_string = 14, RULE_number = 15, RULE_function = 16; private static String[] makeRuleNames() { return new String[] { "whereClause", "logicalExpression", "expression", "condition", "comparison", "between", "in", "notIn", "like", "notLike", "isNull", "isNotNull", "commaSeparatedValues", "key", "string", "number", "function" }; } public static final String[] ruleNames = makeRuleNames(); private static String[] makeLiteralNames() { return new String[] { null, "' '", "','", "'('", "')'", "'''", "'-'" }; } private static final String[] _LITERAL_NAMES = makeLiteralNames(); private static String[] makeSymbolicNames() { return new String[] { null, "WHITESPACE", "COMMA", "BRAC_OPEN", "BRAC_CLOSE", "SINGLE_QUOTE", "HYPHEN", "BETWEEN", "IN", "AND", "LIKE", "OR", "IS", "NOT", "NULL", "FUNCTION", "OPERATOR", "BOOLEAN_VALUE", "NUMBER_VALUE", "STRING_VALUE", "KEY" }; } 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] = ""; } } } @Override @Deprecated public String[] getTokenNames() { return tokenNames; } @Override public Vocabulary getVocabulary() { return VOCABULARY; } @Override public String getGrammarFileName() { return "HqlFilter.g4"; } @Override public String[] getRuleNames() { return ruleNames; } @Override public String getSerializedATN() { return _serializedATN; } @Override public ATN getATN() { return _ATN; } public HqlFilterParser(TokenStream input) { super(input); _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); } @SuppressWarnings("CheckReturnValue") public static class WhereClauseContext extends ParserRuleContext { public LogicalExpressionContext logicalExpression() { return getRuleContext(LogicalExpressionContext.class,0); } public TerminalNode EOF() { return getToken(HqlFilterParser.EOF, 0); } public WhereClauseContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_whereClause; } @Override public void enterRule(ParseTreeListener listener) { if ( listener instanceof HqlFilterListener ) ((HqlFilterListener)listener).enterWhereClause(this); } @Override public void exitRule(ParseTreeListener listener) { if ( listener instanceof HqlFilterListener ) ((HqlFilterListener)listener).exitWhereClause(this); } } public final WhereClauseContext whereClause() throws RecognitionException { WhereClauseContext _localctx = new WhereClauseContext(_ctx, getState()); enterRule(_localctx, 0, RULE_whereClause); try { enterOuterAlt(_localctx, 1); { setState(34); logicalExpression(0); setState(35); match(EOF); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } @SuppressWarnings("CheckReturnValue") public static class LogicalExpressionContext extends ParserRuleContext { public TerminalNode BRAC_OPEN() { return getToken(HqlFilterParser.BRAC_OPEN, 0); } public List logicalExpression() { return getRuleContexts(LogicalExpressionContext.class); } public LogicalExpressionContext logicalExpression(int i) { return getRuleContext(LogicalExpressionContext.class,i); } public TerminalNode BRAC_CLOSE() { return getToken(HqlFilterParser.BRAC_CLOSE, 0); } public ExpressionContext expression() { return getRuleContext(ExpressionContext.class,0); } public List AND() { return getTokens(HqlFilterParser.AND); } public TerminalNode AND(int i) { return getToken(HqlFilterParser.AND, i); } public List OR() { return getTokens(HqlFilterParser.OR); } public TerminalNode OR(int i) { return getToken(HqlFilterParser.OR, i); } public LogicalExpressionContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_logicalExpression; } @Override public void enterRule(ParseTreeListener listener) { if ( listener instanceof HqlFilterListener ) ((HqlFilterListener)listener).enterLogicalExpression(this); } @Override public void exitRule(ParseTreeListener listener) { if ( listener instanceof HqlFilterListener ) ((HqlFilterListener)listener).exitLogicalExpression(this); } } public final LogicalExpressionContext logicalExpression() throws RecognitionException { return logicalExpression(0); } private LogicalExpressionContext logicalExpression(int _p) throws RecognitionException { ParserRuleContext _parentctx = _ctx; int _parentState = getState(); LogicalExpressionContext _localctx = new LogicalExpressionContext(_ctx, _parentState); LogicalExpressionContext _prevctx = _localctx; int _startState = 2; enterRecursionRule(_localctx, 2, RULE_logicalExpression, _p); int _la; try { int _alt; enterOuterAlt(_localctx, 1); { setState(50); _errHandler.sync(this); switch (_input.LA(1)) { case BRAC_OPEN: { setState(38); match(BRAC_OPEN); setState(39); logicalExpression(0); setState(40); match(BRAC_CLOSE); } break; case FUNCTION: case KEY: { setState(42); expression(); setState(47); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,0,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { setState(43); _la = _input.LA(1); if ( !(_la==AND || _la==OR) ) { _errHandler.recoverInline(this); } else { if ( _input.LA(1)==Token.EOF ) matchedEOF = true; _errHandler.reportMatch(this); consume(); } setState(44); logicalExpression(0); } } } setState(49); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,0,_ctx); } } break; default: throw new NoViableAltException(this); } _ctx.stop = _input.LT(-1); setState(57); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,2,_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 LogicalExpressionContext(_parentctx, _parentState); pushNewRecursionContext(_localctx, _startState, RULE_logicalExpression); setState(52); if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); setState(53); _la = _input.LA(1); if ( !(_la==AND || _la==OR) ) { _errHandler.recoverInline(this); } else { if ( _input.LA(1)==Token.EOF ) matchedEOF = true; _errHandler.reportMatch(this); consume(); } setState(54); logicalExpression(3); } } } setState(59); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,2,_ctx); } } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { unrollRecursionContexts(_parentctx); } return _localctx; } @SuppressWarnings("CheckReturnValue") public static class ExpressionContext extends ParserRuleContext { public KeyContext key() { return getRuleContext(KeyContext.class,0); } public ConditionContext condition() { return getRuleContext(ConditionContext.class,0); } public ExpressionContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_expression; } @Override public void enterRule(ParseTreeListener listener) { if ( listener instanceof HqlFilterListener ) ((HqlFilterListener)listener).enterExpression(this); } @Override public void exitRule(ParseTreeListener listener) { if ( listener instanceof HqlFilterListener ) ((HqlFilterListener)listener).exitExpression(this); } } public final ExpressionContext expression() throws RecognitionException { ExpressionContext _localctx = new ExpressionContext(_ctx, getState()); enterRule(_localctx, 4, RULE_expression); try { enterOuterAlt(_localctx, 1); { setState(60); key(); setState(61); condition(); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } @SuppressWarnings("CheckReturnValue") public static class ConditionContext extends ParserRuleContext { public ComparisonContext comparison() { return getRuleContext(ComparisonContext.class,0); } public BetweenContext between() { return getRuleContext(BetweenContext.class,0); } public InContext in() { return getRuleContext(InContext.class,0); } public NotInContext notIn() { return getRuleContext(NotInContext.class,0); } public LikeContext like() { return getRuleContext(LikeContext.class,0); } public NotLikeContext notLike() { return getRuleContext(NotLikeContext.class,0); } public IsNullContext isNull() { return getRuleContext(IsNullContext.class,0); } public IsNotNullContext isNotNull() { return getRuleContext(IsNotNullContext.class,0); } public ConditionContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_condition; } @Override public void enterRule(ParseTreeListener listener) { if ( listener instanceof HqlFilterListener ) ((HqlFilterListener)listener).enterCondition(this); } @Override public void exitRule(ParseTreeListener listener) { if ( listener instanceof HqlFilterListener ) ((HqlFilterListener)listener).exitCondition(this); } } public final ConditionContext condition() throws RecognitionException { ConditionContext _localctx = new ConditionContext(_ctx, getState()); enterRule(_localctx, 6, RULE_condition); try { enterOuterAlt(_localctx, 1); { setState(71); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,3,_ctx) ) { case 1: { setState(63); comparison(); } break; case 2: { setState(64); between(); } break; case 3: { setState(65); in(); } break; case 4: { setState(66); notIn(); } break; case 5: { setState(67); like(); } break; case 6: { setState(68); notLike(); } break; case 7: { setState(69); isNull(); } break; case 8: { setState(70); isNotNull(); } break; } } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } @SuppressWarnings("CheckReturnValue") public static class ComparisonContext extends ParserRuleContext { public TerminalNode OPERATOR() { return getToken(HqlFilterParser.OPERATOR, 0); } public StringContext string() { return getRuleContext(StringContext.class,0); } public TerminalNode BOOLEAN_VALUE() { return getToken(HqlFilterParser.BOOLEAN_VALUE, 0); } public NumberContext number() { return getRuleContext(NumberContext.class,0); } public TerminalNode NULL() { return getToken(HqlFilterParser.NULL, 0); } public FunctionContext function() { return getRuleContext(FunctionContext.class,0); } public ComparisonContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_comparison; } @Override public void enterRule(ParseTreeListener listener) { if ( listener instanceof HqlFilterListener ) ((HqlFilterListener)listener).enterComparison(this); } @Override public void exitRule(ParseTreeListener listener) { if ( listener instanceof HqlFilterListener ) ((HqlFilterListener)listener).exitComparison(this); } } public final ComparisonContext comparison() throws RecognitionException { ComparisonContext _localctx = new ComparisonContext(_ctx, getState()); enterRule(_localctx, 8, RULE_comparison); try { enterOuterAlt(_localctx, 1); { setState(73); match(OPERATOR); setState(79); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,4,_ctx) ) { case 1: { setState(74); string(); } break; case 2: { setState(75); match(BOOLEAN_VALUE); } break; case 3: { setState(76); number(); } break; case 4: { setState(77); match(NULL); } break; case 5: { setState(78); function(); } break; } } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } @SuppressWarnings("CheckReturnValue") public static class BetweenContext extends ParserRuleContext { public TerminalNode BETWEEN() { return getToken(HqlFilterParser.BETWEEN, 0); } public List number() { return getRuleContexts(NumberContext.class); } public NumberContext number(int i) { return getRuleContext(NumberContext.class,i); } public TerminalNode AND() { return getToken(HqlFilterParser.AND, 0); } public List string() { return getRuleContexts(StringContext.class); } public StringContext string(int i) { return getRuleContext(StringContext.class,i); } public BetweenContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_between; } @Override public void enterRule(ParseTreeListener listener) { if ( listener instanceof HqlFilterListener ) ((HqlFilterListener)listener).enterBetween(this); } @Override public void exitRule(ParseTreeListener listener) { if ( listener instanceof HqlFilterListener ) ((HqlFilterListener)listener).exitBetween(this); } } public final BetweenContext between() throws RecognitionException { BetweenContext _localctx = new BetweenContext(_ctx, getState()); enterRule(_localctx, 10, RULE_between); try { enterOuterAlt(_localctx, 1); { setState(81); match(BETWEEN); setState(90); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,5,_ctx) ) { case 1: { { setState(82); number(); setState(83); match(AND); setState(84); number(); } } break; case 2: { { setState(86); string(); setState(87); match(AND); setState(88); string(); } } break; } } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } @SuppressWarnings("CheckReturnValue") public static class InContext extends ParserRuleContext { public TerminalNode IN() { return getToken(HqlFilterParser.IN, 0); } public TerminalNode BRAC_OPEN() { return getToken(HqlFilterParser.BRAC_OPEN, 0); } public CommaSeparatedValuesContext commaSeparatedValues() { return getRuleContext(CommaSeparatedValuesContext.class,0); } public TerminalNode BRAC_CLOSE() { return getToken(HqlFilterParser.BRAC_CLOSE, 0); } public InContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_in; } @Override public void enterRule(ParseTreeListener listener) { if ( listener instanceof HqlFilterListener ) ((HqlFilterListener)listener).enterIn(this); } @Override public void exitRule(ParseTreeListener listener) { if ( listener instanceof HqlFilterListener ) ((HqlFilterListener)listener).exitIn(this); } } public final InContext in() throws RecognitionException { InContext _localctx = new InContext(_ctx, getState()); enterRule(_localctx, 12, RULE_in); try { enterOuterAlt(_localctx, 1); { setState(92); match(IN); setState(93); match(BRAC_OPEN); setState(94); commaSeparatedValues(); setState(95); match(BRAC_CLOSE); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } @SuppressWarnings("CheckReturnValue") public static class NotInContext extends ParserRuleContext { public TerminalNode NOT() { return getToken(HqlFilterParser.NOT, 0); } public TerminalNode IN() { return getToken(HqlFilterParser.IN, 0); } public TerminalNode BRAC_OPEN() { return getToken(HqlFilterParser.BRAC_OPEN, 0); } public CommaSeparatedValuesContext commaSeparatedValues() { return getRuleContext(CommaSeparatedValuesContext.class,0); } public TerminalNode BRAC_CLOSE() { return getToken(HqlFilterParser.BRAC_CLOSE, 0); } public NotInContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_notIn; } @Override public void enterRule(ParseTreeListener listener) { if ( listener instanceof HqlFilterListener ) ((HqlFilterListener)listener).enterNotIn(this); } @Override public void exitRule(ParseTreeListener listener) { if ( listener instanceof HqlFilterListener ) ((HqlFilterListener)listener).exitNotIn(this); } } public final NotInContext notIn() throws RecognitionException { NotInContext _localctx = new NotInContext(_ctx, getState()); enterRule(_localctx, 14, RULE_notIn); try { enterOuterAlt(_localctx, 1); { setState(97); match(NOT); setState(98); match(IN); setState(99); match(BRAC_OPEN); setState(100); commaSeparatedValues(); setState(101); match(BRAC_CLOSE); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } @SuppressWarnings("CheckReturnValue") public static class LikeContext extends ParserRuleContext { public TerminalNode LIKE() { return getToken(HqlFilterParser.LIKE, 0); } public StringContext string() { return getRuleContext(StringContext.class,0); } public LikeContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_like; } @Override public void enterRule(ParseTreeListener listener) { if ( listener instanceof HqlFilterListener ) ((HqlFilterListener)listener).enterLike(this); } @Override public void exitRule(ParseTreeListener listener) { if ( listener instanceof HqlFilterListener ) ((HqlFilterListener)listener).exitLike(this); } } public final LikeContext like() throws RecognitionException { LikeContext _localctx = new LikeContext(_ctx, getState()); enterRule(_localctx, 16, RULE_like); try { enterOuterAlt(_localctx, 1); { setState(103); match(LIKE); setState(104); string(); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } @SuppressWarnings("CheckReturnValue") public static class NotLikeContext extends ParserRuleContext { public TerminalNode NOT() { return getToken(HqlFilterParser.NOT, 0); } public TerminalNode LIKE() { return getToken(HqlFilterParser.LIKE, 0); } public StringContext string() { return getRuleContext(StringContext.class,0); } public NotLikeContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_notLike; } @Override public void enterRule(ParseTreeListener listener) { if ( listener instanceof HqlFilterListener ) ((HqlFilterListener)listener).enterNotLike(this); } @Override public void exitRule(ParseTreeListener listener) { if ( listener instanceof HqlFilterListener ) ((HqlFilterListener)listener).exitNotLike(this); } } public final NotLikeContext notLike() throws RecognitionException { NotLikeContext _localctx = new NotLikeContext(_ctx, getState()); enterRule(_localctx, 18, RULE_notLike); try { enterOuterAlt(_localctx, 1); { setState(106); match(NOT); setState(107); match(LIKE); setState(108); string(); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } @SuppressWarnings("CheckReturnValue") public static class IsNullContext extends ParserRuleContext { public TerminalNode IS() { return getToken(HqlFilterParser.IS, 0); } public TerminalNode NULL() { return getToken(HqlFilterParser.NULL, 0); } public IsNullContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_isNull; } @Override public void enterRule(ParseTreeListener listener) { if ( listener instanceof HqlFilterListener ) ((HqlFilterListener)listener).enterIsNull(this); } @Override public void exitRule(ParseTreeListener listener) { if ( listener instanceof HqlFilterListener ) ((HqlFilterListener)listener).exitIsNull(this); } } public final IsNullContext isNull() throws RecognitionException { IsNullContext _localctx = new IsNullContext(_ctx, getState()); enterRule(_localctx, 20, RULE_isNull); try { enterOuterAlt(_localctx, 1); { setState(110); match(IS); setState(111); match(NULL); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } @SuppressWarnings("CheckReturnValue") public static class IsNotNullContext extends ParserRuleContext { public TerminalNode IS() { return getToken(HqlFilterParser.IS, 0); } public TerminalNode NOT() { return getToken(HqlFilterParser.NOT, 0); } public TerminalNode NULL() { return getToken(HqlFilterParser.NULL, 0); } public IsNotNullContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_isNotNull; } @Override public void enterRule(ParseTreeListener listener) { if ( listener instanceof HqlFilterListener ) ((HqlFilterListener)listener).enterIsNotNull(this); } @Override public void exitRule(ParseTreeListener listener) { if ( listener instanceof HqlFilterListener ) ((HqlFilterListener)listener).exitIsNotNull(this); } } public final IsNotNullContext isNotNull() throws RecognitionException { IsNotNullContext _localctx = new IsNotNullContext(_ctx, getState()); enterRule(_localctx, 22, RULE_isNotNull); try { enterOuterAlt(_localctx, 1); { setState(113); match(IS); setState(114); match(NOT); setState(115); match(NULL); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } @SuppressWarnings("CheckReturnValue") public static class CommaSeparatedValuesContext extends ParserRuleContext { public List string() { return getRuleContexts(StringContext.class); } public StringContext string(int i) { return getRuleContext(StringContext.class,i); } public List NUMBER_VALUE() { return getTokens(HqlFilterParser.NUMBER_VALUE); } public TerminalNode NUMBER_VALUE(int i) { return getToken(HqlFilterParser.NUMBER_VALUE, i); } public List COMMA() { return getTokens(HqlFilterParser.COMMA); } public TerminalNode COMMA(int i) { return getToken(HqlFilterParser.COMMA, i); } public CommaSeparatedValuesContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_commaSeparatedValues; } @Override public void enterRule(ParseTreeListener listener) { if ( listener instanceof HqlFilterListener ) ((HqlFilterListener)listener).enterCommaSeparatedValues(this); } @Override public void exitRule(ParseTreeListener listener) { if ( listener instanceof HqlFilterListener ) ((HqlFilterListener)listener).exitCommaSeparatedValues(this); } } public final CommaSeparatedValuesContext commaSeparatedValues() throws RecognitionException { CommaSeparatedValuesContext _localctx = new CommaSeparatedValuesContext(_ctx, getState()); enterRule(_localctx, 24, RULE_commaSeparatedValues); int _la; try { enterOuterAlt(_localctx, 1); { setState(119); _errHandler.sync(this); switch (_input.LA(1)) { case FUNCTION: case STRING_VALUE: { setState(117); string(); } break; case NUMBER_VALUE: { setState(118); match(NUMBER_VALUE); } break; default: throw new NoViableAltException(this); } setState(128); _errHandler.sync(this); _la = _input.LA(1); while (_la==COMMA) { { { setState(121); match(COMMA); setState(124); _errHandler.sync(this); switch (_input.LA(1)) { case FUNCTION: case STRING_VALUE: { setState(122); string(); } break; case NUMBER_VALUE: { setState(123); match(NUMBER_VALUE); } break; default: throw new NoViableAltException(this); } } } setState(130); _errHandler.sync(this); _la = _input.LA(1); } } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } @SuppressWarnings("CheckReturnValue") public static class KeyContext extends ParserRuleContext { public TerminalNode FUNCTION() { return getToken(HqlFilterParser.FUNCTION, 0); } public TerminalNode BRAC_OPEN() { return getToken(HqlFilterParser.BRAC_OPEN, 0); } public TerminalNode KEY() { return getToken(HqlFilterParser.KEY, 0); } public TerminalNode BRAC_CLOSE() { return getToken(HqlFilterParser.BRAC_CLOSE, 0); } public KeyContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_key; } @Override public void enterRule(ParseTreeListener listener) { if ( listener instanceof HqlFilterListener ) ((HqlFilterListener)listener).enterKey(this); } @Override public void exitRule(ParseTreeListener listener) { if ( listener instanceof HqlFilterListener ) ((HqlFilterListener)listener).exitKey(this); } } public final KeyContext key() throws RecognitionException { KeyContext _localctx = new KeyContext(_ctx, getState()); enterRule(_localctx, 26, RULE_key); try { setState(136); _errHandler.sync(this); switch (_input.LA(1)) { case FUNCTION: enterOuterAlt(_localctx, 1); { setState(131); match(FUNCTION); setState(132); match(BRAC_OPEN); setState(133); match(KEY); setState(134); match(BRAC_CLOSE); } break; case KEY: enterOuterAlt(_localctx, 2); { setState(135); match(KEY); } break; default: throw new NoViableAltException(this); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } @SuppressWarnings("CheckReturnValue") public static class StringContext extends ParserRuleContext { public TerminalNode FUNCTION() { return getToken(HqlFilterParser.FUNCTION, 0); } public TerminalNode BRAC_OPEN() { return getToken(HqlFilterParser.BRAC_OPEN, 0); } public TerminalNode STRING_VALUE() { return getToken(HqlFilterParser.STRING_VALUE, 0); } public TerminalNode BRAC_CLOSE() { return getToken(HqlFilterParser.BRAC_CLOSE, 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 HqlFilterListener ) ((HqlFilterListener)listener).enterString(this); } @Override public void exitRule(ParseTreeListener listener) { if ( listener instanceof HqlFilterListener ) ((HqlFilterListener)listener).exitString(this); } } public final StringContext string() throws RecognitionException { StringContext _localctx = new StringContext(_ctx, getState()); enterRule(_localctx, 28, RULE_string); try { setState(143); _errHandler.sync(this); switch (_input.LA(1)) { case FUNCTION: enterOuterAlt(_localctx, 1); { setState(138); match(FUNCTION); setState(139); match(BRAC_OPEN); setState(140); match(STRING_VALUE); setState(141); match(BRAC_CLOSE); } break; case STRING_VALUE: enterOuterAlt(_localctx, 2); { setState(142); match(STRING_VALUE); } break; default: throw new NoViableAltException(this); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } @SuppressWarnings("CheckReturnValue") public static class NumberContext extends ParserRuleContext { public TerminalNode FUNCTION() { return getToken(HqlFilterParser.FUNCTION, 0); } public TerminalNode BRAC_OPEN() { return getToken(HqlFilterParser.BRAC_OPEN, 0); } public TerminalNode NUMBER_VALUE() { return getToken(HqlFilterParser.NUMBER_VALUE, 0); } public TerminalNode BRAC_CLOSE() { return getToken(HqlFilterParser.BRAC_CLOSE, 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 HqlFilterListener ) ((HqlFilterListener)listener).enterNumber(this); } @Override public void exitRule(ParseTreeListener listener) { if ( listener instanceof HqlFilterListener ) ((HqlFilterListener)listener).exitNumber(this); } } public final NumberContext number() throws RecognitionException { NumberContext _localctx = new NumberContext(_ctx, getState()); enterRule(_localctx, 30, RULE_number); try { setState(150); _errHandler.sync(this); switch (_input.LA(1)) { case FUNCTION: enterOuterAlt(_localctx, 1); { setState(145); match(FUNCTION); setState(146); match(BRAC_OPEN); setState(147); match(NUMBER_VALUE); setState(148); match(BRAC_CLOSE); } break; case NUMBER_VALUE: enterOuterAlt(_localctx, 2); { setState(149); match(NUMBER_VALUE); } break; default: throw new NoViableAltException(this); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } @SuppressWarnings("CheckReturnValue") public static class FunctionContext extends ParserRuleContext { public TerminalNode FUNCTION() { return getToken(HqlFilterParser.FUNCTION, 0); } public TerminalNode BRAC_OPEN() { return getToken(HqlFilterParser.BRAC_OPEN, 0); } public TerminalNode BRAC_CLOSE() { return getToken(HqlFilterParser.BRAC_CLOSE, 0); } public TerminalNode KEY() { return getToken(HqlFilterParser.KEY, 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 HqlFilterListener ) ((HqlFilterListener)listener).enterFunction(this); } @Override public void exitRule(ParseTreeListener listener) { if ( listener instanceof HqlFilterListener ) ((HqlFilterListener)listener).exitFunction(this); } } public final FunctionContext function() throws RecognitionException { FunctionContext _localctx = new FunctionContext(_ctx, getState()); enterRule(_localctx, 32, RULE_function); int _la; try { enterOuterAlt(_localctx, 1); { setState(152); match(FUNCTION); setState(153); match(BRAC_OPEN); setState(155); _errHandler.sync(this); _la = _input.LA(1); if (_la==KEY) { { setState(154); match(KEY); } } setState(157); match(BRAC_CLOSE); } } 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 1: return logicalExpression_sempred((LogicalExpressionContext)_localctx, predIndex); } return true; } private boolean logicalExpression_sempred(LogicalExpressionContext _localctx, int predIndex) { switch (predIndex) { case 0: return precpred(_ctx, 2); } return true; } public static final String _serializedATN = "\u0004\u0001\u0014\u00a0\u0002\u0000\u0007\u0000\u0002\u0001\u0007\u0001"+ "\u0002\u0002\u0007\u0002\u0002\u0003\u0007\u0003\u0002\u0004\u0007\u0004"+ "\u0002\u0005\u0007\u0005\u0002\u0006\u0007\u0006\u0002\u0007\u0007\u0007"+ "\u0002\b\u0007\b\u0002\t\u0007\t\u0002\n\u0007\n\u0002\u000b\u0007\u000b"+ "\u0002\f\u0007\f\u0002\r\u0007\r\u0002\u000e\u0007\u000e\u0002\u000f\u0007"+ "\u000f\u0002\u0010\u0007\u0010\u0001\u0000\u0001\u0000\u0001\u0000\u0001"+ "\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001"+ "\u0001\u0001\u0001\u0005\u0001.\b\u0001\n\u0001\f\u00011\t\u0001\u0003"+ "\u00013\b\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0005\u00018\b\u0001"+ "\n\u0001\f\u0001;\t\u0001\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0003"+ "\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003"+ "\u0001\u0003\u0003\u0003H\b\u0003\u0001\u0004\u0001\u0004\u0001\u0004"+ "\u0001\u0004\u0001\u0004\u0001\u0004\u0003\u0004P\b\u0004\u0001\u0005"+ "\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005"+ "\u0001\u0005\u0001\u0005\u0003\u0005[\b\u0005\u0001\u0006\u0001\u0006"+ "\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0007\u0001\u0007\u0001\u0007"+ "\u0001\u0007\u0001\u0007\u0001\u0007\u0001\b\u0001\b\u0001\b\u0001\t\u0001"+ "\t\u0001\t\u0001\t\u0001\n\u0001\n\u0001\n\u0001\u000b\u0001\u000b\u0001"+ "\u000b\u0001\u000b\u0001\f\u0001\f\u0003\fx\b\f\u0001\f\u0001\f\u0001"+ "\f\u0003\f}\b\f\u0005\f\u007f\b\f\n\f\f\f\u0082\t\f\u0001\r\u0001\r\u0001"+ "\r\u0001\r\u0001\r\u0003\r\u0089\b\r\u0001\u000e\u0001\u000e\u0001\u000e"+ "\u0001\u000e\u0001\u000e\u0003\u000e\u0090\b\u000e\u0001\u000f\u0001\u000f"+ "\u0001\u000f\u0001\u000f\u0001\u000f\u0003\u000f\u0097\b\u000f\u0001\u0010"+ "\u0001\u0010\u0001\u0010\u0003\u0010\u009c\b\u0010\u0001\u0010\u0001\u0010"+ "\u0001\u0010\u0000\u0001\u0002\u0011\u0000\u0002\u0004\u0006\b\n\f\u000e"+ "\u0010\u0012\u0014\u0016\u0018\u001a\u001c\u001e \u0000\u0001\u0002\u0000"+ "\t\t\u000b\u000b\u00a4\u0000\"\u0001\u0000\u0000\u0000\u00022\u0001\u0000"+ "\u0000\u0000\u0004<\u0001\u0000\u0000\u0000\u0006G\u0001\u0000\u0000\u0000"+ "\bI\u0001\u0000\u0000\u0000\nQ\u0001\u0000\u0000\u0000\f\\\u0001\u0000"+ "\u0000\u0000\u000ea\u0001\u0000\u0000\u0000\u0010g\u0001\u0000\u0000\u0000"+ "\u0012j\u0001\u0000\u0000\u0000\u0014n\u0001\u0000\u0000\u0000\u0016q"+ "\u0001\u0000\u0000\u0000\u0018w\u0001\u0000\u0000\u0000\u001a\u0088\u0001"+ "\u0000\u0000\u0000\u001c\u008f\u0001\u0000\u0000\u0000\u001e\u0096\u0001"+ "\u0000\u0000\u0000 \u0098\u0001\u0000\u0000\u0000\"#\u0003\u0002\u0001"+ "\u0000#$\u0005\u0000\u0000\u0001$\u0001\u0001\u0000\u0000\u0000%&\u0006"+ "\u0001\uffff\uffff\u0000&\'\u0005\u0003\u0000\u0000\'(\u0003\u0002\u0001"+ "\u0000()\u0005\u0004\u0000\u0000)3\u0001\u0000\u0000\u0000*/\u0003\u0004"+ "\u0002\u0000+,\u0007\u0000\u0000\u0000,.\u0003\u0002\u0001\u0000-+\u0001"+ "\u0000\u0000\u0000.1\u0001\u0000\u0000\u0000/-\u0001\u0000\u0000\u0000"+ "/0\u0001\u0000\u0000\u000003\u0001\u0000\u0000\u00001/\u0001\u0000\u0000"+ "\u00002%\u0001\u0000\u0000\u00002*\u0001\u0000\u0000\u000039\u0001\u0000"+ "\u0000\u000045\n\u0002\u0000\u000056\u0007\u0000\u0000\u000068\u0003\u0002"+ "\u0001\u000374\u0001\u0000\u0000\u00008;\u0001\u0000\u0000\u000097\u0001"+ "\u0000\u0000\u00009:\u0001\u0000\u0000\u0000:\u0003\u0001\u0000\u0000"+ "\u0000;9\u0001\u0000\u0000\u0000<=\u0003\u001a\r\u0000=>\u0003\u0006\u0003"+ "\u0000>\u0005\u0001\u0000\u0000\u0000?H\u0003\b\u0004\u0000@H\u0003\n"+ "\u0005\u0000AH\u0003\f\u0006\u0000BH\u0003\u000e\u0007\u0000CH\u0003\u0010"+ "\b\u0000DH\u0003\u0012\t\u0000EH\u0003\u0014\n\u0000FH\u0003\u0016\u000b"+ "\u0000G?\u0001\u0000\u0000\u0000G@\u0001\u0000\u0000\u0000GA\u0001\u0000"+ "\u0000\u0000GB\u0001\u0000\u0000\u0000GC\u0001\u0000\u0000\u0000GD\u0001"+ "\u0000\u0000\u0000GE\u0001\u0000\u0000\u0000GF\u0001\u0000\u0000\u0000"+ "H\u0007\u0001\u0000\u0000\u0000IO\u0005\u0010\u0000\u0000JP\u0003\u001c"+ "\u000e\u0000KP\u0005\u0011\u0000\u0000LP\u0003\u001e\u000f\u0000MP\u0005"+ "\u000e\u0000\u0000NP\u0003 \u0010\u0000OJ\u0001\u0000\u0000\u0000OK\u0001"+ "\u0000\u0000\u0000OL\u0001\u0000\u0000\u0000OM\u0001\u0000\u0000\u0000"+ "ON\u0001\u0000\u0000\u0000P\t\u0001\u0000\u0000\u0000QZ\u0005\u0007\u0000"+ "\u0000RS\u0003\u001e\u000f\u0000ST\u0005\t\u0000\u0000TU\u0003\u001e\u000f"+ "\u0000U[\u0001\u0000\u0000\u0000VW\u0003\u001c\u000e\u0000WX\u0005\t\u0000"+ "\u0000XY\u0003\u001c\u000e\u0000Y[\u0001\u0000\u0000\u0000ZR\u0001\u0000"+ "\u0000\u0000ZV\u0001\u0000\u0000\u0000[\u000b\u0001\u0000\u0000\u0000"+ "\\]\u0005\b\u0000\u0000]^\u0005\u0003\u0000\u0000^_\u0003\u0018\f\u0000"+ "_`\u0005\u0004\u0000\u0000`\r\u0001\u0000\u0000\u0000ab\u0005\r\u0000"+ "\u0000bc\u0005\b\u0000\u0000cd\u0005\u0003\u0000\u0000de\u0003\u0018\f"+ "\u0000ef\u0005\u0004\u0000\u0000f\u000f\u0001\u0000\u0000\u0000gh\u0005"+ "\n\u0000\u0000hi\u0003\u001c\u000e\u0000i\u0011\u0001\u0000\u0000\u0000"+ "jk\u0005\r\u0000\u0000kl\u0005\n\u0000\u0000lm\u0003\u001c\u000e\u0000"+ "m\u0013\u0001\u0000\u0000\u0000no\u0005\f\u0000\u0000op\u0005\u000e\u0000"+ "\u0000p\u0015\u0001\u0000\u0000\u0000qr\u0005\f\u0000\u0000rs\u0005\r"+ "\u0000\u0000st\u0005\u000e\u0000\u0000t\u0017\u0001\u0000\u0000\u0000"+ "ux\u0003\u001c\u000e\u0000vx\u0005\u0012\u0000\u0000wu\u0001\u0000\u0000"+ "\u0000wv\u0001\u0000\u0000\u0000x\u0080\u0001\u0000\u0000\u0000y|\u0005"+ "\u0002\u0000\u0000z}\u0003\u001c\u000e\u0000{}\u0005\u0012\u0000\u0000"+ "|z\u0001\u0000\u0000\u0000|{\u0001\u0000\u0000\u0000}\u007f\u0001\u0000"+ "\u0000\u0000~y\u0001\u0000\u0000\u0000\u007f\u0082\u0001\u0000\u0000\u0000"+ "\u0080~\u0001\u0000\u0000\u0000\u0080\u0081\u0001\u0000\u0000\u0000\u0081"+ "\u0019\u0001\u0000\u0000\u0000\u0082\u0080\u0001\u0000\u0000\u0000\u0083"+ "\u0084\u0005\u000f\u0000\u0000\u0084\u0085\u0005\u0003\u0000\u0000\u0085"+ "\u0086\u0005\u0014\u0000\u0000\u0086\u0089\u0005\u0004\u0000\u0000\u0087"+ "\u0089\u0005\u0014\u0000\u0000\u0088\u0083\u0001\u0000\u0000\u0000\u0088"+ "\u0087\u0001\u0000\u0000\u0000\u0089\u001b\u0001\u0000\u0000\u0000\u008a"+ "\u008b\u0005\u000f\u0000\u0000\u008b\u008c\u0005\u0003\u0000\u0000\u008c"+ "\u008d\u0005\u0013\u0000\u0000\u008d\u0090\u0005\u0004\u0000\u0000\u008e"+ "\u0090\u0005\u0013\u0000\u0000\u008f\u008a\u0001\u0000\u0000\u0000\u008f"+ "\u008e\u0001\u0000\u0000\u0000\u0090\u001d\u0001\u0000\u0000\u0000\u0091"+ "\u0092\u0005\u000f\u0000\u0000\u0092\u0093\u0005\u0003\u0000\u0000\u0093"+ "\u0094\u0005\u0012\u0000\u0000\u0094\u0097\u0005\u0004\u0000\u0000\u0095"+ "\u0097\u0005\u0012\u0000\u0000\u0096\u0091\u0001\u0000\u0000\u0000\u0096"+ "\u0095\u0001\u0000\u0000\u0000\u0097\u001f\u0001\u0000\u0000\u0000\u0098"+ "\u0099\u0005\u000f\u0000\u0000\u0099\u009b\u0005\u0003\u0000\u0000\u009a"+ "\u009c\u0005\u0014\u0000\u0000\u009b\u009a\u0001\u0000\u0000\u0000\u009b"+ "\u009c\u0001\u0000\u0000\u0000\u009c\u009d\u0001\u0000\u0000\u0000\u009d"+ "\u009e\u0005\u0004\u0000\u0000\u009e!\u0001\u0000\u0000\u0000\r/29GOZ"+ "w|\u0080\u0088\u008f\u0096\u009b"; 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); } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy