org.eolang.parser.PhiParser Maven / Gradle / Ivy
// Generated from org/eolang/parser/Phi.g4 by ANTLR 4.13.1
package org.eolang.parser;
import org.antlr.v4.runtime.atn.*;
import org.antlr.v4.runtime.dfa.DFA;
import org.antlr.v4.runtime.*;
import org.antlr.v4.runtime.misc.*;
import org.antlr.v4.runtime.tree.*;
import java.util.List;
import java.util.Iterator;
import java.util.ArrayList;
@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast", "CheckReturnValue"})
public class PhiParser extends Parser {
static { RuntimeMetaData.checkVersion("4.13.1", RuntimeMetaData.VERSION); }
protected static final DFA[] _decisionToDFA;
protected static final PredictionContextCache _sharedContextCache =
new PredictionContextCache();
public static final int
WS=1, FUNCTION=2, LCB=3, RCB=4, LSB=5, RSB=6, LB=7, RB=8, DOT=9, COMMA=10,
ARROW=11, DASHED_ARROW=12, ALPHA=13, EMPTY=14, PHI=15, RHO=16, SIGMA=17,
VTX=18, DELTA=19, XI=20, LAMBDA=21, HOME=22, ERROR=23, MINUS=24, INDEX=25,
LABEL=26, BYTES=27;
public static final int
RULE_program = 0, RULE_object = 1, RULE_formation = 2, RULE_bindings = 3,
RULE_binding = 4, RULE_alphaBinding = 5, RULE_attribute = 6, RULE_alphaAttr = 7,
RULE_emptyBinding = 8, RULE_deltaBidning = 9, RULE_lambdaBidning = 10,
RULE_application = 11, RULE_bnds = 12, RULE_dispatch = 13, RULE_disp = 14,
RULE_dispBnds = 15, RULE_attr = 16, RULE_termination = 17;
private static String[] makeRuleNames() {
return new String[] {
"program", "object", "formation", "bindings", "binding", "alphaBinding",
"attribute", "alphaAttr", "emptyBinding", "deltaBidning", "lambdaBidning",
"application", "bnds", "dispatch", "disp", "dispBnds", "attr", "termination"
};
}
public static final String[] ruleNames = makeRuleNames();
private static String[] makeLiteralNames() {
return new String[] {
null, null, null, "'{'", "'}'", "'\\u27E6'", "'\\u27E7'", "'('", "')'",
"'.'", "','", "'\\u21A6'", "'\\u290D'", "'\\u03B1'", "'\\u2205'", "'\\u03C6'",
"'\\u03C1'", "'\\u03C3'", "'\\u03BD'", "'\\u0394'", "'\\u03BE'", "'\\u03BB'",
"'\\u03A6'", "'\\u22A5'", "'-'"
};
}
private static final String[] _LITERAL_NAMES = makeLiteralNames();
private static String[] makeSymbolicNames() {
return new String[] {
null, "WS", "FUNCTION", "LCB", "RCB", "LSB", "RSB", "LB", "RB", "DOT",
"COMMA", "ARROW", "DASHED_ARROW", "ALPHA", "EMPTY", "PHI", "RHO", "SIGMA",
"VTX", "DELTA", "XI", "LAMBDA", "HOME", "ERROR", "MINUS", "INDEX", "LABEL",
"BYTES"
};
}
private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
/**
* @deprecated Use {@link #VOCABULARY} instead.
*/
@Deprecated
public static final String[] tokenNames;
static {
tokenNames = new String[_SYMBOLIC_NAMES.length];
for (int i = 0; i < tokenNames.length; i++) {
tokenNames[i] = VOCABULARY.getLiteralName(i);
if (tokenNames[i] == null) {
tokenNames[i] = VOCABULARY.getSymbolicName(i);
}
if (tokenNames[i] == null) {
tokenNames[i] = "";
}
}
}
@Override
@Deprecated
public String[] getTokenNames() {
return tokenNames;
}
@Override
public Vocabulary getVocabulary() {
return VOCABULARY;
}
@Override
public String getGrammarFileName() { return "Phi.g4"; }
@Override
public String[] getRuleNames() { return ruleNames; }
@Override
public String getSerializedATN() { return _serializedATN; }
@Override
public ATN getATN() { return _ATN; }
public PhiParser(TokenStream input) {
super(input);
_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
@SuppressWarnings("CheckReturnValue")
public static class ProgramContext extends ParserRuleContext {
public TerminalNode HOME() { return getToken(PhiParser.HOME, 0); }
public TerminalNode ARROW() { return getToken(PhiParser.ARROW, 0); }
public ObjectContext object() {
return getRuleContext(ObjectContext.class,0);
}
public TerminalNode LCB() { return getToken(PhiParser.LCB, 0); }
public TerminalNode RCB() { return getToken(PhiParser.RCB, 0); }
public ProgramContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_program; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof PhiListener ) ((PhiListener)listener).enterProgram(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof PhiListener ) ((PhiListener)listener).exitProgram(this);
}
}
public final ProgramContext program() throws RecognitionException {
ProgramContext _localctx = new ProgramContext(_ctx, getState());
enterRule(_localctx, 0, RULE_program);
try {
setState(43);
_errHandler.sync(this);
switch (_input.LA(1)) {
case HOME:
enterOuterAlt(_localctx, 1);
{
setState(36);
match(HOME);
setState(37);
match(ARROW);
setState(38);
object();
}
break;
case LCB:
enterOuterAlt(_localctx, 2);
{
setState(39);
match(LCB);
setState(40);
object();
setState(41);
match(RCB);
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class ObjectContext extends ParserRuleContext {
public FormationContext formation() {
return getRuleContext(FormationContext.class,0);
}
public ApplicationContext application() {
return getRuleContext(ApplicationContext.class,0);
}
public DispatchContext dispatch() {
return getRuleContext(DispatchContext.class,0);
}
public TerminationContext termination() {
return getRuleContext(TerminationContext.class,0);
}
public ObjectContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_object; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof PhiListener ) ((PhiListener)listener).enterObject(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof PhiListener ) ((PhiListener)listener).exitObject(this);
}
}
public final ObjectContext object() throws RecognitionException {
ObjectContext _localctx = new ObjectContext(_ctx, getState());
enterRule(_localctx, 2, RULE_object);
try {
setState(49);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,1,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(45);
formation();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(46);
application();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(47);
dispatch();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(48);
termination();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class FormationContext extends ParserRuleContext {
public TerminalNode LSB() { return getToken(PhiParser.LSB, 0); }
public BindingsContext bindings() {
return getRuleContext(BindingsContext.class,0);
}
public TerminalNode RSB() { return getToken(PhiParser.RSB, 0); }
public FormationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_formation; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof PhiListener ) ((PhiListener)listener).enterFormation(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof PhiListener ) ((PhiListener)listener).exitFormation(this);
}
}
public final FormationContext formation() throws RecognitionException {
FormationContext _localctx = new FormationContext(_ctx, getState());
enterRule(_localctx, 4, RULE_formation);
try {
enterOuterAlt(_localctx, 1);
{
setState(51);
match(LSB);
setState(52);
bindings();
setState(53);
match(RSB);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class BindingsContext extends ParserRuleContext {
public List binding() {
return getRuleContexts(BindingContext.class);
}
public BindingContext binding(int i) {
return getRuleContext(BindingContext.class,i);
}
public List COMMA() { return getTokens(PhiParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(PhiParser.COMMA, i);
}
public BindingsContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_bindings; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof PhiListener ) ((PhiListener)listener).enterBindings(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof PhiListener ) ((PhiListener)listener).exitBindings(this);
}
}
public final BindingsContext bindings() throws RecognitionException {
BindingsContext _localctx = new BindingsContext(_ctx, getState());
enterRule(_localctx, 6, RULE_bindings);
int _la;
try {
setState(66);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,4,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(56);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 70230016L) != 0)) {
{
setState(55);
binding();
}
}
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(58);
binding();
setState(63);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==COMMA) {
{
{
setState(59);
match(COMMA);
setState(60);
binding();
}
}
setState(65);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class BindingContext extends ParserRuleContext {
public AlphaBindingContext alphaBinding() {
return getRuleContext(AlphaBindingContext.class,0);
}
public EmptyBindingContext emptyBinding() {
return getRuleContext(EmptyBindingContext.class,0);
}
public DeltaBidningContext deltaBidning() {
return getRuleContext(DeltaBidningContext.class,0);
}
public LambdaBidningContext lambdaBidning() {
return getRuleContext(LambdaBidningContext.class,0);
}
public BindingContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_binding; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof PhiListener ) ((PhiListener)listener).enterBinding(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof PhiListener ) ((PhiListener)listener).exitBinding(this);
}
}
public final BindingContext binding() throws RecognitionException {
BindingContext _localctx = new BindingContext(_ctx, getState());
enterRule(_localctx, 8, RULE_binding);
try {
setState(72);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,5,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(68);
alphaBinding();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(69);
emptyBinding();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(70);
deltaBidning();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(71);
lambdaBidning();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class AlphaBindingContext extends ParserRuleContext {
public AttributeContext attribute() {
return getRuleContext(AttributeContext.class,0);
}
public TerminalNode ARROW() { return getToken(PhiParser.ARROW, 0); }
public ObjectContext object() {
return getRuleContext(ObjectContext.class,0);
}
public AlphaBindingContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_alphaBinding; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof PhiListener ) ((PhiListener)listener).enterAlphaBinding(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof PhiListener ) ((PhiListener)listener).exitAlphaBinding(this);
}
}
public final AlphaBindingContext alphaBinding() throws RecognitionException {
AlphaBindingContext _localctx = new AlphaBindingContext(_ctx, getState());
enterRule(_localctx, 10, RULE_alphaBinding);
try {
enterOuterAlt(_localctx, 1);
{
setState(74);
attribute();
setState(75);
match(ARROW);
setState(76);
object();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class AttributeContext extends ParserRuleContext {
public TerminalNode PHI() { return getToken(PhiParser.PHI, 0); }
public TerminalNode RHO() { return getToken(PhiParser.RHO, 0); }
public TerminalNode SIGMA() { return getToken(PhiParser.SIGMA, 0); }
public TerminalNode VTX() { return getToken(PhiParser.VTX, 0); }
public TerminalNode LABEL() { return getToken(PhiParser.LABEL, 0); }
public AlphaAttrContext alphaAttr() {
return getRuleContext(AlphaAttrContext.class,0);
}
public AttributeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_attribute; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof PhiListener ) ((PhiListener)listener).enterAttribute(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof PhiListener ) ((PhiListener)listener).exitAttribute(this);
}
}
public final AttributeContext attribute() throws RecognitionException {
AttributeContext _localctx = new AttributeContext(_ctx, getState());
enterRule(_localctx, 12, RULE_attribute);
try {
setState(84);
_errHandler.sync(this);
switch (_input.LA(1)) {
case PHI:
enterOuterAlt(_localctx, 1);
{
setState(78);
match(PHI);
}
break;
case RHO:
enterOuterAlt(_localctx, 2);
{
setState(79);
match(RHO);
}
break;
case SIGMA:
enterOuterAlt(_localctx, 3);
{
setState(80);
match(SIGMA);
}
break;
case VTX:
enterOuterAlt(_localctx, 4);
{
setState(81);
match(VTX);
}
break;
case LABEL:
enterOuterAlt(_localctx, 5);
{
setState(82);
match(LABEL);
}
break;
case ALPHA:
enterOuterAlt(_localctx, 6);
{
setState(83);
alphaAttr();
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class AlphaAttrContext extends ParserRuleContext {
public TerminalNode ALPHA() { return getToken(PhiParser.ALPHA, 0); }
public TerminalNode INDEX() { return getToken(PhiParser.INDEX, 0); }
public AlphaAttrContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_alphaAttr; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof PhiListener ) ((PhiListener)listener).enterAlphaAttr(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof PhiListener ) ((PhiListener)listener).exitAlphaAttr(this);
}
}
public final AlphaAttrContext alphaAttr() throws RecognitionException {
AlphaAttrContext _localctx = new AlphaAttrContext(_ctx, getState());
enterRule(_localctx, 14, RULE_alphaAttr);
try {
enterOuterAlt(_localctx, 1);
{
setState(86);
match(ALPHA);
setState(87);
match(INDEX);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class EmptyBindingContext extends ParserRuleContext {
public AttributeContext attribute() {
return getRuleContext(AttributeContext.class,0);
}
public TerminalNode ARROW() { return getToken(PhiParser.ARROW, 0); }
public TerminalNode EMPTY() { return getToken(PhiParser.EMPTY, 0); }
public EmptyBindingContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_emptyBinding; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof PhiListener ) ((PhiListener)listener).enterEmptyBinding(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof PhiListener ) ((PhiListener)listener).exitEmptyBinding(this);
}
}
public final EmptyBindingContext emptyBinding() throws RecognitionException {
EmptyBindingContext _localctx = new EmptyBindingContext(_ctx, getState());
enterRule(_localctx, 16, RULE_emptyBinding);
try {
enterOuterAlt(_localctx, 1);
{
setState(89);
attribute();
setState(90);
match(ARROW);
setState(91);
match(EMPTY);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class DeltaBidningContext extends ParserRuleContext {
public TerminalNode DELTA() { return getToken(PhiParser.DELTA, 0); }
public TerminalNode DASHED_ARROW() { return getToken(PhiParser.DASHED_ARROW, 0); }
public TerminalNode BYTES() { return getToken(PhiParser.BYTES, 0); }
public DeltaBidningContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_deltaBidning; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof PhiListener ) ((PhiListener)listener).enterDeltaBidning(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof PhiListener ) ((PhiListener)listener).exitDeltaBidning(this);
}
}
public final DeltaBidningContext deltaBidning() throws RecognitionException {
DeltaBidningContext _localctx = new DeltaBidningContext(_ctx, getState());
enterRule(_localctx, 18, RULE_deltaBidning);
try {
enterOuterAlt(_localctx, 1);
{
setState(93);
match(DELTA);
setState(94);
match(DASHED_ARROW);
setState(95);
match(BYTES);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class LambdaBidningContext extends ParserRuleContext {
public TerminalNode LAMBDA() { return getToken(PhiParser.LAMBDA, 0); }
public TerminalNode DASHED_ARROW() { return getToken(PhiParser.DASHED_ARROW, 0); }
public TerminalNode FUNCTION() { return getToken(PhiParser.FUNCTION, 0); }
public LambdaBidningContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_lambdaBidning; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof PhiListener ) ((PhiListener)listener).enterLambdaBidning(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof PhiListener ) ((PhiListener)listener).exitLambdaBidning(this);
}
}
public final LambdaBidningContext lambdaBidning() throws RecognitionException {
LambdaBidningContext _localctx = new LambdaBidningContext(_ctx, getState());
enterRule(_localctx, 20, RULE_lambdaBidning);
try {
enterOuterAlt(_localctx, 1);
{
setState(97);
match(LAMBDA);
setState(98);
match(DASHED_ARROW);
setState(99);
match(FUNCTION);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class ApplicationContext extends ParserRuleContext {
public BndsContext bnds() {
return getRuleContext(BndsContext.class,0);
}
public FormationContext formation() {
return getRuleContext(FormationContext.class,0);
}
public DispatchContext dispatch() {
return getRuleContext(DispatchContext.class,0);
}
public TerminationContext termination() {
return getRuleContext(TerminationContext.class,0);
}
public ApplicationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_application; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof PhiListener ) ((PhiListener)listener).enterApplication(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof PhiListener ) ((PhiListener)listener).exitApplication(this);
}
}
public final ApplicationContext application() throws RecognitionException {
ApplicationContext _localctx = new ApplicationContext(_ctx, getState());
enterRule(_localctx, 22, RULE_application);
try {
enterOuterAlt(_localctx, 1);
{
setState(104);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,7,_ctx) ) {
case 1:
{
setState(101);
formation();
}
break;
case 2:
{
setState(102);
dispatch();
}
break;
case 3:
{
setState(103);
termination();
}
break;
}
setState(106);
bnds();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class BndsContext extends ParserRuleContext {
public List LB() { return getTokens(PhiParser.LB); }
public TerminalNode LB(int i) {
return getToken(PhiParser.LB, i);
}
public List bindings() {
return getRuleContexts(BindingsContext.class);
}
public BindingsContext bindings(int i) {
return getRuleContext(BindingsContext.class,i);
}
public List RB() { return getTokens(PhiParser.RB); }
public TerminalNode RB(int i) {
return getToken(PhiParser.RB, i);
}
public BndsContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_bnds; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof PhiListener ) ((PhiListener)listener).enterBnds(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof PhiListener ) ((PhiListener)listener).exitBnds(this);
}
}
public final BndsContext bnds() throws RecognitionException {
BndsContext _localctx = new BndsContext(_ctx, getState());
enterRule(_localctx, 24, RULE_bnds);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(112);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
setState(108);
match(LB);
setState(109);
bindings();
setState(110);
match(RB);
}
}
setState(114);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( _la==LB );
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class DispatchContext extends ParserRuleContext {
public DispContext disp() {
return getRuleContext(DispContext.class,0);
}
public FormationContext formation() {
return getRuleContext(FormationContext.class,0);
}
public TerminationContext termination() {
return getRuleContext(TerminationContext.class,0);
}
public BndsContext bnds() {
return getRuleContext(BndsContext.class,0);
}
public List attr() {
return getRuleContexts(AttrContext.class);
}
public AttrContext attr(int i) {
return getRuleContext(AttrContext.class,i);
}
public TerminalNode HOME() { return getToken(PhiParser.HOME, 0); }
public TerminalNode XI() { return getToken(PhiParser.XI, 0); }
public DispatchContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_dispatch; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof PhiListener ) ((PhiListener)listener).enterDispatch(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof PhiListener ) ((PhiListener)listener).exitDispatch(this);
}
}
public final DispatchContext dispatch() throws RecognitionException {
DispatchContext _localctx = new DispatchContext(_ctx, getState());
enterRule(_localctx, 26, RULE_dispatch);
int _la;
try {
setState(140);
_errHandler.sync(this);
switch (_input.LA(1)) {
case LSB:
case ERROR:
enterOuterAlt(_localctx, 1);
{
setState(118);
_errHandler.sync(this);
switch (_input.LA(1)) {
case LSB:
{
setState(116);
formation();
}
break;
case ERROR:
{
setState(117);
termination();
}
break;
default:
throw new NoViableAltException(this);
}
setState(121);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==LB) {
{
setState(120);
bnds();
}
}
setState(124);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
setState(123);
attr();
}
}
setState(126);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( _la==DOT );
setState(128);
disp();
}
break;
case XI:
case HOME:
enterOuterAlt(_localctx, 2);
{
setState(130);
_la = _input.LA(1);
if ( !(_la==XI || _la==HOME) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(138);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==DOT) {
{
setState(132);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
setState(131);
attr();
}
}
setState(134);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( _la==DOT );
setState(136);
disp();
}
}
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class DispContext extends ParserRuleContext {
public DispBndsContext dispBnds() {
return getRuleContext(DispBndsContext.class,0);
}
public DispContext disp() {
return getRuleContext(DispContext.class,0);
}
public List attr() {
return getRuleContexts(AttrContext.class);
}
public AttrContext attr(int i) {
return getRuleContext(AttrContext.class,i);
}
public DispContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_disp; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof PhiListener ) ((PhiListener)listener).enterDisp(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof PhiListener ) ((PhiListener)listener).exitDisp(this);
}
}
public final DispContext disp() throws RecognitionException {
DispContext _localctx = new DispContext(_ctx, getState());
enterRule(_localctx, 28, RULE_disp);
int _la;
try {
setState(151);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,16,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(143);
dispBnds();
setState(145);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
setState(144);
attr();
}
}
setState(147);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( _la==DOT );
setState(149);
disp();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class DispBndsContext extends ParserRuleContext {
public BndsContext bnds() {
return getRuleContext(BndsContext.class,0);
}
public DispBndsContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_dispBnds; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof PhiListener ) ((PhiListener)listener).enterDispBnds(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof PhiListener ) ((PhiListener)listener).exitDispBnds(this);
}
}
public final DispBndsContext dispBnds() throws RecognitionException {
DispBndsContext _localctx = new DispBndsContext(_ctx, getState());
enterRule(_localctx, 30, RULE_dispBnds);
try {
enterOuterAlt(_localctx, 1);
{
setState(153);
bnds();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class AttrContext extends ParserRuleContext {
public TerminalNode DOT() { return getToken(PhiParser.DOT, 0); }
public AttributeContext attribute() {
return getRuleContext(AttributeContext.class,0);
}
public AttrContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_attr; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof PhiListener ) ((PhiListener)listener).enterAttr(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof PhiListener ) ((PhiListener)listener).exitAttr(this);
}
}
public final AttrContext attr() throws RecognitionException {
AttrContext _localctx = new AttrContext(_ctx, getState());
enterRule(_localctx, 32, RULE_attr);
try {
enterOuterAlt(_localctx, 1);
{
setState(155);
match(DOT);
setState(156);
attribute();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class TerminationContext extends ParserRuleContext {
public TerminalNode ERROR() { return getToken(PhiParser.ERROR, 0); }
public TerminationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_termination; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof PhiListener ) ((PhiListener)listener).enterTermination(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof PhiListener ) ((PhiListener)listener).exitTermination(this);
}
}
public final TerminationContext termination() throws RecognitionException {
TerminationContext _localctx = new TerminationContext(_ctx, getState());
enterRule(_localctx, 34, RULE_termination);
try {
enterOuterAlt(_localctx, 1);
{
setState(158);
match(ERROR);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static final String _serializedATN =
"\u0004\u0001\u001b\u00a1\u0002\u0000\u0007\u0000\u0002\u0001\u0007\u0001"+
"\u0002\u0002\u0007\u0002\u0002\u0003\u0007\u0003\u0002\u0004\u0007\u0004"+
"\u0002\u0005\u0007\u0005\u0002\u0006\u0007\u0006\u0002\u0007\u0007\u0007"+
"\u0002\b\u0007\b\u0002\t\u0007\t\u0002\n\u0007\n\u0002\u000b\u0007\u000b"+
"\u0002\f\u0007\f\u0002\r\u0007\r\u0002\u000e\u0007\u000e\u0002\u000f\u0007"+
"\u000f\u0002\u0010\u0007\u0010\u0002\u0011\u0007\u0011\u0001\u0000\u0001"+
"\u0000\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0000\u0003"+
"\u0000,\b\u0000\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0003"+
"\u00012\b\u0001\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001"+
"\u0003\u0003\u00039\b\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0005"+
"\u0003>\b\u0003\n\u0003\f\u0003A\t\u0003\u0003\u0003C\b\u0003\u0001\u0004"+
"\u0001\u0004\u0001\u0004\u0001\u0004\u0003\u0004I\b\u0004\u0001\u0005"+
"\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0006\u0001\u0006\u0001\u0006"+
"\u0001\u0006\u0001\u0006\u0001\u0006\u0003\u0006U\b\u0006\u0001\u0007"+
"\u0001\u0007\u0001\u0007\u0001\b\u0001\b\u0001\b\u0001\b\u0001\t\u0001"+
"\t\u0001\t\u0001\t\u0001\n\u0001\n\u0001\n\u0001\n\u0001\u000b\u0001\u000b"+
"\u0001\u000b\u0003\u000bi\b\u000b\u0001\u000b\u0001\u000b\u0001\f\u0001"+
"\f\u0001\f\u0001\f\u0004\fq\b\f\u000b\f\f\fr\u0001\r\u0001\r\u0003\rw"+
"\b\r\u0001\r\u0003\rz\b\r\u0001\r\u0004\r}\b\r\u000b\r\f\r~\u0001\r\u0001"+
"\r\u0001\r\u0001\r\u0004\r\u0085\b\r\u000b\r\f\r\u0086\u0001\r\u0001\r"+
"\u0003\r\u008b\b\r\u0003\r\u008d\b\r\u0001\u000e\u0001\u000e\u0001\u000e"+
"\u0004\u000e\u0092\b\u000e\u000b\u000e\f\u000e\u0093\u0001\u000e\u0001"+
"\u000e\u0003\u000e\u0098\b\u000e\u0001\u000f\u0001\u000f\u0001\u0010\u0001"+
"\u0010\u0001\u0010\u0001\u0011\u0001\u0011\u0001\u0011\u0000\u0000\u0012"+
"\u0000\u0002\u0004\u0006\b\n\f\u000e\u0010\u0012\u0014\u0016\u0018\u001a"+
"\u001c\u001e \"\u0000\u0001\u0002\u0000\u0014\u0014\u0016\u0016\u00a8"+
"\u0000+\u0001\u0000\u0000\u0000\u00021\u0001\u0000\u0000\u0000\u00043"+
"\u0001\u0000\u0000\u0000\u0006B\u0001\u0000\u0000\u0000\bH\u0001\u0000"+
"\u0000\u0000\nJ\u0001\u0000\u0000\u0000\fT\u0001\u0000\u0000\u0000\u000e"+
"V\u0001\u0000\u0000\u0000\u0010Y\u0001\u0000\u0000\u0000\u0012]\u0001"+
"\u0000\u0000\u0000\u0014a\u0001\u0000\u0000\u0000\u0016h\u0001\u0000\u0000"+
"\u0000\u0018p\u0001\u0000\u0000\u0000\u001a\u008c\u0001\u0000\u0000\u0000"+
"\u001c\u0097\u0001\u0000\u0000\u0000\u001e\u0099\u0001\u0000\u0000\u0000"+
" \u009b\u0001\u0000\u0000\u0000\"\u009e\u0001\u0000\u0000\u0000$%\u0005"+
"\u0016\u0000\u0000%&\u0005\u000b\u0000\u0000&,\u0003\u0002\u0001\u0000"+
"\'(\u0005\u0003\u0000\u0000()\u0003\u0002\u0001\u0000)*\u0005\u0004\u0000"+
"\u0000*,\u0001\u0000\u0000\u0000+$\u0001\u0000\u0000\u0000+\'\u0001\u0000"+
"\u0000\u0000,\u0001\u0001\u0000\u0000\u0000-2\u0003\u0004\u0002\u0000"+
".2\u0003\u0016\u000b\u0000/2\u0003\u001a\r\u000002\u0003\"\u0011\u0000"+
"1-\u0001\u0000\u0000\u00001.\u0001\u0000\u0000\u00001/\u0001\u0000\u0000"+
"\u000010\u0001\u0000\u0000\u00002\u0003\u0001\u0000\u0000\u000034\u0005"+
"\u0005\u0000\u000045\u0003\u0006\u0003\u000056\u0005\u0006\u0000\u0000"+
"6\u0005\u0001\u0000\u0000\u000079\u0003\b\u0004\u000087\u0001\u0000\u0000"+
"\u000089\u0001\u0000\u0000\u00009C\u0001\u0000\u0000\u0000:?\u0003\b\u0004"+
"\u0000;<\u0005\n\u0000\u0000<>\u0003\b\u0004\u0000=;\u0001\u0000\u0000"+
"\u0000>A\u0001\u0000\u0000\u0000?=\u0001\u0000\u0000\u0000?@\u0001\u0000"+
"\u0000\u0000@C\u0001\u0000\u0000\u0000A?\u0001\u0000\u0000\u0000B8\u0001"+
"\u0000\u0000\u0000B:\u0001\u0000\u0000\u0000C\u0007\u0001\u0000\u0000"+
"\u0000DI\u0003\n\u0005\u0000EI\u0003\u0010\b\u0000FI\u0003\u0012\t\u0000"+
"GI\u0003\u0014\n\u0000HD\u0001\u0000\u0000\u0000HE\u0001\u0000\u0000\u0000"+
"HF\u0001\u0000\u0000\u0000HG\u0001\u0000\u0000\u0000I\t\u0001\u0000\u0000"+
"\u0000JK\u0003\f\u0006\u0000KL\u0005\u000b\u0000\u0000LM\u0003\u0002\u0001"+
"\u0000M\u000b\u0001\u0000\u0000\u0000NU\u0005\u000f\u0000\u0000OU\u0005"+
"\u0010\u0000\u0000PU\u0005\u0011\u0000\u0000QU\u0005\u0012\u0000\u0000"+
"RU\u0005\u001a\u0000\u0000SU\u0003\u000e\u0007\u0000TN\u0001\u0000\u0000"+
"\u0000TO\u0001\u0000\u0000\u0000TP\u0001\u0000\u0000\u0000TQ\u0001\u0000"+
"\u0000\u0000TR\u0001\u0000\u0000\u0000TS\u0001\u0000\u0000\u0000U\r\u0001"+
"\u0000\u0000\u0000VW\u0005\r\u0000\u0000WX\u0005\u0019\u0000\u0000X\u000f"+
"\u0001\u0000\u0000\u0000YZ\u0003\f\u0006\u0000Z[\u0005\u000b\u0000\u0000"+
"[\\\u0005\u000e\u0000\u0000\\\u0011\u0001\u0000\u0000\u0000]^\u0005\u0013"+
"\u0000\u0000^_\u0005\f\u0000\u0000_`\u0005\u001b\u0000\u0000`\u0013\u0001"+
"\u0000\u0000\u0000ab\u0005\u0015\u0000\u0000bc\u0005\f\u0000\u0000cd\u0005"+
"\u0002\u0000\u0000d\u0015\u0001\u0000\u0000\u0000ei\u0003\u0004\u0002"+
"\u0000fi\u0003\u001a\r\u0000gi\u0003\"\u0011\u0000he\u0001\u0000\u0000"+
"\u0000hf\u0001\u0000\u0000\u0000hg\u0001\u0000\u0000\u0000ij\u0001\u0000"+
"\u0000\u0000jk\u0003\u0018\f\u0000k\u0017\u0001\u0000\u0000\u0000lm\u0005"+
"\u0007\u0000\u0000mn\u0003\u0006\u0003\u0000no\u0005\b\u0000\u0000oq\u0001"+
"\u0000\u0000\u0000pl\u0001\u0000\u0000\u0000qr\u0001\u0000\u0000\u0000"+
"rp\u0001\u0000\u0000\u0000rs\u0001\u0000\u0000\u0000s\u0019\u0001\u0000"+
"\u0000\u0000tw\u0003\u0004\u0002\u0000uw\u0003\"\u0011\u0000vt\u0001\u0000"+
"\u0000\u0000vu\u0001\u0000\u0000\u0000wy\u0001\u0000\u0000\u0000xz\u0003"+
"\u0018\f\u0000yx\u0001\u0000\u0000\u0000yz\u0001\u0000\u0000\u0000z|\u0001"+
"\u0000\u0000\u0000{}\u0003 \u0010\u0000|{\u0001\u0000\u0000\u0000}~\u0001"+
"\u0000\u0000\u0000~|\u0001\u0000\u0000\u0000~\u007f\u0001\u0000\u0000"+
"\u0000\u007f\u0080\u0001\u0000\u0000\u0000\u0080\u0081\u0003\u001c\u000e"+
"\u0000\u0081\u008d\u0001\u0000\u0000\u0000\u0082\u008a\u0007\u0000\u0000"+
"\u0000\u0083\u0085\u0003 \u0010\u0000\u0084\u0083\u0001\u0000\u0000\u0000"+
"\u0085\u0086\u0001\u0000\u0000\u0000\u0086\u0084\u0001\u0000\u0000\u0000"+
"\u0086\u0087\u0001\u0000\u0000\u0000\u0087\u0088\u0001\u0000\u0000\u0000"+
"\u0088\u0089\u0003\u001c\u000e\u0000\u0089\u008b\u0001\u0000\u0000\u0000"+
"\u008a\u0084\u0001\u0000\u0000\u0000\u008a\u008b\u0001\u0000\u0000\u0000"+
"\u008b\u008d\u0001\u0000\u0000\u0000\u008cv\u0001\u0000\u0000\u0000\u008c"+
"\u0082\u0001\u0000\u0000\u0000\u008d\u001b\u0001\u0000\u0000\u0000\u008e"+
"\u0098\u0001\u0000\u0000\u0000\u008f\u0091\u0003\u001e\u000f\u0000\u0090"+
"\u0092\u0003 \u0010\u0000\u0091\u0090\u0001\u0000\u0000\u0000\u0092\u0093"+
"\u0001\u0000\u0000\u0000\u0093\u0091\u0001\u0000\u0000\u0000\u0093\u0094"+
"\u0001\u0000\u0000\u0000\u0094\u0095\u0001\u0000\u0000\u0000\u0095\u0096"+
"\u0003\u001c\u000e\u0000\u0096\u0098\u0001\u0000\u0000\u0000\u0097\u008e"+
"\u0001\u0000\u0000\u0000\u0097\u008f\u0001\u0000\u0000\u0000\u0098\u001d"+
"\u0001\u0000\u0000\u0000\u0099\u009a\u0003\u0018\f\u0000\u009a\u001f\u0001"+
"\u0000\u0000\u0000\u009b\u009c\u0005\t\u0000\u0000\u009c\u009d\u0003\f"+
"\u0006\u0000\u009d!\u0001\u0000\u0000\u0000\u009e\u009f\u0005\u0017\u0000"+
"\u0000\u009f#\u0001\u0000\u0000\u0000\u0011+18?BHThrvy~\u0086\u008a\u008c"+
"\u0093\u0097";
public static final ATN _ATN =
new ATNDeserializer().deserialize(_serializedATN.toCharArray());
static {
_decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
_decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy