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.
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.
For the parser, I’m going to use LALRPOP. I used it in my previous attempt at this, and I liked it.
In the previous post, we wrote a simple grammar that parses true or false as a boolean:
So far, we’ve got a grammar that can parse true, false and nil literals. In this post, we’ll add the ability to
parse numbers.
We’re implementing Lox’s primary rule. So far, we’ve done booleans, nil and numbers. Let’s move on to strings.
We’re implementing Lox’s primary rule. So far, we’ve done booleans, nil, numbers and strings. Let’s move on to some
basic expressions. In this post, we’ll deal with unary-NOT – !x.
In the last post, we implemented unary-not. In this one, we’ll implement the other unary operator: negation.