java.lang.Objectantlr.Parser
antlr.LLkParser
antlr.debug.ParseTreeDebugParser
Override the standard matching and rule entry/exit routines to build parse trees. This class is useful for 2.7.3 where you can specify a superclass like class TinyCParser extends Parser(ParseTreeDebugParser);
| Constructor Summary | |
ParseTreeDebugParser(int k_)
|
|
ParseTreeDebugParser(ParserSharedInputState state,
int k_)
|
|
ParseTreeDebugParser(TokenBuffer tokenBuf,
int k_)
|
|
ParseTreeDebugParser(TokenStream lexer,
int k_)
|
|
| Method Summary | |
int |
getNumberOfDerivationSteps()
|
ParseTree |
getParseTree()
|
void |
match(BitSet bitSet)
Make sure current lookahead symbol matches the given set Throw an exception upon mismatch, which is catch by either the error handler or by the syntactic predicate. |
void |
match(int i)
Make sure current lookahead symbol matches token type t. |
void |
matchNot(int i)
|
void |
traceIn(java.lang.String s)
Create a rule node, add to current tree, and make it current root |
void |
traceOut(java.lang.String s)
Pop current root; back to adding to old root |
| Methods inherited from class antlr.LLkParser |
consume, LA, LT |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ParseTreeDebugParser(int k_)
public ParseTreeDebugParser(ParserSharedInputState state,
int k_)
public ParseTreeDebugParser(TokenBuffer tokenBuf,
int k_)
public ParseTreeDebugParser(TokenStream lexer,
int k_)
| Method Detail |
public ParseTree getParseTree()
public int getNumberOfDerivationSteps()
public void match(int i)
throws MismatchedTokenException,
TokenStreamException
Parser
match in class ParserMismatchedTokenException
TokenStreamException
public void match(BitSet bitSet)
throws MismatchedTokenException,
TokenStreamException
Parser
match in class ParserMismatchedTokenException
TokenStreamException
public void matchNot(int i)
throws MismatchedTokenException,
TokenStreamException
matchNot in class ParserMismatchedTokenException
TokenStreamException
public void traceIn(java.lang.String s)
throws TokenStreamException
traceIn in class LLkParserTokenStreamException
public void traceOut(java.lang.String s)
throws TokenStreamException
traceOut in class LLkParserTokenStreamException