tags:

views:

115

answers:

2

Im looking to see if there are any pre-existing projects that do this.

Generally, I need something that will load in a c++ file and parse it and then based on a set of rules in script, transform it, say to add headers, reformat, or remove coding quirks for example, turning const int parameters in functions to int parameters, etc Or perhaps something that would generate a dom of some sorts based on the c++ file fed in that could be manipulated and written out again.

Are there any such projects/products out there free or commercial?

+1  A: 

Taras Glek of Mozilla has been working on the dehydra tool, based on Elkhound and scripted using JavaScript to transform the Mozilla codebase to fit with XPCOM and garbage collector changes.

Pete Kirkham
hmm, gcc as a dependency may not be the best idea..
Tom J Nowell
+1  A: 

The Parser from Eclipse CDT seems to be pretty complete by now, as some refactoring methods have been alredy contributed to CDT.

lothar