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