OpenMD  2.5
Molecular Dynamics in the Open
antlr::CommonAST Class Reference

#include <CommonAST.hpp>

Inheritance diagram for antlr::CommonAST:
antlr::BaseAST antlr::AST antlr::CommonASTWithHiddenTokens

Public Member Functions

 CommonAST ()
 
 CommonAST (RefToken t)
 
 CommonAST (const CommonAST &other)
 
virtual ~CommonAST ()
 
virtual const char * typeName (void) const
 Return the class name. More...
 
virtual RefAST clone (void) const
 Clone this AST node. More...
 
virtual std ::string getText () const
 Get the token text for this node. More...
 
virtual int getType () const
 Get the token type for this node. More...
 
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. More...
 
virtual void setType (int type)
 Set the token type for this node. More...
 
- Public Member Functions inherited from antlr::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? More...
 
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. More...
 
virtual size_t getNumberOfChildren () const
 
virtual RefAST getFirstChild () const
 Get the first child of this node; null if no children. More...
 
virtual RefAST getNextSibling () const
 Get the next sibling in line after this one. More...
 
virtual void removeChildren ()
 Remove all children. More...
 
virtual void setFirstChild (RefAST c)
 Set the first child of a node. More...
 
virtual void setNextSibling (RefAST n)
 Set the next sibling after this one. More...
 
virtual std ::string toString () const
 Return string representation for the AST. More...
 
virtual std ::string toStringList () const
 Print out a child sibling tree in LISP notation. More...
 
virtual std ::string toStringTree () const
 
- Public Member Functions inherited from antlr::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 antlr::BaseAST
RefBaseAST down
 
RefBaseAST right
 

Detailed Description

Definition at line 18 of file CommonAST.hpp.

Constructor & Destructor Documentation

◆ CommonAST() [1/3]

antlr::CommonAST::CommonAST ( )
inline

Definition at line 20 of file CommonAST.hpp.

◆ CommonAST() [2/3]

antlr::CommonAST::CommonAST ( RefToken  t)
inline

Definition at line 27 of file CommonAST.hpp.

◆ CommonAST() [3/3]

antlr::CommonAST::CommonAST ( const CommonAST other)
inline

Definition at line 34 of file CommonAST.hpp.

◆ ~CommonAST()

virtual antlr::CommonAST::~CommonAST ( )
inlinevirtual

Definition at line 41 of file CommonAST.hpp.

Member Function Documentation

◆ clone()

virtual RefAST antlr::CommonAST::clone ( void  ) const
inlinevirtual

Clone this AST node.

Implements antlr::BaseAST.

Reimplemented in antlr::CommonASTWithHiddenTokens.

Definition at line 51 of file CommonAST.hpp.

◆ factory()

RefAST antlr::CommonAST::factory ( )
static

Definition at line 41 of file CommonAST.cpp.

◆ getText()

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

Get the token text for this node.

Reimplemented from antlr::BaseAST.

Definition at line 57 of file CommonAST.hpp.

◆ getType()

virtual int antlr::CommonAST::getType ( ) const
inlinevirtual

Get the token type for this node.

Reimplemented from antlr::BaseAST.

Definition at line 61 of file CommonAST.hpp.

◆ initialize() [1/3]

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

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

Implements antlr::AST.

Reimplemented in antlr::CommonASTWithHiddenTokens.

Definition at line 66 of file CommonAST.hpp.

Referenced by antlr::CommonASTWithHiddenTokens::initialize().

◆ initialize() [2/3]

virtual void antlr::CommonAST::initialize ( RefAST  t)
inlinevirtual

Implements antlr::AST.

Reimplemented in antlr::CommonASTWithHiddenTokens.

Definition at line 72 of file CommonAST.hpp.

References antlr::AST::getText(), and antlr::AST::getType().

◆ initialize() [3/3]

virtual void antlr::CommonAST::initialize ( RefToken  t)
inlinevirtual

Implements antlr::AST.

Reimplemented in antlr::CommonASTWithHiddenTokens.

Definition at line 77 of file CommonAST.hpp.

References ANTLR_USE_NAMESPACE, antlr::Token::getText(), and antlr::Token::getType().

◆ setText()

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

Set the token text for this node.

Reimplemented from antlr::BaseAST.

Definition at line 87 of file CommonAST.hpp.

◆ setType()

virtual void antlr::CommonAST::setType ( int  type)
inlinevirtual

Set the token type for this node.

Reimplemented from antlr::BaseAST.

Definition at line 91 of file CommonAST.hpp.

◆ typeName()

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

Return the class name.

Implements antlr::BaseAST.

Reimplemented in antlr::CommonASTWithHiddenTokens.

Definition at line 45 of file CommonAST.hpp.

References TYPE_NAME.

Member Data Documentation

◆ text

std ::string antlr::CommonAST::text
protected

Definition at line 101 of file CommonAST.hpp.

◆ ttype

int antlr::CommonAST::ttype
protected

Definition at line 100 of file CommonAST.hpp.

◆ TYPE_NAME

const char *const antlr::CommonAST::TYPE_NAME = "CommonAST"
static

Definition at line 98 of file CommonAST.hpp.

Referenced by typeName().


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