fmrisc.Semantics
Class ValueTable
java.lang.Object
fmrisc.Semantics.SymbolTable
fmrisc.Semantics.ValueTable
public final class ValueTable
- extends SymbolTable
Value table for named value lookup.
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ValueTable
public ValueTable()
cloneValueTable
public ValueTable cloneValueTable()
- creates a clone of the symbol table, the clone is a shallow copy
(the symbols in the table are not cloned)
put
public ValueSymbol put(ValueDeclIdentifier name,
Type type,
Expression value,
int depth)
- put named value in value table
- Parameters:
name
- the name of the valuetype
- the type associated to the valuevalue
- the value itself (may be null)depth
- the current environment depth
- Returns:
- constructed symbol (null, if an error occured)
getSymbol
public ValueSymbol getSymbol(Identifier name)
- returns symbol associated to name (null, if none)
- Parameters:
name
- the name
- Returns:
- the symbol associated to the name (may be null)