On Wed, Apr 16, 2008 at 4:01 PM, Don Stewart <dons@galois.com> wrote:
magnus:
>    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.

I think the main option for parsing C now is the c2hs parser -- there's
a summer of code project to wrap it up as a suitable C manipulation,
printing and parsing library, so we should see a good standalone
solution in a few months.

Will it be delivered with good documentation? ;-)

This is /very/ interesting for me and my job (what I'm talking about above is not for work though).  I would love to see something that would allow me to spend more time using Haskell while being paid for it :-)

/M