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