| Package | Description |
|---|---|
| org.antlr.v4.runtime | |
| org.antlr.v4.runtime.atn | |
| org.antlr.v4.runtime.dfa |
| Modifier and Type | Method and Description |
|---|---|
ATNConfigSet |
NoViableAltException.getDeadEndConfigs() |
ATNConfigSet |
LexerNoViableAltException.getDeadEndConfigs() |
| Modifier and Type | Method and Description |
|---|---|
protected BitSet |
DiagnosticErrorListener.getConflictingAlts(BitSet reportedAlts,
ATNConfigSet configs)
Computes the set of conflicting or ambiguous alternatives from a
configuration set, if that information was not already provided by the
parser.
|
void |
ProxyParserErrorListener.reportAmbiguity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
boolean exact,
BitSet ambigAlts,
ATNConfigSet configs) |
void |
ParserErrorListener.reportAmbiguity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
boolean exact,
BitSet ambigAlts,
ATNConfigSet configs)
This method is called by the parser when a full-context prediction
results in an ambiguity.
|
void |
DiagnosticErrorListener.reportAmbiguity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
boolean exact,
BitSet ambigAlts,
ATNConfigSet configs) |
void |
BaseErrorListener.reportAmbiguity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
boolean exact,
BitSet ambigAlts,
ATNConfigSet configs) |
| Constructor and Description |
|---|
LexerNoViableAltException(Lexer lexer,
CharStream input,
int startIndex,
ATNConfigSet deadEndConfigs) |
NoViableAltException(Recognizer<Token,?> recognizer,
TokenStream input,
Token startToken,
Token offendingToken,
ATNConfigSet deadEndConfigs,
ParserRuleContext ctx) |
| Modifier and Type | Class and Description |
|---|---|
class |
OrderedATNConfigSet |
| Modifier and Type | Method and Description |
|---|---|
protected ATNConfigSet |
ParserATNSimulator.applyPrecedenceFilter(ATNConfigSet configs,
ParserRuleContext globalContext,
PredictionContextCache contextCache)
This method transforms the start state computed by
ParserATNSimulator.computeStartState(org.antlr.v4.runtime.dfa.DFA, org.antlr.v4.runtime.ParserRuleContext, boolean) to the special start state used by a
precedence DFA for a particular precedence value. |
ATNConfigSet |
OrderedATNConfigSet.clone(boolean readonly) |
ATNConfigSet |
ATNConfigSet.clone(boolean readonly) |
protected ATNConfigSet |
LexerATNSimulator.computeStartState(CharStream input,
ATNState p) |
protected ATNConfigSet |
ParserATNSimulator.removeAllConfigsNotInRuleStopState(ATNConfigSet configs,
PredictionContextCache contextCache)
Return a configuration set containing only the configurations from
configs which are in a RuleStopState. |
| Modifier and Type | Method and Description |
|---|---|
protected DFAState |
ParserATNSimulator.addDFAContextState(DFA dfa,
ATNConfigSet configs,
int returnContext,
PredictionContextCache contextCache)
See comment on LexerInterpreter.addDFAState.
|
protected DFAState |
ParserATNSimulator.addDFAEdge(DFA dfa,
DFAState fromState,
int t,
IntegerList contextTransitions,
ATNConfigSet toConfigs,
PredictionContextCache contextCache) |
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.
|
protected DFAState |
ParserATNSimulator.addDFAState(DFA dfa,
ATNConfigSet configs,
PredictionContextCache contextCache)
See comment on LexerInterpreter.addDFAState.
|
static boolean |
PredictionMode.allConfigsInRuleStopStates(ATNConfigSet configs)
Checks if all configurations in
configs are in a
RuleStopState. |
protected ATNConfigSet |
ParserATNSimulator.applyPrecedenceFilter(ATNConfigSet configs,
ParserRuleContext globalContext,
PredictionContextCache contextCache)
This method transforms the start state computed by
ParserATNSimulator.computeStartState(org.antlr.v4.runtime.dfa.DFA, org.antlr.v4.runtime.ParserRuleContext, boolean) to the special start state used by a
precedence DFA for a particular precedence value. |
protected void |
ParserATNSimulator.closure(ATNConfig config,
ATNConfigSet configs,
ATNConfigSet intermediate,
Set<ATNConfig> closureBusy,
boolean collectPredicates,
boolean hasMoreContexts,
PredictionContextCache contextCache,
int depth,
boolean treatEofAsEpsilon) |
protected void |
ParserATNSimulator.closure(ATNConfigSet sourceConfigs,
ATNConfigSet configs,
boolean collectPredicates,
boolean hasMoreContext,
PredictionContextCache contextCache,
boolean treatEofAsEpsilon) |
protected boolean |
LexerATNSimulator.closure(CharStream input,
ATNConfig config,
ATNConfigSet configs,
boolean currentAltReachedAcceptState,
boolean speculative,
boolean treatEofAsEpsilon)
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 DFAState |
ParserATNSimulator.createDFAState(DFA dfa,
ATNConfigSet configs) |
protected int |
LexerATNSimulator.failOrAccept(LexerATNSimulator.SimState prevAccept,
CharStream input,
ATNConfigSet reach,
int t) |
static BitSet |
PredictionMode.getAlts(ATNConfigSet configs)
Get union of all alts from configs.
|
protected BitSet |
ParserATNSimulator.getConflictingAltsFromConfigSet(ATNConfigSet configs) |
static Collection<BitSet> |
PredictionMode.getConflictingAltSubsets(ATNConfigSet configs)
This function gets the conflicting alt subsets from a configuration set.
|
protected ATNConfig |
LexerATNSimulator.getEpsilonTarget(CharStream input,
ATNConfig config,
Transition t,
ATNConfigSet configs,
boolean speculative,
boolean treatEofAsEpsilon) |
protected 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. |
static Map<ATNState,BitSet> |
PredictionMode.getStateToAltMap(ATNConfigSet configs)
Get a map from state to alt subset from a configuration set.
|
static boolean |
PredictionMode.hasConfigInRuleStopState(ATNConfigSet configs)
Checks if any configuration in
configs is in a
RuleStopState. |
static boolean |
PredictionMode.hasSLLConflictTerminatingPrediction(PredictionMode mode,
ATNConfigSet configs)
Computes the SLL prediction termination condition.
|
static boolean |
PredictionMode.hasStateAssociatedWithOneAlt(ATNConfigSet configs) |
protected NoViableAltException |
ParserATNSimulator.noViableAlt(TokenStream input,
ParserRuleContext outerContext,
ATNConfigSet configs,
int startIndex) |
protected DFAState.PredPrediction[] |
ParserATNSimulator.predicateDFAState(DFAState D,
ATNConfigSet configs,
int nalts)
collect and set D's semantic context
|
protected ATNConfigSet |
ParserATNSimulator.removeAllConfigsNotInRuleStopState(ATNConfigSet configs,
PredictionContextCache contextCache)
Return a configuration set containing only the configurations from
configs which are in a RuleStopState. |
protected void |
ProfilingATNSimulator.reportAmbiguity(DFA dfa,
DFAState D,
int startIndex,
int stopIndex,
boolean exact,
BitSet ambigAlts,
ATNConfigSet configs) |
protected void |
ParserATNSimulator.reportAmbiguity(DFA dfa,
DFAState D,
int startIndex,
int stopIndex,
boolean exact,
BitSet ambigAlts,
ATNConfigSet configs)
If context sensitive parsing, we know it's ambiguity not conflict
|
| Constructor and Description |
|---|
ATNConfigSet(ATNConfigSet set,
boolean readonly) |
OrderedATNConfigSet(ATNConfigSet set,
boolean readonly) |
| Modifier and Type | Field and Description |
|---|---|
ATNConfigSet |
DFAState.configs |
| Constructor and Description |
|---|
DFAState(DFA dfa,
ATNConfigSet configs)
Constructs a new
DFAState for a DFA. |
DFAState(EmptyEdgeMap<DFAState> emptyEdges,
EmptyEdgeMap<DFAState> emptyContextEdges,
ATNConfigSet configs)
Constructs a new
DFAState with explicit initial values for the
outgoing edge and context edge maps. |
Copyright © 1992–2024 Daniel Sun. All rights reserved.