[GCC-XML]Various bits not mentioned in XML output

David Abrahams dave at boost-consulting.com
Sun Mar 9 19:12:35 EST 2003


Mike Capp <aphelion at clara.co.uk> writes:

> Hi,
>
> I'm currently trying to work out whether GCCXML could be used as the
> parser for a documentation generator along the lines of JavaDoc or
> Doxygen. Obviously I'd need a separate preprocessor to grab the doc
> comments, but that's trivial; the real question is about various
> aspects of C++ source which aren't currently output as XML. In most
> cases the missing bits would be of no interest to a compiler back-end,
> so I'm worried that the GCC parser just doesn't support them.
>
> In particular:
>
> - Typedefs are output as <Typedef> elements, but never seem to be
>   referenced. A typedef function argument will be output as an
>   <Argument> with the typedef's underlying type.
>
> - Declarations (specifically, function prototypes) are not output as
>   XML unless there's no corresponding definition, in which case
>   they're written with an extern="1" attribute. Would it be possible
>   to output declarations even when a definition *is* found, with a
>   prototype="1" or somesuch to distinguish the two?
>
> - File-scope static (as opposed to class-member static) is not
>   marked. (I'm fairly sure I've seen a "linkage_kind" or somesuch in
>   the GCC source, but it may be new; they have a completely rewritten
>   C++ frontend now.)

You might check out Synopsis (synopsis.sf.net), which already does
this job with a C++ parser that seems to be able to handle "real
C++".  It parses all of Boost.Python successfully, for example.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com




More information about the gccxml mailing list