Skip to content

Lox language implementations: a Java tree-walking interpreter (jlox) and a C bytecode VM (clox), following Crafting Interpreters.

Notifications You must be signed in to change notification settings

atareversei/lox-language

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 

Repository files navigation

Lox — jlox & clox

This repository contains two implementations of the Lox language from Robert Nystrom’s Crafting Interpreters:

  • jlox — a tree-walking interpreter implemented in Java.
  • clox — a bytecode compiler and virtual machine implemented in C.

Requirements

  • Java 11+ for jlox
  • C compiler (GCC, Clang, or MSVC) and CMake for clox

Learning goals

Part Focus Key Topics
jlox Simplicity & clarity Lexing, Parsing, ASTs, Interpreter, Resolver
clox Performance & internals Bytecode, VM loop, Stack frames, Compiler, GC

Current progress

jlox

  • Scanner
  • Parser
  • Interpreter
  • Classes & inheritance

clox

  • Chunk & disassembler
  • VM dispatch loop
  • Compiler
  • Closures
  • Garbage Collextion
  • Classes & inheritance
  • Optimization

References

About

Lox language implementations: a Java tree-walking interpreter (jlox) and a C bytecode VM (clox), following Crafting Interpreters.

Topics

Resources

Stars

Watchers

Forks