This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Using gcc to parse C++ sources
- From: Joe Buck <Joe dot Buck at synopsys dot COM>
- To: Juergen Graf <gcc at codeguy dot org>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 24 Feb 2004 10:23:39 -0800
- Subject: Re: Using gcc to parse C++ sources
- References: <3608.1077645507@www12.gmx.net>
On Tue, Feb 24, 2004 at 06:58:27PM +0100, Juergen Graf wrote:
> i plan to parse c++ source files in order to extract information about
> function signatures and typedefs. After reading some pages of the gcc
> internals documentation, i found out, that gcc uses an internal tree
> structure (tree.h) to represent the parsed (c++) source files. This tree
> structure seems to be able to satisfy my needs.
> I want to modify/use the gcc to pass me this tree structure. My problem is,
> that i don't know exactly where to start at and how this can be achieved in
> the easiest way. Please can anybody drop me a hint.
I suppose you could patch gcc to write out the function signatures and the
typedefs as they are parsed.
If all you want is to extract function signatures and typedefs, you might
be better off starting from doxygen, which can already do this. See
http://www.doxygen.org/ .