|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.antlr.runtime.debug.BlankDebugEventListener
org.antlr.runtime.debug.ParseTreeBuilder
public class ParseTreeBuilder
This parser listener tracks rule entry/exit and token matches to build a simple parse tree using ParseTree nodes.
| Field Summary | |
|---|---|
static String |
EPSILON_PAYLOAD
|
| Fields inherited from interface org.antlr.runtime.debug.DebugEventListener |
|---|
FALSE, PROTOCOL_VERSION, TRUE |
| Constructor Summary | |
|---|---|
ParseTreeBuilder(String grammarName)
|
|
| Method Summary | |
|---|---|
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,
boolean couldBacktrack)
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. |
| Methods inherited from class org.antlr.runtime.debug.BlankDebugEventListener |
|---|
addChild, becomeRoot, beginBacktrack, beginResync, commence, consumeNode, createNode, createNode, endBacktrack, endResync, enterAlt, enterSubRule, errorNode, exitSubRule, location, LT, LT, mark, nilNode, rewind, rewind, semanticPredicate, setTokenBoundaries, terminate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String EPSILON_PAYLOAD
| Constructor Detail |
|---|
public ParseTreeBuilder(String grammarName)
| Method Detail |
|---|
public ParseTree getTree()
public ParseTree create(Object payload)
public ParseTree epsilonNode()
public void enterDecision(int d,
boolean couldBacktrack)
enterDecision in interface DebugEventListenerenterDecision in class BlankDebugEventListenerpublic void exitDecision(int i)
exitDecision in interface DebugEventListenerexitDecision in class BlankDebugEventListener
public void enterRule(String filename,
String ruleName)
DebugEventListener
enterRule in interface DebugEventListenerenterRule in class BlankDebugEventListener
public void exitRule(String filename,
String ruleName)
DebugEventListener
exitRule in interface DebugEventListenerexitRule in class BlankDebugEventListenerpublic void consumeToken(Token token)
DebugEventListener
consumeToken in interface DebugEventListenerconsumeToken in class BlankDebugEventListenerpublic void consumeHiddenToken(Token token)
DebugEventListener
consumeHiddenToken in interface DebugEventListenerconsumeHiddenToken in class BlankDebugEventListenerpublic void recognitionException(RecognitionException e)
DebugEventListener
recognitionException in interface DebugEventListenerrecognitionException in class BlankDebugEventListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||