1#!/usr/bin/perl 2 3require 'regen_lib.pl'; 4safer_unlink ("keywords.h"); 5open(KW, ">keywords.h") || die "Can't create keywords.h: $!\n"; 6binmode KW; 7select KW; 8 9print <<EOM; 10/* -*- buffer-read-only: t -*- 11 * 12 * keywords.h 13 * 14 * Copyright (C) 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2005, 15 * 2006, by Larry Wall and others 16 * 17 * You may distribute under the terms of either the GNU General Public 18 * License or the Artistic License, as specified in the README file. 19 * 20 * !!!!!!! DO NOT EDIT THIS FILE !!!!!!! 21 * This file is built by keywords.pl from its data. Any changes made here 22 * will be lost! 23 */ 24EOM 25 26# Read & print data. 27 28$keynum = 0; 29while (<DATA>) { 30 chop; 31 next unless $_; 32 next if /^#/; 33 ($keyword) = split; 34 print &tab(5, "#define KEY_$keyword"), $keynum++, "\n"; 35} 36 37print KW "\n/* ex: set ro: */\n"; 38 39close KW or die "Error closing keywords.h: $!"; 40 41########################################################################### 42sub tab { 43 local($l, $t) = @_; 44 $t .= "\t" x ($l - (length($t) + 1) / 8); 45 $t; 46} 47########################################################################### 48__END__ 49 50NULL 51__FILE__ 52__LINE__ 53__PACKAGE__ 54__DATA__ 55__END__ 56AUTOLOAD 57BEGIN 58CORE 59DESTROY 60END 61INIT 62CHECK 63abs 64accept 65alarm 66and 67atan2 68bind 69binmode 70bless 71caller 72chdir 73chmod 74chomp 75chop 76chown 77chr 78chroot 79close 80closedir 81cmp 82connect 83continue 84cos 85crypt 86dbmclose 87dbmopen 88defined 89delete 90die 91do 92dump 93each 94else 95elsif 96endgrent 97endhostent 98endnetent 99endprotoent 100endpwent 101endservent 102eof 103eq 104eval 105exec 106exists 107exit 108exp 109fcntl 110fileno 111flock 112for 113foreach 114fork 115format 116formline 117ge 118getc 119getgrent 120getgrgid 121getgrnam 122gethostbyaddr 123gethostbyname 124gethostent 125getlogin 126getnetbyaddr 127getnetbyname 128getnetent 129getpeername 130getpgrp 131getppid 132getpriority 133getprotobyname 134getprotobynumber 135getprotoent 136getpwent 137getpwnam 138getpwuid 139getservbyname 140getservbyport 141getservent 142getsockname 143getsockopt 144glob 145gmtime 146goto 147grep 148gt 149hex 150if 151index 152int 153ioctl 154join 155keys 156kill 157last 158lc 159lcfirst 160le 161length 162link 163listen 164local 165localtime 166lock 167log 168lstat 169lt 170m 171map 172mkdir 173msgctl 174msgget 175msgrcv 176msgsnd 177my 178ne 179next 180no 181not 182oct 183open 184opendir 185or 186ord 187our 188pack 189package 190pipe 191pop 192pos 193print 194printf 195prototype 196push 197q 198qq 199qr 200quotemeta 201qw 202qx 203rand 204read 205readdir 206readline 207readlink 208readpipe 209recv 210redo 211ref 212rename 213require 214reset 215return 216reverse 217rewinddir 218rindex 219rmdir 220s 221scalar 222seek 223seekdir 224select 225semctl 226semget 227semop 228send 229setgrent 230sethostent 231setnetent 232setpgrp 233setpriority 234setprotoent 235setpwent 236setservent 237setsockopt 238shift 239shmctl 240shmget 241shmread 242shmwrite 243shutdown 244sin 245sleep 246socket 247socketpair 248sort 249splice 250split 251sprintf 252sqrt 253srand 254stat 255study 256sub 257substr 258symlink 259syscall 260sysopen 261sysread 262sysseek 263system 264syswrite 265tell 266telldir 267tie 268tied 269time 270times 271tr 272truncate 273uc 274ucfirst 275umask 276undef 277unless 278unlink 279unpack 280unshift 281untie 282until 283use 284utime 285values 286vec 287wait 288waitpid 289wantarray 290warn 291while 292write 293x 294xor 295y 296