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

ork.cql.3.16.0.source-code.targetmapParser Maven / Gradle / Ivy

Go to download

The cql library for the Clinical Quality Language Java reference implementation

There is a newer version: 3.18.0
Show newest version
// Generated from targetmap.g4 by ANTLR 4.13.1
package org.cqframework.cql.gen;
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 targetmapParser 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
		T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, T__5=6, T__6=7, T__7=8, T__8=9, 
		T__9=10, T__10=11, IDENTIFIER=12, DELIMITEDIDENTIFIER=13, STRING=14, NUMBER=15, 
		WS=16;
	public static final int
		RULE_targetMapping = 0, RULE_targetMap = 1, RULE_choiceMap = 2, RULE_choiceMapItem = 3, 
		RULE_targetIndex = 4, RULE_targetIndexItem = 5, RULE_mappingTarget = 6, 
		RULE_targetInvocation = 7, RULE_qualifiedIdentifier = 8, RULE_identifier = 9, 
		RULE_function = 10;
	private static String[] makeRuleNames() {
		return new String[] {
			"targetMapping", "targetMap", "choiceMap", "choiceMapItem", "targetIndex", 
			"targetIndexItem", "mappingTarget", "targetInvocation", "qualifiedIdentifier", 
			"identifier", "function"
		};
	}
	public static final String[] ruleNames = makeRuleNames();

	private static String[] makeLiteralNames() {
		return new String[] {
			null, "'.'", "'['", "']'", "';'", "':'", "','", "'='", "'%'", "'null'", 
			"'('", "')'"
		};
	}
	private static final String[] _LITERAL_NAMES = makeLiteralNames();
	private static String[] makeSymbolicNames() {
		return new String[] {
			null, null, null, null, null, null, null, null, null, null, null, null, 
			"IDENTIFIER", "DELIMITEDIDENTIFIER", "STRING", "NUMBER", "WS"
		};
	}
	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 "targetmap.g4"; }

	@Override
	public String[] getRuleNames() { return ruleNames; }

	@Override
	public String getSerializedATN() { return _serializedATN; }

	@Override
	public ATN getATN() { return _ATN; }

	public targetmapParser(TokenStream input) {
		super(input);
		_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
	}

	@SuppressWarnings("CheckReturnValue")
	public static class TargetMappingContext extends ParserRuleContext {
		public TargetMapContext targetMap() {
			return getRuleContext(TargetMapContext.class,0);
		}
		public TerminalNode EOF() { return getToken(targetmapParser.EOF, 0); }
		public TargetMappingContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_targetMapping; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof targetmapListener ) ((targetmapListener)listener).enterTargetMapping(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof targetmapListener ) ((targetmapListener)listener).exitTargetMapping(this);
		}
		@Override
		public  T accept(ParseTreeVisitor visitor) {
			if ( visitor instanceof targetmapVisitor ) return ((targetmapVisitor)visitor).visitTargetMapping(this);
			else return visitor.visitChildren(this);
		}
	}

	public final TargetMappingContext targetMapping() throws RecognitionException {
		TargetMappingContext _localctx = new TargetMappingContext(_ctx, getState());
		enterRule(_localctx, 0, RULE_targetMapping);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(22);
			targetMap(0);
			setState(23);
			match(EOF);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	@SuppressWarnings("CheckReturnValue")
	public static class TargetMapContext extends ParserRuleContext {
		public MappingTargetContext mappingTarget() {
			return getRuleContext(MappingTargetContext.class,0);
		}
		public TargetInvocationContext targetInvocation() {
			return getRuleContext(TargetInvocationContext.class,0);
		}
		public ChoiceMapContext choiceMap() {
			return getRuleContext(ChoiceMapContext.class,0);
		}
		public TargetMapContext targetMap() {
			return getRuleContext(TargetMapContext.class,0);
		}
		public TargetIndexContext targetIndex() {
			return getRuleContext(TargetIndexContext.class,0);
		}
		public TargetMapContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_targetMap; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof targetmapListener ) ((targetmapListener)listener).enterTargetMap(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof targetmapListener ) ((targetmapListener)listener).exitTargetMap(this);
		}
		@Override
		public  T accept(ParseTreeVisitor visitor) {
			if ( visitor instanceof targetmapVisitor ) return ((targetmapVisitor)visitor).visitTargetMap(this);
			else return visitor.visitChildren(this);
		}
	}

	public final TargetMapContext targetMap() throws RecognitionException {
		return targetMap(0);
	}

	private TargetMapContext targetMap(int _p) throws RecognitionException {
		ParserRuleContext _parentctx = _ctx;
		int _parentState = getState();
		TargetMapContext _localctx = new TargetMapContext(_ctx, _parentState);
		TargetMapContext _prevctx = _localctx;
		int _startState = 2;
		enterRecursionRule(_localctx, 2, RULE_targetMap, _p);
		try {
			int _alt;
			enterOuterAlt(_localctx, 1);
			{
			setState(29);
			_errHandler.sync(this);
			switch ( getInterpreter().adaptivePredict(_input,0,_ctx) ) {
			case 1:
				{
				setState(26);
				mappingTarget();
				}
				break;
			case 2:
				{
				setState(27);
				targetInvocation();
				}
				break;
			case 3:
				{
				setState(28);
				choiceMap();
				}
				break;
			}
			_ctx.stop = _input.LT(-1);
			setState(41);
			_errHandler.sync(this);
			_alt = getInterpreter().adaptivePredict(_input,2,_ctx);
			while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
				if ( _alt==1 ) {
					if ( _parseListeners!=null ) triggerExitRuleEvent();
					_prevctx = _localctx;
					{
					setState(39);
					_errHandler.sync(this);
					switch ( getInterpreter().adaptivePredict(_input,1,_ctx) ) {
					case 1:
						{
						_localctx = new TargetMapContext(_parentctx, _parentState);
						pushNewRecursionContext(_localctx, _startState, RULE_targetMap);
						setState(31);
						if (!(precpred(_ctx, 3))) throw new FailedPredicateException(this, "precpred(_ctx, 3)");
						setState(32);
						match(T__0);
						setState(33);
						targetInvocation();
						}
						break;
					case 2:
						{
						_localctx = new TargetMapContext(_parentctx, _parentState);
						pushNewRecursionContext(_localctx, _startState, RULE_targetMap);
						setState(34);
						if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
						setState(35);
						match(T__1);
						setState(36);
						targetIndex();
						setState(37);
						match(T__2);
						}
						break;
					}
					} 
				}
				setState(43);
				_errHandler.sync(this);
				_alt = getInterpreter().adaptivePredict(_input,2,_ctx);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			unrollRecursionContexts(_parentctx);
		}
		return _localctx;
	}

	@SuppressWarnings("CheckReturnValue")
	public static class ChoiceMapContext extends ParserRuleContext {
		public List choiceMapItem() {
			return getRuleContexts(ChoiceMapItemContext.class);
		}
		public ChoiceMapItemContext choiceMapItem(int i) {
			return getRuleContext(ChoiceMapItemContext.class,i);
		}
		public ChoiceMapContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_choiceMap; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof targetmapListener ) ((targetmapListener)listener).enterChoiceMap(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof targetmapListener ) ((targetmapListener)listener).exitChoiceMap(this);
		}
		@Override
		public  T accept(ParseTreeVisitor visitor) {
			if ( visitor instanceof targetmapVisitor ) return ((targetmapVisitor)visitor).visitChoiceMap(this);
			else return visitor.visitChildren(this);
		}
	}

	public final ChoiceMapContext choiceMap() throws RecognitionException {
		ChoiceMapContext _localctx = new ChoiceMapContext(_ctx, getState());
		enterRule(_localctx, 4, RULE_choiceMap);
		try {
			int _alt;
			enterOuterAlt(_localctx, 1);
			{
			setState(44);
			choiceMapItem();
			setState(49);
			_errHandler.sync(this);
			_alt = getInterpreter().adaptivePredict(_input,3,_ctx);
			while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
				if ( _alt==1 ) {
					{
					{
					setState(45);
					match(T__3);
					setState(46);
					choiceMapItem();
					}
					} 
				}
				setState(51);
				_errHandler.sync(this);
				_alt = getInterpreter().adaptivePredict(_input,3,_ctx);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	@SuppressWarnings("CheckReturnValue")
	public static class ChoiceMapItemContext extends ParserRuleContext {
		public QualifiedIdentifierContext qualifiedIdentifier() {
			return getRuleContext(QualifiedIdentifierContext.class,0);
		}
		public TargetMapContext targetMap() {
			return getRuleContext(TargetMapContext.class,0);
		}
		public ChoiceMapItemContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_choiceMapItem; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof targetmapListener ) ((targetmapListener)listener).enterChoiceMapItem(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof targetmapListener ) ((targetmapListener)listener).exitChoiceMapItem(this);
		}
		@Override
		public  T accept(ParseTreeVisitor visitor) {
			if ( visitor instanceof targetmapVisitor ) return ((targetmapVisitor)visitor).visitChoiceMapItem(this);
			else return visitor.visitChildren(this);
		}
	}

	public final ChoiceMapItemContext choiceMapItem() throws RecognitionException {
		ChoiceMapItemContext _localctx = new ChoiceMapItemContext(_ctx, getState());
		enterRule(_localctx, 6, RULE_choiceMapItem);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(56);
			_errHandler.sync(this);
			switch ( getInterpreter().adaptivePredict(_input,4,_ctx) ) {
			case 1:
				{
				setState(52);
				qualifiedIdentifier();
				setState(53);
				match(T__4);
				setState(54);
				targetMap(0);
				}
				break;
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	@SuppressWarnings("CheckReturnValue")
	public static class TargetIndexContext extends ParserRuleContext {
		public List targetIndexItem() {
			return getRuleContexts(TargetIndexItemContext.class);
		}
		public TargetIndexItemContext targetIndexItem(int i) {
			return getRuleContext(TargetIndexItemContext.class,i);
		}
		public TargetIndexContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_targetIndex; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof targetmapListener ) ((targetmapListener)listener).enterTargetIndex(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof targetmapListener ) ((targetmapListener)listener).exitTargetIndex(this);
		}
		@Override
		public  T accept(ParseTreeVisitor visitor) {
			if ( visitor instanceof targetmapVisitor ) return ((targetmapVisitor)visitor).visitTargetIndex(this);
			else return visitor.visitChildren(this);
		}
	}

	public final TargetIndexContext targetIndex() throws RecognitionException {
		TargetIndexContext _localctx = new TargetIndexContext(_ctx, getState());
		enterRule(_localctx, 8, RULE_targetIndex);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(58);
			targetIndexItem();
			setState(63);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while (_la==T__5) {
				{
				{
				setState(59);
				match(T__5);
				setState(60);
				targetIndexItem();
				}
				}
				setState(65);
				_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 TargetIndexItemContext extends ParserRuleContext {
		public IdentifierContext identifier() {
			return getRuleContext(IdentifierContext.class,0);
		}
		public TerminalNode STRING() { return getToken(targetmapParser.STRING, 0); }
		public TargetIndexItemContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_targetIndexItem; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof targetmapListener ) ((targetmapListener)listener).enterTargetIndexItem(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof targetmapListener ) ((targetmapListener)listener).exitTargetIndexItem(this);
		}
		@Override
		public  T accept(ParseTreeVisitor visitor) {
			if ( visitor instanceof targetmapVisitor ) return ((targetmapVisitor)visitor).visitTargetIndexItem(this);
			else return visitor.visitChildren(this);
		}
	}

	public final TargetIndexItemContext targetIndexItem() throws RecognitionException {
		TargetIndexItemContext _localctx = new TargetIndexItemContext(_ctx, getState());
		enterRule(_localctx, 10, RULE_targetIndexItem);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(66);
			identifier();
			setState(67);
			match(T__6);
			setState(68);
			match(STRING);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	@SuppressWarnings("CheckReturnValue")
	public static class MappingTargetContext extends ParserRuleContext {
		public IdentifierContext identifier() {
			return getRuleContext(IdentifierContext.class,0);
		}
		public MappingTargetContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_mappingTarget; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof targetmapListener ) ((targetmapListener)listener).enterMappingTarget(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof targetmapListener ) ((targetmapListener)listener).exitMappingTarget(this);
		}
		@Override
		public  T accept(ParseTreeVisitor visitor) {
			if ( visitor instanceof targetmapVisitor ) return ((targetmapVisitor)visitor).visitMappingTarget(this);
			else return visitor.visitChildren(this);
		}
	}

	public final MappingTargetContext mappingTarget() throws RecognitionException {
		MappingTargetContext _localctx = new MappingTargetContext(_ctx, getState());
		enterRule(_localctx, 12, RULE_mappingTarget);
		try {
			setState(73);
			_errHandler.sync(this);
			switch (_input.LA(1)) {
			case T__7:
				enterOuterAlt(_localctx, 1);
				{
				setState(70);
				match(T__7);
				setState(71);
				identifier();
				}
				break;
			case T__8:
				enterOuterAlt(_localctx, 2);
				{
				setState(72);
				match(T__8);
				}
				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 TargetInvocationContext extends ParserRuleContext {
		public IdentifierContext identifier() {
			return getRuleContext(IdentifierContext.class,0);
		}
		public FunctionContext function() {
			return getRuleContext(FunctionContext.class,0);
		}
		public TargetInvocationContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_targetInvocation; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof targetmapListener ) ((targetmapListener)listener).enterTargetInvocation(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof targetmapListener ) ((targetmapListener)listener).exitTargetInvocation(this);
		}
		@Override
		public  T accept(ParseTreeVisitor visitor) {
			if ( visitor instanceof targetmapVisitor ) return ((targetmapVisitor)visitor).visitTargetInvocation(this);
			else return visitor.visitChildren(this);
		}
	}

	public final TargetInvocationContext targetInvocation() throws RecognitionException {
		TargetInvocationContext _localctx = new TargetInvocationContext(_ctx, getState());
		enterRule(_localctx, 14, RULE_targetInvocation);
		try {
			setState(77);
			_errHandler.sync(this);
			switch ( getInterpreter().adaptivePredict(_input,7,_ctx) ) {
			case 1:
				enterOuterAlt(_localctx, 1);
				{
				setState(75);
				identifier();
				}
				break;
			case 2:
				enterOuterAlt(_localctx, 2);
				{
				setState(76);
				function();
				}
				break;
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	@SuppressWarnings("CheckReturnValue")
	public static class QualifiedIdentifierContext extends ParserRuleContext {
		public List identifier() {
			return getRuleContexts(IdentifierContext.class);
		}
		public IdentifierContext identifier(int i) {
			return getRuleContext(IdentifierContext.class,i);
		}
		public QualifiedIdentifierContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_qualifiedIdentifier; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof targetmapListener ) ((targetmapListener)listener).enterQualifiedIdentifier(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof targetmapListener ) ((targetmapListener)listener).exitQualifiedIdentifier(this);
		}
		@Override
		public  T accept(ParseTreeVisitor visitor) {
			if ( visitor instanceof targetmapVisitor ) return ((targetmapVisitor)visitor).visitQualifiedIdentifier(this);
			else return visitor.visitChildren(this);
		}
	}

	public final QualifiedIdentifierContext qualifiedIdentifier() throws RecognitionException {
		QualifiedIdentifierContext _localctx = new QualifiedIdentifierContext(_ctx, getState());
		enterRule(_localctx, 16, RULE_qualifiedIdentifier);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(79);
			identifier();
			setState(84);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while (_la==T__0) {
				{
				{
				setState(80);
				match(T__0);
				setState(81);
				identifier();
				}
				}
				setState(86);
				_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 IdentifierContext extends ParserRuleContext {
		public TerminalNode IDENTIFIER() { return getToken(targetmapParser.IDENTIFIER, 0); }
		public TerminalNode DELIMITEDIDENTIFIER() { return getToken(targetmapParser.DELIMITEDIDENTIFIER, 0); }
		public IdentifierContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_identifier; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof targetmapListener ) ((targetmapListener)listener).enterIdentifier(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof targetmapListener ) ((targetmapListener)listener).exitIdentifier(this);
		}
		@Override
		public  T accept(ParseTreeVisitor visitor) {
			if ( visitor instanceof targetmapVisitor ) return ((targetmapVisitor)visitor).visitIdentifier(this);
			else return visitor.visitChildren(this);
		}
	}

	public final IdentifierContext identifier() throws RecognitionException {
		IdentifierContext _localctx = new IdentifierContext(_ctx, getState());
		enterRule(_localctx, 18, RULE_identifier);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(87);
			_la = _input.LA(1);
			if ( !(_la==IDENTIFIER || _la==DELIMITEDIDENTIFIER) ) {
			_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 FunctionContext extends ParserRuleContext {
		public IdentifierContext identifier() {
			return getRuleContext(IdentifierContext.class,0);
		}
		public TargetMapContext targetMap() {
			return getRuleContext(TargetMapContext.class,0);
		}
		public FunctionContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_function; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof targetmapListener ) ((targetmapListener)listener).enterFunction(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof targetmapListener ) ((targetmapListener)listener).exitFunction(this);
		}
		@Override
		public  T accept(ParseTreeVisitor visitor) {
			if ( visitor instanceof targetmapVisitor ) return ((targetmapVisitor)visitor).visitFunction(this);
			else return visitor.visitChildren(this);
		}
	}

	public final FunctionContext function() throws RecognitionException {
		FunctionContext _localctx = new FunctionContext(_ctx, getState());
		enterRule(_localctx, 20, RULE_function);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(89);
			identifier();
			setState(90);
			match(T__9);
			setState(91);
			targetMap(0);
			setState(92);
			match(T__10);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) {
		switch (ruleIndex) {
		case 1:
			return targetMap_sempred((TargetMapContext)_localctx, predIndex);
		}
		return true;
	}
	private boolean targetMap_sempred(TargetMapContext _localctx, int predIndex) {
		switch (predIndex) {
		case 0:
			return precpred(_ctx, 3);
		case 1:
			return precpred(_ctx, 2);
		}
		return true;
	}

	public static final String _serializedATN =
		"\u0004\u0001\u0010_\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\u0001\u0000\u0001\u0000\u0001"+
		"\u0000\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0003\u0001\u001e"+
		"\b\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001"+
		"\u0001\u0001\u0001\u0001\u0001\u0005\u0001(\b\u0001\n\u0001\f\u0001+\t"+
		"\u0001\u0001\u0002\u0001\u0002\u0001\u0002\u0005\u00020\b\u0002\n\u0002"+
		"\f\u00023\t\u0002\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0003"+
		"\u00039\b\u0003\u0001\u0004\u0001\u0004\u0001\u0004\u0005\u0004>\b\u0004"+
		"\n\u0004\f\u0004A\t\u0004\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005"+
		"\u0001\u0006\u0001\u0006\u0001\u0006\u0003\u0006J\b\u0006\u0001\u0007"+
		"\u0001\u0007\u0003\u0007N\b\u0007\u0001\b\u0001\b\u0001\b\u0005\bS\b\b"+
		"\n\b\f\bV\t\b\u0001\t\u0001\t\u0001\n\u0001\n\u0001\n\u0001\n\u0001\n"+
		"\u0001\n\u0000\u0001\u0002\u000b\u0000\u0002\u0004\u0006\b\n\f\u000e\u0010"+
		"\u0012\u0014\u0000\u0001\u0001\u0000\f\r]\u0000\u0016\u0001\u0000\u0000"+
		"\u0000\u0002\u001d\u0001\u0000\u0000\u0000\u0004,\u0001\u0000\u0000\u0000"+
		"\u00068\u0001\u0000\u0000\u0000\b:\u0001\u0000\u0000\u0000\nB\u0001\u0000"+
		"\u0000\u0000\fI\u0001\u0000\u0000\u0000\u000eM\u0001\u0000\u0000\u0000"+
		"\u0010O\u0001\u0000\u0000\u0000\u0012W\u0001\u0000\u0000\u0000\u0014Y"+
		"\u0001\u0000\u0000\u0000\u0016\u0017\u0003\u0002\u0001\u0000\u0017\u0018"+
		"\u0005\u0000\u0000\u0001\u0018\u0001\u0001\u0000\u0000\u0000\u0019\u001a"+
		"\u0006\u0001\uffff\uffff\u0000\u001a\u001e\u0003\f\u0006\u0000\u001b\u001e"+
		"\u0003\u000e\u0007\u0000\u001c\u001e\u0003\u0004\u0002\u0000\u001d\u0019"+
		"\u0001\u0000\u0000\u0000\u001d\u001b\u0001\u0000\u0000\u0000\u001d\u001c"+
		"\u0001\u0000\u0000\u0000\u001e)\u0001\u0000\u0000\u0000\u001f \n\u0003"+
		"\u0000\u0000 !\u0005\u0001\u0000\u0000!(\u0003\u000e\u0007\u0000\"#\n"+
		"\u0002\u0000\u0000#$\u0005\u0002\u0000\u0000$%\u0003\b\u0004\u0000%&\u0005"+
		"\u0003\u0000\u0000&(\u0001\u0000\u0000\u0000\'\u001f\u0001\u0000\u0000"+
		"\u0000\'\"\u0001\u0000\u0000\u0000(+\u0001\u0000\u0000\u0000)\'\u0001"+
		"\u0000\u0000\u0000)*\u0001\u0000\u0000\u0000*\u0003\u0001\u0000\u0000"+
		"\u0000+)\u0001\u0000\u0000\u0000,1\u0003\u0006\u0003\u0000-.\u0005\u0004"+
		"\u0000\u0000.0\u0003\u0006\u0003\u0000/-\u0001\u0000\u0000\u000003\u0001"+
		"\u0000\u0000\u00001/\u0001\u0000\u0000\u000012\u0001\u0000\u0000\u0000"+
		"2\u0005\u0001\u0000\u0000\u000031\u0001\u0000\u0000\u000045\u0003\u0010"+
		"\b\u000056\u0005\u0005\u0000\u000067\u0003\u0002\u0001\u000079\u0001\u0000"+
		"\u0000\u000084\u0001\u0000\u0000\u000089\u0001\u0000\u0000\u00009\u0007"+
		"\u0001\u0000\u0000\u0000:?\u0003\n\u0005\u0000;<\u0005\u0006\u0000\u0000"+
		"<>\u0003\n\u0005\u0000=;\u0001\u0000\u0000\u0000>A\u0001\u0000\u0000\u0000"+
		"?=\u0001\u0000\u0000\u0000?@\u0001\u0000\u0000\u0000@\t\u0001\u0000\u0000"+
		"\u0000A?\u0001\u0000\u0000\u0000BC\u0003\u0012\t\u0000CD\u0005\u0007\u0000"+
		"\u0000DE\u0005\u000e\u0000\u0000E\u000b\u0001\u0000\u0000\u0000FG\u0005"+
		"\b\u0000\u0000GJ\u0003\u0012\t\u0000HJ\u0005\t\u0000\u0000IF\u0001\u0000"+
		"\u0000\u0000IH\u0001\u0000\u0000\u0000J\r\u0001\u0000\u0000\u0000KN\u0003"+
		"\u0012\t\u0000LN\u0003\u0014\n\u0000MK\u0001\u0000\u0000\u0000ML\u0001"+
		"\u0000\u0000\u0000N\u000f\u0001\u0000\u0000\u0000OT\u0003\u0012\t\u0000"+
		"PQ\u0005\u0001\u0000\u0000QS\u0003\u0012\t\u0000RP\u0001\u0000\u0000\u0000"+
		"SV\u0001\u0000\u0000\u0000TR\u0001\u0000\u0000\u0000TU\u0001\u0000\u0000"+
		"\u0000U\u0011\u0001\u0000\u0000\u0000VT\u0001\u0000\u0000\u0000WX\u0007"+
		"\u0000\u0000\u0000X\u0013\u0001\u0000\u0000\u0000YZ\u0003\u0012\t\u0000"+
		"Z[\u0005\n\u0000\u0000[\\\u0003\u0002\u0001\u0000\\]\u0005\u000b\u0000"+
		"\u0000]\u0015\u0001\u0000\u0000\u0000\t\u001d\')18?IMT";
	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 - 2024 Weber Informatics LLC | Privacy Policy