antlr.debug
public class ParseTreeDebugParser extends LLkParser
| Field Summary | |
|---|---|
| protected Stack | currentParseTreeRoot Each new rule invocation must have it's own subtree. |
| protected ParseTreeRule | mostRecentParseTreeRoot Track most recently created parse subtree so that when parsing
is finished, we can get to the root. |
| protected int | numberOfDerivationSteps For every rule replacement with a production, we bump up count. |
| Constructor Summary | |
|---|---|
| ParseTreeDebugParser(int k_) | |
| ParseTreeDebugParser(ParserSharedInputState state, int k_) | |
| ParseTreeDebugParser(TokenBuffer tokenBuf, int k_) | |
| ParseTreeDebugParser(TokenStream lexer, int k_) | |
| Method Summary | |
|---|---|
| protected void | addCurrentTokenToParseTree() This adds LT(1) to the current parse subtree. |
| int | getNumberOfDerivationSteps() |
| ParseTree | getParseTree() |
| void | match(int i) |
| void | match(BitSet bitSet) |
| void | matchNot(int i) |
| void | traceIn(String s) Create a rule node, add to current tree, and make it current root |
| void | traceOut(String s) Pop current root; back to adding to old root |