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