摘要
We present a novel parsing algorithm for all context-free languages. The algorithm features a clean mathematical formulation: parsing is expressed as a series of standard operations on regular languages and relations. Parsing complexity w.r.t. input length matches the state of the art: it is worst-case cubic, quadratic for unambiguous grammars, and linear for LR-regular grammars. What distinguishes our approach is that parsing can be implemented using only immutable, acyclic data structures. We also propose a parsing optimization technique called context-free memoization. It allows handling an overwhelming majority of input symbols using a simple stack and a lookup table, similarly to the operation of a deterministic LR(1) parser. This allows our proof-of-concept implementation to outperform the best current implementations of common generalized parsing algorithms (Earley, GLR, and GLL). Tested on a large Java source corpus, parsing is 3–5 times faster, while recognition—35 times faster.
问 Lune
几分钟看清这篇 Paper 的位置,不用再花一下午。
Lune 能读引用它和与它最相关的顶会 Paper,讲清它说了什么、后来怎样、哪里站不住,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 1 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
引用它的顶会 Paper1
相关 Paper
- Efficient Semiring-Weighted Earley ParsingAndreas Opedal, Ran Zmigrod, Tim Vieira, Ryan Cotterell 等ACL 2023 · 6 次引用
- Zippy LL(1) parsing with derivativesRomain Edelmann, Jad Hamza, Viktor KuncakPLDI 2020 · 13 次引用
- CoStar: a verified ALL(*) parserSam Lasser, Chris Casinghino, Kathleen Fisher, Cody RouxPLDI 2021 · 10 次引用
- Algorithms for Weighted Pushdown AutomataAlexandra Butoi, Brian DuSell, Tim Vieira, Ryan Cotterell 等EMNLP 2022 · 2 次引用
- Learning Highly Recursive Input GrammarsNeil Kulkarni, Caroline Lemieux, Koushik SenASE 2021 · 24 次引用
