[Haskell-cafe] Module for parsing C (pre-processed header files only)?

Magnus Therning magnus at therning.org
Tue Apr 15 11:01:05 EDT 2008

Is there such a beast out there?

If this were a list on some OO language I'd ask for something that created
an AST and then offered an API based around a visitor pattern.

The pre-processor (platform specific most likely, but could be cpphs of
course) would be run prior to the tool I'm considering writing.  After that
I only need access to declarations of C functions and definitions of types
(structs, enums, other typedefs).

I had a quick look at the code in c2hs yesterday, but found it a little hard
to make heads or tails of it without some guidance, so I couldn't tell
whether it would be suitable.  Would it?

Any help or pointers appreciated.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20080415/d4a79802/attachment.htm

More information about the Haskell-Cafe mailing list