|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.gac.max.mcs388.s2003.compiler_support.ScopedIdentifier
The ScopedIdentifier class represents the programming language concept of an identifier, i.e., a name that can have declarations associated with it.
Method Summary | |
void |
declare(edu.gac.max.mcs388.s2003.compiler_support.Declaration decl)
declare associates some piece of information (the Declaration) with a ScopedIdentifier in the current scope. |
static void |
enterScope()
The static enterScope method serves notice that a new scope is being entered, nested inside the current scope. |
static void |
exitScope()
The static exitScope method serves notice that the current scope is being exited, returning to the outer scope it was nested inside. |
static edu.gac.max.mcs388.s2003.compiler_support.ScopedIdentifier |
get(java.lang.String nm)
The static get method provides the only way to obtain a ScopedIdentifier, since there is no public constructor. |
edu.gac.max.mcs388.s2003.compiler_support.Declaration |
getDeclaration()
getDeclaration returns the Declaration that is currently in effect. |
java.lang.String |
toString()
toString returns the String that was passed to the get method |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
public static edu.gac.max.mcs388.s2003.compiler_support.ScopedIdentifier get(java.lang.String nm)
public java.lang.String toString()
toString
in class java.lang.Object
public void declare(edu.gac.max.mcs388.s2003.compiler_support.Declaration decl) throws edu.gac.max.mcs388.s2003.compiler_support.RedeclarationException
edu.gac.max.mcs388.s2003.compiler_support.RedeclarationException
- If the ScopedIdentifier already has been declared
in this exact scope (not counting surrounding scopes)public edu.gac.max.mcs388.s2003.compiler_support.Declaration getDeclaration()
public static void enterScope()
public static void exitScope()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |