in reply to Code analyzing with perl?

In other words, you want to write something that will lex, parse, and analyze C and PHP. Those are three separate (though somewhat related) problems. So, first lex and parse the C (or PHP) into a data structure. Then, you analyze that data structure for anything you consider to be a flaw. Take a look at PPI for how to lex and parse a language (in this case, Perl). Alternately, you'll want to use something like flex and yacc (Parse::Flex and Parse::Eyapp are good modules to start with).

My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

Replies are listed 'Best First'.
Re^2: Code analyzing with perl?
by -=Mizo=- (Novice) on Jun 18, 2008 at 19:35 UTC
    The project will be checking the source for specific bugs like buffer overflows,heap overflow..etc in C codes and remote file include,local file include...etc in php codes I'll take a look at the 2 modules thank you alot for your help