Package org.antlr.v4.runtime.atn
Class ATNSimulator
java.lang.Object
org.antlr.v4.runtime.atn.ATNSimulator
- Direct Known Subclasses:
LexerATNSimulator
,ParserATNSimulator
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal ATN
static final DFAState
Must distinguish between missing edge and edge we know leads nowhereprotected final PredictionContextCache
The context cache maps all PredictionContext objects that are equals() to a single cached copy. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clearDFA()
Clear the DFA cache used by the current instance.getCachedContext
(PredictionContext context) abstract void
reset()
-
Field Details
-
ERROR
Must distinguish between missing edge and edge we know leads nowhere -
atn
-
-
Constructor Details
-
ATNSimulator
-
-
Method Details
-
reset
public abstract void reset() -
clearDFA
public 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.- Throws:
UnsupportedOperationException
- if the current instance does not support clearing the DFA.- Since:
- 4.3
-
getCachedContext
-