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 |
108 | eval |
109 | exec |
110 | exists |
111 | exit |
112 | exp |
113 | fcntl |
114 | fileno |
115 | flock |
116 | for |
117 | foreach |
118 | fork |
119 | format |
120 | formline |
121 | ge |
122 | getc |
123 | getgrent |
124 | getgrgid |
125 | getgrnam |
126 | gethostbyaddr |
127 | gethostbyname |
128 | gethostent |
129 | getlogin |
130 | getnetbyaddr |
131 | getnetbyname |
132 | getnetent |
133 | getpeername |
134 | getpgrp |
135 | getppid |
136 | getpriority |
137 | getprotobyname |
138 | getprotobynumber |
139 | getprotoent |
140 | getpwent |
141 | getpwnam |
142 | getpwuid |
143 | getservbyname |
144 | getservbyport |
145 | getservent |
146 | getsockname |
147 | getsockopt |
0d863452 |
148 | given |
a0d0e21e |
149 | glob |
150 | gmtime |
151 | goto |
152 | grep |
153 | gt |
154 | hex |
155 | if |
156 | index |
157 | int |
158 | ioctl |
159 | join |
160 | keys |
161 | kill |
162 | last |
163 | lc |
164 | lcfirst |
165 | le |
166 | length |
167 | link |
168 | listen |
169 | local |
170 | localtime |
c0329465 |
171 | lock |
a0d0e21e |
172 | log |
173 | lstat |
174 | lt |
175 | m |
176 | map |
177 | mkdir |
178 | msgctl |
179 | msgget |
180 | msgrcv |
181 | msgsnd |
182 | my |
183 | ne |
184 | next |
185 | no |
186 | not |
187 | oct |
188 | open |
189 | opendir |
190 | or |
191 | ord |
77ca0c92 |
192 | our |
a0d0e21e |
193 | pack |
194 | package |
195 | pipe |
196 | pop |
197 | pos |
198 | print |
199 | printf |
c07a80fd |
200 | prototype |
a0d0e21e |
201 | push |
202 | q |
203 | qq |
8782bef2 |
204 | qr |
a0d0e21e |
205 | quotemeta |
206 | qw |
207 | qx |
208 | rand |
209 | read |
210 | readdir |
211 | readline |
212 | readlink |
213 | readpipe |
214 | recv |
215 | redo |
216 | ref |
217 | rename |
218 | require |
219 | reset |
220 | return |
221 | reverse |
222 | rewinddir |
223 | rindex |
224 | rmdir |
225 | s |
0d863452 |
226 | say |
a0d0e21e |
227 | scalar |
228 | seek |
229 | seekdir |
230 | select |
231 | semctl |
232 | semget |
233 | semop |
234 | send |
235 | setgrent |
236 | sethostent |
237 | setnetent |
238 | setpgrp |
239 | setpriority |
240 | setprotoent |
241 | setpwent |
242 | setservent |
243 | setsockopt |
244 | shift |
245 | shmctl |
246 | shmget |
247 | shmread |
248 | shmwrite |
249 | shutdown |
250 | sin |
251 | sleep |
252 | socket |
253 | socketpair |
254 | sort |
255 | splice |
256 | split |
257 | sprintf |
258 | sqrt |
259 | srand |
260 | stat |
952306ac |
261 | state |
a0d0e21e |
262 | study |
263 | sub |
264 | substr |
265 | symlink |
266 | syscall |
c07a80fd |
267 | sysopen |
a0d0e21e |
268 | sysread |
137443ea |
269 | sysseek |
a0d0e21e |
270 | system |
271 | syswrite |
272 | tell |
273 | telldir |
274 | tie |
c07a80fd |
275 | tied |
a0d0e21e |
276 | time |
277 | times |
278 | tr |
279 | truncate |
280 | uc |
281 | ucfirst |
282 | umask |
283 | undef |
284 | unless |
285 | unlink |
286 | unpack |
287 | unshift |
288 | untie |
289 | until |
290 | use |
291 | utime |
292 | values |
293 | vec |
294 | wait |
295 | waitpid |
296 | wantarray |
297 | warn |
0d863452 |
298 | when |
a0d0e21e |
299 | while |
300 | write |
301 | x |
302 | xor |
303 | y |