Welcome! In this document we try to delineate a clear roadmap for people and/or students who want to get into what it takes to engineer and build Compiler Software.
This guide is intended for people who already have a general understanding of:
- Programming using general-purpose low-level languages (C, C++, Rust)
- Understanding of basic operating systems architectures
- Basic computer architectures (preferably x86)
- Algorithms and Data Structures
The following is a collection of "free" online resources meant to build a general understanding of how a compiler works. We also provide a series of PROJECTS to test and apply your knowledge.
YOU ARE STRONGLY ENCOURAGED to not only build projects mindlessly but to actually understand the basics of the theory first.
The following books are to be read in the specified order:
- Robert Nystrom - Crafting Interpreters — A great book that teaches you how to build an interpreter from scratch using Java and C.
- Keith Cooper, Linda Torczon - Engineering a Compiler — A comprehensive, modern book on compiler design and implementation.
- Muchnick - Advanced Compiler Design and Implementation — An advanced book focused on optimization techniques.
Note: links are not official so they are not guaranteed to work...
- Cormen - Introduction to Algorithms
- Aho, Sethi, Ullman - Compilers: Principles, Techniques, and Tools — The classic "Dragon Book" on compiler construction. Although foundational, it is somewhat dated.
- The Official LLVM Channel - A collection of videos about the LLVM Compiler Infrastructure Project
- Writing a C Interpreter
- Making a programming language in Python - Porth
- Learning Compilers
- Compiler Explorer (Godbolt) - An amazing online tool to see how different compilers compile code snippets in different languages and with different optimization levels.