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

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, 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_tauBinding = 6, RULE_attribute = 7, 
		RULE_alphaAttr = 8, RULE_emptyBinding = 9, RULE_deltaBinding = 10, RULE_lambdaBinding = 11, 
		RULE_application = 12, RULE_applicationBinding = 13, RULE_dispatch = 14, 
		RULE_applicationsOrDispatches = 15, RULE_termination = 16;
	private static String[] makeRuleNames() {
		return new String[] {
			"program", "object", "formation", "scoped", "bindings", "binding", "tauBinding", 
			"attribute", "alphaAttr", "emptyBinding", "deltaBinding", "lambdaBinding", 
			"application", "applicationBinding", "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(41);
			_errHandler.sync(this);
			switch (_input.LA(1)) {
			case HOME:
				enterOuterAlt(_localctx, 1);
				{
				setState(34);
				match(HOME);
				setState(35);
				match(ARROW);
				setState(36);
				object();
				}
				break;
			case LCB:
				enterOuterAlt(_localctx, 2);
				{
				setState(37);
				match(LCB);
				setState(38);
				object();
				setState(39);
				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 DispatchContext dispatch() {
			return getRuleContext(DispatchContext.class,0);
		}
		public ApplicationsOrDispatchesContext applicationsOrDispatches() {
			return getRuleContext(ApplicationsOrDispatchesContext.class,0);
		}
		public ScopedContext scoped() {
			return getRuleContext(ScopedContext.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(55);
			_errHandler.sync(this);
			switch (_input.LA(1)) {
			case LSB:
				enterOuterAlt(_localctx, 1);
				{
				setState(43);
				formation();
				setState(47);
				_errHandler.sync(this);
				_la = _input.LA(1);
				if (_la==DOT) {
					{
					setState(44);
					dispatch();
					setState(45);
					applicationsOrDispatches();
					}
				}

				}
				break;
			case XI:
			case HOME:
			case ERROR:
				enterOuterAlt(_localctx, 2);
				{
				setState(51);
				_errHandler.sync(this);
				switch (_input.LA(1)) {
				case XI:
				case HOME:
					{
					setState(49);
					scoped();
					}
					break;
				case ERROR:
					{
					setState(50);
					termination();
					}
					break;
				default:
					throw new NoViableAltException(this);
				}
				setState(53);
				applicationsOrDispatches();
				}
				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(57);
			match(LSB);
			setState(58);
			bindings();
			setState(59);
			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(61);
			_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(73);
			_errHandler.sync(this);
			switch ( getInterpreter().adaptivePredict(_input,6,_ctx) ) {
			case 1:
				enterOuterAlt(_localctx, 1);
				{
				setState(64);
				_errHandler.sync(this);
				_la = _input.LA(1);
				if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 17539072L) != 0)) {
					{
					setState(63);
					binding();
					}
				}

				}
				break;
			case 2:
				enterOuterAlt(_localctx, 2);
				{
				setState(66);
				binding();
				setState(69); 
				_errHandler.sync(this);
				_la = _input.LA(1);
				do {
					{
					{
					setState(67);
					match(COMMA);
					setState(68);
					binding();
					}
					}
					setState(71); 
					_errHandler.sync(this);
					_la = _input.LA(1);
				} while ( _la==COMMA );
				}
				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 TauBindingContext tauBinding() {
			return getRuleContext(TauBindingContext.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(79);
			_errHandler.sync(this);
			switch ( getInterpreter().adaptivePredict(_input,7,_ctx) ) {
			case 1:
				enterOuterAlt(_localctx, 1);
				{
				setState(75);
				tauBinding();
				}
				break;
			case 2:
				enterOuterAlt(_localctx, 2);
				{
				setState(76);
				emptyBinding();
				}
				break;
			case 3:
				enterOuterAlt(_localctx, 3);
				{
				setState(77);
				deltaBinding();
				}
				break;
			case 4:
				enterOuterAlt(_localctx, 4);
				{
				setState(78);
				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 TauBindingContext 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 TauBindingContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_tauBinding; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof PhiListener ) ((PhiListener)listener).enterTauBinding(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof PhiListener ) ((PhiListener)listener).exitTauBinding(this);
		}
	}

	public final TauBindingContext tauBinding() throws RecognitionException {
		TauBindingContext _localctx = new TauBindingContext(_ctx, getState());
		enterRule(_localctx, 12, RULE_tauBinding);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(81);
			attribute();
			setState(82);
			match(ARROW);
			setState(83);
			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(89);
			_errHandler.sync(this);
			switch (_input.LA(1)) {
			case PHI:
				enterOuterAlt(_localctx, 1);
				{
				setState(85);
				match(PHI);
				}
				break;
			case RHO:
				enterOuterAlt(_localctx, 2);
				{
				setState(86);
				match(RHO);
				}
				break;
			case LABEL:
				enterOuterAlt(_localctx, 3);
				{
				setState(87);
				match(LABEL);
				}
				break;
			case ALPHA:
				enterOuterAlt(_localctx, 4);
				{
				setState(88);
				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(91);
			match(ALPHA);
			setState(92);
			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(94);
			attribute();
			setState(95);
			match(ARROW);
			setState(96);
			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(98);
			match(DELTA);
			setState(99);
			match(DASHED_ARROW);
			setState(100);
			_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(102);
			match(LAMBDA);
			setState(103);
			match(DASHED_ARROW);
			setState(104);
			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 ApplicationBindingContext applicationBinding() {
			return getRuleContext(ApplicationBindingContext.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(106);
			match(LB);
			setState(107);
			applicationBinding();
			setState(108);
			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 ApplicationBindingContext extends ParserRuleContext {
		public List tauBinding() {
			return getRuleContexts(TauBindingContext.class);
		}
		public TauBindingContext tauBinding(int i) {
			return getRuleContext(TauBindingContext.class,i);
		}
		public List COMMA() { return getTokens(PhiParser.COMMA); }
		public TerminalNode COMMA(int i) {
			return getToken(PhiParser.COMMA, i);
		}
		public ApplicationBindingContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_applicationBinding; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof PhiListener ) ((PhiListener)listener).enterApplicationBinding(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof PhiListener ) ((PhiListener)listener).exitApplicationBinding(this);
		}
	}

	public final ApplicationBindingContext applicationBinding() throws RecognitionException {
		ApplicationBindingContext _localctx = new ApplicationBindingContext(_ctx, getState());
		enterRule(_localctx, 26, RULE_applicationBinding);
		int _la;
		try {
			setState(121);
			_errHandler.sync(this);
			switch ( getInterpreter().adaptivePredict(_input,11,_ctx) ) {
			case 1:
				enterOuterAlt(_localctx, 1);
				{
				setState(111);
				_errHandler.sync(this);
				_la = _input.LA(1);
				if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 16883712L) != 0)) {
					{
					setState(110);
					tauBinding();
					}
				}

				}
				break;
			case 2:
				enterOuterAlt(_localctx, 2);
				{
				setState(113);
				tauBinding();
				setState(118);
				_errHandler.sync(this);
				_la = _input.LA(1);
				while (_la==COMMA) {
					{
					{
					setState(114);
					match(COMMA);
					setState(115);
					tauBinding();
					}
					}
					setState(120);
					_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 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, 28, RULE_dispatch);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(123);
			match(DOT);
			setState(124);
			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, 30, RULE_applicationsOrDispatches);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(130);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while (_la==LB || _la==DOT) {
				{
				setState(128);
				_errHandler.sync(this);
				switch (_input.LA(1)) {
				case LB:
					{
					setState(126);
					application();
					}
					break;
				case DOT:
					{
					setState(127);
					dispatch();
					}
					break;
				default:
					throw new NoViableAltException(this);
				}
				}
				setState(132);
				_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, 32, RULE_termination);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(133);
			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\u0019\u0088\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\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\u00010\b\u0001\u0001"+
		"\u0001\u0001\u0001\u0003\u00014\b\u0001\u0001\u0001\u0001\u0001\u0003"+
		"\u00018\b\u0001\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001"+
		"\u0003\u0001\u0003\u0001\u0004\u0003\u0004A\b\u0004\u0001\u0004\u0001"+
		"\u0004\u0001\u0004\u0004\u0004F\b\u0004\u000b\u0004\f\u0004G\u0003\u0004"+
		"J\b\u0004\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0003\u0005"+
		"P\b\u0005\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0007"+
		"\u0001\u0007\u0001\u0007\u0001\u0007\u0003\u0007Z\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\u0003\rp\b\r\u0001\r\u0001\r\u0001\r\u0005\ru\b\r\n"+
		"\r\f\rx\t\r\u0003\rz\b\r\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000f"+
		"\u0001\u000f\u0005\u000f\u0081\b\u000f\n\u000f\f\u000f\u0084\t\u000f\u0001"+
		"\u0010\u0001\u0010\u0001\u0010\u0000\u0000\u0011\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\u0019"+
		"\u0088\u0000)\u0001\u0000\u0000\u0000\u00027\u0001\u0000\u0000\u0000\u0004"+
		"9\u0001\u0000\u0000\u0000\u0006=\u0001\u0000\u0000\u0000\bI\u0001\u0000"+
		"\u0000\u0000\nO\u0001\u0000\u0000\u0000\fQ\u0001\u0000\u0000\u0000\u000e"+
		"Y\u0001\u0000\u0000\u0000\u0010[\u0001\u0000\u0000\u0000\u0012^\u0001"+
		"\u0000\u0000\u0000\u0014b\u0001\u0000\u0000\u0000\u0016f\u0001\u0000\u0000"+
		"\u0000\u0018j\u0001\u0000\u0000\u0000\u001ay\u0001\u0000\u0000\u0000\u001c"+
		"{\u0001\u0000\u0000\u0000\u001e\u0082\u0001\u0000\u0000\u0000 \u0085\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-.\u0003\u001e\u000f"+
		"\u0000.0\u0001\u0000\u0000\u0000/,\u0001\u0000\u0000\u0000/0\u0001\u0000"+
		"\u0000\u000008\u0001\u0000\u0000\u000014\u0003\u0006\u0003\u000024\u0003"+
		" \u0010\u000031\u0001\u0000\u0000\u000032\u0001\u0000\u0000\u000045\u0001"+
		"\u0000\u0000\u000056\u0003\u001e\u000f\u000068\u0001\u0000\u0000\u0000"+
		"7+\u0001\u0000\u0000\u000073\u0001\u0000\u0000\u00008\u0003\u0001\u0000"+
		"\u0000\u00009:\u0005\u0005\u0000\u0000:;\u0003\b\u0004\u0000;<\u0005\u0006"+
		"\u0000\u0000<\u0005\u0001\u0000\u0000\u0000=>\u0007\u0000\u0000\u0000"+
		">\u0007\u0001\u0000\u0000\u0000?A\u0003\n\u0005\u0000@?\u0001\u0000\u0000"+
		"\u0000@A\u0001\u0000\u0000\u0000AJ\u0001\u0000\u0000\u0000BE\u0003\n\u0005"+
		"\u0000CD\u0005\n\u0000\u0000DF\u0003\n\u0005\u0000EC\u0001\u0000\u0000"+
		"\u0000FG\u0001\u0000\u0000\u0000GE\u0001\u0000\u0000\u0000GH\u0001\u0000"+
		"\u0000\u0000HJ\u0001\u0000\u0000\u0000I@\u0001\u0000\u0000\u0000IB\u0001"+
		"\u0000\u0000\u0000J\t\u0001\u0000\u0000\u0000KP\u0003\f\u0006\u0000LP"+
		"\u0003\u0012\t\u0000MP\u0003\u0014\n\u0000NP\u0003\u0016\u000b\u0000O"+
		"K\u0001\u0000\u0000\u0000OL\u0001\u0000\u0000\u0000OM\u0001\u0000\u0000"+
		"\u0000ON\u0001\u0000\u0000\u0000P\u000b\u0001\u0000\u0000\u0000QR\u0003"+
		"\u000e\u0007\u0000RS\u0005\u000b\u0000\u0000ST\u0003\u0002\u0001\u0000"+
		"T\r\u0001\u0000\u0000\u0000UZ\u0005\u000f\u0000\u0000VZ\u0005\u0010\u0000"+
		"\u0000WZ\u0005\u0018\u0000\u0000XZ\u0003\u0010\b\u0000YU\u0001\u0000\u0000"+
		"\u0000YV\u0001\u0000\u0000\u0000YW\u0001\u0000\u0000\u0000YX\u0001\u0000"+
		"\u0000\u0000Z\u000f\u0001\u0000\u0000\u0000[\\\u0005\r\u0000\u0000\\]"+
		"\u0005\u0017\u0000\u0000]\u0011\u0001\u0000\u0000\u0000^_\u0003\u000e"+
		"\u0007\u0000_`\u0005\u000b\u0000\u0000`a\u0005\u000e\u0000\u0000a\u0013"+
		"\u0001\u0000\u0000\u0000bc\u0005\u0011\u0000\u0000cd\u0005\f\u0000\u0000"+
		"de\u0007\u0001\u0000\u0000e\u0015\u0001\u0000\u0000\u0000fg\u0005\u0013"+
		"\u0000\u0000gh\u0005\f\u0000\u0000hi\u0005\u0002\u0000\u0000i\u0017\u0001"+
		"\u0000\u0000\u0000jk\u0005\u0007\u0000\u0000kl\u0003\u001a\r\u0000lm\u0005"+
		"\b\u0000\u0000m\u0019\u0001\u0000\u0000\u0000np\u0003\f\u0006\u0000on"+
		"\u0001\u0000\u0000\u0000op\u0001\u0000\u0000\u0000pz\u0001\u0000\u0000"+
		"\u0000qv\u0003\f\u0006\u0000rs\u0005\n\u0000\u0000su\u0003\f\u0006\u0000"+
		"tr\u0001\u0000\u0000\u0000ux\u0001\u0000\u0000\u0000vt\u0001\u0000\u0000"+
		"\u0000vw\u0001\u0000\u0000\u0000wz\u0001\u0000\u0000\u0000xv\u0001\u0000"+
		"\u0000\u0000yo\u0001\u0000\u0000\u0000yq\u0001\u0000\u0000\u0000z\u001b"+
		"\u0001\u0000\u0000\u0000{|\u0005\t\u0000\u0000|}\u0003\u000e\u0007\u0000"+
		"}\u001d\u0001\u0000\u0000\u0000~\u0081\u0003\u0018\f\u0000\u007f\u0081"+
		"\u0003\u001c\u000e\u0000\u0080~\u0001\u0000\u0000\u0000\u0080\u007f\u0001"+
		"\u0000\u0000\u0000\u0081\u0084\u0001\u0000\u0000\u0000\u0082\u0080\u0001"+
		"\u0000\u0000\u0000\u0082\u0083\u0001\u0000\u0000\u0000\u0083\u001f\u0001"+
		"\u0000\u0000\u0000\u0084\u0082\u0001\u0000\u0000\u0000\u0085\u0086\u0005"+
		"\u0015\u0000\u0000\u0086!\u0001\u0000\u0000\u0000\u000e)/37@GIOYovy\u0080"+
		"\u0082";
	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