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