๐Ÿงฌ
๐ŸŽฏ How Programming Languages Work ยท PL-101 ยท Final project

Build a Tiny Language

The ultimate build: create a small but real programming language - lexer, parser, interpreter - that runs programs you write in it.

๐Ÿ“ฆ Deliverable

A small working language of your own (a calculator with variables is a great scope; a little config or domain language is another): a lexer (text -> tokens), a parser (tokens -> AST), and a tree-walking interpreter that runs it, with a few example programs it executes correctly. Plus a short note on your language's design (what it's for, what makes writing in it feel good) and what you learned. Reading larzcalc and larzscript first is strongly encouraged.

Steps

  1. Design your language: write a few example programs first.
  2. Build the lexer: source text -> tokens.
  3. Build the parser: tokens -> a tree (recursive descent).
  4. Build the interpreter: walk the tree and run it.
  5. Grow it a little (variables, then maybe control flow).
  6. Run your example programs; note the design and what you learned.

๐Ÿงฉ Build it with LarzOS

The exact free tools for this project:

๐ŸŽ“ That's the whole course

You've completed How Programming Languages Work (PL-101)

Sessions, assignments and a real project โ€” done. Take these skills into the LarzOS tools and workflows.

Explore the tools โ†’

More in this course

Course home → · Browse all courses →