|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectSymbolTable
CgenClassTable
This class is used for representing the inheritance tree during code generation. You will need to fill in some of its methods and potentially extend it in other useful ways.
| Constructor Summary | |
CgenClassTable(Classes cls,
java.io.PrintStream str)
Constructs a new class table and invokes the code generator |
|
| Method Summary | |
void |
addId(AbstractSymbol id,
java.lang.Object info)
Adds a new entry to the symbol table. |
void |
code()
This method is the meat of the code generator. |
SymbolTable |
deepCopy()
Returns a clone of the symbol table (ECL). |
void |
enterScope()
Enters a new scope. |
void |
exitScope()
Exits the most recently entered scope. |
java.lang.Object |
lookup(AbstractSymbol sym)
Looks up an item through all scopes of the symbol table. |
java.lang.Object |
probe(AbstractSymbol sym)
Probes the symbol table. |
CgenNode |
root()
Gets the root of the inheritance tree |
java.lang.String |
toString()
Gets the string representation of the symbol table. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public CgenClassTable(Classes cls,
java.io.PrintStream str)
| Method Detail |
public void code()
public CgenNode root()
public void enterScope()
public void exitScope()
public void addId(AbstractSymbol id,
java.lang.Object info)
id - the symbolinfo - the data asosciated with idpublic java.lang.Object lookup(AbstractSymbol sym)
null.
sym - the symbol
public java.lang.Object probe(AbstractSymbol sym)
sym. If found, return the information field.
If not return null.
sym - the symbol
public SymbolTable deepCopy()
public java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||