This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
WIN32 preprocessor symbols is usually tested with #ifdef, not #if
[perl5.git] / keywords.pl
CommitLineData
eada5d41
NC
1#!/usr/bin/perl -w
2use strict;
a0d0e21e 3
9ad884cb 4require 'regen_lib.pl';
b6b9a099 5
424a4936
NC
6my $kw = safer_open("keywords.h-new");
7select $kw;
a0d0e21e 8
d6376244 9print <<EOM;
37442d52
RGS
10/* -*- buffer-read-only: t -*-
11 *
d6376244
JH
12 * keywords.h
13 *
cfc85103 14 * Copyright (C) 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2005,
699a97de 15 * 2006, 2007, 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
eada5d41 28my $keynum = 0;
a0d0e21e
LW
29while (<DATA>) {
30 chop;
31 next unless $_;
32 next if /^#/;
eada5d41 33 my ($keyword) = split;
a0d0e21e
LW
34 print &tab(5, "#define KEY_$keyword"), $keynum++, "\n";
35}
36
424a4936 37print $kw "\n/* ex: set ro: */\n";
37442d52 38
08858ed2 39safer_close($kw);
36bb303b 40
424a4936 41rename_if_different("keywords.h-new", "keywords.h");
b6b9a099 42
a0d0e21e
LW
43###########################################################################
44sub tab {
eada5d41 45 my ($l, $t) = @_;
a0d0e21e
LW
46 $t .= "\t" x ($l - (length($t) + 1) / 8);
47 $t;
48}
49###########################################################################
50__END__
51
52NULL
a0d0e21e 53__FILE__
68dc0745
PP
54__LINE__
55__PACKAGE__
e50aee73 56__DATA__
a0d0e21e
LW
57__END__
58AUTOLOAD
59BEGIN
3c10abe3 60UNITCHECK
a0d0e21e
LW
61CORE
62DESTROY
63END
7d07dbc2 64INIT
7d30b5c4 65CHECK
a0d0e21e
LW
66abs
67accept
68alarm
69and
70atan2
71bind
72binmode
73bless
0d863452 74break
a0d0e21e
LW
75caller
76chdir
77chmod
78chomp
79chop
80chown
81chr
82chroot
83close
84closedir
85cmp
86connect
87continue
88cos
89crypt
90dbmclose
91dbmopen
0d863452 92default
a0d0e21e
LW
93defined
94delete
95die
96do
97dump
98each
99else
100elsif
101endgrent
102endhostent
103endnetent
104endprotoent
105endpwent
106endservent
107eof
108eq
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
0d863452 149given
a0d0e21e
LW
150glob
151gmtime
152goto
153grep
154gt
155hex
156if
157index
158int
159ioctl
160join
161keys
162kill
163last
164lc
165lcfirst
166le
167length
168link
169listen
170local
171localtime
c0329465 172lock
a0d0e21e
LW
173log
174lstat
175lt
176m
177map
178mkdir
179msgctl
180msgget
181msgrcv
182msgsnd
183my
184ne
185next
186no
187not
188oct
189open
190opendir
191or
192ord
77ca0c92 193our
a0d0e21e
LW
194pack
195package
196pipe
197pop
198pos
199print
200printf
c07a80fd 201prototype
a0d0e21e
LW
202push
203q
204qq
8782bef2 205qr
a0d0e21e
LW
206quotemeta
207qw
208qx
209rand
210read
211readdir
212readline
213readlink
214readpipe
215recv
216redo
217ref
218rename
219require
220reset
221return
222reverse
223rewinddir
224rindex
225rmdir
226s
0d863452 227say
a0d0e21e
LW
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
952306ac 262state
a0d0e21e
LW
263study
264sub
265substr
266symlink
267syscall
c07a80fd 268sysopen
a0d0e21e 269sysread
137443ea 270sysseek
a0d0e21e
LW
271system
272syswrite
273tell
274telldir
275tie
c07a80fd 276tied
a0d0e21e
LW
277time
278times
279tr
280truncate
281uc
282ucfirst
283umask
284undef
285unless
286unlink
287unpack
288unshift
289untie
290until
291use
292utime
293values
294vec
295wait
296waitpid
297wantarray
298warn
0d863452 299when
a0d0e21e
LW
300while
301write
302x
303xor
304y