Learning how to build languages

Probably you are trying to learn building languages.

I went down that road a number of years ago.

Chances are that you, like me, having been frustrated by:

  • Tutorials that are too theoretical: where is the code?
  • Outdated resources: I am happy this used to work on a compiler of 20 years ago but it does not compile on my machine
  • No big picture: you find some tutorials on parsers and some about compilers, but where are the resources giving you the whole map?

What resources you will find here

So I thought I could help by creating these resources:

  • a book: everything is ready for you to learn following a well-organized plan, so that you can focus on the real stuff: building great languages
  • a checklist of the 5 most important things to get right when building a language
  • a course: if you do not want to buy the book you can follow a series of posts which should help you getting started
  • dozens of posts discussing all sorts of topics related to building languages

Whichever path you pick, these resources should help you get started. If you feel something is missing, or you do not know where to start from, feel free to write to [email protected]. I will do my best to help you.

Book: How to create pragmatic, lightweight languages

How to Create Pragmatic, Lightweight Languages

This book explains how to build languages. The goal here is to end up with something that will be of use in practice. A real language, with an efficient parser and a complete compiler. A language with its own editor. This is not about building toys.

The approach described is based on reusing open-source components, and to organize and combine them to get something real with a limited amount of effort. Do you think it is not possible to build a parser, an interpreter, an editor and a simulator in less than 1.000 lines of code? Think again.

When I was learning how to build languages I was disappointed: I just found some basic tutorials here and there but what was missing was a complete course, organized to lead me from the very beginning to the end. Also, all approaches seemed so theoretical: a lot of words and not enough code.

Checklist: 5 things to get right when building a language

Powered by ConvertKit

Free course

More posts