public class ParseTreeBuilder extends BlankDebugEventListener
Modifier and Type | Field and Description |
---|---|
static String |
EPSILON_PAYLOAD |
FALSE, PROTOCOL_VERSION, TRUE
Constructor and Description |
---|
ParseTreeBuilder(String grammarName) |
Modifier and Type | Method and Description |
---|---|
void |
consumeHiddenToken(Token token)
An off-channel input token was consumed.
|
void |
consumeToken(Token token)
An input token was consumed; matched by any kind of element.
|
ParseTree |
create(Object payload)
What kind of node to create.
|
void |
enterDecision(int d)
Backtracking or cyclic DFA, don't want to add nodes to tree
|
void |
enterRule(String filename,
String ruleName)
The parser has just entered a rule.
|
ParseTree |
epsilonNode() |
void |
exitDecision(int i) |
void |
exitRule(String filename,
String ruleName)
This is the last thing executed before leaving a rule.
|
ParseTree |
getTree() |
void |
recognitionException(RecognitionException e)
A recognition exception occurred such as NoViableAltException.
|
addChild, becomeRoot, beginBacktrack, beginResync, commence, consumeNode, createNode, createNode, endBacktrack, endResync, enterAlt, enterSubRule, errorNode, exitSubRule, location, LT, LT, mark, nilNode, rewind, rewind, semanticPredicate, setTokenBoundaries, terminate
public static final String EPSILON_PAYLOAD
public ParseTreeBuilder(String grammarName)
public ParseTree getTree()
public ParseTree create(Object payload)
public ParseTree epsilonNode()
public void enterDecision(int d)
enterDecision
in interface DebugEventListener
enterDecision
in class BlankDebugEventListener
public void exitDecision(int i)
exitDecision
in interface DebugEventListener
exitDecision
in class BlankDebugEventListener
public void enterRule(String filename, String ruleName)
DebugEventListener
enterRule
in interface DebugEventListener
enterRule
in class BlankDebugEventListener
public void exitRule(String filename, String ruleName)
DebugEventListener
exitRule
in interface DebugEventListener
exitRule
in class BlankDebugEventListener
public void consumeToken(Token token)
DebugEventListener
consumeToken
in interface DebugEventListener
consumeToken
in class BlankDebugEventListener
public void consumeHiddenToken(Token token)
DebugEventListener
consumeHiddenToken
in interface DebugEventListener
consumeHiddenToken
in class BlankDebugEventListener
public void recognitionException(RecognitionException e)
DebugEventListener
recognitionException
in interface DebugEventListener
recognitionException
in class BlankDebugEventListener
Copyright © 2020. All rights reserved.