Line # Revision Author
1 1 moose #!/usr/bin/perl
2
3 use strict;
4 use warnings;
5
6 # quicky hacked up to compare against genlex.pl's output
7
8 for my $fname (sort { lc($a) cmp lc($b) } @ARGV) {
9 local *FH;
10 if(!open(FH, $fname)) {
11 warn "Failed to open $fname: $!\n";
12 next;
13 }
14
15 my $text = join '', <FH>;
16 $text =~ s/\r\n/ /g;
17 $text =~ s/\s+/ /g;
18
19 while($text =~ s/LexerModule\s+[^(]+\([^"]+"([^"]+?)"[^)]*\);//s) {
20 # print "$&\n";
21 print "$1\n";
22 }
23
24 #print $text;
25
26 close FH;
27 }