ATNState class abstract
The following images show the relation of states and {@link ATNState#transitions} for various grammar constructs.
- Solid edges marked with an ε indicate a required [EpsilonTransition].
- Dashed edges indicate locations where any transition derived from [Transition] might appear.
- Dashed nodes are place holders for either a sequence of linked [BasicState] states or the inclusion of a block representing a nested construct in one of the forms below.
- Nodes showing multiple outgoing alternatives with a {@code ...} support any number of alternatives (one or more). Nodes without the {@code ...} only support the exact number of alternatives shown in the diagram.
Basic Blocks
Rule
Block of 1 or more alternatives
Greedy Loops
Greedy Closure: {@code (...)*}
Greedy Positive Closure: {@code (...)+}
Greedy Optional: {@code (...)?}
Non-Greedy Loops
Non-Greedy Closure: {@code (...)*?}
Non-Greedy Positive Closure: {@code (...)+?}
Non-Greedy Optional: {@code (...)??}
Properties
- atn ↔ ATN
-
Which ATN are we in? */
getter/setter pair
- epsilonOnlyTransitions ↔ bool
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setteroverride
- nextTokenWithinRule ↔ IntervalSet?
-
Used to cache lookahead during parsing, not used during construction */
getter/setter pair
- numberOfTransitions → int
-
no setter
- ruleIndex ↔ int
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stateNumber ↔ int
-
getter/setter pair
- stateType → StateType
-
no setter
-
transitions
↔ List<
Transition> -
Track the transitions emanating from this ATN state. */
getter/setter pair
Methods
-
addTransition(
Transition e) → void -
addTransitionAt(
int index, Transition e) → void -
isNonGreedyExitState(
) → bool -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onlyHasEpsilonTransitions(
) → bool -
removeTransition(
int index) → Transition -
setRuleIndex(
int ruleIndex) → void -
setTransition(
int i, Transition e) → void -
toString(
) → String -
A string representation of this object.
override
-
transition(
int i) → Transition
Operators
-
operator ==(
Object o) → bool -
The equality operator.
override
Static Properties
- INITIAL_NUM_TRANSITIONS → int
-
final
- INVALID_STATE_NUMBER → int
-
final