Parsec

Parsec is a free monadic parser combinator library for Haskell. Allthough combinator parsing is well known in literature, most libraries are only implemented for personal use or for small research examples. Parsec is designed from scratch as an industrial-strength parser library.

It is simple, safe, well documented, has extensive libraries and good error messages. It is also fast, doing thousands of lines per second on todays machines, which might make it an acceptable alternative to bottom-up parser generators like Happy.

Download

Parsec documentation [pdf, html, ps, pdf-letter, ps-letter]

The user and reference guide for parsec. There is also a technical report describing the inner workings of the library. The documentation is a bit outdated with regard to import statements. Nowadays, Parsec is distributed with the standard Haskell libraries with most Haskell compilers (GHC, NHC, Hugs). You can import the Parsec library now with hierarchical module names, for example:

import Text.ParserCombinators.Parsec
Parsec sources [parsec-2.0.zip (10 oct 2003)]

Packaged sources of Parsec. The latest sources are available from cvs, and this package is mainly for people that need easy access to the sources and example parsers (like the Tiger parser).There is also an old version of Parsec [parsec-1.1.zip] that does not use hierarchical module names.

License

I would like to see this library as widely used as possible. It is therefore distributed with an unrestrictive BSD style license. If there is any problem using this software with this license, I would like to hear about it and see if we can work out a solution.

Copyright 1999-2000, Daan Leijen. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

This software is provided by the copyright holders as is and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the copyright holders be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.

Logo

Show the world that you are a type-safe developer! Copy and paste the following HTML in your web page:

<a href="http://www.cs.uu.nl/~daan/parsec.html">
 <img src="http://www.cs.uu.nl/~daan/images/parsec.gif"
      alt="Parsec logo" hspace=20 border=0
      style="float: right; border: none; padding-left: 4pt">
</a>

"Oct 18 2005"