Share on Facebook Tweet on Twitter Share on LinkedIn Share by email
Parsec: Direct Style Monadic Parser Combinators for the Real World

Daan Leijen and Erik Meijer

Abstract

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.

Details

Publication typeTechReport
NumberUU-CS-2001-27
InstitutionDepartment of Computer Science, Universiteit Utrecht
> Publications > Parsec: Direct Style Monadic Parser Combinators for the Real World