Class ATNDeserializer


  • public class ATNDeserializer
    extends Object
    Author:
    Sam Harwell
    • Field Detail

      • SERIALIZED_VERSION

        public static final int SERIALIZED_VERSION
      • SERIALIZED_UUID

        public static final UUID SERIALIZED_UUID
        This is the current serialized UUID.
    • Constructor Detail

      • ATNDeserializer

        public ATNDeserializer()
    • Method Detail

      • isFeatureSupported

        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.
        Parameters:
        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.
        Returns:
        true if the actualUuid value represents a serialized ATN at or after the feature identified by feature was introduced; otherwise, false.
      • deserialize

        public ATN deserialize​(char[] data)
      • verifyATN

        protected void verifyATN​(ATN atn)
      • checkCondition

        protected void checkCondition​(boolean condition)
      • checkCondition

        protected void checkCondition​(boolean condition,
                                      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 UUID toUUID​(char[] data,
                                     int offset)
      • edgeFactory

        protected Transition edgeFactory​(ATN atn,
                                         int type,
                                         int src,
                                         int trg,
                                         int arg1,
                                         int arg2,
                                         int arg3,
                                         List<IntervalSet> sets)
      • stateFactory

        protected ATNState stateFactory​(int type,
                                        int ruleIndex)