Sunday, June 11, 2017

How to build your own programming language

I've always fascinated in how programming languages are built and have made it into my 2017's new year resolution to learn building one myself. So here are all the notes collected along the way.

My presentation at Malaysia Open Source Conference - How to build your programming language ? I plan to extend this presentation at upcoming PyCon APAC in this August with an example in Python.

A write up in Malay - Bagaimana bahasa pengaturcaraan dibina ?

A series on building simple interpreter in Python by Ruslan Plivak - Let's Build a Simple Interpreter !

A book on writing an interpreter with Go (Golang). I'm still making up my mind whether to buy this or not -

Free book on building interpreter using Java and then C. This is not complete yet but the author also recommend Interpreter book above in his reply to my reddit's comment. (Updates 2020: It's complete now!)

A classic on building compiler, the original essay was using Pascal. This is my first time trying Pascal and to my surprise the example code (from 1986) still compile in the modern FreePascal - Let's Build a Compiler.

A question on reddit on how to build own programming language.

Creating toy programming language using Python PyParsing library.

An Intro to Compilers - A step by step guide on how a simple "Hello World" in C get pre-processed, tokenized, parsed, optimized and finally compiled to machine language using LLVM frontend and backend tools. Very interesting read and easy to understand.

Using Python ply and llvmlite to build programming language.

Programming language zoo -