Zippy LL(1) parsing with derivatives
Romain Edelmann, Jad Hamza, Viktor Kuncak
摘要
In this paper, we present an efficient, functional, and formally verified parsing algorithm for LL(1) context-free expressions based on the concept of derivatives of formal languages. Parsing with derivatives is an elegant parsing technique, which, in the general case, suffers from cubic worst-case time complexity and slow performance in practice. We specialise the parsing with derivatives algorithm to LL(1) context-free expressions, where alternatives can be chosen given a single token of lookahead. We formalise the notion of LL(1) expressions and show how to efficiently check the LL(1) property. Next, we present a novel linear-time parsing with derivatives algorithm for LL(1) expressions operating on a zipperinspired data structure. We prove the algorithm correct in Coq and present an implementation as a part of Scallion, a parser combinators framework in Scala with enumeration and pretty printing capabilities. CCS Concepts: • Software and its engineering → Parsers; • Theory of computation → Grammars and context-free languages; Logic and verification; Design and analysis of algorithms.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了最后一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper5
- A derivative-based parser generator for visibly Pushdown grammarsXiaodong Jia, Ashish Kumar, Gang TanOOPSLA 2021 · 被引用 7 次
- Linear Layouts: Robust Code Generation of Efficient Tensor Computation Using F_2Keren Zhou, Mario Lezcano Casado, Adam P. Goucher, Akhmed Rakhmati 等ASPLOS 2026 · 被引用 3 次
- ChopChop: A Programmable Framework for Semantically Constraining the Output of Language ModelsShaan Nagy, Timothy Zhou, Nadia Polikarpova, Loris D'AntoniPOPL 2026 · 被引用 1 次
- Intrinsic Verification of Parsers and Formal Grammar Theory in Dependent Lambek CalculusSteven Schaefer, Nathan Varner, Pedro Henrique Azevedo de Amorim, Max S. NewPLDI 2025
- Formally Verified Linear-Time Invertible LexingSamuel Chassot, Viktor KuncakCAV 2026
它引用的顶会 Paper1
相关 Paper
- Faster general parsing through context-free memoizationGrzegorz HermanPLDI 2020 · 被引用 4 次
- flap: A Deterministic Parser with Fused LexingJeremy Yallop, Ningning Xie, Neel KrishnaswamiPLDI 2023 · 被引用 10 次
- Scalable Verification of Zero-Knowledge ProtocolsMiguel Isabel, Clara Rodríguez-Núñez, Albert RubioS&P 2024 · 被引用 14 次
- CoStar: a verified ALL(*) parserSam Lasser, Chris Casinghino, Kathleen Fisher, Cody RouxPLDI 2021 · 被引用 10 次
- Parsing randomnessHarrison Goldstein, Benjamin C. PierceOOPSLA 2022 · 被引用 11 次
