Lox is a simple, dynamically typed programming language created by Robert Nystrom for editorial purposes. This repository showcases different approaches to implementing an interpreter for Lox.
The first two folders contain interpreters developed following comprehensive instructions from 'Crafting Interpreters'. The third folder contains a work-in-progress implementation of Lox-to-JVM bytecode compiler.
- jlox: A tree-walk interpreter implemented in Java. It focuses on high-level concepts and language features.
- clox: A fast interpreter inspired by Lua implemented in C. It focuses on memory management and efficient bytecode evaluation.
- rlc: Rudny Lox Compiler (work-in-progress) implemented in Kotlin. It translates Lox code to JVM bytecode, executable by any Java Virtual Machine version 11 or newer.
The tests are borrowed from the original Crafting Interpreters repository and cover all possible aspects of Lox.
To be written. Someday.
All contributions and suggestions are welcome. You can always suggest a merge request and report an issue.
All implementations are licensed under the BSD-3-clause license. See LICENSE for details.
If you are doing something interesting based on my work, please let me know. Maybe I can help with something.
Feel free to reach out:
Email: nefedov.alexander91@yandex.ru
GitHub: montreal91