Inspired by Jim Weirich's Ruby Lisp interpreter.
eval.clj implements the 'eval' function described in Paul Graham's "The Roots of Lisp" paper
env.clj defines the environment, which contains additional functions added by evaluating 'defun' expressions:
-
subst
-
caar
-
cadr
-
cdar
-
cadar
-
caddr
-
caddar
-
list
-
null
-
and
-
not
-
append
-
pair
-
assoc
-
eval (yep, you can run a Lisp interpreter inside the interpreter!)
-
evcon
-
evlis
reader.clj implements the simplified reader in "An Introduction to Scheme and its Implementation" (with additional support for the quote special form)
repl.clj (clj repl.clj) launches a simple REPL (CTRL-C to quit).
tests.clj (clj tests.clj) tests the interpreter using examples from Paul Graham's paper.