Package org.antlr.v4.runtime.atn
Class ATNDeserializer
java.lang.Object
org.antlr.v4.runtime.atn.ATNDeserializer
- Author:
- Sam Harwell
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final UUIDThis is the current serialized UUID.static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckCondition(boolean condition) protected voidcheckCondition(boolean condition, String message) deserialize(char[] data) protected TransitionedgeFactory(ATN atn, int type, int src, int trg, int arg1, int arg2, int arg3, List<IntervalSet> sets) protected static booleanisFeatureSupported(UUID feature, UUID actualUuid) Determines if a particular serialized representation of an ATN supports a particular feature, identified by theUUIDused for serializing the ATN at the time the feature was first introduced.protected LexerActionlexerActionFactory(LexerActionType type, int data1, int data2) protected voidAnalyze theStarLoopEntryStatestates in the specified ATN to set theStarLoopEntryState.isPrecedenceDecisionfield to the correct value.protected ATNStatestateFactory(int type, int ruleIndex) protected static inttoInt(char c) protected static inttoInt32(char[] data, int offset) protected static longtoLong(char[] data, int offset) protected static UUIDtoUUID(char[] data, int offset) protected void
-
Field Details
-
SERIALIZED_VERSION
public static final int SERIALIZED_VERSION -
SERIALIZED_UUID
This is the current serialized UUID.
-
-
Constructor Details
-
ATNDeserializer
public ATNDeserializer() -
ATNDeserializer
-
-
Method Details
-
isFeatureSupported
Determines if a particular serialized representation of an ATN supports a particular feature, identified by theUUIDused for serializing the ATN at the time the feature was first introduced.- Parameters:
feature- TheUUIDmarking the first time the feature was supported in the serialized ATN.actualUuid- TheUUIDof the actual serialized ATN which is currently being deserialized.- Returns:
trueif theactualUuidvalue represents a serialized ATN at or after the feature identified byfeaturewas introduced; otherwise,false.
-
deserialize
-
markPrecedenceDecisions
Analyze theStarLoopEntryStatestates in the specified ATN to set theStarLoopEntryState.isPrecedenceDecisionfield to the correct value.- Parameters:
atn- The ATN.
-
verifyATN
-
checkCondition
protected void checkCondition(boolean condition) -
checkCondition
-
toInt
protected static int toInt(char c) -
toInt32
protected static int toInt32(char[] data, int offset) -
toLong
protected static long toLong(char[] data, int offset) -
toUUID
-
edgeFactory
protected Transition edgeFactory(ATN atn, int type, int src, int trg, int arg1, int arg2, int arg3, List<IntervalSet> sets) -
stateFactory
-
lexerActionFactory
-