Class Value

  • Direct Known Subclasses:
    ErrorValue, OperatorValue, PrimitiveValue, SExpression, VariableValue

    public class Value
    extends java.lang.Object
    Root 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()  
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Value

        public Value()