JavaDoc for C? 
Author Message
 JavaDoc for C?

I am looking for tools in the public domain that extract specially
formatted comments from C and C++ source code to create
documentation; a C/C++ analogue to JavaDoc.
--



Wed, 19 Mar 2003 03:00:00 GMT  
 JavaDoc for C?


Quote:
>I am looking for tools in the public domain that extract specially
>formatted comments from C and C++ source code to create
>documentation; a C/C++ analogue to JavaDoc.

They are quite simple to write as a finite state machine:

Start assuming that everything is code. I.E. state = CODE
If you find a '/*' pair then the state becomes NORMAL_COMMENT
If the next character is '*' then state becomes SPECIAL_COMMENT
   write special comment to document file until '*/' pair is found
state reverts to CODE

Continue through file.

The harder bit is formatting the output in a reasonable way.

I wrote a simple one some time ago. Made HTML files from the marked up
sections. If you want the source either post here or e-mail me and I'll
send it.

--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Bob Wightman
--



Wed, 19 Mar 2003 03:00:00 GMT  
 JavaDoc for C?

Quote:

> I am looking for tools in the public domain that extract specially
> formatted comments from C and C++ source code to create
> documentation; a C/C++ analogue to JavaDoc.

DOC++ is a documentation system for C/C++/Java very similar to JavaDoc.
The original version can be found at:
    http://www.zib.de/Visual/software/doc++/index.html
but the current development is moved somewhere else.

--
Jaroslaw Tomczak ______________________________________________ o  o ___
WWW Home Page:   http://gerwazy.chem.uni.wroc.pl/~jatom           \

--



Sat, 22 Mar 2003 13:23:34 GMT  
 JavaDoc for C?
DoxyGen can be a good choice:
http://www.stack.nl/~dimitri/doxygen/

Gyuri


Quote:
> I am looking for tools in the public domain that extract specially
> formatted comments from C and C++ source code to create
> documentation; a C/C++ analogue to JavaDoc.
> --


--



Sat, 22 Mar 2003 13:23:48 GMT  
 JavaDoc for C?

Quote:

> I am looking for tools in the public domain that extract specially
> formatted comments from C and C++ source code to create
> documentation; a C/C++ analogue to JavaDoc.

Try Doxygen, which is an excellent tool:

    http://www.stack.nl/~dimitri/doxygen/index.html
--



Sat, 22 Mar 2003 13:24:04 GMT  
 JavaDoc for C?
[...]

Quote:
> They are quite simple to write as a finite state machine:
> Start assuming that everything is code. I.E. state = CODE
> If you find a '/*' pair then the state becomes NORMAL_COMMENT
> If the next character is '*' then state becomes SPECIAL_COMMENT
>    write special comment to document file until '*/' pair is found
> state reverts to CODE

Actually, that's *exactly* what the (free version of the ) tool
'cxref' already does. It even uses /** as the telltale sequence that a
given comment is special.  Plus it parses the C code itself, too, to
extract cross reference information ("function X calls function Z, is
called by function Y, uses global variables A, B and C", and more).

And it can generate HTML, too, as one of its output formats.
--

Even if all the snow were burnt, ashes would remain.
--



Sat, 22 Mar 2003 13:24:25 GMT  
 JavaDoc for C?


Bob> They are quite simple to write as a finite state machine:
Bob>
Bob> Start assuming that everything is code. I.E. state = CODE
Bob> If you find a '/*' pair then the state becomes NORMAL_COMMENT

Not necessarily - you need to have a state to represent being inside a
string literal (and, in C99, a // comment).  Otherwise, '/*' in either
of those will give a false match.
--



Sat, 22 Mar 2003 03:00:00 GMT  
 JavaDoc for C?

Quote:


> > I am looking for tools in the public domain that extract specially
> > formatted comments from C and C++ source code to create
> > documentation; a C/C++ analogue to JavaDoc.

> Try Doxygen, which is an excellent tool:

>     http://www.stack.nl/~dimitri/doxygen/index.html
> --


We use on a large C project and it's perfect. Try it !

C.
--



Sat, 22 Mar 2003 03:00:00 GMT  
 JavaDoc for C?

Quote:


> Bob> They are quite simple to write as a finite state machine:
> Bob>
> Bob> Start assuming that everything is code. I.E. state = CODE
> Bob> If you find a '/*' pair then the state becomes NORMAL_COMMENT

> Not necessarily - you need to have a state to represent being inside a
> string literal (and, in C99, a // comment).  Otherwise, '/*' in either
> of those will give a false match.

I admit I forgot about this case when I posted the first message. I
remembered it (at least for the '\*' when I looked at my code. C'est la vie.

--
Views expressed in this message are my own
and not those of my employer.
--



Mon, 24 Mar 2003 11:30:02 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. Newbie: separate big .cs file into small .cs files

2. javadoc style commenting for C code

3. Tools for documentation - works like javadoc.

4. Looking for Javadoc like documentation generator

5. C equivalent to javadoc

6. Tools for documentation - works like javadoc.

7. javadoc-like program for C/C++

8. Needed: javadoc-like toold for IDL and C++

9. javadoc-like utilities

10. javadoc-like utilities

11. JavaDoc for VC++??

12. JavaDoc like tool

 

 
Powered by phpBB® Forum Software