A Tour to the Realm of Parsing Expressions Expressions

by Sérgio Queiroz de Medeiros
DiverSE Coffee
Rennes, France


Parsing Expression Grammars (PEGs), similarly to Context-Free Grammars (CFGs), is a formalism to describe languages and their associated parsers. As PEGs can not describe ambiguity, PEG-based parsers are always deterministic. This feature of PEGs makes easy to address issues such as the dangling-else problem, but may lead to parsers that only recognize a prefix of the intended language.

In this talk, we will present an overview of PEGs, showing some of its similarities and differences in comparison with CFGs. We will also discuss how we can extend PEGs in order to get parsers with better error reporting and recovery.