The Parsers of Hanoi
Blog post from Axiom
Axiom rewrote the parsing stack for its open-source Metrics Processing Language (MPL), replacing the pest parser generator with a hand-built system after discovering that pest’s rapid-development advantages did not extend easily to features such as resilient error recovery, syntax highlighting, and code formatting. Rather than framing the change as a simple technological upgrade, the account emphasizes that pest helped the team learn MPL’s requirements and identify the limitations of maintaining separate lexer, parser, and formatter implementations. The new design uses a stateful lexer capable of handling nested string interpolation, Rust Analyzer’s rowan crate to construct a lossless syntax tree that preserves every byte of source input including whitespace and comments, and a final transformation into an abstract syntax tree for execution. Each stage handles a distinct category of errors—invalid lexemes, syntactic problems, and semantic rule violations—allowing later stages to rely on guarantees from earlier ones while supporting recovery beyond the first error. Although error recovery still needs refinement, the architecture is intended to make it easier to improve, and an interactive WebAssembly playground demonstrates the real MPL lexer, parser, and interpreter in a browser.
No tracked trend matches for this post yet.
Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.