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.BlankDebugEventListenerA 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 voidconsumeHiddenToken(org.antlr.runtime.Token token)Hidden tokens are tokens that are not processed at lexical processing stage.voidconsumeToken(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.voidenterDecision(int d)voidexitDecision(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:
enterDecisionin interfaceorg.antlr.runtime.debug.DebugEventListener- Overrides:
enterDecisionin classorg.antlr.runtime.debug.BlankDebugEventListener
-
exitDecision
public void exitDecision(int i)
- Specified by:
exitDecisionin interfaceorg.antlr.runtime.debug.DebugEventListener- Overrides:
exitDecisionin 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:
consumeTokenin interfaceorg.antlr.runtime.debug.DebugEventListener- Overrides:
consumeTokenin 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:
consumeHiddenTokenin interfaceorg.antlr.runtime.debug.DebugEventListener- Overrides:
consumeHiddenTokenin classorg.antlr.runtime.debug.BlankDebugEventListener
-
-