[Doxygen-develop] Perl/Sh parser
Brought to you by:
dimitri
From: Nigel P. <ni...@in...> - 2008-01-09 00:04:15
|
Hi guys. Happy new year! I am one of the MythTV developers, and some of us use Doxygen in the project a lot. The MythTV source code has C, C++, Obj-C, plus a contrib directory with the usual assortment of Perl, Shell and Python scripts. I'm also a Perl hacker from way-back, and used to use a simple inhouse tool to generate manpages and HTML from custom markup in our Perl and Shell scripts. (this was in the days before POD) So, I would like to start adding Perl/Sh parsing. I am lumping these together because they have similar comment parsing requirements, and I am hoping that one parser can do both. A few questions to help give me direction: 1) How do we feel about adding a parser that just summarises a language instead of trying to parse every little feature that they have crammed in there? (e.g. subroutines and markup instead of full OO, type matching, blessed modules) 2) I have little idea of where to start. The structure of the parsers is a little confusing - I can't work out how the stuff generated from pyscanner.l or fortranscanner.l is called, for example. Any relevant doco, discussion or advice? 3) For a project like MythTV, I don't want symbols in the scripted stuff to be references to the compiled stuff. (e.g. if a Perl script has a usage() routine, it is in no way related to a C function which is also named usage() or _usage() ) How does the PHP parser deal with this? Hacky first steps attached: % diff -ru doxygen-1.5.4.orig doxygen-1.5.4 >doxy.perl.1.patch -- Nigel Pearson, ni...@in...|"People say I'm strange, Telstra Net. Eng., Sydney, Australia | does it make me a stranger? Office: 9202 3900 Fax: 9261 3912 | My best friend was born... Mobile: 0408 664435 Home: 9792 6998 | in a manger" -DC Talk |