RE: Sorry, no Win32CORE-update for you unless you use development version...
[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 UNITCHECK
60 CORE
61 DESTROY
62 END
63 INIT
64 CHECK
65 abs
66 accept
67 alarm
68 and
69 atan2
70 bind
71 binmode
72 bless
73 break
74 caller
75 chdir
76 chmod
77 chomp
78 chop
79 chown
80 chr
81 chroot
82 close
83 closedir
84 cmp
85 connect
86 continue
87 cos
88 crypt
89 dbmclose
90 dbmopen
91 default
92 defined
93 delete
94 die
95 do
96 dump
97 each
98 else
99 elsif
100 endgrent
101 endhostent
102 endnetent
103 endprotoent
104 endpwent
105 endservent
106 eof
107 eq
108 err
109 eval
110 exec
111 exists
112 exit
113 exp
114 fcntl
115 fileno
116 flock
117 for
118 foreach
119 fork
120 format
121 formline
122 ge
123 getc
124 getgrent
125 getgrgid
126 getgrnam
127 gethostbyaddr
128 gethostbyname
129 gethostent
130 getlogin
131 getnetbyaddr
132 getnetbyname
133 getnetent
134 getpeername
135 getpgrp
136 getppid
137 getpriority
138 getprotobyname
139 getprotobynumber
140 getprotoent
141 getpwent
142 getpwnam
143 getpwuid
144 getservbyname
145 getservbyport
146 getservent
147 getsockname
148 getsockopt
149 given
150 glob
151 gmtime
152 goto
153 grep
154 gt
155 hex
156 if
157 index
158 int
159 ioctl
160 join
161 keys
162 kill
163 last
164 lc
165 lcfirst
166 le
167 length
168 link
169 listen
170 local
171 localtime
172 lock
173 log
174 lstat
175 lt
176 m
177 map
178 mkdir
179 msgctl
180 msgget
181 msgrcv
182 msgsnd
183 my
184 ne
185 next
186 no
187 not
188 oct
189 open
190 opendir
191 or
192 ord
193 our
194 pack
195 package
196 pipe
197 pop
198 pos
199 print
200 printf
201 prototype
202 push
203 q
204 qq
205 qr
206 quotemeta
207 qw
208 qx
209 rand
210 read
211 readdir
212 readline
213 readlink
214 readpipe
215 recv
216 redo
217 ref
218 rename
219 require
220 reset
221 return
222 reverse
223 rewinddir
224 rindex
225 rmdir
226 s
227 say
228 scalar
229 seek
230 seekdir
231 select
232 semctl
233 semget
234 semop
235 send
236 setgrent
237 sethostent
238 setnetent
239 setpgrp
240 setpriority
241 setprotoent
242 setpwent
243 setservent
244 setsockopt
245 shift
246 shmctl
247 shmget
248 shmread
249 shmwrite
250 shutdown
251 sin
252 sleep
253 socket
254 socketpair
255 sort
256 splice
257 split
258 sprintf
259 sqrt
260 srand
261 stat
262 state
263 study
264 sub
265 substr
266 symlink
267 syscall
268 sysopen
269 sysread
270 sysseek
271 system
272 syswrite
273 tell
274 telldir
275 tie
276 tied
277 time
278 times
279 tr
280 truncate
281 uc
282 ucfirst
283 umask
284 undef
285 unless
286 unlink
287 unpack
288 unshift
289 untie
290 until
291 use
292 utime
293 values
294 vec
295 wait
296 waitpid
297 wantarray
298 warn
299 when
300 while
301 write
302 x
303 xor
304 y