public class ParserInterpreter extends Parser
Parser.TraceListener, Parser.TrimToSizeListener
Modifier and Type | Field and Description |
---|---|
protected java.util.Deque<Pair<ParserRuleContext,java.lang.Integer>> |
_parentContextStack |
protected ATN |
atn |
protected DFA[] |
decisionToDFA |
protected java.lang.String |
grammarFileName |
protected java.util.BitSet |
pushRecursionContextStates |
protected java.lang.String[] |
ruleNames |
protected PredictionContextCache |
sharedContextCache |
protected java.lang.String[] |
tokenNames
Deprecated.
|
_buildParseTrees, _ctx, _errHandler, _input, _parseListeners, _precedenceStack, _syntaxErrors
_interp, EOF
Constructor and Description |
---|
ParserInterpreter(java.lang.String grammarFileName,
java.util.Collection<java.lang.String> tokenNames,
java.util.Collection<java.lang.String> ruleNames,
ATN atn,
TokenStream input)
Deprecated.
|
ParserInterpreter(java.lang.String grammarFileName,
Vocabulary vocabulary,
java.util.Collection<java.lang.String> ruleNames,
ATN atn,
TokenStream input) |
Modifier and Type | Method and Description |
---|---|
void |
enterRecursionRule(ParserRuleContext localctx,
int state,
int ruleIndex,
int precedence) |
ATN |
getATN()
Get the
ATN used by the recognizer for prediction. |
protected ATNState |
getATNState() |
java.lang.String |
getGrammarFileName()
For debugging and other purposes, might want the grammar name.
|
java.lang.String[] |
getRuleNames() |
java.lang.String[] |
getTokenNames()
Deprecated.
|
Vocabulary |
getVocabulary()
Get the vocabulary used by the recognizer.
|
ParserRuleContext |
parse(int startRuleIndex)
Begin parsing at startRuleIndex
|
protected void |
visitRuleStopState(ATNState p) |
protected void |
visitState(ATNState p) |
addContextToParseTree, addParseListener, compileParseTreePattern, compileParseTreePattern, consume, dumpDFA, enterOuterAlt, enterRecursionRule, enterRule, exitRule, getATNWithBypassAlts, getBuildParseTree, getContext, getCurrentToken, getDFAStrings, getErrorHandler, getExpectedTokens, getExpectedTokensWithinCurrentRule, getInputStream, getInvokingContext, getNumberOfSyntaxErrors, getParseInfo, getParseListeners, getPrecedence, getRuleContext, getRuleIndex, getRuleInvocationStack, getRuleInvocationStack, getSourceName, getTokenFactory, getTokenStream, getTrimParseTree, inContext, isExpectedToken, isTrace, match, matchWildcard, notifyErrorListeners, notifyErrorListeners, precpred, pushNewRecursionContext, removeParseListener, removeParseListeners, reset, setBuildParseTree, setContext, setErrorHandler, setInputStream, setProfile, setTokenFactory, setTokenStream, setTrace, setTrimParseTree, triggerEnterRuleEvent, triggerExitRuleEvent, unrollRecursionContexts
action, addErrorListener, getErrorHeader, getErrorListenerDispatch, getErrorListeners, getInterpreter, getRuleIndexMap, getSerializedATN, getState, getTokenErrorDisplay, getTokenType, getTokenTypeMap, removeErrorListener, removeErrorListeners, sempred, setInterpreter, setState
protected final java.lang.String grammarFileName
protected final ATN atn
protected final java.util.BitSet pushRecursionContextStates
protected final DFA[] decisionToDFA
protected final PredictionContextCache sharedContextCache
@Deprecated protected final java.lang.String[] tokenNames
protected final java.lang.String[] ruleNames
protected final java.util.Deque<Pair<ParserRuleContext,java.lang.Integer>> _parentContextStack
@Deprecated public ParserInterpreter(java.lang.String grammarFileName, java.util.Collection<java.lang.String> tokenNames, java.util.Collection<java.lang.String> ruleNames, ATN atn, TokenStream input)
ParserInterpreter(String, Vocabulary, Collection, ATN, TokenStream)
instead.public ParserInterpreter(java.lang.String grammarFileName, Vocabulary vocabulary, java.util.Collection<java.lang.String> ruleNames, ATN atn, TokenStream input)
public ATN getATN()
Recognizer
ATN
used by the recognizer for prediction.getATN
in class Recognizer<Token,ParserATNSimulator>
ATN
used by the recognizer for prediction.@Deprecated public java.lang.String[] getTokenNames()
Recognizer
getTokenNames
in class Recognizer<Token,ParserATNSimulator>
public Vocabulary getVocabulary()
Recognizer
getVocabulary
in class Recognizer<Token,ParserATNSimulator>
Vocabulary
instance providing information about the
vocabulary used by the grammar.public java.lang.String[] getRuleNames()
getRuleNames
in class Recognizer<Token,ParserATNSimulator>
public java.lang.String getGrammarFileName()
Recognizer
getGrammarFileName
in class Recognizer<Token,ParserATNSimulator>
public ParserRuleContext parse(int startRuleIndex)
public void enterRecursionRule(ParserRuleContext localctx, int state, int ruleIndex, int precedence)
enterRecursionRule
in class Parser
protected ATNState getATNState()
protected void visitState(ATNState p)
protected void visitRuleStopState(ATNState p)