Package | Description |
---|---|
org.antlr.v4.runtime | |
org.antlr.v4.runtime.atn | |
org.antlr.v4.runtime.dfa | |
org.antlr.v4.runtime.misc | |
org.antlr.v4.runtime.tree | |
org.antlr.v4.runtime.tree.gui |
Modifier and Type | Field and Description |
---|---|
protected TokenSource |
BufferedTokenStream.tokenSource |
Modifier and Type | Method and Description |
---|---|
Token |
TokenStream.get(int index)
Gets the
Token at the specified index in the stream. |
List<? extends ANTLRErrorListener> |
Recognizer.getErrorListeners() |
String |
IntStream.getSourceName()
Gets the name of the underlying symbol source.
|
Token |
NoViableAltException.getStartToken() |
String |
UnbufferedTokenStream.getText() |
String |
TokenStream.getText()
Return the text of all tokens in the stream.
|
String |
BufferedTokenStream.getText()
Get the text of all tokens in this buffer.
|
String |
UnbufferedTokenStream.getText(Interval interval) |
String |
TokenStream.getText(Interval interval)
Return the text of all tokens within the specified
interval . |
String |
CharStream.getText(Interval interval)
This method returns the text for a range of characters within this input
stream.
|
String |
BufferedTokenStream.getText(Interval interval) |
String |
UnbufferedTokenStream.getText(RuleContext ctx) |
String |
TokenStream.getText(RuleContext ctx)
Return the text of all tokens in the source interval of the specified
context.
|
String |
BufferedTokenStream.getText(RuleContext ctx) |
String |
UnbufferedTokenStream.getText(Token start,
Token stop) |
String |
TokenStream.getText(Token start,
Token stop)
Return the text of all tokens in this stream between
start and
stop (inclusive). |
String |
BufferedTokenStream.getText(Token start,
Token stop) |
TokenSource |
TokenStream.getTokenSource()
Gets the underlying
TokenSource which provides tokens for this
stream. |
Token |
TokenStream.LT(int k)
|
Modifier and Type | Method and Description |
---|---|
protected void |
UnbufferedTokenStream.add(Token t) |
void |
Recognizer.addErrorListener(ANTLRErrorListener listener) |
void |
ANTLRErrorStrategy.beginErrorCondition(Parser recognizer)
Notify handler that parser has entered an error state.
|
void |
ANTLRErrorStrategy.endErrorCondition(Parser recognizer)
Reset the error handler.
|
protected String |
DefaultErrorStrategy.getSymbolText(Token symbol) |
protected int |
DefaultErrorStrategy.getSymbolType(Token symbol) |
String |
TokenStream.getText(Interval interval)
Return the text of all tokens within the specified
interval . |
String |
CharStream.getText(Interval interval)
This method returns the text for a range of characters within this input
stream.
|
String |
TokenStream.getText(RuleContext ctx)
Return the text of all tokens in the source interval of the specified
context.
|
String |
TokenStream.getText(Token start,
Token stop)
Return the text of all tokens in this stream between
start and
stop (inclusive). |
String |
TokenStream.getText(Token start,
Token stop)
Return the text of all tokens in this stream between
start and
stop (inclusive). |
boolean |
ANTLRErrorStrategy.inErrorRecoveryMode(Parser recognizer)
Is the parser in the process of recovering from an error? Upon
a syntax error, the parser enters recovery mode and stays there until
the next successful match of a token.
|
void |
ANTLRErrorStrategy.recover(Parser recognizer,
RecognitionException e)
Resynchronize the parser by consuming tokens until we find one
in the resynchronization set--loosely the set of tokens that can follow
the current rule.
|
Token |
ANTLRErrorStrategy.recoverInline(Parser recognizer)
When matching elements within alternative, use this method
to recover.
|
void |
Recognizer.removeErrorListener(ANTLRErrorListener listener) |
void |
DiagnosticErrorListener.reportAmbiguity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
BitSet ambigAlts,
ATNConfigSet configs) |
void |
DiagnosticErrorListener.reportAmbiguity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
BitSet ambigAlts,
ATNConfigSet configs) |
void |
DiagnosticErrorListener.reportAmbiguity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
BitSet ambigAlts,
ATNConfigSet configs) |
void |
ANTLRErrorListener.reportAmbiguity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
BitSet ambigAlts,
ATNConfigSet configs)
Called when the parser detects a true ambiguity: an input
sequence can be matched literally by two or more pass through
the grammar.
|
void |
ANTLRErrorListener.reportAmbiguity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
BitSet ambigAlts,
ATNConfigSet configs)
Called when the parser detects a true ambiguity: an input
sequence can be matched literally by two or more pass through
the grammar.
|
void |
ANTLRErrorListener.reportAmbiguity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
BitSet ambigAlts,
ATNConfigSet configs)
Called when the parser detects a true ambiguity: an input
sequence can be matched literally by two or more pass through
the grammar.
|
void |
DiagnosticErrorListener.reportAttemptingFullContext(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
ATNConfigSet configs) |
void |
DiagnosticErrorListener.reportAttemptingFullContext(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
ATNConfigSet configs) |
void |
DiagnosticErrorListener.reportAttemptingFullContext(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
ATNConfigSet configs) |
void |
ANTLRErrorListener.reportAttemptingFullContext(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
ATNConfigSet configs) |
void |
ANTLRErrorListener.reportAttemptingFullContext(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
ATNConfigSet configs) |
void |
ANTLRErrorListener.reportAttemptingFullContext(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
ATNConfigSet configs) |
void |
DiagnosticErrorListener.reportContextSensitivity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
ATNConfigSet configs) |
void |
DiagnosticErrorListener.reportContextSensitivity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
ATNConfigSet configs) |
void |
DiagnosticErrorListener.reportContextSensitivity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
ATNConfigSet configs) |
void |
ANTLRErrorListener.reportContextSensitivity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
ATNConfigSet configs)
Called by the parser when it find a conflict that is resolved
by retrying the parse with full context.
|
void |
ANTLRErrorListener.reportContextSensitivity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
ATNConfigSet configs)
Called by the parser when it find a conflict that is resolved
by retrying the parse with full context.
|
void |
ANTLRErrorListener.reportContextSensitivity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
ATNConfigSet configs)
Called by the parser when it find a conflict that is resolved
by retrying the parse with full context.
|
void |
ANTLRErrorStrategy.reportError(Parser recognizer,
RecognitionException e)
Report any kind of RecognitionException.
|
void |
ANTLRErrorStrategy.sync(Parser recognizer)
Make sure that the current lookahead symbol is consistent with
what were expecting at this point in the ATN.
|
Constructor and Description |
---|
CommonToken(Pair<TokenSource,CharStream> source,
int type,
int channel,
int start,
int stop) |
FailedPredicateException(Parser recognizer) |
FailedPredicateException(Parser recognizer,
String predicate) |
FailedPredicateException(Parser recognizer,
String predicate,
String message) |
LexerNoViableAltException(Lexer lexer,
CharStream input,
int startIndex,
ATNConfigSet deadEndConfigs) |
NoViableAltException(Parser recognizer) |
NoViableAltException(Parser recognizer,
TokenStream input,
Token startToken,
Token offendingToken,
ATNConfigSet deadEndConfigs,
ParserRuleContext ctx) |
NoViableAltException(Parser recognizer,
TokenStream input,
Token startToken,
Token offendingToken,
ATNConfigSet deadEndConfigs,
ParserRuleContext ctx) |
NoViableAltException(Parser recognizer,
TokenStream input,
Token startToken,
Token offendingToken,
ATNConfigSet deadEndConfigs,
ParserRuleContext ctx) |
NoViableAltException(Parser recognizer,
TokenStream input,
Token startToken,
Token offendingToken,
ATNConfigSet deadEndConfigs,
ParserRuleContext ctx) |
NoViableAltException(Parser recognizer,
TokenStream input,
Token startToken,
Token offendingToken,
ATNConfigSet deadEndConfigs,
ParserRuleContext ctx) |
Modifier and Type | Field and Description |
---|---|
ATN |
LL1Analyzer.atn |
ATN |
ATNSimulator.atn |
DFA[] |
ParserATNSimulator.decisionToDFA |
DFA[] |
LexerATNSimulator.decisionToDFA |
List<DecisionState> |
ATN.decisionToState
Each subrule/rule is a decision point and we must track them so we
can go back later and build DFA predictors for them.
|
static DFAState |
ATNSimulator.ERROR
Must distinguish between missing edge and edge we know leads nowhere
|
ATNState |
RuleTransition.followState
What node to begin computations following ref to rule
|
Map<String,TokensStartState> |
ATN.modeNameToStartState |
List<TokensStartState> |
ATN.modeToStartState |
SemanticContext[] |
SemanticContext.AND.opnds |
SemanticContext[] |
SemanticContext.OR.opnds |
protected LexerATNSimulator.SimState |
LexerATNSimulator.prevAccept
Used during DFA/ATN exec to record the most recent accept configuration info
|
SemanticContext |
ATNConfig.semanticContext |
IntervalSet |
SetTransition.set |
ATNState |
ATNConfig.state
The ATN state associated with this configuration
|
List<ATNState> |
ATN.states |
ATNState |
Transition.target
The target of this transition.
|
Modifier and Type | Method and Description |
---|---|
ATNConfig |
ParserATNSimulator.actionTransition(ATNConfig config,
ActionTransition t) |
protected DFAState |
LexerATNSimulator.addDFAEdge(DFAState from,
int t,
ATNConfigSet q) |
protected DFAState |
LexerATNSimulator.addDFAState(ATNConfigSet configs)
Add a new DFA state if there isn't one with this set of
configurations already.
|
ATNConfigSet |
ParserATNSimulator.computeStartState(ATNState p,
RuleContext ctx,
boolean fullCtx) |
protected ATNConfigSet |
LexerATNSimulator.computeStartState(CharStream input,
ATNState p) |
static Transition |
ATNSimulator.edgeFactory(ATN atn,
int type,
int src,
int trg,
int arg1,
int arg2,
int arg3,
List<IntervalSet> sets) |
static Collection<BitSet> |
PredictionMode.getConflictingAltSubsets(ATNConfigSet configs)
This function gets the conflicting alt subsets from a configuration set.
|
String |
ParserATNSimulator.getRuleName(int index) |
static Map<ATNState,BitSet> |
PredictionMode.getStateToAltMap(ATNConfigSet configs)
Get a map from state to alt subset from a configuration set.
|
String |
LexerATNSimulator.getText(CharStream input)
Get the text matched so far for the current token.
|
String |
ParserATNSimulator.getTokenName(int t) |
String |
LexerATNSimulator.getTokenName(int t) |
IntervalSet |
SetTransition.label() |
IntervalSet |
RangeTransition.label() |
IntervalSet |
AtomTransition.label() |
IntervalSet |
LL1Analyzer.LOOK(ATNState s,
RuleContext ctx)
Get lookahead, using
ctx if we reach end of rule. |
NoViableAltException |
ParserATNSimulator.noViableAlt(TokenStream input,
ParserRuleContext outerContext,
ATNConfigSet configs,
int startIndex) |
protected ATNConfigSet |
ParserATNSimulator.removeAllConfigsNotInRuleStopState(ATNConfigSet configs)
Return a configuration set containing only the configurations from
configs which are in a RuleStopState . |
ATNConfig |
ParserATNSimulator.ruleTransition(ATNConfig config,
RuleTransition t) |
String |
WildcardTransition.toString() |
String |
SetTransition.toString() |
String |
RangeTransition.toString() |
String |
PredicateTransition.toString() |
String |
EpsilonTransition.toString() |
String |
AtomTransition.toString() |
Modifier and Type | Method and Description |
---|---|
protected void |
LL1Analyzer._LOOK(ATNState s,
PredictionContext ctx,
IntervalSet look,
Set<ATNConfig> lookBusy,
boolean seeThruPreds,
boolean addEOF)
Compute set of tokens that can come next.
|
protected void |
LL1Analyzer._LOOK(ATNState s,
PredictionContext ctx,
IntervalSet look,
Set<ATNConfig> lookBusy,
boolean seeThruPreds,
boolean addEOF)
Compute set of tokens that can come next.
|
protected void |
LL1Analyzer._LOOK(ATNState s,
PredictionContext ctx,
IntervalSet look,
Set<ATNConfig> lookBusy,
boolean seeThruPreds,
boolean addEOF)
Compute set of tokens that can come next.
|
protected void |
LexerATNSimulator.accept(CharStream input,
int ruleIndex,
int actionIndex,
int index,
int line,
int charPos) |
ATNConfig |
ParserATNSimulator.actionTransition(ATNConfig config,
ActionTransition t) |
ATNConfig |
ParserATNSimulator.actionTransition(ATNConfig config,
ActionTransition t) |
int |
ParserATNSimulator.adaptivePredict(TokenStream input,
int decision,
ParserRuleContext outerContext) |
boolean |
ATNConfigSet.add(ATNConfig config) |
boolean |
ATNConfigSet.add(ATNConfig config,
DoubleKeyMap<PredictionContext,PredictionContext,PredictionContext> mergeCache)
Adding a new config means merging contexts with existing configs for
(s, i, pi, _) , where s is the
ATNConfig.state , i is the ATNConfig.alt , and
pi is the ATNConfig.semanticContext . |
protected void |
ParserATNSimulator.addDFAEdge(DFA dfa,
DFAState from,
int t,
DFAState to) |
protected DFAState |
LexerATNSimulator.addDFAEdge(DFAState from,
int t,
ATNConfigSet q) |
protected DFAState |
LexerATNSimulator.addDFAEdge(DFAState from,
int t,
ATNConfigSet q) |
protected void |
LexerATNSimulator.addDFAEdge(DFAState p,
int t,
DFAState q) |
protected void |
LexerATNSimulator.addDFAEdge(DFAState p,
int t,
DFAState q) |
protected DFAState |
LexerATNSimulator.addDFAState(ATNConfigSet configs)
Add a new DFA state if there isn't one with this set of
configurations already.
|
protected DFAState |
ParserATNSimulator.addDFAState(DFA dfa,
DFAState D)
Add D if not there and return D.
|
protected DFAState |
ParserATNSimulator.addDFAState(DFA dfa,
DFAState D)
Add D if not there and return D.
|
static boolean |
PredictionMode.allConfigsInRuleStopStates(ATNConfigSet configs)
Checks if all configurations in
configs are in a
RuleStopState . |
static boolean |
PredictionMode.allSubsetsConflict(Collection<BitSet> altsets)
Determines if every alternative subset in
altsets contains more
than one alternative. |
static boolean |
PredictionMode.allSubsetsEqual(Collection<BitSet> altsets)
Determines if every alternative subset in
altsets is equivalent. |
protected void |
LexerATNSimulator.captureSimState(LexerATNSimulator.SimState settings,
CharStream input,
DFAState dfaState) |
protected void |
LexerATNSimulator.captureSimState(LexerATNSimulator.SimState settings,
CharStream input,
DFAState dfaState) |
protected void |
LexerATNSimulator.captureSimState(LexerATNSimulator.SimState settings,
CharStream input,
DFAState dfaState) |
protected void |
ParserATNSimulator.closure_(ATNConfig config,
ATNConfigSet configs,
Set<ATNConfig> closureBusy,
boolean collectPredicates,
boolean fullCtx,
int depth)
Do the actual work of walking epsilon edges
|
protected void |
ParserATNSimulator.closure_(ATNConfig config,
ATNConfigSet configs,
Set<ATNConfig> closureBusy,
boolean collectPredicates,
boolean fullCtx,
int depth)
Do the actual work of walking epsilon edges
|
protected void |
ParserATNSimulator.closure_(ATNConfig config,
ATNConfigSet configs,
Set<ATNConfig> closureBusy,
boolean collectPredicates,
boolean fullCtx,
int depth)
Do the actual work of walking epsilon edges
|
protected void |
ParserATNSimulator.closure(ATNConfig config,
ATNConfigSet configs,
Set<ATNConfig> closureBusy,
boolean collectPredicates,
boolean fullCtx) |
protected void |
ParserATNSimulator.closure(ATNConfig config,
ATNConfigSet configs,
Set<ATNConfig> closureBusy,
boolean collectPredicates,
boolean fullCtx) |
protected void |
ParserATNSimulator.closure(ATNConfig config,
ATNConfigSet configs,
Set<ATNConfig> closureBusy,
boolean collectPredicates,
boolean fullCtx) |
protected boolean |
LexerATNSimulator.closure(CharStream input,
LexerATNConfig config,
ATNConfigSet configs,
boolean currentAltReachedAcceptState,
boolean speculative)
Since the alternatives within any lexer decision are ordered by
preference, this method stops pursuing the closure as soon as an accept
state is reached.
|
protected boolean |
LexerATNSimulator.closure(CharStream input,
LexerATNConfig config,
ATNConfigSet configs,
boolean currentAltReachedAcceptState,
boolean speculative)
Since the alternatives within any lexer decision are ordered by
preference, this method stops pursuing the closure as soon as an accept
state is reached.
|
protected boolean |
LexerATNSimulator.closure(CharStream input,
LexerATNConfig config,
ATNConfigSet configs,
boolean currentAltReachedAcceptState,
boolean speculative)
Since the alternatives within any lexer decision are ordered by
preference, this method stops pursuing the closure as soon as an accept
state is reached.
|
protected void |
ParserATNSimulator.closureCheckingStopState(ATNConfig config,
ATNConfigSet configs,
Set<ATNConfig> closureBusy,
boolean collectPredicates,
boolean fullCtx,
int depth) |
protected void |
ParserATNSimulator.closureCheckingStopState(ATNConfig config,
ATNConfigSet configs,
Set<ATNConfig> closureBusy,
boolean collectPredicates,
boolean fullCtx,
int depth) |
protected void |
ParserATNSimulator.closureCheckingStopState(ATNConfig config,
ATNConfigSet configs,
Set<ATNConfig> closureBusy,
boolean collectPredicates,
boolean fullCtx,
int depth) |
ATNConfigSet |
ParserATNSimulator.computeStartState(ATNState p,
RuleContext ctx,
boolean fullCtx) |
protected ATNConfigSet |
LexerATNSimulator.computeStartState(CharStream input,
ATNState p) |
protected ATNConfigSet |
LexerATNSimulator.computeStartState(CharStream input,
ATNState p) |
void |
LexerATNSimulator.consume(CharStream input) |
void |
LexerATNSimulator.copyState(LexerATNSimulator simulator) |
int |
ATN.defineDecisionState(DecisionState s) |
static ATN |
ATNSimulator.deserialize(char[] data) |
void |
ParserATNSimulator.dumpDeadEndConfigs(NoViableAltException nvae) |
static Transition |
ATNSimulator.edgeFactory(ATN atn,
int type,
int src,
int trg,
int arg1,
int arg2,
int arg3,
List<IntervalSet> sets) |
BitSet |
ParserATNSimulator.evalSemanticContext(DFAState.PredPrediction[] predPredictions,
ParserRuleContext outerContext,
boolean complete)
Look through a list of predicate/alt pairs, returning alts for the
pairs that win.
|
protected boolean |
LexerATNSimulator.evaluatePredicate(CharStream input,
int ruleIndex,
int predIndex,
boolean speculative)
Evaluate a predicate specified in the lexer.
|
protected int |
LexerATNSimulator.execATN(CharStream input,
DFAState ds0) |
protected int |
LexerATNSimulator.execATN(CharStream input,
DFAState ds0) |
int |
ParserATNSimulator.execATN(DFA dfa,
DFAState s0,
TokenStream input,
int startIndex,
ParserRuleContext outerContext)
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.
|
int |
ParserATNSimulator.execATN(DFA dfa,
DFAState s0,
TokenStream input,
int startIndex,
ParserRuleContext outerContext)
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.
|
int |
ParserATNSimulator.execATN(DFA dfa,
DFAState s0,
TokenStream input,
int startIndex,
ParserRuleContext outerContext)
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.
|
int |
ParserATNSimulator.execATNWithFullContext(DFA dfa,
DFAState D,
ATNConfigSet s0,
TokenStream input,
int startIndex,
ParserRuleContext outerContext,
int SLL_min_alt) |
int |
ParserATNSimulator.execATNWithFullContext(DFA dfa,
DFAState D,
ATNConfigSet s0,
TokenStream input,
int startIndex,
ParserRuleContext outerContext,
int SLL_min_alt) |
int |
ParserATNSimulator.execDFA(DFA dfa,
DFAState s0,
TokenStream input,
int startIndex,
ParserRuleContext outerContext) |
int |
ParserATNSimulator.execDFA(DFA dfa,
DFAState s0,
TokenStream input,
int startIndex,
ParserRuleContext outerContext) |
int |
ParserATNSimulator.execDFA(DFA dfa,
DFAState s0,
TokenStream input,
int startIndex,
ParserRuleContext outerContext) |
static PredictionContext |
PredictionContext.fromRuleContext(ATN atn,
RuleContext outerContext)
Convert a
RuleContext tree to a PredictionContext graph. |
static BitSet |
PredictionMode.getAlts(Collection<BitSet> altsets)
Gets the complete set of represented alternatives for a collection of
alternative subsets.
|
static PredictionContext |
PredictionContext.getCachedContext(PredictionContext context,
PredictionContextCache contextCache,
IdentityHashMap<PredictionContext,PredictionContext> visited) |
static PredictionContext |
PredictionContext.getCachedContext(PredictionContext context,
PredictionContextCache contextCache,
IdentityHashMap<PredictionContext,PredictionContext> visited) |
static PredictionContext |
PredictionContext.getCachedContext(PredictionContext context,
PredictionContextCache contextCache,
IdentityHashMap<PredictionContext,PredictionContext> visited) |
ATNConfig |
ParserATNSimulator.getEpsilonTarget(ATNConfig config,
Transition t,
boolean collectPredicates,
boolean inContext,
boolean fullCtx) |
ATNConfig |
ParserATNSimulator.getEpsilonTarget(ATNConfig config,
Transition t,
boolean collectPredicates,
boolean inContext,
boolean fullCtx) |
LexerATNConfig |
LexerATNSimulator.getEpsilonTarget(CharStream input,
LexerATNConfig config,
Transition t,
ATNConfigSet configs,
boolean speculative) |
LexerATNConfig |
LexerATNSimulator.getEpsilonTarget(CharStream input,
LexerATNConfig config,
Transition t,
ATNConfigSet configs,
boolean speculative) |
LexerATNConfig |
LexerATNSimulator.getEpsilonTarget(CharStream input,
LexerATNConfig config,
Transition t,
ATNConfigSet configs,
boolean speculative) |
LexerATNConfig |
LexerATNSimulator.getEpsilonTarget(CharStream input,
LexerATNConfig config,
Transition t,
ATNConfigSet configs,
boolean speculative) |
SemanticContext[] |
ParserATNSimulator.getPredsForAmbigAlts(BitSet ambigAlts,
ATNConfigSet configs,
int nalts) |
SemanticContext[] |
ParserATNSimulator.getPredsForAmbigAlts(BitSet ambigAlts,
ATNConfigSet configs,
int nalts) |
protected void |
LexerATNSimulator.getReachableConfigSet(CharStream input,
ATNConfigSet closure,
ATNConfigSet reach,
int t)
Given a starting configuration set, figure out all ATN configurations
we can reach upon input
t . |
protected void |
LexerATNSimulator.getReachableConfigSet(CharStream input,
ATNConfigSet closure,
ATNConfigSet reach,
int t)
Given a starting configuration set, figure out all ATN configurations
we can reach upon input
t . |
protected void |
LexerATNSimulator.getReachableConfigSet(CharStream input,
ATNConfigSet closure,
ATNConfigSet reach,
int t)
Given a starting configuration set, figure out all ATN configurations
we can reach upon input
t . |
ATNState |
ParserATNSimulator.getReachableTarget(Transition trans,
int ttype) |
static int |
PredictionMode.getSingleViableAlt(Collection<BitSet> altsets) |
static Map<ATNState,BitSet> |
PredictionMode.getStateToAltMap(ATNConfigSet configs)
Get a map from state to alt subset from a configuration set.
|
String |
LexerATNSimulator.getText(CharStream input)
Get the text matched so far for the current token.
|
static int |
ParserATNSimulator.getUniqueAlt(ATNConfigSet configs) |
static int |
PredictionMode.getUniqueAlt(Collection<BitSet> altsets)
Returns the unique alternative predicted by all alternative subsets in
altsets . |
static boolean |
PredictionMode.hasConflictingAltSet(Collection<BitSet> altsets)
Determines if any single alternative subset in
altsets contains
more than one alternative. |
static boolean |
PredictionMode.hasNonConflictingAltSet(Collection<BitSet> altsets)
Determines if any single alternative subset in
altsets contains
exactly one alternative. |
static boolean |
PredictionMode.hasSLLConflictTerminatingPrediction(PredictionMode mode,
ATNConfigSet configs)
Computes the SLL prediction termination condition.
|
static boolean |
PredictionMode.hasStateAssociatedWithOneAlt(ATNConfigSet configs) |
IntervalSet |
LL1Analyzer.LOOK(ATNState s,
RuleContext ctx)
Get lookahead, using
ctx if we reach end of rule. |
int |
LexerATNSimulator.match(CharStream input,
int mode) |
protected int |
LexerATNSimulator.matchATN(CharStream input) |
NoViableAltException |
ParserATNSimulator.noViableAlt(TokenStream input,
ParserRuleContext outerContext,
ATNConfigSet configs,
int startIndex) |
NoViableAltException |
ParserATNSimulator.noViableAlt(TokenStream input,
ParserRuleContext outerContext,
ATNConfigSet configs,
int startIndex) |
NoViableAltException |
ParserATNSimulator.noViableAlt(TokenStream input,
ParserRuleContext outerContext,
ATNConfigSet configs,
int startIndex) |
int |
ParserATNSimulator.predictATN(DFA dfa,
TokenStream input,
ParserRuleContext outerContext) |
int |
ParserATNSimulator.predictATN(DFA dfa,
TokenStream input,
ParserRuleContext outerContext) |
ATNConfig |
ParserATNSimulator.predTransition(ATNConfig config,
PredicateTransition pt,
boolean collectPredicates,
boolean inContext,
boolean fullCtx) |
ATNConfig |
ParserATNSimulator.predTransition(ATNConfig config,
PredicateTransition pt,
boolean collectPredicates,
boolean inContext,
boolean fullCtx) |
protected ATNConfigSet |
ParserATNSimulator.removeAllConfigsNotInRuleStopState(ATNConfigSet configs)
Return a configuration set containing only the configurations from
configs which are in a RuleStopState . |
void |
ATN.removeState(ATNState state) |
void |
ParserATNSimulator.reportAmbiguity(DFA dfa,
DFAState D,
int startIndex,
int stopIndex,
BitSet ambigAlts,
ATNConfigSet configs)
If context sensitive parsing, we know it's ambiguity not conflict
|
void |
ParserATNSimulator.reportAmbiguity(DFA dfa,
DFAState D,
int startIndex,
int stopIndex,
BitSet ambigAlts,
ATNConfigSet configs)
If context sensitive parsing, we know it's ambiguity not conflict
|
void |
ParserATNSimulator.reportAmbiguity(DFA dfa,
DFAState D,
int startIndex,
int stopIndex,
BitSet ambigAlts,
ATNConfigSet configs)
If context sensitive parsing, we know it's ambiguity not conflict
|
static int |
PredictionMode.resolvesToJustOneViableAlt(Collection<BitSet> altsets)
Full LL prediction termination.
|
ATNConfig |
ParserATNSimulator.ruleTransition(ATNConfig config,
RuleTransition t) |
ATNConfig |
ParserATNSimulator.ruleTransition(ATNConfig config,
RuleTransition t) |
Modifier and Type | Field and Description |
---|---|
DecisionState |
DFA.atnStartState
From which ATN state did we create this DFA?
|
ATNConfigSet |
DFAState.configs |
SemanticContext |
DFAState.PredPrediction.pred |
Map<DFAState,DFAState> |
DFA.states
A set of all DFA states.
|
Modifier and Type | Method and Description |
---|---|
protected String |
LexerDFASerializer.getEdgeLabel(int i) |
Constructor and Description |
---|
DFA(DecisionState atnStartState)
Set of configs for a DFA state with at least one conflict? Mainly used as "return value"
from
ParserATNSimulator.predictATN(org.antlr.v4.runtime.dfa.DFA, org.antlr.v4.runtime.TokenStream, org.antlr.v4.runtime.ParserRuleContext) for retry. |
DFA(DecisionState atnStartState,
int decision) |
DFASerializer(DFA dfa,
String[] tokenNames) |
DFAState(ATNConfigSet configs) |
LexerDFASerializer(DFA dfa) |
Modifier and Type | Field and Description |
---|---|
protected AbstractEqualityComparator<? super K> |
FlexibleHashMap.comparator |
protected AbstractEqualityComparator<? super T> |
Array2DHashSet.comparator |
Modifier and Type | Method and Description |
---|---|
static IntervalSet |
IntervalSet.of(int a)
Create a set with a single element, el.
|
Constructor and Description |
---|
IntegerList(Collection<Integer> list) |
IntegerList(IntegerList list) |
IntegerStack(IntegerStack list) |
Modifier and Type | Method and Description |
---|---|
static List<? extends Tree> |
Trees.getAncestors(Tree t)
Return a list of all ancestors of this node.
|
Interval |
SyntaxTree.getSourceInterval()
Return an
Interval indicating the index in the
TokenStream of the first and last token associated with this
subtree. |
Modifier and Type | Method and Description |
---|---|
static List<? extends Tree> |
Trees.getAncestors(Tree t)
Return a list of all ancestors of this node.
|
static String |
Trees.getNodeText(Tree t,
List<String> ruleNames) |
static String |
Trees.getNodeText(Tree t,
Parser recog) |
protected boolean |
AbstractParseTreeVisitor.shouldVisitNextChild(RuleNode node,
T currentResult)
This method is called after visiting each child in
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode) . |
static String |
Trees.toStringTree(Tree t)
Print out a whole tree in LISP form.
|
static String |
Trees.toStringTree(Tree t,
List<String> ruleNames)
Print out a whole tree in LISP form.
|
static String |
Trees.toStringTree(Tree t,
Parser recog)
Print out a whole tree in LISP form.
|
T |
ParseTreeVisitor.visit(ParseTree tree)
Visit a parse tree, and return a user-defined result of the operation.
|
T |
ParseTreeVisitor.visitChildren(RuleNode node)
Visit the children of a node, and return a user-defined result of the
operation.
|
T |
ParseTreeVisitor.visitErrorNode(ErrorNode node)
Visit an error node, and return a user-defined result of the operation.
|
T |
ParseTreeVisitor.visitTerminal(TerminalNode node)
Visit a terminal node, and return a user-defined result of the operation.
|
Modifier and Type | Method and Description |
---|---|
Future<JDialog> |
TreeViewer.open() |
protected static JDialog |
TreeViewer.showInDialog(TreeViewer viewer) |
Copyright © 1992-2013 ANTLR. All Rights Reserved.