Thanks Stephan,

In Haskell, what would be the right thing to parse "C" like languages.
Parsec literature seems to indicate that they can pretty much parse
anything.

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.

Regards,
Kashyap

On Tue, Jun 1, 2010 at 7:59 PM, Stephen Tetley <stephen.tet...@gmail.com>wrote:

> Hello
>
> 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:
>
> http://legacy.cs.uu.nl/daan/parsec.html
>
> 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
> LL(k).
>
> Best wishes
>
> Stephen
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>



-- 
Regards,
Kashyap
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to