I am looking for comments and suggestions from people that have used
the C++ front end of GCC or any other C++ parser for source code
analysis. I'd like to hear about the documentation and learning curve
involved in using the parser, what kind of deficiencies the parser
had, and how much work is involved in interfacing with the parser.

I only need the front end to give me enough information to do the following:
* generate a file dependency graph
* generate a identifier dependency graph
* recognize scopes for identifiers and macros
* differentiate between declarations, definitions, and uses of identifiers
and macros
* recognize real line numbers (instead of #line directives)

I don't mind using a separate tool to analyze macros. I read some
Usenet articles from last year about efforts to separate the GCC's C++
parser into a reusable front-end but I haven't heard of any
success/failure to do so. Any recent parser should work for me as
long as it understands templates and is freely available. Pointers to
papers and Usenet articles are much appreciated as well.