Crafting Interpreters in Rust: Introduction
For my #DecemberAdventure, I’m going to have another go at working through “Crafting
Interpreters” in Rust. The last time I tried this, I got to the end of Chapter 10.
However, it’s my opinion that the lexing and parsing part of language implementation is the least interesting bit. It’s been done to death by every tutorial out there, so I’m going to skip that part entirely and write a parser using LALRPOP.
I did this last time, but when I look back at the grammar, I don’t understand any of it. This time, I’m going to write it down in this series of blog posts, so that I’ll remember for next time.
- Introduction (this post; 1 Dec 2025 19:14)
- Starting with LALRPOP (1 Dec 2025 19:25)
- Parsing nil (1 Dec 2025 20:07)
- Parsing numbers (2 Dec 2025 17:23)
- Parsing strings (4 Dec 2025 08:23)
- Parsing unary-NOT (7 Dec 2025 12:00)
- Parsing unary negation (7 Dec 2025 15:00)
If you want to follow along, the code’s on Codeberg: https://codeberg.org/rlipscombe/rlox