Class Lisp

java.lang.Object
  |
  +--Lisp

class Lisp
extends java.lang.Object

Together with the Sexpr class, this class represents a complete interpreter for the following basic Lisp functions and special forms:
CAR ATOM QUOTE EVAL
CDR NULL COND TRACE
CONS EQUAL DEFUN NOTRACE
EQ NUMBERP LOAD EXIT


Constructor Summary
(package private) Lisp()
           
 
Method Summary
static Sexpr atom(Sexpr sexpr)
          Implements the Lisp ATOM function.
static Sexpr car(Sexpr sexpr)
          Implements the Lisp CAR function.
static Sexpr cdr(Sexpr sexpr)
          Implements the Lisp CDR function.
static Sexpr cond(Sexpr sexpr, java.util.HashMap context)
          Implements the Lisp COND special form.
static Sexpr cons(Sexpr car, Sexpr cdr)
          Implements the Lisp CONS function.
static Sexpr defun(Sexpr function)
          Implements the Lisp DEFUN special form.
static Sexpr eq(Sexpr atom1, Sexpr atom2)
          Implements the Lisp EQ function.
static Sexpr equal(Sexpr sexpr1, Sexpr sexpr2)
          Implements the Lisp EQUAL function.
static Sexpr eval(Sexpr sexpr)
          Implements the Lisp EVAL function.
static Sexpr isNull(Sexpr sexpr)
          Implements the Lisp NULL function.
static Sexpr load()
          Implements the Lisp LOAD function.
static void main(java.lang.String[] args)
          Implements the Lisp interpreter.
static Sexpr numberp(Sexpr sexpr)
          Implements the Lisp NUMBERP function.
static Sexpr quote(Sexpr sexpr)
          Implements the Lisp QUOTE special form.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Lisp

Lisp()
Method Detail

atom

public static Sexpr atom(Sexpr sexpr)
Implements the Lisp ATOM function.


car

public static Sexpr car(Sexpr sexpr)
Implements the Lisp CAR function.


cdr

public static Sexpr cdr(Sexpr sexpr)
Implements the Lisp CDR function.


cond

public static Sexpr cond(Sexpr sexpr,
                         java.util.HashMap context)
Implements the Lisp COND special form.


cons

public static Sexpr cons(Sexpr car,
                         Sexpr cdr)
Implements the Lisp CONS function.


defun

public static Sexpr defun(Sexpr function)
Implements the Lisp DEFUN special form.


eq

public static Sexpr eq(Sexpr atom1,
                       Sexpr atom2)
Implements the Lisp EQ function.


equal

public static Sexpr equal(Sexpr sexpr1,
                          Sexpr sexpr2)
Implements the Lisp EQUAL function.


eval

public static Sexpr eval(Sexpr sexpr)
Implements the Lisp EVAL function.


isNull

public static Sexpr isNull(Sexpr sexpr)
Implements the Lisp NULL function.


load

public static Sexpr load()
Implements the Lisp LOAD function.


main

public static void main(java.lang.String[] args)
Implements the Lisp interpreter.


numberp

public static Sexpr numberp(Sexpr sexpr)
Implements the Lisp NUMBERP function.


quote

public static Sexpr quote(Sexpr sexpr)
Implements the Lisp QUOTE special form.



Generated by BlueJ