We are using an XML representation of C/C++ (srcML) to manipulate C/C++ s=
ource
code. SrcML preserves all layout and preprocessor information of the orig=
inal
code and therefore is able to produce an exact copy of the original code.=
You
can find more information about srcML here:
http://www.sdml.info/projects/srcml/
We are using srcML and XSLT to build a weaver for C/C++ (Java is planned =
too).
The aim of the weaver (XWeaver) is to produce code that looks like manual=
ly
written code. It is designed to be extensible (writing your own weaving r=
ules),
so you're maybe interested in using XWeaver for your task (XWeaver is Ope=
n
Source and under a GPL License). For more information see the XWeaver Hom=
epage:
http://www.pnp-software.com/XWeaver/
Regards,
Iwan
Andrew Delong wrote:
> Regarding the message from Maarten de Boer:
>
>> I am looking for an application that can parse c++, store it in a AST,
>> and regenerate the original c++ code.
>
> I also could use this exact functionality. I want to use OpenC++ as a
> source-to-source translation tool that operates on both hpp and cpp
> files, but it must preserve #include etc in the final output. In the
> end, the final headers will be used by other source files without occ.
>
> If OpenC++ still cannot provide this ability, I'd be happy to
> contribute as long as it's a relatively small thing to do (I only have
> two weeks to finish my project :~)
>
> This is a great project by the way, nice work Volunteers...
>
> Andrew
>
>
> -------------------------------------------------------
> The SF.Net email is sponsored by: Beat the post-holiday blues
> Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
> It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
> _______________________________________________
> Opencxx-users mailing list
> Ope...@li...
> https://lists.sourceforge.net/lists/listinfo/opencxx-users
|