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