Skip to content

bitsai/lisp-in-clojure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Simple Lisp interpreter written in Clojure.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published