hu.bme.mit.theta.sts.dsl.gen.StsDslParser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of theta-sts Show documentation
Show all versions of theta-sts Show documentation
Sts subproject in the Theta model checking framework
// Generated from StsDsl.g4 by ANTLR 4.9.2
package hu.bme.mit.theta.sts.dsl.gen;
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 StsDslParser extends Parser {
static { RuntimeMetaData.checkVersion("4.9.2", RuntimeMetaData.VERSION); }
protected static final DFA[] _decisionToDFA;
protected static final PredictionContextCache _sharedContextCache =
new PredictionContextCache();
public static final int
SPECIFICATION=1, CONST=2, VAR=3, PROPERTY=4, MODELS=5, GLOBALLY=6, SYSTEM=7,
INVARIANT=8, INITIAL=9, TRANSITION=10, BOOLTYPE=11, INTTYPE=12, RATTYPE=13,
IF=14, THEN=15, ELSE=16, IFF=17, IMPLY=18, FORALL=19, EXISTS=20, OR=21,
AND=22, XOR=23, NOT=24, EQ=25, NEQ=26, LT=27, LEQ=28, GT=29, GEQ=30, PLUS=31,
MINUS=32, MUL=33, DIV=34, MOD=35, REM=36, PERCENT=37, TRUE=38, FALSE=39,
ASSIGN=40, HAVOC=41, ASSUME=42, INT=43, NAT=44, SIGN=45, DOT=46, ID=47,
UNDERSCORE=48, DIGIT=49, LETTER=50, LPAREN=51, RPAREN=52, LBRACK=53, RBRACK=54,
LBRAC=55, RBRAC=56, COMMA=57, COLON=58, SEMICOLON=59, QUOT=60, LARROW=61,
RARROW=62, WS=63, COMMENT=64, LINE_COMMENT=65;
public static final int
RULE_stsSpec = 0, RULE_constDecl = 1, RULE_varDecl = 2, RULE_propDecl = 3,
RULE_stsDecl = 4, RULE_sts = 5, RULE_defSts = 6, RULE_invarConstr = 7,
RULE_initConstr = 8, RULE_transConstr = 9, RULE_refSts = 10, RULE_decl = 11,
RULE_declList = 12, RULE_type = 13, RULE_typeList = 14, RULE_boolType = 15,
RULE_intType = 16, RULE_ratType = 17, RULE_funcType = 18, RULE_arrayType = 19,
RULE_expr = 20, RULE_exprList = 21, RULE_funcLitExpr = 22, RULE_iteExpr = 23,
RULE_iffExpr = 24, RULE_implyExpr = 25, RULE_quantifiedExpr = 26, RULE_forallExpr = 27,
RULE_existsExpr = 28, RULE_orExpr = 29, RULE_xorExpr = 30, RULE_andExpr = 31,
RULE_notExpr = 32, RULE_equalityExpr = 33, RULE_relationExpr = 34, RULE_additiveExpr = 35,
RULE_multiplicativeExpr = 36, RULE_negExpr = 37, RULE_accessorExpr = 38,
RULE_access = 39, RULE_funcAccess = 40, RULE_arrayAccess = 41, RULE_primeAccess = 42,
RULE_primaryExpr = 43, RULE_trueExpr = 44, RULE_falseExpr = 45, RULE_intLitExpr = 46,
RULE_ratLitExpr = 47, RULE_idExpr = 48, RULE_parenExpr = 49, RULE_stmt = 50,
RULE_stmtList = 51, RULE_assignStmt = 52, RULE_havocStmt = 53, RULE_assumeStmt = 54;
private static String[] makeRuleNames() {
return new String[] {
"stsSpec", "constDecl", "varDecl", "propDecl", "stsDecl", "sts", "defSts",
"invarConstr", "initConstr", "transConstr", "refSts", "decl", "declList",
"type", "typeList", "boolType", "intType", "ratType", "funcType", "arrayType",
"expr", "exprList", "funcLitExpr", "iteExpr", "iffExpr", "implyExpr",
"quantifiedExpr", "forallExpr", "existsExpr", "orExpr", "xorExpr", "andExpr",
"notExpr", "equalityExpr", "relationExpr", "additiveExpr", "multiplicativeExpr",
"negExpr", "accessorExpr", "access", "funcAccess", "arrayAccess", "primeAccess",
"primaryExpr", "trueExpr", "falseExpr", "intLitExpr", "ratLitExpr", "idExpr",
"parenExpr", "stmt", "stmtList", "assignStmt", "havocStmt", "assumeStmt"
};
}
public static final String[] ruleNames = makeRuleNames();
private static String[] makeLiteralNames() {
return new String[] {
null, "'specification'", "'const'", "'var'", "'property'", "'models'",
"'G'", "'system'", "'invariant'", "'initial'", "'transition'", "'bool'",
"'int'", "'rat'", "'if'", "'then'", "'else'", "'equal'", "'imply'", "'forall'",
"'exists'", "'or'", "'and'", "'xor'", "'not'", "'='", "'/='", "'<'",
"'<='", "'>'", "'>='", "'+'", "'-'", "'*'", "'/'", "'mod'", "'rem'",
"'%'", "'true'", "'false'", "':='", "'havoc'", "'assume'", null, null,
null, "'.'", null, "'_'", null, null, "'('", "')'", "'['", "']'", "'{'",
"'}'", "','", "':'", "';'", "'''", "'<-'", "'->'"
};
}
private static final String[] _LITERAL_NAMES = makeLiteralNames();
private static String[] makeSymbolicNames() {
return new String[] {
null, "SPECIFICATION", "CONST", "VAR", "PROPERTY", "MODELS", "GLOBALLY",
"SYSTEM", "INVARIANT", "INITIAL", "TRANSITION", "BOOLTYPE", "INTTYPE",
"RATTYPE", "IF", "THEN", "ELSE", "IFF", "IMPLY", "FORALL", "EXISTS",
"OR", "AND", "XOR", "NOT", "EQ", "NEQ", "LT", "LEQ", "GT", "GEQ", "PLUS",
"MINUS", "MUL", "DIV", "MOD", "REM", "PERCENT", "TRUE", "FALSE", "ASSIGN",
"HAVOC", "ASSUME", "INT", "NAT", "SIGN", "DOT", "ID", "UNDERSCORE", "DIGIT",
"LETTER", "LPAREN", "RPAREN", "LBRACK", "RBRACK", "LBRAC", "RBRAC", "COMMA",
"COLON", "SEMICOLON", "QUOT", "LARROW", "RARROW", "WS", "COMMENT", "LINE_COMMENT"
};
}
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 "StsDsl.g4"; }
@Override
public String[] getRuleNames() { return ruleNames; }
@Override
public String getSerializedATN() { return _serializedATN; }
@Override
public ATN getATN() { return _ATN; }
public StsDslParser(TokenStream input) {
super(input);
_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
public static class StsSpecContext extends ParserRuleContext {
public Token name;
public DeclListContext paramDecls;
public ConstDeclContext constDecl;
public List constDecls = new ArrayList();
public VarDeclContext varDecl;
public List varDecls = new ArrayList();
public StsDeclContext stsDecl;
public List stsDecls = new ArrayList();
public PropDeclContext propDecl;
public List propDecls = new ArrayList();
public TerminalNode SPECIFICATION() { return getToken(StsDslParser.SPECIFICATION, 0); }
public TerminalNode LBRAC() { return getToken(StsDslParser.LBRAC, 0); }
public TerminalNode RBRAC() { return getToken(StsDslParser.RBRAC, 0); }
public TerminalNode ID() { return getToken(StsDslParser.ID, 0); }
public TerminalNode LPAREN() { return getToken(StsDslParser.LPAREN, 0); }
public TerminalNode RPAREN() { return getToken(StsDslParser.RPAREN, 0); }
public List constDecl() {
return getRuleContexts(ConstDeclContext.class);
}
public ConstDeclContext constDecl(int i) {
return getRuleContext(ConstDeclContext.class,i);
}
public List varDecl() {
return getRuleContexts(VarDeclContext.class);
}
public VarDeclContext varDecl(int i) {
return getRuleContext(VarDeclContext.class,i);
}
public List stsDecl() {
return getRuleContexts(StsDeclContext.class);
}
public StsDeclContext stsDecl(int i) {
return getRuleContext(StsDeclContext.class,i);
}
public List propDecl() {
return getRuleContexts(PropDeclContext.class);
}
public PropDeclContext propDecl(int i) {
return getRuleContext(PropDeclContext.class,i);
}
public DeclListContext declList() {
return getRuleContext(DeclListContext.class,0);
}
public StsSpecContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_stsSpec; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterStsSpec(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitStsSpec(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitStsSpec(this);
else return visitor.visitChildren(this);
}
}
public final StsSpecContext stsSpec() throws RecognitionException {
StsSpecContext _localctx = new StsSpecContext(_ctx, getState());
enterRule(_localctx, 0, RULE_stsSpec);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(110);
match(SPECIFICATION);
setState(111);
((StsSpecContext)_localctx).name = match(ID);
setState(117);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==LPAREN) {
{
setState(112);
match(LPAREN);
setState(114);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==ID) {
{
setState(113);
((StsSpecContext)_localctx).paramDecls = declList();
}
}
setState(116);
match(RPAREN);
}
}
setState(119);
match(LBRAC);
setState(126);
_errHandler.sync(this);
_la = _input.LA(1);
while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << CONST) | (1L << VAR) | (1L << PROPERTY) | (1L << SYSTEM))) != 0)) {
{
setState(124);
_errHandler.sync(this);
switch (_input.LA(1)) {
case CONST:
{
setState(120);
((StsSpecContext)_localctx).constDecl = constDecl();
((StsSpecContext)_localctx).constDecls.add(((StsSpecContext)_localctx).constDecl);
}
break;
case VAR:
{
setState(121);
((StsSpecContext)_localctx).varDecl = varDecl();
((StsSpecContext)_localctx).varDecls.add(((StsSpecContext)_localctx).varDecl);
}
break;
case SYSTEM:
{
setState(122);
((StsSpecContext)_localctx).stsDecl = stsDecl();
((StsSpecContext)_localctx).stsDecls.add(((StsSpecContext)_localctx).stsDecl);
}
break;
case PROPERTY:
{
setState(123);
((StsSpecContext)_localctx).propDecl = propDecl();
((StsSpecContext)_localctx).propDecls.add(((StsSpecContext)_localctx).propDecl);
}
break;
default:
throw new NoViableAltException(this);
}
}
setState(128);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(129);
match(RBRAC);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ConstDeclContext extends ParserRuleContext {
public DeclContext ddecl;
public ExprContext value;
public TerminalNode CONST() { return getToken(StsDslParser.CONST, 0); }
public DeclContext decl() {
return getRuleContext(DeclContext.class,0);
}
public TerminalNode ASSIGN() { return getToken(StsDslParser.ASSIGN, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public ConstDeclContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_constDecl; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterConstDecl(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitConstDecl(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitConstDecl(this);
else return visitor.visitChildren(this);
}
}
public final ConstDeclContext constDecl() throws RecognitionException {
ConstDeclContext _localctx = new ConstDeclContext(_ctx, getState());
enterRule(_localctx, 2, RULE_constDecl);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(131);
match(CONST);
setState(132);
((ConstDeclContext)_localctx).ddecl = decl();
setState(135);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==ASSIGN) {
{
setState(133);
match(ASSIGN);
setState(134);
((ConstDeclContext)_localctx).value = expr();
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class VarDeclContext extends ParserRuleContext {
public DeclContext ddecl;
public ExprContext value;
public TerminalNode VAR() { return getToken(StsDslParser.VAR, 0); }
public DeclContext decl() {
return getRuleContext(DeclContext.class,0);
}
public TerminalNode ASSIGN() { return getToken(StsDslParser.ASSIGN, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public VarDeclContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_varDecl; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterVarDecl(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitVarDecl(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitVarDecl(this);
else return visitor.visitChildren(this);
}
}
public final VarDeclContext varDecl() throws RecognitionException {
VarDeclContext _localctx = new VarDeclContext(_ctx, getState());
enterRule(_localctx, 4, RULE_varDecl);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(137);
match(VAR);
setState(138);
((VarDeclContext)_localctx).ddecl = decl();
setState(141);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==ASSIGN) {
{
setState(139);
match(ASSIGN);
setState(140);
((VarDeclContext)_localctx).value = expr();
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class PropDeclContext extends ParserRuleContext {
public Token name;
public StsContext system;
public ExprContext cond;
public TerminalNode PROPERTY() { return getToken(StsDslParser.PROPERTY, 0); }
public TerminalNode COLON() { return getToken(StsDslParser.COLON, 0); }
public TerminalNode MODELS() { return getToken(StsDslParser.MODELS, 0); }
public TerminalNode GLOBALLY() { return getToken(StsDslParser.GLOBALLY, 0); }
public TerminalNode LPAREN() { return getToken(StsDslParser.LPAREN, 0); }
public TerminalNode RPAREN() { return getToken(StsDslParser.RPAREN, 0); }
public TerminalNode ID() { return getToken(StsDslParser.ID, 0); }
public StsContext sts() {
return getRuleContext(StsContext.class,0);
}
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public PropDeclContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_propDecl; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterPropDecl(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitPropDecl(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitPropDecl(this);
else return visitor.visitChildren(this);
}
}
public final PropDeclContext propDecl() throws RecognitionException {
PropDeclContext _localctx = new PropDeclContext(_ctx, getState());
enterRule(_localctx, 6, RULE_propDecl);
try {
enterOuterAlt(_localctx, 1);
{
setState(143);
match(PROPERTY);
setState(144);
((PropDeclContext)_localctx).name = match(ID);
setState(145);
match(COLON);
setState(146);
((PropDeclContext)_localctx).system = sts();
setState(147);
match(MODELS);
setState(148);
match(GLOBALLY);
setState(149);
match(LPAREN);
setState(150);
((PropDeclContext)_localctx).cond = expr();
setState(151);
match(RPAREN);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class StsDeclContext extends ParserRuleContext {
public Token name;
public DeclListContext paramDecls;
public StsContext def;
public TerminalNode SYSTEM() { return getToken(StsDslParser.SYSTEM, 0); }
public TerminalNode ASSIGN() { return getToken(StsDslParser.ASSIGN, 0); }
public TerminalNode ID() { return getToken(StsDslParser.ID, 0); }
public StsContext sts() {
return getRuleContext(StsContext.class,0);
}
public TerminalNode LPAREN() { return getToken(StsDslParser.LPAREN, 0); }
public TerminalNode RPAREN() { return getToken(StsDslParser.RPAREN, 0); }
public DeclListContext declList() {
return getRuleContext(DeclListContext.class,0);
}
public StsDeclContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_stsDecl; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterStsDecl(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitStsDecl(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitStsDecl(this);
else return visitor.visitChildren(this);
}
}
public final StsDeclContext stsDecl() throws RecognitionException {
StsDeclContext _localctx = new StsDeclContext(_ctx, getState());
enterRule(_localctx, 8, RULE_stsDecl);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(153);
match(SYSTEM);
setState(154);
((StsDeclContext)_localctx).name = match(ID);
setState(160);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==LPAREN) {
{
setState(155);
match(LPAREN);
setState(157);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==ID) {
{
setState(156);
((StsDeclContext)_localctx).paramDecls = declList();
}
}
setState(159);
match(RPAREN);
}
}
setState(162);
match(ASSIGN);
setState(163);
((StsDeclContext)_localctx).def = sts();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class StsContext extends ParserRuleContext {
public DefStsContext defSts() {
return getRuleContext(DefStsContext.class,0);
}
public RefStsContext refSts() {
return getRuleContext(RefStsContext.class,0);
}
public StsContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_sts; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterSts(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitSts(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitSts(this);
else return visitor.visitChildren(this);
}
}
public final StsContext sts() throws RecognitionException {
StsContext _localctx = new StsContext(_ctx, getState());
enterRule(_localctx, 10, RULE_sts);
try {
setState(167);
_errHandler.sync(this);
switch (_input.LA(1)) {
case LBRAC:
enterOuterAlt(_localctx, 1);
{
setState(165);
defSts();
}
break;
case ID:
enterOuterAlt(_localctx, 2);
{
setState(166);
refSts();
}
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 DefStsContext extends ParserRuleContext {
public ConstDeclContext constDecl;
public List constDecls = new ArrayList();
public VarDeclContext varDecl;
public List varDecls = new ArrayList();
public InvarConstrContext invarConstr;
public List invarConstrs = new ArrayList();
public InitConstrContext initConstr;
public List initConstrs = new ArrayList();
public TransConstrContext transConstr;
public List transConstrs = new ArrayList();
public TerminalNode LBRAC() { return getToken(StsDslParser.LBRAC, 0); }
public TerminalNode RBRAC() { return getToken(StsDslParser.RBRAC, 0); }
public List constDecl() {
return getRuleContexts(ConstDeclContext.class);
}
public ConstDeclContext constDecl(int i) {
return getRuleContext(ConstDeclContext.class,i);
}
public List varDecl() {
return getRuleContexts(VarDeclContext.class);
}
public VarDeclContext varDecl(int i) {
return getRuleContext(VarDeclContext.class,i);
}
public List invarConstr() {
return getRuleContexts(InvarConstrContext.class);
}
public InvarConstrContext invarConstr(int i) {
return getRuleContext(InvarConstrContext.class,i);
}
public List initConstr() {
return getRuleContexts(InitConstrContext.class);
}
public InitConstrContext initConstr(int i) {
return getRuleContext(InitConstrContext.class,i);
}
public List transConstr() {
return getRuleContexts(TransConstrContext.class);
}
public TransConstrContext transConstr(int i) {
return getRuleContext(TransConstrContext.class,i);
}
public DefStsContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_defSts; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterDefSts(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitDefSts(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitDefSts(this);
else return visitor.visitChildren(this);
}
}
public final DefStsContext defSts() throws RecognitionException {
DefStsContext _localctx = new DefStsContext(_ctx, getState());
enterRule(_localctx, 12, RULE_defSts);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(169);
match(LBRAC);
setState(177);
_errHandler.sync(this);
_la = _input.LA(1);
while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << CONST) | (1L << VAR) | (1L << INVARIANT) | (1L << INITIAL) | (1L << TRANSITION))) != 0)) {
{
setState(175);
_errHandler.sync(this);
switch (_input.LA(1)) {
case CONST:
{
setState(170);
((DefStsContext)_localctx).constDecl = constDecl();
((DefStsContext)_localctx).constDecls.add(((DefStsContext)_localctx).constDecl);
}
break;
case VAR:
{
setState(171);
((DefStsContext)_localctx).varDecl = varDecl();
((DefStsContext)_localctx).varDecls.add(((DefStsContext)_localctx).varDecl);
}
break;
case INVARIANT:
{
setState(172);
((DefStsContext)_localctx).invarConstr = invarConstr();
((DefStsContext)_localctx).invarConstrs.add(((DefStsContext)_localctx).invarConstr);
}
break;
case INITIAL:
{
setState(173);
((DefStsContext)_localctx).initConstr = initConstr();
((DefStsContext)_localctx).initConstrs.add(((DefStsContext)_localctx).initConstr);
}
break;
case TRANSITION:
{
setState(174);
((DefStsContext)_localctx).transConstr = transConstr();
((DefStsContext)_localctx).transConstrs.add(((DefStsContext)_localctx).transConstr);
}
break;
default:
throw new NoViableAltException(this);
}
}
setState(179);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(180);
match(RBRAC);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class InvarConstrContext extends ParserRuleContext {
public ExprContext cond;
public TerminalNode INVARIANT() { return getToken(StsDslParser.INVARIANT, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public InvarConstrContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_invarConstr; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterInvarConstr(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitInvarConstr(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitInvarConstr(this);
else return visitor.visitChildren(this);
}
}
public final InvarConstrContext invarConstr() throws RecognitionException {
InvarConstrContext _localctx = new InvarConstrContext(_ctx, getState());
enterRule(_localctx, 14, RULE_invarConstr);
try {
enterOuterAlt(_localctx, 1);
{
setState(182);
match(INVARIANT);
setState(183);
((InvarConstrContext)_localctx).cond = expr();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class InitConstrContext extends ParserRuleContext {
public ExprContext cond;
public TerminalNode INITIAL() { return getToken(StsDslParser.INITIAL, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public InitConstrContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_initConstr; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterInitConstr(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitInitConstr(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitInitConstr(this);
else return visitor.visitChildren(this);
}
}
public final InitConstrContext initConstr() throws RecognitionException {
InitConstrContext _localctx = new InitConstrContext(_ctx, getState());
enterRule(_localctx, 16, RULE_initConstr);
try {
enterOuterAlt(_localctx, 1);
{
setState(185);
match(INITIAL);
setState(186);
((InitConstrContext)_localctx).cond = expr();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class TransConstrContext extends ParserRuleContext {
public ExprContext cond;
public TerminalNode TRANSITION() { return getToken(StsDslParser.TRANSITION, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public TransConstrContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_transConstr; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterTransConstr(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitTransConstr(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitTransConstr(this);
else return visitor.visitChildren(this);
}
}
public final TransConstrContext transConstr() throws RecognitionException {
TransConstrContext _localctx = new TransConstrContext(_ctx, getState());
enterRule(_localctx, 18, RULE_transConstr);
try {
enterOuterAlt(_localctx, 1);
{
setState(188);
match(TRANSITION);
setState(189);
((TransConstrContext)_localctx).cond = expr();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class RefStsContext extends ParserRuleContext {
public Token ref;
public ExprListContext params;
public TerminalNode ID() { return getToken(StsDslParser.ID, 0); }
public TerminalNode LPAREN() { return getToken(StsDslParser.LPAREN, 0); }
public TerminalNode RPAREN() { return getToken(StsDslParser.RPAREN, 0); }
public ExprListContext exprList() {
return getRuleContext(ExprListContext.class,0);
}
public RefStsContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_refSts; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterRefSts(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitRefSts(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitRefSts(this);
else return visitor.visitChildren(this);
}
}
public final RefStsContext refSts() throws RecognitionException {
RefStsContext _localctx = new RefStsContext(_ctx, getState());
enterRule(_localctx, 20, RULE_refSts);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(191);
((RefStsContext)_localctx).ref = match(ID);
setState(197);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==LPAREN) {
{
setState(192);
match(LPAREN);
setState(194);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << IF) | (1L << FORALL) | (1L << EXISTS) | (1L << NOT) | (1L << MINUS) | (1L << TRUE) | (1L << FALSE) | (1L << INT) | (1L << ID) | (1L << LPAREN))) != 0)) {
{
setState(193);
((RefStsContext)_localctx).params = exprList();
}
}
setState(196);
match(RPAREN);
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class DeclContext extends ParserRuleContext {
public Token name;
public TypeContext ttype;
public TerminalNode COLON() { return getToken(StsDslParser.COLON, 0); }
public TerminalNode ID() { return getToken(StsDslParser.ID, 0); }
public TypeContext type() {
return getRuleContext(TypeContext.class,0);
}
public DeclContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_decl; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterDecl(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitDecl(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitDecl(this);
else return visitor.visitChildren(this);
}
}
public final DeclContext decl() throws RecognitionException {
DeclContext _localctx = new DeclContext(_ctx, getState());
enterRule(_localctx, 22, RULE_decl);
try {
enterOuterAlt(_localctx, 1);
{
setState(199);
((DeclContext)_localctx).name = match(ID);
setState(200);
match(COLON);
setState(201);
((DeclContext)_localctx).ttype = type();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class DeclListContext extends ParserRuleContext {
public DeclContext decl;
public List decls = new ArrayList();
public List decl() {
return getRuleContexts(DeclContext.class);
}
public DeclContext decl(int i) {
return getRuleContext(DeclContext.class,i);
}
public List COMMA() { return getTokens(StsDslParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(StsDslParser.COMMA, i);
}
public DeclListContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_declList; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterDeclList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitDeclList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitDeclList(this);
else return visitor.visitChildren(this);
}
}
public final DeclListContext declList() throws RecognitionException {
DeclListContext _localctx = new DeclListContext(_ctx, getState());
enterRule(_localctx, 24, RULE_declList);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
{
setState(203);
((DeclListContext)_localctx).decl = decl();
((DeclListContext)_localctx).decls.add(((DeclListContext)_localctx).decl);
}
setState(208);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==COMMA) {
{
{
setState(204);
match(COMMA);
setState(205);
((DeclListContext)_localctx).decl = decl();
((DeclListContext)_localctx).decls.add(((DeclListContext)_localctx).decl);
}
}
setState(210);
_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 TypeContext extends ParserRuleContext {
public BoolTypeContext boolType() {
return getRuleContext(BoolTypeContext.class,0);
}
public IntTypeContext intType() {
return getRuleContext(IntTypeContext.class,0);
}
public RatTypeContext ratType() {
return getRuleContext(RatTypeContext.class,0);
}
public FuncTypeContext funcType() {
return getRuleContext(FuncTypeContext.class,0);
}
public ArrayTypeContext arrayType() {
return getRuleContext(ArrayTypeContext.class,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 StsDslListener ) ((StsDslListener)listener).enterType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitType(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitType(this);
else return visitor.visitChildren(this);
}
}
public final TypeContext type() throws RecognitionException {
TypeContext _localctx = new TypeContext(_ctx, getState());
enterRule(_localctx, 26, RULE_type);
try {
setState(216);
_errHandler.sync(this);
switch (_input.LA(1)) {
case BOOLTYPE:
enterOuterAlt(_localctx, 1);
{
setState(211);
boolType();
}
break;
case INTTYPE:
enterOuterAlt(_localctx, 2);
{
setState(212);
intType();
}
break;
case RATTYPE:
enterOuterAlt(_localctx, 3);
{
setState(213);
ratType();
}
break;
case LPAREN:
enterOuterAlt(_localctx, 4);
{
setState(214);
funcType();
}
break;
case LBRACK:
enterOuterAlt(_localctx, 5);
{
setState(215);
arrayType();
}
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 TypeListContext extends ParserRuleContext {
public TypeContext type;
public List types = new ArrayList();
public List type() {
return getRuleContexts(TypeContext.class);
}
public TypeContext type(int i) {
return getRuleContext(TypeContext.class,i);
}
public List COMMA() { return getTokens(StsDslParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(StsDslParser.COMMA, i);
}
public TypeListContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_typeList; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterTypeList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitTypeList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitTypeList(this);
else return visitor.visitChildren(this);
}
}
public final TypeListContext typeList() throws RecognitionException {
TypeListContext _localctx = new TypeListContext(_ctx, getState());
enterRule(_localctx, 28, RULE_typeList);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
{
setState(218);
((TypeListContext)_localctx).type = type();
((TypeListContext)_localctx).types.add(((TypeListContext)_localctx).type);
}
setState(223);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==COMMA) {
{
{
setState(219);
match(COMMA);
setState(220);
((TypeListContext)_localctx).type = type();
((TypeListContext)_localctx).types.add(((TypeListContext)_localctx).type);
}
}
setState(225);
_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 BoolTypeContext extends ParserRuleContext {
public TerminalNode BOOLTYPE() { return getToken(StsDslParser.BOOLTYPE, 0); }
public BoolTypeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_boolType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterBoolType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitBoolType(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitBoolType(this);
else return visitor.visitChildren(this);
}
}
public final BoolTypeContext boolType() throws RecognitionException {
BoolTypeContext _localctx = new BoolTypeContext(_ctx, getState());
enterRule(_localctx, 30, RULE_boolType);
try {
enterOuterAlt(_localctx, 1);
{
setState(226);
match(BOOLTYPE);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class IntTypeContext extends ParserRuleContext {
public TerminalNode INTTYPE() { return getToken(StsDslParser.INTTYPE, 0); }
public IntTypeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_intType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterIntType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitIntType(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitIntType(this);
else return visitor.visitChildren(this);
}
}
public final IntTypeContext intType() throws RecognitionException {
IntTypeContext _localctx = new IntTypeContext(_ctx, getState());
enterRule(_localctx, 32, RULE_intType);
try {
enterOuterAlt(_localctx, 1);
{
setState(228);
match(INTTYPE);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class RatTypeContext extends ParserRuleContext {
public TerminalNode RATTYPE() { return getToken(StsDslParser.RATTYPE, 0); }
public RatTypeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_ratType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterRatType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitRatType(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitRatType(this);
else return visitor.visitChildren(this);
}
}
public final RatTypeContext ratType() throws RecognitionException {
RatTypeContext _localctx = new RatTypeContext(_ctx, getState());
enterRule(_localctx, 34, RULE_ratType);
try {
enterOuterAlt(_localctx, 1);
{
setState(230);
match(RATTYPE);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class FuncTypeContext extends ParserRuleContext {
public TypeListContext paramTypes;
public TypeContext returnType;
public TerminalNode LPAREN() { return getToken(StsDslParser.LPAREN, 0); }
public TerminalNode RPAREN() { return getToken(StsDslParser.RPAREN, 0); }
public TerminalNode RARROW() { return getToken(StsDslParser.RARROW, 0); }
public TypeListContext typeList() {
return getRuleContext(TypeListContext.class,0);
}
public TypeContext type() {
return getRuleContext(TypeContext.class,0);
}
public FuncTypeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_funcType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterFuncType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitFuncType(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitFuncType(this);
else return visitor.visitChildren(this);
}
}
public final FuncTypeContext funcType() throws RecognitionException {
FuncTypeContext _localctx = new FuncTypeContext(_ctx, getState());
enterRule(_localctx, 36, RULE_funcType);
try {
enterOuterAlt(_localctx, 1);
{
setState(232);
match(LPAREN);
setState(233);
((FuncTypeContext)_localctx).paramTypes = typeList();
setState(234);
match(RPAREN);
setState(235);
match(RARROW);
setState(236);
((FuncTypeContext)_localctx).returnType = type();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ArrayTypeContext extends ParserRuleContext {
public TypeListContext indexTypes;
public TypeContext elemType;
public TerminalNode LBRACK() { return getToken(StsDslParser.LBRACK, 0); }
public TerminalNode RBRACK() { return getToken(StsDslParser.RBRACK, 0); }
public TerminalNode RARROW() { return getToken(StsDslParser.RARROW, 0); }
public TypeListContext typeList() {
return getRuleContext(TypeListContext.class,0);
}
public TypeContext type() {
return getRuleContext(TypeContext.class,0);
}
public ArrayTypeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_arrayType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterArrayType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitArrayType(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitArrayType(this);
else return visitor.visitChildren(this);
}
}
public final ArrayTypeContext arrayType() throws RecognitionException {
ArrayTypeContext _localctx = new ArrayTypeContext(_ctx, getState());
enterRule(_localctx, 38, RULE_arrayType);
try {
enterOuterAlt(_localctx, 1);
{
setState(238);
match(LBRACK);
setState(239);
((ArrayTypeContext)_localctx).indexTypes = typeList();
setState(240);
match(RBRACK);
setState(241);
match(RARROW);
setState(242);
((ArrayTypeContext)_localctx).elemType = type();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ExprContext extends ParserRuleContext {
public FuncLitExprContext funcLitExpr() {
return getRuleContext(FuncLitExprContext.class,0);
}
public ExprContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_expr; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterExpr(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitExpr(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitExpr(this);
else return visitor.visitChildren(this);
}
}
public final ExprContext expr() throws RecognitionException {
ExprContext _localctx = new ExprContext(_ctx, getState());
enterRule(_localctx, 40, RULE_expr);
try {
enterOuterAlt(_localctx, 1);
{
setState(244);
funcLitExpr();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ExprListContext extends ParserRuleContext {
public ExprContext expr;
public List exprs = new ArrayList();
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public List COMMA() { return getTokens(StsDslParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(StsDslParser.COMMA, i);
}
public ExprListContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_exprList; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterExprList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitExprList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitExprList(this);
else return visitor.visitChildren(this);
}
}
public final ExprListContext exprList() throws RecognitionException {
ExprListContext _localctx = new ExprListContext(_ctx, getState());
enterRule(_localctx, 42, RULE_exprList);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
{
setState(246);
((ExprListContext)_localctx).expr = expr();
((ExprListContext)_localctx).exprs.add(((ExprListContext)_localctx).expr);
}
setState(251);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==COMMA) {
{
{
setState(247);
match(COMMA);
setState(248);
((ExprListContext)_localctx).expr = expr();
((ExprListContext)_localctx).exprs.add(((ExprListContext)_localctx).expr);
}
}
setState(253);
_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 FuncLitExprContext extends ParserRuleContext {
public DeclListContext paramDecls;
public FuncLitExprContext result;
public IteExprContext iteExpr() {
return getRuleContext(IteExprContext.class,0);
}
public TerminalNode LPAREN() { return getToken(StsDslParser.LPAREN, 0); }
public TerminalNode RPAREN() { return getToken(StsDslParser.RPAREN, 0); }
public TerminalNode RARROW() { return getToken(StsDslParser.RARROW, 0); }
public FuncLitExprContext funcLitExpr() {
return getRuleContext(FuncLitExprContext.class,0);
}
public DeclListContext declList() {
return getRuleContext(DeclListContext.class,0);
}
public FuncLitExprContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_funcLitExpr; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterFuncLitExpr(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitFuncLitExpr(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitFuncLitExpr(this);
else return visitor.visitChildren(this);
}
}
public final FuncLitExprContext funcLitExpr() throws RecognitionException {
FuncLitExprContext _localctx = new FuncLitExprContext(_ctx, getState());
enterRule(_localctx, 44, RULE_funcLitExpr);
int _la;
try {
setState(262);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,18,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(254);
iteExpr();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(255);
match(LPAREN);
setState(257);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==ID) {
{
setState(256);
((FuncLitExprContext)_localctx).paramDecls = declList();
}
}
setState(259);
match(RPAREN);
setState(260);
match(RARROW);
setState(261);
((FuncLitExprContext)_localctx).result = funcLitExpr();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class IteExprContext extends ParserRuleContext {
public ExprContext cond;
public ExprContext then;
public IteExprContext elze;
public IffExprContext iffExpr() {
return getRuleContext(IffExprContext.class,0);
}
public TerminalNode IF() { return getToken(StsDslParser.IF, 0); }
public TerminalNode THEN() { return getToken(StsDslParser.THEN, 0); }
public TerminalNode ELSE() { return getToken(StsDslParser.ELSE, 0); }
public List expr() {
return getRuleContexts(ExprContext.class);
}
public ExprContext expr(int i) {
return getRuleContext(ExprContext.class,i);
}
public IteExprContext iteExpr() {
return getRuleContext(IteExprContext.class,0);
}
public IteExprContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_iteExpr; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterIteExpr(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitIteExpr(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitIteExpr(this);
else return visitor.visitChildren(this);
}
}
public final IteExprContext iteExpr() throws RecognitionException {
IteExprContext _localctx = new IteExprContext(_ctx, getState());
enterRule(_localctx, 46, RULE_iteExpr);
try {
setState(272);
_errHandler.sync(this);
switch (_input.LA(1)) {
case FORALL:
case EXISTS:
case NOT:
case MINUS:
case TRUE:
case FALSE:
case INT:
case ID:
case LPAREN:
enterOuterAlt(_localctx, 1);
{
setState(264);
iffExpr();
}
break;
case IF:
enterOuterAlt(_localctx, 2);
{
setState(265);
match(IF);
setState(266);
((IteExprContext)_localctx).cond = expr();
setState(267);
match(THEN);
setState(268);
((IteExprContext)_localctx).then = expr();
setState(269);
match(ELSE);
setState(270);
((IteExprContext)_localctx).elze = iteExpr();
}
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 IffExprContext extends ParserRuleContext {
public ImplyExprContext leftOp;
public IffExprContext rightOp;
public ImplyExprContext implyExpr() {
return getRuleContext(ImplyExprContext.class,0);
}
public TerminalNode IFF() { return getToken(StsDslParser.IFF, 0); }
public IffExprContext iffExpr() {
return getRuleContext(IffExprContext.class,0);
}
public IffExprContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_iffExpr; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterIffExpr(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitIffExpr(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitIffExpr(this);
else return visitor.visitChildren(this);
}
}
public final IffExprContext iffExpr() throws RecognitionException {
IffExprContext _localctx = new IffExprContext(_ctx, getState());
enterRule(_localctx, 48, RULE_iffExpr);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(274);
((IffExprContext)_localctx).leftOp = implyExpr();
setState(277);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==IFF) {
{
setState(275);
match(IFF);
setState(276);
((IffExprContext)_localctx).rightOp = iffExpr();
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ImplyExprContext extends ParserRuleContext {
public QuantifiedExprContext leftOp;
public ImplyExprContext rightOp;
public QuantifiedExprContext quantifiedExpr() {
return getRuleContext(QuantifiedExprContext.class,0);
}
public TerminalNode IMPLY() { return getToken(StsDslParser.IMPLY, 0); }
public ImplyExprContext implyExpr() {
return getRuleContext(ImplyExprContext.class,0);
}
public ImplyExprContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_implyExpr; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterImplyExpr(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitImplyExpr(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitImplyExpr(this);
else return visitor.visitChildren(this);
}
}
public final ImplyExprContext implyExpr() throws RecognitionException {
ImplyExprContext _localctx = new ImplyExprContext(_ctx, getState());
enterRule(_localctx, 50, RULE_implyExpr);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(279);
((ImplyExprContext)_localctx).leftOp = quantifiedExpr();
setState(282);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==IMPLY) {
{
setState(280);
match(IMPLY);
setState(281);
((ImplyExprContext)_localctx).rightOp = implyExpr();
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class QuantifiedExprContext extends ParserRuleContext {
public OrExprContext orExpr() {
return getRuleContext(OrExprContext.class,0);
}
public ForallExprContext forallExpr() {
return getRuleContext(ForallExprContext.class,0);
}
public ExistsExprContext existsExpr() {
return getRuleContext(ExistsExprContext.class,0);
}
public QuantifiedExprContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_quantifiedExpr; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterQuantifiedExpr(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitQuantifiedExpr(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitQuantifiedExpr(this);
else return visitor.visitChildren(this);
}
}
public final QuantifiedExprContext quantifiedExpr() throws RecognitionException {
QuantifiedExprContext _localctx = new QuantifiedExprContext(_ctx, getState());
enterRule(_localctx, 52, RULE_quantifiedExpr);
try {
setState(287);
_errHandler.sync(this);
switch (_input.LA(1)) {
case NOT:
case MINUS:
case TRUE:
case FALSE:
case INT:
case ID:
case LPAREN:
enterOuterAlt(_localctx, 1);
{
setState(284);
orExpr();
}
break;
case FORALL:
enterOuterAlt(_localctx, 2);
{
setState(285);
forallExpr();
}
break;
case EXISTS:
enterOuterAlt(_localctx, 3);
{
setState(286);
existsExpr();
}
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 ForallExprContext extends ParserRuleContext {
public DeclListContext paramDecls;
public QuantifiedExprContext op;
public TerminalNode FORALL() { return getToken(StsDslParser.FORALL, 0); }
public TerminalNode LPAREN() { return getToken(StsDslParser.LPAREN, 0); }
public TerminalNode RPAREN() { return getToken(StsDslParser.RPAREN, 0); }
public DeclListContext declList() {
return getRuleContext(DeclListContext.class,0);
}
public QuantifiedExprContext quantifiedExpr() {
return getRuleContext(QuantifiedExprContext.class,0);
}
public ForallExprContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_forallExpr; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterForallExpr(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitForallExpr(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitForallExpr(this);
else return visitor.visitChildren(this);
}
}
public final ForallExprContext forallExpr() throws RecognitionException {
ForallExprContext _localctx = new ForallExprContext(_ctx, getState());
enterRule(_localctx, 54, RULE_forallExpr);
try {
enterOuterAlt(_localctx, 1);
{
setState(289);
match(FORALL);
setState(290);
match(LPAREN);
setState(291);
((ForallExprContext)_localctx).paramDecls = declList();
setState(292);
match(RPAREN);
setState(293);
((ForallExprContext)_localctx).op = quantifiedExpr();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ExistsExprContext extends ParserRuleContext {
public DeclListContext paramDecls;
public QuantifiedExprContext op;
public TerminalNode EXISTS() { return getToken(StsDslParser.EXISTS, 0); }
public TerminalNode LPAREN() { return getToken(StsDslParser.LPAREN, 0); }
public TerminalNode RPAREN() { return getToken(StsDslParser.RPAREN, 0); }
public DeclListContext declList() {
return getRuleContext(DeclListContext.class,0);
}
public QuantifiedExprContext quantifiedExpr() {
return getRuleContext(QuantifiedExprContext.class,0);
}
public ExistsExprContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_existsExpr; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterExistsExpr(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitExistsExpr(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitExistsExpr(this);
else return visitor.visitChildren(this);
}
}
public final ExistsExprContext existsExpr() throws RecognitionException {
ExistsExprContext _localctx = new ExistsExprContext(_ctx, getState());
enterRule(_localctx, 56, RULE_existsExpr);
try {
enterOuterAlt(_localctx, 1);
{
setState(295);
match(EXISTS);
setState(296);
match(LPAREN);
setState(297);
((ExistsExprContext)_localctx).paramDecls = declList();
setState(298);
match(RPAREN);
setState(299);
((ExistsExprContext)_localctx).op = quantifiedExpr();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class OrExprContext extends ParserRuleContext {
public XorExprContext xorExpr;
public List ops = new ArrayList();
public List xorExpr() {
return getRuleContexts(XorExprContext.class);
}
public XorExprContext xorExpr(int i) {
return getRuleContext(XorExprContext.class,i);
}
public List OR() { return getTokens(StsDslParser.OR); }
public TerminalNode OR(int i) {
return getToken(StsDslParser.OR, i);
}
public OrExprContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_orExpr; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterOrExpr(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitOrExpr(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitOrExpr(this);
else return visitor.visitChildren(this);
}
}
public final OrExprContext orExpr() throws RecognitionException {
OrExprContext _localctx = new OrExprContext(_ctx, getState());
enterRule(_localctx, 58, RULE_orExpr);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(301);
((OrExprContext)_localctx).xorExpr = xorExpr();
((OrExprContext)_localctx).ops.add(((OrExprContext)_localctx).xorExpr);
setState(306);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==OR) {
{
{
setState(302);
match(OR);
setState(303);
((OrExprContext)_localctx).xorExpr = xorExpr();
((OrExprContext)_localctx).ops.add(((OrExprContext)_localctx).xorExpr);
}
}
setState(308);
_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 XorExprContext extends ParserRuleContext {
public AndExprContext leftOp;
public XorExprContext rightOp;
public AndExprContext andExpr() {
return getRuleContext(AndExprContext.class,0);
}
public TerminalNode XOR() { return getToken(StsDslParser.XOR, 0); }
public XorExprContext xorExpr() {
return getRuleContext(XorExprContext.class,0);
}
public XorExprContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_xorExpr; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterXorExpr(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitXorExpr(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitXorExpr(this);
else return visitor.visitChildren(this);
}
}
public final XorExprContext xorExpr() throws RecognitionException {
XorExprContext _localctx = new XorExprContext(_ctx, getState());
enterRule(_localctx, 60, RULE_xorExpr);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(309);
((XorExprContext)_localctx).leftOp = andExpr();
setState(312);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==XOR) {
{
setState(310);
match(XOR);
setState(311);
((XorExprContext)_localctx).rightOp = xorExpr();
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class AndExprContext extends ParserRuleContext {
public NotExprContext notExpr;
public List ops = new ArrayList();
public List notExpr() {
return getRuleContexts(NotExprContext.class);
}
public NotExprContext notExpr(int i) {
return getRuleContext(NotExprContext.class,i);
}
public List AND() { return getTokens(StsDslParser.AND); }
public TerminalNode AND(int i) {
return getToken(StsDslParser.AND, i);
}
public AndExprContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_andExpr; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterAndExpr(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitAndExpr(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitAndExpr(this);
else return visitor.visitChildren(this);
}
}
public final AndExprContext andExpr() throws RecognitionException {
AndExprContext _localctx = new AndExprContext(_ctx, getState());
enterRule(_localctx, 62, RULE_andExpr);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(314);
((AndExprContext)_localctx).notExpr = notExpr();
((AndExprContext)_localctx).ops.add(((AndExprContext)_localctx).notExpr);
setState(319);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==AND) {
{
{
setState(315);
match(AND);
setState(316);
((AndExprContext)_localctx).notExpr = notExpr();
((AndExprContext)_localctx).ops.add(((AndExprContext)_localctx).notExpr);
}
}
setState(321);
_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 NotExprContext extends ParserRuleContext {
public EqualityExprContext op;
public EqualityExprContext equalityExpr() {
return getRuleContext(EqualityExprContext.class,0);
}
public TerminalNode NOT() { return getToken(StsDslParser.NOT, 0); }
public NotExprContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_notExpr; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterNotExpr(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitNotExpr(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitNotExpr(this);
else return visitor.visitChildren(this);
}
}
public final NotExprContext notExpr() throws RecognitionException {
NotExprContext _localctx = new NotExprContext(_ctx, getState());
enterRule(_localctx, 64, RULE_notExpr);
try {
setState(325);
_errHandler.sync(this);
switch (_input.LA(1)) {
case MINUS:
case TRUE:
case FALSE:
case INT:
case ID:
case LPAREN:
enterOuterAlt(_localctx, 1);
{
setState(322);
equalityExpr();
}
break;
case NOT:
enterOuterAlt(_localctx, 2);
{
setState(323);
match(NOT);
setState(324);
((NotExprContext)_localctx).op = equalityExpr();
}
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 EqualityExprContext extends ParserRuleContext {
public RelationExprContext leftOp;
public Token oper;
public RelationExprContext rightOp;
public List relationExpr() {
return getRuleContexts(RelationExprContext.class);
}
public RelationExprContext relationExpr(int i) {
return getRuleContext(RelationExprContext.class,i);
}
public TerminalNode EQ() { return getToken(StsDslParser.EQ, 0); }
public TerminalNode NEQ() { return getToken(StsDslParser.NEQ, 0); }
public EqualityExprContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_equalityExpr; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterEqualityExpr(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitEqualityExpr(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitEqualityExpr(this);
else return visitor.visitChildren(this);
}
}
public final EqualityExprContext equalityExpr() throws RecognitionException {
EqualityExprContext _localctx = new EqualityExprContext(_ctx, getState());
enterRule(_localctx, 66, RULE_equalityExpr);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(327);
((EqualityExprContext)_localctx).leftOp = relationExpr();
setState(330);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==EQ || _la==NEQ) {
{
setState(328);
((EqualityExprContext)_localctx).oper = _input.LT(1);
_la = _input.LA(1);
if ( !(_la==EQ || _la==NEQ) ) {
((EqualityExprContext)_localctx).oper = (Token)_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(329);
((EqualityExprContext)_localctx).rightOp = relationExpr();
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class RelationExprContext extends ParserRuleContext {
public AdditiveExprContext leftOp;
public Token oper;
public AdditiveExprContext rightOp;
public List additiveExpr() {
return getRuleContexts(AdditiveExprContext.class);
}
public AdditiveExprContext additiveExpr(int i) {
return getRuleContext(AdditiveExprContext.class,i);
}
public TerminalNode LT() { return getToken(StsDslParser.LT, 0); }
public TerminalNode LEQ() { return getToken(StsDslParser.LEQ, 0); }
public TerminalNode GT() { return getToken(StsDslParser.GT, 0); }
public TerminalNode GEQ() { return getToken(StsDslParser.GEQ, 0); }
public RelationExprContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_relationExpr; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterRelationExpr(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitRelationExpr(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitRelationExpr(this);
else return visitor.visitChildren(this);
}
}
public final RelationExprContext relationExpr() throws RecognitionException {
RelationExprContext _localctx = new RelationExprContext(_ctx, getState());
enterRule(_localctx, 68, RULE_relationExpr);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(332);
((RelationExprContext)_localctx).leftOp = additiveExpr();
setState(335);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << LT) | (1L << LEQ) | (1L << GT) | (1L << GEQ))) != 0)) {
{
setState(333);
((RelationExprContext)_localctx).oper = _input.LT(1);
_la = _input.LA(1);
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << LT) | (1L << LEQ) | (1L << GT) | (1L << GEQ))) != 0)) ) {
((RelationExprContext)_localctx).oper = (Token)_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(334);
((RelationExprContext)_localctx).rightOp = additiveExpr();
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class AdditiveExprContext extends ParserRuleContext {
public MultiplicativeExprContext multiplicativeExpr;
public List ops = new ArrayList();
public Token PLUS;
public List opers = new ArrayList();
public Token MINUS;
public Token _tset860;
public List multiplicativeExpr() {
return getRuleContexts(MultiplicativeExprContext.class);
}
public MultiplicativeExprContext multiplicativeExpr(int i) {
return getRuleContext(MultiplicativeExprContext.class,i);
}
public List PLUS() { return getTokens(StsDslParser.PLUS); }
public TerminalNode PLUS(int i) {
return getToken(StsDslParser.PLUS, i);
}
public List MINUS() { return getTokens(StsDslParser.MINUS); }
public TerminalNode MINUS(int i) {
return getToken(StsDslParser.MINUS, i);
}
public AdditiveExprContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_additiveExpr; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterAdditiveExpr(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitAdditiveExpr(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitAdditiveExpr(this);
else return visitor.visitChildren(this);
}
}
public final AdditiveExprContext additiveExpr() throws RecognitionException {
AdditiveExprContext _localctx = new AdditiveExprContext(_ctx, getState());
enterRule(_localctx, 70, RULE_additiveExpr);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(337);
((AdditiveExprContext)_localctx).multiplicativeExpr = multiplicativeExpr();
((AdditiveExprContext)_localctx).ops.add(((AdditiveExprContext)_localctx).multiplicativeExpr);
setState(342);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==PLUS || _la==MINUS) {
{
{
setState(338);
((AdditiveExprContext)_localctx)._tset860 = _input.LT(1);
_la = _input.LA(1);
if ( !(_la==PLUS || _la==MINUS) ) {
((AdditiveExprContext)_localctx)._tset860 = (Token)_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
((AdditiveExprContext)_localctx).opers.add(((AdditiveExprContext)_localctx)._tset860);
setState(339);
((AdditiveExprContext)_localctx).multiplicativeExpr = multiplicativeExpr();
((AdditiveExprContext)_localctx).ops.add(((AdditiveExprContext)_localctx).multiplicativeExpr);
}
}
setState(344);
_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 MultiplicativeExprContext extends ParserRuleContext {
public NegExprContext negExpr;
public List ops = new ArrayList();
public Token MUL;
public List opers = new ArrayList();
public Token DIV;
public Token MOD;
public Token REM;
public Token _tset887;
public List negExpr() {
return getRuleContexts(NegExprContext.class);
}
public NegExprContext negExpr(int i) {
return getRuleContext(NegExprContext.class,i);
}
public List MUL() { return getTokens(StsDslParser.MUL); }
public TerminalNode MUL(int i) {
return getToken(StsDslParser.MUL, i);
}
public List DIV() { return getTokens(StsDslParser.DIV); }
public TerminalNode DIV(int i) {
return getToken(StsDslParser.DIV, i);
}
public List MOD() { return getTokens(StsDslParser.MOD); }
public TerminalNode MOD(int i) {
return getToken(StsDslParser.MOD, i);
}
public List REM() { return getTokens(StsDslParser.REM); }
public TerminalNode REM(int i) {
return getToken(StsDslParser.REM, i);
}
public MultiplicativeExprContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_multiplicativeExpr; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterMultiplicativeExpr(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitMultiplicativeExpr(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitMultiplicativeExpr(this);
else return visitor.visitChildren(this);
}
}
public final MultiplicativeExprContext multiplicativeExpr() throws RecognitionException {
MultiplicativeExprContext _localctx = new MultiplicativeExprContext(_ctx, getState());
enterRule(_localctx, 72, RULE_multiplicativeExpr);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(345);
((MultiplicativeExprContext)_localctx).negExpr = negExpr();
((MultiplicativeExprContext)_localctx).ops.add(((MultiplicativeExprContext)_localctx).negExpr);
setState(350);
_errHandler.sync(this);
_la = _input.LA(1);
while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << MUL) | (1L << DIV) | (1L << MOD) | (1L << REM))) != 0)) {
{
{
setState(346);
((MultiplicativeExprContext)_localctx)._tset887 = _input.LT(1);
_la = _input.LA(1);
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << MUL) | (1L << DIV) | (1L << MOD) | (1L << REM))) != 0)) ) {
((MultiplicativeExprContext)_localctx)._tset887 = (Token)_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
((MultiplicativeExprContext)_localctx).opers.add(((MultiplicativeExprContext)_localctx)._tset887);
setState(347);
((MultiplicativeExprContext)_localctx).negExpr = negExpr();
((MultiplicativeExprContext)_localctx).ops.add(((MultiplicativeExprContext)_localctx).negExpr);
}
}
setState(352);
_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 NegExprContext extends ParserRuleContext {
public NegExprContext op;
public AccessorExprContext accessorExpr() {
return getRuleContext(AccessorExprContext.class,0);
}
public TerminalNode MINUS() { return getToken(StsDslParser.MINUS, 0); }
public NegExprContext negExpr() {
return getRuleContext(NegExprContext.class,0);
}
public NegExprContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_negExpr; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterNegExpr(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitNegExpr(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitNegExpr(this);
else return visitor.visitChildren(this);
}
}
public final NegExprContext negExpr() throws RecognitionException {
NegExprContext _localctx = new NegExprContext(_ctx, getState());
enterRule(_localctx, 74, RULE_negExpr);
try {
setState(356);
_errHandler.sync(this);
switch (_input.LA(1)) {
case TRUE:
case FALSE:
case INT:
case ID:
case LPAREN:
enterOuterAlt(_localctx, 1);
{
setState(353);
accessorExpr();
}
break;
case MINUS:
enterOuterAlt(_localctx, 2);
{
setState(354);
match(MINUS);
setState(355);
((NegExprContext)_localctx).op = negExpr();
}
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 AccessorExprContext extends ParserRuleContext {
public PrimaryExprContext op;
public AccessContext access;
public List accesses = new ArrayList();
public PrimaryExprContext primaryExpr() {
return getRuleContext(PrimaryExprContext.class,0);
}
public List access() {
return getRuleContexts(AccessContext.class);
}
public AccessContext access(int i) {
return getRuleContext(AccessContext.class,i);
}
public AccessorExprContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_accessorExpr; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterAccessorExpr(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitAccessorExpr(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitAccessorExpr(this);
else return visitor.visitChildren(this);
}
}
public final AccessorExprContext accessorExpr() throws RecognitionException {
AccessorExprContext _localctx = new AccessorExprContext(_ctx, getState());
enterRule(_localctx, 76, RULE_accessorExpr);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(358);
((AccessorExprContext)_localctx).op = primaryExpr();
setState(362);
_errHandler.sync(this);
_la = _input.LA(1);
while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << LPAREN) | (1L << LBRACK) | (1L << QUOT))) != 0)) {
{
{
setState(359);
((AccessorExprContext)_localctx).access = access();
((AccessorExprContext)_localctx).accesses.add(((AccessorExprContext)_localctx).access);
}
}
setState(364);
_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 AccessContext extends ParserRuleContext {
public FuncAccessContext params;
public ArrayAccessContext indexes;
public PrimeAccessContext prime;
public FuncAccessContext funcAccess() {
return getRuleContext(FuncAccessContext.class,0);
}
public ArrayAccessContext arrayAccess() {
return getRuleContext(ArrayAccessContext.class,0);
}
public PrimeAccessContext primeAccess() {
return getRuleContext(PrimeAccessContext.class,0);
}
public AccessContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_access; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterAccess(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitAccess(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitAccess(this);
else return visitor.visitChildren(this);
}
}
public final AccessContext access() throws RecognitionException {
AccessContext _localctx = new AccessContext(_ctx, getState());
enterRule(_localctx, 78, RULE_access);
try {
setState(368);
_errHandler.sync(this);
switch (_input.LA(1)) {
case LPAREN:
enterOuterAlt(_localctx, 1);
{
setState(365);
((AccessContext)_localctx).params = funcAccess();
}
break;
case LBRACK:
enterOuterAlt(_localctx, 2);
{
setState(366);
((AccessContext)_localctx).indexes = arrayAccess();
}
break;
case QUOT:
enterOuterAlt(_localctx, 3);
{
setState(367);
((AccessContext)_localctx).prime = primeAccess();
}
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 FuncAccessContext extends ParserRuleContext {
public ExprListContext params;
public TerminalNode LPAREN() { return getToken(StsDslParser.LPAREN, 0); }
public TerminalNode RPAREN() { return getToken(StsDslParser.RPAREN, 0); }
public ExprListContext exprList() {
return getRuleContext(ExprListContext.class,0);
}
public FuncAccessContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_funcAccess; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterFuncAccess(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitFuncAccess(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitFuncAccess(this);
else return visitor.visitChildren(this);
}
}
public final FuncAccessContext funcAccess() throws RecognitionException {
FuncAccessContext _localctx = new FuncAccessContext(_ctx, getState());
enterRule(_localctx, 80, RULE_funcAccess);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(370);
match(LPAREN);
setState(372);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << IF) | (1L << FORALL) | (1L << EXISTS) | (1L << NOT) | (1L << MINUS) | (1L << TRUE) | (1L << FALSE) | (1L << INT) | (1L << ID) | (1L << LPAREN))) != 0)) {
{
setState(371);
((FuncAccessContext)_localctx).params = exprList();
}
}
setState(374);
match(RPAREN);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ArrayAccessContext extends ParserRuleContext {
public ExprListContext indexes;
public TerminalNode LBRACK() { return getToken(StsDslParser.LBRACK, 0); }
public TerminalNode RBRACK() { return getToken(StsDslParser.RBRACK, 0); }
public ExprListContext exprList() {
return getRuleContext(ExprListContext.class,0);
}
public ArrayAccessContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_arrayAccess; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterArrayAccess(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitArrayAccess(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitArrayAccess(this);
else return visitor.visitChildren(this);
}
}
public final ArrayAccessContext arrayAccess() throws RecognitionException {
ArrayAccessContext _localctx = new ArrayAccessContext(_ctx, getState());
enterRule(_localctx, 82, RULE_arrayAccess);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(376);
match(LBRACK);
setState(378);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << IF) | (1L << FORALL) | (1L << EXISTS) | (1L << NOT) | (1L << MINUS) | (1L << TRUE) | (1L << FALSE) | (1L << INT) | (1L << ID) | (1L << LPAREN))) != 0)) {
{
setState(377);
((ArrayAccessContext)_localctx).indexes = exprList();
}
}
setState(380);
match(RBRACK);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class PrimeAccessContext extends ParserRuleContext {
public TerminalNode QUOT() { return getToken(StsDslParser.QUOT, 0); }
public PrimeAccessContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_primeAccess; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterPrimeAccess(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitPrimeAccess(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitPrimeAccess(this);
else return visitor.visitChildren(this);
}
}
public final PrimeAccessContext primeAccess() throws RecognitionException {
PrimeAccessContext _localctx = new PrimeAccessContext(_ctx, getState());
enterRule(_localctx, 84, RULE_primeAccess);
try {
enterOuterAlt(_localctx, 1);
{
setState(382);
match(QUOT);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class PrimaryExprContext extends ParserRuleContext {
public TrueExprContext trueExpr() {
return getRuleContext(TrueExprContext.class,0);
}
public FalseExprContext falseExpr() {
return getRuleContext(FalseExprContext.class,0);
}
public IntLitExprContext intLitExpr() {
return getRuleContext(IntLitExprContext.class,0);
}
public RatLitExprContext ratLitExpr() {
return getRuleContext(RatLitExprContext.class,0);
}
public IdExprContext idExpr() {
return getRuleContext(IdExprContext.class,0);
}
public ParenExprContext parenExpr() {
return getRuleContext(ParenExprContext.class,0);
}
public PrimaryExprContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_primaryExpr; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterPrimaryExpr(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitPrimaryExpr(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitPrimaryExpr(this);
else return visitor.visitChildren(this);
}
}
public final PrimaryExprContext primaryExpr() throws RecognitionException {
PrimaryExprContext _localctx = new PrimaryExprContext(_ctx, getState());
enterRule(_localctx, 86, RULE_primaryExpr);
try {
setState(390);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,36,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(384);
trueExpr();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(385);
falseExpr();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(386);
intLitExpr();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(387);
ratLitExpr();
}
break;
case 5:
enterOuterAlt(_localctx, 5);
{
setState(388);
idExpr();
}
break;
case 6:
enterOuterAlt(_localctx, 6);
{
setState(389);
parenExpr();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class TrueExprContext extends ParserRuleContext {
public TerminalNode TRUE() { return getToken(StsDslParser.TRUE, 0); }
public TrueExprContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_trueExpr; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterTrueExpr(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitTrueExpr(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitTrueExpr(this);
else return visitor.visitChildren(this);
}
}
public final TrueExprContext trueExpr() throws RecognitionException {
TrueExprContext _localctx = new TrueExprContext(_ctx, getState());
enterRule(_localctx, 88, RULE_trueExpr);
try {
enterOuterAlt(_localctx, 1);
{
setState(392);
match(TRUE);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class FalseExprContext extends ParserRuleContext {
public TerminalNode FALSE() { return getToken(StsDslParser.FALSE, 0); }
public FalseExprContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_falseExpr; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterFalseExpr(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitFalseExpr(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitFalseExpr(this);
else return visitor.visitChildren(this);
}
}
public final FalseExprContext falseExpr() throws RecognitionException {
FalseExprContext _localctx = new FalseExprContext(_ctx, getState());
enterRule(_localctx, 90, RULE_falseExpr);
try {
enterOuterAlt(_localctx, 1);
{
setState(394);
match(FALSE);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class IntLitExprContext extends ParserRuleContext {
public Token value;
public TerminalNode INT() { return getToken(StsDslParser.INT, 0); }
public IntLitExprContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_intLitExpr; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterIntLitExpr(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitIntLitExpr(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitIntLitExpr(this);
else return visitor.visitChildren(this);
}
}
public final IntLitExprContext intLitExpr() throws RecognitionException {
IntLitExprContext _localctx = new IntLitExprContext(_ctx, getState());
enterRule(_localctx, 92, RULE_intLitExpr);
try {
enterOuterAlt(_localctx, 1);
{
setState(396);
((IntLitExprContext)_localctx).value = match(INT);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class RatLitExprContext extends ParserRuleContext {
public Token num;
public Token denom;
public TerminalNode PERCENT() { return getToken(StsDslParser.PERCENT, 0); }
public List INT() { return getTokens(StsDslParser.INT); }
public TerminalNode INT(int i) {
return getToken(StsDslParser.INT, i);
}
public RatLitExprContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_ratLitExpr; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterRatLitExpr(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitRatLitExpr(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitRatLitExpr(this);
else return visitor.visitChildren(this);
}
}
public final RatLitExprContext ratLitExpr() throws RecognitionException {
RatLitExprContext _localctx = new RatLitExprContext(_ctx, getState());
enterRule(_localctx, 94, RULE_ratLitExpr);
try {
enterOuterAlt(_localctx, 1);
{
setState(398);
((RatLitExprContext)_localctx).num = match(INT);
setState(399);
match(PERCENT);
setState(400);
((RatLitExprContext)_localctx).denom = match(INT);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class IdExprContext extends ParserRuleContext {
public Token id;
public TerminalNode ID() { return getToken(StsDslParser.ID, 0); }
public IdExprContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_idExpr; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterIdExpr(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitIdExpr(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitIdExpr(this);
else return visitor.visitChildren(this);
}
}
public final IdExprContext idExpr() throws RecognitionException {
IdExprContext _localctx = new IdExprContext(_ctx, getState());
enterRule(_localctx, 96, RULE_idExpr);
try {
enterOuterAlt(_localctx, 1);
{
setState(402);
((IdExprContext)_localctx).id = match(ID);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ParenExprContext extends ParserRuleContext {
public ExprContext op;
public TerminalNode LPAREN() { return getToken(StsDslParser.LPAREN, 0); }
public TerminalNode RPAREN() { return getToken(StsDslParser.RPAREN, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public ParenExprContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_parenExpr; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterParenExpr(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitParenExpr(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitParenExpr(this);
else return visitor.visitChildren(this);
}
}
public final ParenExprContext parenExpr() throws RecognitionException {
ParenExprContext _localctx = new ParenExprContext(_ctx, getState());
enterRule(_localctx, 98, RULE_parenExpr);
try {
enterOuterAlt(_localctx, 1);
{
setState(404);
match(LPAREN);
setState(405);
((ParenExprContext)_localctx).op = expr();
setState(406);
match(RPAREN);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class StmtContext extends ParserRuleContext {
public AssignStmtContext assignStmt() {
return getRuleContext(AssignStmtContext.class,0);
}
public HavocStmtContext havocStmt() {
return getRuleContext(HavocStmtContext.class,0);
}
public AssumeStmtContext assumeStmt() {
return getRuleContext(AssumeStmtContext.class,0);
}
public StmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_stmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterStmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitStmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitStmt(this);
else return visitor.visitChildren(this);
}
}
public final StmtContext stmt() throws RecognitionException {
StmtContext _localctx = new StmtContext(_ctx, getState());
enterRule(_localctx, 100, RULE_stmt);
try {
setState(411);
_errHandler.sync(this);
switch (_input.LA(1)) {
case ID:
enterOuterAlt(_localctx, 1);
{
setState(408);
assignStmt();
}
break;
case HAVOC:
enterOuterAlt(_localctx, 2);
{
setState(409);
havocStmt();
}
break;
case ASSUME:
enterOuterAlt(_localctx, 3);
{
setState(410);
assumeStmt();
}
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 StmtListContext extends ParserRuleContext {
public StmtContext stmt;
public List stmts = new ArrayList();
public List stmt() {
return getRuleContexts(StmtContext.class);
}
public StmtContext stmt(int i) {
return getRuleContext(StmtContext.class,i);
}
public List SEMICOLON() { return getTokens(StsDslParser.SEMICOLON); }
public TerminalNode SEMICOLON(int i) {
return getToken(StsDslParser.SEMICOLON, i);
}
public StmtListContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_stmtList; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterStmtList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitStmtList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitStmtList(this);
else return visitor.visitChildren(this);
}
}
public final StmtListContext stmtList() throws RecognitionException {
StmtListContext _localctx = new StmtListContext(_ctx, getState());
enterRule(_localctx, 102, RULE_stmtList);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
{
setState(413);
((StmtListContext)_localctx).stmt = stmt();
((StmtListContext)_localctx).stmts.add(((StmtListContext)_localctx).stmt);
}
setState(418);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==SEMICOLON) {
{
{
setState(414);
match(SEMICOLON);
setState(415);
((StmtListContext)_localctx).stmt = stmt();
((StmtListContext)_localctx).stmts.add(((StmtListContext)_localctx).stmt);
}
}
setState(420);
_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 AssignStmtContext extends ParserRuleContext {
public Token lhs;
public ExprContext value;
public TerminalNode ASSIGN() { return getToken(StsDslParser.ASSIGN, 0); }
public TerminalNode ID() { return getToken(StsDslParser.ID, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public AssignStmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_assignStmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterAssignStmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitAssignStmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitAssignStmt(this);
else return visitor.visitChildren(this);
}
}
public final AssignStmtContext assignStmt() throws RecognitionException {
AssignStmtContext _localctx = new AssignStmtContext(_ctx, getState());
enterRule(_localctx, 104, RULE_assignStmt);
try {
enterOuterAlt(_localctx, 1);
{
setState(421);
((AssignStmtContext)_localctx).lhs = match(ID);
setState(422);
match(ASSIGN);
setState(423);
((AssignStmtContext)_localctx).value = expr();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class HavocStmtContext extends ParserRuleContext {
public Token lhs;
public TerminalNode HAVOC() { return getToken(StsDslParser.HAVOC, 0); }
public TerminalNode ID() { return getToken(StsDslParser.ID, 0); }
public HavocStmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_havocStmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterHavocStmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitHavocStmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitHavocStmt(this);
else return visitor.visitChildren(this);
}
}
public final HavocStmtContext havocStmt() throws RecognitionException {
HavocStmtContext _localctx = new HavocStmtContext(_ctx, getState());
enterRule(_localctx, 106, RULE_havocStmt);
try {
enterOuterAlt(_localctx, 1);
{
setState(425);
match(HAVOC);
setState(426);
((HavocStmtContext)_localctx).lhs = match(ID);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class AssumeStmtContext extends ParserRuleContext {
public ExprContext cond;
public TerminalNode ASSUME() { return getToken(StsDslParser.ASSUME, 0); }
public ExprContext expr() {
return getRuleContext(ExprContext.class,0);
}
public AssumeStmtContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_assumeStmt; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).enterAssumeStmt(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof StsDslListener ) ((StsDslListener)listener).exitAssumeStmt(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof StsDslVisitor ) return ((StsDslVisitor extends T>)visitor).visitAssumeStmt(this);
else return visitor.visitChildren(this);
}
}
public final AssumeStmtContext assumeStmt() throws RecognitionException {
AssumeStmtContext _localctx = new AssumeStmtContext(_ctx, getState());
enterRule(_localctx, 108, RULE_assumeStmt);
try {
enterOuterAlt(_localctx, 1);
{
setState(428);
match(ASSUME);
setState(429);
((AssumeStmtContext)_localctx).cond = expr();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static final String _serializedATN =
"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3C\u01b2\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\4 \t \4!"+
"\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4"+
",\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64\t"+
"\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\3\2\3\2\3\2\3\2\5\2u\n\2\3\2\5"+
"\2x\n\2\3\2\3\2\3\2\3\2\3\2\7\2\177\n\2\f\2\16\2\u0082\13\2\3\2\3\2\3"+
"\3\3\3\3\3\3\3\5\3\u008a\n\3\3\4\3\4\3\4\3\4\5\4\u0090\n\4\3\5\3\5\3\5"+
"\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\6\3\6\3\6\3\6\5\6\u00a0\n\6\3\6\5\6\u00a3"+
"\n\6\3\6\3\6\3\6\3\7\3\7\5\7\u00aa\n\7\3\b\3\b\3\b\3\b\3\b\3\b\7\b\u00b2"+
"\n\b\f\b\16\b\u00b5\13\b\3\b\3\b\3\t\3\t\3\t\3\n\3\n\3\n\3\13\3\13\3\13"+
"\3\f\3\f\3\f\5\f\u00c5\n\f\3\f\5\f\u00c8\n\f\3\r\3\r\3\r\3\r\3\16\3\16"+
"\3\16\7\16\u00d1\n\16\f\16\16\16\u00d4\13\16\3\17\3\17\3\17\3\17\3\17"+
"\5\17\u00db\n\17\3\20\3\20\3\20\7\20\u00e0\n\20\f\20\16\20\u00e3\13\20"+
"\3\21\3\21\3\22\3\22\3\23\3\23\3\24\3\24\3\24\3\24\3\24\3\24\3\25\3\25"+
"\3\25\3\25\3\25\3\25\3\26\3\26\3\27\3\27\3\27\7\27\u00fc\n\27\f\27\16"+
"\27\u00ff\13\27\3\30\3\30\3\30\5\30\u0104\n\30\3\30\3\30\3\30\5\30\u0109"+
"\n\30\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\5\31\u0113\n\31\3\32\3\32"+
"\3\32\5\32\u0118\n\32\3\33\3\33\3\33\5\33\u011d\n\33\3\34\3\34\3\34\5"+
"\34\u0122\n\34\3\35\3\35\3\35\3\35\3\35\3\35\3\36\3\36\3\36\3\36\3\36"+
"\3\36\3\37\3\37\3\37\7\37\u0133\n\37\f\37\16\37\u0136\13\37\3 \3 \3 \5"+
" \u013b\n \3!\3!\3!\7!\u0140\n!\f!\16!\u0143\13!\3\"\3\"\3\"\5\"\u0148"+
"\n\"\3#\3#\3#\5#\u014d\n#\3$\3$\3$\5$\u0152\n$\3%\3%\3%\7%\u0157\n%\f"+
"%\16%\u015a\13%\3&\3&\3&\7&\u015f\n&\f&\16&\u0162\13&\3\'\3\'\3\'\5\'"+
"\u0167\n\'\3(\3(\7(\u016b\n(\f(\16(\u016e\13(\3)\3)\3)\5)\u0173\n)\3*"+
"\3*\5*\u0177\n*\3*\3*\3+\3+\5+\u017d\n+\3+\3+\3,\3,\3-\3-\3-\3-\3-\3-"+
"\5-\u0189\n-\3.\3.\3/\3/\3\60\3\60\3\61\3\61\3\61\3\61\3\62\3\62\3\63"+
"\3\63\3\63\3\63\3\64\3\64\3\64\5\64\u019e\n\64\3\65\3\65\3\65\7\65\u01a3"+
"\n\65\f\65\16\65\u01a6\13\65\3\66\3\66\3\66\3\66\3\67\3\67\3\67\38\38"+
"\38\38\2\29\2\4\6\b\n\f\16\20\22\24\26\30\32\34\36 \"$&(*,.\60\62\64\66"+
"8:<>@BDFHJLNPRTVXZ\\^`bdfhjln\2\6\3\2\33\34\3\2\35 \3\2!\"\3\2#&\2\u01b0"+
"\2p\3\2\2\2\4\u0085\3\2\2\2\6\u008b\3\2\2\2\b\u0091\3\2\2\2\n\u009b\3"+
"\2\2\2\f\u00a9\3\2\2\2\16\u00ab\3\2\2\2\20\u00b8\3\2\2\2\22\u00bb\3\2"+
"\2\2\24\u00be\3\2\2\2\26\u00c1\3\2\2\2\30\u00c9\3\2\2\2\32\u00cd\3\2\2"+
"\2\34\u00da\3\2\2\2\36\u00dc\3\2\2\2 \u00e4\3\2\2\2\"\u00e6\3\2\2\2$\u00e8"+
"\3\2\2\2&\u00ea\3\2\2\2(\u00f0\3\2\2\2*\u00f6\3\2\2\2,\u00f8\3\2\2\2."+
"\u0108\3\2\2\2\60\u0112\3\2\2\2\62\u0114\3\2\2\2\64\u0119\3\2\2\2\66\u0121"+
"\3\2\2\28\u0123\3\2\2\2:\u0129\3\2\2\2<\u012f\3\2\2\2>\u0137\3\2\2\2@"+
"\u013c\3\2\2\2B\u0147\3\2\2\2D\u0149\3\2\2\2F\u014e\3\2\2\2H\u0153\3\2"+
"\2\2J\u015b\3\2\2\2L\u0166\3\2\2\2N\u0168\3\2\2\2P\u0172\3\2\2\2R\u0174"+
"\3\2\2\2T\u017a\3\2\2\2V\u0180\3\2\2\2X\u0188\3\2\2\2Z\u018a\3\2\2\2\\"+
"\u018c\3\2\2\2^\u018e\3\2\2\2`\u0190\3\2\2\2b\u0194\3\2\2\2d\u0196\3\2"+
"\2\2f\u019d\3\2\2\2h\u019f\3\2\2\2j\u01a7\3\2\2\2l\u01ab\3\2\2\2n\u01ae"+
"\3\2\2\2pq\7\3\2\2qw\7\61\2\2rt\7\65\2\2su\5\32\16\2ts\3\2\2\2tu\3\2\2"+
"\2uv\3\2\2\2vx\7\66\2\2wr\3\2\2\2wx\3\2\2\2xy\3\2\2\2y\u0080\79\2\2z\177"+
"\5\4\3\2{\177\5\6\4\2|\177\5\n\6\2}\177\5\b\5\2~z\3\2\2\2~{\3\2\2\2~|"+
"\3\2\2\2~}\3\2\2\2\177\u0082\3\2\2\2\u0080~\3\2\2\2\u0080\u0081\3\2\2"+
"\2\u0081\u0083\3\2\2\2\u0082\u0080\3\2\2\2\u0083\u0084\7:\2\2\u0084\3"+
"\3\2\2\2\u0085\u0086\7\4\2\2\u0086\u0089\5\30\r\2\u0087\u0088\7*\2\2\u0088"+
"\u008a\5*\26\2\u0089\u0087\3\2\2\2\u0089\u008a\3\2\2\2\u008a\5\3\2\2\2"+
"\u008b\u008c\7\5\2\2\u008c\u008f\5\30\r\2\u008d\u008e\7*\2\2\u008e\u0090"+
"\5*\26\2\u008f\u008d\3\2\2\2\u008f\u0090\3\2\2\2\u0090\7\3\2\2\2\u0091"+
"\u0092\7\6\2\2\u0092\u0093\7\61\2\2\u0093\u0094\7<\2\2\u0094\u0095\5\f"+
"\7\2\u0095\u0096\7\7\2\2\u0096\u0097\7\b\2\2\u0097\u0098\7\65\2\2\u0098"+
"\u0099\5*\26\2\u0099\u009a\7\66\2\2\u009a\t\3\2\2\2\u009b\u009c\7\t\2"+
"\2\u009c\u00a2\7\61\2\2\u009d\u009f\7\65\2\2\u009e\u00a0\5\32\16\2\u009f"+
"\u009e\3\2\2\2\u009f\u00a0\3\2\2\2\u00a0\u00a1\3\2\2\2\u00a1\u00a3\7\66"+
"\2\2\u00a2\u009d\3\2\2\2\u00a2\u00a3\3\2\2\2\u00a3\u00a4\3\2\2\2\u00a4"+
"\u00a5\7*\2\2\u00a5\u00a6\5\f\7\2\u00a6\13\3\2\2\2\u00a7\u00aa\5\16\b"+
"\2\u00a8\u00aa\5\26\f\2\u00a9\u00a7\3\2\2\2\u00a9\u00a8\3\2\2\2\u00aa"+
"\r\3\2\2\2\u00ab\u00b3\79\2\2\u00ac\u00b2\5\4\3\2\u00ad\u00b2\5\6\4\2"+
"\u00ae\u00b2\5\20\t\2\u00af\u00b2\5\22\n\2\u00b0\u00b2\5\24\13\2\u00b1"+
"\u00ac\3\2\2\2\u00b1\u00ad\3\2\2\2\u00b1\u00ae\3\2\2\2\u00b1\u00af\3\2"+
"\2\2\u00b1\u00b0\3\2\2\2\u00b2\u00b5\3\2\2\2\u00b3\u00b1\3\2\2\2\u00b3"+
"\u00b4\3\2\2\2\u00b4\u00b6\3\2\2\2\u00b5\u00b3\3\2\2\2\u00b6\u00b7\7:"+
"\2\2\u00b7\17\3\2\2\2\u00b8\u00b9\7\n\2\2\u00b9\u00ba\5*\26\2\u00ba\21"+
"\3\2\2\2\u00bb\u00bc\7\13\2\2\u00bc\u00bd\5*\26\2\u00bd\23\3\2\2\2\u00be"+
"\u00bf\7\f\2\2\u00bf\u00c0\5*\26\2\u00c0\25\3\2\2\2\u00c1\u00c7\7\61\2"+
"\2\u00c2\u00c4\7\65\2\2\u00c3\u00c5\5,\27\2\u00c4\u00c3\3\2\2\2\u00c4"+
"\u00c5\3\2\2\2\u00c5\u00c6\3\2\2\2\u00c6\u00c8\7\66\2\2\u00c7\u00c2\3"+
"\2\2\2\u00c7\u00c8\3\2\2\2\u00c8\27\3\2\2\2\u00c9\u00ca\7\61\2\2\u00ca"+
"\u00cb\7<\2\2\u00cb\u00cc\5\34\17\2\u00cc\31\3\2\2\2\u00cd\u00d2\5\30"+
"\r\2\u00ce\u00cf\7;\2\2\u00cf\u00d1\5\30\r\2\u00d0\u00ce\3\2\2\2\u00d1"+
"\u00d4\3\2\2\2\u00d2\u00d0\3\2\2\2\u00d2\u00d3\3\2\2\2\u00d3\33\3\2\2"+
"\2\u00d4\u00d2\3\2\2\2\u00d5\u00db\5 \21\2\u00d6\u00db\5\"\22\2\u00d7"+
"\u00db\5$\23\2\u00d8\u00db\5&\24\2\u00d9\u00db\5(\25\2\u00da\u00d5\3\2"+
"\2\2\u00da\u00d6\3\2\2\2\u00da\u00d7\3\2\2\2\u00da\u00d8\3\2\2\2\u00da"+
"\u00d9\3\2\2\2\u00db\35\3\2\2\2\u00dc\u00e1\5\34\17\2\u00dd\u00de\7;\2"+
"\2\u00de\u00e0\5\34\17\2\u00df\u00dd\3\2\2\2\u00e0\u00e3\3\2\2\2\u00e1"+
"\u00df\3\2\2\2\u00e1\u00e2\3\2\2\2\u00e2\37\3\2\2\2\u00e3\u00e1\3\2\2"+
"\2\u00e4\u00e5\7\r\2\2\u00e5!\3\2\2\2\u00e6\u00e7\7\16\2\2\u00e7#\3\2"+
"\2\2\u00e8\u00e9\7\17\2\2\u00e9%\3\2\2\2\u00ea\u00eb\7\65\2\2\u00eb\u00ec"+
"\5\36\20\2\u00ec\u00ed\7\66\2\2\u00ed\u00ee\7@\2\2\u00ee\u00ef\5\34\17"+
"\2\u00ef\'\3\2\2\2\u00f0\u00f1\7\67\2\2\u00f1\u00f2\5\36\20\2\u00f2\u00f3"+
"\78\2\2\u00f3\u00f4\7@\2\2\u00f4\u00f5\5\34\17\2\u00f5)\3\2\2\2\u00f6"+
"\u00f7\5.\30\2\u00f7+\3\2\2\2\u00f8\u00fd\5*\26\2\u00f9\u00fa\7;\2\2\u00fa"+
"\u00fc\5*\26\2\u00fb\u00f9\3\2\2\2\u00fc\u00ff\3\2\2\2\u00fd\u00fb\3\2"+
"\2\2\u00fd\u00fe\3\2\2\2\u00fe-\3\2\2\2\u00ff\u00fd\3\2\2\2\u0100\u0109"+
"\5\60\31\2\u0101\u0103\7\65\2\2\u0102\u0104\5\32\16\2\u0103\u0102\3\2"+
"\2\2\u0103\u0104\3\2\2\2\u0104\u0105\3\2\2\2\u0105\u0106\7\66\2\2\u0106"+
"\u0107\7@\2\2\u0107\u0109\5.\30\2\u0108\u0100\3\2\2\2\u0108\u0101\3\2"+
"\2\2\u0109/\3\2\2\2\u010a\u0113\5\62\32\2\u010b\u010c\7\20\2\2\u010c\u010d"+
"\5*\26\2\u010d\u010e\7\21\2\2\u010e\u010f\5*\26\2\u010f\u0110\7\22\2\2"+
"\u0110\u0111\5\60\31\2\u0111\u0113\3\2\2\2\u0112\u010a\3\2\2\2\u0112\u010b"+
"\3\2\2\2\u0113\61\3\2\2\2\u0114\u0117\5\64\33\2\u0115\u0116\7\23\2\2\u0116"+
"\u0118\5\62\32\2\u0117\u0115\3\2\2\2\u0117\u0118\3\2\2\2\u0118\63\3\2"+
"\2\2\u0119\u011c\5\66\34\2\u011a\u011b\7\24\2\2\u011b\u011d\5\64\33\2"+
"\u011c\u011a\3\2\2\2\u011c\u011d\3\2\2\2\u011d\65\3\2\2\2\u011e\u0122"+
"\5<\37\2\u011f\u0122\58\35\2\u0120\u0122\5:\36\2\u0121\u011e\3\2\2\2\u0121"+
"\u011f\3\2\2\2\u0121\u0120\3\2\2\2\u0122\67\3\2\2\2\u0123\u0124\7\25\2"+
"\2\u0124\u0125\7\65\2\2\u0125\u0126\5\32\16\2\u0126\u0127\7\66\2\2\u0127"+
"\u0128\5\66\34\2\u01289\3\2\2\2\u0129\u012a\7\26\2\2\u012a\u012b\7\65"+
"\2\2\u012b\u012c\5\32\16\2\u012c\u012d\7\66\2\2\u012d\u012e\5\66\34\2"+
"\u012e;\3\2\2\2\u012f\u0134\5> \2\u0130\u0131\7\27\2\2\u0131\u0133\5>"+
" \2\u0132\u0130\3\2\2\2\u0133\u0136\3\2\2\2\u0134\u0132\3\2\2\2\u0134"+
"\u0135\3\2\2\2\u0135=\3\2\2\2\u0136\u0134\3\2\2\2\u0137\u013a\5@!\2\u0138"+
"\u0139\7\31\2\2\u0139\u013b\5> \2\u013a\u0138\3\2\2\2\u013a\u013b\3\2"+
"\2\2\u013b?\3\2\2\2\u013c\u0141\5B\"\2\u013d\u013e\7\30\2\2\u013e\u0140"+
"\5B\"\2\u013f\u013d\3\2\2\2\u0140\u0143\3\2\2\2\u0141\u013f\3\2\2\2\u0141"+
"\u0142\3\2\2\2\u0142A\3\2\2\2\u0143\u0141\3\2\2\2\u0144\u0148\5D#\2\u0145"+
"\u0146\7\32\2\2\u0146\u0148\5D#\2\u0147\u0144\3\2\2\2\u0147\u0145\3\2"+
"\2\2\u0148C\3\2\2\2\u0149\u014c\5F$\2\u014a\u014b\t\2\2\2\u014b\u014d"+
"\5F$\2\u014c\u014a\3\2\2\2\u014c\u014d\3\2\2\2\u014dE\3\2\2\2\u014e\u0151"+
"\5H%\2\u014f\u0150\t\3\2\2\u0150\u0152\5H%\2\u0151\u014f\3\2\2\2\u0151"+
"\u0152\3\2\2\2\u0152G\3\2\2\2\u0153\u0158\5J&\2\u0154\u0155\t\4\2\2\u0155"+
"\u0157\5J&\2\u0156\u0154\3\2\2\2\u0157\u015a\3\2\2\2\u0158\u0156\3\2\2"+
"\2\u0158\u0159\3\2\2\2\u0159I\3\2\2\2\u015a\u0158\3\2\2\2\u015b\u0160"+
"\5L\'\2\u015c\u015d\t\5\2\2\u015d\u015f\5L\'\2\u015e\u015c\3\2\2\2\u015f"+
"\u0162\3\2\2\2\u0160\u015e\3\2\2\2\u0160\u0161\3\2\2\2\u0161K\3\2\2\2"+
"\u0162\u0160\3\2\2\2\u0163\u0167\5N(\2\u0164\u0165\7\"\2\2\u0165\u0167"+
"\5L\'\2\u0166\u0163\3\2\2\2\u0166\u0164\3\2\2\2\u0167M\3\2\2\2\u0168\u016c"+
"\5X-\2\u0169\u016b\5P)\2\u016a\u0169\3\2\2\2\u016b\u016e\3\2\2\2\u016c"+
"\u016a\3\2\2\2\u016c\u016d\3\2\2\2\u016dO\3\2\2\2\u016e\u016c\3\2\2\2"+
"\u016f\u0173\5R*\2\u0170\u0173\5T+\2\u0171\u0173\5V,\2\u0172\u016f\3\2"+
"\2\2\u0172\u0170\3\2\2\2\u0172\u0171\3\2\2\2\u0173Q\3\2\2\2\u0174\u0176"+
"\7\65\2\2\u0175\u0177\5,\27\2\u0176\u0175\3\2\2\2\u0176\u0177\3\2\2\2"+
"\u0177\u0178\3\2\2\2\u0178\u0179\7\66\2\2\u0179S\3\2\2\2\u017a\u017c\7"+
"\67\2\2\u017b\u017d\5,\27\2\u017c\u017b\3\2\2\2\u017c\u017d\3\2\2\2\u017d"+
"\u017e\3\2\2\2\u017e\u017f\78\2\2\u017fU\3\2\2\2\u0180\u0181\7>\2\2\u0181"+
"W\3\2\2\2\u0182\u0189\5Z.\2\u0183\u0189\5\\/\2\u0184\u0189\5^\60\2\u0185"+
"\u0189\5`\61\2\u0186\u0189\5b\62\2\u0187\u0189\5d\63\2\u0188\u0182\3\2"+
"\2\2\u0188\u0183\3\2\2\2\u0188\u0184\3\2\2\2\u0188\u0185\3\2\2\2\u0188"+
"\u0186\3\2\2\2\u0188\u0187\3\2\2\2\u0189Y\3\2\2\2\u018a\u018b\7(\2\2\u018b"+
"[\3\2\2\2\u018c\u018d\7)\2\2\u018d]\3\2\2\2\u018e\u018f\7-\2\2\u018f_"+
"\3\2\2\2\u0190\u0191\7-\2\2\u0191\u0192\7\'\2\2\u0192\u0193\7-\2\2\u0193"+
"a\3\2\2\2\u0194\u0195\7\61\2\2\u0195c\3\2\2\2\u0196\u0197\7\65\2\2\u0197"+
"\u0198\5*\26\2\u0198\u0199\7\66\2\2\u0199e\3\2\2\2\u019a\u019e\5j\66\2"+
"\u019b\u019e\5l\67\2\u019c\u019e\5n8\2\u019d\u019a\3\2\2\2\u019d\u019b"+
"\3\2\2\2\u019d\u019c\3\2\2\2\u019eg\3\2\2\2\u019f\u01a4\5f\64\2\u01a0"+
"\u01a1\7=\2\2\u01a1\u01a3\5f\64\2\u01a2\u01a0\3\2\2\2\u01a3\u01a6\3\2"+
"\2\2\u01a4\u01a2\3\2\2\2\u01a4\u01a5\3\2\2\2\u01a5i\3\2\2\2\u01a6\u01a4"+
"\3\2\2\2\u01a7\u01a8\7\61\2\2\u01a8\u01a9\7*\2\2\u01a9\u01aa\5*\26\2\u01aa"+
"k\3\2\2\2\u01ab\u01ac\7+\2\2\u01ac\u01ad\7\61\2\2\u01adm\3\2\2\2\u01ae"+
"\u01af\7,\2\2\u01af\u01b0\5*\26\2\u01b0o\3\2\2\2)tw~\u0080\u0089\u008f"+
"\u009f\u00a2\u00a9\u00b1\u00b3\u00c4\u00c7\u00d2\u00da\u00e1\u00fd\u0103"+
"\u0108\u0112\u0117\u011c\u0121\u0134\u013a\u0141\u0147\u014c\u0151\u0158"+
"\u0160\u0166\u016c\u0172\u0176\u017c\u0188\u019d\u01a4";
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);
}
}
}