Commit | Line | Data |
---|---|---|
a0d0e21e | 1 | #!/usr/bin/perl |
2 | ||
36477c24 | 3 | unlink "keywords.h"; |
a0d0e21e | 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 | |
a0d0e21e | 28 | __FILE__ |
68dc0745 | 29 | __LINE__ |
30 | __PACKAGE__ | |
e50aee73 | 31 | __DATA__ |
a0d0e21e | 32 | __END__ |
33 | AUTOLOAD | |
34 | BEGIN | |
35 | CORE | |
36 | DESTROY | |
37 | END | |
38 | EQ | |
39 | GE | |
40 | GT | |
7d07dbc2 | 41 | INIT |
a0d0e21e | 42 | LE |
43 | LT | |
44 | NE | |
cb50131a | 45 | CHECK |
a0d0e21e | 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 | |
c0329465 | 149 | lock |
a0d0e21e | 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 | |
c529f79d | 170 | our |
a0d0e21e | 171 | pack |
172 | package | |
173 | pipe | |
174 | pop | |
175 | pos | |
176 | ||
177 | printf | |
c07a80fd | 178 | prototype |
a0d0e21e | 179 | push |
180 | q | |
181 | ||
8782bef2 | 182 | qr |
a0d0e21e | 183 | quotemeta |
184 | qw | |
185 | qx | |
186 | rand | |
187 | read | |
188 | readdir | |
189 | readline | |
190 | readlink | |
191 | readpipe | |
192 | recv | |
193 | redo | |
194 | ref | |
195 | rename | |
196 | require | |
197 | reset | |
198 | return | |
199 | reverse | |
200 | rewinddir | |
201 | rindex | |
202 | rmdir | |
203 | s | |
204 | scalar | |
205 | seek | |
206 | seekdir | |
207 | select | |
208 | semctl | |
209 | semget | |
210 | semop | |
211 | send | |
212 | setgrent | |
213 | sethostent | |
214 | setnetent | |
215 | setpgrp | |
216 | setpriority | |
217 | setprotoent | |
218 | setpwent | |
219 | setservent | |
220 | setsockopt | |
221 | shift | |
222 | shmctl | |
223 | shmget | |
224 | shmread | |
225 | shmwrite | |
226 | shutdown | |
227 | sin | |
228 | sleep | |
229 | socket | |
230 | socketpair | |
231 | sort | |
232 | splice | |
233 | split | |
234 | sprintf | |
235 | sqrt | |
236 | srand | |
237 | stat | |
238 | study | |
239 | sub | |
240 | substr | |
241 | symlink | |
242 | syscall | |
c07a80fd | 243 | sysopen |
a0d0e21e | 244 | sysread |
137443ea | 245 | sysseek |
a0d0e21e | 246 | system |
247 | syswrite | |
248 | tell | |
249 | telldir | |
250 | tie | |
c07a80fd | 251 | tied |
a0d0e21e | 252 | time |
253 | times | |
254 | tr | |
255 | truncate | |
256 | uc | |
257 | ucfirst | |
258 | umask | |
259 | undef | |
260 | unless | |
261 | unlink | |
262 | unpack | |
263 | unshift | |
264 | untie | |
265 | until | |
266 | use | |
267 | utime | |
268 | values | |
269 | vec | |
270 | wait | |
271 | waitpid | |
272 | wantarray | |
273 | warn | |
274 | while | |
275 | write | |
276 | x | |
277 | xor | |
278 | y |