At SLE in 2014, Ridge presented the P3 combinator library with which parsers can be developed for left-recursive, non-deterministic and ambiguous grammars. A combinator expression in P3 yields a binarised grammar reflecting the expression’s structure. The grammar is given to an underlying, generalised parsing procedure computing all derivations.
In this paper we present a combinator library with a similar architecture to P3, adjusting it to avoid grammar binarisation. Avoiding binarisation has a significant positive effect on the running times of the underlying parsing procedure, which we demonstrate using real-world grammars. Binarisation is avoided by restricting the applicability of combinators, resulting in combinator expressions closely resembling BNF fragments. Usability is recovered by defining coercions that automatically convert expressions where necessary. As the underlying parsing procedure, we use a purely functional variant of generalised top-down (GLL) parsing.
Mon 5 NovDisplayed time zone: Guadalajara, Mexico City, Monterrey change
10:30 - 12:00
|Declarative Specification of Indentation Rules: A Tooling Perspective on Parsing and Pretty-Printing Layout-Sensitive Languages|
Luis Eduardo de Souza Amorim Delft University of Technology, Netherlands, Michael J. Steindorfer Delft University of Technology, Sebastian Erdweg TU Delft, Eelco Visser Delft University of TechnologyLink to publication DOI
|GLL Parsing with Flexible Combinators|
L. Thomas van Binsbergen Royal Holloway University of London, Elizabeth Scott Royal Holloway University of London, Adrian JohnstoneFile Attached
|Morbig: A Static Parser for POSIX Shell |