Perl Help

Perl Help

am 17.08.2007 16:08:39 von mihirtr

Hi,
I have trying see if it is possible using perl to do following.

I have multiple C/C++ files which I need to go manually and find out
specific function call. I want to check 2nd parameter of this function
(Function_To_Look_For) and get value of it and store it in local file
or output it. For example:

Lets say there is a file named: abc.c It has following contents.

void
MY_CLASS:: Func1()
{

STRUCT_1_T my_struct1;
Function_To_Look_For (MY_1ST_PARAMETER,
sizeof( STRUCT_1_T ),
MY_3RD_PARAMETER);
}

void
MY_CLASS:: Func2()
{

STRUCT_2_T my_struct2;
Function_To_Look_For (MY_1ST_PARAMETER,
sizeof(STRUCT_2_T ),
MY_3RD_PARAMETER);

}

After running this script, I want get "sizeof( STRUCT_1_T )" ,
"sizeof(STRUCT_2_T )" as outputs.
I am not sure if this is possible, just wanted to check with experts
on this.


Thanks,

Re: Perl Help

am 17.08.2007 18:47:33 von 1usa

mihirtr@gmail.com wrote in news:1187359719.456172.61500
@m37g2000prh.googlegroups.com:

> I have trying see if it is possible using perl to do following.

Yes.

....

> After running this script, I want get "sizeof( STRUCT_1_T )" ,
> "sizeof(STRUCT_2_T )" as outputs.

What have you tried so far?

Sinan

--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html