How to implement a Python-like programming language

PyCon Ireland 2023


Abstract

In this hands-on tutorial, we go over the basic steps needed to create a programming language like Python, from scratch.

Aimed at curious people that have no experience writing interpreters or compilers, this workshop follows the steps needed to implement a programming language from scratch:

  1. we read source code and break it up into tokens;
  2. we parse the sequence of tokens to see if they make sense together and to build a tree representation of the program;
  3. we compile the tree representation into bytecode, just like Python does; and
  4. we interpret the bytecode to run the program.

To attend this workshop, at least 1 year of Python experience is recommended.