News for hackers. Stuff that matters.
Re:Help improve gcc by deng on Monday October 06, 2014 @05:37PM (#8418452)
Your information is old. You can easily access the C++ parse tree by writing a gcc plugin. This is possible since gcc 4.5 or so, but somehow nobody really noticed since everyone just stared at the new kid on the block.

You might say the tree itself isn't easy to deal with, which is true, but that is just because the code is very old and things were done differently back then (hint: union of structs).

There is even a very nice tutorial which explains how to do this:

http://www.codesynthesis.com/~boris/blog/2010/05/03/parsing-...

There are no comments on this comment yet.