Thread overview | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
January 21, 2005 H2D Parser Project | ||||
---|---|---|---|---|
| ||||
I'm glad to announce that a parser for C header files to D module files will be available very soon. I've currently got a basic hand written lexer, and the parser is not yet completed. Version 0.1 will be ready in a few days to a week. If anyone finds this interesting; post a reply or email me at <jtech AT ezoob DOT com> to be added to the mailing list for it (its makeshift right now) for up-to-date news on how its going (I'm not going to spam the newsgroup for it, lol) What it will do is take in a C header file and generate a D module based on that header. Anything that cannot be done automatically will be flagged in the module with a comment labeled appropriately (i.e. "// FIXME: Possible enumeration, currently not able to produce D Enum."). This utility will make using C based libraries considerably easier, and without the need to write a port for the toolkit. This is primarily being designed to use SDL (http://www.libsdl.org) but it will be able to use other things as well (in particularly OpenGL). P.S. D kicks C++ @$$. -Joshua Cearley Owner, Lead Developer BlackCrystal Software "Making dreams reality." |
January 21, 2005 Re: H2D Parser Project | ||||
---|---|---|---|---|
| ||||
Posted in reply to Joshua Cearley | Errr. it wont be released under that name. This is not the program on DSource. (i have to learn to check everywhere before naming something, lol) |
January 21, 2005 Re: H2D Parser Project | ||||
---|---|---|---|---|
| ||||
Posted in reply to Joshua Cearley | Joshua Cearley wrote: > I'm glad to announce that a parser for C header files to D module files > will be available very soon. [...] > > What it will do is take in a C header file and generate a D module based > on that header. Anything that cannot be done automatically will be flagged > in the module with a comment labeled appropriately (i.e. "// FIXME: > Possible enumeration, currently not able to produce D Enum."). There are a few of those translators around already, did you search ? > This utility will make using C based libraries considerably easier, and > without the need to write a port for the toolkit. This is primarily being > designed to use SDL (http://www.libsdl.org) but it will be able to use > other things as well (in particularly OpenGL). OpenGL 1.2.1 and SDL 1.2.6 have already been translated to D modules. Will post an update, shortly. --anders |
January 21, 2005 Re: H2D Parser Project | ||||
---|---|---|---|---|
| ||||
Posted in reply to Joshua Cearley | It'll be great - I'd like to convert the Ruby headers with it. Will others be able to contribute? "Joshua Cearley" <jtech@ezoob.com> wrote in message news:pan.2005.01.21.13.39.08.70564@ezoob.com... > I'm glad to announce that a parser for C header files to D module files will be available very soon. I've currently got a basic hand written lexer, and the parser is not yet completed. Version 0.1 will be ready in a few days to a week. If anyone finds this interesting; post a reply or email me at <jtech AT ezoob DOT com> to be added to the mailing list for it (its makeshift right now) for up-to-date news on how its going (I'm not going to spam the newsgroup for it, lol) > > What it will do is take in a C header file and generate a D module based on that header. Anything that cannot be done automatically will be flagged in the module with a comment labeled appropriately (i.e. "// FIXME: Possible enumeration, currently not able to produce D Enum."). > > This utility will make using C based libraries considerably easier, and without the need to write a port for the toolkit. This is primarily being designed to use SDL (http://www.libsdl.org) but it will be able to use other things as well (in particularly OpenGL). > > P.S. D kicks C++ @$$. > > -Joshua Cearley > Owner, Lead Developer > BlackCrystal Software > "Making dreams reality." |
January 21, 2005 Re: H2D Parser Project | ||||
---|---|---|---|---|
| ||||
Posted in reply to Joshua Cearley | In article <pan.2005.01.21.14.01.34.577845@ezoob.com>, Joshua Cearley says... > >Errr. it wont be released under that name. This is not the program on DSource. (i have to learn to check everywhere before naming something, lol) maybe just take over the Dsource program since no-one has worked on it in a while |
January 21, 2005 Re: H2D Parser Project | ||||
---|---|---|---|---|
| ||||
Posted in reply to Matthew | On Fri, 21 Jan 2005 21:08:39 +1100, Matthew wrote:
> It'll be great - I'd like to convert the Ruby headers with it.
>
> Will others be able to contribute?
Once I get a subversion server set up and version 0.1 out then yes; I'm probably going to release it under a BSD type license.
-Joshua Cearley
Owner, Lead Developer
BlackCrystal Software
"Making dreams reality."
|
January 21, 2005 Re: H2D Parser Project | ||||
---|---|---|---|---|
| ||||
Posted in reply to Joshua Cearley | "Joshua Cearley" <jtech@ezoob.com> wrote in message news:pan.2005.01.22.03.22.27.217820@ezoob.com... > On Fri, 21 Jan 2005 21:08:39 +1100, Matthew wrote: > >> It'll be great - I'd like to convert the Ruby headers with it. >> >> Will others be able to contribute? > > Once I get a subversion server set up and version 0.1 out then yes; I'm probably going to release it under a BSD type license. Sounds fine to me. :-) |
January 22, 2005 Re: H2D Parser Project | ||||
---|---|---|---|---|
| ||||
Posted in reply to Joshua Cearley | "Joshua Cearley" <jtech@ezoob.com> wrote in message news:pan.2005.01.21.13.39.08.70564@ezoob.com... > I'm glad to announce that a parser for C header files to D module files will be available very soon. Fantastic! > P.S. D kicks C++ @$$. It's contributors like yourself that make it so. |
January 28, 2005 Re: H2D Parser Project | ||||
---|---|---|---|---|
| ||||
Posted in reply to Joshua Cearley | Joshua Cearley wrote: > I'm glad to announce that a parser for C header files to D module files > will be available very soon. <snip> Excellent! > What it will do is take in a C header file and generate a D module based > on that header. Anything that cannot be done automatically will be flagged > in the module with a comment labeled appropriately (i.e. "// FIXME: > Possible enumeration, currently not able to produce D Enum."). <snip> Certainly a step ahead of some of the human language translators dotted about the net. It would be good to have some kind of configuration file, which would decide (among whatever other things): - which #ifdefs to convert to versions, and which to get rid of altogether - how to treat struct/union tags (keep them as the struct/union name, or get rid of them altogether (useful for such things as Windows API headers)). Stewart. -- My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit. |
Copyright © 1999-2021 by the D Language Foundation