X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=keywords.pl;h=d702a1a01f2cae52b0cddf79154a68fb5108e777;hb=21fa6956243df9cb622bebfa0934ea7923519b4f;hp=d3426be313e32f64b364612655d4eee80d5290eb;hpb=a0d0e21ea6ea90a22318550944fe6cb09ae10cda;p=p5sagit%2Fp5-mst-13.2.git diff --git a/keywords.pl b/keywords.pl index d3426be..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,20 +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 @@ -46,6 +70,7 @@ atan2 bind binmode bless +break caller chdir chmod @@ -63,6 +88,7 @@ cos crypt dbmclose dbmopen +default defined delete die @@ -79,6 +105,7 @@ endpwent endservent eof eq +err eval exec exists @@ -119,6 +146,7 @@ getservbyport getservent getsockname getsockopt +given glob gmtime goto @@ -141,6 +169,7 @@ link listen local localtime +lock log lstat lt @@ -161,6 +190,7 @@ open opendir or ord +our pack package pipe @@ -168,9 +198,11 @@ pop pos print printf +prototype push q qq +qr quotemeta qw qx @@ -192,6 +224,7 @@ rewinddir rindex rmdir s +say scalar seek seekdir @@ -226,17 +259,21 @@ sprintf sqrt srand stat +state study sub substr symlink syscall +sysopen sysread +sysseek system syswrite tell telldir tie +tied time times tr @@ -259,6 +296,7 @@ wait waitpid wantarray warn +when while write x