Symbol table for use by scrim compiler
Public Methods
-
SymbolTable()
- Default constructor
-
~SymbolTable()
- Destructor
-
SymInsertStatus AddSymbol(SymbolObject* )
- Adds a symbol to the current scope of the table.
-
bool GetSymbol(const String* , SymbolObject* &, long &, bool = 0)
- Retrieves a pointer to a symbol from the symbol table.
-
bool NewScope()
- Adds a new level to the stack.
-
bool DeleteScope()
- Removes the current level from the stack.
-
long GetCurrentScopeLevel()
- Obtains the level number of the current scope
Documentation
Symbol table for use by scrim compiler
SymbolTable()
- Default constructor
~SymbolTable()
- Destructor
SymInsertStatus AddSymbol(SymbolObject* )
- Adds a symbol to the current scope of the table.
bool GetSymbol(const String* , SymbolObject* &, long &, bool = 0)
- Retrieves a pointer to a symbol from the symbol table. The
symbol returned is the one identified by the first parameter. The
symbol table is searched for the relevant symbol from the
current scope, down to the base scope. If the symbol is found,
a copy of the pointer, and the level where the symbol was found
are returned as the second and third parameters (respectively),
and a value of "true" is returned. Note: Do not deallocate the
pointer returned, as it is a copy of the stored memory. Deleting
it will cause a segmentation fault.
bool NewScope()
- Adds a new level to the stack. Symbols added will be added to
this level.
bool DeleteScope()
- Removes the current level from the stack. All symbols on the
current level of the stack will be seleted.
long GetCurrentScopeLevel()
- Obtains the level number of the current scope
- This class has no child classes.
- Friends:
- ostream &operator<<(ostream &, SymbolTable &)
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.