There's now a test example in xml/xslt addon, which uses SWIG and XSLT to translate such C header
/* ================================================ test.h == */ double mul(float argFloat1, float argFloat2); int sub(int argInt3, int argInt4); char* subs(char* argStr5, char** argPtrStr6, int argInt7); to such J code NB. ================================================= test.j == mul=: 'mul > d f f' cdx sub=: 'sub > i i i' cdx subs=: 'subs > *c *c * i' cdx > From: Oleg Kobchenko <[EMAIL PROTECTED]> > > Did anyone look at SWIG? > > > On Sep 19, 2008, at 20:01, Chris Burke wrote: > > Generating shared library definitions in J is usually a very > time-consuming business, involving a lot of ad-hoc code to parse the > source. Usually the source is the .h files themselves, or definitions > output by a c compiler. > > Many years ago, the original winapi files were produced from definitions > created for Visual Basic. This was much easier, as all the hard work had > been done, and all that was needed was to reformat the definitions line > by line. However, these old VB definitions are no longer up to date, and > in any case, only worked on Windows. > > What I have looked for is definitions created for some other language, > like matlab or perl, preferably cross-platform, for which we could > create standard tools to reformat this for J. So far, I not found > anything - there are tools for other languages, but their output seems > almost as hard to read as the original source. > > Does anyone have suggestions for this? A specific example would be to > create a set of gtk+ definitions. > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > > > > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
