feniljain / oxy

Programming language implemented in Rust and C

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Oxy

About

  • A toy language implemented as a learning exercise and kinda code along for an amazing book CraftingInterpreters

  • It is a sweet spot between javascript/java/lua/ruby/python being dynamic and garbage collected and semantic features from all

  • It contains two interpreters:

    • A Tree-walk interpreter implemented in Rust (named roxy)
    • A Bytecode interpreter implemented in C (named coxy)

    (Ah yes I know I should have given more thought while naming it)

Running the interpreters:

  • Rust:

From the root of the project run:

cargo run -- <filename>
  • C:

From the bytecode-interpreter/ dir run:

make compile
./coxy <filename>

Lox Programs:

  • Wanna explore the language?

    • Check the examples/ dir

Language Grammar:

  • Language grammar can be found in src/parser/parser.rs

About

Programming language implemented in Rust and C


Languages

Language:Rust 60.3%Language:C 38.9%Language:Makefile 0.8%