public class ATNDeserializer
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
(package private) static interface |
ATNDeserializer.UnicodeDeserializer |
(package private) static class |
ATNDeserializer.UnicodeDeserializingMode |
| Modifier and Type | Field and Description |
|---|---|
private static java.util.UUID |
ADDED_LEXER_ACTIONS
This UUID indicates an extension of
ADDED_PRECEDENCE_TRANSITIONS
for the addition of lexer actions encoded as a sequence of
LexerAction instances. |
private static java.util.UUID |
ADDED_PRECEDENCE_TRANSITIONS
This UUID indicates an extension of
BASE_SERIALIZED_UUID for the
addition of precedence predicates. |
private static java.util.UUID |
ADDED_UNICODE_SMP
This UUID indicates the serialized ATN contains two sets of
IntervalSets, where the second set's values are encoded as
32-bit integers to support the full Unicode SMP range up to U+10FFFF.
|
private static java.util.UUID |
BASE_SERIALIZED_UUID
This is the earliest supported serialized UUID.
|
private ATNDeserializationOptions |
deserializationOptions |
static java.util.UUID |
SERIALIZED_UUID
This is the current serialized UUID.
|
static int |
SERIALIZED_VERSION |
private static java.util.List<java.util.UUID> |
SUPPORTED_UUIDS
This list contains all of the currently supported UUIDs, ordered by when
the feature first appeared in this branch.
|
| Constructor and Description |
|---|
ATNDeserializer() |
ATNDeserializer(ATNDeserializationOptions deserializationOptions) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkCondition(boolean condition) |
protected void |
checkCondition(boolean condition,
java.lang.String message) |
ATN |
deserialize(char[] data) |
private int |
deserializeSets(char[] data,
int p,
java.util.List<IntervalSet> sets,
ATNDeserializer.UnicodeDeserializer unicodeDeserializer) |
protected Transition |
edgeFactory(ATN atn,
int type,
int src,
int trg,
int arg1,
int arg2,
int arg3,
java.util.List<IntervalSet> sets) |
(package private) static ATNDeserializer.UnicodeDeserializer |
getUnicodeDeserializer(ATNDeserializer.UnicodeDeserializingMode mode) |
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 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 java.util.UUID |
toUUID(char[] data,
int offset) |
protected void |
verifyATN(ATN atn) |
public static final int SERIALIZED_VERSION
private static final java.util.UUID BASE_SERIALIZED_UUID
private static final java.util.UUID ADDED_PRECEDENCE_TRANSITIONS
BASE_SERIALIZED_UUID for the
addition of precedence predicates.private static final java.util.UUID ADDED_LEXER_ACTIONS
ADDED_PRECEDENCE_TRANSITIONS
for the addition of lexer actions encoded as a sequence of
LexerAction instances.private static final java.util.UUID ADDED_UNICODE_SMP
private static final java.util.List<java.util.UUID> SUPPORTED_UUIDS
public static final java.util.UUID SERIALIZED_UUID
private final ATNDeserializationOptions deserializationOptions
public ATNDeserializer()
public ATNDeserializer(ATNDeserializationOptions deserializationOptions)
static ATNDeserializer.UnicodeDeserializer getUnicodeDeserializer(ATNDeserializer.UnicodeDeserializingMode mode)
protected static boolean isFeatureSupported(java.util.UUID feature,
java.util.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)
private int deserializeSets(char[] data,
int p,
java.util.List<IntervalSet> sets,
ATNDeserializer.UnicodeDeserializer unicodeDeserializer)
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,
java.lang.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 java.util.UUID toUUID(char[] data,
int offset)
protected Transition edgeFactory(ATN atn, int type, int src, int trg, int arg1, int arg2, int arg3, java.util.List<IntervalSet> sets)
protected ATNState stateFactory(int type, int ruleIndex)
protected LexerAction lexerActionFactory(LexerActionType type, int data1, int data2)