#include <BaseAST.hpp>
Public Member Functions | |
BaseAST () | |
BaseAST (const BaseAST &other) | |
virtual | ~BaseAST () |
virtual const char * | typeName (void) const =0 |
Return the class name. | |
virtual RefAST | clone (void) const =0 |
Clone this AST node. | |
virtual bool | equals (RefAST t) const |
Is node t equal to this in terms of token type and text? | |
virtual bool | equalsList (RefAST t) const |
virtual bool | equalsListPartial (RefAST t) const |
virtual bool | equalsTree (RefAST t) const |
virtual bool | equalsTreePartial (RefAST t) const |
virtual | ANTLR_USE_NAMESPACE (std) vector< RefAST > findAll(RefAST t) |
virtual | ANTLR_USE_NAMESPACE (std) vector< RefAST > findAllPartial(RefAST t) |
virtual void | addChild (RefAST c) |
Add a node to the end of the child list for this node. | |
virtual size_t | getNumberOfChildren () const |
virtual RefAST | getFirstChild () const |
Get the first child of this node; null if no children. | |
virtual RefAST | getNextSibling () const |
Get the next sibling in line after this one. | |
virtual | ANTLR_USE_NAMESPACE (std) string getText() const |
Get the token text for this node. | |
virtual int | getType () const |
Get the token type for this node. | |
virtual void | removeChildren () |
Remove all children. | |
virtual void | setFirstChild (RefAST c) |
Set the first child of a node. | |
virtual void | setNextSibling (RefAST n) |
Set the next sibling after this one. | |
virtual void | setText (const ANTLR_USE_NAMESPACE(std) string &txt) |
Set the token text for this node. | |
virtual void | setType (int type) |
Set the token type for this node. | |
virtual | ANTLR_USE_NAMESPACE (std) string toString() const |
Return string representation for the AST. | |
virtual | ANTLR_USE_NAMESPACE (std) string toStringList() const |
Print out a child sibling tree in LISP notation. | |
virtual | ANTLR_USE_NAMESPACE (std) string toStringTree() const |
Get the token text for this node. | |
Protected Attributes | |
RefBaseAST | down |
RefBaseAST | right |
Private Member Functions | |
void | doWorkForFindAll (ANTLR_USE_NAMESPACE(std) vector< RefAST > &v, RefAST target, bool partialMatch) |
Definition at line 23 of file BaseAST.hpp.
BaseAST::BaseAST | ( | ) | [inline] |
Definition at line 25 of file BaseAST.hpp.
BaseAST::BaseAST | ( | const BaseAST & | other | ) | [inline] |
Definition at line 28 of file BaseAST.hpp.
virtual BaseAST::~BaseAST | ( | ) | [inline, virtual] |
Definition at line 32 of file BaseAST.hpp.
virtual const char* BaseAST::typeName | ( | void | ) | const [pure virtual] |
virtual RefAST BaseAST::clone | ( | void | ) | const [pure virtual] |
bool BaseAST::equals | ( | RefAST | t | ) | const [inline, virtual] |
Is node t equal to this in terms of token type and text?
Is node t equal to this in terms of token type and text?
Implements AST.
Definition at line 182 of file BaseAST.hpp.
virtual bool BaseAST::equalsList | ( | RefAST | t | ) | const [virtual] |
virtual bool BaseAST::equalsListPartial | ( | RefAST | t | ) | const [virtual] |
virtual bool BaseAST::equalsTree | ( | RefAST | t | ) | const [virtual] |
Is tree rooted at 'this' equal to 't'? The siblings of 'this' are ignored.
Implements AST.
virtual bool BaseAST::equalsTreePartial | ( | RefAST | t | ) | const [virtual] |
Is 't' a subtree of the tree rooted at 'this'? The siblings of 'this' are ignored.
Implements AST.
virtual BaseAST::ANTLR_USE_NAMESPACE | ( | std | ) | [virtual] |
virtual BaseAST::ANTLR_USE_NAMESPACE | ( | std | ) | [virtual] |
virtual void BaseAST::addChild | ( | RefAST | c | ) | [inline, virtual] |
Add a node to the end of the child list for this node.
Implements AST.
Definition at line 77 of file BaseAST.hpp.
virtual size_t BaseAST::getNumberOfChildren | ( | ) | const [virtual] |
Get the number of child nodes of this node (shallow e.g. not of the whole tree it spans).
Implements AST.
virtual RefAST BaseAST::getFirstChild | ( | ) | const [inline, virtual] |
Get the first child of this node; null if no children.
Implements AST.
Definition at line 100 of file BaseAST.hpp.
virtual RefAST BaseAST::getNextSibling | ( | ) | const [inline, virtual] |
Get the next sibling in line after this one.
Implements AST.
Definition at line 105 of file BaseAST.hpp.
virtual BaseAST::ANTLR_USE_NAMESPACE | ( | std | ) | const [inline, virtual] |
Get the token text for this node.
Implements AST.
Reimplemented in CommonAST.
Definition at line 111 of file BaseAST.hpp.
virtual int BaseAST::getType | ( | ) | const [inline, virtual] |
Get the token type for this node.
Implements AST.
Reimplemented in CommonAST.
Definition at line 116 of file BaseAST.hpp.
virtual void BaseAST::removeChildren | ( | ) | [inline, virtual] |
virtual void BaseAST::setFirstChild | ( | RefAST | c | ) | [inline, virtual] |
virtual void BaseAST::setNextSibling | ( | RefAST | n | ) | [inline, virtual] |
virtual void BaseAST::setText | ( | const ANTLR_USE_NAMESPACE(std) string & | txt | ) | [inline, virtual] |
Set the token text for this node.
Implements AST.
Reimplemented in CommonAST.
Definition at line 140 of file BaseAST.hpp.
virtual void BaseAST::setType | ( | int | type | ) | [inline, virtual] |
Set the token type for this node.
Implements AST.
Reimplemented in CommonAST.
Definition at line 145 of file BaseAST.hpp.
virtual BaseAST::ANTLR_USE_NAMESPACE | ( | std | ) | const [inline, virtual] |
Return string representation for the AST.
Implements AST.
Reimplemented in CommonAST.
Definition at line 163 of file BaseAST.hpp.
virtual BaseAST::ANTLR_USE_NAMESPACE | ( | std | ) | const [virtual] |
virtual BaseAST::ANTLR_USE_NAMESPACE | ( | std | ) | const [virtual] |
void BaseAST::doWorkForFindAll | ( | ANTLR_USE_NAMESPACE(std) vector< RefAST > & | v, | |
RefAST | target, | |||
bool | partialMatch | |||
) | [private] |
RefBaseAST BaseAST::down [protected] |
Definition at line 172 of file BaseAST.hpp.
RefBaseAST BaseAST::right [protected] |
Definition at line 173 of file BaseAST.hpp.