C::Scan module doesn't support old C function defintions...

G

Gancy

Hi All,
I wanted to parse a C program for function defintions. I checked on
usage of C::Scan perl module, but it does not support old C style
function defintions - something like this..

int func(a,b,c,d)
int a,b;
float c;
char *d;
{
....
....
}

Is there anyway i can parse this to find the defintion. I also tried to
right a regex for this. It does not work in all the cases as C has
very flexible sytax. I can write same func() in different way

int func(a,b,c,d)
int a;
int b;
float c; char *d;
{

}

I could not write a single regex to find a old C style function
defintion. Could anybody give some suggestions to move me in right
direction or a generic regex to do the job.

Thanks
Gancy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,016
Latest member
TatianaCha

Latest Threads

Top