Linear Parsing Expression Grammars
Nariyoshi Chida, Kimio Kuramitsu

TL;DR
This paper introduces Linear PEGs, a subclass of Parsing Expression Grammars that are equivalent to DFAs, enabling a formal and syntactical approach to their analysis and application.
Contribution
The paper defines Linear PEGs, a new subclass of PEGs that are equivalent to DFAs, simplifying their analysis and bridging PEGs with regular grammar theory.
Findings
LPEGs are equivalent to DFAs.
LPEGs exclude certain recursive patterns in PEGs.
Syntactical judgment of parsing expressions is possible for LPEGs.
Abstract
PEGs were formalized by Ford in 2004, and have several pragmatic operators (such as ordered choice and unlimited lookahead) for better expressing modern programming language syntax. Since these operators are not explicitly defined in the classic formal language theory, it is significant and still challenging to argue PEGs' expressiveness in the context of formal language theory.Since PEGs are relatively new, there are several unsolved problems.One of the problems is revealing a subclass of PEGs that is equivalent to DFAs. This allows application of some techniques from the theory of regular grammar to PEGs. In this paper, we define Linear PEGs (LPEGs), a subclass of PEGs that is equivalent to DFAs. Surprisingly, LPEGs are formalized by only excluding some patterns of recursive nonterminal in PEGs, and include the full set of ordered choice, unlimited lookahead, and greedy repetition,…
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 · Logic, programming, and type systems · semigroups and automata theory
