| Modifier and Type | Field and Description |
|---|---|
| private final ConcurrentMap | |
| public DFA[] | |
| public final List | 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. |
| public final ATNType | grammarType
The type of the ATN. |
| private boolean | |
| public static final int | |
| public LexerAction[] | lexerActions
For lexer ATNs, this is an array of |
| protected final ConcurrentMap | |
| public final int | maxTokenType
The maximum value for any symbol recognized by a transition in the ATN. |
| public final Map | |
| public DFA[] | |
| public final List | |
| public RuleStartState[] | ruleToStartState
Maps from rule index to starting state number. |
| public RuleStopState[] | ruleToStopState
Maps from rule index to stop state number. |
| public int[] | ruleToTokenType
For lexer ATNs, this maps the rule index to the resulting token type. |
| public final List |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public final void | |
| public int | |
| public void | |
| public PredictionContext | |
| public int | |
| public DecisionState | |
| public final DFA[] | |
| public IntervalSet | Returns: The set of potentially valid input symbols which could follow the specified state in the specified context.the ATN state number stateNumber, RuleContext the full parse context context)Computes the set of input symbols which could follow ATN state number
|
| public int | |
| public boolean | |
| public IntervalSet | nextTokens(ATNState s, PredictionContext ctx)
Compute the set of valid tokens that can occur starting in state |
| public IntervalSet | nextTokens(ATNState s)
Compute the set of valid tokens that can occur starting in |
| public void | |
| public void |
| contextCache | back to summary |
|---|---|
| private final ConcurrentMap<PredictionContext, PredictionContext> contextCache | |
| decisionToDFA | back to summary |
|---|---|
| public DFA[] decisionToDFA
| |
| decisionToState | back to summary |
|---|---|
| public final List<DecisionState> 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. This includes all the rules, subrules, optional blocks, ()+, ()* etc... | |
| grammarType | back to summary |
|---|---|
| public final ATNType grammarType The type of the ATN. | |
| hasUnicodeSMPTransitions | back to summary |
|---|---|
| private boolean hasUnicodeSMPTransitions | |
| INVALID_ALT_NUMBER | back to summary |
|---|---|
| public static final int INVALID_ALT_NUMBER | |
| lexerActions | back to summary |
|---|---|
| public LexerAction[] lexerActions For lexer ATNs, this is an array of | |
| LL1Table | back to summary |
|---|---|
| protected final ConcurrentMap<Integer, Integer> LL1Table | |
| maxTokenType | back to summary |
|---|---|
| public final int maxTokenType The maximum value for any symbol recognized by a transition in the ATN. | |
| modeNameToStartState | back to summary |
|---|---|
| public final Map<String, TokensStartState> modeNameToStartState
| |
| modeToDFA | back to summary |
|---|---|
| public DFA[] modeToDFA
| |
| modeToStartState | back to summary |
|---|---|
| public final List<TokensStartState> modeToStartState
| |
| ruleToStartState | back to summary |
|---|---|
| public RuleStartState[] ruleToStartState Maps from rule index to starting state number. | |
| ruleToStopState | back to summary |
|---|---|
| public RuleStopState[] ruleToStopState Maps from rule index to stop state number. | |
| ruleToTokenType | back to summary |
|---|---|
| public int[] ruleToTokenType For lexer ATNs, this maps the rule index to the resulting token type.
For parser ATNs, this maps the rule index to the generated bypass token
type if the
| |
| states | back to summary |
|---|---|
| public final List<ATNState> states
| |
| ATN | back to summary |
|---|---|
| public ATN(ATNType grammarType, int maxTokenType) Used for runtime deserialization of ATNs from strings | |
| addState | back to summary |
|---|---|
| public void addState(ATNState state) | |
| clearDFA | back to summary |
|---|---|
| public final void clearDFA() | |
| defineDecisionState | back to summary |
|---|---|
| public int defineDecisionState(DecisionState s) | |
| defineMode | back to summary |
|---|---|
| public void defineMode(String name, TokensStartState s) | |
| getCachedContext | back to summary |
|---|---|
| public PredictionContext getCachedContext(PredictionContext context) | |
| getContextCacheSize | back to summary |
|---|---|
| public int getContextCacheSize() | |
| getDecisionState | back to summary |
|---|---|
| public DecisionState getDecisionState(int decision) | |
| getDecisionToDFA | back to summary |
|---|---|
| public final DFA[] getDecisionToDFA() | |
| getExpectedTokens | back to summary |
|---|---|
| public IntervalSet getExpectedTokens(int stateNumber, RuleContext context) Computes the set of input symbols which could follow ATN state number
If Note that this does NOT give you the set of all tokens that could appear at a given token position in the input phrase. In other words, it does not answer: "Given a specific partial input phrase, return the set of all tokens that can follow the last token in the input phrase." The big difference is that with just the input, the parser could land right in the middle of a lookahead decision. Getting all possible tokens given a partial input stream is a separate computation. See https://github.com/antlr/antlr4/issues/1428 For this function, we are specifying an ATN state and call stack to compute what token(s) can come next and specifically: outside of a lookahead decision. That is what you want for error reporting and recovery upon parse error.
| |
| getNumberOfDecisions | back to summary |
|---|---|
| public int getNumberOfDecisions() | |
| hasUnicodeSMPTransitions | back to summary |
|---|---|
| public boolean hasUnicodeSMPTransitions() | |
| nextTokens | back to summary |
|---|---|
| public IntervalSet nextTokens(ATNState s, PredictionContext ctx) Compute the set of valid tokens that can occur starting in state
| |
| nextTokens | back to summary |
|---|---|
| public IntervalSet nextTokens(ATNState s) Compute the set of valid tokens that can occur starting in
| |
| removeState | back to summary |
|---|---|
| public void removeState(ATNState state) | |
| setHasUnicodeSMPTransitions | back to summary |
|---|---|
| public void setHasUnicodeSMPTransitions(boolean value) | |