[cfe-dev] [patch] improved ast-print-xml for C++
Sebastien Binet
binet at cern.ch
Mon May 10 12:58:42 PDT 2010
Excerpts from Douglas Gregor's message of 2010-05-10 20:08:02 +0200:
>
> On May 10, 2010, at 10:59 AM, Sebastien Binet wrote:
> > please find in attachment a few (I hope) improvements I applied to
> > various files related to the ast-print-xml plugin.
> >
> > 2 changes are worth noticing:
> > - I renamed the CXXMethodDecl node as CXXMethod (for consistency)
> > - I added a default node implementation for all Decl and Types to
> > prevent new crashes (for new types and decls) as per bug #5006
>
> Okay, committed as r103412.
thanks.
> > [my secret agenda is to make ast-print-xml as useful as gccxml wrt API
> > wrapping.]
>
>
> I have a secret agenda w.r.t. XML output as well, but it's very
> different: I want it to either become a clean representation of C++
> ASTs in XML, or I want it removed from Clang. That's a strong
> statement, but here's what I think Clang's XML output should be:
>
> - Complete, covering all of C/C++/Objective-C: We can achieve
> this incrementally.
>
> - Documented with Schema: we need to describe what the XML
> format is, and be able to validate it
>
> - Tested: we should verify that the generated XML matches the
> Schema
>
> - C++, not Clang: The XML format should describe C++, not
> Clang's ASTs. Clang's ASTs are not stable and aren't
> necessarily the best way to describe a C++ program. XML
> formats are supposed to be for interchange, so they have to be
> stable, and ideally could be generated by another front end as
> well.
>
> My concern with the current XML dump is that it claims more than it
> does: it isn't complete enough to be generally useful, and it
> doesn't deliver any of the benefits that XML should.
I see.
My agenda is a bit less ambitious.
but, in the off chance XML output were in the end removed from trunk,
would relying on the new de/serialization work (the PCHReader/Writer)
be a smart move ?
cheers,
sebastien.
--
#########################################
# Dr. Sebastien Binet
# Laboratoire de l'Accelerateur Lineaire
# Universite Paris-Sud XI
# Batiment 200
# 91898 Orsay
#########################################
More information about the cfe-dev
mailing list