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