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