The computational power of parsing expression grammars
Bruno Loff, Nelma Moreira, Rog\'erio Reis

TL;DR
This paper explores the computational capabilities of parsing expression grammars (PEGs), introducing a new model and demonstrating PEGs' surprising power, including universality and limitations like the absence of a pumping lemma.
Contribution
It introduces the scaffolding automaton model and characterizes PEGs' computational power, revealing their unexpected universality and semantic complexity.
Findings
PEGs can define complex languages like palindromes of power-of-two length
PEGs are computationally universal for certain functions
No pumping lemma exists for PEGs
Abstract
We study the computational power of parsing expression grammars (PEGs). We begin by constructing PEGs with unexpected behaviour, and surprising new examples of languages with PEGs, including the language of palindromes whose length is a power of two, and a binary-counting language. We then propose a new computational model, the scaffolding automaton, and prove that it exactly characterises the computational power of parsing expression grammars (PEGs). Using this characterisation we show that: (*) PEGs have unexpected power and semantics. We present several PEGs with surprising behaviour, and languages which, unexpectedly, have PEGs, including a PEG for the language of palindromes whose length is a power of two. (*) PEGs are computationally `universal', in the following sense: take any computable function ; then there exists a computable function $g:…
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.
