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