Parsec: A practical parser library

Despite the long list of publications on parser combinators, there does not yet exist a monadic parser combinator library that is applicable in real world situations. In particular naive implementations of parser combinators are likely to suffer from space leaks and are often unable to report precise error messages in case of parse errors. The Parsec parser combinator library described in this paper, utilizes a novel implementation technique for space and time efficient parser combinators that in case of a parse error, report both the position of the error as well as all grammar productions that would have been legal at that point in the input.

[1]  William H. Burge,et al.  Recursive Programming Techniques , 1975 .

[2]  P. Wadler How to Replace Failure by a List of Successes: A method for exception handling, backtracking, and pattern matching in lazy functional languages , 1985, FPCA.

[3]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.

[4]  John Hughes,et al.  Why Functional Programming Matters , 1989, Comput. J..

[5]  Philip Wadler,et al.  Theorems for free! , 1989, FPCA.

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

[7]  Graham Hutton,et al.  Higher-order functions for parsing , 1992, Journal of Functional Programming.

[8]  Philip Wadler,et al.  The essence of functional programming , 1992, POPL '92.

[9]  Niklas Röjemo Garbage Collection, and Memory Efficiency, in Lazy Functional Languages , 1995 .

[10]  Jeroen D. Fokker,et al.  Functional Parsers , 1995, Advanced Functional Programming.

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

[12]  David Wright,et al.  Predictive parser combinators need four values to report errors , 1996, Journal of Functional Programming.

[13]  S. Doaitse Swierstra,et al.  Deterministic, Error-Correcting Combinator Parsers , 1996, Advanced Functional Programming.

[14]  Steve Hill,et al.  Combinators for parsing expressions , 1996, Journal of Functional Programming.

[15]  Marinus J. Plasmeijer,et al.  Efficient Combinator Parsers , 1998, IFL.

[16]  Koen Claessen,et al.  Observable Sharing for Functional Circuit Description , 1999, ASIAN.

[17]  S. Doaitse Swierstra,et al.  Fast, Error Correcting Parser Combinatiors: A Short Tutorial , 1999, SOFSEM.

[18]  John Hughes,et al.  Generalising monads to arrows , 2000, Sci. Comput. Program..

[19]  Erik Meijer,et al.  Type-indexed rows , 2001, POPL '01.