ANTLR Support Libraries 2.7.1+
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes
CommonAST Class Reference

#include <CommonAST.hpp>

Inheritance diagram for CommonAST:
Inheritance graph
[legend]
Collaboration diagram for CommonAST:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CommonAST ()
 CommonAST (RefToken t)
 CommonAST (const CommonAST &other)
virtual ~CommonAST ()
virtual const char * typeName (void) const
 Return the class name.
virtual RefAST clone (void) const
 Clone this AST node.
virtual std::string getText () const
 Get the token text for this node.
virtual int getType () const
 Get the token type for this node.
virtual void initialize (int t, const std::string &txt)
virtual void initialize (RefAST t)
virtual void initialize (RefToken t)
virtual void setText (const std::string &txt)
 Set the token text for this node.
virtual void setType (int type)
 Set the token type for this node.
- Public Member Functions inherited from BaseAST
 BaseAST ()
 BaseAST (const BaseAST &other)
virtual ~BaseAST ()
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 std::vector< RefASTfindAll (RefAST t)
virtual std::vector< RefASTfindAllPartial (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 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 std::string toString () const
 Return string representation for the AST.
virtual std::string toStringList () const
 Print out a child sibling tree in LISP notation.
virtual std::string toStringTree () const
- Public Member Functions inherited from AST
 AST ()
 AST (const AST &)
virtual ~AST ()

Static Public Member Functions

static RefAST factory ()

Static Public Attributes

static const char *const TYPE_NAME = "CommonAST"

Protected Attributes

int ttype
std::string text
- Protected Attributes inherited from BaseAST
RefBaseAST down
RefBaseAST right

Constructor & Destructor Documentation

CommonAST::CommonAST ( )
inline
CommonAST::CommonAST ( RefToken  t)
inline
CommonAST::CommonAST ( const CommonAST other)
inline
virtual CommonAST::~CommonAST ( )
inlinevirtual

Member Function Documentation

virtual RefAST CommonAST::clone ( void  ) const
inlinevirtual

Clone this AST node.

Implements BaseAST.

Reimplemented in CommonASTWithHiddenTokens.

RefAST CommonAST::factory ( )
static

Reimplemented in CommonASTWithHiddenTokens.

virtual std ::string CommonAST::getText ( ) const
inlinevirtual

Get the token text for this node.

Reimplemented from BaseAST.

virtual int CommonAST::getType ( ) const
inlinevirtual

Get the token type for this node.

Reimplemented from BaseAST.

virtual void CommonAST::initialize ( int  t,
const std::string &  txt 
)
inlinevirtual

Various initialization routines. Used by several factories to initialize an AST element.

Implements AST.

Reimplemented in CommonASTWithHiddenTokens.

virtual void CommonAST::initialize ( RefAST  t)
inlinevirtual

Implements AST.

Reimplemented in CommonASTWithHiddenTokens.

virtual void CommonAST::initialize ( RefToken  t)
inlinevirtual

Implements AST.

Reimplemented in CommonASTWithHiddenTokens.

virtual void CommonAST::setText ( const std::string &  txt)
inlinevirtual

Set the token text for this node.

Reimplemented from BaseAST.

virtual void CommonAST::setType ( int  type)
inlinevirtual

Set the token type for this node.

Reimplemented from BaseAST.

virtual const char* CommonAST::typeName ( void  ) const
inlinevirtual

Return the class name.

Implements BaseAST.

Reimplemented in CommonASTWithHiddenTokens.


Member Data Documentation

std ::string CommonAST::text
protected
int CommonAST::ttype
protected
const char *const CommonAST::TYPE_NAME = "CommonAST"
static

Reimplemented in CommonASTWithHiddenTokens.


The documentation for this class was generated from the following files: