com.sri.ai.praise.model.v0.rules.antlr.RuleParser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aic-praise Show documentation
Show all versions of aic-praise Show documentation
SRI International's AIC PRAiSE (Probabilistic Reasoning As Symbolic Evaluation) Library (for Java 1.8+)
// Generated from com\sri\ai\praise\model\v0\rules\antlr\Rule.g4 by ANTLR 4.5.1
package com.sri.ai.praise.model.v0.rules.antlr;
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 RuleParser extends Parser {
static { RuntimeMetaData.checkVersion("4.5.1", RuntimeMetaData.VERSION); }
protected static final DFA[] _decisionToDFA;
protected static final PredictionContextCache _sharedContextCache =
new PredictionContextCache();
public static final int
NOT=1, AND=2, OR=3, FOR=4, ALL=5, THERE=6, EXISTS=7, IF=8, THEN=9, ELSE=10,
SORT=11, UNKNOWN=12, RANDOM=13, MAY=14, BE=15, SAME=16, AS=17, P=18, X=19,
IMPLICATION=20, BICONDITIONAL=21, EXPONENTIATION=22, DIVIDE=23, TIMES=24,
PLUS=25, SUBTRACT=26, EQUAL=27, NOT_EQUAL=28, OPEN_PAREN=29, CLOSE_PAREN=30,
COLON=31, COLON_DASH=32, SEMICOLON=33, SINGLE_ARROW=34, VERT_BAR=35, COMMA=36,
UNDERSCORE=37, PERIOD=38, INTEGER=39, RATIONAL=40, CONSTANT=41, QUOTED_CONSTANT=42,
VARIABLE=43, COMMENT=44, LINE_COMMENT=45, WS=46;
public static final int
RULE_model = 0, RULE_aformula = 1, RULE_model_element = 2, RULE_sort_decl = 3,
RULE_propositional_random_variable_decl = 4, RULE_relational_random_variable_decl = 5,
RULE_root_atomic_rule = 6, RULE_atomic_rule = 7, RULE_prolog_rule = 8,
RULE_root_probability_notation_rule = 9, RULE_probability_notation_rule = 10,
RULE_root_causal_effect_rule = 11, RULE_causal_effect_rule = 12, RULE_root_conditional_rule = 13,
RULE_conditional_rule = 14, RULE_conditional_branch = 15, RULE_root_conjunction_of_rules = 16,
RULE_conjunction_of_rules = 17, RULE_initial_conj_sub_rule = 18, RULE_an_initial_conj_sub_rule = 19,
RULE_conj_sub_rule = 20, RULE_a_conj_sub_rule = 21, RULE_sub_rule = 22,
RULE_a_sub_rule = 23, RULE_complete_atomic_rule = 24, RULE_formula = 25,
RULE_potential = 26, RULE_atomic_potential = 27, RULE_symbol = 28;
public static final String[] ruleNames = {
"model", "aformula", "model_element", "sort_decl", "propositional_random_variable_decl",
"relational_random_variable_decl", "root_atomic_rule", "atomic_rule",
"prolog_rule", "root_probability_notation_rule", "probability_notation_rule",
"root_causal_effect_rule", "causal_effect_rule", "root_conditional_rule",
"conditional_rule", "conditional_branch", "root_conjunction_of_rules",
"conjunction_of_rules", "initial_conj_sub_rule", "an_initial_conj_sub_rule",
"conj_sub_rule", "a_conj_sub_rule", "sub_rule", "a_sub_rule", "complete_atomic_rule",
"formula", "potential", "atomic_potential", "symbol"
};
private static final String[] _LITERAL_NAMES = {
null, "'not'", "'and'", "'or'", "'for'", "'all'", "'there'", "'exists'",
"'if'", "'then'", "'else'", "'sort'", "'Unknown'", "'random'", "'may'",
"'be'", "'same'", "'as'", "'P'", "'x'", "'=>'", "'<=>'", "'^'", "'/'",
"'*'", "'+'", "'-'", "'='", "'!='", "'('", "')'", "':'", "':-'", "';'",
"'->'", "'|'", "','", "'_'", "'.'"
};
private static final String[] _SYMBOLIC_NAMES = {
null, "NOT", "AND", "OR", "FOR", "ALL", "THERE", "EXISTS", "IF", "THEN",
"ELSE", "SORT", "UNKNOWN", "RANDOM", "MAY", "BE", "SAME", "AS", "P", "X",
"IMPLICATION", "BICONDITIONAL", "EXPONENTIATION", "DIVIDE", "TIMES", "PLUS",
"SUBTRACT", "EQUAL", "NOT_EQUAL", "OPEN_PAREN", "CLOSE_PAREN", "COLON",
"COLON_DASH", "SEMICOLON", "SINGLE_ARROW", "VERT_BAR", "COMMA", "UNDERSCORE",
"PERIOD", "INTEGER", "RATIONAL", "CONSTANT", "QUOTED_CONSTANT", "VARIABLE",
"COMMENT", "LINE_COMMENT", "WS"
};
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 "Rule.g4"; }
@Override
public String[] getRuleNames() { return ruleNames; }
@Override
public String getSerializedATN() { return _serializedATN; }
@Override
public ATN getATN() { return _ATN; }
public RuleParser(TokenStream input) {
super(input);
_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
public static class ModelContext extends ParserRuleContext {
public Model_elementContext model_element;
public List elements = new ArrayList();
public TerminalNode EOF() { return getToken(RuleParser.EOF, 0); }
public List model_element() {
return getRuleContexts(Model_elementContext.class);
}
public Model_elementContext model_element(int i) {
return getRuleContext(Model_elementContext.class,i);
}
public ModelContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_model; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitModel(this);
else return visitor.visitChildren(this);
}
}
public final ModelContext model() throws RecognitionException {
ModelContext _localctx = new ModelContext(_ctx, getState());
enterRule(_localctx, 0, RULE_model);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(61);
_errHandler.sync(this);
_la = _input.LA(1);
while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NOT) | (1L << FOR) | (1L << THERE) | (1L << IF) | (1L << SORT) | (1L << RANDOM) | (1L << P) | (1L << X) | (1L << OPEN_PAREN) | (1L << INTEGER) | (1L << RATIONAL) | (1L << CONSTANT) | (1L << QUOTED_CONSTANT) | (1L << VARIABLE))) != 0)) {
{
{
setState(58);
((ModelContext)_localctx).model_element = model_element();
((ModelContext)_localctx).elements.add(((ModelContext)_localctx).model_element);
}
}
setState(63);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(64);
match(EOF);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class AformulaContext extends ParserRuleContext {
public FormulaContext formula() {
return getRuleContext(FormulaContext.class,0);
}
public TerminalNode EOF() { return getToken(RuleParser.EOF, 0); }
public AformulaContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_aformula; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitAformula(this);
else return visitor.visitChildren(this);
}
}
public final AformulaContext aformula() throws RecognitionException {
AformulaContext _localctx = new AformulaContext(_ctx, getState());
enterRule(_localctx, 2, RULE_aformula);
try {
enterOuterAlt(_localctx, 1);
{
setState(66);
formula(0);
setState(67);
match(EOF);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Model_elementContext extends ParserRuleContext {
public Sort_declContext sort_decl() {
return getRuleContext(Sort_declContext.class,0);
}
public Propositional_random_variable_declContext propositional_random_variable_decl() {
return getRuleContext(Propositional_random_variable_declContext.class,0);
}
public Relational_random_variable_declContext relational_random_variable_decl() {
return getRuleContext(Relational_random_variable_declContext.class,0);
}
public Root_atomic_ruleContext root_atomic_rule() {
return getRuleContext(Root_atomic_ruleContext.class,0);
}
public Prolog_ruleContext prolog_rule() {
return getRuleContext(Prolog_ruleContext.class,0);
}
public Root_probability_notation_ruleContext root_probability_notation_rule() {
return getRuleContext(Root_probability_notation_ruleContext.class,0);
}
public Root_causal_effect_ruleContext root_causal_effect_rule() {
return getRuleContext(Root_causal_effect_ruleContext.class,0);
}
public Root_conditional_ruleContext root_conditional_rule() {
return getRuleContext(Root_conditional_ruleContext.class,0);
}
public Root_conjunction_of_rulesContext root_conjunction_of_rules() {
return getRuleContext(Root_conjunction_of_rulesContext.class,0);
}
public Model_elementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_model_element; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitModel_element(this);
else return visitor.visitChildren(this);
}
}
public final Model_elementContext model_element() throws RecognitionException {
Model_elementContext _localctx = new Model_elementContext(_ctx, getState());
enterRule(_localctx, 4, RULE_model_element);
try {
setState(78);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,1,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(69);
sort_decl();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(70);
propositional_random_variable_decl();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(71);
relational_random_variable_decl();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(72);
root_atomic_rule();
}
break;
case 5:
enterOuterAlt(_localctx, 5);
{
setState(73);
prolog_rule();
}
break;
case 6:
enterOuterAlt(_localctx, 6);
{
setState(74);
root_probability_notation_rule();
}
break;
case 7:
enterOuterAlt(_localctx, 7);
{
setState(75);
root_causal_effect_rule();
}
break;
case 8:
enterOuterAlt(_localctx, 8);
{
setState(76);
root_conditional_rule();
}
break;
case 9:
enterOuterAlt(_localctx, 9);
{
setState(77);
root_conjunction_of_rules();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Sort_declContext extends ParserRuleContext {
public SymbolContext name;
public Token size;
public Token CONSTANT;
public List constants = new ArrayList();
public TerminalNode SORT() { return getToken(RuleParser.SORT, 0); }
public SymbolContext symbol() {
return getRuleContext(SymbolContext.class,0);
}
public TerminalNode INTEGER() { return getToken(RuleParser.INTEGER, 0); }
public TerminalNode UNKNOWN() { return getToken(RuleParser.UNKNOWN, 0); }
public List CONSTANT() { return getTokens(RuleParser.CONSTANT); }
public TerminalNode CONSTANT(int i) {
return getToken(RuleParser.CONSTANT, i);
}
public Sort_declContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_sort_decl; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitSort_decl(this);
else return visitor.visitChildren(this);
}
}
public final Sort_declContext sort_decl() throws RecognitionException {
Sort_declContext _localctx = new Sort_declContext(_ctx, getState());
enterRule(_localctx, 6, RULE_sort_decl);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(80);
match(SORT);
setState(81);
((Sort_declContext)_localctx).name = symbol();
setState(91);
_la = _input.LA(1);
if (_la==COLON) {
{
setState(82);
match(COLON);
setState(83);
((Sort_declContext)_localctx).size = _input.LT(1);
_la = _input.LA(1);
if ( !(_la==UNKNOWN || _la==INTEGER) ) {
((Sort_declContext)_localctx).size = (Token)_errHandler.recoverInline(this);
} else {
consume();
}
setState(88);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==COMMA) {
{
{
setState(84);
match(COMMA);
setState(85);
((Sort_declContext)_localctx).CONSTANT = match(CONSTANT);
((Sort_declContext)_localctx).constants.add(((Sort_declContext)_localctx).CONSTANT);
}
}
setState(90);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
}
setState(93);
match(SEMICOLON);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Propositional_random_variable_declContext extends ParserRuleContext {
public SymbolContext name;
public SymbolContext range;
public TerminalNode RANDOM() { return getToken(RuleParser.RANDOM, 0); }
public List symbol() {
return getRuleContexts(SymbolContext.class);
}
public SymbolContext symbol(int i) {
return getRuleContext(SymbolContext.class,i);
}
public Propositional_random_variable_declContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_propositional_random_variable_decl; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitPropositional_random_variable_decl(this);
else return visitor.visitChildren(this);
}
}
public final Propositional_random_variable_declContext propositional_random_variable_decl() throws RecognitionException {
Propositional_random_variable_declContext _localctx = new Propositional_random_variable_declContext(_ctx, getState());
enterRule(_localctx, 8, RULE_propositional_random_variable_decl);
try {
enterOuterAlt(_localctx, 1);
{
setState(95);
match(RANDOM);
setState(96);
((Propositional_random_variable_declContext)_localctx).name = symbol();
setState(97);
match(COLON);
setState(98);
((Propositional_random_variable_declContext)_localctx).range = symbol();
setState(99);
match(SEMICOLON);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Relational_random_variable_declContext extends ParserRuleContext {
public SymbolContext name;
public SymbolContext symbol;
public List parameters = new ArrayList();
public SymbolContext range;
public TerminalNode RANDOM() { return getToken(RuleParser.RANDOM, 0); }
public List symbol() {
return getRuleContexts(SymbolContext.class);
}
public SymbolContext symbol(int i) {
return getRuleContext(SymbolContext.class,i);
}
public List X() { return getTokens(RuleParser.X); }
public TerminalNode X(int i) {
return getToken(RuleParser.X, i);
}
public Relational_random_variable_declContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_relational_random_variable_decl; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitRelational_random_variable_decl(this);
else return visitor.visitChildren(this);
}
}
public final Relational_random_variable_declContext relational_random_variable_decl() throws RecognitionException {
Relational_random_variable_declContext _localctx = new Relational_random_variable_declContext(_ctx, getState());
enterRule(_localctx, 10, RULE_relational_random_variable_decl);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(101);
match(RANDOM);
setState(102);
((Relational_random_variable_declContext)_localctx).name = symbol();
setState(103);
match(COLON);
setState(104);
((Relational_random_variable_declContext)_localctx).symbol = symbol();
((Relational_random_variable_declContext)_localctx).parameters.add(((Relational_random_variable_declContext)_localctx).symbol);
setState(109);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==X) {
{
{
setState(105);
match(X);
setState(106);
((Relational_random_variable_declContext)_localctx).symbol = symbol();
((Relational_random_variable_declContext)_localctx).parameters.add(((Relational_random_variable_declContext)_localctx).symbol);
}
}
setState(111);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(112);
match(SINGLE_ARROW);
setState(113);
((Relational_random_variable_declContext)_localctx).range = symbol();
setState(114);
match(SEMICOLON);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Root_atomic_ruleContext extends ParserRuleContext {
public Atomic_ruleContext atomic_rule() {
return getRuleContext(Atomic_ruleContext.class,0);
}
public Root_atomic_ruleContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_root_atomic_rule; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitRoot_atomic_rule(this);
else return visitor.visitChildren(this);
}
}
public final Root_atomic_ruleContext root_atomic_rule() throws RecognitionException {
Root_atomic_ruleContext _localctx = new Root_atomic_ruleContext(_ctx, getState());
enterRule(_localctx, 12, RULE_root_atomic_rule);
try {
enterOuterAlt(_localctx, 1);
{
setState(116);
atomic_rule();
setState(117);
match(SEMICOLON);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Atomic_ruleContext extends ParserRuleContext {
public FormulaContext a;
public PotentialContext p;
public FormulaContext formula() {
return getRuleContext(FormulaContext.class,0);
}
public PotentialContext potential() {
return getRuleContext(PotentialContext.class,0);
}
public Atomic_ruleContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_atomic_rule; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitAtomic_rule(this);
else return visitor.visitChildren(this);
}
}
public final Atomic_ruleContext atomic_rule() throws RecognitionException {
Atomic_ruleContext _localctx = new Atomic_ruleContext(_ctx, getState());
enterRule(_localctx, 14, RULE_atomic_rule);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(119);
((Atomic_ruleContext)_localctx).a = formula(0);
setState(121);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << OPEN_PAREN) | (1L << INTEGER) | (1L << RATIONAL))) != 0)) {
{
setState(120);
((Atomic_ruleContext)_localctx).p = potential(0);
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Prolog_ruleContext extends ParserRuleContext {
public PotentialContext p;
public FormulaContext head;
public FormulaContext rhs;
public List formula() {
return getRuleContexts(FormulaContext.class);
}
public FormulaContext formula(int i) {
return getRuleContext(FormulaContext.class,i);
}
public PotentialContext potential() {
return getRuleContext(PotentialContext.class,0);
}
public Prolog_ruleContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_prolog_rule; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitProlog_rule(this);
else return visitor.visitChildren(this);
}
}
public final Prolog_ruleContext prolog_rule() throws RecognitionException {
Prolog_ruleContext _localctx = new Prolog_ruleContext(_ctx, getState());
enterRule(_localctx, 16, RULE_prolog_rule);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(124);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,6,_ctx) ) {
case 1:
{
setState(123);
((Prolog_ruleContext)_localctx).p = potential(0);
}
break;
}
setState(126);
((Prolog_ruleContext)_localctx).head = formula(0);
setState(129);
_la = _input.LA(1);
if (_la==COLON_DASH) {
{
setState(127);
match(COLON_DASH);
setState(128);
((Prolog_ruleContext)_localctx).rhs = formula(0);
}
}
setState(131);
match(PERIOD);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Root_probability_notation_ruleContext extends ParserRuleContext {
public Probability_notation_ruleContext probability_notation_rule() {
return getRuleContext(Probability_notation_ruleContext.class,0);
}
public Root_probability_notation_ruleContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_root_probability_notation_rule; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitRoot_probability_notation_rule(this);
else return visitor.visitChildren(this);
}
}
public final Root_probability_notation_ruleContext root_probability_notation_rule() throws RecognitionException {
Root_probability_notation_ruleContext _localctx = new Root_probability_notation_ruleContext(_ctx, getState());
enterRule(_localctx, 18, RULE_root_probability_notation_rule);
try {
enterOuterAlt(_localctx, 1);
{
setState(133);
probability_notation_rule();
setState(134);
match(SEMICOLON);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Probability_notation_ruleContext extends ParserRuleContext {
public FormulaContext formula1;
public FormulaContext formula2;
public PotentialContext p;
public TerminalNode P() { return getToken(RuleParser.P, 0); }
public List formula() {
return getRuleContexts(FormulaContext.class);
}
public FormulaContext formula(int i) {
return getRuleContext(FormulaContext.class,i);
}
public PotentialContext potential() {
return getRuleContext(PotentialContext.class,0);
}
public Probability_notation_ruleContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_probability_notation_rule; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitProbability_notation_rule(this);
else return visitor.visitChildren(this);
}
}
public final Probability_notation_ruleContext probability_notation_rule() throws RecognitionException {
Probability_notation_ruleContext _localctx = new Probability_notation_ruleContext(_ctx, getState());
enterRule(_localctx, 20, RULE_probability_notation_rule);
try {
enterOuterAlt(_localctx, 1);
{
setState(136);
match(P);
setState(137);
match(OPEN_PAREN);
setState(138);
((Probability_notation_ruleContext)_localctx).formula1 = formula(0);
setState(139);
match(VERT_BAR);
setState(140);
((Probability_notation_ruleContext)_localctx).formula2 = formula(0);
setState(141);
match(CLOSE_PAREN);
setState(142);
match(EQUAL);
setState(143);
((Probability_notation_ruleContext)_localctx).p = potential(0);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Root_causal_effect_ruleContext extends ParserRuleContext {
public Causal_effect_ruleContext causal_effect_rule() {
return getRuleContext(Causal_effect_ruleContext.class,0);
}
public Root_causal_effect_ruleContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_root_causal_effect_rule; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitRoot_causal_effect_rule(this);
else return visitor.visitChildren(this);
}
}
public final Root_causal_effect_ruleContext root_causal_effect_rule() throws RecognitionException {
Root_causal_effect_ruleContext _localctx = new Root_causal_effect_ruleContext(_ctx, getState());
enterRule(_localctx, 22, RULE_root_causal_effect_rule);
try {
enterOuterAlt(_localctx, 1);
{
setState(145);
causal_effect_rule();
setState(146);
match(SEMICOLON);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Causal_effect_ruleContext extends ParserRuleContext {
public FormulaContext cause;
public Sub_ruleContext effect;
public FormulaContext formula() {
return getRuleContext(FormulaContext.class,0);
}
public Sub_ruleContext sub_rule() {
return getRuleContext(Sub_ruleContext.class,0);
}
public Causal_effect_ruleContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_causal_effect_rule; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitCausal_effect_rule(this);
else return visitor.visitChildren(this);
}
}
public final Causal_effect_ruleContext causal_effect_rule() throws RecognitionException {
Causal_effect_ruleContext _localctx = new Causal_effect_ruleContext(_ctx, getState());
enterRule(_localctx, 24, RULE_causal_effect_rule);
try {
enterOuterAlt(_localctx, 1);
{
setState(148);
((Causal_effect_ruleContext)_localctx).cause = formula(0);
setState(149);
match(SINGLE_ARROW);
setState(150);
((Causal_effect_ruleContext)_localctx).effect = sub_rule();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Root_conditional_ruleContext extends ParserRuleContext {
public Conditional_ruleContext conditional_rule() {
return getRuleContext(Conditional_ruleContext.class,0);
}
public Root_conditional_ruleContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_root_conditional_rule; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitRoot_conditional_rule(this);
else return visitor.visitChildren(this);
}
}
public final Root_conditional_ruleContext root_conditional_rule() throws RecognitionException {
Root_conditional_ruleContext _localctx = new Root_conditional_ruleContext(_ctx, getState());
enterRule(_localctx, 26, RULE_root_conditional_rule);
try {
enterOuterAlt(_localctx, 1);
{
setState(152);
conditional_rule();
setState(153);
match(SEMICOLON);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Conditional_ruleContext extends ParserRuleContext {
public FormulaContext condition;
public Conditional_branchContext thenrule;
public Conditional_branchContext elserule;
public TerminalNode IF() { return getToken(RuleParser.IF, 0); }
public TerminalNode THEN() { return getToken(RuleParser.THEN, 0); }
public FormulaContext formula() {
return getRuleContext(FormulaContext.class,0);
}
public List conditional_branch() {
return getRuleContexts(Conditional_branchContext.class);
}
public Conditional_branchContext conditional_branch(int i) {
return getRuleContext(Conditional_branchContext.class,i);
}
public TerminalNode ELSE() { return getToken(RuleParser.ELSE, 0); }
public Conditional_ruleContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_conditional_rule; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitConditional_rule(this);
else return visitor.visitChildren(this);
}
}
public final Conditional_ruleContext conditional_rule() throws RecognitionException {
Conditional_ruleContext _localctx = new Conditional_ruleContext(_ctx, getState());
enterRule(_localctx, 28, RULE_conditional_rule);
try {
enterOuterAlt(_localctx, 1);
{
setState(155);
match(IF);
setState(156);
((Conditional_ruleContext)_localctx).condition = formula(0);
setState(157);
match(THEN);
setState(158);
((Conditional_ruleContext)_localctx).thenrule = conditional_branch();
setState(161);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,8,_ctx) ) {
case 1:
{
setState(159);
match(ELSE);
setState(160);
((Conditional_ruleContext)_localctx).elserule = conditional_branch();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Conditional_branchContext extends ParserRuleContext {
public Sub_ruleContext sub_rule() {
return getRuleContext(Sub_ruleContext.class,0);
}
public PotentialContext potential() {
return getRuleContext(PotentialContext.class,0);
}
public Conditional_branchContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_conditional_branch; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitConditional_branch(this);
else return visitor.visitChildren(this);
}
}
public final Conditional_branchContext conditional_branch() throws RecognitionException {
Conditional_branchContext _localctx = new Conditional_branchContext(_ctx, getState());
enterRule(_localctx, 30, RULE_conditional_branch);
try {
setState(165);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,9,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(163);
sub_rule();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(164);
potential(0);
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Root_conjunction_of_rulesContext extends ParserRuleContext {
public Conjunction_of_rulesContext conjunction_of_rules() {
return getRuleContext(Conjunction_of_rulesContext.class,0);
}
public Root_conjunction_of_rulesContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_root_conjunction_of_rules; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitRoot_conjunction_of_rules(this);
else return visitor.visitChildren(this);
}
}
public final Root_conjunction_of_rulesContext root_conjunction_of_rules() throws RecognitionException {
Root_conjunction_of_rulesContext _localctx = new Root_conjunction_of_rulesContext(_ctx, getState());
enterRule(_localctx, 32, RULE_root_conjunction_of_rules);
try {
enterOuterAlt(_localctx, 1);
{
setState(167);
conjunction_of_rules();
setState(168);
match(SEMICOLON);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Conjunction_of_rulesContext extends ParserRuleContext {
public Initial_conj_sub_ruleContext initialrule;
public Conj_sub_ruleContext conj_sub_rule;
public List subsequentrules = new ArrayList();
public List AND() { return getTokens(RuleParser.AND); }
public TerminalNode AND(int i) {
return getToken(RuleParser.AND, i);
}
public Initial_conj_sub_ruleContext initial_conj_sub_rule() {
return getRuleContext(Initial_conj_sub_ruleContext.class,0);
}
public List conj_sub_rule() {
return getRuleContexts(Conj_sub_ruleContext.class);
}
public Conj_sub_ruleContext conj_sub_rule(int i) {
return getRuleContext(Conj_sub_ruleContext.class,i);
}
public Conjunction_of_rulesContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_conjunction_of_rules; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitConjunction_of_rules(this);
else return visitor.visitChildren(this);
}
}
public final Conjunction_of_rulesContext conjunction_of_rules() throws RecognitionException {
Conjunction_of_rulesContext _localctx = new Conjunction_of_rulesContext(_ctx, getState());
enterRule(_localctx, 34, RULE_conjunction_of_rules);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(170);
((Conjunction_of_rulesContext)_localctx).initialrule = initial_conj_sub_rule();
setState(171);
match(AND);
setState(172);
((Conjunction_of_rulesContext)_localctx).conj_sub_rule = conj_sub_rule();
((Conjunction_of_rulesContext)_localctx).subsequentrules.add(((Conjunction_of_rulesContext)_localctx).conj_sub_rule);
setState(177);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,10,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(173);
match(AND);
setState(174);
((Conjunction_of_rulesContext)_localctx).conj_sub_rule = conj_sub_rule();
((Conjunction_of_rulesContext)_localctx).subsequentrules.add(((Conjunction_of_rulesContext)_localctx).conj_sub_rule);
}
}
}
setState(179);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,10,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Initial_conj_sub_ruleContext extends ParserRuleContext {
public An_initial_conj_sub_ruleContext an_initial_conj_sub_rule() {
return getRuleContext(An_initial_conj_sub_ruleContext.class,0);
}
public Initial_conj_sub_ruleContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_initial_conj_sub_rule; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitInitial_conj_sub_rule(this);
else return visitor.visitChildren(this);
}
}
public final Initial_conj_sub_ruleContext initial_conj_sub_rule() throws RecognitionException {
Initial_conj_sub_ruleContext _localctx = new Initial_conj_sub_ruleContext(_ctx, getState());
enterRule(_localctx, 36, RULE_initial_conj_sub_rule);
try {
setState(185);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,11,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(180);
match(OPEN_PAREN);
setState(181);
an_initial_conj_sub_rule();
setState(182);
match(CLOSE_PAREN);
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(184);
an_initial_conj_sub_rule();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class An_initial_conj_sub_ruleContext extends ParserRuleContext {
public Complete_atomic_ruleContext complete_atomic_rule() {
return getRuleContext(Complete_atomic_ruleContext.class,0);
}
public Prolog_ruleContext prolog_rule() {
return getRuleContext(Prolog_ruleContext.class,0);
}
public Probability_notation_ruleContext probability_notation_rule() {
return getRuleContext(Probability_notation_ruleContext.class,0);
}
public Causal_effect_ruleContext causal_effect_rule() {
return getRuleContext(Causal_effect_ruleContext.class,0);
}
public Conditional_ruleContext conditional_rule() {
return getRuleContext(Conditional_ruleContext.class,0);
}
public An_initial_conj_sub_ruleContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_an_initial_conj_sub_rule; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitAn_initial_conj_sub_rule(this);
else return visitor.visitChildren(this);
}
}
public final An_initial_conj_sub_ruleContext an_initial_conj_sub_rule() throws RecognitionException {
An_initial_conj_sub_ruleContext _localctx = new An_initial_conj_sub_ruleContext(_ctx, getState());
enterRule(_localctx, 38, RULE_an_initial_conj_sub_rule);
try {
setState(192);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,12,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(187);
complete_atomic_rule();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(188);
prolog_rule();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(189);
probability_notation_rule();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(190);
causal_effect_rule();
}
break;
case 5:
enterOuterAlt(_localctx, 5);
{
setState(191);
conditional_rule();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Conj_sub_ruleContext extends ParserRuleContext {
public A_conj_sub_ruleContext a_conj_sub_rule() {
return getRuleContext(A_conj_sub_ruleContext.class,0);
}
public Conj_sub_ruleContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_conj_sub_rule; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitConj_sub_rule(this);
else return visitor.visitChildren(this);
}
}
public final Conj_sub_ruleContext conj_sub_rule() throws RecognitionException {
Conj_sub_ruleContext _localctx = new Conj_sub_ruleContext(_ctx, getState());
enterRule(_localctx, 40, RULE_conj_sub_rule);
try {
setState(199);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,13,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(194);
match(OPEN_PAREN);
setState(195);
a_conj_sub_rule();
setState(196);
match(CLOSE_PAREN);
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(198);
a_conj_sub_rule();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class A_conj_sub_ruleContext extends ParserRuleContext {
public Atomic_ruleContext atomic_rule() {
return getRuleContext(Atomic_ruleContext.class,0);
}
public Prolog_ruleContext prolog_rule() {
return getRuleContext(Prolog_ruleContext.class,0);
}
public Probability_notation_ruleContext probability_notation_rule() {
return getRuleContext(Probability_notation_ruleContext.class,0);
}
public Causal_effect_ruleContext causal_effect_rule() {
return getRuleContext(Causal_effect_ruleContext.class,0);
}
public Conditional_ruleContext conditional_rule() {
return getRuleContext(Conditional_ruleContext.class,0);
}
public A_conj_sub_ruleContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_a_conj_sub_rule; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitA_conj_sub_rule(this);
else return visitor.visitChildren(this);
}
}
public final A_conj_sub_ruleContext a_conj_sub_rule() throws RecognitionException {
A_conj_sub_ruleContext _localctx = new A_conj_sub_ruleContext(_ctx, getState());
enterRule(_localctx, 42, RULE_a_conj_sub_rule);
try {
setState(206);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,14,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(201);
atomic_rule();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(202);
prolog_rule();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(203);
probability_notation_rule();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(204);
causal_effect_rule();
}
break;
case 5:
enterOuterAlt(_localctx, 5);
{
setState(205);
conditional_rule();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Sub_ruleContext extends ParserRuleContext {
public A_sub_ruleContext a_sub_rule() {
return getRuleContext(A_sub_ruleContext.class,0);
}
public Sub_ruleContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_sub_rule; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitSub_rule(this);
else return visitor.visitChildren(this);
}
}
public final Sub_ruleContext sub_rule() throws RecognitionException {
Sub_ruleContext _localctx = new Sub_ruleContext(_ctx, getState());
enterRule(_localctx, 44, RULE_sub_rule);
try {
setState(213);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,15,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(208);
match(OPEN_PAREN);
setState(209);
a_sub_rule();
setState(210);
match(CLOSE_PAREN);
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(212);
a_sub_rule();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class A_sub_ruleContext extends ParserRuleContext {
public Conditional_ruleContext conditional_rule() {
return getRuleContext(Conditional_ruleContext.class,0);
}
public Conjunction_of_rulesContext conjunction_of_rules() {
return getRuleContext(Conjunction_of_rulesContext.class,0);
}
public Atomic_ruleContext atomic_rule() {
return getRuleContext(Atomic_ruleContext.class,0);
}
public Prolog_ruleContext prolog_rule() {
return getRuleContext(Prolog_ruleContext.class,0);
}
public Probability_notation_ruleContext probability_notation_rule() {
return getRuleContext(Probability_notation_ruleContext.class,0);
}
public Causal_effect_ruleContext causal_effect_rule() {
return getRuleContext(Causal_effect_ruleContext.class,0);
}
public A_sub_ruleContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_a_sub_rule; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitA_sub_rule(this);
else return visitor.visitChildren(this);
}
}
public final A_sub_ruleContext a_sub_rule() throws RecognitionException {
A_sub_ruleContext _localctx = new A_sub_ruleContext(_ctx, getState());
enterRule(_localctx, 46, RULE_a_sub_rule);
try {
setState(221);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,16,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(215);
conditional_rule();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(216);
conjunction_of_rules();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(217);
atomic_rule();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(218);
prolog_rule();
}
break;
case 5:
enterOuterAlt(_localctx, 5);
{
setState(219);
probability_notation_rule();
}
break;
case 6:
enterOuterAlt(_localctx, 6);
{
setState(220);
causal_effect_rule();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Complete_atomic_ruleContext extends ParserRuleContext {
public FormulaContext a;
public PotentialContext p;
public FormulaContext formula() {
return getRuleContext(FormulaContext.class,0);
}
public PotentialContext potential() {
return getRuleContext(PotentialContext.class,0);
}
public Complete_atomic_ruleContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_complete_atomic_rule; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitComplete_atomic_rule(this);
else return visitor.visitChildren(this);
}
}
public final Complete_atomic_ruleContext complete_atomic_rule() throws RecognitionException {
Complete_atomic_ruleContext _localctx = new Complete_atomic_ruleContext(_ctx, getState());
enterRule(_localctx, 48, RULE_complete_atomic_rule);
try {
enterOuterAlt(_localctx, 1);
{
setState(223);
((Complete_atomic_ruleContext)_localctx).a = formula(0);
setState(224);
((Complete_atomic_ruleContext)_localctx).p = potential(0);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class FormulaContext extends ParserRuleContext {
public FormulaContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_formula; }
public FormulaContext() { }
public void copyFrom(FormulaContext ctx) {
super.copyFrom(ctx);
}
}
public static class FormulaForAllContext extends FormulaContext {
public FormulaContext index;
public FormulaContext body;
public TerminalNode FOR() { return getToken(RuleParser.FOR, 0); }
public TerminalNode ALL() { return getToken(RuleParser.ALL, 0); }
public List formula() {
return getRuleContexts(FormulaContext.class);
}
public FormulaContext formula(int i) {
return getRuleContext(FormulaContext.class,i);
}
public FormulaForAllContext(FormulaContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitFormulaForAll(this);
else return visitor.visitChildren(this);
}
}
public static class FormulaFunctionApplicationContext extends FormulaContext {
public SymbolContext functor;
public FormulaContext formula;
public List args = new ArrayList();
public SymbolContext symbol() {
return getRuleContext(SymbolContext.class,0);
}
public List formula() {
return getRuleContexts(FormulaContext.class);
}
public FormulaContext formula(int i) {
return getRuleContext(FormulaContext.class,i);
}
public FormulaFunctionApplicationContext(FormulaContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitFormulaFunctionApplication(this);
else return visitor.visitChildren(this);
}
}
public static class FormulaWithParenthesesContext extends FormulaContext {
public FormulaContext formula() {
return getRuleContext(FormulaContext.class,0);
}
public FormulaWithParenthesesContext(FormulaContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitFormulaWithParentheses(this);
else return visitor.visitChildren(this);
}
}
public static class FormulaComparisonContext extends FormulaContext {
public FormulaContext leftop;
public Token op;
public FormulaContext rightop;
public List formula() {
return getRuleContexts(FormulaContext.class);
}
public FormulaContext formula(int i) {
return getRuleContext(FormulaContext.class,i);
}
public FormulaComparisonContext(FormulaContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitFormulaComparison(this);
else return visitor.visitChildren(this);
}
}
public static class FormulaSymbolContext extends FormulaContext {
public SymbolContext symbol() {
return getRuleContext(SymbolContext.class,0);
}
public FormulaSymbolContext(FormulaContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitFormulaSymbol(this);
else return visitor.visitChildren(this);
}
}
public static class FormulaImplicationContext extends FormulaContext {
public FormulaContext antecedent;
public FormulaContext consequent;
public TerminalNode IMPLICATION() { return getToken(RuleParser.IMPLICATION, 0); }
public List formula() {
return getRuleContexts(FormulaContext.class);
}
public FormulaContext formula(int i) {
return getRuleContext(FormulaContext.class,i);
}
public FormulaImplicationContext(FormulaContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitFormulaImplication(this);
else return visitor.visitChildren(this);
}
}
public static class FormulaBiconditionalContext extends FormulaContext {
public FormulaContext leftop;
public FormulaContext rightop;
public TerminalNode BICONDITIONAL() { return getToken(RuleParser.BICONDITIONAL, 0); }
public List formula() {
return getRuleContexts(FormulaContext.class);
}
public FormulaContext formula(int i) {
return getRuleContext(FormulaContext.class,i);
}
public FormulaBiconditionalContext(FormulaContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitFormulaBiconditional(this);
else return visitor.visitChildren(this);
}
}
public static class FormulaNotContext extends FormulaContext {
public TerminalNode NOT() { return getToken(RuleParser.NOT, 0); }
public FormulaContext formula() {
return getRuleContext(FormulaContext.class,0);
}
public FormulaNotContext(FormulaContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitFormulaNot(this);
else return visitor.visitChildren(this);
}
}
public static class FormulaAndContext extends FormulaContext {
public FormulaContext leftconj;
public FormulaContext rightconj;
public TerminalNode AND() { return getToken(RuleParser.AND, 0); }
public List formula() {
return getRuleContexts(FormulaContext.class);
}
public FormulaContext formula(int i) {
return getRuleContext(FormulaContext.class,i);
}
public FormulaAndContext(FormulaContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitFormulaAnd(this);
else return visitor.visitChildren(this);
}
}
public static class FormulaMultiplicationOrDivisionContext extends FormulaContext {
public FormulaContext leftop;
public Token op;
public FormulaContext rightop;
public List formula() {
return getRuleContexts(FormulaContext.class);
}
public FormulaContext formula(int i) {
return getRuleContext(FormulaContext.class,i);
}
public FormulaMultiplicationOrDivisionContext(FormulaContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitFormulaMultiplicationOrDivision(this);
else return visitor.visitChildren(this);
}
}
public static class FormulaThereExistsContext extends FormulaContext {
public FormulaContext index;
public FormulaContext body;
public TerminalNode THERE() { return getToken(RuleParser.THERE, 0); }
public TerminalNode EXISTS() { return getToken(RuleParser.EXISTS, 0); }
public List formula() {
return getRuleContexts(FormulaContext.class);
}
public FormulaContext formula(int i) {
return getRuleContext(FormulaContext.class,i);
}
public FormulaThereExistsContext(FormulaContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitFormulaThereExists(this);
else return visitor.visitChildren(this);
}
}
public static class FormulaOrContext extends FormulaContext {
public FormulaContext leftdisj;
public FormulaContext rightdisj;
public TerminalNode OR() { return getToken(RuleParser.OR, 0); }
public List formula() {
return getRuleContexts(FormulaContext.class);
}
public FormulaContext formula(int i) {
return getRuleContext(FormulaContext.class,i);
}
public FormulaOrContext(FormulaContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitFormulaOr(this);
else return visitor.visitChildren(this);
}
}
public static class FormulaAdditionOrSubtractionContext extends FormulaContext {
public FormulaContext leftop;
public Token op;
public FormulaContext rightop;
public List formula() {
return getRuleContexts(FormulaContext.class);
}
public FormulaContext formula(int i) {
return getRuleContext(FormulaContext.class,i);
}
public FormulaAdditionOrSubtractionContext(FormulaContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitFormulaAdditionOrSubtraction(this);
else return visitor.visitChildren(this);
}
}
public static class FormulaMayBeSameAsContext extends FormulaContext {
public SymbolContext leftop;
public SymbolContext rightop;
public TerminalNode MAY() { return getToken(RuleParser.MAY, 0); }
public TerminalNode BE() { return getToken(RuleParser.BE, 0); }
public TerminalNode SAME() { return getToken(RuleParser.SAME, 0); }
public TerminalNode AS() { return getToken(RuleParser.AS, 0); }
public List symbol() {
return getRuleContexts(SymbolContext.class);
}
public SymbolContext symbol(int i) {
return getRuleContext(SymbolContext.class,i);
}
public FormulaMayBeSameAsContext(FormulaContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitFormulaMayBeSameAs(this);
else return visitor.visitChildren(this);
}
}
public static class FormulaExponentiationContext extends FormulaContext {
public FormulaContext base;
public FormulaContext exponent;
public List formula() {
return getRuleContexts(FormulaContext.class);
}
public FormulaContext formula(int i) {
return getRuleContext(FormulaContext.class,i);
}
public FormulaExponentiationContext(FormulaContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitFormulaExponentiation(this);
else return visitor.visitChildren(this);
}
}
public final FormulaContext formula() throws RecognitionException {
return formula(0);
}
private FormulaContext formula(int _p) throws RecognitionException {
ParserRuleContext _parentctx = _ctx;
int _parentState = getState();
FormulaContext _localctx = new FormulaContext(_ctx, _parentState);
FormulaContext _prevctx = _localctx;
int _startState = 50;
enterRecursionRule(_localctx, 50, RULE_formula, _p);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(267);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,19,_ctx) ) {
case 1:
{
_localctx = new FormulaNotContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(227);
match(NOT);
setState(228);
formula(13);
}
break;
case 2:
{
_localctx = new FormulaForAllContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(229);
match(FOR);
setState(230);
match(ALL);
setState(231);
((FormulaForAllContext)_localctx).index = formula(0);
setState(232);
match(COLON);
setState(233);
((FormulaForAllContext)_localctx).body = formula(3);
}
break;
case 3:
{
_localctx = new FormulaThereExistsContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(235);
match(THERE);
setState(236);
match(EXISTS);
setState(237);
((FormulaThereExistsContext)_localctx).index = formula(0);
setState(238);
match(COLON);
setState(239);
((FormulaThereExistsContext)_localctx).body = formula(2);
}
break;
case 4:
{
_localctx = new FormulaWithParenthesesContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(241);
match(OPEN_PAREN);
setState(242);
formula(0);
setState(243);
match(CLOSE_PAREN);
}
break;
case 5:
{
_localctx = new FormulaFunctionApplicationContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(245);
((FormulaFunctionApplicationContext)_localctx).functor = symbol();
setState(246);
match(OPEN_PAREN);
setState(255);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NOT) | (1L << FOR) | (1L << THERE) | (1L << P) | (1L << X) | (1L << OPEN_PAREN) | (1L << CONSTANT) | (1L << QUOTED_CONSTANT) | (1L << VARIABLE))) != 0)) {
{
setState(247);
((FormulaFunctionApplicationContext)_localctx).formula = formula(0);
((FormulaFunctionApplicationContext)_localctx).args.add(((FormulaFunctionApplicationContext)_localctx).formula);
setState(252);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==COMMA) {
{
{
setState(248);
match(COMMA);
setState(249);
((FormulaFunctionApplicationContext)_localctx).formula = formula(0);
((FormulaFunctionApplicationContext)_localctx).args.add(((FormulaFunctionApplicationContext)_localctx).formula);
}
}
setState(254);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
}
setState(257);
match(CLOSE_PAREN);
}
break;
case 6:
{
_localctx = new FormulaMayBeSameAsContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(259);
((FormulaMayBeSameAsContext)_localctx).leftop = symbol();
setState(260);
match(MAY);
setState(261);
match(BE);
setState(262);
match(SAME);
setState(263);
match(AS);
setState(264);
((FormulaMayBeSameAsContext)_localctx).rightop = symbol();
}
break;
case 7:
{
_localctx = new FormulaSymbolContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(266);
symbol();
}
break;
}
_ctx.stop = _input.LT(-1);
setState(295);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,21,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
if ( _parseListeners!=null ) triggerExitRuleEvent();
_prevctx = _localctx;
{
setState(293);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,20,_ctx) ) {
case 1:
{
_localctx = new FormulaExponentiationContext(new FormulaContext(_parentctx, _parentState));
((FormulaExponentiationContext)_localctx).base = _prevctx;
pushNewRecursionContext(_localctx, _startState, RULE_formula);
setState(269);
if (!(precpred(_ctx, 11))) throw new FailedPredicateException(this, "precpred(_ctx, 11)");
setState(270);
match(EXPONENTIATION);
setState(271);
((FormulaExponentiationContext)_localctx).exponent = formula(11);
}
break;
case 2:
{
_localctx = new FormulaMultiplicationOrDivisionContext(new FormulaContext(_parentctx, _parentState));
((FormulaMultiplicationOrDivisionContext)_localctx).leftop = _prevctx;
pushNewRecursionContext(_localctx, _startState, RULE_formula);
setState(272);
if (!(precpred(_ctx, 10))) throw new FailedPredicateException(this, "precpred(_ctx, 10)");
setState(273);
((FormulaMultiplicationOrDivisionContext)_localctx).op = _input.LT(1);
_la = _input.LA(1);
if ( !(_la==DIVIDE || _la==TIMES) ) {
((FormulaMultiplicationOrDivisionContext)_localctx).op = (Token)_errHandler.recoverInline(this);
} else {
consume();
}
setState(274);
((FormulaMultiplicationOrDivisionContext)_localctx).rightop = formula(11);
}
break;
case 3:
{
_localctx = new FormulaAdditionOrSubtractionContext(new FormulaContext(_parentctx, _parentState));
((FormulaAdditionOrSubtractionContext)_localctx).leftop = _prevctx;
pushNewRecursionContext(_localctx, _startState, RULE_formula);
setState(275);
if (!(precpred(_ctx, 9))) throw new FailedPredicateException(this, "precpred(_ctx, 9)");
setState(276);
((FormulaAdditionOrSubtractionContext)_localctx).op = _input.LT(1);
_la = _input.LA(1);
if ( !(_la==PLUS || _la==SUBTRACT) ) {
((FormulaAdditionOrSubtractionContext)_localctx).op = (Token)_errHandler.recoverInline(this);
} else {
consume();
}
setState(277);
((FormulaAdditionOrSubtractionContext)_localctx).rightop = formula(10);
}
break;
case 4:
{
_localctx = new FormulaComparisonContext(new FormulaContext(_parentctx, _parentState));
((FormulaComparisonContext)_localctx).leftop = _prevctx;
pushNewRecursionContext(_localctx, _startState, RULE_formula);
setState(278);
if (!(precpred(_ctx, 8))) throw new FailedPredicateException(this, "precpred(_ctx, 8)");
setState(279);
((FormulaComparisonContext)_localctx).op = _input.LT(1);
_la = _input.LA(1);
if ( !(_la==EQUAL || _la==NOT_EQUAL) ) {
((FormulaComparisonContext)_localctx).op = (Token)_errHandler.recoverInline(this);
} else {
consume();
}
setState(280);
((FormulaComparisonContext)_localctx).rightop = formula(9);
}
break;
case 5:
{
_localctx = new FormulaAndContext(new FormulaContext(_parentctx, _parentState));
((FormulaAndContext)_localctx).leftconj = _prevctx;
pushNewRecursionContext(_localctx, _startState, RULE_formula);
setState(281);
if (!(precpred(_ctx, 7))) throw new FailedPredicateException(this, "precpred(_ctx, 7)");
setState(282);
match(AND);
setState(283);
((FormulaAndContext)_localctx).rightconj = formula(8);
}
break;
case 6:
{
_localctx = new FormulaOrContext(new FormulaContext(_parentctx, _parentState));
((FormulaOrContext)_localctx).leftdisj = _prevctx;
pushNewRecursionContext(_localctx, _startState, RULE_formula);
setState(284);
if (!(precpred(_ctx, 6))) throw new FailedPredicateException(this, "precpred(_ctx, 6)");
setState(285);
match(OR);
setState(286);
((FormulaOrContext)_localctx).rightdisj = formula(7);
}
break;
case 7:
{
_localctx = new FormulaImplicationContext(new FormulaContext(_parentctx, _parentState));
((FormulaImplicationContext)_localctx).antecedent = _prevctx;
pushNewRecursionContext(_localctx, _startState, RULE_formula);
setState(287);
if (!(precpred(_ctx, 5))) throw new FailedPredicateException(this, "precpred(_ctx, 5)");
setState(288);
match(IMPLICATION);
setState(289);
((FormulaImplicationContext)_localctx).consequent = formula(5);
}
break;
case 8:
{
_localctx = new FormulaBiconditionalContext(new FormulaContext(_parentctx, _parentState));
((FormulaBiconditionalContext)_localctx).leftop = _prevctx;
pushNewRecursionContext(_localctx, _startState, RULE_formula);
setState(290);
if (!(precpred(_ctx, 4))) throw new FailedPredicateException(this, "precpred(_ctx, 4)");
setState(291);
match(BICONDITIONAL);
setState(292);
((FormulaBiconditionalContext)_localctx).rightop = formula(4);
}
break;
}
}
}
setState(297);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,21,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
unrollRecursionContexts(_parentctx);
}
return _localctx;
}
public static class PotentialContext extends ParserRuleContext {
public PotentialContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_potential; }
public PotentialContext() { }
public void copyFrom(PotentialContext ctx) {
super.copyFrom(ctx);
}
}
public static class PotentialExponentiationContext extends PotentialContext {
public PotentialContext base;
public PotentialContext exponent;
public List potential() {
return getRuleContexts(PotentialContext.class);
}
public PotentialContext potential(int i) {
return getRuleContext(PotentialContext.class,i);
}
public PotentialExponentiationContext(PotentialContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitPotentialExponentiation(this);
else return visitor.visitChildren(this);
}
}
public static class PotentialWithParenthesesContext extends PotentialContext {
public PotentialContext potential() {
return getRuleContext(PotentialContext.class,0);
}
public PotentialWithParenthesesContext(PotentialContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitPotentialWithParentheses(this);
else return visitor.visitChildren(this);
}
}
public static class PotentialAdditionOrSubtractionContext extends PotentialContext {
public PotentialContext leftop;
public Token op;
public PotentialContext rightop;
public List potential() {
return getRuleContexts(PotentialContext.class);
}
public PotentialContext potential(int i) {
return getRuleContext(PotentialContext.class,i);
}
public PotentialAdditionOrSubtractionContext(PotentialContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitPotentialAdditionOrSubtraction(this);
else return visitor.visitChildren(this);
}
}
public static class PotentialMultiplicationOrDivisionContext extends PotentialContext {
public PotentialContext leftop;
public Token op;
public PotentialContext rightop;
public List potential() {
return getRuleContexts(PotentialContext.class);
}
public PotentialContext potential(int i) {
return getRuleContext(PotentialContext.class,i);
}
public PotentialMultiplicationOrDivisionContext(PotentialContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitPotentialMultiplicationOrDivision(this);
else return visitor.visitChildren(this);
}
}
public static class PotentialValueContext extends PotentialContext {
public Atomic_potentialContext atomic_potential() {
return getRuleContext(Atomic_potentialContext.class,0);
}
public PotentialValueContext(PotentialContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitPotentialValue(this);
else return visitor.visitChildren(this);
}
}
public final PotentialContext potential() throws RecognitionException {
return potential(0);
}
private PotentialContext potential(int _p) throws RecognitionException {
ParserRuleContext _parentctx = _ctx;
int _parentState = getState();
PotentialContext _localctx = new PotentialContext(_ctx, _parentState);
PotentialContext _prevctx = _localctx;
int _startState = 52;
enterRecursionRule(_localctx, 52, RULE_potential, _p);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(304);
switch (_input.LA(1)) {
case OPEN_PAREN:
{
_localctx = new PotentialWithParenthesesContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(299);
match(OPEN_PAREN);
setState(300);
potential(0);
setState(301);
match(CLOSE_PAREN);
}
break;
case INTEGER:
case RATIONAL:
{
_localctx = new PotentialValueContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(303);
atomic_potential();
}
break;
default:
throw new NoViableAltException(this);
}
_ctx.stop = _input.LT(-1);
setState(317);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,24,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
if ( _parseListeners!=null ) triggerExitRuleEvent();
_prevctx = _localctx;
{
setState(315);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,23,_ctx) ) {
case 1:
{
_localctx = new PotentialExponentiationContext(new PotentialContext(_parentctx, _parentState));
((PotentialExponentiationContext)_localctx).base = _prevctx;
pushNewRecursionContext(_localctx, _startState, RULE_potential);
setState(306);
if (!(precpred(_ctx, 4))) throw new FailedPredicateException(this, "precpred(_ctx, 4)");
setState(307);
match(EXPONENTIATION);
setState(308);
((PotentialExponentiationContext)_localctx).exponent = potential(4);
}
break;
case 2:
{
_localctx = new PotentialMultiplicationOrDivisionContext(new PotentialContext(_parentctx, _parentState));
((PotentialMultiplicationOrDivisionContext)_localctx).leftop = _prevctx;
pushNewRecursionContext(_localctx, _startState, RULE_potential);
setState(309);
if (!(precpred(_ctx, 3))) throw new FailedPredicateException(this, "precpred(_ctx, 3)");
setState(310);
((PotentialMultiplicationOrDivisionContext)_localctx).op = _input.LT(1);
_la = _input.LA(1);
if ( !(_la==DIVIDE || _la==TIMES) ) {
((PotentialMultiplicationOrDivisionContext)_localctx).op = (Token)_errHandler.recoverInline(this);
} else {
consume();
}
setState(311);
((PotentialMultiplicationOrDivisionContext)_localctx).rightop = potential(4);
}
break;
case 3:
{
_localctx = new PotentialAdditionOrSubtractionContext(new PotentialContext(_parentctx, _parentState));
((PotentialAdditionOrSubtractionContext)_localctx).leftop = _prevctx;
pushNewRecursionContext(_localctx, _startState, RULE_potential);
setState(312);
if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
setState(313);
((PotentialAdditionOrSubtractionContext)_localctx).op = _input.LT(1);
_la = _input.LA(1);
if ( !(_la==PLUS || _la==SUBTRACT) ) {
((PotentialAdditionOrSubtractionContext)_localctx).op = (Token)_errHandler.recoverInline(this);
} else {
consume();
}
setState(314);
((PotentialAdditionOrSubtractionContext)_localctx).rightop = potential(3);
}
break;
}
}
}
setState(319);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,24,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
unrollRecursionContexts(_parentctx);
}
return _localctx;
}
public static class Atomic_potentialContext extends ParserRuleContext {
public TerminalNode INTEGER() { return getToken(RuleParser.INTEGER, 0); }
public TerminalNode RATIONAL() { return getToken(RuleParser.RATIONAL, 0); }
public Atomic_potentialContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_atomic_potential; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitAtomic_potential(this);
else return visitor.visitChildren(this);
}
}
public final Atomic_potentialContext atomic_potential() throws RecognitionException {
Atomic_potentialContext _localctx = new Atomic_potentialContext(_ctx, getState());
enterRule(_localctx, 54, RULE_atomic_potential);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(320);
_la = _input.LA(1);
if ( !(_la==INTEGER || _la==RATIONAL) ) {
_errHandler.recoverInline(this);
} else {
consume();
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class SymbolContext extends ParserRuleContext {
public TerminalNode P() { return getToken(RuleParser.P, 0); }
public TerminalNode X() { return getToken(RuleParser.X, 0); }
public TerminalNode CONSTANT() { return getToken(RuleParser.CONSTANT, 0); }
public TerminalNode QUOTED_CONSTANT() { return getToken(RuleParser.QUOTED_CONSTANT, 0); }
public TerminalNode VARIABLE() { return getToken(RuleParser.VARIABLE, 0); }
public SymbolContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_symbol; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RuleVisitor ) return ((RuleVisitor extends T>)visitor).visitSymbol(this);
else return visitor.visitChildren(this);
}
}
public final SymbolContext symbol() throws RecognitionException {
SymbolContext _localctx = new SymbolContext(_ctx, getState());
enterRule(_localctx, 56, RULE_symbol);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(322);
_la = _input.LA(1);
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << P) | (1L << X) | (1L << CONSTANT) | (1L << QUOTED_CONSTANT) | (1L << VARIABLE))) != 0)) ) {
_errHandler.recoverInline(this);
} else {
consume();
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) {
switch (ruleIndex) {
case 25:
return formula_sempred((FormulaContext)_localctx, predIndex);
case 26:
return potential_sempred((PotentialContext)_localctx, predIndex);
}
return true;
}
private boolean formula_sempred(FormulaContext _localctx, int predIndex) {
switch (predIndex) {
case 0:
return precpred(_ctx, 11);
case 1:
return precpred(_ctx, 10);
case 2:
return precpred(_ctx, 9);
case 3:
return precpred(_ctx, 8);
case 4:
return precpred(_ctx, 7);
case 5:
return precpred(_ctx, 6);
case 6:
return precpred(_ctx, 5);
case 7:
return precpred(_ctx, 4);
}
return true;
}
private boolean potential_sempred(PotentialContext _localctx, int predIndex) {
switch (predIndex) {
case 8:
return precpred(_ctx, 4);
case 9:
return precpred(_ctx, 3);
case 10:
return precpred(_ctx, 2);
}
return true;
}
public static final String _serializedATN =
"\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3\60\u0147\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\3\2\7\2>\n\2\f\2\16"+
"\2A\13\2\3\2\3\2\3\3\3\3\3\3\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\5\4Q"+
"\n\4\3\5\3\5\3\5\3\5\3\5\3\5\7\5Y\n\5\f\5\16\5\\\13\5\5\5^\n\5\3\5\3\5"+
"\3\6\3\6\3\6\3\6\3\6\3\6\3\7\3\7\3\7\3\7\3\7\3\7\7\7n\n\7\f\7\16\7q\13"+
"\7\3\7\3\7\3\7\3\7\3\b\3\b\3\b\3\t\3\t\5\t|\n\t\3\n\5\n\177\n\n\3\n\3"+
"\n\3\n\5\n\u0084\n\n\3\n\3\n\3\13\3\13\3\13\3\f\3\f\3\f\3\f\3\f\3\f\3"+
"\f\3\f\3\f\3\r\3\r\3\r\3\16\3\16\3\16\3\16\3\17\3\17\3\17\3\20\3\20\3"+
"\20\3\20\3\20\3\20\5\20\u00a4\n\20\3\21\3\21\5\21\u00a8\n\21\3\22\3\22"+
"\3\22\3\23\3\23\3\23\3\23\3\23\7\23\u00b2\n\23\f\23\16\23\u00b5\13\23"+
"\3\24\3\24\3\24\3\24\3\24\5\24\u00bc\n\24\3\25\3\25\3\25\3\25\3\25\5\25"+
"\u00c3\n\25\3\26\3\26\3\26\3\26\3\26\5\26\u00ca\n\26\3\27\3\27\3\27\3"+
"\27\3\27\5\27\u00d1\n\27\3\30\3\30\3\30\3\30\3\30\5\30\u00d8\n\30\3\31"+
"\3\31\3\31\3\31\3\31\3\31\5\31\u00e0\n\31\3\32\3\32\3\32\3\33\3\33\3\33"+
"\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33"+
"\3\33\3\33\3\33\3\33\3\33\3\33\3\33\7\33\u00fd\n\33\f\33\16\33\u0100\13"+
"\33\5\33\u0102\n\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33"+
"\5\33\u010e\n\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33"+
"\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\7\33"+
"\u0128\n\33\f\33\16\33\u012b\13\33\3\34\3\34\3\34\3\34\3\34\3\34\5\34"+
"\u0133\n\34\3\34\3\34\3\34\3\34\3\34\3\34\3\34\3\34\3\34\7\34\u013e\n"+
"\34\f\34\16\34\u0141\13\34\3\35\3\35\3\36\3\36\3\36\2\4\64\66\37\2\4\6"+
"\b\n\f\16\20\22\24\26\30\32\34\36 \"$&(*,.\60\62\64\668:\2\b\4\2\16\16"+
"))\3\2\31\32\3\2\33\34\3\2\35\36\3\2)*\4\2\24\25+-\u015f\2?\3\2\2\2\4"+
"D\3\2\2\2\6P\3\2\2\2\bR\3\2\2\2\na\3\2\2\2\fg\3\2\2\2\16v\3\2\2\2\20y"+
"\3\2\2\2\22~\3\2\2\2\24\u0087\3\2\2\2\26\u008a\3\2\2\2\30\u0093\3\2\2"+
"\2\32\u0096\3\2\2\2\34\u009a\3\2\2\2\36\u009d\3\2\2\2 \u00a7\3\2\2\2\""+
"\u00a9\3\2\2\2$\u00ac\3\2\2\2&\u00bb\3\2\2\2(\u00c2\3\2\2\2*\u00c9\3\2"+
"\2\2,\u00d0\3\2\2\2.\u00d7\3\2\2\2\60\u00df\3\2\2\2\62\u00e1\3\2\2\2\64"+
"\u010d\3\2\2\2\66\u0132\3\2\2\28\u0142\3\2\2\2:\u0144\3\2\2\2<>\5\6\4"+
"\2=<\3\2\2\2>A\3\2\2\2?=\3\2\2\2?@\3\2\2\2@B\3\2\2\2A?\3\2\2\2BC\7\2\2"+
"\3C\3\3\2\2\2DE\5\64\33\2EF\7\2\2\3F\5\3\2\2\2GQ\5\b\5\2HQ\5\n\6\2IQ\5"+
"\f\7\2JQ\5\16\b\2KQ\5\22\n\2LQ\5\24\13\2MQ\5\30\r\2NQ\5\34\17\2OQ\5\""+
"\22\2PG\3\2\2\2PH\3\2\2\2PI\3\2\2\2PJ\3\2\2\2PK\3\2\2\2PL\3\2\2\2PM\3"+
"\2\2\2PN\3\2\2\2PO\3\2\2\2Q\7\3\2\2\2RS\7\r\2\2S]\5:\36\2TU\7!\2\2UZ\t"+
"\2\2\2VW\7&\2\2WY\7+\2\2XV\3\2\2\2Y\\\3\2\2\2ZX\3\2\2\2Z[\3\2\2\2[^\3"+
"\2\2\2\\Z\3\2\2\2]T\3\2\2\2]^\3\2\2\2^_\3\2\2\2_`\7#\2\2`\t\3\2\2\2ab"+
"\7\17\2\2bc\5:\36\2cd\7!\2\2de\5:\36\2ef\7#\2\2f\13\3\2\2\2gh\7\17\2\2"+
"hi\5:\36\2ij\7!\2\2jo\5:\36\2kl\7\25\2\2ln\5:\36\2mk\3\2\2\2nq\3\2\2\2"+
"om\3\2\2\2op\3\2\2\2pr\3\2\2\2qo\3\2\2\2rs\7$\2\2st\5:\36\2tu\7#\2\2u"+
"\r\3\2\2\2vw\5\20\t\2wx\7#\2\2x\17\3\2\2\2y{\5\64\33\2z|\5\66\34\2{z\3"+
"\2\2\2{|\3\2\2\2|\21\3\2\2\2}\177\5\66\34\2~}\3\2\2\2~\177\3\2\2\2\177"+
"\u0080\3\2\2\2\u0080\u0083\5\64\33\2\u0081\u0082\7\"\2\2\u0082\u0084\5"+
"\64\33\2\u0083\u0081\3\2\2\2\u0083\u0084\3\2\2\2\u0084\u0085\3\2\2\2\u0085"+
"\u0086\7(\2\2\u0086\23\3\2\2\2\u0087\u0088\5\26\f\2\u0088\u0089\7#\2\2"+
"\u0089\25\3\2\2\2\u008a\u008b\7\24\2\2\u008b\u008c\7\37\2\2\u008c\u008d"+
"\5\64\33\2\u008d\u008e\7%\2\2\u008e\u008f\5\64\33\2\u008f\u0090\7 \2\2"+
"\u0090\u0091\7\35\2\2\u0091\u0092\5\66\34\2\u0092\27\3\2\2\2\u0093\u0094"+
"\5\32\16\2\u0094\u0095\7#\2\2\u0095\31\3\2\2\2\u0096\u0097\5\64\33\2\u0097"+
"\u0098\7$\2\2\u0098\u0099\5.\30\2\u0099\33\3\2\2\2\u009a\u009b\5\36\20"+
"\2\u009b\u009c\7#\2\2\u009c\35\3\2\2\2\u009d\u009e\7\n\2\2\u009e\u009f"+
"\5\64\33\2\u009f\u00a0\7\13\2\2\u00a0\u00a3\5 \21\2\u00a1\u00a2\7\f\2"+
"\2\u00a2\u00a4\5 \21\2\u00a3\u00a1\3\2\2\2\u00a3\u00a4\3\2\2\2\u00a4\37"+
"\3\2\2\2\u00a5\u00a8\5.\30\2\u00a6\u00a8\5\66\34\2\u00a7\u00a5\3\2\2\2"+
"\u00a7\u00a6\3\2\2\2\u00a8!\3\2\2\2\u00a9\u00aa\5$\23\2\u00aa\u00ab\7"+
"#\2\2\u00ab#\3\2\2\2\u00ac\u00ad\5&\24\2\u00ad\u00ae\7\4\2\2\u00ae\u00b3"+
"\5*\26\2\u00af\u00b0\7\4\2\2\u00b0\u00b2\5*\26\2\u00b1\u00af\3\2\2\2\u00b2"+
"\u00b5\3\2\2\2\u00b3\u00b1\3\2\2\2\u00b3\u00b4\3\2\2\2\u00b4%\3\2\2\2"+
"\u00b5\u00b3\3\2\2\2\u00b6\u00b7\7\37\2\2\u00b7\u00b8\5(\25\2\u00b8\u00b9"+
"\7 \2\2\u00b9\u00bc\3\2\2\2\u00ba\u00bc\5(\25\2\u00bb\u00b6\3\2\2\2\u00bb"+
"\u00ba\3\2\2\2\u00bc\'\3\2\2\2\u00bd\u00c3\5\62\32\2\u00be\u00c3\5\22"+
"\n\2\u00bf\u00c3\5\26\f\2\u00c0\u00c3\5\32\16\2\u00c1\u00c3\5\36\20\2"+
"\u00c2\u00bd\3\2\2\2\u00c2\u00be\3\2\2\2\u00c2\u00bf\3\2\2\2\u00c2\u00c0"+
"\3\2\2\2\u00c2\u00c1\3\2\2\2\u00c3)\3\2\2\2\u00c4\u00c5\7\37\2\2\u00c5"+
"\u00c6\5,\27\2\u00c6\u00c7\7 \2\2\u00c7\u00ca\3\2\2\2\u00c8\u00ca\5,\27"+
"\2\u00c9\u00c4\3\2\2\2\u00c9\u00c8\3\2\2\2\u00ca+\3\2\2\2\u00cb\u00d1"+
"\5\20\t\2\u00cc\u00d1\5\22\n\2\u00cd\u00d1\5\26\f\2\u00ce\u00d1\5\32\16"+
"\2\u00cf\u00d1\5\36\20\2\u00d0\u00cb\3\2\2\2\u00d0\u00cc\3\2\2\2\u00d0"+
"\u00cd\3\2\2\2\u00d0\u00ce\3\2\2\2\u00d0\u00cf\3\2\2\2\u00d1-\3\2\2\2"+
"\u00d2\u00d3\7\37\2\2\u00d3\u00d4\5\60\31\2\u00d4\u00d5\7 \2\2\u00d5\u00d8"+
"\3\2\2\2\u00d6\u00d8\5\60\31\2\u00d7\u00d2\3\2\2\2\u00d7\u00d6\3\2\2\2"+
"\u00d8/\3\2\2\2\u00d9\u00e0\5\36\20\2\u00da\u00e0\5$\23\2\u00db\u00e0"+
"\5\20\t\2\u00dc\u00e0\5\22\n\2\u00dd\u00e0\5\26\f\2\u00de\u00e0\5\32\16"+
"\2\u00df\u00d9\3\2\2\2\u00df\u00da\3\2\2\2\u00df\u00db\3\2\2\2\u00df\u00dc"+
"\3\2\2\2\u00df\u00dd\3\2\2\2\u00df\u00de\3\2\2\2\u00e0\61\3\2\2\2\u00e1"+
"\u00e2\5\64\33\2\u00e2\u00e3\5\66\34\2\u00e3\63\3\2\2\2\u00e4\u00e5\b"+
"\33\1\2\u00e5\u00e6\7\3\2\2\u00e6\u010e\5\64\33\17\u00e7\u00e8\7\6\2\2"+
"\u00e8\u00e9\7\7\2\2\u00e9\u00ea\5\64\33\2\u00ea\u00eb\7!\2\2\u00eb\u00ec"+
"\5\64\33\5\u00ec\u010e\3\2\2\2\u00ed\u00ee\7\b\2\2\u00ee\u00ef\7\t\2\2"+
"\u00ef\u00f0\5\64\33\2\u00f0\u00f1\7!\2\2\u00f1\u00f2\5\64\33\4\u00f2"+
"\u010e\3\2\2\2\u00f3\u00f4\7\37\2\2\u00f4\u00f5\5\64\33\2\u00f5\u00f6"+
"\7 \2\2\u00f6\u010e\3\2\2\2\u00f7\u00f8\5:\36\2\u00f8\u0101\7\37\2\2\u00f9"+
"\u00fe\5\64\33\2\u00fa\u00fb\7&\2\2\u00fb\u00fd\5\64\33\2\u00fc\u00fa"+
"\3\2\2\2\u00fd\u0100\3\2\2\2\u00fe\u00fc\3\2\2\2\u00fe\u00ff\3\2\2\2\u00ff"+
"\u0102\3\2\2\2\u0100\u00fe\3\2\2\2\u0101\u00f9\3\2\2\2\u0101\u0102\3\2"+
"\2\2\u0102\u0103\3\2\2\2\u0103\u0104\7 \2\2\u0104\u010e\3\2\2\2\u0105"+
"\u0106\5:\36\2\u0106\u0107\7\20\2\2\u0107\u0108\7\21\2\2\u0108\u0109\7"+
"\22\2\2\u0109\u010a\7\23\2\2\u010a\u010b\5:\36\2\u010b\u010e\3\2\2\2\u010c"+
"\u010e\5:\36\2\u010d\u00e4\3\2\2\2\u010d\u00e7\3\2\2\2\u010d\u00ed\3\2"+
"\2\2\u010d\u00f3\3\2\2\2\u010d\u00f7\3\2\2\2\u010d\u0105\3\2\2\2\u010d"+
"\u010c\3\2\2\2\u010e\u0129\3\2\2\2\u010f\u0110\f\r\2\2\u0110\u0111\7\30"+
"\2\2\u0111\u0128\5\64\33\r\u0112\u0113\f\f\2\2\u0113\u0114\t\3\2\2\u0114"+
"\u0128\5\64\33\r\u0115\u0116\f\13\2\2\u0116\u0117\t\4\2\2\u0117\u0128"+
"\5\64\33\f\u0118\u0119\f\n\2\2\u0119\u011a\t\5\2\2\u011a\u0128\5\64\33"+
"\13\u011b\u011c\f\t\2\2\u011c\u011d\7\4\2\2\u011d\u0128\5\64\33\n\u011e"+
"\u011f\f\b\2\2\u011f\u0120\7\5\2\2\u0120\u0128\5\64\33\t\u0121\u0122\f"+
"\7\2\2\u0122\u0123\7\26\2\2\u0123\u0128\5\64\33\7\u0124\u0125\f\6\2\2"+
"\u0125\u0126\7\27\2\2\u0126\u0128\5\64\33\6\u0127\u010f\3\2\2\2\u0127"+
"\u0112\3\2\2\2\u0127\u0115\3\2\2\2\u0127\u0118\3\2\2\2\u0127\u011b\3\2"+
"\2\2\u0127\u011e\3\2\2\2\u0127\u0121\3\2\2\2\u0127\u0124\3\2\2\2\u0128"+
"\u012b\3\2\2\2\u0129\u0127\3\2\2\2\u0129\u012a\3\2\2\2\u012a\65\3\2\2"+
"\2\u012b\u0129\3\2\2\2\u012c\u012d\b\34\1\2\u012d\u012e\7\37\2\2\u012e"+
"\u012f\5\66\34\2\u012f\u0130\7 \2\2\u0130\u0133\3\2\2\2\u0131\u0133\5"+
"8\35\2\u0132\u012c\3\2\2\2\u0132\u0131\3\2\2\2\u0133\u013f\3\2\2\2\u0134"+
"\u0135\f\6\2\2\u0135\u0136\7\30\2\2\u0136\u013e\5\66\34\6\u0137\u0138"+
"\f\5\2\2\u0138\u0139\t\3\2\2\u0139\u013e\5\66\34\6\u013a\u013b\f\4\2\2"+
"\u013b\u013c\t\4\2\2\u013c\u013e\5\66\34\5\u013d\u0134\3\2\2\2\u013d\u0137"+
"\3\2\2\2\u013d\u013a\3\2\2\2\u013e\u0141\3\2\2\2\u013f\u013d\3\2\2\2\u013f"+
"\u0140\3\2\2\2\u0140\67\3\2\2\2\u0141\u013f\3\2\2\2\u0142\u0143\t\6\2"+
"\2\u01439\3\2\2\2\u0144\u0145\t\7\2\2\u0145;\3\2\2\2\33?PZ]o{~\u0083\u00a3"+
"\u00a7\u00b3\u00bb\u00c2\u00c9\u00d0\u00d7\u00df\u00fe\u0101\u010d\u0127"+
"\u0129\u0132\u013d\u013f";
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);
}
}
}