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