public class SymbolTable
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.Map |
symbols
The table of declared identifier (symbols).
|
Constructor and Description |
---|
SymbolTable() |
Modifier and Type | Method and Description |
---|---|
Declaration |
declare(java.lang.String ident,
Declaration def)
This method adds the specified identifier to this SymbolTable.
|
Declaration |
getDeclaration(java.lang.String ident)
Checks the symbol table for the actual declaration of the specified
identifier.
|
boolean |
isDeclared(java.lang.String ident)
Checks whether the specified identifier is declared.
|
public Declaration declare(java.lang.String ident, Declaration def)
null
is returned.ident
- identifier to be declareddef
- new definition of identifiernull
otherwisepublic boolean isDeclared(java.lang.String ident)
ident
- the name of identifier to be testedtrue
if the identifier is declared;
false
otherwise.public Declaration getDeclaration(java.lang.String ident)
null
for an undeclared identifier.ident
- the name of identifiernull
otherise.Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.