Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.xlrit.gears.base.snel.SnelParser Maven / Gradle / Ivy
// Generated from com/xlrit/gears/base/snel/Snel.g4 by ANTLR 4.13.1
package com.xlrit.gears.base.snel;
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"})
public class SnelParser extends Parser {
static { RuntimeMetaData.checkVersion("4.13.1", RuntimeMetaData.VERSION); }
protected static final DFA[] _decisionToDFA;
protected static final PredictionContextCache _sharedContextCache =
new PredictionContextCache();
public static final int
T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, T__5=6, T__6=7, T__7=8, T__8=9,
T__9=10, T__10=11, T__11=12, T__12=13, T__13=14, T__14=15, T__15=16, T__16=17,
T__17=18, T__18=19, T__19=20, T__20=21, T__21=22, T__22=23, T__23=24,
T__24=25, T__25=26, T__26=27, T__27=28, T__28=29, T__29=30, BooleanLiteral=31,
IntegerLiteral=32, StringLiteral=33, Parameter=34, Identifier=35, WS=36;
public static final int
RULE_startExpr = 0, RULE_startSortClauses = 1, RULE_sortClauses = 2, RULE_sortClause = 3,
RULE_sortDirection = 4, RULE_expr = 5, RULE_prefixOp = 6, RULE_postfixOp = 7,
RULE_mulOp = 8, RULE_addOp = 9, RULE_eqOp = 10, RULE_relOp = 11, RULE_memberOp = 12,
RULE_andOp = 13, RULE_orOp = 14, RULE_otherwiseOp = 15, RULE_listExpression = 16,
RULE_optionalTrailingComma = 17, RULE_functionExpression = 18, RULE_actualParams = 19,
RULE_parameter = 20, RULE_identifier = 21, RULE_literal = 22;
private static String[] makeRuleNames() {
return new String[] {
"startExpr", "startSortClauses", "sortClauses", "sortClause", "sortDirection",
"expr", "prefixOp", "postfixOp", "mulOp", "addOp", "eqOp", "relOp", "memberOp",
"andOp", "orOp", "otherwiseOp", "listExpression", "optionalTrailingComma",
"functionExpression", "actualParams", "parameter", "identifier", "literal"
};
}
public static final String[] ruleNames = makeRuleNames();
private static String[] makeLiteralNames() {
return new String[] {
null, "','", "'ascending'", "'descending'", "'.'", "'('", "')'", "'-'",
"'not'", "'exists'", "'does not exist'", "'*'", "'/'", "'%'", "'+'",
"'=='", "'<>'", "'like'", "'<'", "'>'", "'<='", "'>='", "'in'", "'contains'",
"'and'", "'&&'", "'or'", "'||'", "'otherwise'", "'['", "']'"
};
}
private static final String[] _LITERAL_NAMES = makeLiteralNames();
private static String[] makeSymbolicNames() {
return new String[] {
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, "BooleanLiteral", "IntegerLiteral",
"StringLiteral", "Parameter", "Identifier", "WS"
};
}
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 "Snel.g4"; }
@Override
public String[] getRuleNames() { return ruleNames; }
@Override
public String getSerializedATN() { return _serializedATN; }
@Override
public ATN getATN() { return _ATN; }
public SnelParser(TokenStream input) {
super(input);
_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
@SuppressWarnings("CheckReturnValue")
public static class StartExprContext extends ParserRuleContext {
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TerminalNode EOF() { return getToken(SnelParser.EOF, 0); }
public StartExprContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_startExpr; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SnelVisitor ) return ((SnelVisitor extends T>)visitor).visitStartExpr(this);
else return visitor.visitChildren(this);
}
}
public final StartExprContext startExpr() throws RecognitionException {
StartExprContext _localctx = new StartExprContext(_ctx, getState());
enterRule(_localctx, 0, RULE_startExpr);
try {
enterOuterAlt(_localctx, 1);
{
setState(46);
expr(0);
setState(47);
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 StartSortClausesContext extends ParserRuleContext {
public SortClausesContext sortClauses() {
return getRuleContext(SortClausesContext.class,0);
}
public TerminalNode EOF() { return getToken(SnelParser.EOF, 0); }
public StartSortClausesContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_startSortClauses; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SnelVisitor ) return ((SnelVisitor extends T>)visitor).visitStartSortClauses(this);
else return visitor.visitChildren(this);
}
}
public final StartSortClausesContext startSortClauses() throws RecognitionException {
StartSortClausesContext _localctx = new StartSortClausesContext(_ctx, getState());
enterRule(_localctx, 2, RULE_startSortClauses);
try {
enterOuterAlt(_localctx, 1);
{
setState(49);
sortClauses();
setState(50);
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 SortClausesContext extends ParserRuleContext {
public List sortClause() {
return getRuleContexts(SortClauseContext.class);
}
public SortClauseContext sortClause(int i) {
return getRuleContext(SortClauseContext.class,i);
}
public SortClausesContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_sortClauses; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SnelVisitor ) return ((SnelVisitor extends T>)visitor).visitSortClauses(this);
else return visitor.visitChildren(this);
}
}
public final SortClausesContext sortClauses() throws RecognitionException {
SortClausesContext _localctx = new SortClausesContext(_ctx, getState());
enterRule(_localctx, 4, RULE_sortClauses);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(52);
sortClause();
setState(57);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T__0) {
{
{
setState(53);
match(T__0);
setState(54);
sortClause();
}
}
setState(59);
_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 SortClauseContext extends ParserRuleContext {
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public SortDirectionContext sortDirection() {
return getRuleContext(SortDirectionContext.class,0);
}
public SortClauseContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_sortClause; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SnelVisitor ) return ((SnelVisitor extends T>)visitor).visitSortClause(this);
else return visitor.visitChildren(this);
}
}
public final SortClauseContext sortClause() throws RecognitionException {
SortClauseContext _localctx = new SortClauseContext(_ctx, getState());
enterRule(_localctx, 6, RULE_sortClause);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(60);
expr(0);
setState(62);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T__1 || _la==T__2) {
{
setState(61);
sortDirection();
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class SortDirectionContext extends ParserRuleContext {
public SortDirectionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_sortDirection; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SnelVisitor ) return ((SnelVisitor extends T>)visitor).visitSortDirection(this);
else return visitor.visitChildren(this);
}
}
public final SortDirectionContext sortDirection() throws RecognitionException {
SortDirectionContext _localctx = new SortDirectionContext(_ctx, getState());
enterRule(_localctx, 8, RULE_sortDirection);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(64);
_la = _input.LA(1);
if ( !(_la==T__1 || _la==T__2) ) {
_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;
}
@SuppressWarnings("CheckReturnValue")
public static class ExprContext extends ParserRuleContext {
public ExprContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_expr; }
public ExprContext() { }
public void copyFrom(ExprContext ctx) {
super.copyFrom(ctx);
}
}
@SuppressWarnings("CheckReturnValue")
public static class FunExprContext extends ExprContext {
public FunctionExpressionContext functionExpression() {
return getRuleContext(FunctionExpressionContext.class,0);
}
public FunExprContext(ExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SnelVisitor ) return ((SnelVisitor extends T>)visitor).visitFunExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class MemberExprContext extends ExprContext {
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public MemberOpContext memberOp() {
return getRuleContext(MemberOpContext.class,0);
}
public MemberExprContext(ExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SnelVisitor ) return ((SnelVisitor extends T>)visitor).visitMemberExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class OrExprContext extends ExprContext {
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public OrOpContext orOp() {
return getRuleContext(OrOpContext.class,0);
}
public OrExprContext(ExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SnelVisitor ) return ((SnelVisitor extends T>)visitor).visitOrExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class ParenExprContext extends ExprContext {
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public ParenExprContext(ExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SnelVisitor ) return ((SnelVisitor extends T>)visitor).visitParenExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class IdentExprContext extends ExprContext {
public IdentifierContext identifier() {
return getRuleContext(IdentifierContext.class,0);
}
public IdentExprContext(ExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SnelVisitor ) return ((SnelVisitor extends T>)visitor).visitIdentExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class PrefixExprContext extends ExprContext {
public PrefixOpContext prefixOp() {
return getRuleContext(PrefixOpContext.class,0);
}
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public PrefixExprContext(ExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SnelVisitor ) return ((SnelVisitor extends T>)visitor).visitPrefixExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class ParamExprContext extends ExprContext {
public ParameterContext parameter() {
return getRuleContext(ParameterContext.class,0);
}
public ParamExprContext(ExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SnelVisitor ) return ((SnelVisitor extends T>)visitor).visitParamExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class EqExprContext extends ExprContext {
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public EqOpContext eqOp() {
return getRuleContext(EqOpContext.class,0);
}
public EqExprContext(ExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SnelVisitor ) return ((SnelVisitor extends T>)visitor).visitEqExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class AddExprContext extends ExprContext {
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public AddOpContext addOp() {
return getRuleContext(AddOpContext.class,0);
}
public AddExprContext(ExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SnelVisitor ) return ((SnelVisitor extends T>)visitor).visitAddExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class LiteralExprContext extends ExprContext {
public LiteralContext literal() {
return getRuleContext(LiteralContext.class,0);
}
public LiteralExprContext(ExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SnelVisitor ) return ((SnelVisitor extends T>)visitor).visitLiteralExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class MulExprContext extends ExprContext {
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public MulOpContext mulOp() {
return getRuleContext(MulOpContext.class,0);
}
public MulExprContext(ExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SnelVisitor ) return ((SnelVisitor extends T>)visitor).visitMulExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class AttrExprContext extends ExprContext {
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public IdentifierContext identifier() {
return getRuleContext(IdentifierContext.class,0);
}
public AttrExprContext(ExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SnelVisitor ) return ((SnelVisitor extends T>)visitor).visitAttrExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class OtherwiseExprContext extends ExprContext {
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public OtherwiseOpContext otherwiseOp() {
return getRuleContext(OtherwiseOpContext.class,0);
}
public OtherwiseExprContext(ExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SnelVisitor ) return ((SnelVisitor extends T>)visitor).visitOtherwiseExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class PostfixExprContext extends ExprContext {
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public PostfixOpContext postfixOp() {
return getRuleContext(PostfixOpContext.class,0);
}
public PostfixExprContext(ExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SnelVisitor ) return ((SnelVisitor extends T>)visitor).visitPostfixExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class RelExprContext extends ExprContext {
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public RelOpContext relOp() {
return getRuleContext(RelOpContext.class,0);
}
public RelExprContext(ExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SnelVisitor ) return ((SnelVisitor extends T>)visitor).visitRelExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class ListExprContext extends ExprContext {
public ListExpressionContext listExpression() {
return getRuleContext(ListExpressionContext.class,0);
}
public ListExprContext(ExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SnelVisitor ) return ((SnelVisitor extends T>)visitor).visitListExpr(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class AndExprContext extends ExprContext {
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public AndOpContext andOp() {
return getRuleContext(AndOpContext.class,0);
}
public AndExprContext(ExprContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SnelVisitor ) return ((SnelVisitor extends T>)visitor).visitAndExpr(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 = 10;
enterRecursionRule(_localctx, 10, RULE_expr, _p);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(79);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,2,_ctx) ) {
case 1:
{
_localctx = new PrefixExprContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(67);
prefixOp();
setState(68);
expr(17);
}
break;
case 2:
{
_localctx = new ListExprContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(70);
listExpression();
}
break;
case 3:
{
_localctx = new FunExprContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(71);
functionExpression();
}
break;
case 4:
{
_localctx = new ParenExprContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(72);
match(T__4);
setState(73);
expr(0);
setState(74);
match(T__5);
}
break;
case 5:
{
_localctx = new ParamExprContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(76);
parameter();
}
break;
case 6:
{
_localctx = new IdentExprContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(77);
identifier();
}
break;
case 7:
{
_localctx = new LiteralExprContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(78);
literal();
}
break;
}
_ctx.stop = _input.LT(-1);
setState(120);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,4,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
if ( _parseListeners!=null ) triggerExitRuleEvent();
_prevctx = _localctx;
{
setState(118);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,3,_ctx) ) {
case 1:
{
_localctx = new MulExprContext(new ExprContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expr);
setState(81);
if (!(precpred(_ctx, 15))) throw new FailedPredicateException(this, "precpred(_ctx, 15)");
setState(82);
mulOp();
setState(83);
expr(16);
}
break;
case 2:
{
_localctx = new AddExprContext(new ExprContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expr);
setState(85);
if (!(precpred(_ctx, 14))) throw new FailedPredicateException(this, "precpred(_ctx, 14)");
setState(86);
addOp();
setState(87);
expr(15);
}
break;
case 3:
{
_localctx = new EqExprContext(new ExprContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expr);
setState(89);
if (!(precpred(_ctx, 13))) throw new FailedPredicateException(this, "precpred(_ctx, 13)");
setState(90);
eqOp();
setState(91);
expr(14);
}
break;
case 4:
{
_localctx = new RelExprContext(new ExprContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expr);
setState(93);
if (!(precpred(_ctx, 12))) throw new FailedPredicateException(this, "precpred(_ctx, 12)");
setState(94);
relOp();
setState(95);
expr(13);
}
break;
case 5:
{
_localctx = new MemberExprContext(new ExprContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expr);
setState(97);
if (!(precpred(_ctx, 11))) throw new FailedPredicateException(this, "precpred(_ctx, 11)");
setState(98);
memberOp();
setState(99);
expr(12);
}
break;
case 6:
{
_localctx = new AndExprContext(new ExprContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expr);
setState(101);
if (!(precpred(_ctx, 10))) throw new FailedPredicateException(this, "precpred(_ctx, 10)");
setState(102);
andOp();
setState(103);
expr(11);
}
break;
case 7:
{
_localctx = new OrExprContext(new ExprContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expr);
setState(105);
if (!(precpred(_ctx, 9))) throw new FailedPredicateException(this, "precpred(_ctx, 9)");
setState(106);
orOp();
setState(107);
expr(10);
}
break;
case 8:
{
_localctx = new OtherwiseExprContext(new ExprContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expr);
setState(109);
if (!(precpred(_ctx, 8))) throw new FailedPredicateException(this, "precpred(_ctx, 8)");
setState(110);
otherwiseOp();
setState(111);
expr(9);
}
break;
case 9:
{
_localctx = new PostfixExprContext(new ExprContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expr);
setState(113);
if (!(precpred(_ctx, 16))) throw new FailedPredicateException(this, "precpred(_ctx, 16)");
setState(114);
postfixOp();
}
break;
case 10:
{
_localctx = new AttrExprContext(new ExprContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expr);
setState(115);
if (!(precpred(_ctx, 7))) throw new FailedPredicateException(this, "precpred(_ctx, 7)");
setState(116);
match(T__3);
setState(117);
identifier();
}
break;
}
}
}
setState(122);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,4,_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 PrefixOpContext extends ParserRuleContext {
public PrefixOpContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_prefixOp; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SnelVisitor ) return ((SnelVisitor extends T>)visitor).visitPrefixOp(this);
else return visitor.visitChildren(this);
}
}
public final PrefixOpContext prefixOp() throws RecognitionException {
PrefixOpContext _localctx = new PrefixOpContext(_ctx, getState());
enterRule(_localctx, 12, RULE_prefixOp);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(123);
_la = _input.LA(1);
if ( !(_la==T__6 || _la==T__7) ) {
_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;
}
@SuppressWarnings("CheckReturnValue")
public static class PostfixOpContext extends ParserRuleContext {
public PostfixOpContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_postfixOp; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SnelVisitor ) return ((SnelVisitor extends T>)visitor).visitPostfixOp(this);
else return visitor.visitChildren(this);
}
}
public final PostfixOpContext postfixOp() throws RecognitionException {
PostfixOpContext _localctx = new PostfixOpContext(_ctx, getState());
enterRule(_localctx, 14, RULE_postfixOp);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(125);
_la = _input.LA(1);
if ( !(_la==T__8 || _la==T__9) ) {
_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;
}
@SuppressWarnings("CheckReturnValue")
public static class MulOpContext extends ParserRuleContext {
public MulOpContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_mulOp; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SnelVisitor ) return ((SnelVisitor extends T>)visitor).visitMulOp(this);
else return visitor.visitChildren(this);
}
}
public final MulOpContext mulOp() throws RecognitionException {
MulOpContext _localctx = new MulOpContext(_ctx, getState());
enterRule(_localctx, 16, RULE_mulOp);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(127);
_la = _input.LA(1);
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 14336L) != 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;
}
@SuppressWarnings("CheckReturnValue")
public static class AddOpContext extends ParserRuleContext {
public AddOpContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_addOp; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SnelVisitor ) return ((SnelVisitor extends T>)visitor).visitAddOp(this);
else return visitor.visitChildren(this);
}
}
public final AddOpContext addOp() throws RecognitionException {
AddOpContext _localctx = new AddOpContext(_ctx, getState());
enterRule(_localctx, 18, RULE_addOp);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(129);
_la = _input.LA(1);
if ( !(_la==T__6 || _la==T__13) ) {
_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;
}
@SuppressWarnings("CheckReturnValue")
public static class EqOpContext extends ParserRuleContext {
public EqOpContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_eqOp; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SnelVisitor ) return ((SnelVisitor extends T>)visitor).visitEqOp(this);
else return visitor.visitChildren(this);
}
}
public final EqOpContext eqOp() throws RecognitionException {
EqOpContext _localctx = new EqOpContext(_ctx, getState());
enterRule(_localctx, 20, RULE_eqOp);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(131);
_la = _input.LA(1);
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 229376L) != 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;
}
@SuppressWarnings("CheckReturnValue")
public static class RelOpContext extends ParserRuleContext {
public RelOpContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_relOp; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SnelVisitor ) return ((SnelVisitor extends T>)visitor).visitRelOp(this);
else return visitor.visitChildren(this);
}
}
public final RelOpContext relOp() throws RecognitionException {
RelOpContext _localctx = new RelOpContext(_ctx, getState());
enterRule(_localctx, 22, RULE_relOp);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(133);
_la = _input.LA(1);
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 3932160L) != 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;
}
@SuppressWarnings("CheckReturnValue")
public static class MemberOpContext extends ParserRuleContext {
public MemberOpContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_memberOp; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SnelVisitor ) return ((SnelVisitor extends T>)visitor).visitMemberOp(this);
else return visitor.visitChildren(this);
}
}
public final MemberOpContext memberOp() throws RecognitionException {
MemberOpContext _localctx = new MemberOpContext(_ctx, getState());
enterRule(_localctx, 24, RULE_memberOp);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(135);
_la = _input.LA(1);
if ( !(_la==T__21 || _la==T__22) ) {
_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;
}
@SuppressWarnings("CheckReturnValue")
public static class AndOpContext extends ParserRuleContext {
public AndOpContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_andOp; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SnelVisitor ) return ((SnelVisitor extends T>)visitor).visitAndOp(this);
else return visitor.visitChildren(this);
}
}
public final AndOpContext andOp() throws RecognitionException {
AndOpContext _localctx = new AndOpContext(_ctx, getState());
enterRule(_localctx, 26, RULE_andOp);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(137);
_la = _input.LA(1);
if ( !(_la==T__23 || _la==T__24) ) {
_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;
}
@SuppressWarnings("CheckReturnValue")
public static class OrOpContext extends ParserRuleContext {
public OrOpContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_orOp; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SnelVisitor ) return ((SnelVisitor extends T>)visitor).visitOrOp(this);
else return visitor.visitChildren(this);
}
}
public final OrOpContext orOp() throws RecognitionException {
OrOpContext _localctx = new OrOpContext(_ctx, getState());
enterRule(_localctx, 28, RULE_orOp);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(139);
_la = _input.LA(1);
if ( !(_la==T__25 || _la==T__26) ) {
_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;
}
@SuppressWarnings("CheckReturnValue")
public static class OtherwiseOpContext extends ParserRuleContext {
public OtherwiseOpContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_otherwiseOp; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SnelVisitor ) return ((SnelVisitor extends T>)visitor).visitOtherwiseOp(this);
else return visitor.visitChildren(this);
}
}
public final OtherwiseOpContext otherwiseOp() throws RecognitionException {
OtherwiseOpContext _localctx = new OtherwiseOpContext(_ctx, getState());
enterRule(_localctx, 30, RULE_otherwiseOp);
try {
enterOuterAlt(_localctx, 1);
{
setState(141);
match(T__27);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class ListExpressionContext extends ParserRuleContext {
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public OptionalTrailingCommaContext optionalTrailingComma() {
return getRuleContext(OptionalTrailingCommaContext.class,0);
}
public ListExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_listExpression; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SnelVisitor ) return ((SnelVisitor extends T>)visitor).visitListExpression(this);
else return visitor.visitChildren(this);
}
}
public final ListExpressionContext listExpression() throws RecognitionException {
ListExpressionContext _localctx = new ListExpressionContext(_ctx, getState());
enterRule(_localctx, 32, RULE_listExpression);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(143);
match(T__28);
setState(154);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 67108864416L) != 0)) {
{
setState(144);
expr(0);
setState(149);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,5,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(145);
match(T__0);
setState(146);
expr(0);
}
}
}
setState(151);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,5,_ctx);
}
setState(152);
optionalTrailingComma();
}
}
setState(156);
match(T__29);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class OptionalTrailingCommaContext extends ParserRuleContext {
public OptionalTrailingCommaContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_optionalTrailingComma; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SnelVisitor ) return ((SnelVisitor extends T>)visitor).visitOptionalTrailingComma(this);
else return visitor.visitChildren(this);
}
}
public final OptionalTrailingCommaContext optionalTrailingComma() throws RecognitionException {
OptionalTrailingCommaContext _localctx = new OptionalTrailingCommaContext(_ctx, getState());
enterRule(_localctx, 34, RULE_optionalTrailingComma);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(159);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T__0) {
{
setState(158);
match(T__0);
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class FunctionExpressionContext extends ParserRuleContext {
public IdentifierContext identifier() {
return getRuleContext(IdentifierContext.class,0);
}
public ActualParamsContext actualParams() {
return getRuleContext(ActualParamsContext.class,0);
}
public FunctionExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_functionExpression; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SnelVisitor ) return ((SnelVisitor extends T>)visitor).visitFunctionExpression(this);
else return visitor.visitChildren(this);
}
}
public final FunctionExpressionContext functionExpression() throws RecognitionException {
FunctionExpressionContext _localctx = new FunctionExpressionContext(_ctx, getState());
enterRule(_localctx, 36, RULE_functionExpression);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(161);
identifier();
setState(162);
match(T__4);
setState(164);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 67108864416L) != 0)) {
{
setState(163);
actualParams();
}
}
setState(166);
match(T__5);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class ActualParamsContext extends ParserRuleContext {
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public ActualParamsContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_actualParams; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SnelVisitor ) return ((SnelVisitor extends T>)visitor).visitActualParams(this);
else return visitor.visitChildren(this);
}
}
public final ActualParamsContext actualParams() throws RecognitionException {
ActualParamsContext _localctx = new ActualParamsContext(_ctx, getState());
enterRule(_localctx, 38, RULE_actualParams);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(168);
expr(0);
setState(173);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T__0) {
{
{
setState(169);
match(T__0);
setState(170);
expr(0);
}
}
setState(175);
_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 ParameterContext extends ParserRuleContext {
public TerminalNode Parameter() { return getToken(SnelParser.Parameter, 0); }
public ParameterContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_parameter; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SnelVisitor ) return ((SnelVisitor extends T>)visitor).visitParameter(this);
else return visitor.visitChildren(this);
}
}
public final ParameterContext parameter() throws RecognitionException {
ParameterContext _localctx = new ParameterContext(_ctx, getState());
enterRule(_localctx, 40, RULE_parameter);
try {
enterOuterAlt(_localctx, 1);
{
setState(176);
match(Parameter);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class IdentifierContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(SnelParser.Identifier, 0); }
public IdentifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_identifier; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SnelVisitor ) return ((SnelVisitor extends T>)visitor).visitIdentifier(this);
else return visitor.visitChildren(this);
}
}
public final IdentifierContext identifier() throws RecognitionException {
IdentifierContext _localctx = new IdentifierContext(_ctx, getState());
enterRule(_localctx, 42, RULE_identifier);
try {
enterOuterAlt(_localctx, 1);
{
setState(178);
match(Identifier);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class LiteralContext extends ParserRuleContext {
public LiteralContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_literal; }
public LiteralContext() { }
public void copyFrom(LiteralContext ctx) {
super.copyFrom(ctx);
}
}
@SuppressWarnings("CheckReturnValue")
public static class StringLiteralContext extends LiteralContext {
public TerminalNode StringLiteral() { return getToken(SnelParser.StringLiteral, 0); }
public StringLiteralContext(LiteralContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SnelVisitor ) return ((SnelVisitor extends T>)visitor).visitStringLiteral(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class IntegerLiteralContext extends LiteralContext {
public TerminalNode IntegerLiteral() { return getToken(SnelParser.IntegerLiteral, 0); }
public IntegerLiteralContext(LiteralContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SnelVisitor ) return ((SnelVisitor extends T>)visitor).visitIntegerLiteral(this);
else return visitor.visitChildren(this);
}
}
@SuppressWarnings("CheckReturnValue")
public static class BooleanLiteralContext extends LiteralContext {
public TerminalNode BooleanLiteral() { return getToken(SnelParser.BooleanLiteral, 0); }
public BooleanLiteralContext(LiteralContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof SnelVisitor ) return ((SnelVisitor extends T>)visitor).visitBooleanLiteral(this);
else return visitor.visitChildren(this);
}
}
public final LiteralContext literal() throws RecognitionException {
LiteralContext _localctx = new LiteralContext(_ctx, getState());
enterRule(_localctx, 44, RULE_literal);
try {
setState(183);
_errHandler.sync(this);
switch (_input.LA(1)) {
case BooleanLiteral:
_localctx = new BooleanLiteralContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(180);
match(BooleanLiteral);
}
break;
case IntegerLiteral:
_localctx = new IntegerLiteralContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(181);
match(IntegerLiteral);
}
break;
case StringLiteral:
_localctx = new StringLiteralContext(_localctx);
enterOuterAlt(_localctx, 3);
{
setState(182);
match(StringLiteral);
}
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 boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) {
switch (ruleIndex) {
case 5:
return expr_sempred((ExprContext)_localctx, predIndex);
}
return true;
}
private boolean expr_sempred(ExprContext _localctx, int predIndex) {
switch (predIndex) {
case 0:
return precpred(_ctx, 15);
case 1:
return precpred(_ctx, 14);
case 2:
return precpred(_ctx, 13);
case 3:
return precpred(_ctx, 12);
case 4:
return precpred(_ctx, 11);
case 5:
return precpred(_ctx, 10);
case 6:
return precpred(_ctx, 9);
case 7:
return precpred(_ctx, 8);
case 8:
return precpred(_ctx, 16);
case 9:
return precpred(_ctx, 7);
}
return true;
}
public static final String _serializedATN =
"\u0004\u0001$\u00ba\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\u0002\u0011\u0007\u0011\u0002\u0012\u0007\u0012"+
"\u0002\u0013\u0007\u0013\u0002\u0014\u0007\u0014\u0002\u0015\u0007\u0015"+
"\u0002\u0016\u0007\u0016\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0001"+
"\u0001\u0001\u0001\u0001\u0001\u0002\u0001\u0002\u0001\u0002\u0005\u0002"+
"8\b\u0002\n\u0002\f\u0002;\t\u0002\u0001\u0003\u0001\u0003\u0003\u0003"+
"?\b\u0003\u0001\u0004\u0001\u0004\u0001\u0005\u0001\u0005\u0001\u0005"+
"\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005"+
"\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0003\u0005P\b\u0005"+
"\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005"+
"\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005"+
"\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005"+
"\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005"+
"\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005"+
"\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005"+
"\u0001\u0005\u0005\u0005w\b\u0005\n\u0005\f\u0005z\t\u0005\u0001\u0006"+
"\u0001\u0006\u0001\u0007\u0001\u0007\u0001\b\u0001\b\u0001\t\u0001\t\u0001"+
"\n\u0001\n\u0001\u000b\u0001\u000b\u0001\f\u0001\f\u0001\r\u0001\r\u0001"+
"\u000e\u0001\u000e\u0001\u000f\u0001\u000f\u0001\u0010\u0001\u0010\u0001"+
"\u0010\u0001\u0010\u0005\u0010\u0094\b\u0010\n\u0010\f\u0010\u0097\t\u0010"+
"\u0001\u0010\u0001\u0010\u0003\u0010\u009b\b\u0010\u0001\u0010\u0001\u0010"+
"\u0001\u0011\u0003\u0011\u00a0\b\u0011\u0001\u0012\u0001\u0012\u0001\u0012"+
"\u0003\u0012\u00a5\b\u0012\u0001\u0012\u0001\u0012\u0001\u0013\u0001\u0013"+
"\u0001\u0013\u0005\u0013\u00ac\b\u0013\n\u0013\f\u0013\u00af\t\u0013\u0001"+
"\u0014\u0001\u0014\u0001\u0015\u0001\u0015\u0001\u0016\u0001\u0016\u0001"+
"\u0016\u0003\u0016\u00b8\b\u0016\u0001\u0016\u0000\u0001\n\u0017\u0000"+
"\u0002\u0004\u0006\b\n\f\u000e\u0010\u0012\u0014\u0016\u0018\u001a\u001c"+
"\u001e \"$&(*,\u0000\n\u0001\u0000\u0002\u0003\u0001\u0000\u0007\b\u0001"+
"\u0000\t\n\u0001\u0000\u000b\r\u0002\u0000\u0007\u0007\u000e\u000e\u0001"+
"\u0000\u000f\u0011\u0001\u0000\u0012\u0015\u0001\u0000\u0016\u0017\u0001"+
"\u0000\u0018\u0019\u0001\u0000\u001a\u001b\u00bb\u0000.\u0001\u0000\u0000"+
"\u0000\u00021\u0001\u0000\u0000\u0000\u00044\u0001\u0000\u0000\u0000\u0006"+
"<\u0001\u0000\u0000\u0000\b@\u0001\u0000\u0000\u0000\nO\u0001\u0000\u0000"+
"\u0000\f{\u0001\u0000\u0000\u0000\u000e}\u0001\u0000\u0000\u0000\u0010"+
"\u007f\u0001\u0000\u0000\u0000\u0012\u0081\u0001\u0000\u0000\u0000\u0014"+
"\u0083\u0001\u0000\u0000\u0000\u0016\u0085\u0001\u0000\u0000\u0000\u0018"+
"\u0087\u0001\u0000\u0000\u0000\u001a\u0089\u0001\u0000\u0000\u0000\u001c"+
"\u008b\u0001\u0000\u0000\u0000\u001e\u008d\u0001\u0000\u0000\u0000 \u008f"+
"\u0001\u0000\u0000\u0000\"\u009f\u0001\u0000\u0000\u0000$\u00a1\u0001"+
"\u0000\u0000\u0000&\u00a8\u0001\u0000\u0000\u0000(\u00b0\u0001\u0000\u0000"+
"\u0000*\u00b2\u0001\u0000\u0000\u0000,\u00b7\u0001\u0000\u0000\u0000."+
"/\u0003\n\u0005\u0000/0\u0005\u0000\u0000\u00010\u0001\u0001\u0000\u0000"+
"\u000012\u0003\u0004\u0002\u000023\u0005\u0000\u0000\u00013\u0003\u0001"+
"\u0000\u0000\u000049\u0003\u0006\u0003\u000056\u0005\u0001\u0000\u0000"+
"68\u0003\u0006\u0003\u000075\u0001\u0000\u0000\u00008;\u0001\u0000\u0000"+
"\u000097\u0001\u0000\u0000\u00009:\u0001\u0000\u0000\u0000:\u0005\u0001"+
"\u0000\u0000\u0000;9\u0001\u0000\u0000\u0000<>\u0003\n\u0005\u0000=?\u0003"+
"\b\u0004\u0000>=\u0001\u0000\u0000\u0000>?\u0001\u0000\u0000\u0000?\u0007"+
"\u0001\u0000\u0000\u0000@A\u0007\u0000\u0000\u0000A\t\u0001\u0000\u0000"+
"\u0000BC\u0006\u0005\uffff\uffff\u0000CD\u0003\f\u0006\u0000DE\u0003\n"+
"\u0005\u0011EP\u0001\u0000\u0000\u0000FP\u0003 \u0010\u0000GP\u0003$\u0012"+
"\u0000HI\u0005\u0005\u0000\u0000IJ\u0003\n\u0005\u0000JK\u0005\u0006\u0000"+
"\u0000KP\u0001\u0000\u0000\u0000LP\u0003(\u0014\u0000MP\u0003*\u0015\u0000"+
"NP\u0003,\u0016\u0000OB\u0001\u0000\u0000\u0000OF\u0001\u0000\u0000\u0000"+
"OG\u0001\u0000\u0000\u0000OH\u0001\u0000\u0000\u0000OL\u0001\u0000\u0000"+
"\u0000OM\u0001\u0000\u0000\u0000ON\u0001\u0000\u0000\u0000Px\u0001\u0000"+
"\u0000\u0000QR\n\u000f\u0000\u0000RS\u0003\u0010\b\u0000ST\u0003\n\u0005"+
"\u0010Tw\u0001\u0000\u0000\u0000UV\n\u000e\u0000\u0000VW\u0003\u0012\t"+
"\u0000WX\u0003\n\u0005\u000fXw\u0001\u0000\u0000\u0000YZ\n\r\u0000\u0000"+
"Z[\u0003\u0014\n\u0000[\\\u0003\n\u0005\u000e\\w\u0001\u0000\u0000\u0000"+
"]^\n\f\u0000\u0000^_\u0003\u0016\u000b\u0000_`\u0003\n\u0005\r`w\u0001"+
"\u0000\u0000\u0000ab\n\u000b\u0000\u0000bc\u0003\u0018\f\u0000cd\u0003"+
"\n\u0005\fdw\u0001\u0000\u0000\u0000ef\n\n\u0000\u0000fg\u0003\u001a\r"+
"\u0000gh\u0003\n\u0005\u000bhw\u0001\u0000\u0000\u0000ij\n\t\u0000\u0000"+
"jk\u0003\u001c\u000e\u0000kl\u0003\n\u0005\nlw\u0001\u0000\u0000\u0000"+
"mn\n\b\u0000\u0000no\u0003\u001e\u000f\u0000op\u0003\n\u0005\tpw\u0001"+
"\u0000\u0000\u0000qr\n\u0010\u0000\u0000rw\u0003\u000e\u0007\u0000st\n"+
"\u0007\u0000\u0000tu\u0005\u0004\u0000\u0000uw\u0003*\u0015\u0000vQ\u0001"+
"\u0000\u0000\u0000vU\u0001\u0000\u0000\u0000vY\u0001\u0000\u0000\u0000"+
"v]\u0001\u0000\u0000\u0000va\u0001\u0000\u0000\u0000ve\u0001\u0000\u0000"+
"\u0000vi\u0001\u0000\u0000\u0000vm\u0001\u0000\u0000\u0000vq\u0001\u0000"+
"\u0000\u0000vs\u0001\u0000\u0000\u0000wz\u0001\u0000\u0000\u0000xv\u0001"+
"\u0000\u0000\u0000xy\u0001\u0000\u0000\u0000y\u000b\u0001\u0000\u0000"+
"\u0000zx\u0001\u0000\u0000\u0000{|\u0007\u0001\u0000\u0000|\r\u0001\u0000"+
"\u0000\u0000}~\u0007\u0002\u0000\u0000~\u000f\u0001\u0000\u0000\u0000"+
"\u007f\u0080\u0007\u0003\u0000\u0000\u0080\u0011\u0001\u0000\u0000\u0000"+
"\u0081\u0082\u0007\u0004\u0000\u0000\u0082\u0013\u0001\u0000\u0000\u0000"+
"\u0083\u0084\u0007\u0005\u0000\u0000\u0084\u0015\u0001\u0000\u0000\u0000"+
"\u0085\u0086\u0007\u0006\u0000\u0000\u0086\u0017\u0001\u0000\u0000\u0000"+
"\u0087\u0088\u0007\u0007\u0000\u0000\u0088\u0019\u0001\u0000\u0000\u0000"+
"\u0089\u008a\u0007\b\u0000\u0000\u008a\u001b\u0001\u0000\u0000\u0000\u008b"+
"\u008c\u0007\t\u0000\u0000\u008c\u001d\u0001\u0000\u0000\u0000\u008d\u008e"+
"\u0005\u001c\u0000\u0000\u008e\u001f\u0001\u0000\u0000\u0000\u008f\u009a"+
"\u0005\u001d\u0000\u0000\u0090\u0095\u0003\n\u0005\u0000\u0091\u0092\u0005"+
"\u0001\u0000\u0000\u0092\u0094\u0003\n\u0005\u0000\u0093\u0091\u0001\u0000"+
"\u0000\u0000\u0094\u0097\u0001\u0000\u0000\u0000\u0095\u0093\u0001\u0000"+
"\u0000\u0000\u0095\u0096\u0001\u0000\u0000\u0000\u0096\u0098\u0001\u0000"+
"\u0000\u0000\u0097\u0095\u0001\u0000\u0000\u0000\u0098\u0099\u0003\"\u0011"+
"\u0000\u0099\u009b\u0001\u0000\u0000\u0000\u009a\u0090\u0001\u0000\u0000"+
"\u0000\u009a\u009b\u0001\u0000\u0000\u0000\u009b\u009c\u0001\u0000\u0000"+
"\u0000\u009c\u009d\u0005\u001e\u0000\u0000\u009d!\u0001\u0000\u0000\u0000"+
"\u009e\u00a0\u0005\u0001\u0000\u0000\u009f\u009e\u0001\u0000\u0000\u0000"+
"\u009f\u00a0\u0001\u0000\u0000\u0000\u00a0#\u0001\u0000\u0000\u0000\u00a1"+
"\u00a2\u0003*\u0015\u0000\u00a2\u00a4\u0005\u0005\u0000\u0000\u00a3\u00a5"+
"\u0003&\u0013\u0000\u00a4\u00a3\u0001\u0000\u0000\u0000\u00a4\u00a5\u0001"+
"\u0000\u0000\u0000\u00a5\u00a6\u0001\u0000\u0000\u0000\u00a6\u00a7\u0005"+
"\u0006\u0000\u0000\u00a7%\u0001\u0000\u0000\u0000\u00a8\u00ad\u0003\n"+
"\u0005\u0000\u00a9\u00aa\u0005\u0001\u0000\u0000\u00aa\u00ac\u0003\n\u0005"+
"\u0000\u00ab\u00a9\u0001\u0000\u0000\u0000\u00ac\u00af\u0001\u0000\u0000"+
"\u0000\u00ad\u00ab\u0001\u0000\u0000\u0000\u00ad\u00ae\u0001\u0000\u0000"+
"\u0000\u00ae\'\u0001\u0000\u0000\u0000\u00af\u00ad\u0001\u0000\u0000\u0000"+
"\u00b0\u00b1\u0005\"\u0000\u0000\u00b1)\u0001\u0000\u0000\u0000\u00b2"+
"\u00b3\u0005#\u0000\u0000\u00b3+\u0001\u0000\u0000\u0000\u00b4\u00b8\u0005"+
"\u001f\u0000\u0000\u00b5\u00b8\u0005 \u0000\u0000\u00b6\u00b8\u0005!\u0000"+
"\u0000\u00b7\u00b4\u0001\u0000\u0000\u0000\u00b7\u00b5\u0001\u0000\u0000"+
"\u0000\u00b7\u00b6\u0001\u0000\u0000\u0000\u00b8-\u0001\u0000\u0000\u0000"+
"\u000b9>Ovx\u0095\u009a\u009f\u00a4\u00ad\u00b7";
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);
}
}
}