unit.Interpreter
This is the UniT parse tree and interpreter in one class, that is derived from the parser tree node implementation of ANTLR, i.e. the result of the UniT parser is a parser tree of objects of this class, which will be directly used for execution. In the following documentation, single objects of this class will named parse tree node or Interpreter object depending on the context.
Constructor Summary | |
Interpreter()
|
Method Summary | |
antlr.Token |
getToken()
Returns the input token, that lead to the construction of this parse tree node. |
void |
initialize(antlr.Token token)
Saves a reference to the token. |
void |
initializeForExecution()
Prepares the interpreter for execution and must be called before run(). |
void |
run(java.util.Hashtable identifiers)
Processes the whole UniT template and must be called after initializeForExecution(). |
Constructor Detail |
public Interpreter()
Method Detail |
public antlr.Token getToken()
initialize(Token)
,
public void initializeForExecution()
run(Hashtable)
,
UniTRuntimeException
public void run(java.util.Hashtable identifiers)
identifiers
- all currently valid identifiers and their values.initializeForExecution()
,
UniTRuntimeException
public void initialize(antlr.Token token)
token
- the token, that is represented
by this Interpreter object/parse tree