<div dir="ltr">Yes, please implement this. It is extremely necessary, at least for the clang docs.</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 2, 2014 at 12:27 PM, Dmitri Gribenko <span dir="ltr"><<a href="mailto:gribozavr@gmail.com" target="_blank">gribozavr@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Wed, Oct 1, 2014 at 9:55 PM, andy lawrence <<a href="mailto:ajlawrence@acm.org">ajlawrence@acm.org</a>> wrote:<br>
</span><span class="">> Hello,<br>
><br>
> I am interested in getting involved in the development of clang. I was<br>
> thinking I liked the sound of the following project from the project list:<br>
><br>
> Implement an tool to generate code documentation<br>
<br>
</span>Hi Andy,<br>
<br>
I would be happy to answer your questions, help with design and review patches.<br>
<br>
This year we had a GSoC proposal for this topic, but, unfortunately,<br>
it was not implemented.  Here it is:<br>
<br>
Prior Work<br>
<br>
* clang already understands doxygen-style comments to a degree and<br>
attaches them to the AST:<br>
<a href="http://llvm.org/devmtg/2012-11/Gribenko_CommentParsing.pdf" target="_blank">http://llvm.org/devmtg/2012-11/Gribenko_CommentParsing.pdf</a><br>
<br>
* doxygen can already use clang as a backend<br>
<a href="http://comments.gmane.org/gmane.comp.compilers.clang.devel/29490" target="_blank">http://comments.gmane.org/gmane.comp.compilers.clang.devel/29490</a><br>
<br>
* there already is a cldoc <a href="https://github.com/jessevdk/cldoc" target="_blank">https://github.com/jessevdk/cldoc</a><br>
<br>
Project Plan<br>
<br>
The project will be split in several stages, each depending on the<br>
previous. A completed stage should be able to stand as a smaller<br>
useful contribution by itself.<br>
<br>
Fully parse doxygen comments<br>
<br>
* implement comments for macros<br>
<br>
* fully parse the doxygen language and produce a complete comment AST<br>
<br>
* extend the XML representation of comments to encompass the comment<br>
AST and unresolved references<br>
<br>
* resolve links within the translation unit to a Decl* or a USR<br>
<br>
Indexing Files<br>
<br>
To resolve links across translation units it will be necessary to<br>
retain information from each translation unit.<br>
<br>
* define exactly what kind of information should be retained while<br>
indexing the translation unit in order to be able to resolve links<br>
against it<br>
<br>
* implement indexing info as side-car files that can be consumed by a tool<br>
<br>
Index Database<br>
<br>
Depending on how the project progresses it would be possible to design<br>
and implement a<br>
<br>
* defining a schema for a DB to store information about possible link targets<br>
<br>
* populating DB with information from TUs in the project<br>
<br>
Documentation Generator<br>
<br>
As a final step the new functionality (CommentAST/XML + indexing files<br>
or indexing database) should be used to implement a simple HTML/LaTeX<br>
documentation generator.<br>
<span class="HOEnZb"><font color="#888888"><br>
Dmitri<br>
<br>
--<br>
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if<br>
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <<a href="mailto:gribozavr@gmail.com">gribozavr@gmail.com</a>>*/<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</div></div></blockquote></div><br></div>