using reg ex in php i was trying to count
1)unique number of operand used in whole program
2)unique number of operator used in whole program
3)total number of operand used in whole program
4)total number of operator used in whole program
along with it
how can i count
1)fan in
that is number of calls to the function(from others unique functions)
2)fan out
number of calls from the function(to others unique functions)
any ideas
thanks
how to count unique operator and opernad,functionin and out
Moderator: General Moderators
I might be wrong but it sounds like the problem is beyond regular expressions and needs a parser for context-free grammars.
If you want to analyze php scripts http://de2.php.net/tokenizer may be of interest.
If you want to analyze php scripts http://de2.php.net/tokenizer may be of interest.