X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=keywords.pl;h=eb0c0af41bc77e76ed7312b70431b7979341e280;hb=6e449a3ab1e3bd9d7e138ca681c733e57d4daa49;hp=c9479c459c63c95a9f9b883424bcac13c1124252;hpb=c750a3ec3b866067ab46dbcc9083205d823047c3;p=p5sagit%2Fp5-mst-13.2.git diff --git a/keywords.pl b/keywords.pl index c9479c4..eb0c0af 100755 --- a/keywords.pl +++ b/keywords.pl @@ -1,22 +1,47 @@ -#!/usr/bin/perl +#!/usr/bin/perl -w +use strict; +require 'regen_lib.pl'; +safer_unlink ("keywords.h"); open(KW, ">keywords.h") || die "Can't create keywords.h: $!\n"; +binmode KW; select KW; +print <) { chop; next unless $_; next if /^#/; - ($keyword) = split; + my ($keyword) = split; print &tab(5, "#define KEY_$keyword"), $keynum++, "\n"; } +print KW "\n/* ex: set ro: */\n"; + +close KW or die "Error closing keywords.h: $!"; + ########################################################################### sub tab { - local($l, $t) = @_; + my ($l, $t) = @_; $t .= "\t" x ($l - (length($t) + 1) / 8); $t; } @@ -24,22 +49,19 @@ sub tab { __END__ NULL -__LINE__ __FILE__ +__LINE__ +__PACKAGE__ __DATA__ __END__ AUTOLOAD BEGIN +UNITCHECK CORE DESTROY END -EQ -GE -GT -LE -LT -NE -RESTART +INIT +CHECK abs accept alarm @@ -48,6 +70,7 @@ atan2 bind binmode bless +break caller chdir chmod @@ -65,6 +88,7 @@ cos crypt dbmclose dbmopen +default defined delete die @@ -121,6 +145,7 @@ getservbyport getservent getsockname getsockopt +given glob gmtime goto @@ -143,6 +168,7 @@ link listen local localtime +lock log lstat lt @@ -163,6 +189,7 @@ open opendir or ord +our pack package pipe @@ -174,6 +201,7 @@ prototype push q qq +qr quotemeta qw qx @@ -195,6 +223,7 @@ rewinddir rindex rmdir s +say scalar seek seekdir @@ -229,6 +258,7 @@ sprintf sqrt srand stat +state study sub substr @@ -236,6 +266,7 @@ symlink syscall sysopen sysread +sysseek system syswrite tell @@ -264,6 +295,7 @@ wait waitpid wantarray warn +when while write x