Fast & Easy ASTs for Flexible Embedded Interpreters
summary
Claim that a carefully engineered textual AST format lets a language ship its entire parser and libraries as textually identical ASTs that are valid across many hosts. Implementation uses a single shared Grace parser and the GraceKit workflow to embed ASTs directly into source in Java, JavaScript, Haskell, Swift and even Excel, producing runnable interpreters and ahead‑of‑time Java artifacts. Demonstrated loading the Grace parser and standard library as AST files, running examples and producing working outputs.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 1:02Hardcoding Lisp reader
- 2:25Developing Grace language
- 4:08ALGOL is C
- 6:19Why obvious in hindsight
- 7:20Haskell AST nodes
- 8:46AST interpreter projects
- 10:08Grace syntax compatibility
- 11:12Fast easy ASTs
- 12:21Live AST demo
related talks
27mAST Meta-programming
44mJavaScript AST programming: Introduction and beyond
29mMy Little Parser: Tooling is Magic
45mInvertible Programs
31mThe AST Galaxy to the Virtual Machine Blues
17mAST vs. Bytecode: Interpreters in the Age of Meta-Compilation
29mAutomatically Generated Supernodes for AST Interpreters Improve Virtual-machine P...
27mASTro: An AST-based Reusable Optimization Framework
