Package openbook.tools.converter
Class ParseTokenListener
- java.lang.Object
-
- org.antlr.runtime.debug.BlankDebugEventListener
-
- openbook.tools.converter.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
-
-
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
-
-
-
-
Method Detail
-
enterDecision
public void enterDecision(int d)
- Specified by:
enterDecision
in interfaceorg.antlr.runtime.debug.DebugEventListener
- Overrides:
enterDecision
in classorg.antlr.runtime.debug.BlankDebugEventListener
-
exitDecision
public void exitDecision(int i)
- Specified by:
exitDecision
in interfaceorg.antlr.runtime.debug.DebugEventListener
- Overrides:
exitDecision
in classorg.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 interfaceorg.antlr.runtime.debug.DebugEventListener
- Overrides:
consumeToken
in classorg.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 interfaceorg.antlr.runtime.debug.DebugEventListener
- Overrides:
consumeHiddenToken
in classorg.antlr.runtime.debug.BlankDebugEventListener
-
-