The LL(finite) strategy for optimal LL(k) parsing
Peter Belcak

TL;DR
This paper introduces the LL(finite) parsing strategy that efficiently handles LL(k) grammars with unknown k, using minimal lookahead, and demonstrates its implementation in an open-source parser generator.
Contribution
The paper presents a novel LL(finite) parsing strategy that does not require prior knowledge of k and optimally uses minimal lookahead for LL(k) parsing.
Findings
Linear time parsing performance
Minimal lookahead for disambiguation
Implementation in open-source parser generator Astir
Abstract
The LL(finite) parsing strategy for parsing of LL(k) grammars where k needs not to be known is presented. The strategy parses input in linear time, uses arbitrary but always minimal lookahead necessary to disambiguate between alternatives of nonterminals, and it is optimal in the number of lookahead terminal scans performed. Modifications to the algorithm are shown that allow for resolution of grammar ambiguities by precedence -- effectively interpreting the input as a parsing expression grammar -- as well as for the use of predicates, and a proof of concept, the open-source parser generator Astir, employs the LL(finite) strategy in the output it generates.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsNatural Language Processing Techniques · semigroups and automata theory · Algorithms and Data Compression
