How to Make a Programming Language
summary
Shows how to build a tiny language using the Nearley parser generator to produce an AST, then transpiles to JavaScript as the execution target. Grammar supports integers, decimals, identifiers, binary operators + - × ÷, assignment with :=, print and a while loop; generator emits let versus assignment tracking declarations. The live demo implements Fibonacci (n=10) end-to-end and runs successfully, and the repo/tooling are produced during the demo.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 0:55What is a compiler
- 3:23User code
- 12:38Parser
- 17:28ContextFree Grammar
- 19:38Parse
- 22:26Variable Assignment
- 24:28New Syntax
- 27:50Binary Expressions
- 36:37Reparse
- 41:16Wild Loop
related talks
14mExample-Based Live Programming for Everyone: Building Language-Agnostic Tools for Live Programming w
44mJavaScript AST programming: Introduction and beyond
50mSyntaxation
20mWriting a Compiler in Node.js using Streams
46mInventing a language (placeholder title)
01h 00mHow to create a new JVM language
32mBuilding a Beginner's Programming Language with Go
37mProgramming a Language
