ATNSimulator

ATN simulator base class

Constructors

this
this(ATN atn, PredictionContextCache sharedContextCache)
Undocumented in source.

Members

Functions

clearDFA
void clearDFA()

Clear the DFA cache used by the current instance. Since the DFA cache may be shared by multiple ATN simulators, this method may affect the performance (but not accuracy) of other parsers which are being used concurrently.

getCachedContext
PredictionContext getCachedContext(PredictionContext context)
Undocumented in source. Be warned that the author may not have intended to support it.
getSharedContextCache
PredictionContextCache getSharedContextCache()
Undocumented in source. Be warned that the author may not have intended to support it.
reset
void reset()
Undocumented in source.

Static variables

ERROR
DFAState ERROR;

Must distinguish between missing edge and edge we know leads nowhere

SERIALIZED_UUID
UUID SERIALIZED_UUID;

This is the current serialized UUID. deprecated Use {@link ATNDeserializer#checkCondition(boolean)} instead.

SERIALIZED_VERSION
int SERIALIZED_VERSION;
Undocumented in source.

Variables

atn
ATN atn;
Undocumented in source.
sharedContextCache
PredictionContextCache sharedContextCache;

The context cache maps all PredictionContext objects that are equals() to a single cached copy. This cache is shared across all contexts in all ATNConfigs in all DFA states. We rebuild each ATNConfigSet to use only cached nodes/graphs in addDFAState(). We don't want to fill this during closure() since there are lots of contexts that pop up but are not used ever again. It also greatly slows down closure().

Inherited Members

From InterfaceATNSimulator

getCachedContext
PredictionContext getCachedContext(PredictionContext predictionContext)
Undocumented in source.

Meta