Class ParseTokenListener

  • All Implemented Interfaces:
    org.antlr.runtime.debug.DebugEventListener

    public class ParseTokenListener
    extends org.antlr.runtime.debug.BlankDebugEventListener
    A token processor to render the ANTLR tokens. This token processor is notified as ANTLR parses every token. This processor controls a renderer that renders the token.
    Author:
    Pinaki Poddar
    • Field Summary

      • Fields inherited from interface org.antlr.runtime.debug.DebugEventListener

        FALSE, PROTOCOL_VERSION, TRUE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void consumeHiddenToken​(org.antlr.runtime.Token token)
      Hidden tokens are tokens that are not processed at lexical processing stage.
      void consumeToken​(org.antlr.runtime.Token token)
      A regular token is delegated to the renderer for a string representation and the resultant string is sent to the output stream.
      void enterDecision​(int d)  
      void exitDecision​(int i)  
      • Methods inherited from class org.antlr.runtime.debug.BlankDebugEventListener

        addChild, becomeRoot, beginBacktrack, beginResync, commence, consumeNode, createNode, createNode, endBacktrack, endResync, enterAlt, enterRule, enterSubRule, errorNode, exitRule, exitSubRule, location, LT, LT, mark, nilNode, recognitionException, rewind, rewind, semanticPredicate, setTokenBoundaries, terminate
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • enterDecision

        public void enterDecision​(int d)
        Specified by:
        enterDecision in interface org.antlr.runtime.debug.DebugEventListener
        Overrides:
        enterDecision in class org.antlr.runtime.debug.BlankDebugEventListener
      • exitDecision

        public void exitDecision​(int i)
        Specified by:
        exitDecision in interface org.antlr.runtime.debug.DebugEventListener
        Overrides:
        exitDecision in class org.antlr.runtime.debug.BlankDebugEventListener
      • consumeToken

        public void consumeToken​(org.antlr.runtime.Token token)
        A regular token is delegated to the renderer for a string representation and the resultant string is sent to the output stream.
        Specified by:
        consumeToken in interface org.antlr.runtime.debug.DebugEventListener
        Overrides:
        consumeToken in class org.antlr.runtime.debug.BlankDebugEventListener
      • consumeHiddenToken

        public void consumeHiddenToken​(org.antlr.runtime.Token token)
        Hidden tokens are tokens that are not processed at lexical processing stage. The most important hidden token for rendering are the tokens that represent multi-line or single line comments. The multi-line comments must be broken into individual lines for line numbering to remain consistent.
        Specified by:
        consumeHiddenToken in interface org.antlr.runtime.debug.DebugEventListener
        Overrides:
        consumeHiddenToken in class org.antlr.runtime.debug.BlankDebugEventListener