On Tue, Nov 10, 2009 at 1:48 PM, Pavel Dudrenov dudrenov@gmail.com wrote:
I think that James Long was working on some automatic ffi generating code. Maybe you can take a look at his code and see what he is doing and extract things relevant to you. Or just use what he has.
Yeah, I worked on it. So did Jeremie and Christian, and a few others. I wrote "autoffi" which is just a prototype which tries to use SILex to parse C code. This code isn't maintained but hopefully still works. Pulling out definitions should be achievable.
http://github.com/jlongster/autoffi
Jeremie wrote a different program which I think used SWIG to parse C code.
http://github.com/jlongster/gambit-ffi-generator
Pulling out definitions is probably the easiest job for automatic FFI generation. Hopefully you can get something to work from either of these projects.
- James