Hi! It&#39;s nice to hear this. As Mariano said, I started to work in something like this some months ago, but I couldn&#39;t make something useful yet because I don&#39;t have much free time. I can give you a hand if you need. I don&#39;t know about OS Process, but I have some experience with FFI, so I&#39;ll look for some examples. I also have some questions,<div>

<br><div>- how did you implement the parser, by hand or with a framework?</div><div>- did you implement a preprocessor or used the output of something like CPP?<br>- what about the output of the parser, do you create an AST?</div>

<div><br></div><div>Regards,</div><div>             Javier</div><div><br><div class="gmail_quote">On Fri, Jun 17, 2011 at 1:34 PM, Dave Mason <span dir="ltr">&lt;<a href="mailto:dmason@mason-rose.ca">dmason@mason-rose.ca</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I&#39;m working on making a clean interface layer on top of FFI (and possibly Alien and NativeBoost).<br>
<br>
It will look something like:<br>
<br>
        FFIParse createFFI: #System category: &#39;My-Category&#39; library: &#39;System&#39;.<br>
        System parseSystemHeader: &#39;sys/resource.h&#39;.<br>
        rusage := System struct: #rusage.<br>
        System getrusage: 0 with: rusage.<br>
        Transcript show: &#39;Used &#39;;<br>
                         show: rusage ru_utime tv_sec;<br>
                         show: &#39;.&#39;;<br>
                         show: rusage ru_utime tv_usec;<br>
                         show: &#39; seconds of user CPU time&#39;;<br>
                         cr.<br>
        System parseSystemHeaer: &#39;unistd.h&#39;;<br>
                sleep: 5.<br>
        pid := System getpid<br>
<br>
I have a very compact, almost compete C header parser but I need to be able to get the output from<br>
        popen(&quot;echo \&quot;#include &lt;unistd.h&gt;\&quot;|gcc -E -&quot;,&quot;r&quot;)<br>
or equivalent.  The popen is easy enough to get at through FFI, but is there a way to connect either the FILE* or the file descriptor up to some ReadStream.  In the worst case, I could probably use FFI to call fread(3) but is there a better way?<br>


<br>
I&#39;d also appreciate any simple examples of using FFI, especially with ExternalStructure subclasses.<br>
<br>
Finally is there a way to get external variables such as &#39;extern int errno;&#39; ?<br>
<br>
Thanks in advance!<br><font color="#888888">
<br>
../Dave<br>
<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Javier Pimás<br>Ciudad de Buenos Aires<br>
</div></div>