Reproduce “LL(1) Parsing with Derivatives and Zippers” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Romain Edelmann, Jad Hamza, Viktor Kunčak

Researchers at EPFL developed and formally verified a functional LL(1) parsing algorithm that uses formal language derivatives and a zipper-inspired data structure. This approach achieves linear-time performance and provides static LL(1) property checks and advanced error recovery within a Scala parser combinator framework.

Key insights

  • Propagator networks enable efficient, linear-time computation of all necessary LL(1) grammar properties, including productivity, nullability, first sets, and the novel should-not-follow sets.
  • The use of a zipper-inspired "focused syntax" data structure effectively transforms the efficiency of derivative-based parsing for LL(1) languages from potentially quadratic or cubic to predictable linear-time performance.
  • Explicitly encoding the parser state as a derived expression simplifies formal reasoning, aids implementation, and naturally supports advanced features such as parsing resumption and detailed error reporting.
  • Formal verification in Coq provides strong guarantees of the parser's correctness, making it suitable for high-assurance applications while demonstrating how rigorous theory can yield practical, efficient solutions.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.