public class ParserInterpreter extends Parser
Parser.TraceListener, Parser.TrimToSizeListener
Modifier and Type | Field and Description |
---|---|
protected Deque<Pair<ParserRuleContext,Integer>> |
_parentContextStack |
protected ATN |
atn |
protected DFA[] |
decisionToDFA |
protected String |
grammarFileName |
protected BitSet |
pushRecursionContextStates |
protected String[] |
ruleNames |
protected PredictionContextCache |
sharedContextCache |
protected String[] |
tokenNames
Deprecated.
|
_buildParseTrees, _ctx, _errHandler, _input, _parseListeners, _precedenceStack, _syntaxErrors
_interp, EOF
Constructor and Description |
---|
ParserInterpreter(String grammarFileName,
Collection<String> tokenNames,
Collection<String> ruleNames,
ATN atn,
TokenStream input)
Deprecated.
|
ParserInterpreter(String grammarFileName,
Vocabulary vocabulary,
Collection<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() |
String |
getGrammarFileName()
For debugging and other purposes, might want the grammar name.
|
String[] |
getRuleNames() |
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 String grammarFileName
protected final ATN atn
protected final BitSet pushRecursionContextStates
protected final DFA[] decisionToDFA
protected final PredictionContextCache sharedContextCache
@Deprecated protected final String[] tokenNames
protected final String[] ruleNames
protected final Deque<Pair<ParserRuleContext,Integer>> _parentContextStack
@Deprecated public ParserInterpreter(String grammarFileName, Collection<String> tokenNames, Collection<String> ruleNames, ATN atn, TokenStream input)
ParserInterpreter(String, Vocabulary, Collection, ATN, TokenStream)
instead.public ParserInterpreter(String grammarFileName, Vocabulary vocabulary, Collection<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 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 String[] getRuleNames()
getRuleNames
in class Recognizer<Token,ParserATNSimulator>
public 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)
Copyright © 2015. All rights reserved.