How to *be* a Compiler
summary
Shows how to compile 3 lines of Design by Numbers into a hand drawing by implementing concrete steps: a JavaScript lexer that tokenize → parse → transform → generate an AST and emit SVG, using a parser generator called Texas and a live demo named SVG by numbers. Cites a 40‑day self‑hosting C compiler as motivation. The demo runs in the browser, highlights tokens and AST transforms, and reports parser errors, so the pipeline actually works.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 5:35What is Knitting
- 13:57Why Compiler and DSL
- 23:45How to be a Compiler
- 30:44Suggestion
- 30:54JavaScript
- 31:09Language
- 33:34Conclusion
- 34:05Start Small
- 34:32Be a good parser
- 36:03Context is everything








