[Haskell-cafe] Design of extremely usable programming language libraries
John Lato
jwlato at gmail.com
Wed May 29 02:19:02 CEST 2013
> > Not sure what you mean here — attoparsec does support unlimited
> > lookahead, in the sense that a parser may fail arbitrarily late in the
> > input stream, and backtrack to any previous state. Although attoparsec
> > is a poor choice for programming language parsing, primarily because
> > of the error messages.
> I guess I have an outdated notion of attoparsec. But yes, error messages
> seem to be the weak point of attoparsec. Also, the fact that it only
> accepts bytestrings makes it harder (but no impossible, since we can
> convert Strings to ByteStrings) to reuse the parser as a QuasiQuoter.
> So, I'll rephrase my question. What's the best choice for a library for
> parsing programming languages nowadays?
Parsec is still widely popular since it's part of the HP, but I use
uu-parsinglib as my first-choice parser. It comes with a lot of examples,
good documentation, and many features I like (good error messages and auto
error correction). I don't know how performance compares with parsec or
attoparsec, but it's always been good enough for me.
John L.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130529/b8610c5a/attachment.htm>
More information about the Haskell-Cafe
mailing list