Simple Lisp interpreter written in Clojure.
Clojure
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md clarify inspiration Oct 9, 2011
env.clj
eval.clj
reader.clj
repl.clj
tests.clj

README.md

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.