1 /* ANSI-C code produced by gperf version 3.0.1 */
2 /* Command-line: gperf -a -L ANSI-C -D -E -C -l -o -t -k '*' -NfindTag -Hhash_tag -Wwordlist_tag htmltags.gperf */
4 #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
5 && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
6 && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
7 && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
8 && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
9 && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
10 && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
11 && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
12 && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
13 && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
14 && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
15 && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
16 && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
17 && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
18 && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
19 && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
20 && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
21 && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
22 && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
23 && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
24 && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
25 && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
26 && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
27 /* The character set is not based on ISO-646. */
28 #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
31 #line 1 "htmltags.gperf"
33 /* This file is automatically generated from htmltags.in by maketags, do not edit */
34 /* Copyright 1999 Lars Knoll */
36 #line 6 "htmltags.gperf"
41 /* maximum key range = 365, duplicates = 0 */
51 hash_tag (register const char *str, register unsigned int len)
53 static const unsigned short asso_values[] =
55 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
56 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
57 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
58 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
59 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
60 60, 55, 50, 45, 40, 5, 366, 366, 366, 366,
61 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
62 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
63 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
64 366, 366, 366, 366, 366, 366, 366, 15, 10, 35,
65 10, 5, 10, 10, 50, 40, 115, 30, 5, 15,
66 30, 55, 5, 85, 20, 0, 0, 65, 55, 35,
67 95, 70, 366, 366, 366, 366, 366, 366, 366, 366,
68 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
69 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
70 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
71 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
72 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
73 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
74 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
75 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
76 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
77 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
78 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
79 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
80 366, 366, 366, 366, 366, 366, 366
82 register int hval = len;
87 hval += asso_values[(unsigned char)str[9]];
90 hval += asso_values[(unsigned char)str[8]];
93 hval += asso_values[(unsigned char)str[7]];
96 hval += asso_values[(unsigned char)str[6]];
99 hval += asso_values[(unsigned char)str[5]];
102 hval += asso_values[(unsigned char)str[4]];
105 hval += asso_values[(unsigned char)str[3]];
108 hval += asso_values[(unsigned char)str[2]];
111 hval += asso_values[(unsigned char)str[1]+1];
114 hval += asso_values[(unsigned char)str[0]];
124 findTag (register const char *str, register unsigned int len)
128 TOTAL_KEYWORDS = 105,
130 MAX_WORD_LENGTH = 10,
135 static const unsigned char lengthtable[] =
137 1, 2, 1, 2, 1, 2, 3, 1, 2, 2, 3, 4, 3, 4,
138 5, 2, 4, 5, 1, 2, 4, 3, 4, 5, 2, 3, 4, 2,
139 8, 4, 5, 6, 7, 3, 5, 1, 2, 3, 4, 5, 2, 3,
140 5, 6, 2, 3, 6, 2, 3, 4, 1, 7, 3, 4, 2, 3,
141 2, 3, 4, 2, 5, 6, 2, 8, 6, 2, 5, 6, 2, 4,
142 5, 8, 5, 3, 4, 3, 4, 8, 3, 5, 6, 6, 7, 8,
143 4, 6, 6, 8, 5, 5, 7, 3, 4, 6, 7, 8, 7, 9,
146 static const struct tags wordlist_tag[] =
148 #line 87 "htmltags.gperf"
150 #line 106 "htmltags.gperf"
152 #line 82 "htmltags.gperf"
154 #line 100 "htmltags.gperf"
156 #line 17 "htmltags.gperf"
158 #line 24 "htmltags.gperf"
160 #line 85 "htmltags.gperf"
162 #line 11 "htmltags.gperf"
164 #line 33 "htmltags.gperf"
166 #line 38 "htmltags.gperf"
168 #line 34 "htmltags.gperf"
170 #line 18 "htmltags.gperf"
172 #line 69 "htmltags.gperf"
174 #line 88 "htmltags.gperf"
176 #line 98 "htmltags.gperf"
178 #line 40 "htmltags.gperf"
180 #line 16 "htmltags.gperf"
182 #line 64 "htmltags.gperf"
184 #line 56 "htmltags.gperf"
186 #line 103 "htmltags.gperf"
188 #line 72 "htmltags.gperf"
190 #line 31 "htmltags.gperf"
192 #line 43 "htmltags.gperf"
194 #line 45 "htmltags.gperf"
196 #line 54 "htmltags.gperf"
198 #line 35 "htmltags.gperf"
200 #line 44 "htmltags.gperf"
202 #line 52 "htmltags.gperf"
204 #line 46 "htmltags.gperf"
205 {"frameset", ID_FRAMESET},
206 #line 30 "htmltags.gperf"
208 #line 91 "htmltags.gperf"
210 #line 90 "htmltags.gperf"
211 {"select", ID_SELECT},
212 #line 14 "htmltags.gperf"
213 {"address", ID_ADDRESS},
214 #line 97 "htmltags.gperf"
216 #line 41 "htmltags.gperf"
218 #line 108 "htmltags.gperf"
220 #line 107 "htmltags.gperf"
222 #line 96 "htmltags.gperf"
224 #line 73 "htmltags.gperf"
226 #line 83 "htmltags.gperf"
228 #line 79 "htmltags.gperf"
230 #line 20 "htmltags.gperf"
232 #line 104 "htmltags.gperf"
234 #line 66 "htmltags.gperf"
235 {"legend", ID_LEGEND},
236 #line 39 "htmltags.gperf"
238 #line 62 "htmltags.gperf"
240 #line 89 "htmltags.gperf"
241 {"script", ID_SCRIPT},
242 #line 109 "htmltags.gperf"
244 #line 58 "htmltags.gperf"
246 #line 12 "htmltags.gperf"
248 #line 86 "htmltags.gperf"
250 #line 74 "htmltags.gperf"
251 {"noembed", ID_NOEMBED},
252 #line 110 "htmltags.gperf"
254 #line 53 "htmltags.gperf"
256 #line 51 "htmltags.gperf"
258 #line 111 "htmltags.gperf"
260 #line 50 "htmltags.gperf"
262 #line 60 "htmltags.gperf"
264 #line 23 "htmltags.gperf"
266 #line 49 "htmltags.gperf"
268 #line 114 "htmltags.gperf"
270 #line 28 "htmltags.gperf"
271 {"center", ID_CENTER},
272 #line 48 "htmltags.gperf"
274 #line 75 "htmltags.gperf"
275 {"noframes", ID_NOFRAMES},
276 #line 57 "htmltags.gperf"
277 {"iframe", ID_IFRAME},
278 #line 47 "htmltags.gperf"
280 #line 65 "htmltags.gperf"
282 #line 15 "htmltags.gperf"
283 {"applet", ID_APPLET},
284 #line 67 "htmltags.gperf"
286 #line 71 "htmltags.gperf"
288 #line 102 "htmltags.gperf"
290 #line 19 "htmltags.gperf"
291 {"basefont", ID_BASEFONT},
292 #line 105 "htmltags.gperf"
294 #line 112 "htmltags.gperf"
296 #line 92 "htmltags.gperf"
298 #line 21 "htmltags.gperf"
300 #line 55 "htmltags.gperf"
302 #line 76 "htmltags.gperf"
303 {"noscript", ID_NOSCRIPT},
304 #line 36 "htmltags.gperf"
306 #line 95 "htmltags.gperf"
308 #line 26 "htmltags.gperf"
309 {"canvas", ID_CANVAS},
310 #line 25 "htmltags.gperf"
311 {"button", ID_BUTTON},
312 #line 77 "htmltags.gperf"
313 {"nolayer", ID_NOLAYER},
314 #line 42 "htmltags.gperf"
315 {"fieldset", ID_FIELDSET},
316 #line 29 "htmltags.gperf"
318 #line 63 "htmltags.gperf"
319 {"keygen", ID_KEYGEN},
320 #line 93 "htmltags.gperf"
321 {"strike", ID_STRIKE},
322 #line 101 "htmltags.gperf"
323 {"textarea", ID_TEXTAREA},
324 #line 59 "htmltags.gperf"
326 #line 99 "htmltags.gperf"
328 #line 27 "htmltags.gperf"
329 {"caption", ID_CAPTION},
330 #line 37 "htmltags.gperf"
332 #line 68 "htmltags.gperf"
334 #line 94 "htmltags.gperf"
335 {"strong", ID_STRONG},
336 #line 115 "htmltags.gperf"
338 #line 32 "htmltags.gperf"
339 {"colgroup", ID_COLGROUP},
340 #line 70 "htmltags.gperf"
341 {"marquee", ID_MARQUEE},
342 #line 84 "htmltags.gperf"
343 {"plaintext", ID_PLAINTEXT},
344 #line 13 "htmltags.gperf"
345 {"acronym", ID_ACRONYM},
346 #line 61 "htmltags.gperf"
347 {"isindex", ID_ISINDEX},
348 #line 113 "htmltags.gperf"
350 #line 78 "htmltags.gperf"
351 {"object", ID_OBJECT},
352 #line 81 "htmltags.gperf"
353 {"option", ID_OPTION},
354 #line 80 "htmltags.gperf"
355 {"optgroup", ID_OPTGROUP},
356 #line 22 "htmltags.gperf"
357 {"blockquote", ID_BLOCKQUOTE}
360 static const signed char lookup[] =
362 -1, 0, 1, -1, -1, -1, 2, 3, -1, -1,
363 -1, 4, 5, 6, -1, -1, 7, 8, -1, -1,
364 -1, -1, -1, -1, -1, -1, -1, 9, 10, 11,
365 -1, -1, -1, 12, 13, 14, -1, 15, -1, 16,
366 17, 18, 19, -1, 20, -1, -1, -1, 21, 22,
367 23, -1, 24, 25, 26, -1, -1, 27, 28, 29,
368 30, 31, 32, 33, -1, 34, 35, 36, 37, 38,
369 39, -1, 40, 41, -1, 42, 43, 44, 45, -1,
370 -1, 46, 47, 48, 49, -1, 50, 51, 52, 53,
371 -1, -1, 54, 55, -1, -1, -1, 56, 57, 58,
372 -1, -1, 59, -1, -1, 60, 61, 62, 63, -1,
373 -1, 64, 65, -1, -1, 66, -1, -1, -1, -1,
374 -1, 67, 68, -1, 69, 70, -1, -1, 71, -1,
375 72, -1, -1, 73, 74, -1, -1, -1, 75, 76,
376 -1, -1, -1, 77, -1, -1, -1, -1, 78, -1,
377 79, 80, -1, -1, -1, -1, 81, 82, 83, 84,
378 -1, 85, -1, -1, -1, -1, 86, -1, 87, -1,
379 88, -1, -1, -1, -1, 89, -1, -1, -1, -1,
380 -1, -1, 90, 91, 92, -1, 93, -1, -1, -1,
381 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
382 -1, -1, -1, -1, -1, -1, -1, 94, 95, -1,
383 -1, -1, 96, -1, 97, -1, -1, -1, -1, -1,
384 -1, -1, 98, -1, -1, -1, -1, 99, -1, -1,
385 -1, -1, -1, -1, -1, -1, 100, -1, -1, -1,
386 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
387 -1, 101, -1, -1, -1, -1, -1, -1, -1, -1,
388 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
389 -1, 102, -1, -1, -1, -1, -1, -1, -1, -1,
390 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
391 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
392 -1, -1, -1, 103, -1, -1, -1, -1, -1, -1,
393 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
394 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
395 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
396 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
397 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
398 -1, -1, -1, -1, -1, 104
401 if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
403 register int key = hash_tag (str, len);
405 if (key <= MAX_HASH_VALUE && key >= 0)
407 register int index = lookup[key];
411 if (len == lengthtable[index])
413 register const char *s = wordlist_tag[index].name;
415 if (*str == *s && !memcmp (str + 1, s + 1, len - 1))
416 return &wordlist_tag[index];
423 #line 116 "htmltags.gperf"
425 #line 426 "htmltags.c"
427 using DOM::DOMString;
429 static const char * const openTagNames[] = {
537 static const char * const closeTagNames[] = {
643 DOMString getTagName(unsigned short id)
645 if (id > ID_CLOSE_TAG) {
646 int index = id - ID_CLOSE_TAG;
647 if (index >= ID_TEXT)
649 return closeTagNames[index];
651 if (id > ID_LAST_TAG)
653 return openTagNames[id];