Implementation tools

Lingua.NET: Discontinued/archived CodePlex parser generator. Archived content copied locally here.

GCC Front-end HOWTO: How to build a GCC front-end (so GCC can take care of the rest)

Background, Books, Lists

68 resources on creating programming languages

Awesome Compilers

A Compiler Writing Journey

An Incremental Approach to Compiler Construction: Scheme and Functional Programming 2006; Abdulaziz Ghuloum -- Github Step-by-step development of a Scheme-to-x86 compiler

An Introduction to GCC - Brian Gough

Basics of Compiler Design (Anniversary Edition) - Torben Mogensen

Compiler Design in C (1990) - Allen Holub, Prentice Hall

Compiler Design: Theory, Tools, and Examples, C/C++ Edition - Seth D. Bergmann (PDF)

Compiler Design: Theory, Tools, and Examples, Java Edition - Seth D. Bergmann (PDF)

Computer Language Notes: Compilers and Interpreters

Compiling Scala for the Java Virtual Machine - Michel Schinz (PDF)

Compiling Techniques (1969) - F.R.A. Hopgood, Macdonald

Essentials of Compilation: An Incremental Approach by Siek, Newton: A book about compiling Racket to x86-64 assembly

Essentials of Programming Languages: EOPL, as it’s better known, introduces readers to the internal workings of programming languages by describing small programming languages and creating an interpreter for each one. The book is very hands-on, with lots of exercises for the reader to modify the interpreters with new features. It touches on the ideas of reasoning about languages and formal semantics, but mostly sticks to the interpreter-as-semantics approach.

How to Design Programs

Implementing Functional Languages: A Tutorial - Simon Peyton Jones, David Lester

Introduction to Compilers and Language Design | Introduction to Compilers and Language Design - Douglas Thain (PDF)

Let's Build a Compiler (PDF)

Practical and Theoretical Aspects of Compiler Construction (class lectures and slides)

Programming Language Pragmatics by Michael L Scott. Covers theoretical background behind languages beyond syntax.

Programming Languages: Application and Interpretation

Programming languages and techniques (PDF)

Resources for Amateur Compiler Writers

Semantics Engineering with PLT Redex: The PhD-level programming languages course at Northeastern uses the Redex book, and I found it to be a good introduction. The tool itself (Redex) is a great way to experiment with semantics, including reduction relations (roughly, the part of the semantics that says how the program runs) and type systems. You could use this book as a substitute for TAPL (at least for learning the basics of formal semantics), or you could use Redex to experiment with the languages described in TAPL.

mpri-2.4-public: Resources for course MPRI 2-4 on functional programming and type systems.

Lists of recommended reading

GCC Wiki - List of compiler books | Jordan Rose (Swift team) recommendations | | Jonathan Turner’s Reading List: Turner is an engineer on Mozilla’s Rust team and recently posted his reading list for getting up-to-speed on programming languages. The list starts with some resources on how to build interpreters and compilers, but also points to more academic material later. | 10PL: This is a list compiled by Northeastern’s PL faculty of (roughly) ten academic papers that they think every student in PL should know. Not all of them are PL papers themselves, and they don’t form a full foundation on their own, but they form a kind of “great books” list for PL. | Benjamin Pierce, the author of TAPL, also has a similar list (although with a slightly more type-heavy and theoretical bent). | Classic Papers in Programming Languages and Logic by Karl Crary

Tutorials/Intros/Walkthroughs Online Training for Extending Compilers Github:
- Clang/LLVM Tutorials
- Alok Mishra, Anjia Wang, Chunhua Liao, Yonghong Yan, Barbara Chapman
- Training for OpenMP Compiler Development from Cloud

College/University Courses

Functional programming and type systems; supplemental repo

Stanford OpenEdX: Compilers - Alex Aiken

Brown CS: CSCI 1730: Programming Languages Videos

OPLSS (Oregon Programming Languages Summer School)
- 2019-2017, 2003:
- 2016-2015:
- free video lectures available, including the introductory ones based on Practical Foundations for Programming Languages:

Principles of Programming Languages

Programming Language Implementation Summer School (PLISS) YouTube

University of Utah: Advanced Compilers - John Regehr
- Weeks 1 and 2:
- Weeks 3-5:

UW professor Dan Grossman's teaching materials

UW CSE CSEP 501: Compilers - Hal Perkins
- Winter 2018
- Homepage:
- Lecture Videos:
- Winter 2016
- Homepage:
- Playlist:
- Topics:

SFU CMPT 886: Program Analysis and Reliability - Nick Sumner, Spring 2015 YouTube playlist

UCB CS294-113: Virtual Machines and Managed Runtimes
- A Concise and Opinionated History of Virtual Machines or YouTube
- Virtual Machines Summer School 2016

UCSD CSE 131: Compiler Construction
- Fall 2019; Joseph Gibbs Politz
- Winter 2018; Ranjit Jhala

UCSD CSE 231: Advanced Compiler Design
- Winter 2019; Sorin Lerner

NPTEL: Compiler Design (YouTube playlist): 2011; Y.N. Srikant


Interview with Jesper Louis Andsersen about a ton of languages. | "Less is more: language features" | "Languages I want to write" | "A wish list for a new programming language"

Implementation and Optimization

Escape analysis

Escape analysis is an optimization for identifying objects which do not escape the dynamic extent of a function; such objects can be stack-allocated, or 'flattened' so that usages of them are replaced with a series of local variables (the latter optimization is known as "scalar replacement").

An overview of the escape analysis algorithm used in Factor's Optimizing compiler:

Register allocation

Static Single Assignment (SSA)

Instruction selection

Notes on Graph Algorithms Used in Optimizing Compilers - Carl Offner



Pre-defined Compiler Macros -
- Architectures -
- Compilers -
- Endianness -
- Language Standards -
- Operating Systems -
- Standard Libraries -

SPY: Friendly Neighborhood C++17 Constexpr Predef Wrapper
- OS, compiler, libc, stdlib detection


Compilers Call For Papers for Conferences, Workshops and Journals at WikiCFP -

Computer Architecture and Compilers Conference Map -











Tags: language   reading   llvm   native  

Last modified 06 October 2022