Re:Roll A Lisp In C – Reading (2020)
by matheusmoreira on Sunday May 12, 2024 @10:36AM
(#40334801)
Seconding the Make-A-Lisp and Crafting Interpreters recommendations. TFA is also pretty good, it contains a hard written parser that you may learn from. Lisp grammar is regarded as simple enough that full parser generators need not be used.
There are also the Lis.py articles which are incredibly good:
You mentioned you want to write your lisp in javascript so you'll be getting quite a lot of functionality for free: memory allocation and garbage collection. That alone solves an enormous amount of problems. Just in case anyone reading is going to write in C, here's an excellent introduction to the topic:
There are also the Lis.py articles which are incredibly good:
https://norvig.com/lispy.html
https://norvig.com/lispy2.html
You mentioned you want to write your lisp in javascript so you'll be getting quite a lot of functionality for free: memory allocation and garbage collection. That alone solves an enormous amount of problems. Just in case anyone reading is going to write in C, here's an excellent introduction to the topic:
https://journal.stuffwithstuff.com/2013/12/08/babys-first-ga...
Don't forget to spill the registers.