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 | * |
4bb101f2 |
14 | * Copyright (C) 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, |
15 | * 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 |
58 | CORE |
59 | DESTROY |
60 | END |
7d07dbc2 |
61 | INIT |
7d30b5c4 |
62 | CHECK |
a0d0e21e |
63 | abs |
64 | accept |
65 | alarm |
66 | and |
67 | atan2 |
68 | bind |
69 | binmode |
70 | bless |
71 | caller |
72 | chdir |
73 | chmod |
74 | chomp |
75 | chop |
76 | chown |
77 | chr |
78 | chroot |
79 | close |
80 | closedir |
81 | cmp |
82 | connect |
83 | continue |
84 | cos |
85 | crypt |
86 | dbmclose |
87 | dbmopen |
88 | defined |
89 | delete |
90 | die |
91 | do |
92 | dump |
93 | each |
94 | else |
95 | elsif |
96 | endgrent |
97 | endhostent |
98 | endnetent |
99 | endprotoent |
100 | endpwent |
101 | endservent |
102 | eof |
103 | eq |
c963b151 |
104 | err |
a0d0e21e |
105 | eval |
106 | exec |
107 | exists |
108 | exit |
109 | exp |
110 | fcntl |
111 | fileno |
112 | flock |
113 | for |
114 | foreach |
115 | fork |
116 | format |
117 | formline |
118 | ge |
119 | getc |
120 | getgrent |
121 | getgrgid |
122 | getgrnam |
123 | gethostbyaddr |
124 | gethostbyname |
125 | gethostent |
126 | getlogin |
127 | getnetbyaddr |
128 | getnetbyname |
129 | getnetent |
130 | getpeername |
131 | getpgrp |
132 | getppid |
133 | getpriority |
134 | getprotobyname |
135 | getprotobynumber |
136 | getprotoent |
137 | getpwent |
138 | getpwnam |
139 | getpwuid |
140 | getservbyname |
141 | getservbyport |
142 | getservent |
143 | getsockname |
144 | getsockopt |
145 | glob |
146 | gmtime |
147 | goto |
148 | grep |
149 | gt |
150 | hex |
151 | if |
152 | index |
153 | int |
154 | ioctl |
155 | join |
156 | keys |
157 | kill |
158 | last |
159 | lc |
160 | lcfirst |
161 | le |
162 | length |
163 | link |
164 | listen |
165 | local |
166 | localtime |
c0329465 |
167 | lock |
a0d0e21e |
168 | log |
169 | lstat |
170 | lt |
171 | m |
172 | map |
173 | mkdir |
174 | msgctl |
175 | msgget |
176 | msgrcv |
177 | msgsnd |
178 | my |
179 | ne |
180 | next |
181 | no |
182 | not |
183 | oct |
184 | open |
185 | opendir |
186 | or |
187 | ord |
77ca0c92 |
188 | our |
a0d0e21e |
189 | pack |
190 | package |
191 | pipe |
192 | pop |
193 | pos |
194 | print |
195 | printf |
c07a80fd |
196 | prototype |
a0d0e21e |
197 | push |
198 | q |
199 | qq |
8782bef2 |
200 | qr |
a0d0e21e |
201 | quotemeta |
202 | qw |
203 | qx |
204 | rand |
205 | read |
206 | readdir |
207 | readline |
208 | readlink |
209 | readpipe |
210 | recv |
211 | redo |
212 | ref |
213 | rename |
214 | require |
215 | reset |
216 | return |
217 | reverse |
218 | rewinddir |
219 | rindex |
220 | rmdir |
221 | s |
222 | scalar |
223 | seek |
224 | seekdir |
225 | select |
226 | semctl |
227 | semget |
228 | semop |
229 | send |
230 | setgrent |
231 | sethostent |
232 | setnetent |
233 | setpgrp |
234 | setpriority |
235 | setprotoent |
236 | setpwent |
237 | setservent |
238 | setsockopt |
239 | shift |
240 | shmctl |
241 | shmget |
242 | shmread |
243 | shmwrite |
244 | shutdown |
245 | sin |
246 | sleep |
247 | socket |
248 | socketpair |
249 | sort |
250 | splice |
251 | split |
252 | sprintf |
253 | sqrt |
254 | srand |
255 | stat |
256 | study |
257 | sub |
258 | substr |
259 | symlink |
260 | syscall |
c07a80fd |
261 | sysopen |
a0d0e21e |
262 | sysread |
137443ea |
263 | sysseek |
a0d0e21e |
264 | system |
265 | syswrite |
266 | tell |
267 | telldir |
268 | tie |
c07a80fd |
269 | tied |
a0d0e21e |
270 | time |
271 | times |
272 | tr |
273 | truncate |
274 | uc |
275 | ucfirst |
276 | umask |
277 | undef |
278 | unless |
279 | unlink |
280 | unpack |
281 | unshift |
282 | untie |
283 | until |
284 | use |
285 | utime |
286 | values |
287 | vec |
288 | wait |
289 | waitpid |
290 | wantarray |
291 | warn |
292 | while |
293 | write |
294 | x |
295 | xor |
296 | y |