![]() |
![]() |
Aux class used to create symbol table scoping. More...
#include <csymtab.h>
Public Member Functions | |
CSymtab () | |
Create a symbol table. More... | |
void | PopScope () |
Jump back to parent scope. More... | |
void | PushScope () |
Create a new scope for table. More... | |
void | Add (CSymbol *sym, T1 *obj) |
Add a symbol and it's assocated object at the current level. More... | |
T1 * | LookupTop (CSymbol *sym) |
Lookup symbol only in current scope. More... | |
T1 * | Lookup (CSymbol *sym) |
Lookup symbol in all scopes starting at the current scope. More... | |
void | ImportSearchTable (CSymtab< T1 > &table) |
Import all symbols given package. More... | |
void | Dump (FILE *f, int recurse) |
Dump all symbols in table to file descriptor. More... | |
template<> | |
CMacro * | Resolve (CSymbol *sym) |
Static Public Member Functions | |
static T1 * | Resolve (CSymbol *sym) |
hook for namespaces More... | |
Aux class used to create symbol table scoping.
Class for a type safe hierarchical symbol table. Each level of the table represents a different nested scope. Searches a the leaves of the table seach upward to the table root if needed.
Add a symbol and it's assocated object at the current level.
Create a new level if needed.
sym | symbol to add to table. |
obj | object to associated with symbol. |
|
inline |
Dump all symbols in table to file descriptor.
f | file descriptor. |
recurse | zero if only current depth should be dumped. |
Import all symbols given package.
symbol | symbol for package name to import |
Lookup symbol in all scopes starting at the current scope.
sym | symbol to search for. |
Lookup symbol only in current scope.
sym | symbol to search for. |
|
inline |
Jump back to parent scope.
|
inline |
Create a new scope for table.