java.lang.Objectantlr.TreeParser
Field Summary | |
static ASTNULLType |
ASTNULL
The AST Null object; the parsing cursor is set to this when it is found to be null. |
Constructor Summary | |
TreeParser()
|
Method Summary | |
AST |
getAST()
Get the AST return value squirreled away in the parser |
ASTFactory |
getASTFactory()
|
java.lang.String |
getTokenName(int num)
|
java.lang.String[] |
getTokenNames()
|
void |
match(AST t,
BitSet b)
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. |
static void |
panic()
Deprecated. as of 2.7.2. This method calls System.exit() and writes directly to stderr, which is usually not appropriate when a parser is embedded into a larger application. Since the method is static , it cannot be overridden to avoid these problems.
ANTLR no longer uses this method internally or in generated code. |
void |
reportError(RecognitionException ex)
Parser error-reporting function can be overridden in subclass |
void |
reportError(java.lang.String s)
Parser error-reporting function can be overridden in subclass |
void |
reportWarning(java.lang.String s)
Parser warning-reporting function can be overridden in subclass |
void |
setASTFactory(ASTFactory f)
Specify an object with support code (shared by Parser and TreeParser. |
void |
setASTNodeClass(java.lang.String nodeType)
Specify the type of node to create during tree building |
void |
setASTNodeType(java.lang.String nodeType)
Deprecated. since 2.7.2 |
void |
traceIn(java.lang.String rname,
AST t)
|
void |
traceIndent()
|
void |
traceOut(java.lang.String rname,
AST t)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static ASTNULLType ASTNULL
Constructor Detail |
public TreeParser()
Method Detail |
public AST getAST()
public ASTFactory getASTFactory()
public java.lang.String getTokenName(int num)
public java.lang.String[] getTokenNames()
public void match(AST t, BitSet b) throws MismatchedTokenException
MismatchedTokenException
public static void panic()
static
, it cannot be overridden to avoid these problems.
ANTLR no longer uses this method internally or in generated code.
public void reportError(RecognitionException ex)
public void reportError(java.lang.String s)
public void reportWarning(java.lang.String s)
public void setASTFactory(ASTFactory f)
public void setASTNodeType(java.lang.String nodeType)
public void setASTNodeClass(java.lang.String nodeType)
public void traceIndent()
public void traceIn(java.lang.String rname, AST t)
public void traceOut(java.lang.String rname, AST t)