1#ifndef INC_BaseAST_hpp__
2#define INC_BaseAST_hpp__
16#ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
37 virtual const char*
typeName(
void )
const = 0;
97 virtual size_t getNumberOfChildren()
const;
149#ifdef ANTLR_SUPPORT_XML
189#ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
ASTRefCount< AST > RefAST
Definition ASTRefCount.hpp:92
RefAST nullAST
Definition BaseAST.cpp:271
ASTRefCount< BaseAST > RefBaseAST
Definition BaseAST.hpp:21
Definition ASTRefCount.hpp:44
virtual int getType() const =0
Get the token type for this node.
virtual std::string getText() const =0
Get the token text for this node.
AST()
Definition AST.hpp:25
virtual bool equalsTreePartial(RefAST t) const
Definition BaseAST.cpp:143
virtual void setNextSibling(RefAST n)
Set the next sibling after this one.
Definition BaseAST.hpp:134
virtual std ::vector< RefAST > findAll(RefAST t)
Definition BaseAST.cpp:164
virtual RefAST clone(void) const =0
Clone this AST node.
virtual void removeChildren()
Remove all children.
Definition BaseAST.hpp:122
virtual void addChild(RefAST c)
Add a node to the end of the child list for this node.
Definition BaseAST.hpp:77
virtual void setFirstChild(RefAST c)
Set the first child of a node.
Definition BaseAST.hpp:128
virtual std::string getText() const
Get the token text for this node.
Definition BaseAST.hpp:111
RefBaseAST down
Definition BaseAST.hpp:172
virtual bool equalsTree(RefAST t) const
Definition BaseAST.cpp:123
virtual ~BaseAST()
Definition BaseAST.hpp:32
RefBaseAST right
Definition BaseAST.hpp:173
virtual std::string toString() const
Return string representation for the AST.
Definition BaseAST.hpp:163
virtual std ::vector< RefAST > findAllPartial(RefAST t)
Definition BaseAST.cpp:180
virtual int getType() const
Get the token type for this node.
Definition BaseAST.hpp:116
virtual RefAST getNextSibling() const
Get the next sibling in line after this one.
Definition BaseAST.hpp:105
virtual void setText(const std ::string &txt)
Set the token text for this node.
Definition BaseAST.hpp:140
BaseAST(const BaseAST &other)
Definition BaseAST.hpp:28
virtual const char * typeName(void) const =0
Return the class name.
virtual bool equalsList(RefAST t) const
Definition BaseAST.cpp:60
virtual void setType(int type)
Set the token type for this node.
Definition BaseAST.hpp:145
BaseAST()
Definition BaseAST.hpp:25
virtual bool equalsListPartial(RefAST t) const
Definition BaseAST.cpp:93
void doWorkForFindAll(std ::vector< RefAST > &v, RefAST target, bool partialMatch)
Definition BaseAST.cpp:37
virtual RefAST getFirstChild() const
Get the first child of this node; null if no children.
Definition BaseAST.hpp:100
virtual bool equals(RefAST t) const
Is node t equal to this in terms of token type and text?
Definition BaseAST.hpp:182
#define ANTLR_USE_NAMESPACE(_x_)
Definition config.hpp:18
#define ANTLR_API
Definition config.hpp:22
Definition ANTLRException.hpp:15