On Wed, Apr 16, 2008 at 4:01 PM, Don Stewart &lt;<a href="mailto:dons@galois.com">dons@galois.com</a>&gt; wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
magnus:<br>
<div><div></div><div class="Wj3C7c">&gt; &nbsp; &nbsp;Is there such a beast out there?<br>
&gt;<br>
&gt; &nbsp; &nbsp;If this were a list on some OO language I&#39;d ask for something that created<br>
&gt; &nbsp; &nbsp;an AST and then offered an API based around a visitor pattern.<br>
&gt;<br>
&gt; &nbsp; &nbsp;The pre-processor (platform specific most likely, but could be cpphs of<br>
&gt; &nbsp; &nbsp;course) would be run prior to the tool I&#39;m considering writing. &nbsp;After<br>
&gt; &nbsp; &nbsp;that I only need access to declarations of C functions and definitions of<br>
&gt; &nbsp; &nbsp;types (structs, enums, other typedefs).<br>
&gt;<br>
&gt; &nbsp; &nbsp;I had a quick look at the code in c2hs yesterday, but found it a little<br>
&gt; &nbsp; &nbsp;hard to make heads or tails of it without some guidance, so I couldn&#39;t<br>
&gt; &nbsp; &nbsp;tell whether it would be suitable. &nbsp;Would it?<br>
&gt;<br>
&gt; &nbsp; &nbsp;Any help or pointers appreciated.<br>
<br>
</div></div>I think the main option for parsing C now is the c2hs parser -- there&#39;s<br>
a summer of code project to wrap it up as a suitable C manipulation,<br>
printing and parsing library, so we should see a good standalone<br>
solution in a few months.<font color="#888888"></font></blockquote><div><br>Will it be delivered with good documentation? ;-)<br><br>This is /very/ interesting for me and my job (what I&#39;m talking about above is not for work though).&nbsp; I would love to see something that would allow me to spend more time using Haskell while being paid for it :-)<br>
<br>/M</div></div>