java.lang.Object | +--Lisp
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()
| Method Detail |
public static Sexpr atom(Sexpr sexpr)
public static Sexpr car(Sexpr sexpr)
public static Sexpr cdr(Sexpr sexpr)
public static Sexpr cond(Sexpr sexpr,
java.util.HashMap context)
public static Sexpr cons(Sexpr car,
Sexpr cdr)
public static Sexpr defun(Sexpr function)
public static Sexpr eq(Sexpr atom1,
Sexpr atom2)
public static Sexpr equal(Sexpr sexpr1,
Sexpr sexpr2)
public static Sexpr eval(Sexpr sexpr)
public static Sexpr isNull(Sexpr sexpr)
public static Sexpr load()
public static void main(java.lang.String[] args)
public static Sexpr numberp(Sexpr sexpr)
public static Sexpr quote(Sexpr sexpr)