Class DFA
java.lang.Object
org.graalvm.shadowed.org.antlr.v4.runtime.dfa.DFA
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal DecisionStateFrom which ATN state did we create this DFA?final intA set of all DFA states. -
Constructor Summary
ConstructorsConstructorDescriptionDFA(DecisionState atnStartState) DFA(DecisionState atnStartState, int decision) -
Method Summary
Modifier and TypeMethodDescriptionfinal DFAStategetPrecedenceStartState(int precedence) Get the start state for a specific precedence value.Return a list of all states in this DFA, ordered by state number.final booleanGets whether this DFA is a precedence DFA.final voidsetPrecedenceDfa(boolean precedenceDfa) Deprecated.This method no longer performs any action.final voidsetPrecedenceStartState(int precedence, DFAState startState) Set the start state for a specific precedence value.toString()Deprecated.UsetoString(Vocabulary)instead.toString(Vocabulary vocabulary)
-
Field Details
-
states
-
s0
-
decision
public final int decision -
atnStartState
From which ATN state did we create this DFA?
-
-
Constructor Details
-
DFA
-
DFA
-
-
Method Details
-
isPrecedenceDfa
public final boolean isPrecedenceDfa()Gets whether this DFA is a precedence DFA. Precedence DFAs use a special start states0which is not stored instates. TheDFAState.edgesarray for this start state contains outgoing edges supplying individual start states corresponding to specific precedence values.- Returns:
trueif this is a precedence DFA; otherwise,false.- See Also:
-
getPrecedenceStartState
Get the start state for a specific precedence value.- Parameters:
precedence- The current precedence.- Returns:
- The start state corresponding to the specified precedence, or
nullif no start state exists for the specified precedence. - Throws:
IllegalStateException- if this is not a precedence DFA.- See Also:
-
setPrecedenceStartState
Set the start state for a specific precedence value.- Parameters:
precedence- The current precedence.startState- The start state corresponding to the specified precedence.- Throws:
IllegalStateException- if this is not a precedence DFA.- See Also:
-
setPrecedenceDfa
Deprecated.This method no longer performs any action.Sets whether this is a precedence DFA.- Parameters:
precedenceDfa-trueif this is a precedence DFA; otherwise,false- Throws:
UnsupportedOperationException- ifprecedenceDfadoes not match the value ofisPrecedenceDfa()for the current DFA.
-
getStates
-
toString
-
toString
Deprecated.UsetoString(Vocabulary)instead. -
toString
-
toLexerString
-