[cfe-commits] [PATCH] libclang API for comment-to-xml conversion

Douglas Gregor dgregor at apple.com
Mon Aug 6 07:17:24 PDT 2012


On Aug 3, 2012, at 5:28 PM, João Matos <ripzonetriton at gmail.com> wrote:

> Do we really want to add XML-specific conversion code to libclang itself?

What we've found with libclang is that it's very helpful to users to provide high-level interfaces for specific tasks, so that they can get something working quickly. When we're talking about the documentation provided in sources, XML is ideal for this purpose: it's trivial to take that XML and either translate it into something that can be rendered directly (HTML or whatever) or work on the XML with any of the existing XML libraries. Here, XML drastically reduces the barrier to entry.

	- Doug

> On Fri, Aug 3, 2012 at 9:34 PM, Dmitri Gribenko <gribozavr at gmail.com> wrote:
> Hello,
> 
> The attached patch implements a libclang API for comment-to-xml
> conversion.  The implementation also includes a Relax NG schema and
> tests for the schema itself.  The schema is used in c-index-test to
> verify that XML documents we produce are valid.  In order to do the
> validation, we add an optional libxml2 dependency for c-index-test.
> 
> I am not sure that test/Index/Inputs/CommentXML is the best place to
> put the XML schema.  Any suggestions?
> 
> Current implementation of declaration name printer is not perfect --
> it prints 'operator _Bool' for C++ 'operator bool()', for example.
> But this can be fixed in a followup together with a complete
> declaration printer.
> 
> Credits for CMake part go to Doug Gregor.  Credits for Autoconf part
> go to Eric Christopher.  Thanks!
> 
> Please review.
> 
> Dmitri
> 
> --
> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> 
> 
> 
> 
> -- 
> João Matos

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120806/7af397e7/attachment.html>


More information about the cfe-commits mailing list