(Thanks jbb, I hadn't caught that in the proofreading cycle. I found the
missing < and > on my
own....)
#!/usr/bin/perl
use strict;
my(%fundamental)
= ( B => 'byte',
C => 'char',
S => 'short',
I =>
'int',
J => 'long',
F => 'float',
D => 'double',
Z =>
'boolean',
V => 'void',
);
my(%hitclasses);
while(<STDIN>) {
chomp;
if(/^s*Signature:s*(([^)]+))([^()]+)$/i)
{
my $argsig=$1;
my
$retsig=$2;
foreach my $sig
($argsig,$retsig) {
my(@types);
my $isArray=0;
while($sig ne '')
{
my
$type=substr($sig,0,1,'');
if($type
eq '[') {
$isArray++;
redo;
}
if($type eq 'L') {
# Class name to ;
my
$class='';
while($sig ne '' and
(my $c=substr($sig,0,1,'')) ne ';') {
$class.=$c;
}
$class=~tr{/}{.};
# print "Found class: $classn";
$hitclasses{$class}++;
} elsif(exists($fundamental{$type})) {
# print "Found fundamental type
$fundamental{$type}n";
} else
{
die "Unknown signature
$type$sign";
}
$isArray=0;
}
}
}
}
foreach my $class (sort(keys(%hitclasses))) {
next if grep { $class =~ /^Q$_E./ } @ARGV;
print
$class,"n";
}
Next time I'll just stick it on my home server
and never mind the congestion on the tiny little upstream. (So tired of
asymmetric home internet services....)
[ Reply to This | Parent | # ]
|