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