Pascal Bourguignon <[EMAIL PROTECTED]> writes: > Paul Pluzhnikov <[EMAIL PROTECTED]> writes: > >> AFAIK it lacks the >> machinery to print (reconstruct) internal representation back as >> valid C++. Such reconstructor is entirely non-trivial. > > Wrong: gccxml
Gccxml does *not* reconstruct back valid C++. Further, gccxml FAQ says: Why are C++ function bodies not dumped in XML? The original sponsors of the project had no need for function bodies. ... > You don't need to enter the entrails of g++. It depends on what the transformation is. You most certainly need to enter entrails of g++ if you are to parse comments and generate new C++ code that depends on what has been parsed so far (or what will be parsed soon). > It can be done in one week, with the right tools. Depends on what "it" is, doesn't it? > Oops, sorry, gccxml only does the declarations, not the bodies. > But you don't need it, just use -fdump-tree-original: > > g++ -c -fdump-tree-original test-body.c That doesn't produce valid C++ either. I'll pay you US$1000 if you can turn the "test-body.c.original" back into valid C/C++ in a month (for every test in the gcc test suite; the reconstructed C/C++ must be semantically equivalent to the original). Cheers, -- In order to understand recursion you must first understand recursion. Remove /-nsp/ for email. _______________________________________________ Help-gplusplus mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-gplusplus
