htod - convert C .h files to D import files
Lionello Lunesu
lio at lunesu.remove.com
Mon May 22 01:03:48 PDT 2006
Walter Bright wrote:
> Anders F Björklund wrote:
>> Walter Bright wrote:
>>
>>> I'm not sure how useful this will be.
>>>
>>> Here it is: http://www.digitalmars.com/d/htod.html
>>
>> Q: Will there be source code later, for porting to GDC ?
>
> Sorry, but it's totally based on the C compiler. But that also means it
> could be done to gcc.
I've been playing around with libcpp (the c preprocessor) from gcc and
was wondering if that was indeed enough to make a tool like htod.
I mean, do you need to parse the C code further, or is a preprocessor
(passing you the tokens) enough to do what htod does?
(You'd have to detect the 3 tokens "unsigned long long" yourself and
replace it with "ulong", but that's find&replace, hardly parsing)
L.
More information about the Digitalmars-d-announce
mailing list