From 0419aebbd5a1d6210b8d44a4b24812ad69deffd9 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Thu, 24 Jul 2003 23:40:16 +0000 Subject: [PATCH] Could they have possibly changed any other things about the javap output that would cause this class matching script to fail in unexpected ways? I'm sure to soon find out. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2724 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- bin/matchclasses | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/bin/matchclasses b/bin/matchclasses index 8a204f84b..709c99b53 100755 --- a/bin/matchclasses +++ b/bin/matchclasses @@ -1,6 +1,6 @@ #!/usr/bin/perl -w # -# $Id: matchclasses,v 1.5 2003/07/24 23:19:26 mdb Exp $ +# $Id: matchclasses,v 1.6 2003/07/24 23:40:16 mdb Exp $ # # A script which inspects a hierarchy of classes and generates lists of # classes that match specified criterion. The criterion are that a class @@ -98,7 +98,7 @@ while (@gclasses) { # look for a line that identifies a class or interface while () { - next unless (/ class / || / interface /); + next unless (/class/ || /interface/); chomp; my $goods = $_; @@ -122,11 +122,8 @@ while (@gclasses) { # last is the class name my $class; - if ($goods =~ s: class ([A-Za-z0-9.\$]+)::g) { - $class = clean_class($1); - $class =~ s: ::g; - } elsif ($goods =~ s: interface ([A-Za-z0-9.\$]+)::g) { - $class = $1; + if ($goods =~ s:(class|interface) ([A-Za-z0-9.\$]+)::g) { + $class = clean_class($2); $class =~ s: ::g; }