Package com.jogamp.gluegen.cgram
Class CSymbolTable
- java.lang.Object
-
- com.jogamp.gluegen.cgram.CSymbolTable
-
public class CSymbolTable extends Object
-
-
Constructor Summary
Constructors Constructor Description CSymbolTable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TNodeadd(String name, TNode node)add a node to the table with it's key as the current scope and the nameStringaddCurrentScopeToName(String name)given a name for a type, append it with the current scope.StringaddScopeToName(String scope, String name)given a name for a type, append it with the given scope.StringcurrentScopeAsString()return the current scope as a stringTNodelookupNameInCurrentScope(String name)lookup an unscoped name in the table by prepending the current scope.TNodelookupScopedName(String scopedName)lookup a fully scoped name in the symbol tablevoidpopScope()pop the last scope off the scope stack.voidpushScope(String s)push a new scope onto the scope stack.StringremoveOneLevelScope(String scopeName)remove one level of scope from name MBZStringtoString()convert this table to a string
-
-
-
Method Detail
-
pushScope
public void pushScope(String s)
push a new scope onto the scope stack.
-
popScope
public void popScope()
pop the last scope off the scope stack.
-
currentScopeAsString
public String currentScopeAsString()
return the current scope as a string
-
addCurrentScopeToName
public String addCurrentScopeToName(String name)
given a name for a type, append it with the current scope.
-
addScopeToName
public String addScopeToName(String scope, String name)
given a name for a type, append it with the given scope. MBZ
-
removeOneLevelScope
public String removeOneLevelScope(String scopeName)
remove one level of scope from name MBZ
-
add
public TNode add(String name, TNode node)
add a node to the table with it's key as the current scope and the name
-
lookupScopedName
public TNode lookupScopedName(String scopedName)
lookup a fully scoped name in the symbol table
-
lookupNameInCurrentScope
public TNode lookupNameInCurrentScope(String name)
lookup an unscoped name in the table by prepending the current scope. MBZ -- if not found, pop scopes and look again
-
-