Class Value
- java.lang.Object
-
- com.batch.android.lisp.Value
-
- Direct Known Subclasses:
ErrorValue,OperatorValue,PrimitiveValue,SExpression,VariableValue
public class Value extends java.lang.ObjectRoot of everything.Everything in our LISP is a Value.
A value is abstract, but has different concrete implementations: - SExpression: An executable list of values, which should always begin by a Operator, if not empty - Variable: A variable reference - Error: An error, described by kind and message. Errors should bubble as soon as possible - Primitive: A primitive value (Nil, Double, Bool, String, String Array) - Operator: A builtin function
Reducable values are not usuable as-is, and must be resolved to get a primitive value. Reducing SExpressions is how you compute a result, as the program's root must be a S-Expression. Operators cannot be reduced, and must only be used as the first value of a S-Expression
Please note that all concepts here are the result of our take on LISP, and might be different than existing implementations.
-
-
Constructor Summary
Constructors Constructor Description Value()
-