class SymbolTable

Symbol table for use by scrim compiler

Public Methods

[more] SymbolTable()
Default constructor
[more] ~SymbolTable()
Destructor
[more]SymInsertStatus AddSymbol(SymbolObject* )
Adds a symbol to the current scope of the table.
[more]bool GetSymbol(const String* , SymbolObject* &, long &, bool = 0)
Retrieves a pointer to a symbol from the symbol table.
[more]bool NewScope()
Adds a new level to the stack.
[more]bool DeleteScope()
Removes the current level from the stack.
[more]long GetCurrentScopeLevel()
Obtains the level number of the current scope


Documentation

Symbol table for use by scrim compiler
o SymbolTable()
Default constructor

o ~SymbolTable()
Destructor

oSymInsertStatus AddSymbol(SymbolObject* )
Adds a symbol to the current scope of the table.

obool 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.

obool NewScope()
Adds a new level to the stack. Symbols added will be added to this level.

obool DeleteScope()
Removes the current level from the stack. All symbols on the current level of the stack will be seleted.

olong 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++.