|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectunsw.cse.framescript.Term
unsw.cse.framescript.ExprList
public class ExprList
This class represents a series of expression that are evaluated in succession. It provides FrameScript with sequential evaluation.
Constructor Summary | |
---|---|
ExprList(Term t)
Creates a sequence with one expression. |
|
ExprList(Term t,
ExprList l)
Creates an expression list where a given expression is followed by a list of expressions. |
Method Summary | |
---|---|
java.lang.String |
asString(int indentLevel,
boolean inPattern)
Turns the Term into a string. |
boolean |
equals(Term t)
Compares two Terms for equality. |
Term |
eval(Instance currentObject,
StackFrame stackframe)
Evaluates all of the expressions in the list and returns the result of evaluating the last element. |
Term |
mapVars(FSList vars)
Maps atoms to variables from the list of variables. |
java.lang.String |
toString()
Turns the Term into a string. |
Methods inherited from class unsw.cse.framescript.Term |
---|
assign, fullMatch, indents, match |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ExprList(Term t)
t
- the expressionpublic ExprList(Term t, ExprList l)
t
- the leading expressionl
- subsequent expressionsMethod Detail |
---|
public Term eval(Instance currentObject, StackFrame stackframe) throws FSException
eval
in class Term
currentObject
- the enclosing instance frame for the code being evaluatedstackframe
- StackFrame that holds the values for any variables
FSException
- if any errors occur in performing the evaluationpublic boolean equals(Term t)
Term
equals
in class Term
t
- Term to be compared to
public Term mapVars(FSList vars) throws SyntaxError
Term
mapVars
in class Term
vars
- a list of variables to be mapped
SyntaxError
- if in performing the mapping it finds an invalid variable namepublic java.lang.String toString()
Term
toString
in class Term
public java.lang.String asString(int indentLevel, boolean inPattern)
Term
asString
in class Term
indentLevel
- indentation level to uses for any subsequent lines in the stringinPattern
- whether or not to format the string as though it is inside a pattern
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |