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