|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--scale.clef.symtab.SymtabScope
This class represents a single, local scope (e.g., for a procedure or local block).
$Id: SymtabScope.java,v 1.30 2002/01/03 21:44:08 burrill Exp $
Copyright 2002 by the Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
The primary function of a scope is to maintain a table of (identifier, decl) pairs. This table is implemented by
SymtabLocal, Serialized Form| Constructor Summary | |
SymtabScope(int depth)
Constructor to create a symbol table scope. |
|
| Method Summary | |
SymtabEntry |
addEntry(Declaration decl)
This method adds a new entry to the local symbol table. |
void |
appendChild(SymtabScope child)
Add a child to the scope - represents a nested scope |
SymtabScope |
getOuterScope()
Return the scope containing this scope. |
int |
getScopeDepth()
|
int |
getScopeNumber()
|
SymtabEntries |
lookup(java.lang.String id)
This method looks for the identifier in this scope. |
SymtabEntry |
lookupSymbol(Declaration d)
Look for a declaration in this scope. |
java.util.Enumeration |
orderedElements()
Returns an enumeration of symbols in the scope - in the order that the symbols were added to the scope. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public SymtabScope(int depth)
depth - the current nesting depth of the scope block| Method Detail |
public final int getScopeNumber()
public final int getScopeDepth()
public final SymtabEntries lookup(java.lang.String id)
id - the name of a symbolpublic final SymtabEntry lookupSymbol(Declaration d)
public final SymtabEntry addEntry(Declaration decl)
decl - the declaration for the symbolpublic final SymtabScope getOuterScope()
public final void appendChild(SymtabScope child)
child - the nested scopepublic final java.util.Enumeration orderedElements()
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||