Compiler for "Easy" language from "Etudes for Programmers" book (1978)
6 months ago
- #programming-language
- #educational
- #compiler
- The repository contains an educational compiler for the Easy programming language, based on the book 'Etudes for Programmers' by Charles Wetherell.
- The compiler is written in TypeScript and emits C code, which is then compiled into native binary using Clang or GCC.
- Easy language follows copy semantics, with deep copies for most operations, except for dynamically-sized arrays which use shallow copies.
- The compiler features a handwritten recursive descent parser and an experimental PEG parser for testing purposes.
- Includes a test pipeline with various well-known programs like Brainfuck interpreter, Conway's Game of Life, and Eratosthenes Sieve.
- Requires JavaScript runtime (Node 24+ or Bun) and Clang 17+ for operation.
- Supports syntax highlighting for macOS 'cot' editor and VSCode through extensions.
- Educational project aimed at learning compiler implementations and runtimes.