类 DebugParser


  • public class DebugParser
    extends Parser
    • 字段详细资料

      • isCyclicDecision

        public boolean isCyclicDecision
        Used to differentiate between fixed lookahead and cyclic DFA decisions while profiling.
    • 方法详细资料

      • setDebugListener

        public void setDebugListener​(DebugEventListener dbg)
        Provide a new debug event listener for this parser. Notify the input stream too that it should send events to this listener.
      • reportError

        public void reportError​(java.io.IOException e)
      • beginResync

        public void beginResync()
        从类复制的说明: BaseRecognizer
        A hook to listen in on the token consumption during error recovery. The DebugParser subclasses this to fire events to the listenter.
        覆盖:
        beginResync 在类中 BaseRecognizer
      • beginBacktrack

        public void beginBacktrack​(int level)
      • endBacktrack

        public void endBacktrack​(int level,
                                 boolean successful)
      • reportError

        public void reportError​(RecognitionException e)
        从类复制的说明: BaseRecognizer
        Report a recognition problem. This method sets errorRecovery to indicate the parser is recovering not parsing. Once in recovery mode, no errors are generated. To get out of recovery mode, the parser must successfully match a token (after a resync). So it will go: 1. error occurs 2. enter recovery mode, report error 3. consume until token found in resynch set 4. try to resume parsing 5. next match() will reset errorRecovery mode If you override, make sure to update syntaxErrors if you care about that.
        覆盖:
        reportError 在类中 BaseRecognizer