digitalmars.D - Doxygen and Phobos
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (47/47) Mar 01 2005 I know there was some talk about adding
- Carlos Santander B. (5/8) Mar 01 2005 For a number of versions now, Doxygen has D support without the need of
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (6/12) Mar 01 2005 Really? I found Doxygen 1.4.1 to choke on version { }
- Carlos Santander B. (4/11) Mar 01 2005 _______________________
- nail (5/5) Mar 02 2005 All we need for full support of doxygen is just to modify src/scanner.l ...
- Bastiaan Veelo (6/12) Mar 02 2005 A while back, Ant was working on a direct Doxygen alternative. Since D
- Stewart Gordon (11/19) Mar 02 2005 I'm still on 1.3.7, but ought to upgrade soon. As I look now, it still
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (10/14) Mar 02 2005 Thanks for posting this new version, but it does seem to
- Paul Bonser (6/19) Mar 02 2005 And by "to some extent" they mean "to the extent which it looks like C++...
I know there was some talk about adding documentation to Phobos (source code) using Doxygen, but not what happened ? Using the "dfilter" program and the (http://www.algonet.se/~afb/d/dfilter.d) regular vanilla Doxygen installation (http://www.doxygen.org/download.html) it is not hard to add inline "JavaDoc" style documentation to all D modules... Here's one example, for Phobos' object.d: http://www.algonet.se/~afb/d/doxygen/html/ I just took the regular object.d (with some GDC patches, but) and added some documentation: http://www.algonet.se/~afb/d/doxygen/object.diff I then made a Makefile and a Doxyfile, to avoid (http://www.algonet.se/~afb/d/doxygen/Makefile, http://www.algonet.se/~afb/d/doxygen/Doxyfile) having to type the commands more than once - and in the end it was just to run "make docs"... The "dfilter" program preprocesses the special D constructs so that the end result looks more like C/C++, which Doxygen knows how to handle: http://www.algonet.se/~afb/d/doxygen/object.d.txt By installing LaTeX and ps2pdf (extra) one can even make Doxygen generate PDF versions, without problems: http://www.algonet.se/~afb/d/doxygen/pdf.zip (seem to have messed up the font in that one, but) The rest of the example files are available at: http://www.algonet.se/~afb/d/doxygen/ There is not much that needs to be added to the code, and it offers great benefit in the end. A lot like what adding Unit Tests and Asserts/Contracts does... I think that it should be made a part of standard D ? Naturally someone will want to make their own tool, :-P but until "dmake" and "ddoc": Make and Doxygen works. What do you say ? Any volunteers to do the rest ? ;-) Some information can be taken from: http://www.digitalmars.com/d/phobos.html http://www.prowiki.org/wiki4d/wiki.cgi?Phobos http://www.quit-clan.de/docwiki/view.php?pageid=19 --anders PS. I used the "JavaDoc style", being used to Java. There is also a "Qt Style" available in Doxygen. See manual; http://www.doxygen.org/docblocks.html PPS. Doxygen still needs some work to support all of D, and could probably need a more specific "front end" instead of using a filter and the C++ documentor...
Mar 01 2005
Anders F Björklund wrote:PPS. Doxygen still needs some work to support all of D, and could probably need a more specific "front end" instead of using a filter and the C++ documentor...For a number of versions now, Doxygen has D support without the need of a filter. I don't think its support is too bad. _______________________ Carlos Santander Bernal
Mar 01 2005
Carlos Santander B. wrote:Really? I found Doxygen 1.4.1 to choke on version { } and a few other such similar D constructs. But if it can get by without the filter, so much the better... Then it's just the documentation that is left to write. :-) --andersPPS. Doxygen still needs some work to support all of D, and could probably need a more specific "front end" instead of using a filter and the C++ documentor...For a number of versions now, Doxygen has D support without the need of a filter. I don't think its support is too bad.
Mar 01 2005
Anders F Björklund wrote:Really? I found Doxygen 1.4.1 to choke on version { } and a few other such similar D constructs. But if it can get by without the filter, so much the better...Then, I guess, it needs more work.Then it's just the documentation that is left to write. :-) --anders_______________________ Carlos Santander Bernal
Mar 01 2005
All we need for full support of doxygen is just to modify src/scanner.l in doxy src. Explore 6K lines of code, modify some of them, mere trifle. Are any enthusiasts here? :) Victor Nakoryakov nail-mail<at>mail<dot>ru
Mar 02 2005
nail wrote:All we need for full support of doxygen is just to modify src/scanner.l in doxy src. Explore 6K lines of code, modify some of them, mere trifle. Are any enthusiasts here? :) Victor Nakoryakov nail-mail<at>mail<dot>ruA while back, Ant was working on a direct Doxygen alternative. Since D is easier to parse than C++, it is probably a good idea to drop C++ support altogether. Someone should give Ant's tool a try. (Sorry, I'm tied up at the moment...) Bastiaan.
Mar 02 2005
Carlos Santander B. wrote:Anders F Björklund wrote:I'm still on 1.3.7, but ought to upgrade soon. As I look now, it still claims it merely supports D "to some extent". I posted a list of Doxygen's failings a while back.... http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D/11272 as well as a much more up-to-date version of dfilter.... http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D/7994 Stewart. -- My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit.PPS. Doxygen still needs some work to support all of D, and could probably need a more specific "front end" instead of using a filter and the C++ documentor...For a number of versions now, Doxygen has D support without the need of a filter. I don't think its support is too bad.
Mar 02 2005
Stewart Gordon wrote:I'm still on 1.3.7, but ought to upgrade soon. As I look now, it still claims it merely supports D "to some extent".Yeah, D is listed down there with PHP or something...as well as a much more up-to-date version of dfilter.... http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D/7994Thanks for posting this new version, but it does seem to eat my initial doc-comment - where I had put the mainpage ? Either way, it works "good enough" for now. (Like Make or so) Even if it does require workarounds, especially for e.g. Mango and other big libraries using lots of new D features. But adding some kind of documentation generator to the list of "recommended practices" for D would not hurt, I think... --anders
Mar 02 2005
I'm still on 1.3.7, but ought to upgrade soon. As I look now, it still claims it merely supports D "to some extent". I posted a list of Doxygen's failings a while back.... http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D/11272 as well as a much more up-to-date version of dfilter.... http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D/7994 Stewart.And by "to some extent" they mean "to the extent which it looks like C++" -- -PIB -- "C++ also supports the notion of *friends*: cooperative classes that are permitted to see each other's private parts." - Grady Booch
Mar 02 2005