public abstract class Expression extends Util implements java.io.Externalizable, ExpressionVisitee
| Modifier and Type | Field and Description |
|---|---|
java.util.Map |
annotations |
protected static java.util.Set |
EMPTYSET |
BACKQUOTE, BEGIN, bundles, caseSensitive, EMPTYLIST, EMPTYVEC, EOF, ERRORK, EVAL, EXPSC, EXPTOP, FALSE, FCONT, FIVE, JEXCEPTION, LAMBDA, LOCATION, maxFloatPrecision, MESSAGE, minFloatPrecision, NAME, OTHER, PARENT, permitInterrupts, QUOTE, QUOTESYM, REPORT, SETBANG, SISC, SISC_SPECIFIC, SISCB, SOURCE_COLUMN, SOURCE_FILE, SOURCE_LINE, SYMENV, THIS, TOPLEVEL, TRUE, UNQUOTE, UNQUOTE_SPLICING, VOID, ZV| Constructor and Description |
|---|
Expression() |
| Modifier and Type | Method and Description |
|---|---|
void |
deserialize(Deserializer s)
All Expressions must implement a default (no-argument) constructor.
|
void |
deserializeAnnotations(Deserializer s) |
abstract void |
eval(Interpreter r)
All expressions can be evaluated to some Scheme value.
|
abstract Value |
express()
A debugging function, express returns a Scheme value that describes
this expression.
|
Value |
getAnnotation(Symbol key) |
Value |
getAnnotation(Symbol key,
Value def) |
java.util.Set |
getAnnotationKeys() |
Pair |
getAnnotations() |
Symbol |
getName() |
Value |
getValue(Interpreter r)
If an expression implements the Immediate interface, it must
override getValue, which returns as a Value, the immediate value
of this expression.
|
void |
readExternal(java.io.ObjectInput in) |
java.lang.Object |
readResolve() |
void |
serialize(Serializer s)
All Expressions must implement a default (no-argument) constructor.
|
void |
serializeAnnotations(Serializer s) |
Value |
setAnnotation(Symbol key,
Value val) |
Value |
setAnnotation(Symbol key,
Value val,
Value def) |
void |
setName(Symbol s)
The following helpers set the 'name annotation, which is used for
naming procedures, environments, etc.
|
boolean |
visit(ExpressionVisitor v) |
boolean |
visitAnnotations(ExpressionVisitor v) |
void |
writeExternal(java.io.ObjectOutput out) |
annotated, annotatedAppEval, append, argCheck, argsToSymbols, assq, bininport, bininstream, binoutport, binoutstream, box, character, charinport, charinreader, charoutport, charoutwriter, charsetFromString, chr, cont, currentClassLoader, env, error, error, error, error, error, error, error, expr, getDefaultCharacterSet, immutablePair, immutableVector, inport, javaExceptionToString, javaWrap, justify, length, liMessage, liMessage, liMessage, liMessage, liMessage, liMessage, liMessage, list, list, list, list, list, makeURL, mapcar, memq, nlib, num, outport, pair, pairToExpressions, pairToExpVect, pairToValues, proc, read, registerBundle, reverse, reverseInPlace, simpleErrorToString, sourceAnnotations, str, string, sym, symbol, symval, truePair, truth, truth, typeError, typeError, updateName, url, url, url, valArrayToList, valArrayToList, valArrayToVec, vec, warn, warn, warnprotected static java.util.Set EMPTYSET
public java.util.Map annotations
public java.util.Set getAnnotationKeys()
public Pair getAnnotations()
public void serializeAnnotations(Serializer s) throws java.io.IOException
java.io.IOExceptionpublic void deserializeAnnotations(Deserializer s) throws java.io.IOException
java.io.IOExceptionpublic boolean visitAnnotations(ExpressionVisitor v)
public void setName(Symbol s)
public Symbol getName()
public abstract void eval(Interpreter r) throws ContinuationException
r - the InterpreterContinuationExceptionpublic Value getValue(Interpreter r) throws ContinuationException, OptimismUnwarrantedException
r - the InterpreterContinuationExceptionOptimismUnwarrantedExceptionpublic abstract Value express()
public void serialize(Serializer s) throws java.io.IOException
s - the Serializerjava.io.IOExceptionpublic void deserialize(Deserializer s) throws java.io.IOException
s - the Deserializerjava.io.IOExceptionpublic void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOExceptionpublic void readExternal(java.io.ObjectInput in)
throws java.io.IOException
readExternal in interface java.io.Externalizablejava.io.IOExceptionpublic java.lang.Object readResolve()
throws java.io.ObjectStreamException
java.io.ObjectStreamExceptionpublic boolean visit(ExpressionVisitor v)
visit in interface ExpressionVisitee