Learn about tokenization, ASTs, tree-walk interpreters and more.
You're welcome to study the full challenge structure and stage instructions for free. A membership is needed for submitting code and viewing solutions.
Want to try a free challenge? Try Build your own Kafka — it's free during beta.
This challenge follows the book Crafting Interpreters by Robert Nystrom.
In this challenge you'll build an interpreter for Lox, a simple scripting language. Along the way, you'll learn about tokenization, ASTs, tree-walk interpreters and more.
Before starting this challenge, make sure you've read the "Welcome" part of the book that contains these chapters:
These chapters don't involve writing code, so they won't be covered in this challenge. This challenge will start from chapter 4, Scanning.
This challenge follows the book Crafting Interpreters by Robert Nystrom.
In this challenge you'll build an interpreter for Lox, a simple scripting language. Along the way, you'll learn about tokenization, ASTs, tree-walk interpreters and more.
Before starting this challenge, make sure you've read the "Welcome" part of the book that contains these chapters:
These chapters don't involve writing code, so they won't be covered in this challenge. This challenge will start from chapter 4, Scanning.
This extension covers chapters 5 & 6 of the book (Representing Code & Parsing Expressions).
In this extension, you'll add the ability to parse expressions.
This extension covers chapters 7 of the book (Evaluating Expressions).
In this extension, you'll add the ability to evaluate expressions.
This extension covers chapters 8 of the book (Statements & State).
In this extension, you'll add the ability to add internal state to your interpreter & produce output.
This extension covers chapters 9 of the book (Control Flow).
In this extension, you'll add the ability to handle control flow statements like if/else, while & for.
This extension covers chapters 10 of the book (Functions).
In this extension, you'll add the ability to handle lox native functions & user-defined functions.
This extension covers chapters 11 of the book (Resolving & Binding).
In this extension, you'll add the ability to semantically analyze variable declarations and resolve variable bindings at compile time.
This extension covers chapters 12 of the book (Classes).
In this extension, you'll add the ability to handle lox classes, instances, constructors and methods.
This extension covers chapters 13 of the book (Inheritance).
In this extension, you'll add the ability to handle class inheritance, method overriding and the super keyword.
Ananthalakshmi Sankar
Automation Engineer at Apple
“
I think the instant feedback right there in the git push is really cool.
Didn't even know that was possible!
Patrick Burris
Senior Software Developer, CenturyLink