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 ATNstatic final DFAStateMust distinguish between missing edge and edge we know leads nowherestatic final UUIDDeprecated.static final intDeprecated.UseATNDeserializer.SERIALIZED_VERSIONinstead.protected final PredictionContextCacheThe context cache maps all PredictionContext objects that are equals() to a single cached copy. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckCondition(boolean condition) Deprecated.UseATNDeserializer.checkCondition(boolean)instead.static voidcheckCondition(boolean condition, String message) Deprecated.UseATNDeserializer.checkCondition(boolean, String)instead.voidclearDFA()Clear the DFA cache used by the current instance.static ATNdeserialize(char[] data) Deprecated.UseATNDeserializer.deserialize(char[])instead.static TransitionedgeFactory(ATN atn, int type, int src, int trg, int arg1, int arg2, int arg3, List<IntervalSet> sets) getCachedContext(PredictionContext context) abstract voidreset()static ATNStatestateFactory(int type, int ruleIndex) Deprecated.UseATNDeserializer.stateFactory(int, int)instead.static inttoInt(char c) Deprecated.UseATNDeserializer.toInt(char)instead.static inttoInt32(char[] data, int offset) Deprecated.UseATNDeserializer.toInt32(char[], int)instead.static longtoLong(char[] data, int offset) Deprecated.UseATNDeserializer.toLong(char[], int)instead.static UUIDtoUUID(char[] data, int offset) Deprecated.UseATNDeserializer.toUUID(char[], int)instead.
-
Field Details
-
SERIALIZED_VERSION
Deprecated.UseATNDeserializer.SERIALIZED_VERSIONinstead. -
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.