org.omegahat.Environment.Parser.Parse
Interface ExpressionInt

All Superinterfaces:
Evaluable, TreeNodeInt
All Known Implementing Classes:
BasicExpression, BinaryExpression, Catch, ElementAccess, FieldAccess, ForLoop, List, LocalVariable, MethodCall, Name, SwitchCase, TryCatch, UnaryExpression, CastExpression, ConditionalExpressionStatement, FlowControl

public interface ExpressionInt
extends TreeNodeInt, Evaluable

Interface defining basic methods an expression must have to be used with the rest of the system.


Method Summary
 java.lang.Exception error(java.lang.String msg, Evaluator evaluator)
           
 ExpressionInt resolve(Evaluator evaluator)
          Rewrite the expression by resolving class names, methods, etc.
 ExpressionInt substitute(java.util.Hashtable db)
          Substitute the variable names in this expression (and its sub-components) present in the hashtable or database with the associated actual values.
 
Methods inherited from interface org.omegahat.Environment.Parser.Parse.TreeNodeInt
addChild, children, depth, parent, parent, replaceChild
 
Methods inherited from interface org.omegahat.Environment.Language.Evaluable
eval, eval
 

Method Detail

substitute

public ExpressionInt substitute(java.util.Hashtable db)
Substitute the variable names in this expression (and its sub-components) present in the hashtable or database with the associated actual values. Similar to the R/S substitute() function.

resolve

public ExpressionInt resolve(Evaluator evaluator)
Rewrite the expression by resolving class names, methods, etc. as much as possible based on the evaluation context provided by the Evaluator so as to make it more efficient in future calls..

error

public java.lang.Exception error(java.lang.String msg,
                                 Evaluator evaluator)