I think it would be difficult to distinguish functions from macros from conditional expressions on the basis of that or similar regexps. What you need to do is preprocess and parse the the C language.
Here is a location for the
grammar .
To parse C in perl, one could use regexps to lex C code into tokens and Parse::RecDescent to parse C tokens based on the above grammar.
-Mark
Comment on Re: regex 2 find C function dependencies