b6a43c3335
Eliminated ‘Text.Megaparsec.Language’ module because at this point it is clear that already existing definitions are of little use in Megaparsec. I started writing “default” language definition in ‘Text.Megaparsec.Lexer’. At this point it should be possible to parse languages where indentation matters, although we will need to provide more helpers to make it easier. |
||
---|---|---|
benchmarks | ||
old-tests | ||
tests | ||
Text | ||
.gitignore | ||
.travis.yml | ||
AUTHORS.md | ||
CHANGELOG.md | ||
LICENSE.md | ||
megaparsec.cabal | ||
megaparsec.ebal | ||
README.md | ||
Setup.hs |
Megaparsec
Note that this is work in progress.
This is industrial-strength monadic parser combinator library. Megaparsec is a fork of Parsec library originally written by Daan Leijen.
Megaparsec is different from Parsec in the following ways:
-
Better error messages. We test our error messages using dense QuickCheck tests. Good error messages are just as important for us as correct return values of our parsers. Megaparsec will be especially useful if you write compiler or interpreter for some language.
-
Some quirks and “buggy features” (as well as plain bugs) of original Parsec are fixed. There is no undocumented surprising stuff in Megaparsec.
-
Better support for Unicode parsing in
Text.Megaparsec.Char
. -
Megaparsec has more powerful combinators and can parse languages where indentation matters.
-
Comprehensive QuickCheck test suite covering nearly 100% of our code.
-
We have benchmarks to detect performance regressions.
-
Better documentation, with 100% of functions covered, without typos and obsolete information, with working examples. Megaparsec's documentation is well-structured and doesn't contain things useless to end user.
-
Megaparsec's code is clearer and doesn't contain “magic” found in original Parsec.
-
Megaparsec looks into the future, it does not contain code that serves for compatibility purposes, it also requires more recent version of
base
.
Contributing
Issues (bugs, feature requests or otherwise feedback) may be reported in the Github issue tracker for this project.
Pull-requests are also welcome (and yes, they will get attention and will be merged quickly if they are good, we are progressive folks).
Spread the Word
Many people still don't know about Megaparsec, you can help the project by writing about it in a blog, creating a tutorial or something like that. This is highly appreciated.
License
Copyright © 2015 Megaparsec contributors
Copyright © 2007 Paolo Martini
Copyright © 1999–2000 Daan Leijen
Distributed under BSD3 license.