[Haskell-cafe] Parselib sample
C K Kashyap
ckkashyap at gmail.com
Tue Jun 1 13:54:17 EDT 2010
In Haskell, what would be the right thing to parse "C" like languages.
Parsec literature seems to indicate that they can pretty much parse
The reason I had asked for a sample in Parselib was for me to understand the
monadic parser in action. The last time I tried looking at Parsec from RWH,
I could not follow it too well.
On Tue, Jun 1, 2010 at 7:59 PM, Stephen Tetley <stephen.tetley at gmail.com>wrote:
> For non-trivial parsing Parsec or UU-Parse are much better candidates.
> If you have Parsec installed from Hackage, I'd still recommend you get
> the manual and source distribution from:
> The source distribution has some examples - Tiger, Mondrian, Henk -
> full, if small languages.
> C is quite a large language and its grammar is usually presented for
> LR parsing so you are unlikely to find a parser for C or even a subset
> of C with a combinator library, as parser combinators are LL. To
> convert LR to LL needs a lot of left factoring and wouldn't be fun,
> though I believe there is a C parser for the ANTLR system which is
> Best wishes
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe