Kingdom of the Machine: The Tale of Operators and Commands
summary
Compares hand‑written Pratt/recursive‑descent parsing used in Prism with generator approaches and shows three concrete pain points: TokenBeginsExpressionP that must enumerate ~100 tokens to decide endless range and return behavior, parseExpressionTerminator that inspects node kinds to reject invalid command positions, and operator binding power that breaks when precedence changes by context. Runs GPT‑5.4 to propose grammar and action rewrites and accepts its patch‑style LALR changes as "reasonably working" while noting the AI misses some corner cases.
AI-written summary · about
chapters (10)
- 0:00Introduction to the kingdom
- 1:38Pratt parser basics and issues
- 6:17TokenBeginsExpressionP function
- 12:07Parse expression terminator
- 13:57Postfix rescue and binding power
- 16:14Three layers of parser knowledge
- 19:09Grammar ambiguity in Go
- 23:11Ambiguity in Ruby patterns
- 24:17AI and grammar fixes
- 28:46Conclusion and future
related talks
36mRethinking legacy modernisation with automated reasoning and comprehension models
50mFrom Prompt Hacking to Architectural Determinism: Engineering Reliable GenAI Systems
26mInfinite Possibilities
45mAI agents in practice - beyond the prototype
22mProgram Synthesis for Artifacts beyond Programs
45mTrusting AI to Modernize Software at Scale
56mInterpreter Pattern In Light of Java 21
46mUsing AI in Software Design: How ChatGPT Can Help With Creating a Solution Arch.
