More tweaks to deal with 1.4.2 javap output.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2722 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
+8
-6
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/perl -w
|
#!/usr/bin/perl -w
|
||||||
#
|
#
|
||||||
# $Id: matchclasses,v 1.3 2003/07/24 21:26:40 mdb Exp $
|
# $Id: matchclasses,v 1.4 2003/07/24 22:12:52 mdb Exp $
|
||||||
#
|
#
|
||||||
# A script which inspects a hierarchy of classes and generates lists of
|
# A script which inspects a hierarchy of classes and generates lists of
|
||||||
# classes that match specified criterion. The criterion are that a class
|
# classes that match specified criterion. The criterion are that a class
|
||||||
@@ -104,26 +104,28 @@ while (@gclasses) {
|
|||||||
my $goods = $_;
|
my $goods = $_;
|
||||||
|
|
||||||
# strip off the close brace
|
# strip off the close brace
|
||||||
$goods =~ s: .$::g;
|
$goods =~ s:\s*{\s*$::g;
|
||||||
|
|
||||||
# interfaces are now at the end of the line
|
# interfaces are now at the end of the line
|
||||||
my @ifaces;
|
my @ifaces;
|
||||||
if ($goods =~ s: implements ([A-Za-z0-9.\$]+)::g) {
|
if ($goods =~ s: implements (.*)$::g) {
|
||||||
my $idefs = $1;
|
my $idefs = $1;
|
||||||
$idefs =~ s:\s+$::g;
|
$idefs =~ s:\s+$::g;
|
||||||
$idefs =~ s:\. :\$:g;
|
$idefs =~ s:\. :\$:g;
|
||||||
|
$idefs =~ s: ::g;
|
||||||
$idefs =~ s:\$([^0-9]):.$1:g;
|
$idefs =~ s:\$([^0-9]):.$1:g;
|
||||||
@ifaces = split(/, /, $idefs);
|
@ifaces = split(/,/, $idefs);
|
||||||
}
|
}
|
||||||
|
|
||||||
# now the parent class or parent interfaces are at the end
|
# now the parent class or parent interfaces are at the end
|
||||||
my @parents;
|
my @parents;
|
||||||
if ($goods =~ s: extends ([A-Za-z0-9.\$]+)::g) {
|
if ($goods =~ s: extends (.*)$::g) {
|
||||||
my $pdefs = $1;
|
my $pdefs = $1;
|
||||||
$pdefs =~ s:\s+$::g;
|
$pdefs =~ s:\s+$::g;
|
||||||
$pdefs =~ s:\. :\$:g;
|
$pdefs =~ s:\. :\$:g;
|
||||||
|
$pdefs =~ s: ::g;
|
||||||
$pdefs =~ s:\$([^0-9]):.$1:g;
|
$pdefs =~ s:\$([^0-9]):.$1:g;
|
||||||
@parents = split(/, /, $pdefs);
|
@parents = split(/,/, $pdefs);
|
||||||
}
|
}
|
||||||
|
|
||||||
# last is the class name
|
# last is the class name
|
||||||
|
|||||||
Reference in New Issue
Block a user