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