From: Maarten de B. <md...@iu...> - 2004-03-29 16:17:16
|
Hello, I am looking for an application that can parse c++, store it in a AST, and regenerate the original c++ code. Obviously, the interesting part would be to apply some modification to the AST before regenerating. For example, I want to remove all constructors that match a certain pattern (first argument is of type Foo), from classes that are derived from class Bar. Or, another example, I have a header and source file for each class, and for each header, I want to move all included headers to the corresponding source file, and use forward declarations instead, if the classes from the headers included are only used by reference. Someone pointed me to OpenC++, and at a first glance, it seems to contain the code to do just the thing, though it is not clear to me if it would actually be able to regenerate the code... Could you please help me out? Would OpenC++ indeed be suitable for such a task, is there some example code available that I could work upon, or maybe you can suggest some other project that would be (more) suitable? Kind regards, Maarten |