| Modifier and Type | Field and Description |
|---|---|
| private final Vector | scopeStack
holds list of scopes |
| private final Hashtable | symTable
table where all defined names are mapped to TNode tree nodes |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public TNode | |
| public String | |
| public String | addScopeToName(final String scope, final String name)
given a name for a type, append it with the given scope. |
| public String | |
| public TNode | lookupNameInCurrentScope(final String name)
lookup an unscoped name in the table by prepending the current scope. |
| public TNode | |
| public void | |
| public void | |
| public String | |
| public String |
| scopeStack | back to summary |
|---|---|
| private final Vector<String> scopeStack holds list of scopes | |
| symTable | back to summary |
|---|---|
| private final Hashtable<String, TNode> symTable table where all defined names are mapped to TNode tree nodes | |
| CSymbolTable | back to summary |
|---|---|
| public CSymbolTable() | |
| add | back to summary |
|---|---|
| public TNode add(final String name, final TNode node) add a node to the table with it's key as the current scope and the name | |
| addCurrentScopeToName | back to summary |
|---|---|
| public String addCurrentScopeToName(final String name) given a name for a type, append it with the current scope. | |
| addScopeToName | back to summary |
|---|---|
| public String addScopeToName(final String scope, final String name) given a name for a type, append it with the given scope. MBZ | |
| currentScopeAsString | back to summary |
|---|---|
| public String currentScopeAsString() return the current scope as a string | |
| lookupNameInCurrentScope | back to summary |
|---|---|
| public TNode lookupNameInCurrentScope(final String name) lookup an unscoped name in the table by prepending the current scope. MBZ -- if not found, pop scopes and look again | |
| lookupScopedName | back to summary |
|---|---|
| public TNode lookupScopedName(final String scopedName) lookup a fully scoped name in the symbol table | |
| popScope | back to summary |
|---|---|
| public void popScope() pop the last scope off the scope stack. | |
| pushScope | back to summary |
|---|---|
| public void pushScope(final String s) push a new scope onto the scope stack. | |
| removeOneLevelScope | back to summary |
|---|---|
| public String removeOneLevelScope(final String scopeName) remove one level of scope from name MBZ | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. convert this table to a string
| |