The ANTLR ANSI C and GCC source to source translation framework includes an ANSI-C parser which builds trees, a GCC parser which builds trees, a GCC tree parser (for you to subclass to do transformations), and a GCC tree emitter. The GCC parser is only for GCC's extensions to C, not C++. It is based on GCC 2.95.2.