Re: Extending Doxygen to support other languages?

Jason McKesson <[email protected]>
Newsgroups gmane.text.doxygen.devel
Message-ID <[email protected]>
I'm all for modularizing Doxygen. However, the hard part of Doxygen has 
always been the parsing/data collection. Compared to that, my XML 
documentation format is pretty simple stuff. Unless there is a concerted 
effort by people with Doxygen experience to refactor the project into 
something more modular, then ideas like this will remain ideas rather 
than fact.

Basically, given my rather limited experience with Doxygen, I believe 
that the following sequence of steps would need to be taken to make 
Doxygen a modular system for documenting code:

1: Refactor the internal data structures that hold the parsed 
documentation. This kind of refactoring is actually quite do-able 
without hurting the code too much. Basically, you need to write wrapper 
objects (much like the ones I used for my XML stuff) that reflect how we 
want to interface with the documentation rather than how Doxygen 
currently works now.

2: Replace the refactored objects in the document generation code. 
Preferably, generate a single XML file that can be processed by XML 
tools (whether C++ applications or XSLT transforms) that represents this 
data, which is used as the source for generating all other formats.

3: Remove the old objects. This means that, rather than the refactored 
objects being interfaces to the old data, they now are the only means of 
talking to the parsed data. So now the parsing code needs to use the 
refactored objects.

4: Refactor the parser. Much like the above, make a new kind of parser 
that, for the time being, acts as an interface with the old parser. If 
you're wondering why it is that this wasn't #1, it's because quite a bit 
of parsing actually happens in the documentation generators. Until those 
get straightened out, you can't modularize the parser. The interface 
will need to be able to be modular.

5: Given the new parser interface, the code that uses the parser will 
have to be substantially restructured/rewritten to use that new 
interface, much like step 2.

6: Kill off the old parser. Make the new parser interface a living, 
modularized parser interface that can have new pieces loaded from 
dynamic libraries and so forth.

To be honest, I could do steps 1 & 2. Indeed, I had to do some of that 
in order to be able to talk to Doxygen in a reasonably coherent way. 1 & 
2 would be somewhat straightforward. And I would certainly be willing to 
supply XSLTs for generating various kinds of output formats. HTML and 
XSL-FO would be my personal specialties, but they probably wouldn't look 
very "Doxygen style".

Step 3 would require far more familiarity with how the parser builds the 
documented code than I have or want. And steps 4-6 are well outside of 
my league.


Keith J Outwater wrote:
> Hello,
> I have seen this topic covered a few times in the archives, but there does 
> not seem to be a lot of activity in this area.
> I am very interested in using Doxygen to generate documentation for VHDL 
> and other file types such as shell scripts, makefiles and the like.
> Seems to me that moving to modular architecture for Doxygen would be a big 
> enabler for those interested in having multi-language support.  For 
> example, a plugin architecture that would allow development of language 
> specific front ends that would produce language-neutral data for the 
> Doxygen core to process.  Back end plugins could then format this 
> information.
> I am more that willing to work on a VHDL front-end (plugin), but, sadly, 
> my time and skills are probably not up to the task of helping re-architect 
> Doxygen!
> Is such an approach feasible?
>
> Keith
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Doxygen-develop mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/doxygen-develop
>
>   



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.