good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Extracting Commentsby nofernandes (Beadle) |
on Jun 20, 2003 at 08:16 UTC ( [id://267481]=perlquestion: print w/replies, xml ) | Need Help?? |
nofernandes has asked for the wisdom of the Perl Monks concerning the following question:
Hello everyone... I need your wise advice and suggestions!!
I need to I make a program which the main objective is to extract the comments on source code in order to see if the programmers did cumply with one of the principles of development of my company! The principle of commented code, for a better understanding of it, for later upgrading or bugs fixing!
In order to do that i must be capable of extracting the comments of any type of source code(PERL, JAVA, PL/SQL, ProC, C++, etc)!! I have tested a Module(Regexp http://search.cpan.org/author/ABIGAIL/Regexp-Common-2.113/lib/Regexp/Common/comment.pm) that is a very nice and helpfull tool for this kind of work!! But the problem is that the regexes donīt preview all the cases! And this module catches all the above examples!! Other problem is the multiline coments in Java or C/C++; Or Other idea is to have the following structure: Where the source file is the file to be analyzed, the ParserPl.pl is the file where are the regexes to match the comments and the program.pl is the file to process the results of the parsing... This idea seems good because in this way i may construct diferent parsers for each language!! My question is if you have any sugestion to do this kind of program?? Thanks for your help, sorry my poor English!! Best Regards 2003-06-21 edit ybiC: <code> and evidently intended <p> tags
Back to
Seekers of Perl Wisdom
|
|