Hormiga 1.0

SymbolTable Class Reference

#include <symboltable.h>

Collaboration diagram for SymbolTable:

List of all members.

Public Member Functions

 SymbolTable (SymbolTable *parentContext=NULL)
 ~SymbolTable ()
SymbolTablegetParentSymbolTable ()
bool populateSymbol (Operand *o)
OperandgetSymbol (T_STRING &key) const
OperandgetLocalSymbol (T_STRING &key) const
OperandsetLocalSymbol (T_STRING &key, Operand *o)
TypegetType (T_STRING &key) const
TypegetLocalType (T_STRING &key) const
TypesetLocalType (T_STRING &key, Type *t)
UnitgetUnit (T_STRING &key) const
UnitgetLocalUnit (T_STRING &key) const
UnitsetLocalUnit (T_STRING &key, Unit *f)
FunctiongetFunction (T_STRING &key) const
FunctiongetLocalFunction (T_STRING &key) const
FunctionsetLocalFunction (T_STRING &key, Function *f)
StepgetStep (T_STRING &key) const
StepgetLocalStep (T_STRING &key) const
StepsetLocalStep (T_STRING &key, Step *f)
T_STRING toString ()

Protected Attributes

T_ST_HASH symbols
T_TYPE_HASH types
T_UNIT_HASH units
T_FUNC_HASH funcs
T_STEPS_HASH steps
SymbolTableparent

Detailed Description

Definition at line 57 of file symboltable.h.


Constructor & Destructor Documentation

SymbolTable::SymbolTable ( SymbolTable parentContext = NULL)

Symbol Table

Definition at line 49 of file symboltable.cpp.

SymbolTable::~SymbolTable ( )

Definition at line 54 of file symboltable.cpp.


Member Function Documentation

Function * SymbolTable::getFunction ( T_STRING &  key) const

Same ... but for Functions

Definition at line 208 of file symboltable.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Function * SymbolTable::getLocalFunction ( T_STRING &  key) const

Definition at line 216 of file symboltable.cpp.

Here is the caller graph for this function:

Step * SymbolTable::getLocalStep ( T_STRING &  key) const

Definition at line 242 of file symboltable.cpp.

Here is the caller graph for this function:

Operand * SymbolTable::getLocalSymbol ( T_STRING &  key) const

It is like "getSymbol()" but lookup is made **only** on local scope.

Definition at line 141 of file symboltable.cpp.

Here is the caller graph for this function:

Type * SymbolTable::getLocalType ( T_STRING &  key) const

Definition at line 166 of file symboltable.cpp.

Here is the caller graph for this function:

Unit * SymbolTable::getLocalUnit ( T_STRING &  key) const

Definition at line 191 of file symboltable.cpp.

Here is the caller graph for this function:

SymbolTable * SymbolTable::getParentSymbolTable ( )

Definition at line 97 of file symboltable.cpp.

Here is the caller graph for this function:

Step * SymbolTable::getStep ( T_STRING &  key) const

Same ... but for Steps

Definition at line 234 of file symboltable.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Operand * SymbolTable::getSymbol ( T_STRING &  key) const

Return the symbol asosiated to the key. Key should be the Operand Name. Generaly, Operands are Constans, Variables, Functions ... The search is made in local scope first, then on the parent (global) scope and so on. For local lookup only see "getLocalSymbol()" If the symbol is not founded, return NULL

Definition at line 133 of file symboltable.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Type * SymbolTable::getType ( T_STRING &  key) const

Same as before, but for Types

Definition at line 158 of file symboltable.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Unit * SymbolTable::getUnit ( T_STRING &  key) const

Same ... but for Units

Definition at line 183 of file symboltable.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool SymbolTable::populateSymbol ( Operand o)

Make this symbol to 'upgrade' it's scope to the next (parent) Table. It method is used to "export" a step's variable.

Definition at line 118 of file symboltable.cpp.

Here is the call graph for this function:

Function * SymbolTable::setLocalFunction ( T_STRING &  key,
Function f 
)

Definition at line 222 of file symboltable.cpp.

Here is the call graph for this function:

Step * SymbolTable::setLocalStep ( T_STRING &  key,
Step f 
)

Definition at line 247 of file symboltable.cpp.

Here is the call graph for this function:

Operand * SymbolTable::setLocalSymbol ( T_STRING &  key,
Operand o 
)

Definition at line 146 of file symboltable.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Type * SymbolTable::setLocalType ( T_STRING &  key,
Type t 
)

Definition at line 171 of file symboltable.cpp.

Here is the call graph for this function:

Unit * SymbolTable::setLocalUnit ( T_STRING &  key,
Unit f 
)

Definition at line 196 of file symboltable.cpp.

Here is the call graph for this function:

T_STRING SymbolTable::toString ( )

Definition at line 102 of file symboltable.cpp.

Here is the call graph for this function:


Member Data Documentation

T_FUNC_HASH SymbolTable::funcs [protected]

Definition at line 125 of file symboltable.h.

Definition at line 129 of file symboltable.h.

T_STEPS_HASH SymbolTable::steps [protected]

Definition at line 127 of file symboltable.h.

T_ST_HASH SymbolTable::symbols [protected]

Definition at line 119 of file symboltable.h.

T_TYPE_HASH SymbolTable::types [protected]

Definition at line 121 of file symboltable.h.

T_UNIT_HASH SymbolTable::units [protected]

Definition at line 123 of file symboltable.h.


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