ATNConfig class

A tuple: (ATN state, predicted alt, syntactic, semantic context). The syntactic context is a graph-structured stack node whose path(s) to the root is the rule invocation(s) chain used to arrive at the state. The semantic context is the tree of semantic predicates encountered before reaching an ATN state.

Implementers

Constructors

ATNConfig(ATNState state, int alt, PredictionContext? context, [SemanticContext semanticContext = EmptySemanticContext.Instance])
ATNConfig.dup(ATNConfig c, {ATNState? state, int? alt, PredictionContext? context, SemanticContext? semanticContext})

Properties

alt int
What alt (or lexer rule) is predicted by this configuration */
getter/setter pair
context PredictionContext?
The stack of invoking states leading to the rule/states associated with this config. We track only those contexts pushed during execution of the ATN simulator.
getter/setter pair
hashCode int
The hash code for this object.
no setteroverride
outerContextDepth int
This method gets the value of the {@link #reachesIntoOuterContext} field as it existed prior to the introduction of the {@link #isPrecedenceFilterSuppressed} method.
no setter
reachesIntoOuterContext int
We cannot execute predicates dependent upon local context unless we know for sure we are in the correct context. Because there is no way to do this efficiently, we simply cannot evaluate dependent predicates unless we are in the rule that initially invokes the ATN simulator.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
semanticContext SemanticContext
getter/setter pair
state ATNState
The ATN state associated with this configuration */
getter/setter pair

Methods

isPrecedenceFilterSuppressed() bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setPrecedenceFilterSuppressed(bool value) → void
toString([dynamic _, bool showAlt = true]) String
A string representation of this object.
override

Operators

operator ==(Object other) bool
An ATN configuration is equal to another if both have the same state, they predict the same alternative, and syntactic/semantic contexts are the same.
override

Static Properties

SUPPRESS_PRECEDENCE_FILTER int
This field stores the bit mask for implementing the {@link #isPrecedenceFilterSuppressed} property as a bit within the existing {@link #reachesIntoOuterContext} field.
final