类 DFA

    • 字段概要

      字段 
      修饰符和类型 字段 说明
      protected short[] accept  
      static boolean debug  
      protected int decisionNumber  
      protected short[] eof  
      protected short[] eot  
      protected char[] max  
      protected char[] min  
      protected BaseRecognizer recognizer
      Which recognizer encloses this DFA? Needed to check backtracking
      protected short[] special  
      protected short[][] transition  
    • 构造器概要

      构造器 
      构造器 说明
      DFA()  
    • 方法概要

      所有方法 静态方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      protected void error​(NoViableAltException nvae)
      A hook for debugging interface
      java.lang.String getDescription()  
      protected void noViableAlt​(int s, IntStream input)  
      int predict​(IntStream input)
      From the input stream, predict what alternative will succeed using this DFA (representing the covering regular approximation to the underlying CFL).
      int specialStateTransition​(int s, IntStream input)  
      static short[] unpackEncodedString​(java.lang.String encodedString)
      Given a String that has a run-length-encoding of some unsigned shorts like "\1\2\3\9", convert to short[] {2,9,9,9}.
      static char[] unpackEncodedStringToUnsignedChars​(java.lang.String encodedString)
      Hideous duplication of code, but I need different typed arrays out :(
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 字段详细资料

      • eot

        protected short[] eot
      • eof

        protected short[] eof
      • min

        protected char[] min
      • max

        protected char[] max
      • accept

        protected short[] accept
      • special

        protected short[] special
      • transition

        protected short[][] transition
      • decisionNumber

        protected int decisionNumber
      • recognizer

        protected BaseRecognizer recognizer
        Which recognizer encloses this DFA? Needed to check backtracking
    • 构造器详细资料

      • DFA

        public DFA()
    • 方法详细资料

      • predict

        public int predict​(IntStream input)
                    throws RecognitionException
        From the input stream, predict what alternative will succeed using this DFA (representing the covering regular approximation to the underlying CFL). Return an alternative number 1..n. Throw an exception upon error.
        抛出:
        RecognitionException
      • getDescription

        public java.lang.String getDescription()
      • unpackEncodedString

        public static short[] unpackEncodedString​(java.lang.String encodedString)
        Given a String that has a run-length-encoding of some unsigned shorts like "\1\2\3\9", convert to short[] {2,9,9,9}. We do this to avoid static short[] which generates so much init code that the class won't compile. :(
      • unpackEncodedStringToUnsignedChars

        public static char[] unpackEncodedStringToUnsignedChars​(java.lang.String encodedString)
        Hideous duplication of code, but I need different typed arrays out :(