For a project-based way to learn compilers, the strongest matches are doctorwkt/acwj (doctorwkt/acwj is a step-by-step compiler construction tutorial that builds), thejameskyle/the-super-tiny-compiler (The Super Tiny Compiler is exactly what it sounds) and jetbrains/kotlin (Kotlin is a production compiler and language, not an). php/php-src and jamiebuilds/the-super-tiny-compiler round out the shortlist. Each is ranked by relevance to your query, popularity and recent activity.
Step-by-step tutorials and resources for building custom programming language compilers and interpreters from scratch.
This project is a compiler development tutorial that provides a series of guides and exercises for building a complete compiler from scratch. It focuses on the implementation of a structured compilation pipeline to transform high-level source code into executable machine instructions. The project covers the creation of a machine code generator for specific processor architectures and a static analysis framework. This framework includes methodologies for implementing type checking and constant folding to verify logic correctness before the final execution phase. The instructional material enc
doctorwkt/acwj is a step-by-step compiler construction tutorial that builds a complete compiler from scratch, covering incremental implementation, lexing, parsing, code generation, and self-hosting, making it exactly what this search asks for.
This project is an educational compiler implementation and a minimalist compiler construction tutorial. It serves as a practical example of how to build a functional compiler through a simplified end-to-end development process, transforming source code into executable instructions. The implementation is designed to teach the fundamentals of language implementation and compiler design. It focuses on the essential mechanics of transforming source code by demonstrating the core architecture of a translation process. The system covers the primary stages of compilation, including lexical analysis
The Super Tiny Compiler is exactly what it sounds like — a minimalist, educational guide that incrementally walks through lexing, parsing, AST building, and code generation, making it a perfect hands-on resource for learning compiler construction step by step.
Kotlin is a statically typed, general-purpose programming language designed for type safety and concise syntax. It functions as a cross-platform development toolkit that enables the sharing of business logic across mobile, web, and server-side environments by compiling a unified intermediate representation into platform-specific machine code, bytecode, or source code. The project distinguishes itself through a multi-target build orchestration model that manages complex compilation units and hierarchical source sets. Developers can define common interface logic that is satisfied by platform-sp
Kotlin is a production compiler and language, not an educational guide; it doesn’t teach the step-by-step process of building a compiler incrementally from scratch, so it does not fit this search for a teaching resource.
This project is the core source code for a general-purpose, server-side scripting language designed for web development. It provides a high-performance execution engine that parses and runs scripts to generate dynamic content, supported by a comprehensive standard library for data manipulation, networking, and system interaction. The repository serves as an open-source development platform where the language runtime and its interpreter are built, maintained, and evolved through community-driven governance. The runtime is powered by a stack-based virtual machine that executes compiled bytecode
php-src is the actual source code of the PHP interpreter and runtime, not a structured, educational guide for learning how to build a compiler step by step; it is a real-world implementation rather than a tutorial or incremental learning resource.
This project is an educational compiler implementation and architecture demo. It serves as a small-scale C-style language compiler designed to demonstrate the fundamental stages of transforming source code into executable machine instructions. The codebase functions as a tool for compiler architecture education and design prototyping. It illustrates the process of building an educational language implementation to help users understand the mechanics of parsing and code generation. The implementation covers the primary stages of a compiler pipeline, including regular expression tokenization,
The Super Tiny Compiler is an educational compiler demo that illustrates the pipeline in a single file, but it is a reference implementation rather than a structured step-by-step guide to building one incrementally from scratch.
This project is an educational blog and learning resource dedicated to the Rust programming language. It provides a collection of curated guides, technical articles, and structured learning paths designed to teach language fundamentals, concurrency, and systems programming. The repository distinguishes itself by offering practical implementation tutorials for complex systems. This includes detailed guides on compiler development—specifically translating source code into targets such as ARM64, x86_64, LLVM IR, and WebAssembly—as well as networking examples for building multithreaded chat serve
This is a Rust blog containing some compiler development articles, but it is not a dedicated step-by-step compiler construction guide; it is a collection of posts rather than a structured incremental tutorial.