Busy Developer's Guide to Building Languages
summary
Step‑by‑step primer showing lexer → parser → AST → IR → analysis → codegen, using ANTLR to generate a parser and visitor that evaluates a simple calculator example with integer variables stored in a hashmap environment and newline‑delimited statements, alternatives of interpreter vs transpiler vs JVM/CLR bytecode, and tools like ASM and StringTemplate for generation; claim that a minimal language can be prototyped in a day and extended (floats, functions, optimizations) and that the approach works for real transpilers and DSLs.
AI-written summary · about
chapters (31)
- 0:00Intro
- 0:42Expectations
- 3:01Optimization
- 9:19State Machines
- 9:57Business Rules
- 11:13User Interface
- 11:58User Interface Template
- 12:29Security
- 14:26Gradle
- 16:52Tools
- 18:58Four Parts
- 22:00Lexing and Parsing
- 26:04AST
- 28:51Direct Executable
- 30:07Lexing
- 30:48Grammar
- 34:25The Grammar
- 35:53The Parser Generator
- 38:35Alternative Formats
- 39:16XML Schema
- 40:05Parser
- 42:40Intermediate Representation
- 43:27Optimizations
- 44:20Environments
- 45:12Dynamic Types
- 45:50Example
- 47:25Antler
- 49:15Statement
- 51:55eval
- 54:03multiplication division
- 54:30pipeline
