getAST
public AST getAST()
Get the AST return value squirreled away in the parser
getTokenName
public String getTokenName(int num)
getTokenNames
public String[] getTokenNames()
match
public void match(AST t,
BitSet b)
throws MismatchedTokenException
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.
panic
public static void panic()
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.
reportError
public void reportError(String s)
Parser error-reporting function can be overridden in subclass
reportError
public void reportError(RecognitionException ex)
Parser error-reporting function can be overridden in subclass
reportWarning
public void reportWarning(String s)
Parser warning-reporting function can be overridden in subclass
setASTFactory
public void setASTFactory(ASTFactory f)
Specify an object with support code (shared by
Parser and TreeParser. Normally, the programmer
does not play with this, using setASTNodeType instead.
setASTNodeClass
public void setASTNodeClass(String nodeType)
Specify the type of node to create during tree building
setASTNodeType
public void setASTNodeType(String nodeType)
since 2.7.2
Specify the type of node to create during tree building.
traceIn
public void traceIn(String rname,
AST t)
traceIndent
public void traceIndent()
traceOut
public void traceOut(String rname,
AST t)