Compiler tutorial on Swish

At https://swish.swi-prolog.org/p/Compiler1.swinb I’ve put up an implementation of the compiler example in Chapter 24 of The Art of Prolog

It’s the same code I previously posted on the thread https://swi-prolog.discourse.group/t/a-tokeniser-ive-written-any-suggestions-on-how-to-improve-it/367, but thought it best to save it on Swish before I lose it, and is also handier for anyone who wants to play with it.

I’m thinking of working through a Lisp textbook on compilers which is freely online at http://cs.brown.edu/courses/cs173/2012/book/, doing a Prolog version along with the Lisp covered in the book.

Does anyone know if that book is any good, or if there are better suggestions?

1 Like