ATNConfig

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.

Constructors

this
this(ATNConfig old)

Duplication

this
this(ATNState state, int alt, PredictionContext context)
Undocumented in source.
this
this(ATNState state, int alt, PredictionContext context, SemanticContext semanticContext)
Undocumented in source.
this
this(ATNConfig c, ATNState state)
Undocumented in source.
this
this(ATNConfig c, ATNState state, SemanticContext semanticContext)
Undocumented in source.
this
this(ATNConfig c, SemanticContext semanticContext)
Undocumented in source.
this
this(ATNConfig c, ATNState state, PredictionContext context)
Undocumented in source.
this
this(ATNConfig c, ATNState state, PredictionContext context, SemanticContext semanticContext)
Undocumented in source.

Members

Functions

getOuterContextDepth
int getOuterContextDepth()

This method gets the value of the {@link #reachesIntoOuterContext} field as it existed prior to the introduction of the {@link #isPrecedenceFilterSuppressed} method.

isPrecedenceFilterSuppressed
bool isPrecedenceFilterSuppressed()
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(Object o)

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. @uml @override

opEquals
bool opEquals(ATNConfig other)
Undocumented in source. Be warned that the author may not have intended to support it.
setPrecedenceFilterSuppressed
void setPrecedenceFilterSuppressed(bool value)
Undocumented in source. Be warned that the author may not have intended to support it.
toHash
size_t toHash()

@uml @trusted @nothrow @override

toString
string toString()

@uml @override

toString
string toString(InterfaceRecognizer recog, bool showAlt)
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

SUPPRESS_PRECEDENCE_FILTER
int SUPPRESS_PRECEDENCE_FILTER;

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

Variables

alt
int alt;

What alt (or lexer rule) is predicted by this configuration?

context
PredictionContext context;

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.

hashOfFp
size_t function(Object o) @(trusted) nothrow hashOfFp;
Undocumented in source.
opEqualsFp
bool function(Object a, Object b) opEqualsFp;
Undocumented in source.
reachesIntoOuterContext
int reachesIntoOuterContext;

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.

semanticContext
SemanticContext semanticContext;
Undocumented in source.
state
ATNState state;

The ATN state associated with this configuration.

Meta