antlr::TreeParser Class Reference
#include <TreeParser.hpp>
List of all members.
Constructor & Destructor Documentation
antlr::TreeParser::TreeParser |
( |
|
) |
[inline] |
virtual antlr::TreeParser::~TreeParser |
( |
|
) |
[inline, virtual] |
antlr::TreeParser::TreeParser |
( |
const TreeParser & |
other |
) |
[private] |
Member Function Documentation
virtual RefAST antlr::TreeParser::getAST |
( |
|
) |
[pure virtual] |
Get the AST return value squirreled away in the parser.
virtual ASTFactory* antlr::TreeParser::getASTFactory |
( |
|
) |
const [inline, virtual] |
virtual int antlr::TreeParser::getNumTokens |
( |
|
) |
const [pure virtual] |
Return the number of tokens defined.
virtual const char* antlr::TreeParser::getTokenName |
( |
int |
num |
) |
const [pure virtual] |
Get the name for token 'num'.
virtual const char* const* antlr::TreeParser::getTokenNames |
( |
|
) |
const [pure virtual] |
virtual void antlr::TreeParser::match |
( |
RefAST |
t, |
|
|
int |
ttype | |
|
) |
| | [inline, protected, virtual] |
virtual void antlr::TreeParser::match |
( |
RefAST |
t, |
|
|
const BitSet & |
b | |
|
) |
| | [inline, virtual] |
Make sure current lookahead symbol matches the given set Throw an exception upon mismatch, which is caught by either the error handler or by a syntactic predicate.
virtual void antlr::TreeParser::matchNot |
( |
RefAST |
t, |
|
|
int |
ttype | |
|
) |
| | [inline, protected, virtual] |
void antlr::TreeParser::reportError |
( |
const std::string & |
s |
) |
[virtual] |
Parser error-reporting function can be overridden in subclass.
Parser error-reporting function can be overridden in subclass
Parser error-reporting function can be overridden in subclass.
Parser error-reporting function can be overridden in subclass
void antlr::TreeParser::reportWarning |
( |
const std::string & |
s |
) |
[virtual] |
Parser warning-reporting function can be overridden in subclass.
Parser warning-reporting function can be overridden in subclass
virtual void antlr::TreeParser::setASTFactory |
( |
ASTFactory * |
factory |
) |
[inline, virtual] |
Specify the AST factory to be used during tree building. (Compulsory) Setting the factory is compulsory (if you intend to modify the tree in the treeparser). The AST Factory is shared between parser (who builds the initial AST) and treeparser.
- See also:
- Parser::getASTFactory()
void antlr::TreeParser::traceIn |
( |
const char * |
rname, |
|
|
RefAST |
t | |
|
) |
| | [virtual] |
void antlr::TreeParser::traceIndent |
( |
|
) |
[virtual] |
These are used during when traceTreeParser commandline option is passed.
Procedure to write out an indent for traceIn and traceOut
void antlr::TreeParser::traceOut |
( |
const char * |
rname, |
|
|
RefAST |
t | |
|
) |
| | [virtual] |
Member Data Documentation
AST support code; parser and treeparser delegate to this object
The AST Null object; the parsing cursor is set to this when it is found to be null. This way, we can test the token type of a node without having to have tests for 0 everywhere.
The AST Null object; the parsing cursor is set to this when it is found to be null. This way, we can test the token type of a node without having to have tests for null everywhere.
The input state of this tree parser.
Used to keep track of indent depth with -traceTreeParser
The documentation for this class was generated from the following files: