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