X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=keywords.pl;h=d702a1a01f2cae52b0cddf79154a68fb5108e777;hb=29469fa673ae2b707c0e65eb6190f2fab11938b1;hp=086a10956ab40423392c9f701b0c67c09967b7ce;hpb=c07a80fdfe3926b5eb0585b674aa5d1f57b32ade;p=p5sagit%2Fp5-mst-13.2.git diff --git a/keywords.pl b/keywords.pl index 086a109..d702a1a 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,21 +49,19 @@ sub tab { __END__ NULL -__LINE__ __FILE__ +__LINE__ +__PACKAGE__ __DATA__ __END__ AUTOLOAD BEGIN +UNITCHECK CORE DESTROY END -EQ -GE -GT -LE -LT -NE +INIT +CHECK abs accept alarm @@ -47,6 +70,7 @@ atan2 bind binmode bless +break caller chdir chmod @@ -64,6 +88,7 @@ cos crypt dbmclose dbmopen +default defined delete die @@ -80,6 +105,7 @@ endpwent endservent eof eq +err eval exec exists @@ -120,6 +146,7 @@ getservbyport getservent getsockname getsockopt +given glob gmtime goto @@ -142,6 +169,7 @@ link listen local localtime +lock log lstat lt @@ -162,6 +190,7 @@ open opendir or ord +our pack package pipe @@ -173,6 +202,7 @@ prototype push q qq +qr quotemeta qw qx @@ -194,6 +224,7 @@ rewinddir rindex rmdir s +say scalar seek seekdir @@ -228,6 +259,7 @@ sprintf sqrt srand stat +state study sub substr @@ -235,6 +267,7 @@ symlink syscall sysopen sysread +sysseek system syswrite tell @@ -263,6 +296,7 @@ wait waitpid wantarray warn +when while write x