C++ to D converter based on clang
Seb via Digitalmars-d-announce
digitalmars-d-announce at puremagic.com
Sat May 28 04:26:23 PDT 2016
On Saturday, 28 May 2016 at 11:02:37 UTC, Loïc HAMOT wrote:
> Hello,
>
> I am working on a C++ to D converter.
> The project is opensource, on github :
> https://github.com/lhamot/CPP2D
>
> Clang is used to parse the C++ code and get the abstract syntax
> tree. Then I can visit the AST to print it to D language.
> Some tricks are used to convert the simplest macros to mixin.
>
> Some C++ features which are not straightforward to convert are
> already handled, like (A not exhaustive list):
> class
> constructor/destructor
> virtual
> abstract
> override
> initialization list
> call base constructor
> Operator overloading
> member
> free
> left or right
> Template
> function
> function specialization
> class
> class/struct specialization
> class/struct partial specialization
> arrays
> static
> dynamic
>
> Some examples here :
> https://github.com/lhamot/CPP2D/wiki/Conversion-samples
>
> If somebody is interested to use this software, or to
> participate, do not hesitate to contact me.
>
> Regards
That's a great project! IIRC Walter still searches for someone to
convert the dmd backend to D.
Btw do you know about Daniel's porting tool that was used to
migrate the dmd frontend to D?
https://github.com/yebblies/magicport2
More information about the Digitalmars-d-announce
mailing list