Package org.antlr.v4.runtime.atn
Class ATNDeserializer
- java.lang.Object
-
- org.antlr.v4.runtime.atn.ATNDeserializer
-
public class ATNDeserializer extends java.lang.Object
- Author:
- Sam Harwell
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.UUID
SERIALIZED_UUID
This is the current serialized UUID.static int
SERIALIZED_VERSION
-
Constructor Summary
Constructors Constructor Description ATNDeserializer()
ATNDeserializer(ATNDeserializationOptions deserializationOptions)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkCondition(boolean condition)
protected void
checkCondition(boolean condition, java.lang.String message)
ATN
deserialize(char[] data)
protected Transition
edgeFactory(ATN atn, int type, int src, int trg, int arg1, int arg2, int arg3, java.util.List<IntervalSet> sets)
protected static boolean
isFeatureSupported(java.util.UUID feature, java.util.UUID actualUuid)
Determines if a particular serialized representation of an ATN supports a particular feature, identified by theUUID
used for serializing the ATN at the time the feature was first introduced.protected LexerAction
lexerActionFactory(LexerActionType type, int data1, int data2)
protected void
markPrecedenceDecisions(ATN atn)
Analyze theStarLoopEntryState
states in the specified ATN to set theStarLoopEntryState.isPrecedenceDecision
field to the correct value.protected ATNState
stateFactory(int type, int ruleIndex)
protected static int
toInt(char c)
protected static int
toInt32(char[] data, int offset)
protected static long
toLong(char[] data, int offset)
protected static java.util.UUID
toUUID(char[] data, int offset)
protected void
verifyATN(ATN atn)
-
-
-
Constructor Detail
-
ATNDeserializer
public ATNDeserializer()
-
ATNDeserializer
public ATNDeserializer(ATNDeserializationOptions deserializationOptions)
-
-
Method Detail
-
isFeatureSupported
protected static boolean isFeatureSupported(java.util.UUID feature, java.util.UUID actualUuid)
Determines if a particular serialized representation of an ATN supports a particular feature, identified by theUUID
used for serializing the ATN at the time the feature was first introduced.- Parameters:
feature
- TheUUID
marking the first time the feature was supported in the serialized ATN.actualUuid
- TheUUID
of the actual serialized ATN which is currently being deserialized.- Returns:
true
if theactualUuid
value represents a serialized ATN at or after the feature identified byfeature
was introduced; otherwise,false
.
-
deserialize
public ATN deserialize(char[] data)
-
markPrecedenceDecisions
protected void markPrecedenceDecisions(ATN atn)
Analyze theStarLoopEntryState
states in the specified ATN to set theStarLoopEntryState.isPrecedenceDecision
field to the correct value.- Parameters:
atn
- The ATN.
-
verifyATN
protected void verifyATN(ATN atn)
-
checkCondition
protected void checkCondition(boolean condition)
-
checkCondition
protected void checkCondition(boolean condition, java.lang.String message)
-
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
protected static java.util.UUID toUUID(char[] data, int offset)
-
edgeFactory
protected Transition edgeFactory(ATN atn, int type, int src, int trg, int arg1, int arg2, int arg3, java.util.List<IntervalSet> sets)
-
stateFactory
protected ATNState stateFactory(int type, int ruleIndex)
-
lexerActionFactory
protected LexerAction lexerActionFactory(LexerActionType type, int data1, int data2)
-
-