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