Wiki › Project
Lox interpreter
Article
ReadAll pages
From Chaipat's knowledge graph
Lox interpreter is his solution, in Kotlin, to CodeCrafters' "Build your own interpreter" challenge. Lox is the small scripting language from Robert Nystrom's book Crafting Interpreters.
What's built
The code follows the first stages of an interpreter:
- a lexer that turns source text into tokens;
- a parser that turns tokens into an expression tree;
- an AST printer that shows the parsed tree, with expressions walked through the visitor pattern.
A test script runs a sample .lox file.