#include <TreeParser.hpp>
◆ TreeParser() [1/3]
TreeParser::TreeParser |
( |
| ) |
|
|
inline |
◆ TreeParser() [2/3]
◆ ~TreeParser()
virtual TreeParser::~TreeParser |
( |
| ) |
|
|
inlinevirtual |
◆ TreeParser() [3/3]
TreeParser::TreeParser |
( |
const TreeParser & |
other | ) |
|
|
private |
◆ getAST()
virtual RefAST TreeParser::getAST |
( |
| ) |
|
|
pure virtual |
Get the AST return value squirreled away in the parser.
◆ getASTFactory()
virtual ASTFactory* TreeParser::getASTFactory |
( |
| ) |
const |
|
inlinevirtual |
◆ getNumTokens()
virtual int TreeParser::getNumTokens |
( |
| ) |
const |
|
pure virtual |
Return the number of tokens defined.
◆ getTokenName()
virtual const char* TreeParser::getTokenName |
( |
int |
num | ) |
const |
|
pure virtual |
Get the name for token 'num'.
◆ getTokenNames()
virtual const char* const* TreeParser::getTokenNames |
( |
| ) |
const |
|
pure virtual |
◆ match() [1/2]
virtual void TreeParser::match |
( |
RefAST |
t, |
|
|
const BitSet & |
b |
|
) |
| |
|
inlinevirtual |
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.
◆ match() [2/2]
virtual void TreeParser::match |
( |
RefAST |
t, |
|
|
int |
ttype |
|
) |
| |
|
inlineprotectedvirtual |
◆ matchNot()
virtual void TreeParser::matchNot |
( |
RefAST |
t, |
|
|
int |
ttype |
|
) |
| |
|
inlineprotectedvirtual |
◆ operator=()
◆ reportError() [1/2]
Parser error-reporting function can be overridden in subclass.
Parser error-reporting function can be overridden in subclass
◆ reportError() [2/2]
void 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
◆ reportWarning()
void 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
◆ setASTFactory()
virtual void TreeParser::setASTFactory |
( |
ASTFactory * |
factory | ) |
|
|
inlinevirtual |
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()
◆ traceIn()
void TreeParser::traceIn |
( |
const char * |
rname, |
|
|
RefAST |
t |
|
) |
| |
|
virtual |
◆ traceIndent()
void TreeParser::traceIndent |
( |
| ) |
|
|
virtual |
These are used during when traceTreeParser commandline option is passed.
Procedure to write out an indent for traceIn and traceOut
◆ traceOut()
void TreeParser::traceOut |
( |
const char * |
rname, |
|
|
RefAST |
t |
|
) |
| |
|
virtual |
◆ astFactory
AST support code; parser and treeparser delegate to this object
◆ ASTNULL
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.
◆ inputState
The input state of this tree parser.
◆ traceDepth
int TreeParser::traceDepth |
|
protected |
Used to keep track of indent depth with -traceTreeParser
The documentation for this class was generated from the following files: