[Pyrex] a quick note

Bob Ippolito bob at redivi.com
Mon Oct 13 02:51:47 CEST 2003


On Oct 12, 2003, at 20:28, Simon Burton wrote:

> Last january i wrote a c declaration parser in python:
> http://arrowtheory.com/software/python/index.html
>
> The project was put on hold after successfuly parsing glibc's 
> /usr/include
> (round trip testing), but now i see it could be useful to generate pyx 
> files.
> There's not much documentation, but if you nose around the source you 
> should
> get some idea of what it is doing.
>
> Anyway, i'll have a look at this RSN (should be fairly trivial to get 
> started).

I've also done something like this, and managed to get it to spit out 
Pyrex.. the problem is mainly that C has different ideas about how the 
namespace works (i.e. a structure can reference itself), so I ran into 
problems with stuff like jpeglib.h that does it quite a lot.  Another 
issue is that when you use gcc -E you get WAY more information than you 
probably want... or at least i think you do, in my approach I used cpp 
-P, which I'm guessing does the same thing.

I think that my next attempt will likely use gcc-xml, like Pyste does.

-bob





More information about the Pyrex mailing list