source:
trunk/third/perl/keywords.pl
@
10724
Revision 10724, 2.2 KB checked in by ghudson, 27 years ago (diff) | |
---|---|
|
Line | |
---|---|
1 | #!/usr/bin/perl |
2 | |
3 | unlink "keywords.h"; |
4 | open(KW, ">keywords.h") || die "Can't create keywords.h: $!\n"; |
5 | select KW; |
6 | |
7 | # Read & print data. |
8 | |
9 | $keynum = 0; |
10 | while (<DATA>) { |
11 | chop; |
12 | next unless $_; |
13 | next if /^#/; |
14 | ($keyword) = split; |
15 | print &tab(5, "#define KEY_$keyword"), $keynum++, "\n"; |
16 | } |
17 | |
18 | ########################################################################### |
19 | sub tab { |
20 | local($l, $t) = @_; |
21 | $t .= "\t" x ($l - (length($t) + 1) / 8); |
22 | $t; |
23 | } |
24 | ########################################################################### |
25 | __END__ |
26 | |
27 | NULL |
28 | __FILE__ |
29 | __LINE__ |
30 | __PACKAGE__ |
31 | __DATA__ |
32 | __END__ |
33 | AUTOLOAD |
34 | BEGIN |
35 | CORE |
36 | DESTROY |
37 | END |
38 | EQ |
39 | GE |
40 | GT |
41 | LE |
42 | LT |
43 | NE |
44 | abs |
45 | accept |
46 | alarm |
47 | and |
48 | atan2 |
49 | bind |
50 | binmode |
51 | bless |
52 | caller |
53 | chdir |
54 | chmod |
55 | chomp |
56 | chop |
57 | chown |
58 | chr |
59 | chroot |
60 | close |
61 | closedir |
62 | cmp |
63 | connect |
64 | continue |
65 | cos |
66 | crypt |
67 | dbmclose |
68 | dbmopen |
69 | defined |
70 | delete |
71 | die |
72 | do |
73 | dump |
74 | each |
75 | else |
76 | elsif |
77 | endgrent |
78 | endhostent |
79 | endnetent |
80 | endprotoent |
81 | endpwent |
82 | endservent |
83 | eof |
84 | eq |
85 | eval |
86 | exec |
87 | exists |
88 | exit |
89 | exp |
90 | fcntl |
91 | fileno |
92 | flock |
93 | for |
94 | foreach |
95 | fork |
96 | format |
97 | formline |
98 | ge |
99 | getc |
100 | getgrent |
101 | getgrgid |
102 | getgrnam |
103 | gethostbyaddr |
104 | gethostbyname |
105 | gethostent |
106 | getlogin |
107 | getnetbyaddr |
108 | getnetbyname |
109 | getnetent |
110 | getpeername |
111 | getpgrp |
112 | getppid |
113 | getpriority |
114 | getprotobyname |
115 | getprotobynumber |
116 | getprotoent |
117 | getpwent |
118 | getpwnam |
119 | getpwuid |
120 | getservbyname |
121 | getservbyport |
122 | getservent |
123 | getsockname |
124 | getsockopt |
125 | glob |
126 | gmtime |
127 | goto |
128 | grep |
129 | gt |
130 | hex |
131 | if |
132 | index |
133 | int |
134 | ioctl |
135 | join |
136 | keys |
137 | kill |
138 | last |
139 | lc |
140 | lcfirst |
141 | le |
142 | length |
143 | link |
144 | listen |
145 | local |
146 | localtime |
147 | log |
148 | lstat |
149 | lt |
150 | m |
151 | map |
152 | mkdir |
153 | msgctl |
154 | msgget |
155 | msgrcv |
156 | msgsnd |
157 | my |
158 | ne |
159 | next |
160 | no |
161 | not |
162 | oct |
163 | open |
164 | opendir |
165 | or |
166 | ord |
167 | pack |
168 | package |
169 | pipe |
170 | pop |
171 | pos |
172 | |
173 | printf |
174 | prototype |
175 | push |
176 | q |
177 | |
178 | quotemeta |
179 | qw |
180 | qx |
181 | rand |
182 | read |
183 | readdir |
184 | readline |
185 | readlink |
186 | readpipe |
187 | recv |
188 | redo |
189 | ref |
190 | rename |
191 | require |
192 | reset |
193 | return |
194 | reverse |
195 | rewinddir |
196 | rindex |
197 | rmdir |
198 | s |
199 | scalar |
200 | seek |
201 | seekdir |
202 | select |
203 | semctl |
204 | semget |
205 | semop |
206 | send |
207 | setgrent |
208 | sethostent |
209 | setnetent |
210 | setpgrp |
211 | setpriority |
212 | setprotoent |
213 | setpwent |
214 | setservent |
215 | setsockopt |
216 | shift |
217 | shmctl |
218 | shmget |
219 | shmread |
220 | shmwrite |
221 | shutdown |
222 | sin |
223 | sleep |
224 | socket |
225 | socketpair |
226 | sort |
227 | splice |
228 | split |
229 | sprintf |
230 | sqrt |
231 | srand |
232 | stat |
233 | study |
234 | sub |
235 | substr |
236 | symlink |
237 | syscall |
238 | sysopen |
239 | sysread |
240 | sysseek |
241 | system |
242 | syswrite |
243 | tell |
244 | telldir |
245 | tie |
246 | tied |
247 | time |
248 | times |
249 | tr |
250 | truncate |
251 | uc |
252 | ucfirst |
253 | umask |
254 | undef |
255 | unless |
256 | unlink |
257 | unpack |
258 | unshift |
259 | untie |
260 | until |
261 | use |
262 | utime |
263 | values |
264 | vec |
265 | wait |
266 | waitpid |
267 | wantarray |
268 | warn |
269 | while |
270 | write |
271 | x |
272 | xor |
273 | y |
Note: See TracBrowser
for help on using the repository browser.