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