ANTLR Support Libraries 2.7.1+
|
Go to the documentation of this file.
17 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
30 virtual const char*
typeName(
void )
const = 0;
86 #ifdef ANTLR_SUPPORT_XML
110 #ifdef ANTLR_SUPPORT_XML
142 #ifdef ANTLR_SUPPORT_XML
145 ast->toStream(output);
153 #ifdef NEEDS_OPERATOR_LESS_THAN
162 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
166 #endif //INC_AST_hpp__
virtual bool equals(RefAST t) const =0
Is node t equal to this in terms of token type and text?
virtual RefAST clone(void) const =0
Clone this AST node.
virtual std ::string toStringTree() const =0
AST & operator=(RefAST other)
virtual size_t getNumberOfChildren() const =0
Get the number of children. Returns 0 if the node is a leaf.
virtual const char * typeName(void) const =0
Return the type name for this AST node. (for XML output)
virtual void initialize(RefToken t)=0
AST & operator=(const AST &other)
virtual ~AST()
Definition: AST.hpp:27
virtual RefAST getFirstChild() const =0
Get the first child of this node; null if no children.
virtual void setText(const std ::string &txt)=0
Set the token text for this node.
virtual std ::string getText() const =0
Get the token text for this node.
virtual std ::string toString() const =0
Return this AST node as a string.
virtual RefAST getNextSibling() const =0
Get the next sibling in line after this one.
virtual std ::string toStringList() const =0
Print out a child-sibling tree in LISP notation.
Definition: ASTRefCount.hpp:20
virtual bool equalsTreePartial(RefAST t) const =0
AST(const AST &)
Definition: AST.hpp:26
virtual bool equalsListPartial(RefAST t) const =0
AST()
Definition: AST.hpp:25
virtual void addChild(RefAST c)=0
Add a node to the end of the child list for this node.
virtual int getType() const =0
Get the token type for this node.
virtual bool equalsTree(RefAST t) const =0
AST *const nullASTptr
Definition: BaseAST.cpp:276
RefAST nullAST
Definition: BaseAST.cpp:271
virtual void setFirstChild(RefAST c)=0
Set the first child of a node.
virtual void initialize(int t, const std ::string &txt)=0
virtual void setType(int type)=0
Set the token type for this node.
virtual std ::vector< RefAST > findAllPartial(RefAST t)=0
virtual std ::vector< RefAST > findAll(RefAST t)=0
virtual void setNextSibling(RefAST n)=0
Set the next sibling after this one.
virtual void initialize(RefAST t)=0
ASTRef * ref
Definition: AST.hpp:135
virtual bool equalsList(RefAST t) const =0
#define ANTLR_API
Definition: config.hpp:22
Definition: ANTLRException.hpp:15
#define ANTLR_USE_NAMESPACE(_x_)
Definition: config.hpp:18