[Haskell-cafe] Re: [C2hs] anyone interested in developing a Language.C library?

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Sat Apr 21 07:37:51 EDT 2007

On Sat, 2007-04-21 at 12:04 +0200, Josef Svenningsson wrote:

> Unfortunately the niche is not empty. There is an ocaml library called
> cil which is supposed to be pretty sweet for manipulating C code. But
> I still think a Haskell library would be a very good idea, and perhaps
> one can look at cil for inspiration.
> cil can be found here:
> http://hal.cs.berkeley.edu/cil/

Yeah, I came across this recently. It's pretty decent looking. I briefly
looked at their C parser (also implemented as a lex/yacc style lexer &
parser). Theirs also covers Sun and MS C language extensions, that is
Sun CC's pragmas and MS's numerous extensions.

Sadly this didn't popup when I was googling for yacc style LALR(1) C
grammars or I might have saved myself some time by porting their grammar
to alex+happy.


More information about the Libraries mailing list