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 nowherestatic final UUID
Deprecated.static final int
Deprecated.UseATNDeserializer.SERIALIZED_VERSION
instead.protected final PredictionContextCache
The context cache maps all PredictionContext objects that are equals() to a single cached copy. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
checkCondition
(boolean condition) Deprecated.UseATNDeserializer.checkCondition(boolean)
instead.static void
checkCondition
(boolean condition, String message) Deprecated.UseATNDeserializer.checkCondition(boolean, String)
instead.void
clearDFA()
Clear the DFA cache used by the current instance.static ATN
deserialize
(char[] data) Deprecated.UseATNDeserializer.deserialize(char[])
instead.static Transition
edgeFactory
(ATN atn, int type, int src, int trg, int arg1, int arg2, int arg3, List<IntervalSet> sets) getCachedContext
(PredictionContext context) abstract void
reset()
static ATNState
stateFactory
(int type, int ruleIndex) Deprecated.UseATNDeserializer.stateFactory(int, int)
instead.static int
toInt
(char c) Deprecated.UseATNDeserializer.toInt(char)
instead.static int
toInt32
(char[] data, int offset) Deprecated.UseATNDeserializer.toInt32(char[], int)
instead.static long
toLong
(char[] data, int offset) Deprecated.UseATNDeserializer.toLong(char[], int)
instead.static UUID
toUUID
(char[] data, int offset) Deprecated.UseATNDeserializer.toUUID(char[], int)
instead.
-
Field Details
-
SERIALIZED_VERSION
Deprecated.UseATNDeserializer.SERIALIZED_VERSION
instead. -
SERIALIZED_UUID
Deprecated.UseATNDeserializer.checkCondition(boolean)
instead.This is the current serialized UUID. -
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
-
deserialize
Deprecated.UseATNDeserializer.deserialize(char[])
instead. -
checkCondition
Deprecated.UseATNDeserializer.checkCondition(boolean)
instead. -
checkCondition
Deprecated.UseATNDeserializer.checkCondition(boolean, String)
instead. -
toInt
Deprecated.UseATNDeserializer.toInt(char)
instead. -
toInt32
Deprecated.UseATNDeserializer.toInt32(char[], int)
instead. -
toLong
Deprecated.UseATNDeserializer.toLong(char[], int)
instead. -
toUUID
Deprecated.UseATNDeserializer.toUUID(char[], int)
instead. -
edgeFactory
@Deprecated public static Transition edgeFactory(ATN atn, int type, int src, int trg, int arg1, int arg2, int arg3, List<IntervalSet> sets) -
stateFactory
Deprecated.UseATNDeserializer.stateFactory(int, int)
instead.
-
ATNDeserializer.checkCondition(boolean)
instead.