3 ms·
This is remarkably similar to the Lox language and the book Crafting Interpreters[1] by Bob Nystrom, which I only just read about on HN like two days ago. (Edit
by fernly 7y ago
This is remarkably similar to the Lox language and the book Crafting Interpreters[1] by Bob Nystrom, which I only just read about on HN like two days ago. (Edit: one major difference is, Nystrom's book is free.)
[1] http://www.craftinginterpreters.com http://www.craftinginterpreters.com
- pseudoramble 7y agoI had the same thought while reading through this site! I've started working through Crafting Interpreters a few weeks ago. I have been loving it. I'll generally read a chapter one evening, and then write the code from it the next day and re-read bits of the chapter to clarify the code. It's been really enjoyable. One thing I want to do next is to try and implement the tree-walking interpreter again in another language (probably F# in my case) and maybe share it if I finished it up. This site is basically a concrete version of that small thought in my head. Funny how things work out!
- rumbletumjum 7y agoOne is Java/recusrive descent, the other is Go/Pratt -- in the Go interpreter book, Thorsten explicity mentions Bob's Pratt parser tutorial as the go-to resource for explaining how Pratt parsers work. Both books are very good as practical guides to language implementation -- if Bob ever charged for Crafting Interpreters I'd gladly pay.