8#include "antlr/config.hpp"
9#include "antlr/AST.hpp"
10#include "antlr/ASTNULLType.hpp"
14ANTLR_USING_NAMESPACE(std)
16#ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
61 return vector<RefAST>();
66 return vector<RefAST>();
86 return Token::NULL_TREE_LOOKAHEAD;
101#ifdef ANTLR_SUPPORT_XML
133string ASTNULLType::toStringTree()
const
138#ifdef ANTLR_SUPPORT_XML
139bool ASTNULLType::attributesToStream( ostream& )
const
144void ASTNULLType::toStream( ostream& out )
const
146 out <<
"</ASTNULL>" << endl;
152 return "ASTNULLType";
155#ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
void addChild(RefAST c)
Add a node to the end of the child list for this node.
std::string toStringList() const
Print out a child-sibling tree in LISP notation.
void setNextSibling(RefAST n)
Set the next sibling after this one.
std ::vector< RefAST > findAll(RefAST tree)
Walk the tree looking for all exact subtree matches.
RefAST getFirstChild() const
Get the first child of this node; null if no children.
std::string toString() const
Return this AST node as a string.
void setText(const std ::string &text)
Set the token text for this node.
RefAST clone(void) const
Clone this AST node.
bool equalsListPartial(RefAST t) const
Is 't' a subtree of this list? The siblings of the root are NOT ignored.
bool equals(RefAST t) const
Is node t equal to this in terms of token type and text?
size_t getNumberOfChildren() const
Get the number of children. Returns 0 if the node is a leaf.
std::string getText() const
Get the token text for this node.
const char * typeName(void) const
Return the type name for this AST node. (for XML output)
void setType(int ttype)
Set the token type for this node.
std ::vector< RefAST > findAllPartial(RefAST subtree)
Walk the tree looking for all subtrees.
RefAST getNextSibling() const
Get the next sibling in line after this one.
void initialize(int t, const std ::string &txt)
Various initialization routines.
bool equalsList(RefAST t) const
Is t an exact structural and equals() match of this tree.
bool equalsTreePartial(RefAST t) const
Is 't' a subtree of the tree rooted at 'this'? The siblings of 'this' are ignored.
void setFirstChild(RefAST c)
Set the first child of a node.
int getType() const
Get the token type for this node.
bool equalsTree(RefAST t) const
Is tree rooted at 'this' equal to 't'? The siblings of 'this' are ignored.