Lune

PLDI2023顶会

flap: A Deterministic Parser with Fused Lexing

Jeremy Yallop, Ningning Xie, Neel Krishnaswami

摘要

Lexers and parsers are typically defined separately and connected by a token stream. This separate definition is important for modularity and reduces the potential for parsing ambiguity. However, materializing tokens as data structures and case-switching on tokens comes with a cost.

We show how to fuse separately-defined lexers and parsers, drastically improving performance without compromising modularity or increasing ambiguity. We propose a deterministic variant of Greibach Normal Form that ensures deterministic parsing with a single token of lookahead and makes fusion strikingly simple, and prove that normalizing context free expressions into the deterministic normal form is semantics-preserving. Our staged parser combinator library, flap, provides a standard interface, but generates specialized token-free code that runs two to six times faster than ocamlyacc on a range of benchmarks.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 2 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper2

  1. Handling Scope Checks: A Comparative Framework for Dynamic Scope Extrusion ChecksMichael Lee, Ningning Xie, Oleg Kiselyov, Jeremy YallopPOPL 2026 · 3 次引用
  2. Fail Faster: Staging and Fast Randomness for High-Performance PBTCynthia Richey, Joseph W. Cutler, Harrison Goldstein, Benjamin C. PierceOOPSLA 2026 · 1 次引用

它引用的 Paper1

  1. A practical mode system for recursive definitionsAlban Reynaud, Gabriel Scherer, Jeremy YallopPOPL 2021 · 2 次引用

相关 Paper

  1. Statically Resolvable AmbiguityViktor Palmkvist, Elias Castegren, Philipp Haller, David BromanPOPL 2023 · 1 次引用
  2. Zippy LL(1) parsing with derivativesRomain Edelmann, Jad Hamza, Viktor KuncakPLDI 2020 · 13 次引用
  3. Faster general parsing through context-free memoizationGrzegorz HermanPLDI 2020 · 4 次引用
  4. Intrinsic Verification of Parsers and Formal Grammar Theory in Dependent Lambek CalculusSteven Schaefer, Nathan Varner, Pedro Henrique Azevedo de Amorim, Max S. NewPLDI 2025
  5. MRL Parsing Without Tears: The Case of HebrewShaltiel Shmidman, Avi Shmidman, Moshe Koppel, Reut TsarfatyACL Findings 2024 · 1 次引用
黄昏的海面,两侧是细线勾勒的悬崖