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