Has anybody heard about a filter for Doxygen for the Cobol language ?
Doxygen can handle Fortran code, it should be possible to configure doxygen to parse cobol code.
Any information on that subject ?
Using Doxygen on COBOL source would require writing a COBOL parser for Doxygen - not a trivial task. (Doxygen's Fortran and other parsers are not helpful in this regard.)
See question 12 in the Doxygen FAQ: www.stack.nl/.../faq.html
COBOL syntax is not sufficiently close to C syntax to make a filter a viable option. (Technical details: C is an LL(1) language that can easily be handled by a straightforward recursive-descent parser. COBOL is a highly contextual language with several varieties that have significantly different syntax rules.)
There are alternatives to Doxygen that don't try to extract information from the program source code, just gather documentation from source comments. lp4all (www.linux-france.org/.../lp4all) is one, though it seems to be moribund.
Thank you for the answer. I had no knowledge of lp4all. I have been using Robodoc (sourceforge.net/.../robodoc) which is similar to lp4all as it takes the information from the source comments given by the programmer. I defined a few tokens for the comment and it works fine.
But Doxygen is much more complete...
Although not trivial, Doxygen would be a great documentation tool for cobol, especially with the new cobol approaches like managed code.
Fortran is far from being a LL language and has its doxygen parser!
Yes, Doxygen has a parser for Fortran. That's exactly my point - it has a complete parser, not just a filter. If COBOL were sufficiently close to C, it might be possible to create a Doxygen filter for it; but it isn't. Creating a Doxygen parser is a lot more work than creating a filter.
It'd be great if there were a Doxygen parser for COBOL, but it's a big task, especially given COBOL's variety of incompatible source formats. Just handling both procedural and OO COBOL would be tough. (The last time I looked, Doxygen's PHP parser didn't correctly handle some mixes of procedural and OO PHP, and the COBOL situation is even harder.) As always, the problem is finding someone who has both the necessary knowledge and the time.
I suppose it might be possible to adapt the parser from, say, OpenCOBOL, and at least handle procedural COBOL in Doxygen. I haven't looked at the OpenCOBOL sources to see how plausible that might be.