[Pyrex] Re: Pyrex versus ctypes
Bob Ippolito
bob at redivi.com
Fri Jun 11 14:07:25 CEST 2004
On Jun 11, 2004, at 7:42 AM, Thomas Heller wrote:
> Bob Ippolito <bob at redivi.com> writes:
>
>>> Maybe h2py could also come handy here?
>>
>> Hacking bgen to pieces would be a much better bet.. h2py seems like it
>> would be pretty useless in practice.
>>
>> And then, of course, maybe this:
>> http://people.cs.uchicago.edu/~varmaa/mini_c/ could be of some use
>> (because it is obviously reasonably good at lexing C). The licensing
>> of this software is unclear though. PLY is LGPL, and it includes some
>> modified code from this project (or maybe it's not modified), but does
>> not seem to specify its own license.
>
> Ok, I've seen quite some pointers to C parsers, and tried some. I have
> experimented with PLY myself, until I realized that you cannot parse
> real world C with a context free grammar (or how is it called).
> The best results I got was with simon burton's cdecl.py.
>
> But then I lost interest. Which doesn't mean that I wouldn't accept a
> donation of a C -> ctypes conversion tool.
I also went through a phase were I also wanted to automatically
translate C to ctypes. I actually had something at some point, using
one of the parsers (I forget which, it may have been cdecl.py)... but
then I saw that many C headers would require at least two passes to map
everything correctly (the libjpeg headers, for example), so I got
discouraged and gave up because I didn't have the effort left in me to
refactor the ugly monster I had created. I think I still have that
code around somewhere, but I don't think I'll have time/interest in it
again anytime soon.
> BTW, and even more off-topic for *this* list: what about some
> testing/hacking of ctypes cvs on OSX?
Unfortunately I have three for-profit projects on my plate right now
that I really have to finish before I start hacking on anything else..
The good news is that they're all close to finished, so I hope it will
be soon.
-bob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2357 bytes
Desc: not available
Url : http://lists.copyleft.no/pipermail/pyrex/attachments/20040611/19a998be/smime.bin
More information about the Pyrex
mailing list