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
AST *const nullASTptr
Definition: BaseAST.cpp:276
RefAST nullAST
Definition: BaseAST.cpp:271
virtual std::string toStringTree() const =0
AST & operator=(RefAST other)
ASTRef * ref
Definition: AST.hpp:135
virtual std::string toStringList() const =0
Print out a child-sibling tree in LISP notation.
virtual std ::vector< RefAST > findAllPartial(RefAST t)=0
virtual bool equals(RefAST t) const =0
Is node t equal to this in terms of token type and text?
virtual std ::vector< RefAST > findAll(RefAST t)=0
virtual bool equalsTree(RefAST t) const =0
virtual void setType(int type)=0
Set the token type for this node.
virtual RefAST clone(void) const =0
Clone this AST node.
virtual void setNextSibling(RefAST n)=0
Set the next sibling after this one.
virtual size_t getNumberOfChildren() const =0
Get the number of children. Returns 0 if the node is a leaf.
AST & operator=(const AST &other)
virtual void initialize(RefAST t)=0
virtual void initialize(RefToken t)=0
virtual bool equalsTreePartial(RefAST t) const =0
virtual int getType() const =0
Get the token type for this node.
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 void addChild(RefAST c)=0
Add a node to the end of the child list for this node.
AST(const AST &)
Definition: AST.hpp:26
virtual std::string getText() const =0
Get the token text for this node.
virtual RefAST getNextSibling() const =0
Get the next sibling in line after this one.
virtual bool equalsList(RefAST t) const =0
virtual bool equalsListPartial(RefAST t) const =0
virtual std::string toString() const =0
Return this AST node as a string.
virtual void initialize(int t, const std ::string &txt)=0
virtual void setFirstChild(RefAST c)=0
Set the first child of a node.
virtual const char * typeName(void) const =0
Return the type name for this AST node. (for XML output)
AST()
Definition: AST.hpp:25
#define ANTLR_USE_NAMESPACE(_x_)
Definition: config.hpp:18
#define ANTLR_API
Definition: config.hpp:22
Definition: ANTLRException.hpp:15
Definition: ASTRefCount.hpp:20