Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

CkASTNodeBase Class Reference

Our own home brewn AST node for ANTLR. More...

#include <CkASTNodeBase.hpp>

Collaboration diagram for CkASTNodeBase:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CkASTNodeBase ()
 Default constructor.

 CkASTNodeBase (ANTLR_USE_NAMESPACE(antlr) RefToken t)
 Construct from token.

 CkASTNodeBase (const CkASTNodeBase &other)
 Copy constructor.

virtual ~CkASTNodeBase ()
virtual ANTLR_USE_NAMESPACE (antlr) RefAST clone() const
void initialize (int t, const ANTLR_USE_NAMESPACE(std) string &txt)
 Initialize with default values.

void initialize (ANTLR_USE_NAMESPACE(antlr) RefAST t)
 Initialize from other.

void initialize (ANTLR_USE_NAMESPACE(antlr) RefToken tok)
 Initialize from token.

unsigned int getLine () const
 Get line number where token was defined.

void setLine (unsigned int line)
 Set line number where token was defined.

void setResultType (CkDataType::Types type)
 Set the result type of this node.

void setResultType (const CkDataType &type)
 Set the result type of this node from some other datatype.

const CkDataTypegetResultType () const
 Get the result type of this node.

void setIgnoreScope (bool ignore)
 Set if this node should ignore it's scope.

bool getIgnoreScope () const
 Check if this node should ignore it's scope.


Static Public Member Functions

 ANTLR_USE_NAMESPACE (antlr) RefAST factory()

Private Attributes

unsigned int LineNr
CkDataType ResultType
bool IgnoreScope

Detailed Description

Our own home brewn AST node for ANTLR.

This node provides the following extra functionality:

Definition at line 27 of file CkASTNodeBase.hpp.


Constructor & Destructor Documentation

CkASTNodeBase::~CkASTNodeBase  )  [virtual]
 

Destroys the object

Definition at line 40 of file CkASTNodeBase.cpp.


Member Function Documentation

bool CkASTNodeBase::getIgnoreScope  )  const [inline]
 

Check if this node should ignore it's scope.

Unfortunatly this "hack" is needed in order to have either a single expression without a ; after it OR a open block

Definition at line 75 of file CkASTNodeBase.hpp.

void CkASTNodeBase::initialize ANTLR_USE_NAMESPACE(antlr) RefToken  tok  ) 
 

Initialize from token.

This function is only used internally by antlr.

Definition at line 75 of file CkASTNodeBase.cpp.

void CkASTNodeBase::initialize ANTLR_USE_NAMESPACE(antlr) RefAST  t  ) 
 

Initialize from other.

This function is only used internally by antlr.

Definition at line 66 of file CkASTNodeBase.cpp.

void CkASTNodeBase::initialize int  t,
const ANTLR_USE_NAMESPACE(std) string &  txt
 

Initialize with default values.

This function is only used internally by antlr.

Definition at line 57 of file CkASTNodeBase.cpp.

void CkASTNodeBase::setIgnoreScope bool  ignore  )  [inline]
 

Set if this node should ignore it's scope.

Unfortunatly this "hack" is needed in order to have either a single expression without a ; after it OR a open block

Definition at line 69 of file CkASTNodeBase.hpp.

void CkASTNodeBase::setResultType const CkDataType type  ) 
 

Set the result type of this node from some other datatype.

Parameters:
type Return type of this node is set to this type.

Definition at line 107 of file CkASTNodeBase.cpp.

void CkASTNodeBase::setResultType CkDataType::Types  type  )  [inline]
 

Set the result type of this node.

Constants and variables have the same result type as their definition. All nodes start out with type resUndefined.

Definition at line 59 of file CkASTNodeBase.hpp.

References CkDataType::setReturnType().


The documentation for this class was generated from the following files:
Generated on Mon Dec 1 14:26:28 2003 for Ck by doxygen 1.3.3