I
IJALAB
Hi
I have to write a parser to go over the C code base and identify all the functions in each file and replace each function name with a keyword, for example, i have a file name
1.c
int func1(struct commandId)
{
do();
return ( SUCCESS );
}
void func2(struct commandId)
{
do();
return ( SUCCESS );
}
float func3(struct commandId)
{
do();
return ( SUCCESS );
}
My intention is to replace func1, func2, func3 with func1_main, func2_main, func3_main....
The code base is big and there are lot of files and other open close braces in if else statements etc.., so, i would like to know any parser that exist in PERL to do this intended function.
thanks a lot
bala
I have to write a parser to go over the C code base and identify all the functions in each file and replace each function name with a keyword, for example, i have a file name
1.c
int func1(struct commandId)
{
do();
return ( SUCCESS );
}
void func2(struct commandId)
{
do();
return ( SUCCESS );
}
float func3(struct commandId)
{
do();
return ( SUCCESS );
}
My intention is to replace func1, func2, func3 with func1_main, func2_main, func3_main....
The code base is big and there are lot of files and other open close braces in if else statements etc.., so, i would like to know any parser that exist in PERL to do this intended function.
thanks a lot
bala