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

com.intuit.karate.core.KarateParser Maven / Gradle / Ivy

The newest version!
// Generated from java-escape by ANTLR 4.11.1
package com.intuit.karate.core;
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 KarateParser extends Parser {
	static { RuntimeMetaData.checkVersion("4.11.1", RuntimeMetaData.VERSION); }

	protected static final DFA[] _decisionToDFA;
	protected static final PredictionContextCache _sharedContextCache =
		new PredictionContextCache();
	public static final int
		FEATURE_COMMENT=1, FEATURE_TAGS=2, FEATURE=3, BACKGROUND=4, SCENARIO=5, 
		SCENARIO_OUTLINE=6, EXAMPLES=7, STAR=8, GIVEN=9, WHEN=10, THEN=11, AND=12, 
		BUT=13, COMMENT=14, TAGS=15, TABLE_ROW=16, DOC_STRING=17, CHAR=18, NEWLINE=19;
	public static final int
		RULE_feature = 0, RULE_featureHeader = 1, RULE_featureTags = 2, RULE_featureDescription = 3, 
		RULE_background = 4, RULE_scenario = 5, RULE_scenarioDescription = 6, 
		RULE_scenarioOutline = 7, RULE_examples = 8, RULE_exampleDescription = 9, 
		RULE_step = 10, RULE_prefix = 11, RULE_line = 12, RULE_tags = 13, RULE_docString = 14, 
		RULE_table = 15;
	private static String[] makeRuleNames() {
		return new String[] {
			"feature", "featureHeader", "featureTags", "featureDescription", "background", 
			"scenario", "scenarioDescription", "scenarioOutline", "examples", "exampleDescription", 
			"step", "prefix", "line", "tags", "docString", "table"
		};
	}
	public static final String[] ruleNames = makeRuleNames();

	private static String[] makeLiteralNames() {
		return new String[] {
		};
	}
	private static final String[] _LITERAL_NAMES = makeLiteralNames();
	private static String[] makeSymbolicNames() {
		return new String[] {
			null, "FEATURE_COMMENT", "FEATURE_TAGS", "FEATURE", "BACKGROUND", "SCENARIO", 
			"SCENARIO_OUTLINE", "EXAMPLES", "STAR", "GIVEN", "WHEN", "THEN", "AND", 
			"BUT", "COMMENT", "TAGS", "TABLE_ROW", "DOC_STRING", "CHAR", "NEWLINE"
		};
	}
	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 "java-escape"; }

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

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

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

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

	@SuppressWarnings("CheckReturnValue")
	public static class FeatureContext extends ParserRuleContext {
		public FeatureHeaderContext featureHeader() {
			return getRuleContext(FeatureHeaderContext.class,0);
		}
		public TerminalNode EOF() { return getToken(KarateParser.EOF, 0); }
		public BackgroundContext background() {
			return getRuleContext(BackgroundContext.class,0);
		}
		public List scenario() {
			return getRuleContexts(ScenarioContext.class);
		}
		public ScenarioContext scenario(int i) {
			return getRuleContext(ScenarioContext.class,i);
		}
		public List scenarioOutline() {
			return getRuleContexts(ScenarioOutlineContext.class);
		}
		public ScenarioOutlineContext scenarioOutline(int i) {
			return getRuleContext(ScenarioOutlineContext.class,i);
		}
		public TerminalNode NEWLINE() { return getToken(KarateParser.NEWLINE, 0); }
		public FeatureContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_feature; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof KarateParserListener ) ((KarateParserListener)listener).enterFeature(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof KarateParserListener ) ((KarateParserListener)listener).exitFeature(this);
		}
	}

	public final FeatureContext feature() throws RecognitionException {
		FeatureContext _localctx = new FeatureContext(_ctx, getState());
		enterRule(_localctx, 0, RULE_feature);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(32);
			featureHeader();
			setState(34);
			_errHandler.sync(this);
			_la = _input.LA(1);
			if (_la==BACKGROUND) {
				{
				setState(33);
				background();
				}
			}

			setState(40);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while (((_la) & ~0x3f) == 0 && ((1L << _la) & 32864L) != 0) {
				{
				setState(38);
				_errHandler.sync(this);
				switch ( getInterpreter().adaptivePredict(_input,1,_ctx) ) {
				case 1:
					{
					setState(36);
					scenario();
					}
					break;
				case 2:
					{
					setState(37);
					scenarioOutline();
					}
					break;
				}
				}
				setState(42);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			setState(44);
			_errHandler.sync(this);
			_la = _input.LA(1);
			if (_la==NEWLINE) {
				{
				setState(43);
				match(NEWLINE);
				}
			}

			setState(46);
			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 FeatureHeaderContext extends ParserRuleContext {
		public TerminalNode FEATURE() { return getToken(KarateParser.FEATURE, 0); }
		public FeatureDescriptionContext featureDescription() {
			return getRuleContext(FeatureDescriptionContext.class,0);
		}
		public FeatureTagsContext featureTags() {
			return getRuleContext(FeatureTagsContext.class,0);
		}
		public FeatureHeaderContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_featureHeader; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof KarateParserListener ) ((KarateParserListener)listener).enterFeatureHeader(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof KarateParserListener ) ((KarateParserListener)listener).exitFeatureHeader(this);
		}
	}

	public final FeatureHeaderContext featureHeader() throws RecognitionException {
		FeatureHeaderContext _localctx = new FeatureHeaderContext(_ctx, getState());
		enterRule(_localctx, 2, RULE_featureHeader);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(49);
			_errHandler.sync(this);
			_la = _input.LA(1);
			if (_la==FEATURE_TAGS) {
				{
				setState(48);
				featureTags();
				}
			}

			setState(51);
			match(FEATURE);
			setState(52);
			featureDescription();
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	@SuppressWarnings("CheckReturnValue")
	public static class FeatureTagsContext extends ParserRuleContext {
		public List FEATURE_TAGS() { return getTokens(KarateParser.FEATURE_TAGS); }
		public TerminalNode FEATURE_TAGS(int i) {
			return getToken(KarateParser.FEATURE_TAGS, i);
		}
		public FeatureTagsContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_featureTags; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof KarateParserListener ) ((KarateParserListener)listener).enterFeatureTags(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof KarateParserListener ) ((KarateParserListener)listener).exitFeatureTags(this);
		}
	}

	public final FeatureTagsContext featureTags() throws RecognitionException {
		FeatureTagsContext _localctx = new FeatureTagsContext(_ctx, getState());
		enterRule(_localctx, 4, RULE_featureTags);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(55); 
			_errHandler.sync(this);
			_la = _input.LA(1);
			do {
				{
				{
				setState(54);
				match(FEATURE_TAGS);
				}
				}
				setState(57); 
				_errHandler.sync(this);
				_la = _input.LA(1);
			} while ( _la==FEATURE_TAGS );
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	@SuppressWarnings("CheckReturnValue")
	public static class FeatureDescriptionContext extends ParserRuleContext {
		public List BACKGROUND() { return getTokens(KarateParser.BACKGROUND); }
		public TerminalNode BACKGROUND(int i) {
			return getToken(KarateParser.BACKGROUND, i);
		}
		public List SCENARIO() { return getTokens(KarateParser.SCENARIO); }
		public TerminalNode SCENARIO(int i) {
			return getToken(KarateParser.SCENARIO, i);
		}
		public List SCENARIO_OUTLINE() { return getTokens(KarateParser.SCENARIO_OUTLINE); }
		public TerminalNode SCENARIO_OUTLINE(int i) {
			return getToken(KarateParser.SCENARIO_OUTLINE, i);
		}
		public List TAGS() { return getTokens(KarateParser.TAGS); }
		public TerminalNode TAGS(int i) {
			return getToken(KarateParser.TAGS, i);
		}
		public FeatureDescriptionContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_featureDescription; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof KarateParserListener ) ((KarateParserListener)listener).enterFeatureDescription(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof KarateParserListener ) ((KarateParserListener)listener).exitFeatureDescription(this);
		}
	}

	public final FeatureDescriptionContext featureDescription() throws RecognitionException {
		FeatureDescriptionContext _localctx = new FeatureDescriptionContext(_ctx, getState());
		enterRule(_localctx, 6, RULE_featureDescription);
		int _la;
		try {
			int _alt;
			enterOuterAlt(_localctx, 1);
			{
			setState(62);
			_errHandler.sync(this);
			_alt = getInterpreter().adaptivePredict(_input,6,_ctx);
			while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
				if ( _alt==1 ) {
					{
					{
					setState(59);
					_la = _input.LA(1);
					if ( _la <= 0 || (((_la) & ~0x3f) == 0 && ((1L << _la) & 32880L) != 0) ) {
					_errHandler.recoverInline(this);
					}
					else {
						if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
						_errHandler.reportMatch(this);
						consume();
					}
					}
					} 
				}
				setState(64);
				_errHandler.sync(this);
				_alt = getInterpreter().adaptivePredict(_input,6,_ctx);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	@SuppressWarnings("CheckReturnValue")
	public static class BackgroundContext extends ParserRuleContext {
		public TerminalNode BACKGROUND() { return getToken(KarateParser.BACKGROUND, 0); }
		public ScenarioDescriptionContext scenarioDescription() {
			return getRuleContext(ScenarioDescriptionContext.class,0);
		}
		public List step() {
			return getRuleContexts(StepContext.class);
		}
		public StepContext step(int i) {
			return getRuleContext(StepContext.class,i);
		}
		public BackgroundContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_background; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof KarateParserListener ) ((KarateParserListener)listener).enterBackground(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof KarateParserListener ) ((KarateParserListener)listener).exitBackground(this);
		}
	}

	public final BackgroundContext background() throws RecognitionException {
		BackgroundContext _localctx = new BackgroundContext(_ctx, getState());
		enterRule(_localctx, 8, RULE_background);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(65);
			match(BACKGROUND);
			setState(66);
			scenarioDescription();
			setState(70);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while (((_la) & ~0x3f) == 0 && ((1L << _la) & 16128L) != 0) {
				{
				{
				setState(67);
				step();
				}
				}
				setState(72);
				_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 ScenarioContext extends ParserRuleContext {
		public TerminalNode SCENARIO() { return getToken(KarateParser.SCENARIO, 0); }
		public ScenarioDescriptionContext scenarioDescription() {
			return getRuleContext(ScenarioDescriptionContext.class,0);
		}
		public TagsContext tags() {
			return getRuleContext(TagsContext.class,0);
		}
		public List step() {
			return getRuleContexts(StepContext.class);
		}
		public StepContext step(int i) {
			return getRuleContext(StepContext.class,i);
		}
		public ScenarioContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_scenario; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof KarateParserListener ) ((KarateParserListener)listener).enterScenario(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof KarateParserListener ) ((KarateParserListener)listener).exitScenario(this);
		}
	}

	public final ScenarioContext scenario() throws RecognitionException {
		ScenarioContext _localctx = new ScenarioContext(_ctx, getState());
		enterRule(_localctx, 10, RULE_scenario);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(74);
			_errHandler.sync(this);
			_la = _input.LA(1);
			if (_la==TAGS) {
				{
				setState(73);
				tags();
				}
			}

			setState(76);
			match(SCENARIO);
			setState(77);
			scenarioDescription();
			setState(81);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while (((_la) & ~0x3f) == 0 && ((1L << _la) & 16128L) != 0) {
				{
				{
				setState(78);
				step();
				}
				}
				setState(83);
				_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 ScenarioDescriptionContext extends ParserRuleContext {
		public List STAR() { return getTokens(KarateParser.STAR); }
		public TerminalNode STAR(int i) {
			return getToken(KarateParser.STAR, i);
		}
		public List GIVEN() { return getTokens(KarateParser.GIVEN); }
		public TerminalNode GIVEN(int i) {
			return getToken(KarateParser.GIVEN, i);
		}
		public List WHEN() { return getTokens(KarateParser.WHEN); }
		public TerminalNode WHEN(int i) {
			return getToken(KarateParser.WHEN, i);
		}
		public List THEN() { return getTokens(KarateParser.THEN); }
		public TerminalNode THEN(int i) {
			return getToken(KarateParser.THEN, i);
		}
		public List AND() { return getTokens(KarateParser.AND); }
		public TerminalNode AND(int i) {
			return getToken(KarateParser.AND, i);
		}
		public List BUT() { return getTokens(KarateParser.BUT); }
		public TerminalNode BUT(int i) {
			return getToken(KarateParser.BUT, i);
		}
		public List SCENARIO() { return getTokens(KarateParser.SCENARIO); }
		public TerminalNode SCENARIO(int i) {
			return getToken(KarateParser.SCENARIO, i);
		}
		public List SCENARIO_OUTLINE() { return getTokens(KarateParser.SCENARIO_OUTLINE); }
		public TerminalNode SCENARIO_OUTLINE(int i) {
			return getToken(KarateParser.SCENARIO_OUTLINE, i);
		}
		public List TAGS() { return getTokens(KarateParser.TAGS); }
		public TerminalNode TAGS(int i) {
			return getToken(KarateParser.TAGS, i);
		}
		public ScenarioDescriptionContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_scenarioDescription; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof KarateParserListener ) ((KarateParserListener)listener).enterScenarioDescription(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof KarateParserListener ) ((KarateParserListener)listener).exitScenarioDescription(this);
		}
	}

	public final ScenarioDescriptionContext scenarioDescription() throws RecognitionException {
		ScenarioDescriptionContext _localctx = new ScenarioDescriptionContext(_ctx, getState());
		enterRule(_localctx, 12, RULE_scenarioDescription);
		int _la;
		try {
			int _alt;
			enterOuterAlt(_localctx, 1);
			{
			setState(87);
			_errHandler.sync(this);
			_alt = getInterpreter().adaptivePredict(_input,10,_ctx);
			while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
				if ( _alt==1 ) {
					{
					{
					setState(84);
					_la = _input.LA(1);
					if ( _la <= 0 || (((_la) & ~0x3f) == 0 && ((1L << _la) & 48992L) != 0) ) {
					_errHandler.recoverInline(this);
					}
					else {
						if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
						_errHandler.reportMatch(this);
						consume();
					}
					}
					} 
				}
				setState(89);
				_errHandler.sync(this);
				_alt = getInterpreter().adaptivePredict(_input,10,_ctx);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	@SuppressWarnings("CheckReturnValue")
	public static class ScenarioOutlineContext extends ParserRuleContext {
		public TerminalNode SCENARIO_OUTLINE() { return getToken(KarateParser.SCENARIO_OUTLINE, 0); }
		public ScenarioDescriptionContext scenarioDescription() {
			return getRuleContext(ScenarioDescriptionContext.class,0);
		}
		public TagsContext tags() {
			return getRuleContext(TagsContext.class,0);
		}
		public List step() {
			return getRuleContexts(StepContext.class);
		}
		public StepContext step(int i) {
			return getRuleContext(StepContext.class,i);
		}
		public List examples() {
			return getRuleContexts(ExamplesContext.class);
		}
		public ExamplesContext examples(int i) {
			return getRuleContext(ExamplesContext.class,i);
		}
		public ScenarioOutlineContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_scenarioOutline; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof KarateParserListener ) ((KarateParserListener)listener).enterScenarioOutline(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof KarateParserListener ) ((KarateParserListener)listener).exitScenarioOutline(this);
		}
	}

	public final ScenarioOutlineContext scenarioOutline() throws RecognitionException {
		ScenarioOutlineContext _localctx = new ScenarioOutlineContext(_ctx, getState());
		enterRule(_localctx, 14, RULE_scenarioOutline);
		int _la;
		try {
			int _alt;
			enterOuterAlt(_localctx, 1);
			{
			setState(91);
			_errHandler.sync(this);
			_la = _input.LA(1);
			if (_la==TAGS) {
				{
				setState(90);
				tags();
				}
			}

			setState(93);
			match(SCENARIO_OUTLINE);
			setState(94);
			scenarioDescription();
			setState(98);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while (((_la) & ~0x3f) == 0 && ((1L << _la) & 16128L) != 0) {
				{
				{
				setState(95);
				step();
				}
				}
				setState(100);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			setState(102); 
			_errHandler.sync(this);
			_alt = 1;
			do {
				switch (_alt) {
				case 1:
					{
					{
					setState(101);
					examples();
					}
					}
					break;
				default:
					throw new NoViableAltException(this);
				}
				setState(104); 
				_errHandler.sync(this);
				_alt = getInterpreter().adaptivePredict(_input,13,_ctx);
			} while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	@SuppressWarnings("CheckReturnValue")
	public static class ExamplesContext extends ParserRuleContext {
		public TerminalNode EXAMPLES() { return getToken(KarateParser.EXAMPLES, 0); }
		public ExampleDescriptionContext exampleDescription() {
			return getRuleContext(ExampleDescriptionContext.class,0);
		}
		public TableContext table() {
			return getRuleContext(TableContext.class,0);
		}
		public TagsContext tags() {
			return getRuleContext(TagsContext.class,0);
		}
		public ExamplesContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_examples; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof KarateParserListener ) ((KarateParserListener)listener).enterExamples(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof KarateParserListener ) ((KarateParserListener)listener).exitExamples(this);
		}
	}

	public final ExamplesContext examples() throws RecognitionException {
		ExamplesContext _localctx = new ExamplesContext(_ctx, getState());
		enterRule(_localctx, 16, RULE_examples);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(107);
			_errHandler.sync(this);
			_la = _input.LA(1);
			if (_la==TAGS) {
				{
				setState(106);
				tags();
				}
			}

			setState(109);
			match(EXAMPLES);
			setState(110);
			exampleDescription();
			setState(111);
			table();
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	@SuppressWarnings("CheckReturnValue")
	public static class ExampleDescriptionContext extends ParserRuleContext {
		public List TABLE_ROW() { return getTokens(KarateParser.TABLE_ROW); }
		public TerminalNode TABLE_ROW(int i) {
			return getToken(KarateParser.TABLE_ROW, i);
		}
		public ExampleDescriptionContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_exampleDescription; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof KarateParserListener ) ((KarateParserListener)listener).enterExampleDescription(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof KarateParserListener ) ((KarateParserListener)listener).exitExampleDescription(this);
		}
	}

	public final ExampleDescriptionContext exampleDescription() throws RecognitionException {
		ExampleDescriptionContext _localctx = new ExampleDescriptionContext(_ctx, getState());
		enterRule(_localctx, 18, RULE_exampleDescription);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(116);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while (((_la) & ~0x3f) == 0 && ((1L << _la) & 983038L) != 0) {
				{
				{
				setState(113);
				_la = _input.LA(1);
				if ( _la <= 0 || (_la==TABLE_ROW) ) {
				_errHandler.recoverInline(this);
				}
				else {
					if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
					_errHandler.reportMatch(this);
					consume();
				}
				}
				}
				setState(118);
				_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 StepContext extends ParserRuleContext {
		public PrefixContext prefix() {
			return getRuleContext(PrefixContext.class,0);
		}
		public LineContext line() {
			return getRuleContext(LineContext.class,0);
		}
		public DocStringContext docString() {
			return getRuleContext(DocStringContext.class,0);
		}
		public TableContext table() {
			return getRuleContext(TableContext.class,0);
		}
		public StepContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_step; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof KarateParserListener ) ((KarateParserListener)listener).enterStep(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof KarateParserListener ) ((KarateParserListener)listener).exitStep(this);
		}
	}

	public final StepContext step() throws RecognitionException {
		StepContext _localctx = new StepContext(_ctx, getState());
		enterRule(_localctx, 20, RULE_step);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(119);
			prefix();
			setState(120);
			line();
			setState(123);
			_errHandler.sync(this);
			switch (_input.LA(1)) {
			case DOC_STRING:
				{
				setState(121);
				docString();
				}
				break;
			case TABLE_ROW:
				{
				setState(122);
				table();
				}
				break;
			case EOF:
			case SCENARIO:
			case SCENARIO_OUTLINE:
			case EXAMPLES:
			case STAR:
			case GIVEN:
			case WHEN:
			case THEN:
			case AND:
			case BUT:
			case TAGS:
			case NEWLINE:
				break;
			default:
				break;
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	@SuppressWarnings("CheckReturnValue")
	public static class PrefixContext extends ParserRuleContext {
		public TerminalNode STAR() { return getToken(KarateParser.STAR, 0); }
		public TerminalNode GIVEN() { return getToken(KarateParser.GIVEN, 0); }
		public TerminalNode WHEN() { return getToken(KarateParser.WHEN, 0); }
		public TerminalNode THEN() { return getToken(KarateParser.THEN, 0); }
		public TerminalNode AND() { return getToken(KarateParser.AND, 0); }
		public TerminalNode BUT() { return getToken(KarateParser.BUT, 0); }
		public PrefixContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_prefix; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof KarateParserListener ) ((KarateParserListener)listener).enterPrefix(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof KarateParserListener ) ((KarateParserListener)listener).exitPrefix(this);
		}
	}

	public final PrefixContext prefix() throws RecognitionException {
		PrefixContext _localctx = new PrefixContext(_ctx, getState());
		enterRule(_localctx, 22, RULE_prefix);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(125);
			_la = _input.LA(1);
			if ( !(((_la) & ~0x3f) == 0 && ((1L << _la) & 16128L) != 0) ) {
			_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 LineContext extends ParserRuleContext {
		public List CHAR() { return getTokens(KarateParser.CHAR); }
		public TerminalNode CHAR(int i) {
			return getToken(KarateParser.CHAR, i);
		}
		public LineContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_line; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof KarateParserListener ) ((KarateParserListener)listener).enterLine(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof KarateParserListener ) ((KarateParserListener)listener).exitLine(this);
		}
	}

	public final LineContext line() throws RecognitionException {
		LineContext _localctx = new LineContext(_ctx, getState());
		enterRule(_localctx, 24, RULE_line);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(128); 
			_errHandler.sync(this);
			_la = _input.LA(1);
			do {
				{
				{
				setState(127);
				match(CHAR);
				}
				}
				setState(130); 
				_errHandler.sync(this);
				_la = _input.LA(1);
			} while ( _la==CHAR );
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	@SuppressWarnings("CheckReturnValue")
	public static class TagsContext extends ParserRuleContext {
		public List TAGS() { return getTokens(KarateParser.TAGS); }
		public TerminalNode TAGS(int i) {
			return getToken(KarateParser.TAGS, i);
		}
		public TagsContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_tags; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof KarateParserListener ) ((KarateParserListener)listener).enterTags(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof KarateParserListener ) ((KarateParserListener)listener).exitTags(this);
		}
	}

	public final TagsContext tags() throws RecognitionException {
		TagsContext _localctx = new TagsContext(_ctx, getState());
		enterRule(_localctx, 26, RULE_tags);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(133); 
			_errHandler.sync(this);
			_la = _input.LA(1);
			do {
				{
				{
				setState(132);
				match(TAGS);
				}
				}
				setState(135); 
				_errHandler.sync(this);
				_la = _input.LA(1);
			} while ( _la==TAGS );
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	@SuppressWarnings("CheckReturnValue")
	public static class DocStringContext extends ParserRuleContext {
		public TerminalNode DOC_STRING() { return getToken(KarateParser.DOC_STRING, 0); }
		public DocStringContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_docString; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof KarateParserListener ) ((KarateParserListener)listener).enterDocString(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof KarateParserListener ) ((KarateParserListener)listener).exitDocString(this);
		}
	}

	public final DocStringContext docString() throws RecognitionException {
		DocStringContext _localctx = new DocStringContext(_ctx, getState());
		enterRule(_localctx, 28, RULE_docString);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(137);
			match(DOC_STRING);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	@SuppressWarnings("CheckReturnValue")
	public static class TableContext extends ParserRuleContext {
		public List TABLE_ROW() { return getTokens(KarateParser.TABLE_ROW); }
		public TerminalNode TABLE_ROW(int i) {
			return getToken(KarateParser.TABLE_ROW, i);
		}
		public TableContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_table; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof KarateParserListener ) ((KarateParserListener)listener).enterTable(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof KarateParserListener ) ((KarateParserListener)listener).exitTable(this);
		}
	}

	public final TableContext table() throws RecognitionException {
		TableContext _localctx = new TableContext(_ctx, getState());
		enterRule(_localctx, 30, RULE_table);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(140); 
			_errHandler.sync(this);
			_la = _input.LA(1);
			do {
				{
				{
				setState(139);
				match(TABLE_ROW);
				}
				}
				setState(142); 
				_errHandler.sync(this);
				_la = _input.LA(1);
			} while ( _la==TABLE_ROW );
			}
		}
		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\u0013\u0091\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\u0003\u0000#\b\u0000\u0001\u0000\u0001"+
		"\u0000\u0005\u0000\'\b\u0000\n\u0000\f\u0000*\t\u0000\u0001\u0000\u0003"+
		"\u0000-\b\u0000\u0001\u0000\u0001\u0000\u0001\u0001\u0003\u00012\b\u0001"+
		"\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0002\u0004\u00028\b\u0002"+
		"\u000b\u0002\f\u00029\u0001\u0003\u0005\u0003=\b\u0003\n\u0003\f\u0003"+
		"@\t\u0003\u0001\u0004\u0001\u0004\u0001\u0004\u0005\u0004E\b\u0004\n\u0004"+
		"\f\u0004H\t\u0004\u0001\u0005\u0003\u0005K\b\u0005\u0001\u0005\u0001\u0005"+
		"\u0001\u0005\u0005\u0005P\b\u0005\n\u0005\f\u0005S\t\u0005\u0001\u0006"+
		"\u0005\u0006V\b\u0006\n\u0006\f\u0006Y\t\u0006\u0001\u0007\u0003\u0007"+
		"\\\b\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0005\u0007a\b\u0007\n"+
		"\u0007\f\u0007d\t\u0007\u0001\u0007\u0004\u0007g\b\u0007\u000b\u0007\f"+
		"\u0007h\u0001\b\u0003\bl\b\b\u0001\b\u0001\b\u0001\b\u0001\b\u0001\t\u0005"+
		"\ts\b\t\n\t\f\tv\t\t\u0001\n\u0001\n\u0001\n\u0001\n\u0003\n|\b\n\u0001"+
		"\u000b\u0001\u000b\u0001\f\u0004\f\u0081\b\f\u000b\f\f\f\u0082\u0001\r"+
		"\u0004\r\u0086\b\r\u000b\r\f\r\u0087\u0001\u000e\u0001\u000e\u0001\u000f"+
		"\u0004\u000f\u008d\b\u000f\u000b\u000f\f\u000f\u008e\u0001\u000f\u0000"+
		"\u0000\u0010\u0000\u0002\u0004\u0006\b\n\f\u000e\u0010\u0012\u0014\u0016"+
		"\u0018\u001a\u001c\u001e\u0000\u0004\u0002\u0000\u0004\u0006\u000f\u000f"+
		"\u0003\u0000\u0005\u0006\b\r\u000f\u000f\u0001\u0000\u0010\u0010\u0001"+
		"\u0000\b\r\u0095\u0000 \u0001\u0000\u0000\u0000\u00021\u0001\u0000\u0000"+
		"\u0000\u00047\u0001\u0000\u0000\u0000\u0006>\u0001\u0000\u0000\u0000\b"+
		"A\u0001\u0000\u0000\u0000\nJ\u0001\u0000\u0000\u0000\fW\u0001\u0000\u0000"+
		"\u0000\u000e[\u0001\u0000\u0000\u0000\u0010k\u0001\u0000\u0000\u0000\u0012"+
		"t\u0001\u0000\u0000\u0000\u0014w\u0001\u0000\u0000\u0000\u0016}\u0001"+
		"\u0000\u0000\u0000\u0018\u0080\u0001\u0000\u0000\u0000\u001a\u0085\u0001"+
		"\u0000\u0000\u0000\u001c\u0089\u0001\u0000\u0000\u0000\u001e\u008c\u0001"+
		"\u0000\u0000\u0000 \"\u0003\u0002\u0001\u0000!#\u0003\b\u0004\u0000\""+
		"!\u0001\u0000\u0000\u0000\"#\u0001\u0000\u0000\u0000#(\u0001\u0000\u0000"+
		"\u0000$\'\u0003\n\u0005\u0000%\'\u0003\u000e\u0007\u0000&$\u0001\u0000"+
		"\u0000\u0000&%\u0001\u0000\u0000\u0000\'*\u0001\u0000\u0000\u0000(&\u0001"+
		"\u0000\u0000\u0000()\u0001\u0000\u0000\u0000),\u0001\u0000\u0000\u0000"+
		"*(\u0001\u0000\u0000\u0000+-\u0005\u0013\u0000\u0000,+\u0001\u0000\u0000"+
		"\u0000,-\u0001\u0000\u0000\u0000-.\u0001\u0000\u0000\u0000./\u0005\u0000"+
		"\u0000\u0001/\u0001\u0001\u0000\u0000\u000002\u0003\u0004\u0002\u0000"+
		"10\u0001\u0000\u0000\u000012\u0001\u0000\u0000\u000023\u0001\u0000\u0000"+
		"\u000034\u0005\u0003\u0000\u000045\u0003\u0006\u0003\u00005\u0003\u0001"+
		"\u0000\u0000\u000068\u0005\u0002\u0000\u000076\u0001\u0000\u0000\u0000"+
		"89\u0001\u0000\u0000\u000097\u0001\u0000\u0000\u00009:\u0001\u0000\u0000"+
		"\u0000:\u0005\u0001\u0000\u0000\u0000;=\b\u0000\u0000\u0000<;\u0001\u0000"+
		"\u0000\u0000=@\u0001\u0000\u0000\u0000><\u0001\u0000\u0000\u0000>?\u0001"+
		"\u0000\u0000\u0000?\u0007\u0001\u0000\u0000\u0000@>\u0001\u0000\u0000"+
		"\u0000AB\u0005\u0004\u0000\u0000BF\u0003\f\u0006\u0000CE\u0003\u0014\n"+
		"\u0000DC\u0001\u0000\u0000\u0000EH\u0001\u0000\u0000\u0000FD\u0001\u0000"+
		"\u0000\u0000FG\u0001\u0000\u0000\u0000G\t\u0001\u0000\u0000\u0000HF\u0001"+
		"\u0000\u0000\u0000IK\u0003\u001a\r\u0000JI\u0001\u0000\u0000\u0000JK\u0001"+
		"\u0000\u0000\u0000KL\u0001\u0000\u0000\u0000LM\u0005\u0005\u0000\u0000"+
		"MQ\u0003\f\u0006\u0000NP\u0003\u0014\n\u0000ON\u0001\u0000\u0000\u0000"+
		"PS\u0001\u0000\u0000\u0000QO\u0001\u0000\u0000\u0000QR\u0001\u0000\u0000"+
		"\u0000R\u000b\u0001\u0000\u0000\u0000SQ\u0001\u0000\u0000\u0000TV\b\u0001"+
		"\u0000\u0000UT\u0001\u0000\u0000\u0000VY\u0001\u0000\u0000\u0000WU\u0001"+
		"\u0000\u0000\u0000WX\u0001\u0000\u0000\u0000X\r\u0001\u0000\u0000\u0000"+
		"YW\u0001\u0000\u0000\u0000Z\\\u0003\u001a\r\u0000[Z\u0001\u0000\u0000"+
		"\u0000[\\\u0001\u0000\u0000\u0000\\]\u0001\u0000\u0000\u0000]^\u0005\u0006"+
		"\u0000\u0000^b\u0003\f\u0006\u0000_a\u0003\u0014\n\u0000`_\u0001\u0000"+
		"\u0000\u0000ad\u0001\u0000\u0000\u0000b`\u0001\u0000\u0000\u0000bc\u0001"+
		"\u0000\u0000\u0000cf\u0001\u0000\u0000\u0000db\u0001\u0000\u0000\u0000"+
		"eg\u0003\u0010\b\u0000fe\u0001\u0000\u0000\u0000gh\u0001\u0000\u0000\u0000"+
		"hf\u0001\u0000\u0000\u0000hi\u0001\u0000\u0000\u0000i\u000f\u0001\u0000"+
		"\u0000\u0000jl\u0003\u001a\r\u0000kj\u0001\u0000\u0000\u0000kl\u0001\u0000"+
		"\u0000\u0000lm\u0001\u0000\u0000\u0000mn\u0005\u0007\u0000\u0000no\u0003"+
		"\u0012\t\u0000op\u0003\u001e\u000f\u0000p\u0011\u0001\u0000\u0000\u0000"+
		"qs\b\u0002\u0000\u0000rq\u0001\u0000\u0000\u0000sv\u0001\u0000\u0000\u0000"+
		"tr\u0001\u0000\u0000\u0000tu\u0001\u0000\u0000\u0000u\u0013\u0001\u0000"+
		"\u0000\u0000vt\u0001\u0000\u0000\u0000wx\u0003\u0016\u000b\u0000x{\u0003"+
		"\u0018\f\u0000y|\u0003\u001c\u000e\u0000z|\u0003\u001e\u000f\u0000{y\u0001"+
		"\u0000\u0000\u0000{z\u0001\u0000\u0000\u0000{|\u0001\u0000\u0000\u0000"+
		"|\u0015\u0001\u0000\u0000\u0000}~\u0007\u0003\u0000\u0000~\u0017\u0001"+
		"\u0000\u0000\u0000\u007f\u0081\u0005\u0012\u0000\u0000\u0080\u007f\u0001"+
		"\u0000\u0000\u0000\u0081\u0082\u0001\u0000\u0000\u0000\u0082\u0080\u0001"+
		"\u0000\u0000\u0000\u0082\u0083\u0001\u0000\u0000\u0000\u0083\u0019\u0001"+
		"\u0000\u0000\u0000\u0084\u0086\u0005\u000f\u0000\u0000\u0085\u0084\u0001"+
		"\u0000\u0000\u0000\u0086\u0087\u0001\u0000\u0000\u0000\u0087\u0085\u0001"+
		"\u0000\u0000\u0000\u0087\u0088\u0001\u0000\u0000\u0000\u0088\u001b\u0001"+
		"\u0000\u0000\u0000\u0089\u008a\u0005\u0011\u0000\u0000\u008a\u001d\u0001"+
		"\u0000\u0000\u0000\u008b\u008d\u0005\u0010\u0000\u0000\u008c\u008b\u0001"+
		"\u0000\u0000\u0000\u008d\u008e\u0001\u0000\u0000\u0000\u008e\u008c\u0001"+
		"\u0000\u0000\u0000\u008e\u008f\u0001\u0000\u0000\u0000\u008f\u001f\u0001"+
		"\u0000\u0000\u0000\u0014\"&(,19>FJQW[bhkt{\u0082\u0087\u008e";
	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