Creating a LISP compiler? I have never though of it. The resulting BF-code has to be able to be a LISP interpreter as well to be a fully functional LISP.
I'm currently working on an Interpreter that runs on any BrainFuck interpreter (or that may be compiled with a brainfuck-to-x compiler), though will make you do more stuff when cell sizes are larger than bytes. (addressing)
Around 2007 I didn't know much about LISP , but I found BF a challenge to do stuff in. It has 8 primitives and is one of the simplest languages there are.
LISP is on the other end of the scale as a high level language and it was originally defined by 7 primitives and list-lambda for function-calls. I have used
some years to learn a little about LISP among other things.
In 2009 I started created ebf-compiler. I defined som new primitives :$!@ that pretty much implemented variable handling. My compiler then read this and printed out the <'s and >'s
so that my program didn't have to worry about that. It was written in itself and hand-compiled. After that I have added features. Today EBF is in it's 7th generation and writing something in it can be verbose, readable and highly debug-able. This was my first step in writing LISP.
I have spawned a new project this year called Zozotez (LISP in french, since I'm doing this while on vacation in Framce). Having written EBF I have already found solutions to many data structures (EBF today has 2 stacks, hash-table, string-array, array and a buffer) I reused many if the solutions used in EBF (two stacks, a array lookup for symbols (index=hash) and a array that expands to the end of memory to be lisp data. I have put some registeres (cells) in the middle and my macroes in EBF can use the calling cell address as a way to pass parameters. So far I have created a read-print-loop that stores what it reads in cons-cells and print, that print a address in lisp-data-array. It might not be very impressive since it might look like any implementation of echo, but I belive I'm half way to implement my interpreter.
This work has so far been very time consuming, but interesting. I can't say I'm wasting my time since I'm learning as I go and it sure beats my wife's sudoku challenges any time. The result will be something which starts out responsive but as the memory indexes goes up the interpreter will have to do more processing for each access and that will be felt on the performance. In parallel I'm making a reference design in CL.
Link to the ebf-compiler:
http://sylwester.no/ebf/
Link to Zozotez Lisp (not-yet) Interpreter
http://sylwester.no/zozotez/
Br
Syl