|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.rubato.scheme.Evaluator
public class Evaluator
This class provides the means for evaluating Scheme expressions.
Constructor Summary | |
---|---|
Evaluator()
Creates an evaluator with a global environment as the initial environment. |
|
Evaluator(Env env)
Creates an evaluator with the specified initial environment. |
Method Summary | |
---|---|
void |
addError(java.lang.String msg,
java.lang.Object... objects)
Adds a new error message. |
void |
clearErrors()
Removes all errors that occurred during the last evaluation. |
SExpr |
eval(java.util.List<SExpr> sexpr_list)
Evaluates the specified list of expressions in the initial environment. |
SExpr |
eval(SExpr sexpr)
Evaluates the specified expression in the initial environment. |
SExpr |
eval(SExpr sexpr,
Env env)
Evaluates the specified expression in the given environment env . |
SExpr |
eval(java.lang.String s)
Parses and evaluates the code s in the
initial environment. |
SInPort |
getCurrentInputPort()
Returns the current input port. |
SOutPort |
getCurrentOutputPort()
Returns the current output port. |
java.util.List<java.lang.String> |
getErrors()
Returns the list of errors that occurred during the last evaluation. |
boolean |
hasErrors()
Returns true iff the last evaluation had errors. |
void |
resetGlobal()
Resets the initial environment to the global environment. |
void |
setEnvironment(Env env)
Sets the initial environment to env . |
void |
setRunInfo(RunInfo runInfo)
Sets the runinfo for the next evaluation. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Evaluator()
public Evaluator(Env env)
Method Detail |
---|
public void resetGlobal()
public void setEnvironment(Env env)
env
.
public void setRunInfo(RunInfo runInfo)
runInfo.stopped()
is true.
public SExpr eval(java.lang.String s)
s
in the
initial environment.
public SExpr eval(java.util.List<SExpr> sexpr_list)
public SExpr eval(SExpr sexpr)
public SExpr eval(SExpr sexpr, Env env)
env
.
public final void clearErrors()
public final java.util.List<java.lang.String> getErrors()
public final void addError(java.lang.String msg, java.lang.Object... objects)
public final boolean hasErrors()
public SOutPort getCurrentOutputPort()
public SInPort getCurrentInputPort()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |