public class ATNDeserializer extends Object
Modifier and Type | Field and Description |
---|---|
static UUID |
SERIALIZED_UUID
This is the current serialized UUID.
|
static int |
SERIALIZED_VERSION |
Constructor and Description |
---|
ATNDeserializer() |
ATNDeserializer(ATNDeserializationOptions deserializationOptions) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkCondition(boolean condition) |
protected void |
checkCondition(boolean condition,
String message) |
ATN |
deserialize(char[] data) |
protected Transition |
edgeFactory(ATN atn,
int type,
int src,
int trg,
int arg1,
int arg2,
int arg3,
List<IntervalSet> sets) |
protected static boolean |
isFeatureSupported(UUID feature,
UUID actualUuid)
Determines if a particular serialized representation of an ATN supports
a particular feature, identified by the
UUID 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 the
StarLoopEntryState states in the specified ATN to set
the StarLoopEntryState.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 UUID |
toUUID(char[] data,
int offset) |
protected void |
verifyATN(ATN atn) |
public static final int SERIALIZED_VERSION
public static final UUID SERIALIZED_UUID
public ATNDeserializer()
public ATNDeserializer(ATNDeserializationOptions deserializationOptions)
protected static boolean isFeatureSupported(UUID feature, UUID actualUuid)
UUID
used for serializing
the ATN at the time the feature was first introduced.feature
- The UUID
marking the first time the feature was
supported in the serialized ATN.actualUuid
- The UUID
of the actual serialized ATN which is
currently being deserialized.true
if the actualUuid
value represents a
serialized ATN at or after the feature identified by feature
was
introduced; otherwise, false
.public ATN deserialize(char[] data)
protected void markPrecedenceDecisions(ATN atn)
StarLoopEntryState
states in the specified ATN to set
the StarLoopEntryState.isPrecedenceDecision
field to the
correct value.atn
- The ATN.protected void verifyATN(ATN atn)
protected void checkCondition(boolean condition)
protected void checkCondition(boolean condition, String message)
protected static int toInt(char c)
protected static int toInt32(char[] data, int offset)
protected static long toLong(char[] data, int offset)
protected static UUID toUUID(char[] data, int offset)
protected Transition edgeFactory(ATN atn, int type, int src, int trg, int arg1, int arg2, int arg3, List<IntervalSet> sets)
protected ATNState stateFactory(int type, int ruleIndex)
protected LexerAction lexerActionFactory(LexerActionType type, int data1, int data2)
Copyright © 1992–2017 ANTLR. All rights reserved.