com.fizzed.rocker.antlr4.WithBlockParser Maven / Gradle / Ivy
The newest version!
// Generated from com/fizzed/rocker/antlr4/WithBlockParser.g4 by ANTLR 4.5.3
package com.fizzed.rocker.antlr4;
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"})
public class WithBlockParser extends Parser {
static { RuntimeMetaData.checkVersion("4.5.3", RuntimeMetaData.VERSION); }
protected static final DFA[] _decisionToDFA;
protected static final PredictionContextCache _sharedContextCache =
new PredictionContextCache();
public static final int
ARGUMENT_COMMA=1, ARGUMENT=2;
public static final int
RULE_start = 0, RULE_withArguments = 1;
public static final String[] ruleNames = {
"start", "withArguments"
};
private static final String[] _LITERAL_NAMES = {
};
private static final String[] _SYMBOLIC_NAMES = {
null, "ARGUMENT_COMMA", "ARGUMENT"
};
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 "WithBlockParser.g4"; }
@Override
public String[] getRuleNames() { return ruleNames; }
@Override
public String getSerializedATN() { return _serializedATN; }
@Override
public ATN getATN() { return _ATN; }
public WithBlockParser(TokenStream input) {
super(input);
_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
public static class StartContext extends ParserRuleContext {
public WithArgumentsContext withArguments() {
return getRuleContext(WithArgumentsContext.class,0);
}
public TerminalNode EOF() { return getToken(WithBlockParser.EOF, 0); }
public StartContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_start; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof WithBlockParserListener ) ((WithBlockParserListener)listener).enterStart(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof WithBlockParserListener ) ((WithBlockParserListener)listener).exitStart(this);
}
}
public final StartContext start() throws RecognitionException {
StartContext _localctx = new StartContext(_ctx, getState());
enterRule(_localctx, 0, RULE_start);
try {
enterOuterAlt(_localctx, 1);
{
setState(4);
withArguments();
setState(5);
match(EOF);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class WithArgumentsContext extends ParserRuleContext {
public TerminalNode ARGUMENT() { return getToken(WithBlockParser.ARGUMENT, 0); }
public List ARGUMENT_COMMA() { return getTokens(WithBlockParser.ARGUMENT_COMMA); }
public TerminalNode ARGUMENT_COMMA(int i) {
return getToken(WithBlockParser.ARGUMENT_COMMA, i);
}
public WithArgumentsContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_withArguments; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof WithBlockParserListener ) ((WithBlockParserListener)listener).enterWithArguments(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof WithBlockParserListener ) ((WithBlockParserListener)listener).exitWithArguments(this);
}
}
public final WithArgumentsContext withArguments() throws RecognitionException {
WithArgumentsContext _localctx = new WithArgumentsContext(_ctx, getState());
enterRule(_localctx, 2, RULE_withArguments);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(10);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==ARGUMENT_COMMA) {
{
{
setState(7);
match(ARGUMENT_COMMA);
}
}
setState(12);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(13);
match(ARGUMENT);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static final String _serializedATN =
"\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3\4\22\4\2\t\2\4\3"+
"\t\3\3\2\3\2\3\2\3\3\7\3\13\n\3\f\3\16\3\16\13\3\3\3\3\3\3\3\2\2\4\2\4"+
"\2\2\20\2\6\3\2\2\2\4\f\3\2\2\2\6\7\5\4\3\2\7\b\7\2\2\3\b\3\3\2\2\2\t"+
"\13\7\3\2\2\n\t\3\2\2\2\13\16\3\2\2\2\f\n\3\2\2\2\f\r\3\2\2\2\r\17\3\2"+
"\2\2\16\f\3\2\2\2\17\20\7\4\2\2\20\5\3\2\2\2\3\f";
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