| Package | Description |
|---|---|
| org.antlr.v4.runtime | |
| org.antlr.v4.runtime.atn |
| Modifier and Type | Class and Description |
|---|---|
class |
BufferedTokenStream
This implementation of
TokenStream loads tokens from a
TokenSource on-demand, and places the tokens in a buffer to provide
access to any previous token by index. |
class |
CommonTokenStream
This class extends
BufferedTokenStream with functionality to filter
token streams to tokens on a particular channel (tokens where
Token.getChannel() returns a particular value). |
class |
UnbufferedTokenStream |
| Modifier and Type | Field and Description |
|---|---|
protected TokenStream |
Parser._input
The input stream.
|
protected TokenStream |
TokenStreamRewriter.tokens
Our source stream
|
protected TokenStream |
TokenStreamRewriter.RewriteOperation.tokens |
| Modifier and Type | Method and Description |
|---|---|
TokenStream |
Parser.getInputStream() |
TokenStream |
TokenStreamRewriter.getTokenStream() |
| Modifier and Type | Method and Description |
|---|---|
void |
Parser.setInputStream(TokenStream input)
Set the token stream and reset the parser.
|
| Constructor and Description |
|---|
NoViableAltException(Recognizer<Token,?> recognizer,
TokenStream input,
Token startToken,
Token offendingToken,
ATNConfigSet deadEndConfigs,
ParserRuleContext ctx) |
Parser(TokenStream input) |
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) |
RewriteOperation(TokenStream tokens,
int index) |
RewriteOperation(TokenStream tokens,
int index,
Object text) |
TokenStreamRewriter(TokenStream tokens) |
| Modifier and Type | Field and Description |
|---|---|
protected TokenStream |
ProfilingATNSimulator._input |
TokenStream |
DecisionEventInfo.input
The input token stream which is being parsed.
|
| Modifier and Type | Method and Description |
|---|---|
int |
ProfilingATNSimulator.adaptivePredict(TokenStream input,
int decision,
ParserRuleContext outerContext) |
int |
ParserATNSimulator.adaptivePredict(TokenStream input,
int decision,
ParserRuleContext outerContext) |
int |
ParserATNSimulator.adaptivePredict(TokenStream input,
int decision,
ParserRuleContext outerContext,
boolean useContext) |
protected int |
ParserATNSimulator.execATN(DFA dfa,
TokenStream input,
int startIndex,
SimulatorState initialState)
Performs ATN simulation to compute a predicted alternative based
upon the remaining input, but also updates the DFA cache to avoid
having to traverse the ATN again for the same input sequence.
|
protected int |
ParserATNSimulator.execDFA(DFA dfa,
TokenStream input,
int startIndex,
SimulatorState state) |
String |
ParserATNSimulator.getLookaheadName(TokenStream input) |
protected SimulatorState |
ProfilingATNSimulator.getStartState(DFA dfa,
TokenStream input,
ParserRuleContext outerContext,
boolean useContext) |
protected SimulatorState |
ParserATNSimulator.getStartState(DFA dfa,
TokenStream input,
ParserRuleContext outerContext,
boolean useContext) |
protected int |
ParserATNSimulator.handleNoViableAlt(TokenStream input,
int startIndex,
SimulatorState previous)
This method is used to improve the localization of error messages by
choosing an alternative rather than throwing a
NoViableAltException in particular prediction scenarios where the
ATNSimulator.ERROR state was reached during ATN simulation. |
protected NoViableAltException |
ParserATNSimulator.noViableAlt(TokenStream input,
ParserRuleContext outerContext,
ATNConfigSet configs,
int startIndex) |
| Constructor and Description |
|---|
AmbiguityInfo(int decision,
SimulatorState state,
BitSet ambigAlts,
TokenStream input,
int startIndex,
int stopIndex)
Constructs a new instance of the
AmbiguityInfo class with the
specified detailed ambiguity information. |
ContextSensitivityInfo(int decision,
SimulatorState state,
TokenStream input,
int startIndex,
int stopIndex)
Constructs a new instance of the
ContextSensitivityInfo class
with the specified detailed context sensitivity information. |
DecisionEventInfo(int decision,
SimulatorState state,
TokenStream input,
int startIndex,
int stopIndex,
boolean fullCtx) |
ErrorInfo(int decision,
SimulatorState state,
TokenStream input,
int startIndex,
int stopIndex)
Constructs a new instance of the
ErrorInfo class with the
specified detailed syntax error information. |
LookaheadEventInfo(int decision,
SimulatorState state,
int predictedAlt,
TokenStream input,
int startIndex,
int stopIndex,
boolean fullCtx)
Constructs a new instance of the
LookaheadEventInfo class with
the specified detailed lookahead information. |
PredicateEvalInfo(SimulatorState state,
int decision,
TokenStream input,
int startIndex,
int stopIndex,
SemanticContext semctx,
boolean evalResult,
int predictedAlt)
Constructs a new instance of the
PredicateEvalInfo class with the
specified detailed predicate evaluation information. |
Copyright © 1992–2024 Daniel Sun. All rights reserved.