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

#include <ASTNULLType.hpp>

Inheritance diagram for antlr::ASTNULLType:
antlr::AST

Public Member Functions

const char * typeName (void) const
 Return the type name for this AST node. (for XML output) More...
 
RefAST clone (void) const
 Clone this AST node. More...
 
void addChild (RefAST c)
 Add a node to the end of the child list for this node. More...
 
size_t getNumberOfChildren () const
 Get the number of children. Returns 0 if the node is a leaf. More...
 
void setFirstChild (RefAST c)
 Set the first child of a node. More...
 
void setNextSibling (RefAST n)
 Set the next sibling after this one. More...
 
bool equals (RefAST t) const
 Is node t equal to this in terms of token type and text? More...
 
bool equalsList (RefAST t) const
 
bool equalsListPartial (RefAST t) const
 
bool equalsTree (RefAST t) const
 
bool equalsTreePartial (RefAST t) const
 
std ::vector< RefASTfindAll (RefAST tree)
 
std ::vector< RefASTfindAllPartial (RefAST subtree)
 
RefAST getFirstChild () const
 Get the first child of this node; null if no children. More...
 
RefAST getNextSibling () const
 Get the next sibling in line after this one. More...
 
std ::string getText () const
 Get the token text for this node. More...
 
int getType () const
 Get the token type for this node. More...
 
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. More...
 
void setType (int ttype)
 Set the token type for this node. More...
 
std ::string toString () const
 Return this AST node as a string. More...
 
std ::string toStringList () const
 Print out a child-sibling tree in LISP notation. More...
 
std ::string toStringTree () const
 
bool attributesToStream (std ::ostream &out) const
 
void toStream (std ::ostream &out) const
 
- Public Member Functions inherited from antlr::AST
 AST ()
 
 AST (const AST &)
 
virtual ~AST ()
 

Detailed Description

There is only one instance of this class

Definition at line 20 of file ASTNULLType.hpp.

Member Function Documentation

◆ addChild()

void antlr::ASTNULLType::addChild ( RefAST  c)
virtual

Add a node to the end of the child list for this node.

Implements antlr::AST.

Definition at line 25 of file ASTNULLType.cpp.

◆ attributesToStream()

bool antlr::ASTNULLType::attributesToStream ( std ::ostream &  out) const

Referenced by toStringTree().

◆ clone()

RefAST antlr::ASTNULLType::clone ( void  ) const
virtual

Clone this AST node.

Implements antlr::AST.

Definition at line 20 of file ASTNULLType.cpp.

◆ equals()

bool antlr::ASTNULLType::equals ( RefAST  t) const
virtual

Is node t equal to this in terms of token type and text?

Implements antlr::AST.

Definition at line 34 of file ASTNULLType.cpp.

◆ equalsList()

bool antlr::ASTNULLType::equalsList ( RefAST  t) const
virtual

Is t an exact structural and equals() match of this tree. The 'this' reference is considered the start of a sibling list.

Implements antlr::AST.

Definition at line 39 of file ASTNULLType.cpp.

◆ equalsListPartial()

bool antlr::ASTNULLType::equalsListPartial ( RefAST  t) const
virtual

Is 't' a subtree of this list? The siblings of the root are NOT ignored.

Implements antlr::AST.

Definition at line 44 of file ASTNULLType.cpp.

◆ equalsTree()

bool antlr::ASTNULLType::equalsTree ( RefAST  t) const
virtual

Is tree rooted at 'this' equal to 't'? The siblings of 'this' are ignored.

Implements antlr::AST.

Definition at line 49 of file ASTNULLType.cpp.

◆ equalsTreePartial()

bool antlr::ASTNULLType::equalsTreePartial ( RefAST  t) const
virtual

Is 't' a subtree of the tree rooted at 'this'? The siblings of 'this' are ignored.

Implements antlr::AST.

Definition at line 54 of file ASTNULLType.cpp.

◆ findAll()

vector< RefAST > antlr::ASTNULLType::findAll ( RefAST  t)
virtual

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 antlr::AST.

