X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/e50aee73b3d4c555c37e4b4a16694765fb16c887..270d01deff14e4ea748c5bb85eedf866008d06f7:/keywords.pl diff --git a/keywords.pl b/keywords.pl index 8cbaa83..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,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 @@ -120,6 +145,7 @@ getservbyport getservent getsockname getsockopt +given glob gmtime goto @@ -142,6 +168,7 @@ link listen local localtime +lock log lstat lt @@ -162,6 +189,7 @@ open opendir or ord +our pack package pipe @@ -169,9 +197,11 @@ pop pos print printf +prototype push q qq +qr quotemeta qw qx @@ -193,6 +223,7 @@ rewinddir rindex rmdir s +say scalar seek seekdir @@ -227,17 +258,21 @@ sprintf sqrt srand stat +state study sub substr symlink syscall +sysopen sysread +sysseek system syswrite tell telldir tie +tied time times tr @@ -260,6 +295,7 @@ wait waitpid wantarray warn +when while write x