Parser Combinators for Ambiguous Left-Recursive Grammars

Parser combinators are higher-order functions used to build parsers as executable specifications of grammars. Some existing implementations are only able to handle limited ambiguity, some have exponential time and/or space complexity for ambiguous input, most cannot accommodate left-recursive grammars. This paper describes combinators, implemented in Haskell, which overcome all of these limitations.

[1]  E. Meijer,et al.  Monadic parser combinators , 1996 .

[2]  Jon Fairbairn Making form follow function: An exercise in functional programming style , 1987, Softw. Pract. Exp..

[3]  Richard A. Frost,et al.  Modular and Efficient Top-Down Parsing for Ambiguous Left-Recursive Grammars , 2007, IWPT.

[4]  Daan Leijen,et al.  Parsec: direct style monadic parser combinators for the real world , 2001 .

[5]  Mark Johnson,et al.  SQUIBS AND DISCUSSIONS : MEMORIZATION IN TOP-DOWN PARSING , 1995 .

[6]  Jay Earley,et al.  An efficient context-free parsing algorithm , 1970, Commun. ACM.

[7]  Masaru Tomita,et al.  Efficient Parsing for Natural Language: A Fast Algorithm for Practical Systems , 1985 .

[8]  Mark Johnson,et al.  Squibs and Discussions: Memoization in Top-Down Parsing , 1995, CL.

[9]  Mark-Jan Nederhof A New Top-Down Parsing Algorithm for Left-Recursive DCGs , 1993, PLILP.

[10]  Susumu Kuno,et al.  The augmented predictive analyzer for context-free languages—its relative efficiency , 1966, CACM.

[11]  Alfred V. Aho,et al.  The Theory of Parsing, Translation, and Compiling , 1972 .

[12]  Richard A. Frost,et al.  Realization of natural language interfaces using lazy functional programming , 2006, CSUR.

[13]  Otto C. Juelich,et al.  On the recursive programming techniques , 1964, CACM.

[14]  Graham Hutton,et al.  Monadic parsing in Haskell , 1998, Journal of Functional Programming.

[15]  Richard A. Frost Using memorization to achieve polynomial complexity of purely functional executable specifications of non-deterministic top-down parsers , 1994, SIGP.

[16]  Peter Norvig,et al.  Techniques for Automatic Memoization with Applications to Context-Free Parsing , 1991, CL.

[17]  Joyce L. Vedral,et al.  Functional Programming Languages and Computer Architecture , 1989, Lecture Notes in Computer Science.

[18]  Bryan Ford,et al.  Packrat parsing:: simple, powerful, lazy, linear time, functional pearl , 2002, ICFP '02.

[19]  Bryan Ford,et al.  Packrat Parsing: Simple, Powerful, Lazy, Linear Time , 2006, ICFP 2002.

[20]  John Carroll Efficiency in Large-scale Parsing Systems - Parser Comparison. Evaluation Methodology and Data , 2001 .

[21]  Philip Wadler,et al.  Packrat parsing:: simple, powerful, lazy, linear time, functional pearl , 2002, ICFP '02.

[22]  Richard A. Frost,et al.  A new top-down parsing algorithm to accommodate ambiguity and left recursion in polynomial time , 2006, SIGP.

[23]  Alfred V. Aho,et al.  The theory of parsing, translation, and compiling. 1: Parsing , 1972 .