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"; |
dfb1454f |
6 | binmode KW; |
a0d0e21e |
7 | select KW; |
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, |
15 | * 2006, 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 | |
28 | $keynum = 0; |
29 | while (<DATA>) { |
30 | chop; |
31 | next unless $_; |
32 | next if /^#/; |
33 | ($keyword) = split; |
34 | print &tab(5, "#define KEY_$keyword"), $keynum++, "\n"; |
35 | } |
36 | |
37442d52 |
37 | print KW "\n/* ex: set ro: */\n"; |
38 | |
36bb303b |
39 | close KW or die "Error closing keywords.h: $!"; |
40 | |
a0d0e21e |
41 | ########################################################################### |
42 | sub tab { |
43 | local($l, $t) = @_; |
44 | $t .= "\t" x ($l - (length($t) + 1) / 8); |
45 | $t; |
46 | } |
47 | ########################################################################### |
48 | __END__ |
49 | |
50 | NULL |
a0d0e21e |
51 | __FILE__ |
68dc0745 |
52 | __LINE__ |
53 | __PACKAGE__ |
e50aee73 |
54 | __DATA__ |
a0d0e21e |
55 | __END__ |
56 | AUTOLOAD |
57 | BEGIN |
3c10abe3 |
58 | UNITCHECK |
a0d0e21e |
59 | CORE |
60 | DESTROY |
61 | END |
7d07dbc2 |
62 | INIT |
7d30b5c4 |
63 | CHECK |
a0d0e21e |
64 | abs |
65 | accept |
66 | alarm |
67 | and |
68 | atan2 |
69 | bind |
70 | binmode |
71 | bless |
0d863452 |
72 | break |
a0d0e21e |
73 | caller |
74 | chdir |
75 | chmod |
76 | chomp |
77 | chop |
78 | chown |
79 | chr |
80 | chroot |
81 | close |
82 | closedir |
83 | cmp |
84 | connect |
85 | continue |
86 | cos |
87 | crypt |
88 | dbmclose |
89 | dbmopen |
0d863452 |
90 | default |
a0d0e21e |
91 | defined |
92 | delete |
93 | die |
94 | do |
95 | dump |
96 | each |
97 | else |
98 | elsif |
99 | endgrent |
100 | endhostent |
101 | endnetent |
102 | endprotoent |
103 | endpwent |
104 | endservent |
105 | eof |
106 | eq |
c963b151 |
107 | err |
a0d0e21e |
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 |