Commit | Line | Data |
eada5d41 |
1 | #!/usr/bin/perl -w |
2 | use strict; |
a0d0e21e |
3 | |
9ad884cb |
4 | require 'regen_lib.pl'; |
36bb303b |
5 | safer_unlink ("keywords.h"); |
a0d0e21e |
6 | open(KW, ">keywords.h") || die "Can't create keywords.h: $!\n"; |
dfb1454f |
7 | binmode KW; |
a0d0e21e |
8 | select KW; |
9 | |
d6376244 |
10 | print <<EOM; |
37442d52 |
11 | /* -*- buffer-read-only: t -*- |
12 | * |
d6376244 |
13 | * keywords.h |
14 | * |
cfc85103 |
15 | * Copyright (C) 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2005, |
699a97de |
16 | * 2006, 2007, by Larry Wall and others |
d6376244 |
17 | * |
18 | * You may distribute under the terms of either the GNU General Public |
19 | * License or the Artistic License, as specified in the README file. |
20 | * |
a41d5059 |
21 | * !!!!!!! DO NOT EDIT THIS FILE !!!!!!! |
d73f34fb |
22 | * This file is built by keywords.pl from its data. Any changes made here |
a41d5059 |
23 | * will be lost! |
d6376244 |
24 | */ |
25 | EOM |
26 | |
a0d0e21e |
27 | # Read & print data. |
28 | |
eada5d41 |
29 | my $keynum = 0; |
a0d0e21e |
30 | while (<DATA>) { |
31 | chop; |
32 | next unless $_; |
33 | next if /^#/; |
eada5d41 |
34 | my ($keyword) = split; |
a0d0e21e |
35 | print &tab(5, "#define KEY_$keyword"), $keynum++, "\n"; |
36 | } |
37 | |
37442d52 |
38 | print KW "\n/* ex: set ro: */\n"; |
39 | |
36bb303b |
40 | close KW or die "Error closing keywords.h: $!"; |
41 | |
a0d0e21e |
42 | ########################################################################### |
43 | sub tab { |
eada5d41 |
44 | my ($l, $t) = @_; |
a0d0e21e |
45 | $t .= "\t" x ($l - (length($t) + 1) / 8); |
46 | $t; |
47 | } |
48 | ########################################################################### |
49 | __END__ |
50 | |
51 | NULL |
a0d0e21e |
52 | __FILE__ |
68dc0745 |
53 | __LINE__ |
54 | __PACKAGE__ |
e50aee73 |
55 | __DATA__ |
a0d0e21e |
56 | __END__ |
57 | AUTOLOAD |
58 | BEGIN |
3c10abe3 |
59 | UNITCHECK |
a0d0e21e |
60 | CORE |
61 | DESTROY |
62 | END |
7d07dbc2 |
63 | INIT |
7d30b5c4 |
64 | CHECK |
a0d0e21e |
65 | abs |
66 | accept |
67 | alarm |
68 | and |
69 | atan2 |
70 | bind |
71 | binmode |
72 | bless |
0d863452 |
73 | break |
a0d0e21e |
74 | caller |
75 | chdir |
76 | chmod |
77 | chomp |
78 | chop |
79 | chown |
80 | chr |
81 | chroot |
82 | close |
83 | closedir |
84 | cmp |
85 | connect |
86 | continue |
87 | cos |
88 | crypt |
89 | dbmclose |
90 | dbmopen |
0d863452 |
91 | default |
a0d0e21e |
92 | defined |
93 | delete |
94 | die |
95 | do |
96 | dump |
97 | each |
98 | else |
99 | elsif |
100 | endgrent |
101 | endhostent |
102 | endnetent |
103 | endprotoent |
104 | endpwent |
105 | endservent |
106 | eof |
107 | eq |
c963b151 |
108 | err |
a0d0e21e |
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 |