1 #ifndef INC_TreeParser_hpp__ 2 #define INC_TreeParser_hpp__ 19 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE 44 virtual RefAST getAST() = 0;
73 virtual const char* getTokenName(
int num)
const = 0;
75 virtual int getNumTokens()
const = 0;
77 virtual const char*
const* getTokenNames()
const = 0;
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__ TreeParser(const TreeParserSharedInputState &state)
Definition: TreeParser.hpp:32
Definition: ANTLRException.hpp:15
virtual void match(RefAST t, int ttype)
Definition: TreeParser.hpp:99
virtual void setASTFactory(ASTFactory *factory)
Definition: TreeParser.hpp:63
static RefAST ASTNULL
Definition: TreeParser.hpp:96
virtual void traceIn(const char *rname, RefAST t)
Definition: TreeParser.cpp:47
virtual int getType() const =0
Get the token type for this node.
#define ANTLR_API
Definition: config.hpp:22
const char * text
Definition: TreeParser.hpp:128
virtual void matchNot(RefAST t, int ttype)
Definition: TreeParser.hpp:106
int traceDepth
Definition: TreeParser.hpp:120
RefAST tree
Definition: TreeParser.hpp:129
TreeParserSharedInputState inputState
The input state of this tree parser.
Definition: TreeParser.hpp:117
virtual ASTFactory * getASTFactory() const
Return pointer to ASTFactory.
Definition: TreeParser.hpp:68
Definition: ASTFactory.hpp:36
Definition: BitSet.hpp:40
Tracer(TreeParser *p, const char *t, RefAST a)
Definition: TreeParser.hpp:131
bool member(unsigned int el) const
Definition: BitSet.cpp:40
Definition: TreeParser.hpp:125
TreeParser * parser
Definition: TreeParser.hpp:127
Definition: RecognitionException.hpp:18
Definition: MismatchedTokenException.hpp:22
~Tracer()
Definition: TreeParser.hpp:136
#define ANTLR_USE_NAMESPACE(_x_)
Definition: config.hpp:18
TreeParser()
Definition: TreeParser.hpp:25
Definition: TreeParser.hpp:23
virtual void traceOut(const char *rname, RefAST t)
Definition: TreeParser.cpp:58
ASTFactory * astFactory
Definition: TreeParser.hpp:114
virtual void match(RefAST t, const BitSet &b)
Definition: TreeParser.hpp:50
virtual ~TreeParser()
Definition: TreeParser.hpp:39