#!/usr/bin/perl use strict; use warnings; # quicky hacked up to compare against genlex.pl's output for my $fname (sort { lc($a) cmp lc($b) } @ARGV) { local *FH; if(!open(FH, $fname)) { warn "Failed to open $fname: $!\n"; next; } my $text = join '', ; $text =~ s/\r\n/ /g; $text =~ s/\s+/ /g; while($text =~ s/LexerModule\s+[^(]+\([^"]+"([^"]+?)"[^)]*\);//s) { # print "$&\n"; print "$1\n"; } #print $text; close FH; }