Re: Data Type Converter

From: VBDis (vbdis_at_aol.com)
Date: 01/29/04


Date: 28 Jan 2004 23:45:23 GMT

Im Artikel <slrnc17n5v.og6.marcov@toad.stack.nl>, Marco van de Voort
<marcov@stack.nl> schreibt:

>> The introduced objects and methods also can emulate, to some degree, what
>> in C is done with macros (#define). Without such methods the source code
>> can deserve much manual editing.
>
>Why not do it efficient? Use proper procedures flagged as inline? No
>performance hit, same system, and with typing.

My primary goal is a C to Delphi converter, and inline procedures are not
available with Delphi. It also depends on the syntax, in which places
procedures or methods can replace a macro or other feature.

But there exist no restrictions on the number of back-ends for that converter,
which can be implemented for any target language. The front-end side is
extensible in the same way, here I intend to hook in my already existing
disassemblers for various platforms.

>For the .c conversion it is more important to be correct and not introduce
>bugs that might pass than to not require manual editing.

Correctness is vital for every conversion tool, I'm aware of this requirement.
This is another reason for not publishing experimental code, unless I'm sure
that it does what it should do.

>So better give up, and put the C code inline in the generate pascal code (for
>postediting) than doing something that might not give the exact same result.

This is what I already have implemented, some months ago. But I won't give up
so quickly... ;-)

DoDi



Relevant Pages

  • Re: Macros vs. VBA
    ... but i would recomment doing some from scratch. ... macro converter tool as I only use macros ... Simple macros like the ... for unforeseen errors. ...
    (microsoft.public.access.gettingstarted)
  • Re: Whats the big deal with cross-platform?
    ... but not a single usable darn header converter.. ... ISTM you have never tried to convert a non-trivial header. ... Also, in C, interfaces are mere structs or classes, and lots of macros ... understand how this affects the translation, how pointers can be used, ...
    (borland.public.delphi.non-technical)
  • Re: Runtime macros
    ... Since other people have complained that macros in Common Lisp are already first class, I wonder what term they would like us to use for macros that may be passed around as functions may be and used in that way? ... use") the runtime constraints are never violated and I never ... But the minute somebody assigns to source code I have to throw out everything that depended on the constant-sourcecode constraint and fall back on the unoptimized versions. ... And, unfortunately, I haven't got any optimizations working ...
    (comp.lang.lisp)
  • Re: Video editing
    ... >3) Shower us developers with kind words, boxes of candy, and other bribes to ... Code.msi" Then install it. ... Both the source code & pre-built executable are ... At least I have the code to take apart hack my own DVR-MS->DivX converter. ...
    (microsoft.public.windows.mediacenter)
  • Re: S-expr form of C
    ... representing C source code in s-expr form? ... for a more literal "representation" of C source in s-expr form, ... I actually generate it from CLOS objects, and have macros defined to build these CLOS objects from the corresponding S-exp. ...
    (comp.lang.lisp)

Loading