Top Fields Constructors Methods
com.jogamp.gluegen.cgram

public Class CSymbolTable

extends Object
Class Inheritance
Imports
java.util.Vector, .Hashtable, .Enumeration

Field Summary

Modifier and TypeField and Description
private final Vector<String>
scopeStack

holds list of scopes

private final Hashtable<String, TNode>
symTable

table where all defined names are mapped to TNode tree nodes

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public TNode
add(final String name, final TNode node)

add a node to the table with it's key as the current scope and the name

public String
addCurrentScopeToName(final String name)

given a name for a type, append it with the current scope.

public String
addScopeToName(final String scope, final String name)

given a name for a type, append it with the given scope.

public String
currentScopeAsString()

return the current scope as a string

public TNode
lookupNameInCurrentScope(final String name)

lookup an unscoped name in the table by prepending the current scope.

public TNode
lookupScopedName(final String scopedName)

lookup a fully scoped name in the symbol table

public void
popScope()

pop the last scope off the scope stack.

public void
pushScope(final String s)

push a new scope onto the scope stack.

public String
removeOneLevelScope(final String scopeName)

remove one level of scope from name MBZ

public String
toString()

Overrides java.lang.Object.toString.

convert this table to a string
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

scopeStackback to summary
private final Vector<String> scopeStack

holds list of scopes

symTableback to summary
private final Hashtable<String, TNode> symTable

table where all defined names are mapped to TNode tree nodes

Constructor Detail

CSymbolTableback to summary
public CSymbolTable()

Method Detail

addback to summary
public TNode add(final String name, final TNode node)

add a node to the table with it's key as the current scope and the name

addCurrentScopeToNameback to summary
public String addCurrentScopeToName(final String name)

given a name for a type, append it with the current scope.

addScopeToNameback to summary
public String addScopeToName(final String scope, final String name)

given a name for a type, append it with the given scope. MBZ

currentScopeAsStringback to summary
public String currentScopeAsString()

return the current scope as a string

lookupNameInCurrentScopeback to summary
public TNode lookupNameInCurrentScope(final String name)

lookup an unscoped name in the table by prepending the current scope. MBZ -- if not found, pop scopes and look again

lookupScopedNameback to summary
public TNode lookupScopedName(final String scopedName)

lookup a fully scoped name in the symbol table

popScopeback to summary
public void popScope()

pop the last scope off the scope stack.

pushScopeback to summary
public void pushScope(final String s)

push a new scope onto the scope stack.

removeOneLevelScopeback to summary
public String removeOneLevelScope(final String scopeName)

remove one level of scope from name MBZ

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

convert this table to a string

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object

Annotations
@Override