C-Breeze
C Compiler Infrastructure

[ Project home page]

SymbolTable< T > Class Template Reference

#include <symbol.h>

List of all members.

Public Member Functions

 SymbolTable (bool is_nested)
 ~SymbolTable ()
void mark_nodes (void)
void reset ()
insert (const string &name, T sym)
lookup (const string &name, bool cur_scope_only=false)
void print (FILE *out)
string insert_unique (const string &root, T sym)
void enter_scope ()
void exit_scope ()

Private Types

typedef map< string, T, less<
string > > 
scope
typedef scope::iterator scope_p
typedef list< scope * > table
typedef table::iterator table_p

Private Member Functions

virtual void shadow (T create, T shadowed)=0
virtual void notify_exit_scope (T dead)=0

Private Attributes

bool _is_nested
table _table

template<class T>
class SymbolTable< T >


Member Typedef Documentation

template<class T>
typedef map<string, T, less< string > > SymbolTable< T >::scope [private]
 

Definition at line 58 of file symbol.h.

template<class T>
typedef scope::iterator SymbolTable< T >::scope_p [private]
 

Definition at line 60 of file symbol.h.

template<class T>
typedef list< scope * > SymbolTable< T >::table [private]
 

Definition at line 62 of file symbol.h.

template<class T>
typedef table::iterator SymbolTable< T >::table_p [private]
 

Definition at line 63 of file symbol.h.


Constructor & Destructor Documentation

template<class T>
SymbolTable< T >::SymbolTable bool  is_nested  )  [inline]
 

Definition at line 72 of file symbol.h.

template<class T>
SymbolTable< T >::~SymbolTable  ) 
 


Member Function Documentation

template<class T>
void SymbolTable< T >::enter_scope  ) 
 

template<class T>
void SymbolTable< T >::exit_scope  ) 
 

template<class T>
T SymbolTable< T >::insert const string &  name,
sym
 

template<class T>
string SymbolTable< T >::insert_unique const string &  root,
sym
 

template<class T>
T SymbolTable< T >::lookup const string &  name,
bool  cur_scope_only = false
 

template<class T>
void SymbolTable< T >::mark_nodes void   ) 
 

template<class T>
virtual void SymbolTable< T >::notify_exit_scope dead  )  [private, pure virtual]
 

Implemented in Identifiers_table, Labels_table, Tags_table, and Externals_table.

template<class T>
void SymbolTable< T >::print FILE *  out  ) 
 

template<class T>
void SymbolTable< T >::reset  ) 
 

template<class T>
virtual void SymbolTable< T >::shadow create,
shadowed
[private, pure virtual]
 

Implemented in Identifiers_table, Labels_table, Tags_table, and Externals_table.


Member Data Documentation

template<class T>
bool SymbolTable< T >::_is_nested [private]
 

Definition at line 52 of file symbol.h.

template<class T>
table SymbolTable< T >::_table [private]
 

Definition at line 65 of file symbol.h.

Referenced by SymbolTable< labelNode * >::SymbolTable().


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

Generated on February 1, 2006
Back to the C-Breeze home page