com.sri.ai.praise.model.v1.hogm.antlr.HOGMParser 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\v1\hogm\antlr\HOGM.g4 by ANTLR 4.5.1
package com.sri.ai.praise.model.v1.hogm.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 HOGMParser 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, CONSTANT=13, RANDOM=14, X=15, IN=16, IN_BUILT_SORT_BOOLEAN=17,
IN_BUILT_SORT_INTEGER=18, IN_BUILT_SORT_REAL=19, IN_BUILT_SORT_STRING=20,
IMPLICATION=21, BICONDITIONAL=22, EXPONENTIATION=23, DIVIDE=24, TIMES=25,
PLUS=26, SUBTRACT=27, LESS_THAN=28, LESS_THAN_EQUAL=29, EQUAL=30, NOT_EQUAL=31,
GREATER_THAN_EQUAL=32, GREATER_THAN=33, OPEN_PAREN=34, CLOSE_PAREN=35,
SEMICOLON=36, COLON=37, COMMA=38, VERTICAL_BAR=39, MAPPING_RIGHT_ARROW=40,
RANGE_SEPARTOR=41, INTEGER=42, RATIONAL=43, CONSTANT_STR=44, QUOTED_CONSTANT_STR=45,
COMMENT=46, LINE_COMMENT=47, WS=48;
public static final int
RULE_model = 0, RULE_aterm = 1, RULE_statement = 2, RULE_declaration = 3,
RULE_sort_decl = 4, RULE_constant_decl = 5, RULE_random_variable_decl = 6,
RULE_term = 7, RULE_function_application = 8, RULE_quantifier_index = 9,
RULE_quantifier_index_term = 10, RULE_sort_name = 11, RULE_sort_reference = 12,
RULE_sort_number_sub_range = 13, RULE_functor_name = 14, RULE_symbol = 15,
RULE_constant_name = 16, RULE_constant_number = 17;
public static final String[] ruleNames = {
"model", "aterm", "statement", "declaration", "sort_decl", "constant_decl",
"random_variable_decl", "term", "function_application", "quantifier_index",
"quantifier_index_term", "sort_name", "sort_reference", "sort_number_sub_range",
"functor_name", "symbol", "constant_name", "constant_number"
};
private static final String[] _LITERAL_NAMES = {
null, "'not'", "'and'", "'or'", "'for'", "'all'", "'there'", "'exists'",
"'if'", "'then'", "'else'", "'sort'", "'Unknown'", "'constant'", "'random'",
"'x'", "'in'", "'Boolean'", "'Integer'", "'Real'", "'String'", "'=>'",
"'<=>'", "'^'", "'/'", "'*'", "'+'", "'-'", "'<'", "'<='", "'='", "'!='",
"'>='", "'>'", "'('", "')'", "';'", "':'", "','", "'|'", "'->'", "'..'"
};
private static final String[] _SYMBOLIC_NAMES = {
null, "NOT", "AND", "OR", "FOR", "ALL", "THERE", "EXISTS", "IF", "THEN",
"ELSE", "SORT", "UNKNOWN", "CONSTANT", "RANDOM", "X", "IN", "IN_BUILT_SORT_BOOLEAN",
"IN_BUILT_SORT_INTEGER", "IN_BUILT_SORT_REAL", "IN_BUILT_SORT_STRING",
"IMPLICATION", "BICONDITIONAL", "EXPONENTIATION", "DIVIDE", "TIMES", "PLUS",
"SUBTRACT", "LESS_THAN", "LESS_THAN_EQUAL", "EQUAL", "NOT_EQUAL", "GREATER_THAN_EQUAL",
"GREATER_THAN", "OPEN_PAREN", "CLOSE_PAREN", "SEMICOLON", "COLON", "COMMA",
"VERTICAL_BAR", "MAPPING_RIGHT_ARROW", "RANGE_SEPARTOR", "INTEGER", "RATIONAL",
"CONSTANT_STR", "QUOTED_CONSTANT_STR", "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 "HOGM.g4"; }
@Override
public String[] getRuleNames() { return ruleNames; }
@Override
public String getSerializedATN() { return _serializedATN; }
@Override
public ATN getATN() { return _ATN; }
public HOGMParser(TokenStream input) {
super(input);
_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
public static class ModelContext extends ParserRuleContext {
public StatementContext statement;
public List statements = new ArrayList();
public TerminalNode EOF() { return getToken(HOGMParser.EOF, 0); }
public List statement() {
return getRuleContexts(StatementContext.class);
}
public StatementContext statement(int i) {
return getRuleContext(StatementContext.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 HOGMVisitor ) return ((HOGMVisitor 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(39);
_errHandler.sync(this);
_la = _input.LA(1);
while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NOT) | (1L << FOR) | (1L << THERE) | (1L << IF) | (1L << SORT) | (1L << CONSTANT) | (1L << RANDOM) | (1L << X) | (1L << SUBTRACT) | (1L << OPEN_PAREN) | (1L << VERTICAL_BAR) | (1L << INTEGER) | (1L << RATIONAL) | (1L << CONSTANT_STR) | (1L << QUOTED_CONSTANT_STR))) != 0)) {
{
{
setState(36);
((ModelContext)_localctx).statement = statement();
((ModelContext)_localctx).statements.add(((ModelContext)_localctx).statement);
}
}
setState(41);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(42);
match(EOF);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class AtermContext extends ParserRuleContext {
public TermContext term() {
return getRuleContext(TermContext.class,0);
}
public TerminalNode EOF() { return getToken(HOGMParser.EOF, 0); }
public AtermContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_aterm; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HOGMVisitor ) return ((HOGMVisitor extends T>)visitor).visitAterm(this);
else return visitor.visitChildren(this);
}
}
public final AtermContext aterm() throws RecognitionException {
AtermContext _localctx = new AtermContext(_ctx, getState());
enterRule(_localctx, 2, RULE_aterm);
try {
enterOuterAlt(_localctx, 1);
{
setState(44);
term(0);
setState(45);
match(EOF);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class StatementContext extends ParserRuleContext {
public DeclarationContext declaration() {
return getRuleContext(DeclarationContext.class,0);
}
public TermContext term() {
return getRuleContext(TermContext.class,0);
}
public TerminalNode SEMICOLON() { return getToken(HOGMParser.SEMICOLON, 0); }
public StatementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_statement; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HOGMVisitor ) return ((HOGMVisitor extends T>)visitor).visitStatement(this);
else return visitor.visitChildren(this);
}
}
public final StatementContext statement() throws RecognitionException {
StatementContext _localctx = new StatementContext(_ctx, getState());
enterRule(_localctx, 4, RULE_statement);
try {
setState(51);
switch (_input.LA(1)) {
case SORT:
case CONSTANT:
case RANDOM:
enterOuterAlt(_localctx, 1);
{
setState(47);
declaration();
}
break;
case NOT:
case FOR:
case THERE:
case IF:
case X:
case SUBTRACT:
case OPEN_PAREN:
case VERTICAL_BAR:
case INTEGER:
case RATIONAL:
case CONSTANT_STR:
case QUOTED_CONSTANT_STR:
enterOuterAlt(_localctx, 2);
{
setState(48);
term(0);
setState(49);
match(SEMICOLON);
}
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 DeclarationContext extends ParserRuleContext {
public Sort_declContext sort_decl() {
return getRuleContext(Sort_declContext.class,0);
}
public Constant_declContext constant_decl() {
return getRuleContext(Constant_declContext.class,0);
}
public Random_variable_declContext random_variable_decl() {
return getRuleContext(Random_variable_declContext.class,0);
}
public DeclarationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_declaration; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HOGMVisitor ) return ((HOGMVisitor extends T>)visitor).visitDeclaration(this);
else return visitor.visitChildren(this);
}
}
public final DeclarationContext declaration() throws RecognitionException {
DeclarationContext _localctx = new DeclarationContext(_ctx, getState());
enterRule(_localctx, 6, RULE_declaration);
try {
setState(56);
switch (_input.LA(1)) {
case SORT:
enterOuterAlt(_localctx, 1);
{
setState(53);
sort_decl();
}
break;
case CONSTANT:
enterOuterAlt(_localctx, 2);
{
setState(54);
constant_decl();
}
break;
case RANDOM:
enterOuterAlt(_localctx, 3);
{
setState(55);
random_variable_decl();
}
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 Sort_declContext extends ParserRuleContext {
public Sort_nameContext name;
public Token size;
public Constant_nameContext constant_name;
public List constants = new ArrayList();
public TerminalNode SORT() { return getToken(HOGMParser.SORT, 0); }
public Sort_nameContext sort_name() {
return getRuleContext(Sort_nameContext.class,0);
}
public TerminalNode COLON() { return getToken(HOGMParser.COLON, 0); }
public TerminalNode SEMICOLON() { return getToken(HOGMParser.SEMICOLON, 0); }
public TerminalNode INTEGER() { return getToken(HOGMParser.INTEGER, 0); }
public TerminalNode UNKNOWN() { return getToken(HOGMParser.UNKNOWN, 0); }
public List COMMA() { return getTokens(HOGMParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(HOGMParser.COMMA, i);
}
public List constant_name() {
return getRuleContexts(Constant_nameContext.class);
}
public Constant_nameContext constant_name(int i) {
return getRuleContext(Constant_nameContext.class,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 HOGMVisitor ) return ((HOGMVisitor 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, 8, RULE_sort_decl);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(58);
match(SORT);
setState(59);
((Sort_declContext)_localctx).name = sort_name();
setState(69);
_la = _input.LA(1);
if (_la==COLON) {
{
setState(60);
match(COLON);
setState(61);
((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(66);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==COMMA) {
{
{
setState(62);
match(COMMA);
setState(63);
((Sort_declContext)_localctx).constant_name = constant_name();
((Sort_declContext)_localctx).constants.add(((Sort_declContext)_localctx).constant_name);
}
}
setState(68);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
}
setState(72);
_la = _input.LA(1);
if (_la==SEMICOLON) {
{
setState(71);
match(SEMICOLON);
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Constant_declContext extends ParserRuleContext {
public Constant_declContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_constant_decl; }
public Constant_declContext() { }
public void copyFrom(Constant_declContext ctx) {
super.copyFrom(ctx);
}
}
public static class RelationalConstantDeclarationContext extends Constant_declContext {
public Constant_nameContext name;
public Sort_referenceContext sort_reference;
public List parameters = new ArrayList();
public Sort_referenceContext range;
public TerminalNode CONSTANT() { return getToken(HOGMParser.CONSTANT, 0); }
public TerminalNode COLON() { return getToken(HOGMParser.COLON, 0); }
public TerminalNode MAPPING_RIGHT_ARROW() { return getToken(HOGMParser.MAPPING_RIGHT_ARROW, 0); }
public Constant_nameContext constant_name() {
return getRuleContext(Constant_nameContext.class,0);
}
public List sort_reference() {
return getRuleContexts(Sort_referenceContext.class);
}
public Sort_referenceContext sort_reference(int i) {
return getRuleContext(Sort_referenceContext.class,i);
}
public List X() { return getTokens(HOGMParser.X); }
public TerminalNode X(int i) {
return getToken(HOGMParser.X, i);
}
public TerminalNode SEMICOLON() { return getToken(HOGMParser.SEMICOLON, 0); }
public RelationalConstantDeclarationContext(Constant_declContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HOGMVisitor ) return ((HOGMVisitor extends T>)visitor).visitRelationalConstantDeclaration(this);
else return visitor.visitChildren(this);
}
}
public static class PropositionalConstantDeclarationContext extends Constant_declContext {
public Constant_nameContext name;
public Sort_referenceContext range;
public TerminalNode CONSTANT() { return getToken(HOGMParser.CONSTANT, 0); }
public TerminalNode COLON() { return getToken(HOGMParser.COLON, 0); }
public Constant_nameContext constant_name() {
return getRuleContext(Constant_nameContext.class,0);
}
public Sort_referenceContext sort_reference() {
return getRuleContext(Sort_referenceContext.class,0);
}
public TerminalNode SEMICOLON() { return getToken(HOGMParser.SEMICOLON, 0); }
public PropositionalConstantDeclarationContext(Constant_declContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HOGMVisitor ) return ((HOGMVisitor extends T>)visitor).visitPropositionalConstantDeclaration(this);
else return visitor.visitChildren(this);
}
}
public final Constant_declContext constant_decl() throws RecognitionException {
Constant_declContext _localctx = new Constant_declContext(_ctx, getState());
enterRule(_localctx, 10, RULE_constant_decl);
int _la;
try {
setState(97);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,9,_ctx) ) {
case 1:
_localctx = new PropositionalConstantDeclarationContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(74);
match(CONSTANT);
setState(75);
((PropositionalConstantDeclarationContext)_localctx).name = constant_name();
setState(76);
match(COLON);
setState(77);
((PropositionalConstantDeclarationContext)_localctx).range = sort_reference();
setState(79);
_la = _input.LA(1);
if (_la==SEMICOLON) {
{
setState(78);
match(SEMICOLON);
}
}
}
break;
case 2:
_localctx = new RelationalConstantDeclarationContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(81);
match(CONSTANT);
setState(82);
((RelationalConstantDeclarationContext)_localctx).name = constant_name();
setState(83);
match(COLON);
setState(84);
((RelationalConstantDeclarationContext)_localctx).sort_reference = sort_reference();
((RelationalConstantDeclarationContext)_localctx).parameters.add(((RelationalConstantDeclarationContext)_localctx).sort_reference);
setState(89);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==X) {
{
{
setState(85);
match(X);
setState(86);
((RelationalConstantDeclarationContext)_localctx).sort_reference = sort_reference();
((RelationalConstantDeclarationContext)_localctx).parameters.add(((RelationalConstantDeclarationContext)_localctx).sort_reference);
}
}
setState(91);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(92);
match(MAPPING_RIGHT_ARROW);
setState(93);
((RelationalConstantDeclarationContext)_localctx).range = sort_reference();
setState(95);
_la = _input.LA(1);
if (_la==SEMICOLON) {
{
setState(94);
match(SEMICOLON);
}
}
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Random_variable_declContext extends ParserRuleContext {
public Random_variable_declContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_random_variable_decl; }
public Random_variable_declContext() { }
public void copyFrom(Random_variable_declContext ctx) {
super.copyFrom(ctx);
}
}
public static class PropositionalRandomVariableDeclarationContext extends Random_variable_declContext {
public Constant_nameContext name;
public Sort_referenceContext range;
public TerminalNode RANDOM() { return getToken(HOGMParser.RANDOM, 0); }
public TerminalNode COLON() { return getToken(HOGMParser.COLON, 0); }
public Constant_nameContext constant_name() {
return getRuleContext(Constant_nameContext.class,0);
}
public Sort_referenceContext sort_reference() {
return getRuleContext(Sort_referenceContext.class,0);
}
public TerminalNode SEMICOLON() { return getToken(HOGMParser.SEMICOLON, 0); }
public PropositionalRandomVariableDeclarationContext(Random_variable_declContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HOGMVisitor ) return ((HOGMVisitor extends T>)visitor).visitPropositionalRandomVariableDeclaration(this);
else return visitor.visitChildren(this);
}
}
public static class RelationalRandomVariableDeclarationContext extends Random_variable_declContext {
public Constant_nameContext name;
public Sort_referenceContext sort_reference;
public List parameters = new ArrayList();
public Sort_referenceContext range;
public TerminalNode RANDOM() { return getToken(HOGMParser.RANDOM, 0); }
public TerminalNode COLON() { return getToken(HOGMParser.COLON, 0); }
public TerminalNode MAPPING_RIGHT_ARROW() { return getToken(HOGMParser.MAPPING_RIGHT_ARROW, 0); }
public Constant_nameContext constant_name() {
return getRuleContext(Constant_nameContext.class,0);
}
public List sort_reference() {
return getRuleContexts(Sort_referenceContext.class);
}
public Sort_referenceContext sort_reference(int i) {
return getRuleContext(Sort_referenceContext.class,i);
}
public List X() { return getTokens(HOGMParser.X); }
public TerminalNode X(int i) {
return getToken(HOGMParser.X, i);
}
public TerminalNode SEMICOLON() { return getToken(HOGMParser.SEMICOLON, 0); }
public RelationalRandomVariableDeclarationContext(Random_variable_declContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HOGMVisitor ) return ((HOGMVisitor extends T>)visitor).visitRelationalRandomVariableDeclaration(this);
else return visitor.visitChildren(this);
}
}
public final Random_variable_declContext random_variable_decl() throws RecognitionException {
Random_variable_declContext _localctx = new Random_variable_declContext(_ctx, getState());
enterRule(_localctx, 12, RULE_random_variable_decl);
int _la;
try {
setState(122);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,13,_ctx) ) {
case 1:
_localctx = new PropositionalRandomVariableDeclarationContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(99);
match(RANDOM);
setState(100);
((PropositionalRandomVariableDeclarationContext)_localctx).name = constant_name();
setState(101);
match(COLON);
setState(102);
((PropositionalRandomVariableDeclarationContext)_localctx).range = sort_reference();
setState(104);
_la = _input.LA(1);
if (_la==SEMICOLON) {
{
setState(103);
match(SEMICOLON);
}
}
}
break;
case 2:
_localctx = new RelationalRandomVariableDeclarationContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(106);
match(RANDOM);
setState(107);
((RelationalRandomVariableDeclarationContext)_localctx).name = constant_name();
setState(108);
match(COLON);
setState(109);
((RelationalRandomVariableDeclarationContext)_localctx).sort_reference = sort_reference();
((RelationalRandomVariableDeclarationContext)_localctx).parameters.add(((RelationalRandomVariableDeclarationContext)_localctx).sort_reference);
setState(114);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==X) {
{
{
setState(110);
match(X);
setState(111);
((RelationalRandomVariableDeclarationContext)_localctx).sort_reference = sort_reference();
((RelationalRandomVariableDeclarationContext)_localctx).parameters.add(((RelationalRandomVariableDeclarationContext)_localctx).sort_reference);
}
}
setState(116);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(117);
match(MAPPING_RIGHT_ARROW);
setState(118);
((RelationalRandomVariableDeclarationContext)_localctx).range = sort_reference();
setState(120);
_la = _input.LA(1);
if (_la==SEMICOLON) {
{
setState(119);
match(SEMICOLON);
}
}
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class TermContext extends ParserRuleContext {
public TermContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_term; }
public TermContext() { }
public void copyFrom(TermContext ctx) {
super.copyFrom(ctx);
}
}
public static class TypeCardinalityContext extends TermContext {
public List VERTICAL_BAR() { return getTokens(HOGMParser.VERTICAL_BAR); }
public TerminalNode VERTICAL_BAR(int i) {
return getToken(HOGMParser.VERTICAL_BAR, i);
}
public Constant_nameContext constant_name() {
return getRuleContext(Constant_nameContext.class,0);
}
public TypeCardinalityContext(TermContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HOGMVisitor ) return ((HOGMVisitor extends T>)visitor).visitTypeCardinality(this);
else return visitor.visitChildren(this);
}
}
public static class ParenthesesContext extends TermContext {
public TerminalNode OPEN_PAREN() { return getToken(HOGMParser.OPEN_PAREN, 0); }
public TermContext term() {
return getRuleContext(TermContext.class,0);
}
public TerminalNode CLOSE_PAREN() { return getToken(HOGMParser.CLOSE_PAREN, 0); }
public ParenthesesContext(TermContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HOGMVisitor ) return ((HOGMVisitor extends T>)visitor).visitParentheses(this);
else return visitor.visitChildren(this);
}
}
public static class ComparisonContext extends TermContext {
public TermContext leftop;
public Token op;
public TermContext rightop;
public List term() {
return getRuleContexts(TermContext.class);
}
public TermContext term(int i) {
return getRuleContext(TermContext.class,i);
}
public TerminalNode LESS_THAN() { return getToken(HOGMParser.LESS_THAN, 0); }
public TerminalNode LESS_THAN_EQUAL() { return getToken(HOGMParser.LESS_THAN_EQUAL, 0); }
public TerminalNode EQUAL() { return getToken(HOGMParser.EQUAL, 0); }
public TerminalNode NOT_EQUAL() { return getToken(HOGMParser.NOT_EQUAL, 0); }
public TerminalNode GREATER_THAN_EQUAL() { return getToken(HOGMParser.GREATER_THAN_EQUAL, 0); }
public TerminalNode GREATER_THAN() { return getToken(HOGMParser.GREATER_THAN, 0); }
public ComparisonContext(TermContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HOGMVisitor ) return ((HOGMVisitor extends T>)visitor).visitComparison(this);
else return visitor.visitChildren(this);
}
}
public static class ConditionalContext extends TermContext {
public TermContext condition;
public TermContext thenbranch;
public TermContext elsebranch;
public TerminalNode IF() { return getToken(HOGMParser.IF, 0); }
public TerminalNode THEN() { return getToken(HOGMParser.THEN, 0); }
public TerminalNode ELSE() { return getToken(HOGMParser.ELSE, 0); }
public List term() {
return getRuleContexts(TermContext.class);
}
public TermContext term(int i) {
return getRuleContext(TermContext.class,i);
}
public ConditionalContext(TermContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HOGMVisitor ) return ((HOGMVisitor extends T>)visitor).visitConditional(this);
else return visitor.visitChildren(this);
}
}
public static class DisjunctionContext extends TermContext {
public TermContext leftdisj;
public TermContext rightdisj;
public TerminalNode OR() { return getToken(HOGMParser.OR, 0); }
public List term() {
return getRuleContexts(TermContext.class);
}
public TermContext term(int i) {
return getRuleContext(TermContext.class,i);
}
public DisjunctionContext(TermContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HOGMVisitor ) return ((HOGMVisitor extends T>)visitor).visitDisjunction(this);
else return visitor.visitChildren(this);
}
}
public static class ForAllContext extends TermContext {
public Quantifier_indexContext index;
public TermContext body;
public TerminalNode FOR() { return getToken(HOGMParser.FOR, 0); }
public TerminalNode ALL() { return getToken(HOGMParser.ALL, 0); }
public TerminalNode COLON() { return getToken(HOGMParser.COLON, 0); }
public Quantifier_indexContext quantifier_index() {
return getRuleContext(Quantifier_indexContext.class,0);
}
public TermContext term() {
return getRuleContext(TermContext.class,0);
}
public ForAllContext(TermContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HOGMVisitor ) return ((HOGMVisitor extends T>)visitor).visitForAll(this);
else return visitor.visitChildren(this);
}
}
public static class AdditionOrSubtractionContext extends TermContext {
public TermContext leftop;
public Token op;
public TermContext rightop;
public List term() {
return getRuleContexts(TermContext.class);
}
public TermContext term(int i) {
return getRuleContext(TermContext.class,i);
}
public TerminalNode PLUS() { return getToken(HOGMParser.PLUS, 0); }
public TerminalNode SUBTRACT() { return getToken(HOGMParser.SUBTRACT, 0); }
public AdditionOrSubtractionContext(TermContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HOGMVisitor ) return ((HOGMVisitor extends T>)visitor).visitAdditionOrSubtraction(this);
else return visitor.visitChildren(this);
}
}
public static class ShorthandConditionedPotentialContext extends TermContext {
public List term() {
return getRuleContexts(TermContext.class);
}
public TermContext term(int i) {
return getRuleContext(TermContext.class,i);
}
public ShorthandConditionedPotentialContext(TermContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HOGMVisitor ) return ((HOGMVisitor extends T>)visitor).visitShorthandConditionedPotential(this);
else return visitor.visitChildren(this);
}
}
public static class AtomicTermContext extends TermContext {
public SymbolContext symbol() {
return getRuleContext(SymbolContext.class,0);
}
public AtomicTermContext(TermContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HOGMVisitor ) return ((HOGMVisitor extends T>)visitor).visitAtomicTerm(this);
else return visitor.visitChildren(this);
}
}
public static class ExponentiationContext extends TermContext {
public TermContext base;
public TermContext exponent;
public TerminalNode EXPONENTIATION() { return getToken(HOGMParser.EXPONENTIATION, 0); }
public List term() {
return getRuleContexts(TermContext.class);
}
public TermContext term(int i) {
return getRuleContext(TermContext.class,i);
}
public ExponentiationContext(TermContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HOGMVisitor ) return ((HOGMVisitor extends T>)visitor).visitExponentiation(this);
else return visitor.visitChildren(this);
}
}
public static class NotContext extends TermContext {
public TerminalNode NOT() { return getToken(HOGMParser.NOT, 0); }
public TermContext term() {
return getRuleContext(TermContext.class,0);
}
public NotContext(TermContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HOGMVisitor ) return ((HOGMVisitor extends T>)visitor).visitNot(this);
else return visitor.visitChildren(this);
}
}
public static class FunctionApplicationContext extends TermContext {
public Function_applicationContext function_application() {
return getRuleContext(Function_applicationContext.class,0);
}
public FunctionApplicationContext(TermContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HOGMVisitor ) return ((HOGMVisitor extends T>)visitor).visitFunctionApplication(this);
else return visitor.visitChildren(this);
}
}
public static class ConjunctionContext extends TermContext {
public TermContext leftconj;
public TermContext rightconj;
public TerminalNode AND() { return getToken(HOGMParser.AND, 0); }
public List term() {
return getRuleContexts(TermContext.class);
}
public TermContext term(int i) {
return getRuleContext(TermContext.class,i);
}
public ConjunctionContext(TermContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HOGMVisitor ) return ((HOGMVisitor extends T>)visitor).visitConjunction(this);
else return visitor.visitChildren(this);
}
}
public static class ImplicationContext extends TermContext {
public TermContext antecedent;
public TermContext consequent;
public TerminalNode IMPLICATION() { return getToken(HOGMParser.IMPLICATION, 0); }
public List term() {
return getRuleContexts(TermContext.class);
}
public TermContext term(int i) {
return getRuleContext(TermContext.class,i);
}
public ImplicationContext(TermContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HOGMVisitor ) return ((HOGMVisitor extends T>)visitor).visitImplication(this);
else return visitor.visitChildren(this);
}
}
public static class MultiplicationOrDivisionContext extends TermContext {
public TermContext leftop;
public Token op;
public TermContext rightop;
public List term() {
return getRuleContexts(TermContext.class);
}
public TermContext term(int i) {
return getRuleContext(TermContext.class,i);
}
public TerminalNode TIMES() { return getToken(HOGMParser.TIMES, 0); }
public TerminalNode DIVIDE() { return getToken(HOGMParser.DIVIDE, 0); }
public MultiplicationOrDivisionContext(TermContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HOGMVisitor ) return ((HOGMVisitor extends T>)visitor).visitMultiplicationOrDivision(this);
else return visitor.visitChildren(this);
}
}
public static class UnaryMinusContext extends TermContext {
public TerminalNode SUBTRACT() { return getToken(HOGMParser.SUBTRACT, 0); }
public TermContext term() {
return getRuleContext(TermContext.class,0);
}
public UnaryMinusContext(TermContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HOGMVisitor ) return ((HOGMVisitor extends T>)visitor).visitUnaryMinus(this);
else return visitor.visitChildren(this);
}
}
public static class BiconditionalContext extends TermContext {
public TermContext leftop;
public TermContext rightop;
public TerminalNode BICONDITIONAL() { return getToken(HOGMParser.BICONDITIONAL, 0); }
public List term() {
return getRuleContexts(TermContext.class);
}
public TermContext term(int i) {
return getRuleContext(TermContext.class,i);
}
public BiconditionalContext(TermContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HOGMVisitor ) return ((HOGMVisitor extends T>)visitor).visitBiconditional(this);
else return visitor.visitChildren(this);
}
}
public static class ThereExistsContext extends TermContext {
public Quantifier_indexContext index;
public TermContext body;
public TerminalNode THERE() { return getToken(HOGMParser.THERE, 0); }
public TerminalNode EXISTS() { return getToken(HOGMParser.EXISTS, 0); }
public TerminalNode COLON() { return getToken(HOGMParser.COLON, 0); }
public Quantifier_indexContext quantifier_index() {
return getRuleContext(Quantifier_indexContext.class,0);
}
public TermContext term() {
return getRuleContext(TermContext.class,0);
}
public ThereExistsContext(TermContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HOGMVisitor ) return ((HOGMVisitor extends T>)visitor).visitThereExists(this);
else return visitor.visitChildren(this);
}
}
public static class ConditionalUnknownElseBranchContext extends TermContext {
public TermContext condition;
public TermContext thenbranch;
public TerminalNode IF() { return getToken(HOGMParser.IF, 0); }
public TerminalNode THEN() { return getToken(HOGMParser.THEN, 0); }
public List term() {
return getRuleContexts(TermContext.class);
}
public TermContext term(int i) {
return getRuleContext(TermContext.class,i);
}
public ConditionalUnknownElseBranchContext(TermContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HOGMVisitor ) return ((HOGMVisitor extends T>)visitor).visitConditionalUnknownElseBranch(this);
else return visitor.visitChildren(this);
}
}
public final TermContext term() throws RecognitionException {
return term(0);
}
private TermContext term(int _p) throws RecognitionException {
ParserRuleContext _parentctx = _ctx;
int _parentState = getState();
TermContext _localctx = new TermContext(_ctx, _parentState);
TermContext _prevctx = _localctx;
int _startState = 14;
enterRecursionRule(_localctx, 14, RULE_term, _p);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(163);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,14,_ctx) ) {
case 1:
{
_localctx = new UnaryMinusContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(125);
match(SUBTRACT);
setState(126);
term(16);
}
break;
case 2:
{
_localctx = new NotContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(127);
match(NOT);
setState(128);
term(11);
}
break;
case 3:
{
_localctx = new ForAllContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(129);
match(FOR);
setState(130);
match(ALL);
setState(131);
((ForAllContext)_localctx).index = quantifier_index();
setState(132);
match(COLON);
setState(133);
((ForAllContext)_localctx).body = term(6);
}
break;
case 4:
{
_localctx = new ThereExistsContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(135);
match(THERE);
setState(136);
match(EXISTS);
setState(137);
((ThereExistsContext)_localctx).index = quantifier_index();
setState(138);
match(COLON);
setState(139);
((ThereExistsContext)_localctx).body = term(5);
}
break;
case 5:
{
_localctx = new ConditionalUnknownElseBranchContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(141);
match(IF);
setState(142);
((ConditionalUnknownElseBranchContext)_localctx).condition = term(0);
setState(143);
match(THEN);
setState(144);
((ConditionalUnknownElseBranchContext)_localctx).thenbranch = term(3);
}
break;
case 6:
{
_localctx = new ConditionalContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(146);
match(IF);
setState(147);
((ConditionalContext)_localctx).condition = term(0);
setState(148);
match(THEN);
setState(149);
((ConditionalContext)_localctx).thenbranch = term(0);
setState(150);
match(ELSE);
setState(151);
((ConditionalContext)_localctx).elsebranch = term(2);
}
break;
case 7:
{
_localctx = new ParenthesesContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(153);
match(OPEN_PAREN);
setState(154);
term(0);
setState(155);
match(CLOSE_PAREN);
}
break;
case 8:
{
_localctx = new FunctionApplicationContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(157);
function_application();
}
break;
case 9:
{
_localctx = new TypeCardinalityContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(158);
match(VERTICAL_BAR);
setState(159);
constant_name();
setState(160);
match(VERTICAL_BAR);
}
break;
case 10:
{
_localctx = new AtomicTermContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(162);
symbol();
}
break;
}
_ctx.stop = _input.LT(-1);
setState(193);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,16,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
if ( _parseListeners!=null ) triggerExitRuleEvent();
_prevctx = _localctx;
{
setState(191);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,15,_ctx) ) {
case 1:
{
_localctx = new ExponentiationContext(new TermContext(_parentctx, _parentState));
((ExponentiationContext)_localctx).base = _prevctx;
pushNewRecursionContext(_localctx, _startState, RULE_term);
setState(165);
if (!(precpred(_ctx, 15))) throw new FailedPredicateException(this, "precpred(_ctx, 15)");
setState(166);
match(EXPONENTIATION);
setState(167);
((ExponentiationContext)_localctx).exponent = term(15);
}
break;
case 2:
{
_localctx = new MultiplicationOrDivisionContext(new TermContext(_parentctx, _parentState));
((MultiplicationOrDivisionContext)_localctx).leftop = _prevctx;
pushNewRecursionContext(_localctx, _startState, RULE_term);
setState(168);
if (!(precpred(_ctx, 14))) throw new FailedPredicateException(this, "precpred(_ctx, 14)");
setState(169);
((MultiplicationOrDivisionContext)_localctx).op = _input.LT(1);
_la = _input.LA(1);
if ( !(_la==DIVIDE || _la==TIMES) ) {
((MultiplicationOrDivisionContext)_localctx).op = (Token)_errHandler.recoverInline(this);
} else {
consume();
}
setState(170);
((MultiplicationOrDivisionContext)_localctx).rightop = term(15);
}
break;
case 3:
{
_localctx = new AdditionOrSubtractionContext(new TermContext(_parentctx, _parentState));
((AdditionOrSubtractionContext)_localctx).leftop = _prevctx;
pushNewRecursionContext(_localctx, _startState, RULE_term);
setState(171);
if (!(precpred(_ctx, 13))) throw new FailedPredicateException(this, "precpred(_ctx, 13)");
setState(172);
((AdditionOrSubtractionContext)_localctx).op = _input.LT(1);
_la = _input.LA(1);
if ( !(_la==PLUS || _la==SUBTRACT) ) {
((AdditionOrSubtractionContext)_localctx).op = (Token)_errHandler.recoverInline(this);
} else {
consume();
}
setState(173);
((AdditionOrSubtractionContext)_localctx).rightop = term(14);
}
break;
case 4:
{
_localctx = new ComparisonContext(new TermContext(_parentctx, _parentState));
((ComparisonContext)_localctx).leftop = _prevctx;
pushNewRecursionContext(_localctx, _startState, RULE_term);
setState(174);
if (!(precpred(_ctx, 12))) throw new FailedPredicateException(this, "precpred(_ctx, 12)");
setState(175);
((ComparisonContext)_localctx).op = _input.LT(1);
_la = _input.LA(1);
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << LESS_THAN) | (1L << LESS_THAN_EQUAL) | (1L << EQUAL) | (1L << NOT_EQUAL) | (1L << GREATER_THAN_EQUAL) | (1L << GREATER_THAN))) != 0)) ) {
((ComparisonContext)_localctx).op = (Token)_errHandler.recoverInline(this);
} else {
consume();
}
setState(176);
((ComparisonContext)_localctx).rightop = term(13);
}
break;
case 5:
{
_localctx = new ConjunctionContext(new TermContext(_parentctx, _parentState));
((ConjunctionContext)_localctx).leftconj = _prevctx;
pushNewRecursionContext(_localctx, _startState, RULE_term);
setState(177);
if (!(precpred(_ctx, 10))) throw new FailedPredicateException(this, "precpred(_ctx, 10)");
setState(178);
match(AND);
setState(179);
((ConjunctionContext)_localctx).rightconj = term(11);
}
break;
case 6:
{
_localctx = new DisjunctionContext(new TermContext(_parentctx, _parentState));
((DisjunctionContext)_localctx).leftdisj = _prevctx;
pushNewRecursionContext(_localctx, _startState, RULE_term);
setState(180);
if (!(precpred(_ctx, 9))) throw new FailedPredicateException(this, "precpred(_ctx, 9)");
setState(181);
match(OR);
setState(182);
((DisjunctionContext)_localctx).rightdisj = term(10);
}
break;
case 7:
{
_localctx = new ImplicationContext(new TermContext(_parentctx, _parentState));
((ImplicationContext)_localctx).antecedent = _prevctx;
pushNewRecursionContext(_localctx, _startState, RULE_term);
setState(183);
if (!(precpred(_ctx, 8))) throw new FailedPredicateException(this, "precpred(_ctx, 8)");
setState(184);
match(IMPLICATION);
setState(185);
((ImplicationContext)_localctx).consequent = term(8);
}
break;
case 8:
{
_localctx = new BiconditionalContext(new TermContext(_parentctx, _parentState));
((BiconditionalContext)_localctx).leftop = _prevctx;
pushNewRecursionContext(_localctx, _startState, RULE_term);
setState(186);
if (!(precpred(_ctx, 7))) throw new FailedPredicateException(this, "precpred(_ctx, 7)");
setState(187);
match(BICONDITIONAL);
setState(188);
((BiconditionalContext)_localctx).rightop = term(7);
}
break;
case 9:
{
_localctx = new ShorthandConditionedPotentialContext(new TermContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_term);
setState(189);
if (!(precpred(_ctx, 4))) throw new FailedPredicateException(this, "precpred(_ctx, 4)");
setState(190);
term(5);
}
break;
}
}
}
setState(195);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,16,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
unrollRecursionContexts(_parentctx);
}
return _localctx;
}
public static class Function_applicationContext extends ParserRuleContext {
public Functor_nameContext functor;
public TermContext term;
public List args = new ArrayList();
public TerminalNode OPEN_PAREN() { return getToken(HOGMParser.OPEN_PAREN, 0); }
public TerminalNode CLOSE_PAREN() { return getToken(HOGMParser.CLOSE_PAREN, 0); }
public Functor_nameContext functor_name() {
return getRuleContext(Functor_nameContext.class,0);
}
public List term() {
return getRuleContexts(TermContext.class);
}
public TermContext term(int i) {
return getRuleContext(TermContext.class,i);
}
public List COMMA() { return getTokens(HOGMParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(HOGMParser.COMMA, i);
}
public Function_applicationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_function_application; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HOGMVisitor ) return ((HOGMVisitor extends T>)visitor).visitFunction_application(this);
else return visitor.visitChildren(this);
}
}
public final Function_applicationContext function_application() throws RecognitionException {
Function_applicationContext _localctx = new Function_applicationContext(_ctx, getState());
enterRule(_localctx, 16, RULE_function_application);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(196);
((Function_applicationContext)_localctx).functor = functor_name();
setState(197);
match(OPEN_PAREN);
setState(206);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NOT) | (1L << FOR) | (1L << THERE) | (1L << IF) | (1L << X) | (1L << SUBTRACT) | (1L << OPEN_PAREN) | (1L << VERTICAL_BAR) | (1L << INTEGER) | (1L << RATIONAL) | (1L << CONSTANT_STR) | (1L << QUOTED_CONSTANT_STR))) != 0)) {
{
setState(198);
((Function_applicationContext)_localctx).term = term(0);
((Function_applicationContext)_localctx).args.add(((Function_applicationContext)_localctx).term);
setState(203);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==COMMA) {
{
{
setState(199);
match(COMMA);
setState(200);
((Function_applicationContext)_localctx).term = term(0);
((Function_applicationContext)_localctx).args.add(((Function_applicationContext)_localctx).term);
}
}
setState(205);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
}
setState(208);
match(CLOSE_PAREN);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Quantifier_indexContext extends ParserRuleContext {
public Quantifier_index_termContext quantifier_index_term;
public List indexes = new ArrayList();
public Quantifier_index_termContext quantifier_index_term() {
return getRuleContext(Quantifier_index_termContext.class,0);
}
public Quantifier_indexContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_quantifier_index; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HOGMVisitor ) return ((HOGMVisitor extends T>)visitor).visitQuantifier_index(this);
else return visitor.visitChildren(this);
}
}
public final Quantifier_indexContext quantifier_index() throws RecognitionException {
Quantifier_indexContext _localctx = new Quantifier_indexContext(_ctx, getState());
enterRule(_localctx, 18, RULE_quantifier_index);
try {
enterOuterAlt(_localctx, 1);
{
setState(210);
((Quantifier_indexContext)_localctx).quantifier_index_term = quantifier_index_term();
((Quantifier_indexContext)_localctx).indexes.add(((Quantifier_indexContext)_localctx).quantifier_index_term);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Quantifier_index_termContext extends ParserRuleContext {
public Quantifier_index_termContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_quantifier_index_term; }
public Quantifier_index_termContext() { }
public void copyFrom(Quantifier_index_termContext ctx) {
super.copyFrom(ctx);
}
}
public static class QuantifierIndexTermVariableInSortContext extends Quantifier_index_termContext {
public Constant_nameContext variable;
public Sort_nameContext sort;
public TerminalNode IN() { return getToken(HOGMParser.IN, 0); }
public Constant_nameContext constant_name() {
return getRuleContext(Constant_nameContext.class,0);
}
public Sort_nameContext sort_name() {
return getRuleContext(Sort_nameContext.class,0);
}
public QuantifierIndexTermVariableInSortContext(Quantifier_index_termContext ctx) { copyFrom(ctx); }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HOGMVisitor ) return ((HOGMVisitor extends T>)visitor).visitQuantifierIndexTermVariableInSort(this);
else return visitor.visitChildren(this);
}
}
public final Quantifier_index_termContext quantifier_index_term() throws RecognitionException {
Quantifier_index_termContext _localctx = new Quantifier_index_termContext(_ctx, getState());
enterRule(_localctx, 20, RULE_quantifier_index_term);
try {
_localctx = new QuantifierIndexTermVariableInSortContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(212);
((QuantifierIndexTermVariableInSortContext)_localctx).variable = constant_name();
setState(213);
match(IN);
setState(214);
((QuantifierIndexTermVariableInSortContext)_localctx).sort = sort_name();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Sort_nameContext extends ParserRuleContext {
public TerminalNode IN_BUILT_SORT_BOOLEAN() { return getToken(HOGMParser.IN_BUILT_SORT_BOOLEAN, 0); }
public TerminalNode IN_BUILT_SORT_INTEGER() { return getToken(HOGMParser.IN_BUILT_SORT_INTEGER, 0); }
public TerminalNode IN_BUILT_SORT_REAL() { return getToken(HOGMParser.IN_BUILT_SORT_REAL, 0); }
public TerminalNode IN_BUILT_SORT_STRING() { return getToken(HOGMParser.IN_BUILT_SORT_STRING, 0); }
public Constant_nameContext constant_name() {
return getRuleContext(Constant_nameContext.class,0);
}
public Sort_nameContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_sort_name; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HOGMVisitor ) return ((HOGMVisitor extends T>)visitor).visitSort_name(this);
else return visitor.visitChildren(this);
}
}
public final Sort_nameContext sort_name() throws RecognitionException {
Sort_nameContext _localctx = new Sort_nameContext(_ctx, getState());
enterRule(_localctx, 22, RULE_sort_name);
try {
setState(221);
switch (_input.LA(1)) {
case IN_BUILT_SORT_BOOLEAN:
enterOuterAlt(_localctx, 1);
{
setState(216);
match(IN_BUILT_SORT_BOOLEAN);
}
break;
case IN_BUILT_SORT_INTEGER:
enterOuterAlt(_localctx, 2);
{
setState(217);
match(IN_BUILT_SORT_INTEGER);
}
break;
case IN_BUILT_SORT_REAL:
enterOuterAlt(_localctx, 3);
{
setState(218);
match(IN_BUILT_SORT_REAL);
}
break;
case IN_BUILT_SORT_STRING:
enterOuterAlt(_localctx, 4);
{
setState(219);
match(IN_BUILT_SORT_STRING);
}
break;
case X:
case CONSTANT_STR:
case QUOTED_CONSTANT_STR:
enterOuterAlt(_localctx, 5);
{
setState(220);
constant_name();
}
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 Sort_referenceContext extends ParserRuleContext {
public Sort_nameContext sort_name() {
return getRuleContext(Sort_nameContext.class,0);
}
public Sort_number_sub_rangeContext sort_number_sub_range() {
return getRuleContext(Sort_number_sub_rangeContext.class,0);
}
public Sort_referenceContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_sort_reference; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HOGMVisitor ) return ((HOGMVisitor extends T>)visitor).visitSort_reference(this);
else return visitor.visitChildren(this);
}
}
public final Sort_referenceContext sort_reference() throws RecognitionException {
Sort_referenceContext _localctx = new Sort_referenceContext(_ctx, getState());
enterRule(_localctx, 24, RULE_sort_reference);
try {
setState(225);
switch (_input.LA(1)) {
case X:
case IN_BUILT_SORT_BOOLEAN:
case IN_BUILT_SORT_INTEGER:
case IN_BUILT_SORT_REAL:
case IN_BUILT_SORT_STRING:
case CONSTANT_STR:
case QUOTED_CONSTANT_STR:
enterOuterAlt(_localctx, 1);
{
setState(223);
sort_name();
}
break;
case INTEGER:
enterOuterAlt(_localctx, 2);
{
setState(224);
sort_number_sub_range();
}
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 Sort_number_sub_rangeContext extends ParserRuleContext {
public Token start;
public Token end;
public TerminalNode RANGE_SEPARTOR() { return getToken(HOGMParser.RANGE_SEPARTOR, 0); }
public List INTEGER() { return getTokens(HOGMParser.INTEGER); }
public TerminalNode INTEGER(int i) {
return getToken(HOGMParser.INTEGER, i);
}
public Sort_number_sub_rangeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_sort_number_sub_range; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HOGMVisitor ) return ((HOGMVisitor extends T>)visitor).visitSort_number_sub_range(this);
else return visitor.visitChildren(this);
}
}
public final Sort_number_sub_rangeContext sort_number_sub_range() throws RecognitionException {
Sort_number_sub_rangeContext _localctx = new Sort_number_sub_rangeContext(_ctx, getState());
enterRule(_localctx, 26, RULE_sort_number_sub_range);
try {
enterOuterAlt(_localctx, 1);
{
setState(227);
((Sort_number_sub_rangeContext)_localctx).start = match(INTEGER);
setState(228);
match(RANGE_SEPARTOR);
setState(229);
((Sort_number_sub_rangeContext)_localctx).end = match(INTEGER);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Functor_nameContext extends ParserRuleContext {
public Constant_nameContext constant_name() {
return getRuleContext(Constant_nameContext.class,0);
}
public Functor_nameContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_functor_name; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HOGMVisitor ) return ((HOGMVisitor extends T>)visitor).visitFunctor_name(this);
else return visitor.visitChildren(this);
}
}
public final Functor_nameContext functor_name() throws RecognitionException {
Functor_nameContext _localctx = new Functor_nameContext(_ctx, getState());
enterRule(_localctx, 28, RULE_functor_name);
try {
enterOuterAlt(_localctx, 1);
{
setState(231);
constant_name();
}
}
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 Constant_nameContext constant_name() {
return getRuleContext(Constant_nameContext.class,0);
}
public Constant_numberContext constant_number() {
return getRuleContext(Constant_numberContext.class,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 HOGMVisitor ) return ((HOGMVisitor extends T>)visitor).visitSymbol(this);
else return visitor.visitChildren(this);
}
}
public final SymbolContext symbol() throws RecognitionException {
SymbolContext _localctx = new SymbolContext(_ctx, getState());
enterRule(_localctx, 30, RULE_symbol);
try {
setState(235);
switch (_input.LA(1)) {
case X:
case CONSTANT_STR:
case QUOTED_CONSTANT_STR:
enterOuterAlt(_localctx, 1);
{
setState(233);
constant_name();
}
break;
case INTEGER:
case RATIONAL:
enterOuterAlt(_localctx, 2);
{
setState(234);
constant_number();
}
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 Constant_nameContext extends ParserRuleContext {
public TerminalNode X() { return getToken(HOGMParser.X, 0); }
public TerminalNode CONSTANT_STR() { return getToken(HOGMParser.CONSTANT_STR, 0); }
public TerminalNode QUOTED_CONSTANT_STR() { return getToken(HOGMParser.QUOTED_CONSTANT_STR, 0); }
public Constant_nameContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_constant_name; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HOGMVisitor ) return ((HOGMVisitor extends T>)visitor).visitConstant_name(this);
else return visitor.visitChildren(this);
}
}
public final Constant_nameContext constant_name() throws RecognitionException {
Constant_nameContext _localctx = new Constant_nameContext(_ctx, getState());
enterRule(_localctx, 32, RULE_constant_name);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(237);
_la = _input.LA(1);
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << X) | (1L << CONSTANT_STR) | (1L << QUOTED_CONSTANT_STR))) != 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 static class Constant_numberContext extends ParserRuleContext {
public TerminalNode INTEGER() { return getToken(HOGMParser.INTEGER, 0); }
public TerminalNode RATIONAL() { return getToken(HOGMParser.RATIONAL, 0); }
public Constant_numberContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_constant_number; }
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof HOGMVisitor ) return ((HOGMVisitor extends T>)visitor).visitConstant_number(this);
else return visitor.visitChildren(this);
}
}
public final Constant_numberContext constant_number() throws RecognitionException {
Constant_numberContext _localctx = new Constant_numberContext(_ctx, getState());
enterRule(_localctx, 34, RULE_constant_number);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(239);
_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 boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) {
switch (ruleIndex) {
case 7:
return term_sempred((TermContext)_localctx, predIndex);
}
return true;
}
private boolean term_sempred(TermContext _localctx, int predIndex) {
switch (predIndex) {
case 0:
return precpred(_ctx, 15);
case 1:
return precpred(_ctx, 14);
case 2:
return precpred(_ctx, 13);
case 3:
return precpred(_ctx, 12);
case 4:
return precpred(_ctx, 10);
case 5:
return precpred(_ctx, 9);
case 6:
return precpred(_ctx, 8);
case 7:
return precpred(_ctx, 7);
case 8:
return precpred(_ctx, 4);
}
return true;
}
public static final String _serializedATN =
"\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3\62\u00f4\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\3\2\7\2(\n\2\f\2\16\2+\13\2\3\2\3\2\3\3\3\3\3\3\3\4\3\4\3\4"+
"\3\4\5\4\66\n\4\3\5\3\5\3\5\5\5;\n\5\3\6\3\6\3\6\3\6\3\6\3\6\7\6C\n\6"+
"\f\6\16\6F\13\6\5\6H\n\6\3\6\5\6K\n\6\3\7\3\7\3\7\3\7\3\7\5\7R\n\7\3\7"+
"\3\7\3\7\3\7\3\7\3\7\7\7Z\n\7\f\7\16\7]\13\7\3\7\3\7\3\7\5\7b\n\7\5\7"+
"d\n\7\3\b\3\b\3\b\3\b\3\b\5\bk\n\b\3\b\3\b\3\b\3\b\3\b\3\b\7\bs\n\b\f"+
"\b\16\bv\13\b\3\b\3\b\3\b\5\b{\n\b\5\b}\n\b\3\t\3\t\3\t\3\t\3\t\3\t\3"+
"\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t"+
"\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\5\t\u00a6"+
"\n\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3"+
"\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\7\t\u00c2\n\t\f\t\16\t\u00c5\13"+
"\t\3\n\3\n\3\n\3\n\3\n\7\n\u00cc\n\n\f\n\16\n\u00cf\13\n\5\n\u00d1\n\n"+
"\3\n\3\n\3\13\3\13\3\f\3\f\3\f\3\f\3\r\3\r\3\r\3\r\3\r\5\r\u00e0\n\r\3"+
"\16\3\16\5\16\u00e4\n\16\3\17\3\17\3\17\3\17\3\20\3\20\3\21\3\21\5\21"+
"\u00ee\n\21\3\22\3\22\3\23\3\23\3\23\2\3\20\24\2\4\6\b\n\f\16\20\22\24"+
"\26\30\32\34\36 \"$\2\b\4\2\16\16,,\3\2\32\33\3\2\34\35\3\2\36#\4\2\21"+
"\21./\3\2,-\u010a\2)\3\2\2\2\4.\3\2\2\2\6\65\3\2\2\2\b:\3\2\2\2\n<\3\2"+
"\2\2\fc\3\2\2\2\16|\3\2\2\2\20\u00a5\3\2\2\2\22\u00c6\3\2\2\2\24\u00d4"+
"\3\2\2\2\26\u00d6\3\2\2\2\30\u00df\3\2\2\2\32\u00e3\3\2\2\2\34\u00e5\3"+
"\2\2\2\36\u00e9\3\2\2\2 \u00ed\3\2\2\2\"\u00ef\3\2\2\2$\u00f1\3\2\2\2"+
"&(\5\6\4\2\'&\3\2\2\2(+\3\2\2\2)\'\3\2\2\2)*\3\2\2\2*,\3\2\2\2+)\3\2\2"+
"\2,-\7\2\2\3-\3\3\2\2\2./\5\20\t\2/\60\7\2\2\3\60\5\3\2\2\2\61\66\5\b"+
"\5\2\62\63\5\20\t\2\63\64\7&\2\2\64\66\3\2\2\2\65\61\3\2\2\2\65\62\3\2"+
"\2\2\66\7\3\2\2\2\67;\5\n\6\28;\5\f\7\29;\5\16\b\2:\67\3\2\2\2:8\3\2\2"+
"\2:9\3\2\2\2;\t\3\2\2\2<=\7\r\2\2=G\5\30\r\2>?\7\'\2\2?D\t\2\2\2@A\7("+
"\2\2AC\5\"\22\2B@\3\2\2\2CF\3\2\2\2DB\3\2\2\2DE\3\2\2\2EH\3\2\2\2FD\3"+
"\2\2\2G>\3\2\2\2GH\3\2\2\2HJ\3\2\2\2IK\7&\2\2JI\3\2\2\2JK\3\2\2\2K\13"+
"\3\2\2\2LM\7\17\2\2MN\5\"\22\2NO\7\'\2\2OQ\5\32\16\2PR\7&\2\2QP\3\2\2"+
"\2QR\3\2\2\2Rd\3\2\2\2ST\7\17\2\2TU\5\"\22\2UV\7\'\2\2V[\5\32\16\2WX\7"+
"\21\2\2XZ\5\32\16\2YW\3\2\2\2Z]\3\2\2\2[Y\3\2\2\2[\\\3\2\2\2\\^\3\2\2"+
"\2][\3\2\2\2^_\7*\2\2_a\5\32\16\2`b\7&\2\2a`\3\2\2\2ab\3\2\2\2bd\3\2\2"+
"\2cL\3\2\2\2cS\3\2\2\2d\r\3\2\2\2ef\7\20\2\2fg\5\"\22\2gh\7\'\2\2hj\5"+
"\32\16\2ik\7&\2\2ji\3\2\2\2jk\3\2\2\2k}\3\2\2\2lm\7\20\2\2mn\5\"\22\2"+
"no\7\'\2\2ot\5\32\16\2pq\7\21\2\2qs\5\32\16\2rp\3\2\2\2sv\3\2\2\2tr\3"+
"\2\2\2tu\3\2\2\2uw\3\2\2\2vt\3\2\2\2wx\7*\2\2xz\5\32\16\2y{\7&\2\2zy\3"+
"\2\2\2z{\3\2\2\2{}\3\2\2\2|e\3\2\2\2|l\3\2\2\2}\17\3\2\2\2~\177\b\t\1"+
"\2\177\u0080\7\35\2\2\u0080\u00a6\5\20\t\22\u0081\u0082\7\3\2\2\u0082"+
"\u00a6\5\20\t\r\u0083\u0084\7\6\2\2\u0084\u0085\7\7\2\2\u0085\u0086\5"+
"\24\13\2\u0086\u0087\7\'\2\2\u0087\u0088\5\20\t\b\u0088\u00a6\3\2\2\2"+
"\u0089\u008a\7\b\2\2\u008a\u008b\7\t\2\2\u008b\u008c\5\24\13\2\u008c\u008d"+
"\7\'\2\2\u008d\u008e\5\20\t\7\u008e\u00a6\3\2\2\2\u008f\u0090\7\n\2\2"+
"\u0090\u0091\5\20\t\2\u0091\u0092\7\13\2\2\u0092\u0093\5\20\t\5\u0093"+
"\u00a6\3\2\2\2\u0094\u0095\7\n\2\2\u0095\u0096\5\20\t\2\u0096\u0097\7"+
"\13\2\2\u0097\u0098\5\20\t\2\u0098\u0099\7\f\2\2\u0099\u009a\5\20\t\4"+
"\u009a\u00a6\3\2\2\2\u009b\u009c\7$\2\2\u009c\u009d\5\20\t\2\u009d\u009e"+
"\7%\2\2\u009e\u00a6\3\2\2\2\u009f\u00a6\5\22\n\2\u00a0\u00a1\7)\2\2\u00a1"+
"\u00a2\5\"\22\2\u00a2\u00a3\7)\2\2\u00a3\u00a6\3\2\2\2\u00a4\u00a6\5 "+
"\21\2\u00a5~\3\2\2\2\u00a5\u0081\3\2\2\2\u00a5\u0083\3\2\2\2\u00a5\u0089"+
"\3\2\2\2\u00a5\u008f\3\2\2\2\u00a5\u0094\3\2\2\2\u00a5\u009b\3\2\2\2\u00a5"+
"\u009f\3\2\2\2\u00a5\u00a0\3\2\2\2\u00a5\u00a4\3\2\2\2\u00a6\u00c3\3\2"+
"\2\2\u00a7\u00a8\f\21\2\2\u00a8\u00a9\7\31\2\2\u00a9\u00c2\5\20\t\21\u00aa"+
"\u00ab\f\20\2\2\u00ab\u00ac\t\3\2\2\u00ac\u00c2\5\20\t\21\u00ad\u00ae"+
"\f\17\2\2\u00ae\u00af\t\4\2\2\u00af\u00c2\5\20\t\20\u00b0\u00b1\f\16\2"+
"\2\u00b1\u00b2\t\5\2\2\u00b2\u00c2\5\20\t\17\u00b3\u00b4\f\f\2\2\u00b4"+
"\u00b5\7\4\2\2\u00b5\u00c2\5\20\t\r\u00b6\u00b7\f\13\2\2\u00b7\u00b8\7"+
"\5\2\2\u00b8\u00c2\5\20\t\f\u00b9\u00ba\f\n\2\2\u00ba\u00bb\7\27\2\2\u00bb"+
"\u00c2\5\20\t\n\u00bc\u00bd\f\t\2\2\u00bd\u00be\7\30\2\2\u00be\u00c2\5"+
"\20\t\t\u00bf\u00c0\f\6\2\2\u00c0\u00c2\5\20\t\7\u00c1\u00a7\3\2\2\2\u00c1"+
"\u00aa\3\2\2\2\u00c1\u00ad\3\2\2\2\u00c1\u00b0\3\2\2\2\u00c1\u00b3\3\2"+
"\2\2\u00c1\u00b6\3\2\2\2\u00c1\u00b9\3\2\2\2\u00c1\u00bc\3\2\2\2\u00c1"+
"\u00bf\3\2\2\2\u00c2\u00c5\3\2\2\2\u00c3\u00c1\3\2\2\2\u00c3\u00c4\3\2"+
"\2\2\u00c4\21\3\2\2\2\u00c5\u00c3\3\2\2\2\u00c6\u00c7\5\36\20\2\u00c7"+
"\u00d0\7$\2\2\u00c8\u00cd\5\20\t\2\u00c9\u00ca\7(\2\2\u00ca\u00cc\5\20"+
"\t\2\u00cb\u00c9\3\2\2\2\u00cc\u00cf\3\2\2\2\u00cd\u00cb\3\2\2\2\u00cd"+
"\u00ce\3\2\2\2\u00ce\u00d1\3\2\2\2\u00cf\u00cd\3\2\2\2\u00d0\u00c8\3\2"+
"\2\2\u00d0\u00d1\3\2\2\2\u00d1\u00d2\3\2\2\2\u00d2\u00d3\7%\2\2\u00d3"+
"\23\3\2\2\2\u00d4\u00d5\5\26\f\2\u00d5\25\3\2\2\2\u00d6\u00d7\5\"\22\2"+
"\u00d7\u00d8\7\22\2\2\u00d8\u00d9\5\30\r\2\u00d9\27\3\2\2\2\u00da\u00e0"+
"\7\23\2\2\u00db\u00e0\7\24\2\2\u00dc\u00e0\7\25\2\2\u00dd\u00e0\7\26\2"+
"\2\u00de\u00e0\5\"\22\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\31\3\2\2"+
"\2\u00e1\u00e4\5\30\r\2\u00e2\u00e4\5\34\17\2\u00e3\u00e1\3\2\2\2\u00e3"+
"\u00e2\3\2\2\2\u00e4\33\3\2\2\2\u00e5\u00e6\7,\2\2\u00e6\u00e7\7+\2\2"+
"\u00e7\u00e8\7,\2\2\u00e8\35\3\2\2\2\u00e9\u00ea\5\"\22\2\u00ea\37\3\2"+
"\2\2\u00eb\u00ee\5\"\22\2\u00ec\u00ee\5$\23\2\u00ed\u00eb\3\2\2\2\u00ed"+
"\u00ec\3\2\2\2\u00ee!\3\2\2\2\u00ef\u00f0\t\6\2\2\u00f0#\3\2\2\2\u00f1"+
"\u00f2\t\7\2\2\u00f2%\3\2\2\2\30)\65:DGJQ[acjtz|\u00a5\u00c1\u00c3\u00cd"+
"\u00d0\u00df\u00e3\u00ed";
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);
}
}
}