All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eolang.parser.PhiParser Maven / Gradle / Ivy

There is a newer version: 0.39.1
Show newest version
// 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, DELTA=17, 
		XI=18, LAMBDA=19, HOME=20, ERROR=21, MINUS=22, INDEX=23, LABEL=24, BYTES=25;
	public static final int
		RULE_program = 0, RULE_object = 1, RULE_formation = 2, RULE_scoped = 3, 
		RULE_bindings = 4, RULE_binding = 5, RULE_alphaBinding = 6, RULE_attribute = 7, 
		RULE_alphaAttr = 8, RULE_emptyBinding = 9, RULE_deltaBinding = 10, RULE_lambdaBinding = 11, 
		RULE_application = 12, RULE_dispatch = 13, RULE_applicationsOrDispatches = 14, 
		RULE_termination = 15;
	private static String[] makeRuleNames() {
		return new String[] {
			"program", "object", "formation", "scoped", "bindings", "binding", "alphaBinding", 
			"attribute", "alphaAttr", "emptyBinding", "deltaBinding", "lambdaBinding", 
			"application", "dispatch", "applicationsOrDispatches", "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'", "'\\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", "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(39);
			_errHandler.sync(this);
			switch (_input.LA(1)) {
			case HOME:
				enterOuterAlt(_localctx, 1);
				{
				setState(32);
				match(HOME);
				setState(33);
				match(ARROW);
				setState(34);
				object();
				}
				break;
			case LCB:
				enterOuterAlt(_localctx, 2);
				{
				setState(35);
				match(LCB);
				setState(36);
				object();
				setState(37);
				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 ApplicationsOrDispatchesContext applicationsOrDispatches() {
			return getRuleContext(ApplicationsOrDispatchesContext.class,0);
		}
		public ScopedContext scoped() {
			return getRuleContext(ScopedContext.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);
		int _la;
		try {
			setState(51);
			_errHandler.sync(this);
			switch (_input.LA(1)) {
			case LSB:
				enterOuterAlt(_localctx, 1);
				{
				setState(41);
				formation();
				setState(42);
				applicationsOrDispatches();
				}
				break;
			case XI:
			case HOME:
				enterOuterAlt(_localctx, 2);
				{
				setState(44);
				scoped();
				setState(48);
				_errHandler.sync(this);
				_la = _input.LA(1);
				if (_la==DOT) {
					{
					setState(45);
					dispatch();
					setState(46);
					applicationsOrDispatches();
					}
				}

				}
				break;
			case ERROR:
				enterOuterAlt(_localctx, 3);
				{
				setState(50);
				termination();
				}
				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 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(53);
			match(LSB);
			setState(54);
			bindings();
			setState(55);
			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 ScopedContext extends ParserRuleContext {
		public TerminalNode XI() { return getToken(PhiParser.XI, 0); }
		public TerminalNode HOME() { return getToken(PhiParser.HOME, 0); }
		public ScopedContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_scoped; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof PhiListener ) ((PhiListener)listener).enterScoped(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof PhiListener ) ((PhiListener)listener).exitScoped(this);
		}
	}

	public final ScopedContext scoped() throws RecognitionException {
		ScopedContext _localctx = new ScopedContext(_ctx, getState());
		enterRule(_localctx, 6, RULE_scoped);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(57);
			_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();
			}
			}
		}
		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, 8, RULE_bindings);
		int _la;
		try {
			setState(70);
			_errHandler.sync(this);
			switch ( getInterpreter().adaptivePredict(_input,5,_ctx) ) {
			case 1:
				enterOuterAlt(_localctx, 1);
				{
				setState(60);
				_errHandler.sync(this);
				_la = _input.LA(1);
				if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 17539072L) != 0)) {
					{
					setState(59);
					binding();
					}
				}

				}
				break;
			case 2:
				enterOuterAlt(_localctx, 2);
				{
				setState(62);
				binding();
				setState(67);
				_errHandler.sync(this);
				_la = _input.LA(1);
				while (_la==COMMA) {
					{
					{
					setState(63);
					match(COMMA);
					setState(64);
					binding();
					}
					}
					setState(69);
					_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 DeltaBindingContext deltaBinding() {
			return getRuleContext(DeltaBindingContext.class,0);
		}
		public LambdaBindingContext lambdaBinding() {
			return getRuleContext(LambdaBindingContext.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, 10, RULE_binding);
		try {
			setState(76);
			_errHandler.sync(this);
			switch ( getInterpreter().adaptivePredict(_input,6,_ctx) ) {
			case 1:
				enterOuterAlt(_localctx, 1);
				{
				setState(72);
				alphaBinding();
				}
				break;
			case 2:
				enterOuterAlt(_localctx, 2);
				{
				setState(73);
				emptyBinding();
				}
				break;
			case 3:
				enterOuterAlt(_localctx, 3);
				{
				setState(74);
				deltaBinding();
				}
				break;
			case 4:
				enterOuterAlt(_localctx, 4);
				{
				setState(75);
				lambdaBinding();
				}
				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, 12, RULE_alphaBinding);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(78);
			attribute();
			setState(79);
			match(ARROW);
			setState(80);
			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 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, 14, RULE_attribute);
		try {
			setState(86);
			_errHandler.sync(this);
			switch (_input.LA(1)) {
			case PHI:
				enterOuterAlt(_localctx, 1);
				{
				setState(82);
				match(PHI);
				}
				break;
			case RHO:
				enterOuterAlt(_localctx, 2);
				{
				setState(83);
				match(RHO);
				}
				break;
			case LABEL:
				enterOuterAlt(_localctx, 3);
				{
				setState(84);
				match(LABEL);
				}
				break;
			case ALPHA:
				enterOuterAlt(_localctx, 4);
				{
				setState(85);
				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, 16, RULE_alphaAttr);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(88);
			match(ALPHA);
			setState(89);
			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, 18, RULE_emptyBinding);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(91);
			attribute();
			setState(92);
			match(ARROW);
			setState(93);
			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 DeltaBindingContext 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 TerminalNode EMPTY() { return getToken(PhiParser.EMPTY, 0); }
		public DeltaBindingContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_deltaBinding; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof PhiListener ) ((PhiListener)listener).enterDeltaBinding(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof PhiListener ) ((PhiListener)listener).exitDeltaBinding(this);
		}
	}

	public final DeltaBindingContext deltaBinding() throws RecognitionException {
		DeltaBindingContext _localctx = new DeltaBindingContext(_ctx, getState());
		enterRule(_localctx, 20, RULE_deltaBinding);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(95);
			match(DELTA);
			setState(96);
			match(DASHED_ARROW);
			setState(97);
			_la = _input.LA(1);
			if ( !(_la==EMPTY || _la==BYTES) ) {
			_errHandler.recoverInline(this);
			}
			else {
				if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
				_errHandler.reportMatch(this);
				consume();
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	@SuppressWarnings("CheckReturnValue")
	public static class LambdaBindingContext 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 LambdaBindingContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_lambdaBinding; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof PhiListener ) ((PhiListener)listener).enterLambdaBinding(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof PhiListener ) ((PhiListener)listener).exitLambdaBinding(this);
		}
	}

	public final LambdaBindingContext lambdaBinding() throws RecognitionException {
		LambdaBindingContext _localctx = new LambdaBindingContext(_ctx, getState());
		enterRule(_localctx, 22, RULE_lambdaBinding);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(99);
			match(LAMBDA);
			setState(100);
			match(DASHED_ARROW);
			setState(101);
			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 TerminalNode LB() { return getToken(PhiParser.LB, 0); }
		public BindingsContext bindings() {
			return getRuleContext(BindingsContext.class,0);
		}
		public TerminalNode RB() { return getToken(PhiParser.RB, 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, 24, RULE_application);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(103);
			match(LB);
			setState(104);
			bindings();
			setState(105);
			match(RB);
			}
		}
		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 TerminalNode DOT() { return getToken(PhiParser.DOT, 0); }
		public AttributeContext attribute() {
			return getRuleContext(AttributeContext.class,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);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(107);
			match(DOT);
			setState(108);
			attribute();
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	@SuppressWarnings("CheckReturnValue")
	public static class ApplicationsOrDispatchesContext extends ParserRuleContext {
		public List application() {
			return getRuleContexts(ApplicationContext.class);
		}
		public ApplicationContext application(int i) {
			return getRuleContext(ApplicationContext.class,i);
		}
		public List dispatch() {
			return getRuleContexts(DispatchContext.class);
		}
		public DispatchContext dispatch(int i) {
			return getRuleContext(DispatchContext.class,i);
		}
		public ApplicationsOrDispatchesContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_applicationsOrDispatches; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof PhiListener ) ((PhiListener)listener).enterApplicationsOrDispatches(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof PhiListener ) ((PhiListener)listener).exitApplicationsOrDispatches(this);
		}
	}

	public final ApplicationsOrDispatchesContext applicationsOrDispatches() throws RecognitionException {
		ApplicationsOrDispatchesContext _localctx = new ApplicationsOrDispatchesContext(_ctx, getState());
		enterRule(_localctx, 28, RULE_applicationsOrDispatches);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(114);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while (_la==LB || _la==DOT) {
				{
				setState(112);
				_errHandler.sync(this);
				switch (_input.LA(1)) {
				case LB:
					{
					setState(110);
					application();
					}
					break;
				case DOT:
					{
					setState(111);
					dispatch();
					}
					break;
				default:
					throw new NoViableAltException(this);
				}
				}
				setState(116);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	@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, 30, RULE_termination);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(117);
			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\u0019x\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"+
		"\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\u0001\u0001\u0001\u0001\u0001\u0001\u0003\u00011\b\u0001"+
		"\u0001\u0001\u0003\u00014\b\u0001\u0001\u0002\u0001\u0002\u0001\u0002"+
		"\u0001\u0002\u0001\u0003\u0001\u0003\u0001\u0004\u0003\u0004=\b\u0004"+
		"\u0001\u0004\u0001\u0004\u0001\u0004\u0005\u0004B\b\u0004\n\u0004\f\u0004"+
		"E\t\u0004\u0003\u0004G\b\u0004\u0001\u0005\u0001\u0005\u0001\u0005\u0001"+
		"\u0005\u0003\u0005M\b\u0005\u0001\u0006\u0001\u0006\u0001\u0006\u0001"+
		"\u0006\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0003\u0007W\b"+
		"\u0007\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\u0001\u000b"+
		"\u0001\f\u0001\f\u0001\f\u0001\f\u0001\r\u0001\r\u0001\r\u0001\u000e\u0001"+
		"\u000e\u0005\u000eq\b\u000e\n\u000e\f\u000et\t\u000e\u0001\u000f\u0001"+
		"\u000f\u0001\u000f\u0000\u0000\u0010\u0000\u0002\u0004\u0006\b\n\f\u000e"+
		"\u0010\u0012\u0014\u0016\u0018\u001a\u001c\u001e\u0000\u0002\u0002\u0000"+
		"\u0012\u0012\u0014\u0014\u0002\u0000\u000e\u000e\u0019\u0019v\u0000\'"+
		"\u0001\u0000\u0000\u0000\u00023\u0001\u0000\u0000\u0000\u00045\u0001\u0000"+
		"\u0000\u0000\u00069\u0001\u0000\u0000\u0000\bF\u0001\u0000\u0000\u0000"+
		"\nL\u0001\u0000\u0000\u0000\fN\u0001\u0000\u0000\u0000\u000eV\u0001\u0000"+
		"\u0000\u0000\u0010X\u0001\u0000\u0000\u0000\u0012[\u0001\u0000\u0000\u0000"+
		"\u0014_\u0001\u0000\u0000\u0000\u0016c\u0001\u0000\u0000\u0000\u0018g"+
		"\u0001\u0000\u0000\u0000\u001ak\u0001\u0000\u0000\u0000\u001cr\u0001\u0000"+
		"\u0000\u0000\u001eu\u0001\u0000\u0000\u0000 !\u0005\u0014\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)*\u0003\u0004\u0002\u0000*+\u0003\u001c\u000e"+
		"\u0000+4\u0001\u0000\u0000\u0000,0\u0003\u0006\u0003\u0000-.\u0003\u001a"+
		"\r\u0000./\u0003\u001c\u000e\u0000/1\u0001\u0000\u0000\u00000-\u0001\u0000"+
		"\u0000\u000001\u0001\u0000\u0000\u000014\u0001\u0000\u0000\u000024\u0003"+
		"\u001e\u000f\u00003)\u0001\u0000\u0000\u00003,\u0001\u0000\u0000\u0000"+
		"32\u0001\u0000\u0000\u00004\u0003\u0001\u0000\u0000\u000056\u0005\u0005"+
		"\u0000\u000067\u0003\b\u0004\u000078\u0005\u0006\u0000\u00008\u0005\u0001"+
		"\u0000\u0000\u00009:\u0007\u0000\u0000\u0000:\u0007\u0001\u0000\u0000"+
		"\u0000;=\u0003\n\u0005\u0000<;\u0001\u0000\u0000\u0000<=\u0001\u0000\u0000"+
		"\u0000=G\u0001\u0000\u0000\u0000>C\u0003\n\u0005\u0000?@\u0005\n\u0000"+
		"\u0000@B\u0003\n\u0005\u0000A?\u0001\u0000\u0000\u0000BE\u0001\u0000\u0000"+
		"\u0000CA\u0001\u0000\u0000\u0000CD\u0001\u0000\u0000\u0000DG\u0001\u0000"+
		"\u0000\u0000EC\u0001\u0000\u0000\u0000F<\u0001\u0000\u0000\u0000F>\u0001"+
		"\u0000\u0000\u0000G\t\u0001\u0000\u0000\u0000HM\u0003\f\u0006\u0000IM"+
		"\u0003\u0012\t\u0000JM\u0003\u0014\n\u0000KM\u0003\u0016\u000b\u0000L"+
		"H\u0001\u0000\u0000\u0000LI\u0001\u0000\u0000\u0000LJ\u0001\u0000\u0000"+
		"\u0000LK\u0001\u0000\u0000\u0000M\u000b\u0001\u0000\u0000\u0000NO\u0003"+
		"\u000e\u0007\u0000OP\u0005\u000b\u0000\u0000PQ\u0003\u0002\u0001\u0000"+
		"Q\r\u0001\u0000\u0000\u0000RW\u0005\u000f\u0000\u0000SW\u0005\u0010\u0000"+
		"\u0000TW\u0005\u0018\u0000\u0000UW\u0003\u0010\b\u0000VR\u0001\u0000\u0000"+
		"\u0000VS\u0001\u0000\u0000\u0000VT\u0001\u0000\u0000\u0000VU\u0001\u0000"+
		"\u0000\u0000W\u000f\u0001\u0000\u0000\u0000XY\u0005\r\u0000\u0000YZ\u0005"+
		"\u0017\u0000\u0000Z\u0011\u0001\u0000\u0000\u0000[\\\u0003\u000e\u0007"+
		"\u0000\\]\u0005\u000b\u0000\u0000]^\u0005\u000e\u0000\u0000^\u0013\u0001"+
		"\u0000\u0000\u0000_`\u0005\u0011\u0000\u0000`a\u0005\f\u0000\u0000ab\u0007"+
		"\u0001\u0000\u0000b\u0015\u0001\u0000\u0000\u0000cd\u0005\u0013\u0000"+
		"\u0000de\u0005\f\u0000\u0000ef\u0005\u0002\u0000\u0000f\u0017\u0001\u0000"+
		"\u0000\u0000gh\u0005\u0007\u0000\u0000hi\u0003\b\u0004\u0000ij\u0005\b"+
		"\u0000\u0000j\u0019\u0001\u0000\u0000\u0000kl\u0005\t\u0000\u0000lm\u0003"+
		"\u000e\u0007\u0000m\u001b\u0001\u0000\u0000\u0000nq\u0003\u0018\f\u0000"+
		"oq\u0003\u001a\r\u0000pn\u0001\u0000\u0000\u0000po\u0001\u0000\u0000\u0000"+
		"qt\u0001\u0000\u0000\u0000rp\u0001\u0000\u0000\u0000rs\u0001\u0000\u0000"+
		"\u0000s\u001d\u0001\u0000\u0000\u0000tr\u0001\u0000\u0000\u0000uv\u0005"+
		"\u0015\u0000\u0000v\u001f\u0001\u0000\u0000\u0000\n\'03




© 2015 - 2024 Weber Informatics LLC | Privacy Policy