Arith

Arith is a deep dive into compiler design, implementing a full interpretation pipeline from lexical analysis and parsing to bytecode compilation and execution on a custom stack-based virtual machine.

Architectural Achievements

  • Hand-written Lexer & Pratt Parser: Built from first principles to construct a robust Abstract Syntax Tree (AST).
  • Two-Phase Execution Engine: lowered the AST into a custom bytecode instruction set (IR) for performance, exceeding the capabilities of simple tree-walking interpreters.
  • Bytecode & VM: A stack-based virtual machine (VM) executes the compiled instructions, demonstrating a sophisticated understanding of language implementation.
  • Precise Error Handling: A multi-layered system provides user-friendly feedback with exact line and column numbers.

Built with Rust for high performance and memory safety.

View Project