Re: `javadoc` for c++

John Carter <>
22 Oct 1998 01:56:17 -0400

          From comp.compilers

Related articles
[3 earlier articles]
Re: `javadoc` for c++ (Quinn Tyler Jackson) (1998-10-17)
Re: `javadoc` for c++ (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++ (1998-10-17)
Re: `javadoc` for c++ (Bruce Dawson) (1998-10-17)
Re: `javadoc` for c++ (Jerry Leichter) (1998-10-17)
Re: `javadoc` for c++ (John Carter) (1998-10-22)
Re: `javadoc` for c++ (Matt Timmermans) (1998-10-30)
| List of all articles for this month |

From: John Carter <>
Newsgroups: comp.compilers
Date: 22 Oct 1998 01:56:17 -0400
Organization: Compilers Central
References: 98-10-079
Keywords: C, documentation

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 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:
Telephone : 27-12-808-0374x194 Fax:- 27-12-808-0338
<> or <>

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.