Parsec: Direct Style Monadic Parser Combinators for the Real World

UU-CS-2001-27 |

User Modeling 2007, 11th International Conference, UM 2007, Corfu, Greece, June 25-29, 2007

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.