* docs/pmc.pod:
[parrot.git] / editor / ops2vim.pl
blob7214b639028dad97bf0d10e11863640b2c445ce4
1 #! perl
2 use strict;
3 use warnings;
5 use File::Basename qw/basename/;
8 my $cline = my $prefix = 'syn keyword pirOp';
10 my %seen;
12 ## make sure files have been globbed on non-globbing OSes
13 ## and make sure at least one command-line parameter has been passed
14 @ARGV = @ARGV
15 ? map {glob $_} @ARGV
16 : die "usage: " . basename($0) . " FILE [ FILE [ ... ] ]\n";
18 while (<>) {
19 if (/\bop \s+ (\w+) \s* \(/x) {
20 next if $seen{$1}++;
21 if (length($1) + length($cline) > 72) {
22 print "$cline\n";
23 $cline = $prefix;
25 $cline .= " $1";
29 ###
30 print "$cline\n";
32 # Local Variables:
33 # mode: cperl
34 # cperl-indent-level: 4
35 # fill-column: 100
36 # End:
37 # vim: expandtab shiftwidth=4: