G
Gancy
Here is the snipet of the perl script, I have perl version v5.8.5 built
for sun4-solaris. I have run this script on thousands of 'c','C++'
headers and source files. Runs smoothly as my new ESTEEM car. But i
have one surce file toke.c in my test case. soon this scripts hits this
file at it dumps. I have tried and still trying to debug, but still no
solutions. If anybody can help me with this would be of great
appreciation. I can uploaded source file (toke.c) as well as core file
frames(core), if needed.
#!/usr/bin/perl
$np = qr{
\(
(?:
(?>[^()]+ )
|
(??{ $np })
)*
\)
}x;
$funpat = qr/((\W)?(\*?\*?\w+)\s*($np))/;
my $temp;
open (FILE, "toke.c") || die "Cannot open file";
while($temp = <FILE>)
{
$tstring.=$temp;
}
close FILE;
get_fn_call($tstring);
sub get_fn_call($){
my ($cur_str) = @_;
while( $cur_str =~ m/$funpat/g )
{
$4 =~ /^\(((.*\n*.*)*)\)$/;
get_fn_call($1);
}
}
Message 604 of 606 | Pre
for sun4-solaris. I have run this script on thousands of 'c','C++'
headers and source files. Runs smoothly as my new ESTEEM car. But i
have one surce file toke.c in my test case. soon this scripts hits this
file at it dumps. I have tried and still trying to debug, but still no
solutions. If anybody can help me with this would be of great
appreciation. I can uploaded source file (toke.c) as well as core file
frames(core), if needed.
#!/usr/bin/perl
$np = qr{
\(
(?:
(?>[^()]+ )
|
(??{ $np })
)*
\)
}x;
$funpat = qr/((\W)?(\*?\*?\w+)\s*($np))/;
my $temp;
open (FILE, "toke.c") || die "Cannot open file";
while($temp = <FILE>)
{
$tstring.=$temp;
}
close FILE;
get_fn_call($tstring);
sub get_fn_call($){
my ($cur_str) = @_;
while( $cur_str =~ m/$funpat/g )
{
$4 =~ /^\(((.*\n*.*)*)\)$/;
get_fn_call($1);
}
}
Message 604 of 606 | Pre