By Robert Smith
DELC is an old compiler for a subset of the Scheme-like language "Del"
I developed a long time ago. It is mostly intended as a minimal
example of continuation-passing style and closure conversion.
It supports (up to bugs) lambdas, mutable closures, some arithmetic,
reifiable continuations, and printing of integers. Booleans are just
integers, but they are bound to T and NIL.
There are no lists (though they can be emulated with closures). There
are no strings. There is no God.
Equivalent in Scheme/Lisp: AND OR LET LAMBDA IF PROGN
Boolean Values: T NIL
Built-In Functions: + - * / < EQ PRINT WRITE-CHAR TERPRI CALL/CC
From your favorite Common Lisp, after loading delc.lisp, you have a
choice of two main courses:
If you have a file, everything must be wrapped in a giant DO form
since only one form is actually read.
> (del-compile-form '((lambda (x) (* 4 x)) (+ 1 2)))
;;;; Wrote out.c
In your shell:
$ gcc out.c -o out
* Determining if the platform is 32 or 64 bit is not portable.
* There is an issue with deeply closed variables.