The symbol table owns a sequence of types and a sequence of symbols.
abstract SymbolTable : AnnotableObject
virtual searchable_list<SymbolTableObject* owner> symbol_table_objects;
indexed_list<LString,SymbolTableObject *reference> lookup_table;
virtual SymbolTable * reference explicit_super_scope;
concrete BasicSymbolTable : SymbolTable
searchable_list<SymbolTableObject* owner> symbol_table_objects;
SymbolTable * reference explicit_super_scope optional;
concrete GroupSymbolTable : BasicSymbolTable
constrain symbol_table_objects to searchable_list<FieldSymbol* owner>;
The SymbolTable class is an abstract class, with currently two subclasses. The BasicSymbolTable class is the standard concrete form of a SymbolTable and the GroupSymbolTable is used by the GroupType for storing its FieldSymbols.
There is an implicit linking of a symbol table to a symbol table that contains is. If the explicit_super_scope is not NULL, then the implicit super scope can be found by walking up the ownership tree of the object until a SuifObject that defines a scope is found. For SuifObjects that define multiple scopes, (like the FileSetBlock) the ordering of the scopes is defined by their order in the Hoof specification. In the base system, only the FileSetBlock, FileBlock, ProcedureDefinition, and ScopeStatement define scopes.
|symbol_table_objects||A virtual list of symbol table objects (types and symbols)|
|lookup_table||A mapping of symbol_table_object names to the corresponding SymbolTableObject. Anonymous objects are not entered in this table. However, all objects that are not anonymous must be in this table and all objects in this table must be in the symbol_table_objects.|
|explicit_super_scope||Pointer to the lexically enclosing scope|