3 ms·
I have often wondered what it would be like to have an "all-levels" Lisp-like language. Start with a bootstrapping reader that attaches to a minimal assembler t
by pmjordan 17y ago
I have often wondered what it would be like to have an "all-levels" Lisp-like language. Start with a bootstrapping reader that attaches to a minimal assembler that generates bytecode from the S-expressions. Then build progressively higher levels onto that until you have a "proper" lisp system, except you can drop to a lower level anytime and hack the depths of it when you need to.
- doelie_ 17y agoCheck this out: http://piumarta.com/software/cola/ http://piumarta.com/software/cola/
- pmjordan 17y agoBrilliant, thanks. I'll have to have a play with that.
- andreyf 17y agoWhile you're at it, check out http://piumarta.com/ http://piumarta.com/ ;)
- doelie_ 17y agoIndeed. The peg parser generator is quite nice: http://piumarta.com/software/peg/ http://piumarta.com/software/peg/ I recently used it to implement an s-expression reader: http://zwizwa.be/darcs/libprim/ex/sexp.leg http://zwizwa.be/darcs/libprim/ex/sexp.leg (It's incomplete, but it illustrates the principle: peg parsing is very nice for quick & dirty parsing work.)
- silentbicycle 17y agoHave you ever looked at Forth? It's postfix and stack-based, but is exactly what you want from the standpoint of bootstrapping from next-to-nothing and getting a high-level language. Here's thoroughly documented source for a Forth interpreter (http://www.annexia.org/forth http://www.annexia.org/forth) in i386 assembly.