ANTLR Support Libraries 2.7.1+
|
Go to the documentation of this file. 1 #ifndef INC_TreeParser_hpp__
2 #define INC_TreeParser_hpp__
19 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
87 virtual void traceIndent();
88 virtual void traceIn(
const char* rname,
RefAST t);
89 virtual void traceOut(
const char* rname,
RefAST t);
101 if (!t || t == ASTNULL || t->
getType() != ttype )
108 if ( !t || t == ASTNULL || t->
getType() == ttype )
132 : parser(p), text(t), tree(a)
151 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
155 #endif //INC_TreeParser_hpp__
virtual void setASTFactory(ASTFactory *factory)
Definition: TreeParser.hpp:63
bool member(unsigned int el) const
Definition: BitSet.cpp:40
virtual void match(RefAST t, const BitSet &b)
Definition: TreeParser.hpp:50
virtual void traceOut(const char *rname, RefAST t)
Definition: TreeParser.cpp:58
int traceDepth
Definition: TreeParser.hpp:120
TreeParser * parser
Definition: TreeParser.hpp:127
ASTFactory * astFactory
Definition: TreeParser.hpp:114
Definition: RecognitionException.hpp:19
Definition: TreeParser.hpp:125
virtual ~TreeParser()
Definition: TreeParser.hpp:39
TreeParser(const TreeParserSharedInputState &state)
Definition: TreeParser.hpp:32
const char * text
Definition: TreeParser.hpp:128
virtual const char * getTokenName(int num) const =0
Get the name for token 'num'.
static RefAST ASTNULL
Definition: TreeParser.hpp:96
virtual int getNumTokens() const =0
Return the number of tokens defined.
Definition: ASTFactory.hpp:36
Definition: TreeParser.hpp:23
virtual const char *const * getTokenNames() const =0
Return an array of getNumTokens() token names.
TreeParserSharedInputState inputState
The input state of this tree parser.
Definition: TreeParser.hpp:117
Definition: BitSet.hpp:40
TreeParser()
Definition: TreeParser.hpp:25
~Tracer()
Definition: TreeParser.hpp:136
virtual int getType() const =0
Get the token type for this node.
TreeParser & operator=(const TreeParser &other)
Tracer(TreeParser *p, const char *t, RefAST a)
Definition: TreeParser.hpp:131
virtual void matchNot(RefAST t, int ttype)
Definition: TreeParser.hpp:106
RefAST tree
Definition: TreeParser.hpp:129
virtual void traceIn(const char *rname, RefAST t)
Definition: TreeParser.cpp:47
virtual ASTFactory * getASTFactory() const
Return pointer to ASTFactory.
Definition: TreeParser.hpp:68
TreeParser(const TreeParser &other)
Definition: MismatchedTokenException.hpp:22
virtual void match(RefAST t, int ttype)
Definition: TreeParser.hpp:99
virtual RefAST getAST()=0
Get the AST return value squirreled away in the parser.
#define ANTLR_API
Definition: config.hpp:22
Definition: ANTLRException.hpp:15
const Tracer & operator=(const Tracer &)
#define ANTLR_USE_NAMESPACE(_x_)
Definition: config.hpp:18