Definition at line 59 of file ASTNULLType.cpp.

◆ findAllPartial()

vector< RefAST > antlr::ASTNULLType::findAllPartial ( RefAST  t)
virtual

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 antlr::AST.

Definition at line 64 of file ASTNULLType.cpp.

◆ getFirstChild()

RefAST antlr::ASTNULLType::getFirstChild ( ) const
virtual

Get the first child of this node; null if no children.

Implements antlr::AST.

Definition at line 69 of file ASTNULLType.cpp.

◆ getNextSibling()

RefAST antlr::ASTNULLType::getNextSibling ( ) const
virtual

Get the next sibling in line after this one.

Implements antlr::AST.

Definition at line 74 of file ASTNULLType.cpp.

◆ getNumberOfChildren()

size_t antlr::ASTNULLType::getNumberOfChildren ( ) const
virtual

Get the number of children. Returns 0 if the node is a leaf.

Implements antlr::AST.

Definition at line 29 of file ASTNULLType.cpp.

◆ getText()

string antlr::ASTNULLType::getText ( ) const
virtual

Get the token text for this node.

Implements antlr::AST.

Definition at line 79 of file ASTNULLType.cpp.

Referenced by toString(), toStringList(), and toStringTree().

◆ getType()

int antlr::ASTNULLType::getType ( ) const
virtual

Get the token type for this node.

Implements antlr::AST.

Definition at line 84 of file ASTNULLType.cpp.

References initialize(), and antlr::Token::NULL_TREE_LOOKAHEAD.

◆ initialize() [1/4]

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

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

Implements antlr::AST.

Referenced by getType(), and initialize().

◆ initialize() [2/4]

void antlr::ASTNULLType::initialize ( RefAST  t)
virtual

Implements antlr::AST.

Definition at line 93 of file ASTNULLType.cpp.

◆ initialize() [3/4]

void antlr::ASTNULLType::initialize ( RefToken  t)
virtual

Implements antlr::AST.

Definition at line 97 of file ASTNULLType.cpp.

References initialize().

◆ initialize() [4/4]

void antlr::ASTNULLType::initialize ( std ::istream &  infile)

◆ setFirstChild()

void antlr::ASTNULLType::setFirstChild ( RefAST  c)
virtual

Set the first child of a node.

Implements antlr::AST.

Definition at line 107 of file ASTNULLType.cpp.

◆ setNextSibling()

void antlr::ASTNULLType::setNextSibling ( RefAST  n)
virtual

Set the next sibling after this one.

Implements antlr::AST.

Definition at line 111 of file ASTNULLType.cpp.

◆ setText()

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

Set the token text for this node.

Implements antlr::AST.

Definition at line 115 of file ASTNULLType.cpp.

◆ setType()

void antlr::ASTNULLType::setType ( int  type)
virtual

Set the token type for this node.

Implements antlr::AST.

Definition at line 119 of file ASTNULLType.cpp.

◆ toStream()

void antlr::ASTNULLType::toStream ( std ::ostream &  out) const

Referenced by toStringTree().

◆ toString()

string antlr::ASTNULLType::toString ( ) const
virtual

Return this AST node as a string.

Implements antlr::AST.

Definition at line 123 of file ASTNULLType.cpp.

References getText().

◆ toStringList()

string antlr::ASTNULLType::toStringList ( ) const
virtual

Print out a child-sibling tree in LISP notation.

Implements antlr::AST.

Definition at line 128 of file ASTNULLType.cpp.

References getText().

◆ toStringTree()

string antlr::ASTNULLType::toStringTree ( ) const
virtual

Implements antlr::AST.

Definition at line 133 of file ASTNULLType.cpp.

References attributesToStream(), getText(), and toStream().

◆ typeName()

const char * antlr::ASTNULLType::typeName ( void  ) const
virtual

Return the type name for this AST node. (for XML output)

Implements antlr::AST.

Definition at line 150 of file ASTNULLType.cpp.


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