Package | Description |
---|---|
org.antlr.v4.runtime | |
org.antlr.v4.runtime.atn | |
org.antlr.v4.runtime.dfa |
Modifier and Type | Method | Description |
---|---|---|
ATNConfigSet |
LexerNoViableAltException.getDeadEndConfigs() |
|
ATNConfigSet |
NoViableAltException.getDeadEndConfigs() |
Modifier and Type | Method | 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 |
ANTLRErrorListener.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 |
BaseErrorListener.reportAmbiguity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
boolean exact,
BitSet ambigAlts,
ATNConfigSet configs) |
|
void |
DiagnosticErrorListener.reportAmbiguity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
boolean exact,
BitSet ambigAlts,
ATNConfigSet configs) |
|
void |
ProxyErrorListener.reportAmbiguity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
boolean exact,
BitSet ambigAlts,
ATNConfigSet configs) |
|
void |
ANTLRErrorListener.reportAttemptingFullContext(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
BitSet conflictingAlts,
ATNConfigSet configs) |
This method is called when an SLL conflict occurs and the parser is about
to use the full context information to make an LL decision.
|
void |
BaseErrorListener.reportAttemptingFullContext(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
BitSet conflictingAlts,
ATNConfigSet configs) |
|
void |
DiagnosticErrorListener.reportAttemptingFullContext(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
BitSet conflictingAlts,
ATNConfigSet configs) |
|
void |
ProxyErrorListener.reportAttemptingFullContext(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
BitSet conflictingAlts,
ATNConfigSet configs) |
|
void |
ANTLRErrorListener.reportContextSensitivity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
int prediction,
ATNConfigSet configs) |
This method is called by the parser when a full-context prediction has a
unique result.
|
void |
BaseErrorListener.reportContextSensitivity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
int prediction,
ATNConfigSet configs) |
|
void |
DiagnosticErrorListener.reportContextSensitivity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
int prediction,
ATNConfigSet configs) |
|
void |
ProxyErrorListener.reportContextSensitivity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
int prediction,
ATNConfigSet configs) |
Constructor | Description |
---|---|
LexerNoViableAltException(Lexer lexer,
CharStream input,
int startIndex,
ATNConfigSet deadEndConfigs) |
|
NoViableAltException(Parser recognizer,
TokenStream input,
Token startToken,
Token offendingToken,
ATNConfigSet deadEndConfigs,
ParserRuleContext ctx) |
Modifier and Type | Class | Description |
---|---|---|
class |
OrderedATNConfigSet |
Modifier and Type | Field | Description |
---|---|---|
ATNConfigSet |
DecisionEventInfo.configs |
The configuration set containing additional information relevant to the
prediction state when the current event occurred, or
null if no
additional information is relevant or available. |
Modifier and Type | Method | Description |
---|---|---|
protected ATNConfigSet |
ParserATNSimulator.applyPrecedenceFilter(ATNConfigSet configs) |
This method transforms the start state computed by
ParserATNSimulator.computeStartState(org.antlr.v4.runtime.atn.ATNState, org.antlr.v4.runtime.RuleContext, boolean) to the special start state used by a
precedence DFA for a particular precedence value. |
protected ATNConfigSet |
ParserATNSimulator.computeReachSet(ATNConfigSet closure,
int t,
boolean fullCtx) |
|
protected ATNConfigSet |
ProfilingATNSimulator.computeReachSet(ATNConfigSet closure,
int t,
boolean fullCtx) |
|
protected ATNConfigSet |
LexerATNSimulator.computeStartState(CharStream input,
ATNState p) |
|
protected ATNConfigSet |
ParserATNSimulator.computeStartState(ATNState p,
RuleContext ctx,
boolean fullCtx) |
|
protected ATNConfigSet |
ParserATNSimulator.removeAllConfigsNotInRuleStopState(ATNConfigSet configs,
boolean lookToEndOfRule) |
Return a configuration set containing only the configurations from
configs which are in a RuleStopState . |
Modifier and Type | Method | Description |
---|---|---|
protected Pair<ATNConfigSet,ATNConfigSet> |
ParserATNSimulator.splitAccordingToSemanticValidity(ATNConfigSet configs,
ParserRuleContext outerContext) |
Walk the list of configurations and split them according to
those that have preds evaluating to true/false.
|
protected Pair<ATNConfigSet,ATNConfigSet> |
ParserATNSimulator.splitAccordingToSemanticValidity(ATNConfigSet configs,
ParserRuleContext outerContext) |
Walk the list of configurations and split them according to
those that have preds evaluating to true/false.
|
Modifier and Type | Method | Description |
---|---|---|
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.
|
static boolean |
PredictionMode.allConfigsInRuleStopStates(ATNConfigSet configs) |
Checks if all configurations in
configs are in a
RuleStopState . |
protected ATNConfigSet |
ParserATNSimulator.applyPrecedenceFilter(ATNConfigSet configs) |
This method transforms the start state computed by
ParserATNSimulator.computeStartState(org.antlr.v4.runtime.atn.ATNState, org.antlr.v4.runtime.RuleContext, boolean) to the special start state used by a
precedence DFA for a particular precedence value. |
protected boolean |
LexerATNSimulator.closure(CharStream input,
LexerATNConfig 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 void |
ParserATNSimulator.closure(ATNConfig config,
ATNConfigSet configs,
Set<ATNConfig> closureBusy,
boolean collectPredicates,
boolean fullCtx,
boolean treatEofAsEpsilon) |
|
protected void |
ParserATNSimulator.closure_(ATNConfig config,
ATNConfigSet configs,
Set<ATNConfig> closureBusy,
boolean collectPredicates,
boolean fullCtx,
int depth,
boolean treatEofAsEpsilon) |
Do the actual work of walking epsilon edges
|
protected void |
ParserATNSimulator.closureCheckingStopState(ATNConfig config,
ATNConfigSet configs,
Set<ATNConfig> closureBusy,
boolean collectPredicates,
boolean fullCtx,
int depth,
boolean treatEofAsEpsilon) |
|
protected ATNConfigSet |
ParserATNSimulator.computeReachSet(ATNConfigSet closure,
int t,
boolean fullCtx) |
|
protected ATNConfigSet |
ProfilingATNSimulator.computeReachSet(ATNConfigSet closure,
int t,
boolean fullCtx) |
|
protected int |
ParserATNSimulator.execATNWithFullContext(DFA dfa,
DFAState D,
ATNConfigSet s0,
TokenStream input,
int startIndex,
ParserRuleContext outerContext) |
|
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 int |
ParserATNSimulator.getAltThatFinishedDecisionEntryRule(ATNConfigSet configs) |
|
protected BitSet |
ParserATNSimulator.getConflictingAlts(ATNConfigSet configs) |
Gets a
BitSet containing the alternatives in configs
which are part of one or more conflicting alternative subsets. |
protected BitSet |
ParserATNSimulator.getConflictingAltsOrUniqueAlt(ATNConfigSet configs) |
Sam pointed out a problem with the previous definition, v3, of
ambiguous states.
|
static Collection<BitSet> |
PredictionMode.getConflictingAltSubsets(ATNConfigSet configs) |
This function gets the conflicting alt subsets from a configuration set.
|
protected LexerATNConfig |
LexerATNSimulator.getEpsilonTarget(CharStream input,
LexerATNConfig 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.
|
protected int |
ParserATNSimulator.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(ATNConfigSet configs,
ParserRuleContext outerContext) |
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 static int |
ParserATNSimulator.getUniqueAlt(ATNConfigSet configs) |
|
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 ATNConfigSet |
ParserATNSimulator.removeAllConfigsNotInRuleStopState(ATNConfigSet configs,
boolean lookToEndOfRule) |
Return a configuration set containing only the configurations from
configs which are in a RuleStopState . |
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
|
protected void |
ProfilingATNSimulator.reportAmbiguity(DFA dfa,
DFAState D,
int startIndex,
int stopIndex,
boolean exact,
BitSet ambigAlts,
ATNConfigSet configs) |
|
protected void |
ParserATNSimulator.reportAttemptingFullContext(DFA dfa,
BitSet conflictingAlts,
ATNConfigSet configs,
int startIndex,
int stopIndex) |
|
protected void |
ProfilingATNSimulator.reportAttemptingFullContext(DFA dfa,
BitSet conflictingAlts,
ATNConfigSet configs,
int startIndex,
int stopIndex) |
|
protected void |
ParserATNSimulator.reportContextSensitivity(DFA dfa,
int prediction,
ATNConfigSet configs,
int startIndex,
int stopIndex) |
|
protected void |
ProfilingATNSimulator.reportContextSensitivity(DFA dfa,
int prediction,
ATNConfigSet configs,
int startIndex,
int stopIndex) |
|
protected Pair<ATNConfigSet,ATNConfigSet> |
ParserATNSimulator.splitAccordingToSemanticValidity(ATNConfigSet configs,
ParserRuleContext outerContext) |
Walk the list of configurations and split them according to
those that have preds evaluating to true/false.
|
Constructor | Description |
---|---|
AmbiguityInfo(int decision,
ATNConfigSet configs,
BitSet ambigAlts,
TokenStream input,
int startIndex,
int stopIndex,
boolean fullCtx) |
Constructs a new instance of the
AmbiguityInfo class with the
specified detailed ambiguity information. |
ATNConfigSet(ATNConfigSet old) |
|
ContextSensitivityInfo(int decision,
ATNConfigSet configs,
TokenStream input,
int startIndex,
int stopIndex) |
Constructs a new instance of the
ContextSensitivityInfo class
with the specified detailed context sensitivity information. |
DecisionEventInfo(int decision,
ATNConfigSet configs,
TokenStream input,
int startIndex,
int stopIndex,
boolean fullCtx) |
|
ErrorInfo(int decision,
ATNConfigSet configs,
TokenStream input,
int startIndex,
int stopIndex,
boolean fullCtx) |
Constructs a new instance of the
ErrorInfo class with the
specified detailed syntax error information. |
LookaheadEventInfo(int decision,
ATNConfigSet configs,
int predictedAlt,
TokenStream input,
int startIndex,
int stopIndex,
boolean fullCtx) |
Constructs a new instance of the
LookaheadEventInfo class with
the specified detailed lookahead information. |
Modifier and Type | Field | Description |
---|---|---|
ATNConfigSet |
DFAState.configs |
Constructor | Description |
---|---|
DFAState(ATNConfigSet configs) |
Copyright © 1992–2018 ANTLR. All rights reserved.