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