[Haskell-cafe] Two questions regarding Alex/Parsec

Niels Aan de Brugh nielsadb at gmail.com
Wed Jun 25 14:17:09 EDT 2008

On Wed, 2008-06-25 at 10:46 -0700, Don Stewart wrote:

> > One of the reasons I started worked on a MediaWikiParser was because I
> > wanted to use the Haskell language and some of its tools rather than just
> > read about them. I'm not really interested in making a clone of something
> > that already exists just for the sake of ideology (although personally
> > I'm much more fond of BSD-style licenses than of GPL).
> Personally, I'd find a MediaWiki parser/pretty printer quite useful!

Oh yes, don't yet me wrong, this isn't just a study project for me; I
really want to have a working parser. I'm just saying that if there was
such a parser for Haskell already under the GPL I wouldn't be bothered
rewriting it just so I could license it under MIT/BSD.

> > On a side note: are there any lexer/parser generators out there I should
> > be aware of? As mentioned in my original post I've tried using Happy, but
> > I was unable to understand its very concise error message 'parE'.
> > It would be really nice to have a tool that generates an AST automatically
> > (e.g. something like ANTLR).
> There's lots, but probably Alex (lexer) and Happy (parser) or Parsec are
> the most widely used.

Okay, in that case I'll stick to Alex + Parsec, it's quite comfortable
so far.

By the way, does anyone know the answer to my original question?
Especially the first one (Alex' AlexPosn vs. Parsec's SourcePos) is
worrying me somewhat.


More information about the Haskell-Cafe mailing list