|
||||||||||
| 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.TraceDebugEventListener
public class TraceDebugEventListener
Print out (most of) the events... Useful for debugging, testing...
| Field Summary |
|---|
| Fields inherited from interface org.antlr.runtime.debug.DebugEventListener |
|---|
FALSE, PROTOCOL_VERSION, TRUE |
| Constructor Summary | |
|---|---|
TraceDebugEventListener(TreeAdaptor adaptor)
|
|
| Method Summary | |
|---|---|
void |
addChild(Object root,
Object child)
Make childID a child of rootID. |
void |
becomeRoot(Object newRoot,
Object oldRoot)
Make a node the new root of an existing root. |
void |
consumeNode(Object t)
Input for a tree parser is an AST, but we know nothing for sure about a node except its type and text (obtained from the adaptor). |
void |
createNode(Object t)
Announce a new node built from token elements such as type etc... |
void |
createNode(Object node,
Token token)
Announce a new node built from an existing token. |
void |
enterRule(String ruleName)
|
void |
enterSubRule(int decisionNumber)
Track entry into any (...) subrule other EBNF construct |
void |
exitRule(String ruleName)
|
void |
exitSubRule(int decisionNumber)
|
void |
location(int line,
int pos)
To watch a parser move through the grammar, the parser needs to inform the debugger what line/charPos it is passing in the grammar. |
void |
LT(int i,
Object t)
The tree parser lookedahead. |
void |
nilNode(Object t)
A nil was created (even nil nodes have a unique ID... |
void |
setTokenBoundaries(Object t,
int tokenStartIndex,
int tokenStopIndex)
Set the token start/stop token index for a subtree root or node. |
| Methods inherited from class org.antlr.runtime.debug.BlankDebugEventListener |
|---|
beginBacktrack, beginResync, commence, consumeHiddenToken, consumeToken, endBacktrack, endResync, enterAlt, enterDecision, enterRule, errorNode, exitDecision, exitRule, LT, mark, recognitionException, rewind, rewind, semanticPredicate, terminate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TraceDebugEventListener(TreeAdaptor adaptor)
| Method Detail |
|---|
public void enterRule(String ruleName)
public void exitRule(String ruleName)
public void enterSubRule(int decisionNumber)
DebugEventListener
enterSubRule in interface DebugEventListenerenterSubRule in class BlankDebugEventListenerpublic void exitSubRule(int decisionNumber)
exitSubRule in interface DebugEventListenerexitSubRule in class BlankDebugEventListener
public void location(int line,
int pos)
DebugEventListener
location in interface DebugEventListenerlocation in class BlankDebugEventListenerpublic void consumeNode(Object t)
DebugEventListener
consumeNode in interface DebugEventListenerconsumeNode in class BlankDebugEventListener
public void LT(int i,
Object t)
DebugEventListener
LT in interface DebugEventListenerLT in class BlankDebugEventListenerpublic void nilNode(Object t)
DebugEventListener
nilNode in interface DebugEventListenernilNode in class BlankDebugEventListenerpublic void createNode(Object t)
DebugEventListener
createNode in interface DebugEventListenercreateNode in class BlankDebugEventListener
public void createNode(Object node,
Token token)
DebugEventListener
createNode in interface DebugEventListenercreateNode in class BlankDebugEventListener
public void becomeRoot(Object newRoot,
Object oldRoot)
DebugEventListener
becomeRoot in interface DebugEventListenerbecomeRoot in class BlankDebugEventListenerorg.antlr.runtime.tree.TreeAdaptor.becomeRoot()
public void addChild(Object root,
Object child)
DebugEventListener
addChild in interface DebugEventListeneraddChild in class BlankDebugEventListenerorg.antlr.runtime.tree.TreeAdaptor.addChild()
public void setTokenBoundaries(Object t,
int tokenStartIndex,
int tokenStopIndex)
DebugEventListener
setTokenBoundaries in interface DebugEventListenersetTokenBoundaries in class BlankDebugEventListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||