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