|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsyntax.SymtabManager
Manages the symbol table and scopes within a given compilation unit.
Constructor Summary | |
SymtabManager()
|
Method Summary | |
static void |
AddSuspendedVarName(java.lang.String name)
When encountering parameter names, they are put into a suspended list until scope is opened. |
static void |
ClearSuspendedVarName()
Removes all parameter names. |
static void |
CloseScope()
|
static Scope |
GetCurScope()
|
static int |
getDepth()
|
static java.lang.String |
GetFullyScopedClassName()
|
static Scope |
GetScope(java.lang.String name)
|
static Scope |
GetScopeOfFullyScopedName(java.lang.String name)
Returns the Scope of B in A::B::C. |
static boolean |
IsCtor(java.lang.String name)
For now, we just say if it is a class name, it is OK to call it a constructor. |
static boolean |
IsFullyScopedTypeName(java.lang.String name)
|
static boolean |
IsGlobalScope()
|
static boolean |
IsMethod(java.lang.String name)
It splits the parameter name into method name and type name (first parameter), using the left parenthesis as separator. |
static boolean |
IsTypeName(java.lang.String name)
|
static void |
OpenScope(Scope sc)
|
static Scope |
OpenScope(java.lang.String scopeName,
boolean isType,
boolean nameSpaceScope)
Opens a new scope (with optional name and type flag). |
static void |
PutSuspendedVarName()
Transfers parameter names into proper scope. |
static void |
PutTypeName(java.lang.String name)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SymtabManager()
Method Detail |
public static Scope OpenScope(java.lang.String scopeName, boolean isType, boolean nameSpaceScope)
public static void OpenScope(Scope sc)
public static void PutTypeName(java.lang.String name)
public static boolean IsFullyScopedTypeName(java.lang.String name)
public static boolean IsTypeName(java.lang.String name)
public static void CloseScope()
public static boolean IsCtor(java.lang.String name)
public static boolean IsMethod(java.lang.String name)
public static Scope GetCurScope()
public static Scope GetScope(java.lang.String name)
public static Scope GetScopeOfFullyScopedName(java.lang.String name)
public static boolean IsGlobalScope()
public static int getDepth()
public static void AddSuspendedVarName(java.lang.String name)
public static void ClearSuspendedVarName()
public static void PutSuspendedVarName()
public static java.lang.String GetFullyScopedClassName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |