<html><body bgcolor="#FFFFFF"><div><br></div><div>On May 10, 2010, at 1:58 PM, Sebastien Binet <<a href="mailto:binet@cern.ch">binet@cern.ch</a>> wrote:<br><br></div><div></div><blockquote type="cite"><div><span>Excerpts from Douglas Gregor's message of 2010-05-10 20:08:02 +0200:</span><br><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>On May 10, 2010, at 10:59 AM, Sebastien Binet wrote:</span></blockquote><blockquote type="cite"><blockquote type="cite"><span>[my secret agenda is to make ast-print-xml as useful as gccxml wrt API</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>wrapping.]</span><br></blockquote></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>I have a secret agenda w.r.t. XML output as well, but it's very</span><br></blockquote><blockquote type="cite"><span>different: I want it to either become a clean representation of C++</span><br></blockquote><blockquote type="cite"><span>ASTs in XML, or I want it removed from Clang. That's a strong</span><br></blockquote><blockquote type="cite"><span>statement, but here's what I think Clang's XML output should be:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>    - Complete, covering all of C/C++/Objective-C: We can achieve</span><br></blockquote><blockquote type="cite"><span>      this incrementally.</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>    - Documented with Schema: we need to describe what the XML</span><br></blockquote><blockquote type="cite"><span>      format is, and be able to validate it</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>    - Tested: we should verify that the generated XML matches the</span><br></blockquote><blockquote type="cite"><span>      Schema</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>    - C++, not Clang: The XML format should describe C++, not</span><br></blockquote><blockquote type="cite"><span>      Clang's ASTs. Clang's ASTs are not stable and aren't</span><br></blockquote><blockquote type="cite"><span>      necessarily the best way to describe a C++ program. XML</span><br></blockquote><blockquote type="cite"><span>      formats are supposed to be for interchange, so they have to be</span><br></blockquote><blockquote type="cite"><span>      stable, and ideally could be generated by another front end as</span><br></blockquote><blockquote type="cite"><span>      well.</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>My concern with the current XML dump is that it claims more than it</span><br></blockquote><blockquote type="cite"><span>does: it isn't complete enough to be generally useful, and it</span><br></blockquote><blockquote type="cite"><span>doesn't deliver any of the benefits that XML should. </span><br></blockquote><span></span><br><span>I see.</span><br><span>My agenda is a bit less ambitious.</span><br></div></blockquote><div><br></div>I understand.<div><br><div><blockquote type="cite"><div><span>but, in the off chance XML output were in the end removed from trunk,</span><br><span>would relying on the new de/serialization work (the PCHReader/Writer)</span><br><span>be a smart move?</span><font class="Apple-style-span" color="#94000E"><span class="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469);"><font class="Apple-style-span" color="#0023A3"><span class="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.300781); -webkit-composition-fill-color: rgba(175, 192, 227, 0.234375); -webkit-composition-frame-color: rgba(77, 128, 180, 0.234375);"><br></span></font></span></font></div></blockquote><br></div><div>API wrapping is probably best implemented as either a custom ASTConsumer (which has full, direct access to the AST after parsing) or a user of the C bindings (which would probably need more work to expose enough of the AST for wrapping). I actually think that these are better solutions even if XML dumping remains in the tree. </div><div><br></div><div>  - Doug</div></div></body></html>