|[3 earlier articles]|
|Re: `javadoc` for c++ email@example.com (Quinn Tyler Jackson) (1998-10-17)|
|Re: `javadoc` for c++ firstname.lastname@example.org (1998-10-17)|
|Re: `javadoc` for c++ Marko.Makela@HUT.FI (Marko =?ISO-8859-1?Q?M=E4kel=E4?=) (1998-10-17)|
|Re: `javadoc` for c++ email@example.com (1998-10-17)|
|Re: `javadoc` for c++ firstname.lastname@example.org (Bruce Dawson) (1998-10-17)|
|Re: `javadoc` for c++ email@example.com (Jerry Leichter) (1998-10-17)|
|Re: `javadoc` for c++ firstname.lastname@example.org (John Carter) (1998-10-22)|
|Re: `javadoc` for c++ email@example.com (Matt Timmermans) (1998-10-30)|
|From:||John Carter <firstname.lastname@example.org>|
|Date:||22 Oct 1998 01:56:17 -0400|
On Tue, 13 Oct 1998, Marcus Rohrmoser wrote:
> Is there a tool that generates class-documentation from a c++ header
> like javadoc does from java-source?
> [C++ is nearly impossible to parse with yacc because it's so ambiguous
> see the archives for plenty of discussion. -John]
I was considering just this problem when it struck me as more
reasonable to generate the headers from the documentation. This is
basically Knuth's Literate programming idea taken one step further.
The idea is this...
Mix the C++ function declarations, documentation and implementation in
one file. Mark it up in XML. (See www.w3.org of info on XML)
Run it through James Clark's nsgmls to validate and parse the
XML. Feed that output into a wee perl scriptie from which flows a whole
bunch of streams.
1) The class interface (.h file)
2) The class implementation (.cc file)
3) The online documentation. (.html file)
4) The dead tree documentation (.tex file)
Now add to this the idea that C++ templates are @#$@! obscure. The
programmer using the templated class is left wandering just how did
the compiler implement that particular combination of instantiation /
traits / overloading / inheritance (ordinary/virtual) & polymorphism.
So add to the wee perl scriptie the ability to instantiate
templates. Leaving you with clean clear template free C++ code, with
each instantiation custom crafted and custom documented.
I have got as far as the wee perl scriptie to instantiate the
templates for me and was contemplating how to add the documentation.
It became obvious I was going to be "marking up" and hence I should
really be using XML.
Oh yes, and this adds yet another output stream. The "template"
documentation. The patterns and traits used by the template must also be
marked up and documented.
John Carter EMail: email@example.com
Telephone : 27-12-808-0374x194 Fax:- 27-12-808-0338
<http://www.geocities.com/SoHo/Cafe/5947> or <http://iwqs.pwv.gov.za>
Return to the
Search the comp.compilers archives again.