caustic.grammar.CausticParser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of caustic-grammar Show documentation
Show all versions of caustic-grammar Show documentation
Reinventing database transactions
// Generated from caustic-compiler/src/main/antlr/Caustic.g4 by ANTLR 4.7
package caustic.grammar;
import org.antlr.v4.runtime.atn.*;
import org.antlr.v4.runtime.dfa.DFA;
import org.antlr.v4.runtime.*;
import org.antlr.v4.runtime.misc.*;
import org.antlr.v4.runtime.tree.*;
import java.util.List;
import java.util.Iterator;
import java.util.ArrayList;
@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
public class CausticParser extends Parser {
static { RuntimeMetaData.checkVersion("4.7", RuntimeMetaData.VERSION); }
protected static final DFA[] _decisionToDFA;
protected static final PredictionContextCache _sharedContextCache =
new PredictionContextCache();
public static final int
Assert=1, Def=2, Del=3, Elif=4, Else=5, Extends=6, False=7, If=8, Import=9,
Module=10, Mut=11, Null=12, Rollback=13, Service=14, Struct=15, While=16,
True=17, Var=18, Add=19, AddAssign=20, Ampersand=21, And=22, Arrow=23,
Assign=24, Colon=25, Comma=26, Div=27, DivAssign=28, Equal=29, GreaterEqual=30,
GreaterThan=31, LeftBlock=32, LeftBracket=33, LeftParen=34, LessEqual=35,
LessThan=36, Mod=37, ModAssign=38, Mul=39, MulAssign=40, Not=41, NotEqual=42,
Or=43, Period=44, Question=45, RightBlock=46, RightBracket=47, RightParen=48,
Semicolon=49, Sub=50, SubAssign=51, Underscore=52, Number=53, Identifier=54,
String=55, BlockComment=56, LineComment=57, Whitespace=58;
public static final int
RULE_constant = 0, RULE_name = 1, RULE_funcall = 2, RULE_primaryExpression = 3,
RULE_prefixExpression = 4, RULE_multiplicativeExpression = 5, RULE_additiveExpression = 6,
RULE_relationalExpression = 7, RULE_equalityExpression = 8, RULE_logicalAndExpression = 9,
RULE_logicalOrExpression = 10, RULE_expression = 11, RULE_conditional = 12,
RULE_loop = 13, RULE_deletion = 14, RULE_definition = 15, RULE_assignment = 16,
RULE_rollback = 17, RULE_statement = 18, RULE_block = 19, RULE_type = 20,
RULE_parameter = 21, RULE_parameters = 22, RULE_function = 23, RULE_service = 24,
RULE_struct = 25, RULE_declaration = 26, RULE_module = 27, RULE_include = 28,
RULE_program = 29;
public static final String[] ruleNames = {
"constant", "name", "funcall", "primaryExpression", "prefixExpression",
"multiplicativeExpression", "additiveExpression", "relationalExpression",
"equalityExpression", "logicalAndExpression", "logicalOrExpression", "expression",
"conditional", "loop", "deletion", "definition", "assignment", "rollback",
"statement", "block", "type", "parameter", "parameters", "function", "service",
"struct", "declaration", "module", "include", "program"
};
private static final String[] _LITERAL_NAMES = {
null, "'assert'", "'def'", "'del'", "'elif'", "'else'", "'extends'", "'false'",
"'if'", "'import'", "'module'", "'mut'", "'null'", "'rollback'", "'service'",
"'struct'", "'while'", "'true'", "'var'", "'+'", "'+='", "'&'", "'&&'",
"'=>'", "'='", "':'", "','", "'/'", "'/='", "'=='", "'>='", "'>'", "'['",
"'{'", "'('", "'<='", "'<'", "'%'", "'%='", "'*'", "'*='", "'!'", "'!='",
"'||'", "'.'", "'?'", "']'", "'}'", "')'", "';'", "'-'", "'-='", "'_'"
};
private static final String[] _SYMBOLIC_NAMES = {
null, "Assert", "Def", "Del", "Elif", "Else", "Extends", "False", "If",
"Import", "Module", "Mut", "Null", "Rollback", "Service", "Struct", "While",
"True", "Var", "Add", "AddAssign", "Ampersand", "And", "Arrow", "Assign",
"Colon", "Comma", "Div", "DivAssign", "Equal", "GreaterEqual", "GreaterThan",
"LeftBlock", "LeftBracket", "LeftParen", "LessEqual", "LessThan", "Mod",
"ModAssign", "Mul", "MulAssign", "Not", "NotEqual", "Or", "Period", "Question",
"RightBlock", "RightBracket", "RightParen", "Semicolon", "Sub", "SubAssign",
"Underscore", "Number", "Identifier", "String", "BlockComment", "LineComment",
"Whitespace"
};
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 "Caustic.g4"; }
@Override
public String[] getRuleNames() { return ruleNames; }
@Override
public String getSerializedATN() { return _serializedATN; }
@Override
public ATN getATN() { return _ATN; }
public CausticParser(TokenStream input) {
super(input);
_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
public static class ConstantContext extends ParserRuleContext {
public TerminalNode True() { return getToken(CausticParser.True, 0); }
public TerminalNode False() { return getToken(CausticParser.False, 0); }
public TerminalNode Number() { return getToken(CausticParser.Number, 0); }
public TerminalNode String() { return getToken(CausticParser.String, 0); }
public TerminalNode Null() { return getToken(CausticParser.Null, 0); }
public ConstantContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_constant; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).enterConstant(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).exitConstant(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CausticVisitor ) return ((CausticVisitor extends T>)visitor).visitConstant(this);
else return visitor.visitChildren(this);
}
}
public final ConstantContext constant() throws RecognitionException {
ConstantContext _localctx = new ConstantContext(_ctx, getState());
enterRule(_localctx, 0, RULE_constant);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(60);
_la = _input.LA(1);
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << False) | (1L << Null) | (1L << True) | (1L << Number) | (1L << String))) != 0)) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class NameContext extends ParserRuleContext {
public List Identifier() { return getTokens(CausticParser.Identifier); }
public TerminalNode Identifier(int i) {
return getToken(CausticParser.Identifier, i);
}
public NameContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_name; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).enterName(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).exitName(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CausticVisitor ) return ((CausticVisitor extends T>)visitor).visitName(this);
else return visitor.visitChildren(this);
}
}
public final NameContext name() throws RecognitionException {
NameContext _localctx = new NameContext(_ctx, getState());
enterRule(_localctx, 2, RULE_name);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(62);
match(Identifier);
setState(67);
_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(63);
match(Period);
setState(64);
match(Identifier);
}
}
}
setState(69);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,0,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class FuncallContext extends ParserRuleContext {
public TypeContext type() {
return getRuleContext(TypeContext.class,0);
}
public TerminalNode String() { return getToken(CausticParser.String, 0); }
public TerminalNode Identifier() { return getToken(CausticParser.Identifier, 0); }
public List expression() {
return getRuleContexts(ExpressionContext.class);
}
public ExpressionContext expression(int i) {
return getRuleContext(ExpressionContext.class,i);
}
public FuncallContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_funcall; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).enterFuncall(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).exitFuncall(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CausticVisitor ) return ((CausticVisitor extends T>)visitor).visitFuncall(this);
else return visitor.visitChildren(this);
}
}
public final FuncallContext funcall() throws RecognitionException {
FuncallContext _localctx = new FuncallContext(_ctx, getState());
enterRule(_localctx, 4, RULE_funcall);
int _la;
try {
int _alt;
setState(89);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,3,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(70);
type();
setState(71);
match(LeftParen);
setState(72);
match(String);
setState(73);
match(RightParen);
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(75);
match(Identifier);
setState(76);
match(LeftParen);
setState(82);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,1,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(77);
expression();
setState(78);
match(Comma);
}
}
}
setState(84);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,1,_ctx);
}
setState(86);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << False) | (1L << Null) | (1L << True) | (1L << Add) | (1L << LeftParen) | (1L << Not) | (1L << Sub) | (1L << Number) | (1L << Identifier) | (1L << String))) != 0)) {
{
setState(85);
expression();
}
}
setState(88);
match(RightParen);
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class PrimaryExpressionContext extends ParserRuleContext {
public NameContext name() {
return getRuleContext(NameContext.class,0);
}
public FuncallContext funcall() {
return getRuleContext(FuncallContext.class,0);
}
public ConstantContext constant() {
return getRuleContext(ConstantContext.class,0);
}
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public PrimaryExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_primaryExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).enterPrimaryExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).exitPrimaryExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CausticVisitor ) return ((CausticVisitor extends T>)visitor).visitPrimaryExpression(this);
else return visitor.visitChildren(this);
}
}
public final PrimaryExpressionContext primaryExpression() throws RecognitionException {
PrimaryExpressionContext _localctx = new PrimaryExpressionContext(_ctx, getState());
enterRule(_localctx, 6, RULE_primaryExpression);
try {
setState(98);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,4,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(91);
name();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(92);
funcall();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(93);
constant();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(94);
match(LeftParen);
setState(95);
expression();
setState(96);
match(RightParen);
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class PrefixExpressionContext extends ParserRuleContext {
public PrimaryExpressionContext primaryExpression() {
return getRuleContext(PrimaryExpressionContext.class,0);
}
public TerminalNode Add() { return getToken(CausticParser.Add, 0); }
public TerminalNode Sub() { return getToken(CausticParser.Sub, 0); }
public TerminalNode Not() { return getToken(CausticParser.Not, 0); }
public PrefixExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_prefixExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).enterPrefixExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).exitPrefixExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CausticVisitor ) return ((CausticVisitor extends T>)visitor).visitPrefixExpression(this);
else return visitor.visitChildren(this);
}
}
public final PrefixExpressionContext prefixExpression() throws RecognitionException {
PrefixExpressionContext _localctx = new PrefixExpressionContext(_ctx, getState());
enterRule(_localctx, 8, RULE_prefixExpression);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(101);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << Add) | (1L << Not) | (1L << Sub))) != 0)) {
{
setState(100);
_la = _input.LA(1);
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << Add) | (1L << Not) | (1L << Sub))) != 0)) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
setState(103);
primaryExpression();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class MultiplicativeExpressionContext extends ParserRuleContext {
public PrefixExpressionContext prefixExpression() {
return getRuleContext(PrefixExpressionContext.class,0);
}
public MultiplicativeExpressionContext multiplicativeExpression() {
return getRuleContext(MultiplicativeExpressionContext.class,0);
}
public TerminalNode Mul() { return getToken(CausticParser.Mul, 0); }
public TerminalNode Div() { return getToken(CausticParser.Div, 0); }
public TerminalNode Mod() { return getToken(CausticParser.Mod, 0); }
public MultiplicativeExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_multiplicativeExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).enterMultiplicativeExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).exitMultiplicativeExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CausticVisitor ) return ((CausticVisitor extends T>)visitor).visitMultiplicativeExpression(this);
else return visitor.visitChildren(this);
}
}
public final MultiplicativeExpressionContext multiplicativeExpression() throws RecognitionException {
return multiplicativeExpression(0);
}
private MultiplicativeExpressionContext multiplicativeExpression(int _p) throws RecognitionException {
ParserRuleContext _parentctx = _ctx;
int _parentState = getState();
MultiplicativeExpressionContext _localctx = new MultiplicativeExpressionContext(_ctx, _parentState);
MultiplicativeExpressionContext _prevctx = _localctx;
int _startState = 10;
enterRecursionRule(_localctx, 10, RULE_multiplicativeExpression, _p);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
{
setState(106);
prefixExpression();
}
_ctx.stop = _input.LT(-1);
setState(119);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,7,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
if ( _parseListeners!=null ) triggerExitRuleEvent();
_prevctx = _localctx;
{
setState(117);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,6,_ctx) ) {
case 1:
{
_localctx = new MultiplicativeExpressionContext(_parentctx, _parentState);
pushNewRecursionContext(_localctx, _startState, RULE_multiplicativeExpression);
setState(108);
if (!(precpred(_ctx, 3))) throw new FailedPredicateException(this, "precpred(_ctx, 3)");
setState(109);
match(Mul);
setState(110);
prefixExpression();
}
break;
case 2:
{
_localctx = new MultiplicativeExpressionContext(_parentctx, _parentState);
pushNewRecursionContext(_localctx, _startState, RULE_multiplicativeExpression);
setState(111);
if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
setState(112);
match(Div);
setState(113);
prefixExpression();
}
break;
case 3:
{
_localctx = new MultiplicativeExpressionContext(_parentctx, _parentState);
pushNewRecursionContext(_localctx, _startState, RULE_multiplicativeExpression);
setState(114);
if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)");
setState(115);
match(Mod);
setState(116);
prefixExpression();
}
break;
}
}
}
setState(121);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,7,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
unrollRecursionContexts(_parentctx);
}
return _localctx;
}
public static class AdditiveExpressionContext extends ParserRuleContext {
public MultiplicativeExpressionContext multiplicativeExpression() {
return getRuleContext(MultiplicativeExpressionContext.class,0);
}
public AdditiveExpressionContext additiveExpression() {
return getRuleContext(AdditiveExpressionContext.class,0);
}
public TerminalNode Add() { return getToken(CausticParser.Add, 0); }
public TerminalNode Sub() { return getToken(CausticParser.Sub, 0); }
public AdditiveExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_additiveExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).enterAdditiveExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).exitAdditiveExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CausticVisitor ) return ((CausticVisitor extends T>)visitor).visitAdditiveExpression(this);
else return visitor.visitChildren(this);
}
}
public final AdditiveExpressionContext additiveExpression() throws RecognitionException {
return additiveExpression(0);
}
private AdditiveExpressionContext additiveExpression(int _p) throws RecognitionException {
ParserRuleContext _parentctx = _ctx;
int _parentState = getState();
AdditiveExpressionContext _localctx = new AdditiveExpressionContext(_ctx, _parentState);
AdditiveExpressionContext _prevctx = _localctx;
int _startState = 12;
enterRecursionRule(_localctx, 12, RULE_additiveExpression, _p);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
{
setState(123);
multiplicativeExpression(0);
}
_ctx.stop = _input.LT(-1);
setState(133);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,9,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
if ( _parseListeners!=null ) triggerExitRuleEvent();
_prevctx = _localctx;
{
setState(131);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,8,_ctx) ) {
case 1:
{
_localctx = new AdditiveExpressionContext(_parentctx, _parentState);
pushNewRecursionContext(_localctx, _startState, RULE_additiveExpression);
setState(125);
if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
setState(126);
match(Add);
setState(127);
multiplicativeExpression(0);
}
break;
case 2:
{
_localctx = new AdditiveExpressionContext(_parentctx, _parentState);
pushNewRecursionContext(_localctx, _startState, RULE_additiveExpression);
setState(128);
if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)");
setState(129);
match(Sub);
setState(130);
multiplicativeExpression(0);
}
break;
}
}
}
setState(135);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,9,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
unrollRecursionContexts(_parentctx);
}
return _localctx;
}
public static class RelationalExpressionContext extends ParserRuleContext {
public AdditiveExpressionContext additiveExpression() {
return getRuleContext(AdditiveExpressionContext.class,0);
}
public RelationalExpressionContext relationalExpression() {
return getRuleContext(RelationalExpressionContext.class,0);
}
public TerminalNode LessThan() { return getToken(CausticParser.LessThan, 0); }
public TerminalNode GreaterThan() { return getToken(CausticParser.GreaterThan, 0); }
public TerminalNode LessEqual() { return getToken(CausticParser.LessEqual, 0); }
public TerminalNode GreaterEqual() { return getToken(CausticParser.GreaterEqual, 0); }
public RelationalExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_relationalExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).enterRelationalExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).exitRelationalExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CausticVisitor ) return ((CausticVisitor extends T>)visitor).visitRelationalExpression(this);
else return visitor.visitChildren(this);
}
}
public final RelationalExpressionContext relationalExpression() throws RecognitionException {
return relationalExpression(0);
}
private RelationalExpressionContext relationalExpression(int _p) throws RecognitionException {
ParserRuleContext _parentctx = _ctx;
int _parentState = getState();
RelationalExpressionContext _localctx = new RelationalExpressionContext(_ctx, _parentState);
RelationalExpressionContext _prevctx = _localctx;
int _startState = 14;
enterRecursionRule(_localctx, 14, RULE_relationalExpression, _p);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
{
setState(137);
additiveExpression(0);
}
_ctx.stop = _input.LT(-1);
setState(153);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,11,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
if ( _parseListeners!=null ) triggerExitRuleEvent();
_prevctx = _localctx;
{
setState(151);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,10,_ctx) ) {
case 1:
{
_localctx = new RelationalExpressionContext(_parentctx, _parentState);
pushNewRecursionContext(_localctx, _startState, RULE_relationalExpression);
setState(139);
if (!(precpred(_ctx, 4))) throw new FailedPredicateException(this, "precpred(_ctx, 4)");
setState(140);
match(LessThan);
setState(141);
additiveExpression(0);
}
break;
case 2:
{
_localctx = new RelationalExpressionContext(_parentctx, _parentState);
pushNewRecursionContext(_localctx, _startState, RULE_relationalExpression);
setState(142);
if (!(precpred(_ctx, 3))) throw new FailedPredicateException(this, "precpred(_ctx, 3)");
setState(143);
match(GreaterThan);
setState(144);
additiveExpression(0);
}
break;
case 3:
{
_localctx = new RelationalExpressionContext(_parentctx, _parentState);
pushNewRecursionContext(_localctx, _startState, RULE_relationalExpression);
setState(145);
if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
setState(146);
match(LessEqual);
setState(147);
additiveExpression(0);
}
break;
case 4:
{
_localctx = new RelationalExpressionContext(_parentctx, _parentState);
pushNewRecursionContext(_localctx, _startState, RULE_relationalExpression);
setState(148);
if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)");
setState(149);
match(GreaterEqual);
setState(150);
additiveExpression(0);
}
break;
}
}
}
setState(155);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,11,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
unrollRecursionContexts(_parentctx);
}
return _localctx;
}
public static class EqualityExpressionContext extends ParserRuleContext {
public RelationalExpressionContext relationalExpression() {
return getRuleContext(RelationalExpressionContext.class,0);
}
public EqualityExpressionContext equalityExpression() {
return getRuleContext(EqualityExpressionContext.class,0);
}
public TerminalNode Equal() { return getToken(CausticParser.Equal, 0); }
public TerminalNode NotEqual() { return getToken(CausticParser.NotEqual, 0); }
public EqualityExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_equalityExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).enterEqualityExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).exitEqualityExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CausticVisitor ) return ((CausticVisitor extends T>)visitor).visitEqualityExpression(this);
else return visitor.visitChildren(this);
}
}
public final EqualityExpressionContext equalityExpression() throws RecognitionException {
return equalityExpression(0);
}
private EqualityExpressionContext equalityExpression(int _p) throws RecognitionException {
ParserRuleContext _parentctx = _ctx;
int _parentState = getState();
EqualityExpressionContext _localctx = new EqualityExpressionContext(_ctx, _parentState);
EqualityExpressionContext _prevctx = _localctx;
int _startState = 16;
enterRecursionRule(_localctx, 16, RULE_equalityExpression, _p);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
{
setState(157);
relationalExpression(0);
}
_ctx.stop = _input.LT(-1);
setState(167);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,13,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
if ( _parseListeners!=null ) triggerExitRuleEvent();
_prevctx = _localctx;
{
setState(165);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,12,_ctx) ) {
case 1:
{
_localctx = new EqualityExpressionContext(_parentctx, _parentState);
pushNewRecursionContext(_localctx, _startState, RULE_equalityExpression);
setState(159);
if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
setState(160);
match(Equal);
setState(161);
relationalExpression(0);
}
break;
case 2:
{
_localctx = new EqualityExpressionContext(_parentctx, _parentState);
pushNewRecursionContext(_localctx, _startState, RULE_equalityExpression);
setState(162);
if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)");
setState(163);
match(NotEqual);
setState(164);
relationalExpression(0);
}
break;
}
}
}
setState(169);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,13,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
unrollRecursionContexts(_parentctx);
}
return _localctx;
}
public static class LogicalAndExpressionContext extends ParserRuleContext {
public EqualityExpressionContext equalityExpression() {
return getRuleContext(EqualityExpressionContext.class,0);
}
public LogicalAndExpressionContext logicalAndExpression() {
return getRuleContext(LogicalAndExpressionContext.class,0);
}
public TerminalNode And() { return getToken(CausticParser.And, 0); }
public LogicalAndExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_logicalAndExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).enterLogicalAndExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).exitLogicalAndExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CausticVisitor ) return ((CausticVisitor extends T>)visitor).visitLogicalAndExpression(this);
else return visitor.visitChildren(this);
}
}
public final LogicalAndExpressionContext logicalAndExpression() throws RecognitionException {
return logicalAndExpression(0);
}
private LogicalAndExpressionContext logicalAndExpression(int _p) throws RecognitionException {
ParserRuleContext _parentctx = _ctx;
int _parentState = getState();
LogicalAndExpressionContext _localctx = new LogicalAndExpressionContext(_ctx, _parentState);
LogicalAndExpressionContext _prevctx = _localctx;
int _startState = 18;
enterRecursionRule(_localctx, 18, RULE_logicalAndExpression, _p);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
{
setState(171);
equalityExpression(0);
}
_ctx.stop = _input.LT(-1);
setState(178);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,14,_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 LogicalAndExpressionContext(_parentctx, _parentState);
pushNewRecursionContext(_localctx, _startState, RULE_logicalAndExpression);
setState(173);
if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)");
setState(174);
match(And);
setState(175);
equalityExpression(0);
}
}
}
setState(180);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,14,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
unrollRecursionContexts(_parentctx);
}
return _localctx;
}
public static class LogicalOrExpressionContext extends ParserRuleContext {
public LogicalAndExpressionContext logicalAndExpression() {
return getRuleContext(LogicalAndExpressionContext.class,0);
}
public LogicalOrExpressionContext logicalOrExpression() {
return getRuleContext(LogicalOrExpressionContext.class,0);
}
public TerminalNode Or() { return getToken(CausticParser.Or, 0); }
public LogicalOrExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_logicalOrExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).enterLogicalOrExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).exitLogicalOrExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CausticVisitor ) return ((CausticVisitor extends T>)visitor).visitLogicalOrExpression(this);
else return visitor.visitChildren(this);
}
}
public final LogicalOrExpressionContext logicalOrExpression() throws RecognitionException {
return logicalOrExpression(0);
}
private LogicalOrExpressionContext logicalOrExpression(int _p) throws RecognitionException {
ParserRuleContext _parentctx = _ctx;
int _parentState = getState();
LogicalOrExpressionContext _localctx = new LogicalOrExpressionContext(_ctx, _parentState);
LogicalOrExpressionContext _prevctx = _localctx;
int _startState = 20;
enterRecursionRule(_localctx, 20, RULE_logicalOrExpression, _p);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
{
setState(182);
logicalAndExpression(0);
}
_ctx.stop = _input.LT(-1);
setState(189);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,15,_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 LogicalOrExpressionContext(_parentctx, _parentState);
pushNewRecursionContext(_localctx, _startState, RULE_logicalOrExpression);
setState(184);
if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)");
setState(185);
match(Or);
setState(186);
logicalAndExpression(0);
}
}
}
setState(191);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,15,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
unrollRecursionContexts(_parentctx);
}
return _localctx;
}
public static class ExpressionContext extends ParserRuleContext {
public LogicalOrExpressionContext logicalOrExpression() {
return getRuleContext(LogicalOrExpressionContext.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 CausticListener ) ((CausticListener)listener).enterExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).exitExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CausticVisitor ) return ((CausticVisitor extends T>)visitor).visitExpression(this);
else return visitor.visitChildren(this);
}
}
public final ExpressionContext expression() throws RecognitionException {
ExpressionContext _localctx = new ExpressionContext(_ctx, getState());
enterRule(_localctx, 22, RULE_expression);
try {
enterOuterAlt(_localctx, 1);
{
setState(192);
logicalOrExpression(0);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ConditionalContext extends ParserRuleContext {
public TerminalNode If() { return getToken(CausticParser.If, 0); }
public List expression() {
return getRuleContexts(ExpressionContext.class);
}
public ExpressionContext expression(int i) {
return getRuleContext(ExpressionContext.class,i);
}
public List block() {
return getRuleContexts(BlockContext.class);
}
public BlockContext block(int i) {
return getRuleContext(BlockContext.class,i);
}
public List Elif() { return getTokens(CausticParser.Elif); }
public TerminalNode Elif(int i) {
return getToken(CausticParser.Elif, i);
}
public TerminalNode Else() { return getToken(CausticParser.Else, 0); }
public ConditionalContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_conditional; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).enterConditional(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).exitConditional(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CausticVisitor ) return ((CausticVisitor extends T>)visitor).visitConditional(this);
else return visitor.visitChildren(this);
}
}
public final ConditionalContext conditional() throws RecognitionException {
ConditionalContext _localctx = new ConditionalContext(_ctx, getState());
enterRule(_localctx, 24, RULE_conditional);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(194);
match(If);
setState(195);
expression();
setState(196);
block();
setState(203);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,16,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(197);
match(Elif);
setState(198);
expression();
setState(199);
block();
}
}
}
setState(205);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,16,_ctx);
}
setState(208);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,17,_ctx) ) {
case 1:
{
setState(206);
match(Else);
setState(207);
block();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class LoopContext extends ParserRuleContext {
public TerminalNode While() { return getToken(CausticParser.While, 0); }
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public BlockContext block() {
return getRuleContext(BlockContext.class,0);
}
public LoopContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_loop; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).enterLoop(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).exitLoop(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CausticVisitor ) return ((CausticVisitor extends T>)visitor).visitLoop(this);
else return visitor.visitChildren(this);
}
}
public final LoopContext loop() throws RecognitionException {
LoopContext _localctx = new LoopContext(_ctx, getState());
enterRule(_localctx, 26, RULE_loop);
try {
enterOuterAlt(_localctx, 1);
{
setState(210);
match(While);
setState(211);
expression();
setState(212);
block();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class DeletionContext extends ParserRuleContext {
public TerminalNode Del() { return getToken(CausticParser.Del, 0); }
public NameContext name() {
return getRuleContext(NameContext.class,0);
}
public DeletionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_deletion; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).enterDeletion(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).exitDeletion(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CausticVisitor ) return ((CausticVisitor extends T>)visitor).visitDeletion(this);
else return visitor.visitChildren(this);
}
}
public final DeletionContext deletion() throws RecognitionException {
DeletionContext _localctx = new DeletionContext(_ctx, getState());
enterRule(_localctx, 28, RULE_deletion);
try {
enterOuterAlt(_localctx, 1);
{
setState(214);
match(Del);
setState(215);
name();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class DefinitionContext extends ParserRuleContext {
public TerminalNode Var() { return getToken(CausticParser.Var, 0); }
public TerminalNode Identifier() { return getToken(CausticParser.Identifier, 0); }
public TerminalNode Assign() { return getToken(CausticParser.Assign, 0); }
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public DefinitionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_definition; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).enterDefinition(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).exitDefinition(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CausticVisitor ) return ((CausticVisitor extends T>)visitor).visitDefinition(this);
else return visitor.visitChildren(this);
}
}
public final DefinitionContext definition() throws RecognitionException {
DefinitionContext _localctx = new DefinitionContext(_ctx, getState());
enterRule(_localctx, 30, RULE_definition);
try {
enterOuterAlt(_localctx, 1);
{
setState(217);
match(Var);
setState(218);
match(Identifier);
setState(219);
match(Assign);
setState(220);
expression();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class AssignmentContext extends ParserRuleContext {
public NameContext name() {
return getRuleContext(NameContext.class,0);
}
public TerminalNode Assign() { return getToken(CausticParser.Assign, 0); }
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public TerminalNode MulAssign() { return getToken(CausticParser.MulAssign, 0); }
public TerminalNode DivAssign() { return getToken(CausticParser.DivAssign, 0); }
public TerminalNode ModAssign() { return getToken(CausticParser.ModAssign, 0); }
public TerminalNode AddAssign() { return getToken(CausticParser.AddAssign, 0); }
public TerminalNode SubAssign() { return getToken(CausticParser.SubAssign, 0); }
public AssignmentContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_assignment; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).enterAssignment(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).exitAssignment(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CausticVisitor ) return ((CausticVisitor extends T>)visitor).visitAssignment(this);
else return visitor.visitChildren(this);
}
}
public final AssignmentContext assignment() throws RecognitionException {
AssignmentContext _localctx = new AssignmentContext(_ctx, getState());
enterRule(_localctx, 32, RULE_assignment);
try {
setState(246);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,18,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(222);
name();
setState(223);
match(Assign);
setState(224);
expression();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(226);
name();
setState(227);
match(MulAssign);
setState(228);
expression();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(230);
name();
setState(231);
match(DivAssign);
setState(232);
expression();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(234);
name();
setState(235);
match(ModAssign);
setState(236);
expression();
}
break;
case 5:
enterOuterAlt(_localctx, 5);
{
setState(238);
name();
setState(239);
match(AddAssign);
setState(240);
expression();
}
break;
case 6:
enterOuterAlt(_localctx, 6);
{
setState(242);
name();
setState(243);
match(SubAssign);
setState(244);
expression();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class RollbackContext extends ParserRuleContext {
public TerminalNode Rollback() { return getToken(CausticParser.Rollback, 0); }
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public RollbackContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_rollback; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).enterRollback(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).exitRollback(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CausticVisitor ) return ((CausticVisitor extends T>)visitor).visitRollback(this);
else return visitor.visitChildren(this);
}
}
public final RollbackContext rollback() throws RecognitionException {
RollbackContext _localctx = new RollbackContext(_ctx, getState());
enterRule(_localctx, 34, RULE_rollback);
try {
enterOuterAlt(_localctx, 1);
{
setState(248);
match(Rollback);
setState(249);
expression();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class StatementContext extends ParserRuleContext {
public DefinitionContext definition() {
return getRuleContext(DefinitionContext.class,0);
}
public ConditionalContext conditional() {
return getRuleContext(ConditionalContext.class,0);
}
public DeletionContext deletion() {
return getRuleContext(DeletionContext.class,0);
}
public LoopContext loop() {
return getRuleContext(LoopContext.class,0);
}
public AssignmentContext assignment() {
return getRuleContext(AssignmentContext.class,0);
}
public RollbackContext rollback() {
return getRuleContext(RollbackContext.class,0);
}
public FuncallContext funcall() {
return getRuleContext(FuncallContext.class,0);
}
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public StatementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_statement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).enterStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).exitStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CausticVisitor ) return ((CausticVisitor extends T>)visitor).visitStatement(this);
else return visitor.visitChildren(this);
}
}
public final StatementContext statement() throws RecognitionException {
StatementContext _localctx = new StatementContext(_ctx, getState());
enterRule(_localctx, 36, RULE_statement);
try {
setState(259);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,19,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(251);
definition();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(252);
conditional();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(253);
deletion();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(254);
loop();
}
break;
case 5:
enterOuterAlt(_localctx, 5);
{
setState(255);
assignment();
}
break;
case 6:
enterOuterAlt(_localctx, 6);
{
setState(256);
rollback();
}
break;
case 7:
enterOuterAlt(_localctx, 7);
{
setState(257);
funcall();
}
break;
case 8:
enterOuterAlt(_localctx, 8);
{
setState(258);
expression();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class BlockContext extends ParserRuleContext {
public List statement() {
return getRuleContexts(StatementContext.class);
}
public StatementContext statement(int i) {
return getRuleContext(StatementContext.class,i);
}
public BlockContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_block; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).enterBlock(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).exitBlock(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CausticVisitor ) return ((CausticVisitor extends T>)visitor).visitBlock(this);
else return visitor.visitChildren(this);
}
}
public final BlockContext block() throws RecognitionException {
BlockContext _localctx = new BlockContext(_ctx, getState());
enterRule(_localctx, 38, RULE_block);
int _la;
try {
setState(276);
_errHandler.sync(this);
switch (_input.LA(1)) {
case Del:
case False:
case If:
case Null:
case Rollback:
case While:
case True:
case Var:
case Add:
case LeftParen:
case Not:
case Sub:
case Number:
case Identifier:
case String:
enterOuterAlt(_localctx, 1);
{
setState(261);
statement();
setState(263);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,20,_ctx) ) {
case 1:
{
setState(262);
match(Semicolon);
}
break;
}
}
break;
case LeftBracket:
enterOuterAlt(_localctx, 2);
{
setState(265);
match(LeftBracket);
setState(272);
_errHandler.sync(this);
_la = _input.LA(1);
while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << Del) | (1L << False) | (1L << If) | (1L << Null) | (1L << Rollback) | (1L << While) | (1L << True) | (1L << Var) | (1L << Add) | (1L << LeftParen) | (1L << Not) | (1L << Sub) | (1L << Number) | (1L << Identifier) | (1L << String))) != 0)) {
{
{
setState(266);
statement();
setState(268);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Semicolon) {
{
setState(267);
match(Semicolon);
}
}
}
}
setState(274);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(275);
match(RightBracket);
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class TypeContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(CausticParser.Identifier, 0); }
public TerminalNode Ampersand() { return getToken(CausticParser.Ampersand, 0); }
public TypeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_type; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).enterType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).exitType(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CausticVisitor ) return ((CausticVisitor extends T>)visitor).visitType(this);
else return visitor.visitChildren(this);
}
}
public final TypeContext type() throws RecognitionException {
TypeContext _localctx = new TypeContext(_ctx, getState());
enterRule(_localctx, 40, RULE_type);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(278);
match(Identifier);
setState(280);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Ampersand) {
{
setState(279);
match(Ampersand);
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ParameterContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(CausticParser.Identifier, 0); }
public TypeContext type() {
return getRuleContext(TypeContext.class,0);
}
public ParameterContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_parameter; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).enterParameter(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).exitParameter(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CausticVisitor ) return ((CausticVisitor extends T>)visitor).visitParameter(this);
else return visitor.visitChildren(this);
}
}
public final ParameterContext parameter() throws RecognitionException {
ParameterContext _localctx = new ParameterContext(_ctx, getState());
enterRule(_localctx, 42, RULE_parameter);
try {
enterOuterAlt(_localctx, 1);
{
setState(282);
match(Identifier);
setState(283);
match(Colon);
setState(284);
type();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ParametersContext extends ParserRuleContext {
public List parameter() {
return getRuleContexts(ParameterContext.class);
}
public ParameterContext parameter(int i) {
return getRuleContext(ParameterContext.class,i);
}
public ParametersContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_parameters; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).enterParameters(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).exitParameters(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CausticVisitor ) return ((CausticVisitor extends T>)visitor).visitParameters(this);
else return visitor.visitChildren(this);
}
}
public final ParametersContext parameters() throws RecognitionException {
ParametersContext _localctx = new ParametersContext(_ctx, getState());
enterRule(_localctx, 44, RULE_parameters);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(291);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,25,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(286);
parameter();
setState(287);
match(Comma);
}
}
}
setState(293);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,25,_ctx);
}
setState(295);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Identifier) {
{
setState(294);
parameter();
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class FunctionContext extends ParserRuleContext {
public TerminalNode Def() { return getToken(CausticParser.Def, 0); }
public TerminalNode Identifier() { return getToken(CausticParser.Identifier, 0); }
public ParametersContext parameters() {
return getRuleContext(ParametersContext.class,0);
}
public TypeContext type() {
return getRuleContext(TypeContext.class,0);
}
public BlockContext block() {
return getRuleContext(BlockContext.class,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 CausticListener ) ((CausticListener)listener).enterFunction(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).exitFunction(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CausticVisitor ) return ((CausticVisitor extends T>)visitor).visitFunction(this);
else return visitor.visitChildren(this);
}
}
public final FunctionContext function() throws RecognitionException {
FunctionContext _localctx = new FunctionContext(_ctx, getState());
enterRule(_localctx, 46, RULE_function);
try {
enterOuterAlt(_localctx, 1);
{
setState(297);
match(Def);
setState(298);
match(Identifier);
setState(299);
match(LeftParen);
setState(300);
parameters();
setState(301);
match(RightParen);
setState(302);
match(Colon);
setState(303);
type();
setState(304);
match(Assign);
setState(305);
block();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ServiceContext extends ParserRuleContext {
public TerminalNode Service() { return getToken(CausticParser.Service, 0); }
public TerminalNode Identifier() { return getToken(CausticParser.Identifier, 0); }
public List function() {
return getRuleContexts(FunctionContext.class);
}
public FunctionContext function(int i) {
return getRuleContext(FunctionContext.class,i);
}
public ServiceContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_service; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).enterService(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).exitService(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CausticVisitor ) return ((CausticVisitor extends T>)visitor).visitService(this);
else return visitor.visitChildren(this);
}
}
public final ServiceContext service() throws RecognitionException {
ServiceContext _localctx = new ServiceContext(_ctx, getState());
enterRule(_localctx, 48, RULE_service);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(307);
match(Service);
setState(308);
match(Identifier);
setState(309);
match(LeftBracket);
setState(313);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==Def) {
{
{
setState(310);
function();
}
}
setState(315);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(316);
match(RightBracket);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class StructContext extends ParserRuleContext {
public TerminalNode Struct() { return getToken(CausticParser.Struct, 0); }
public TerminalNode Identifier() { return getToken(CausticParser.Identifier, 0); }
public ParametersContext parameters() {
return getRuleContext(ParametersContext.class,0);
}
public StructContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_struct; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).enterStruct(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).exitStruct(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CausticVisitor ) return ((CausticVisitor extends T>)visitor).visitStruct(this);
else return visitor.visitChildren(this);
}
}
public final StructContext struct() throws RecognitionException {
StructContext _localctx = new StructContext(_ctx, getState());
enterRule(_localctx, 50, RULE_struct);
try {
enterOuterAlt(_localctx, 1);
{
setState(318);
match(Struct);
setState(319);
match(Identifier);
setState(320);
match(LeftBracket);
setState(321);
parameters();
setState(322);
match(RightBracket);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class DeclarationContext extends ParserRuleContext {
public StructContext struct() {
return getRuleContext(StructContext.class,0);
}
public ServiceContext service() {
return getRuleContext(ServiceContext.class,0);
}
public DeclarationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_declaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).enterDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).exitDeclaration(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CausticVisitor ) return ((CausticVisitor extends T>)visitor).visitDeclaration(this);
else return visitor.visitChildren(this);
}
}
public final DeclarationContext declaration() throws RecognitionException {
DeclarationContext _localctx = new DeclarationContext(_ctx, getState());
enterRule(_localctx, 52, RULE_declaration);
try {
setState(326);
_errHandler.sync(this);
switch (_input.LA(1)) {
case Struct:
enterOuterAlt(_localctx, 1);
{
setState(324);
struct();
}
break;
case Service:
enterOuterAlt(_localctx, 2);
{
setState(325);
service();
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ModuleContext extends ParserRuleContext {
public TerminalNode Module() { return getToken(CausticParser.Module, 0); }
public List Identifier() { return getTokens(CausticParser.Identifier); }
public TerminalNode Identifier(int i) {
return getToken(CausticParser.Identifier, i);
}
public ModuleContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_module; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).enterModule(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).exitModule(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CausticVisitor ) return ((CausticVisitor extends T>)visitor).visitModule(this);
else return visitor.visitChildren(this);
}
}
public final ModuleContext module() throws RecognitionException {
ModuleContext _localctx = new ModuleContext(_ctx, getState());
enterRule(_localctx, 54, RULE_module);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(328);
match(Module);
setState(329);
match(Identifier);
setState(334);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==Period) {
{
{
setState(330);
match(Period);
setState(331);
match(Identifier);
}
}
setState(336);
_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;
}
public static class IncludeContext extends ParserRuleContext {
public TerminalNode Import() { return getToken(CausticParser.Import, 0); }
public TerminalNode String() { return getToken(CausticParser.String, 0); }
public IncludeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_include; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).enterInclude(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).exitInclude(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CausticVisitor ) return ((CausticVisitor extends T>)visitor).visitInclude(this);
else return visitor.visitChildren(this);
}
}
public final IncludeContext include() throws RecognitionException {
IncludeContext _localctx = new IncludeContext(_ctx, getState());
enterRule(_localctx, 56, RULE_include);
try {
enterOuterAlt(_localctx, 1);
{
setState(337);
match(Import);
setState(338);
match(String);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ProgramContext extends ParserRuleContext {
public ModuleContext module() {
return getRuleContext(ModuleContext.class,0);
}
public List include() {
return getRuleContexts(IncludeContext.class);
}
public IncludeContext include(int i) {
return getRuleContext(IncludeContext.class,i);
}
public List declaration() {
return getRuleContexts(DeclarationContext.class);
}
public DeclarationContext declaration(int i) {
return getRuleContext(DeclarationContext.class,i);
}
public ProgramContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_program; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).enterProgram(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CausticListener ) ((CausticListener)listener).exitProgram(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CausticVisitor ) return ((CausticVisitor extends T>)visitor).visitProgram(this);
else return visitor.visitChildren(this);
}
}
public final ProgramContext program() throws RecognitionException {
ProgramContext _localctx = new ProgramContext(_ctx, getState());
enterRule(_localctx, 58, RULE_program);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(341);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Module) {
{
setState(340);
module();
}
}
setState(346);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==Import) {
{
{
setState(343);
include();
}
}
setState(348);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(352);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==Service || _la==Struct) {
{
{
setState(349);
declaration();
}
}
setState(354);
_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;
}
public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) {
switch (ruleIndex) {
case 5:
return multiplicativeExpression_sempred((MultiplicativeExpressionContext)_localctx, predIndex);
case 6:
return additiveExpression_sempred((AdditiveExpressionContext)_localctx, predIndex);
case 7:
return relationalExpression_sempred((RelationalExpressionContext)_localctx, predIndex);
case 8:
return equalityExpression_sempred((EqualityExpressionContext)_localctx, predIndex);
case 9:
return logicalAndExpression_sempred((LogicalAndExpressionContext)_localctx, predIndex);
case 10:
return logicalOrExpression_sempred((LogicalOrExpressionContext)_localctx, predIndex);
}
return true;
}
private boolean multiplicativeExpression_sempred(MultiplicativeExpressionContext _localctx, int predIndex) {
switch (predIndex) {
case 0:
return precpred(_ctx, 3);
case 1:
return precpred(_ctx, 2);
case 2:
return precpred(_ctx, 1);
}
return true;
}
private boolean additiveExpression_sempred(AdditiveExpressionContext _localctx, int predIndex) {
switch (predIndex) {
case 3:
return precpred(_ctx, 2);
case 4:
return precpred(_ctx, 1);
}
return true;
}
private boolean relationalExpression_sempred(RelationalExpressionContext _localctx, int predIndex) {
switch (predIndex) {
case 5:
return precpred(_ctx, 4);
case 6:
return precpred(_ctx, 3);
case 7:
return precpred(_ctx, 2);
case 8:
return precpred(_ctx, 1);
}
return true;
}
private boolean equalityExpression_sempred(EqualityExpressionContext _localctx, int predIndex) {
switch (predIndex) {
case 9:
return precpred(_ctx, 2);
case 10:
return precpred(_ctx, 1);
}
return true;
}
private boolean logicalAndExpression_sempred(LogicalAndExpressionContext _localctx, int predIndex) {
switch (predIndex) {
case 11:
return precpred(_ctx, 1);
}
return true;
}
private boolean logicalOrExpression_sempred(LogicalOrExpressionContext _localctx, int predIndex) {
switch (predIndex) {
case 12:
return precpred(_ctx, 1);
}
return true;
}
public static final String _serializedATN =
"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3<\u0166\4\2\t\2\4"+
"\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t"+
"\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+
"\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+
"\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\3\2\3\2\3"+
"\3\3\3\3\3\7\3D\n\3\f\3\16\3G\13\3\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4"+
"\3\4\7\4S\n\4\f\4\16\4V\13\4\3\4\5\4Y\n\4\3\4\5\4\\\n\4\3\5\3\5\3\5\3"+
"\5\3\5\3\5\3\5\5\5e\n\5\3\6\5\6h\n\6\3\6\3\6\3\7\3\7\3\7\3\7\3\7\3\7\3"+
"\7\3\7\3\7\3\7\3\7\3\7\7\7x\n\7\f\7\16\7{\13\7\3\b\3\b\3\b\3\b\3\b\3\b"+
"\3\b\3\b\3\b\7\b\u0086\n\b\f\b\16\b\u0089\13\b\3\t\3\t\3\t\3\t\3\t\3\t"+
"\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\7\t\u009a\n\t\f\t\16\t\u009d\13\t"+
"\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\7\n\u00a8\n\n\f\n\16\n\u00ab\13\n"+
"\3\13\3\13\3\13\3\13\3\13\3\13\7\13\u00b3\n\13\f\13\16\13\u00b6\13\13"+
"\3\f\3\f\3\f\3\f\3\f\3\f\7\f\u00be\n\f\f\f\16\f\u00c1\13\f\3\r\3\r\3\16"+
"\3\16\3\16\3\16\3\16\3\16\3\16\7\16\u00cc\n\16\f\16\16\16\u00cf\13\16"+
"\3\16\3\16\5\16\u00d3\n\16\3\17\3\17\3\17\3\17\3\20\3\20\3\20\3\21\3\21"+
"\3\21\3\21\3\21\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22"+
"\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22\5\22"+
"\u00f9\n\22\3\23\3\23\3\23\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\5\24"+
"\u0106\n\24\3\25\3\25\5\25\u010a\n\25\3\25\3\25\3\25\5\25\u010f\n\25\7"+
"\25\u0111\n\25\f\25\16\25\u0114\13\25\3\25\5\25\u0117\n\25\3\26\3\26\5"+
"\26\u011b\n\26\3\27\3\27\3\27\3\27\3\30\3\30\3\30\7\30\u0124\n\30\f\30"+
"\16\30\u0127\13\30\3\30\5\30\u012a\n\30\3\31\3\31\3\31\3\31\3\31\3\31"+
"\3\31\3\31\3\31\3\31\3\32\3\32\3\32\3\32\7\32\u013a\n\32\f\32\16\32\u013d"+
"\13\32\3\32\3\32\3\33\3\33\3\33\3\33\3\33\3\33\3\34\3\34\5\34\u0149\n"+
"\34\3\35\3\35\3\35\3\35\7\35\u014f\n\35\f\35\16\35\u0152\13\35\3\36\3"+
"\36\3\36\3\37\5\37\u0158\n\37\3\37\7\37\u015b\n\37\f\37\16\37\u015e\13"+
"\37\3\37\7\37\u0161\n\37\f\37\16\37\u0164\13\37\3\37\2\b\f\16\20\22\24"+
"\26 \2\4\6\b\n\f\16\20\22\24\26\30\32\34\36 \"$&(*,.\60\62\64\668:<\2"+
"\4\7\2\t\t\16\16\23\23\67\6799\5\2\25\25++\64\64\2\u0177\2>\3\2\2\2\4"+
"@\3\2\2\2\6[\3\2\2\2\bd\3\2\2\2\ng\3\2\2\2\fk\3\2\2\2\16|\3\2\2\2\20\u008a"+
"\3\2\2\2\22\u009e\3\2\2\2\24\u00ac\3\2\2\2\26\u00b7\3\2\2\2\30\u00c2\3"+
"\2\2\2\32\u00c4\3\2\2\2\34\u00d4\3\2\2\2\36\u00d8\3\2\2\2 \u00db\3\2\2"+
"\2\"\u00f8\3\2\2\2$\u00fa\3\2\2\2&\u0105\3\2\2\2(\u0116\3\2\2\2*\u0118"+
"\3\2\2\2,\u011c\3\2\2\2.\u0125\3\2\2\2\60\u012b\3\2\2\2\62\u0135\3\2\2"+
"\2\64\u0140\3\2\2\2\66\u0148\3\2\2\28\u014a\3\2\2\2:\u0153\3\2\2\2<\u0157"+
"\3\2\2\2>?\t\2\2\2?\3\3\2\2\2@E\78\2\2AB\7.\2\2BD\78\2\2CA\3\2\2\2DG\3"+
"\2\2\2EC\3\2\2\2EF\3\2\2\2F\5\3\2\2\2GE\3\2\2\2HI\5*\26\2IJ\7$\2\2JK\7"+
"9\2\2KL\7\62\2\2L\\\3\2\2\2MN\78\2\2NT\7$\2\2OP\5\30\r\2PQ\7\34\2\2QS"+
"\3\2\2\2RO\3\2\2\2SV\3\2\2\2TR\3\2\2\2TU\3\2\2\2UX\3\2\2\2VT\3\2\2\2W"+
"Y\5\30\r\2XW\3\2\2\2XY\3\2\2\2YZ\3\2\2\2Z\\\7\62\2\2[H\3\2\2\2[M\3\2\2"+
"\2\\\7\3\2\2\2]e\5\4\3\2^e\5\6\4\2_e\5\2\2\2`a\7$\2\2ab\5\30\r\2bc\7\62"+
"\2\2ce\3\2\2\2d]\3\2\2\2d^\3\2\2\2d_\3\2\2\2d`\3\2\2\2e\t\3\2\2\2fh\t"+
"\3\2\2gf\3\2\2\2gh\3\2\2\2hi\3\2\2\2ij\5\b\5\2j\13\3\2\2\2kl\b\7\1\2l"+
"m\5\n\6\2my\3\2\2\2no\f\5\2\2op\7)\2\2px\5\n\6\2qr\f\4\2\2rs\7\35\2\2"+
"sx\5\n\6\2tu\f\3\2\2uv\7\'\2\2vx\5\n\6\2wn\3\2\2\2wq\3\2\2\2wt\3\2\2\2"+
"x{\3\2\2\2yw\3\2\2\2yz\3\2\2\2z\r\3\2\2\2{y\3\2\2\2|}\b\b\1\2}~\5\f\7"+
"\2~\u0087\3\2\2\2\177\u0080\f\4\2\2\u0080\u0081\7\25\2\2\u0081\u0086\5"+
"\f\7\2\u0082\u0083\f\3\2\2\u0083\u0084\7\64\2\2\u0084\u0086\5\f\7\2\u0085"+
"\177\3\2\2\2\u0085\u0082\3\2\2\2\u0086\u0089\3\2\2\2\u0087\u0085\3\2\2"+
"\2\u0087\u0088\3\2\2\2\u0088\17\3\2\2\2\u0089\u0087\3\2\2\2\u008a\u008b"+
"\b\t\1\2\u008b\u008c\5\16\b\2\u008c\u009b\3\2\2\2\u008d\u008e\f\6\2\2"+
"\u008e\u008f\7&\2\2\u008f\u009a\5\16\b\2\u0090\u0091\f\5\2\2\u0091\u0092"+
"\7!\2\2\u0092\u009a\5\16\b\2\u0093\u0094\f\4\2\2\u0094\u0095\7%\2\2\u0095"+
"\u009a\5\16\b\2\u0096\u0097\f\3\2\2\u0097\u0098\7 \2\2\u0098\u009a\5\16"+
"\b\2\u0099\u008d\3\2\2\2\u0099\u0090\3\2\2\2\u0099\u0093\3\2\2\2\u0099"+
"\u0096\3\2\2\2\u009a\u009d\3\2\2\2\u009b\u0099\3\2\2\2\u009b\u009c\3\2"+
"\2\2\u009c\21\3\2\2\2\u009d\u009b\3\2\2\2\u009e\u009f\b\n\1\2\u009f\u00a0"+
"\5\20\t\2\u00a0\u00a9\3\2\2\2\u00a1\u00a2\f\4\2\2\u00a2\u00a3\7\37\2\2"+
"\u00a3\u00a8\5\20\t\2\u00a4\u00a5\f\3\2\2\u00a5\u00a6\7,\2\2\u00a6\u00a8"+
"\5\20\t\2\u00a7\u00a1\3\2\2\2\u00a7\u00a4\3\2\2\2\u00a8\u00ab\3\2\2\2"+
"\u00a9\u00a7\3\2\2\2\u00a9\u00aa\3\2\2\2\u00aa\23\3\2\2\2\u00ab\u00a9"+
"\3\2\2\2\u00ac\u00ad\b\13\1\2\u00ad\u00ae\5\22\n\2\u00ae\u00b4\3\2\2\2"+
"\u00af\u00b0\f\3\2\2\u00b0\u00b1\7\30\2\2\u00b1\u00b3\5\22\n\2\u00b2\u00af"+
"\3\2\2\2\u00b3\u00b6\3\2\2\2\u00b4\u00b2\3\2\2\2\u00b4\u00b5\3\2\2\2\u00b5"+
"\25\3\2\2\2\u00b6\u00b4\3\2\2\2\u00b7\u00b8\b\f\1\2\u00b8\u00b9\5\24\13"+
"\2\u00b9\u00bf\3\2\2\2\u00ba\u00bb\f\3\2\2\u00bb\u00bc\7-\2\2\u00bc\u00be"+
"\5\24\13\2\u00bd\u00ba\3\2\2\2\u00be\u00c1\3\2\2\2\u00bf\u00bd\3\2\2\2"+
"\u00bf\u00c0\3\2\2\2\u00c0\27\3\2\2\2\u00c1\u00bf\3\2\2\2\u00c2\u00c3"+
"\5\26\f\2\u00c3\31\3\2\2\2\u00c4\u00c5\7\n\2\2\u00c5\u00c6\5\30\r\2\u00c6"+
"\u00cd\5(\25\2\u00c7\u00c8\7\6\2\2\u00c8\u00c9\5\30\r\2\u00c9\u00ca\5"+
"(\25\2\u00ca\u00cc\3\2\2\2\u00cb\u00c7\3\2\2\2\u00cc\u00cf\3\2\2\2\u00cd"+
"\u00cb\3\2\2\2\u00cd\u00ce\3\2\2\2\u00ce\u00d2\3\2\2\2\u00cf\u00cd\3\2"+
"\2\2\u00d0\u00d1\7\7\2\2\u00d1\u00d3\5(\25\2\u00d2\u00d0\3\2\2\2\u00d2"+
"\u00d3\3\2\2\2\u00d3\33\3\2\2\2\u00d4\u00d5\7\22\2\2\u00d5\u00d6\5\30"+
"\r\2\u00d6\u00d7\5(\25\2\u00d7\35\3\2\2\2\u00d8\u00d9\7\5\2\2\u00d9\u00da"+
"\5\4\3\2\u00da\37\3\2\2\2\u00db\u00dc\7\24\2\2\u00dc\u00dd\78\2\2\u00dd"+
"\u00de\7\32\2\2\u00de\u00df\5\30\r\2\u00df!\3\2\2\2\u00e0\u00e1\5\4\3"+
"\2\u00e1\u00e2\7\32\2\2\u00e2\u00e3\5\30\r\2\u00e3\u00f9\3\2\2\2\u00e4"+
"\u00e5\5\4\3\2\u00e5\u00e6\7*\2\2\u00e6\u00e7\5\30\r\2\u00e7\u00f9\3\2"+
"\2\2\u00e8\u00e9\5\4\3\2\u00e9\u00ea\7\36\2\2\u00ea\u00eb\5\30\r\2\u00eb"+
"\u00f9\3\2\2\2\u00ec\u00ed\5\4\3\2\u00ed\u00ee\7(\2\2\u00ee\u00ef\5\30"+
"\r\2\u00ef\u00f9\3\2\2\2\u00f0\u00f1\5\4\3\2\u00f1\u00f2\7\26\2\2\u00f2"+
"\u00f3\5\30\r\2\u00f3\u00f9\3\2\2\2\u00f4\u00f5\5\4\3\2\u00f5\u00f6\7"+
"\65\2\2\u00f6\u00f7\5\30\r\2\u00f7\u00f9\3\2\2\2\u00f8\u00e0\3\2\2\2\u00f8"+
"\u00e4\3\2\2\2\u00f8\u00e8\3\2\2\2\u00f8\u00ec\3\2\2\2\u00f8\u00f0\3\2"+
"\2\2\u00f8\u00f4\3\2\2\2\u00f9#\3\2\2\2\u00fa\u00fb\7\17\2\2\u00fb\u00fc"+
"\5\30\r\2\u00fc%\3\2\2\2\u00fd\u0106\5 \21\2\u00fe\u0106\5\32\16\2\u00ff"+
"\u0106\5\36\20\2\u0100\u0106\5\34\17\2\u0101\u0106\5\"\22\2\u0102\u0106"+
"\5$\23\2\u0103\u0106\5\6\4\2\u0104\u0106\5\30\r\2\u0105\u00fd\3\2\2\2"+
"\u0105\u00fe\3\2\2\2\u0105\u00ff\3\2\2\2\u0105\u0100\3\2\2\2\u0105\u0101"+
"\3\2\2\2\u0105\u0102\3\2\2\2\u0105\u0103\3\2\2\2\u0105\u0104\3\2\2\2\u0106"+
"\'\3\2\2\2\u0107\u0109\5&\24\2\u0108\u010a\7\63\2\2\u0109\u0108\3\2\2"+
"\2\u0109\u010a\3\2\2\2\u010a\u0117\3\2\2\2\u010b\u0112\7#\2\2\u010c\u010e"+
"\5&\24\2\u010d\u010f\7\63\2\2\u010e\u010d\3\2\2\2\u010e\u010f\3\2\2\2"+
"\u010f\u0111\3\2\2\2\u0110\u010c\3\2\2\2\u0111\u0114\3\2\2\2\u0112\u0110"+
"\3\2\2\2\u0112\u0113\3\2\2\2\u0113\u0115\3\2\2\2\u0114\u0112\3\2\2\2\u0115"+
"\u0117\7\61\2\2\u0116\u0107\3\2\2\2\u0116\u010b\3\2\2\2\u0117)\3\2\2\2"+
"\u0118\u011a\78\2\2\u0119\u011b\7\27\2\2\u011a\u0119\3\2\2\2\u011a\u011b"+
"\3\2\2\2\u011b+\3\2\2\2\u011c\u011d\78\2\2\u011d\u011e\7\33\2\2\u011e"+
"\u011f\5*\26\2\u011f-\3\2\2\2\u0120\u0121\5,\27\2\u0121\u0122\7\34\2\2"+
"\u0122\u0124\3\2\2\2\u0123\u0120\3\2\2\2\u0124\u0127\3\2\2\2\u0125\u0123"+
"\3\2\2\2\u0125\u0126\3\2\2\2\u0126\u0129\3\2\2\2\u0127\u0125\3\2\2\2\u0128"+
"\u012a\5,\27\2\u0129\u0128\3\2\2\2\u0129\u012a\3\2\2\2\u012a/\3\2\2\2"+
"\u012b\u012c\7\4\2\2\u012c\u012d\78\2\2\u012d\u012e\7$\2\2\u012e\u012f"+
"\5.\30\2\u012f\u0130\7\62\2\2\u0130\u0131\7\33\2\2\u0131\u0132\5*\26\2"+
"\u0132\u0133\7\32\2\2\u0133\u0134\5(\25\2\u0134\61\3\2\2\2\u0135\u0136"+
"\7\20\2\2\u0136\u0137\78\2\2\u0137\u013b\7#\2\2\u0138\u013a\5\60\31\2"+
"\u0139\u0138\3\2\2\2\u013a\u013d\3\2\2\2\u013b\u0139\3\2\2\2\u013b\u013c"+
"\3\2\2\2\u013c\u013e\3\2\2\2\u013d\u013b\3\2\2\2\u013e\u013f\7\61\2\2"+
"\u013f\63\3\2\2\2\u0140\u0141\7\21\2\2\u0141\u0142\78\2\2\u0142\u0143"+
"\7#\2\2\u0143\u0144\5.\30\2\u0144\u0145\7\61\2\2\u0145\65\3\2\2\2\u0146"+
"\u0149\5\64\33\2\u0147\u0149\5\62\32\2\u0148\u0146\3\2\2\2\u0148\u0147"+
"\3\2\2\2\u0149\67\3\2\2\2\u014a\u014b\7\f\2\2\u014b\u0150\78\2\2\u014c"+
"\u014d\7.\2\2\u014d\u014f\78\2\2\u014e\u014c\3\2\2\2\u014f\u0152\3\2\2"+
"\2\u0150\u014e\3\2\2\2\u0150\u0151\3\2\2\2\u01519\3\2\2\2\u0152\u0150"+
"\3\2\2\2\u0153\u0154\7\13\2\2\u0154\u0155\79\2\2\u0155;\3\2\2\2\u0156"+
"\u0158\58\35\2\u0157\u0156\3\2\2\2\u0157\u0158\3\2\2\2\u0158\u015c\3\2"+
"\2\2\u0159\u015b\5:\36\2\u015a\u0159\3\2\2\2\u015b\u015e\3\2\2\2\u015c"+
"\u015a\3\2\2\2\u015c\u015d\3\2\2\2\u015d\u0162\3\2\2\2\u015e\u015c\3\2"+
"\2\2\u015f\u0161\5\66\34\2\u0160\u015f\3\2\2\2\u0161\u0164\3\2\2\2\u0162"+
"\u0160\3\2\2\2\u0162\u0163\3\2\2\2\u0163=\3\2\2\2\u0164\u0162\3\2\2\2"+
"#ETX[dgwy\u0085\u0087\u0099\u009b\u00a7\u00a9\u00b4\u00bf\u00cd\u00d2"+
"\u00f8\u0105\u0109\u010e\u0112\u0116\u011a\u0125\u0129\u013b\u0148\u0150"+
"\u0157\u015c\u0162";
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 - 2025 Weber Informatics LLC | Privacy Policy