[aspectc-user] parsing, manipulating, regenerating c++ code

Matthias Urban matthias.urban at pure-systems.com
Mon Mar 29 18:27:32 CEST 2004

Hi Maarten,

Maarten de Boer wrote:
> 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 contains the word Foo), from classes that are
> derived from class Bar.
> Googling, I came across PUMA, and looking at the code, it seems to be
> able to do just the thing, but I have to say that I find it a bit hard
> to follow, and I am missing an example that does something like what I
> just described. 
> Could you please help me out? Would PUMA 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

Well, actually PUMA is suitable for such a task. But there is no 
up-to-date documentation, sorry. You may take a look into the sources of 
AspectC++ that is based on PUMA. But it doesn't perform such 
manipulations. A *really* outdated documentation is available at 

Best regards,

Matthias Urban                          Phone: +49-391-544569-32
pure-systems GmbH                       Fax:   +49-391-544569-90
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3136 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://www.aspectc.org/pipermail/aspectc-user/attachments/20040329/b449a86b/attachment.bin>

More information about the aspectc-user mailing list