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