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; )
- Starting with LALRPOP ()
- Parsing nil ()
- Parsing numbers ()
- Parsing strings ()
- Parsing unary-NOT ()
- Parsing unary negation ()
- Parsing binary operators, part 1 ()
- Parsing binary operators, part 2 ()
- Parsing binary operators, part 3 ()
- Parsing groups ()
- Parsing statements ()
- Parsing variable declarations ()
If you want to follow along, the code’s on Codeberg: https://codeberg.org/rlipscombe/rlox