ANTLR Support Libraries 2.7.1+
|
#include <ASTNULLType.hpp>
Public Member Functions | |
const char * | typeName (void) const |
Return the type name for this AST node. (for XML output) | |
RefAST | clone (void) const |
Clone this AST node. | |
void | addChild (RefAST c) |
Add a node to the end of the child list for this node. | |
size_t | getNumberOfChildren () const |
Get the number of children. Returns 0 if the node is a leaf. | |
void | setFirstChild (RefAST c) |
Set the first child of a node. | |
void | setNextSibling (RefAST n) |
Set the next sibling after this one. | |
bool | equals (RefAST t) const |
Is node t equal to this in terms of token type and text? | |
bool | equalsList (RefAST t) const |
bool | equalsListPartial (RefAST t) const |
bool | equalsTree (RefAST t) const |
bool | equalsTreePartial (RefAST t) const |
std ::vector< RefAST > | findAll (RefAST tree) |
std ::vector< RefAST > | findAllPartial (RefAST subtree) |
RefAST | getFirstChild () const |
Get the first child of this node; null if no children. | |
RefAST | getNextSibling () const |
Get the next sibling in line after this one. | |
std::string | getText () const |
Get the token text for this node. | |
int | getType () const |
Get the token type for this node. | |
void | initialize (int t, const std ::string &txt) |
void | initialize (RefAST t) |
void | initialize (RefToken t) |
void | initialize (std ::istream &infile) |
void | setText (const std ::string &text) |
Set the token text for this node. | |
void | setType (int ttype) |
Set the token type for this node. | |
std::string | toString () const |
Return this AST node as a string. | |
std::string | toStringList () const |
Print out a child-sibling tree in LISP notation. | |
std::string | toStringTree () const |
bool | attributesToStream (std ::ostream &out) const |
void | toStream (std ::ostream &out) const |
![]() | |
AST () | |
AST (const AST &) | |
virtual | ~AST () |
virtual const char * | typeName (void) const =0 |
Return the type name for this AST node. (for XML output) | |
virtual RefAST | clone (void) const =0 |
Clone this AST node. | |
virtual bool | equals (RefAST t) const =0 |
Is node t equal to this in terms of token type and text? | |
virtual bool | equalsList (RefAST t) const =0 |
virtual bool | equalsListPartial (RefAST t) const =0 |
virtual bool | equalsTree (RefAST t) const =0 |
virtual bool | equalsTreePartial (RefAST t) const =0 |
virtual std ::vector< RefAST > | findAll (RefAST t)=0 |
virtual std ::vector< RefAST > | findAllPartial (RefAST t)=0 |
virtual void | addChild (RefAST c)=0 |
Add a node to the end of the child list for this node. | |
virtual size_t | getNumberOfChildren () const =0 |
Get the number of children. Returns 0 if the node is a leaf. | |
virtual RefAST | getFirstChild () const =0 |
Get the first child of this node; null if no children. | |
virtual RefAST | getNextSibling () const =0 |
Get the next sibling in line after this one. | |
virtual std::string | getText () const =0 |
Get the token text for this node. | |
virtual int | getType () const =0 |
Get the token type for this node. | |
virtual void | initialize (int t, const std ::string &txt)=0 |
virtual void | initialize (RefAST t)=0 |
virtual void | initialize (RefToken t)=0 |
virtual void | setFirstChild (RefAST c)=0 |
Set the first child of a node. | |
virtual void | setNextSibling (RefAST n)=0 |
Set the next sibling after this one. | |
virtual void | setText (const std ::string &txt)=0 |
Set the token text for this node. | |
virtual void | setType (int type)=0 |
Set the token type for this node. | |
virtual std::string | toString () const =0 |
Return this AST node as a string. | |
virtual std::string | toStringList () const =0 |
Print out a child-sibling tree in LISP notation. | |
virtual std::string | toStringTree () const =0 |
There is only one instance of this class
|
virtual |
Add a node to the end of the child list for this node.
Implements AST.
bool ASTNULLType::attributesToStream | ( | std ::ostream & | out | ) | const |
|
virtual |
Is node t equal to this in terms of token type and text?
Implements AST.
|
virtual |
|
virtual |
Is 't' a subtree of this list? The siblings of the root are NOT ignored.
Implements AST.
|
virtual |
Is tree rooted at 'this' equal to 't'? The siblings of 'this' are ignored.
Implements AST.
|
virtual |
Is 't' a subtree of the tree rooted at 'this'? The siblings of 'this' are ignored.
Implements AST.
Walk the tree looking for all exact subtree matches. Return a vector of RefAST that lets the caller walk the list of subtree roots found herein.
Implements AST.
Walk the tree looking for all subtrees. Return a vector of RefAST that lets the caller walk the list of subtree roots found herein.
Implements AST.
|
virtual |
Get the first child of this node; null if no children.
Implements AST.
|
virtual |
Get the next sibling in line after this one.
Implements AST.
|
virtual |
Get the number of children. Returns 0 if the node is a leaf.
Implements AST.
|
virtual |
Get the token text for this node.
Implements AST.
|
virtual |
Get the token type for this node.
Implements AST.
|
virtual |
void ASTNULLType::initialize | ( | std ::istream & | infile | ) |
|
virtual |
Set the next sibling after this one.
Implements AST.
|
virtual |
Set the token text for this node.
Implements AST.
|
virtual |
Set the token type for this node.
Implements AST.
void ASTNULLType::toStream | ( | std ::ostream & | out | ) | const |
|
virtual |
Print out a child-sibling tree in LISP notation.
Implements AST.
|
virtual |
Implements AST.
|
virtual |