// Generated from /home/fer/lsp-tutorial/ballerina-language-server/src/main/java/grammar/ProgressParser.g4 by ANTLR 4.13.2
package grammar;
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", "this-escape"})
public class ProgressParser extends Parser {
	static { RuntimeMetaData.checkVersion("4.13.2", RuntimeMetaData.VERSION); }

	protected static final DFA[] _decisionToDFA;
	protected static final PredictionContextCache _sharedContextCache =
		new PredictionContextCache();
	public static final int
		INCLUDE=1, MESSAGE=2, DO=3, END=4, DEFINE=5, TEXT=6, LCURLY=7, AMP=8, 
		RCURLY=9, DQUOTE=10, DOT=11, STRING_LITERAL=12, WS=13;
	public static final int
		RULE_program = 0, RULE_doStatement = 1;
	private static String[] makeRuleNames() {
		return new String[] {
			"program", "doStatement"
		};
	}
	public static final String[] ruleNames = makeRuleNames();

	private static String[] makeLiteralNames() {
		return new String[] {
			null, null, null, null, null, null, null, "'{'", "'&'", "'}'", "'\"'", 
			"'.'"
		};
	}
	private static final String[] _LITERAL_NAMES = makeLiteralNames();
	private static String[] makeSymbolicNames() {
		return new String[] {
			null, "INCLUDE", "MESSAGE", "DO", "END", "DEFINE", "TEXT", "LCURLY", 
			"AMP", "RCURLY", "DQUOTE", "DOT", "STRING_LITERAL", "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] = "<INVALID>";
			}
		}
	}

	@Override
	@Deprecated
	public String[] getTokenNames() {
		return tokenNames;
	}

	@Override

	public Vocabulary getVocabulary() {
		return VOCABULARY;
	}

	@Override
	public String getGrammarFileName() { return "ProgressParser.g4"; }

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

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

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

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

	@SuppressWarnings("CheckReturnValue")
	public static class ProgramContext extends ParserRuleContext {
		public List<DoStatementContext> doStatement() {
			return getRuleContexts(DoStatementContext.class);
		}
		public DoStatementContext doStatement(int i) {
			return getRuleContext(DoStatementContext.class,i);
		}
		public List<TerminalNode> WS() { return getTokens(ProgressParser.WS); }
		public TerminalNode WS(int i) {
			return getToken(ProgressParser.WS, i);
		}
		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 ProgressParserListener ) ((ProgressParserListener)listener).enterProgram(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof ProgressParserListener ) ((ProgressParserListener)listener).exitProgram(this);
		}
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof ProgressParserVisitor ) return ((ProgressParserVisitor<? extends T>)visitor).visitProgram(this);
			else return visitor.visitChildren(this);
		}
	}

	public final ProgramContext program() throws RecognitionException {
		ProgramContext _localctx = new ProgramContext(_ctx, getState());
		enterRule(_localctx, 0, RULE_program);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(8);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while (_la==DO || _la==WS) {
				{
				setState(6);
				_errHandler.sync(this);
				switch (_input.LA(1)) {
				case DO:
					{
					setState(4);
					doStatement();
					}
					break;
				case WS:
					{
					setState(5);
					match(WS);
					}
					break;
				default:
					throw new NoViableAltException(this);
				}
				}
				setState(10);
				_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 DoStatementContext extends ParserRuleContext {
		public TerminalNode DO() { return getToken(ProgressParser.DO, 0); }
		public TerminalNode END() { return getToken(ProgressParser.END, 0); }
		public List<TerminalNode> DOT() { return getTokens(ProgressParser.DOT); }
		public TerminalNode DOT(int i) {
			return getToken(ProgressParser.DOT, i);
		}
		public List<TerminalNode> MESSAGE() { return getTokens(ProgressParser.MESSAGE); }
		public TerminalNode MESSAGE(int i) {
			return getToken(ProgressParser.MESSAGE, i);
		}
		public List<TerminalNode> WS() { return getTokens(ProgressParser.WS); }
		public TerminalNode WS(int i) {
			return getToken(ProgressParser.WS, i);
		}
		public List<TerminalNode> STRING_LITERAL() { return getTokens(ProgressParser.STRING_LITERAL); }
		public TerminalNode STRING_LITERAL(int i) {
			return getToken(ProgressParser.STRING_LITERAL, i);
		}
		public DoStatementContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_doStatement; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof ProgressParserListener ) ((ProgressParserListener)listener).enterDoStatement(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof ProgressParserListener ) ((ProgressParserListener)listener).exitDoStatement(this);
		}
		@Override
		public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
			if ( visitor instanceof ProgressParserVisitor ) return ((ProgressParserVisitor<? extends T>)visitor).visitDoStatement(this);
			else return visitor.visitChildren(this);
		}
	}

	public final DoStatementContext doStatement() throws RecognitionException {
		DoStatementContext _localctx = new DoStatementContext(_ctx, getState());
		enterRule(_localctx, 2, RULE_doStatement);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(11);
			match(DO);
			setState(19);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while (_la==MESSAGE || _la==WS) {
				{
				setState(17);
				_errHandler.sync(this);
				switch (_input.LA(1)) {
				case MESSAGE:
					{
					setState(12);
					match(MESSAGE);
					setState(13);
					match(WS);
					setState(14);
					match(STRING_LITERAL);
					setState(15);
					match(DOT);
					}
					break;
				case WS:
					{
					setState(16);
					match(WS);
					}
					break;
				default:
					throw new NoViableAltException(this);
				}
				}
				setState(21);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			setState(22);
			match(END);
			setState(23);
			match(DOT);
			}
		}
		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\r\u001a\u0002\u0000\u0007\u0000\u0002\u0001\u0007\u0001\u0001"+
		"\u0000\u0001\u0000\u0005\u0000\u0007\b\u0000\n\u0000\f\u0000\n\t\u0000"+
		"\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001"+
		"\u0005\u0001\u0012\b\u0001\n\u0001\f\u0001\u0015\t\u0001\u0001\u0001\u0001"+
		"\u0001\u0001\u0001\u0001\u0001\u0000\u0000\u0002\u0000\u0002\u0000\u0000"+
		"\u001b\u0000\b\u0001\u0000\u0000\u0000\u0002\u000b\u0001\u0000\u0000\u0000"+
		"\u0004\u0007\u0003\u0002\u0001\u0000\u0005\u0007\u0005\r\u0000\u0000\u0006"+
		"\u0004\u0001\u0000\u0000\u0000\u0006\u0005\u0001\u0000\u0000\u0000\u0007"+
		"\n\u0001\u0000\u0000\u0000\b\u0006\u0001\u0000\u0000\u0000\b\t\u0001\u0000"+
		"\u0000\u0000\t\u0001\u0001\u0000\u0000\u0000\n\b\u0001\u0000\u0000\u0000"+
		"\u000b\u0013\u0005\u0003\u0000\u0000\f\r\u0005\u0002\u0000\u0000\r\u000e"+
		"\u0005\r\u0000\u0000\u000e\u000f\u0005\f\u0000\u0000\u000f\u0012\u0005"+
		"\u000b\u0000\u0000\u0010\u0012\u0005\r\u0000\u0000\u0011\f\u0001\u0000"+
		"\u0000\u0000\u0011\u0010\u0001\u0000\u0000\u0000\u0012\u0015\u0001\u0000"+
		"\u0000\u0000\u0013\u0011\u0001\u0000\u0000\u0000\u0013\u0014\u0001\u0000"+
		"\u0000\u0000\u0014\u0016\u0001\u0000\u0000\u0000\u0015\u0013\u0001\u0000"+
		"\u0000\u0000\u0016\u0017\u0005\u0004\u0000\u0000\u0017\u0018\u0005\u000b"+
		"\u0000\u0000\u0018\u0003\u0001\u0000\u0000\u0000\u0004\u0006\b\u0011\u0013";
	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);
		}
	}
}