1 /* ANSI-C code produced by gperf version 3.1 */
2 /* Command-line: gperf -a -c -C -o -t -p -T -k '1,2,$' -N lookup_element dtd.hash */
3
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-gperf@gnu.org>."
29 #endif
30
31 #line 1 "dtd.hash"
32 /* -*-indented-text-*- */
33
34 /*
35 * Copyright © 1998-2017 World Wide Web Consortium
36 * See http://www.w3.org/Consortium/Legal/copyright-software
37 *
38 * Part of HTML-XML-utils, see:
39 * http://www.w3.org/Tools/HTML-XML-utils/
40 *
41 * Author: Bert Bos <bert@w3.org>
42 * Created: 5 Nov 1998
43 *
44 * Input file for gperf, to generate a perfect hash function
45 * for all HTML tags, and to store each element's type.
46 *
47 * mixed = element accepts text content
48 * empty = element is empty
49 * cdata = element has character data content (i.e., unparsed content)
50 * stag = start tag is required
51 * etag = end tag is required
52 * pre = element is preformatted
53 * break_before, break_after = pretty-print with a newline before/after the elt
54 * parents = array of possible parents, first one is preferred parent
55 *
56 * The DTD is a mixture of strict HTML 4.0 and some HTML5
57 *
58 */
59 #include <config.h>
60 #include <string.h>
61 #include <stdlib.h>
62 #include <assert.h>
63 #include <stdbool.h>
64 #include "export.h"
65 #include "types.e"
66
67 #define MAXNAMELEN 10 /* Max. len. of elt. name */
68 EXPORTDEF(MAXNAMELEN)
69
70 EXPORT typedef struct _ElementType {
71 string name;
72 bool mixed, empty, cdata, stag, etag, pre, break_before, break_after;
73 string parents[76];
74 } ElementType;
75
76 /* lookup_element -- look up the string in the hash table */
77 EXPORT const ElementType * lookup_element(/* register const char *str,
78 register unsigned int len */);
79
80 /* Different kinds of parent elements: */
81 #define PHRASE "abbr", "acronym", "b", "bdi", "bdo", "big", "cite", "code", "dfn", "em", "i", "kbd", "q", "s", "samp", "small", "span", "strong", "sub", "sup", "time", "tt", "u", "var"
82 #define BRIDGE "p", "address", "caption", "dt", "h1", "h2", "h3", "h4", "h5", "h6", "legend", "pre"
83 #define FLOW "article", "aside", "dd", "del", "details", "div", "fieldset", "figcaption", "figure", "footer", "header", "ins", "li", "nav", "section", "main", "object", "td", "th"
84 #define INLINE_PARENT BRIDGE, PHRASE, FLOW
85 #define BLOCK_PARENT "body", "blockquote", "map", "main"
86
87 #define TOTAL_KEYWORDS 97
88 #define MIN_WORD_LENGTH 1
89 #define MAX_WORD_LENGTH 10
90 #define MIN_HASH_VALUE 1
91 #define MAX_HASH_VALUE 227
92 /* maximum key range = 227, duplicates = 0 */
93
94 #ifdef __GNUC__
95 __inline
96 #else
97 #ifdef __cplusplus
98 inline
99 #endif
100 #endif
101 static unsigned int
hash(register const char * str,register size_t len)102 hash (register const char *str, register size_t len)
103 {
104 static const unsigned char asso_values[] =
105 {
106 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
107 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
108 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
109 228, 228, 228, 228, 228, 228, 228, 0, 228, 228,
110 228, 228, 228, 228, 228, 228, 228, 228, 228, 35,
111 30, 20, 15, 5, 0, 228, 228, 228, 228, 228,
112 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
113 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
114 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
115 228, 228, 228, 228, 228, 228, 228, 5, 60, 80,
116 5, 0, 85, 37, 65, 20, 228, 15, 10, 10,
117 25, 35, 25, 0, 80, 30, 0, 65, 105, 0,
118 228, 40, 228, 228, 228, 228, 228, 228, 228, 228,
119 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
120 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
121 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
122 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
123 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
124 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
125 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
126 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
127 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
128 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
129 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
130 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
131 228, 228, 228, 228, 228, 228
132 };
133 register unsigned int hval = len;
134
135 switch (hval)
136 {
137 default:
138 hval += asso_values[(unsigned char)str[1]];
139 /*FALLTHROUGH*/
140 case 1:
141 hval += asso_values[(unsigned char)str[0]];
142 break;
143 }
144 return hval + asso_values[(unsigned char)str[len - 1]];
145 }
146
147 const ElementType *
lookup_element(register const char * str,register size_t len)148 lookup_element (register const char *str, register size_t len)
149 {
150 static const ElementType wordlist[] =
151 {
152 {""},
153 #line 130 "dtd.hash"
154 {"q", 1, 0, 0, 1, 1, 0, 0, 0, {INLINE_PARENT, "a", "button", "noscript", "label", NULL}},
155 #line 153 "dtd.hash"
156 {"tt", 1, 0, 0, 1, 1, 0, 0, 0, {INLINE_PARENT, "a", "button", "noscript", "label", NULL}},
157 {""}, {""}, {""}, {""},
158 #line 90 "dtd.hash"
159 {"dt", 1, 0, 0, 1, 0, 0, 1, 1, {"dl", NULL}},
160 {""}, {""},
161 #line 143 "dtd.hash"
162 {"table", 0, 0, 0, 1, 1, 0, 1, 1, {BLOCK_PARENT, FLOW, "button", "noscript", "form", NULL}},
163 #line 62 "dtd.hash"
164 {"a", 1, 0, 0, 1, 1, 0, 0, 0, {INLINE_PARENT, "label", NULL}},
165 #line 145 "dtd.hash"
166 {"td", 1, 0, 0, 1, 0, 0, 1, 1, {"tr", NULL}},
167 #line 146 "dtd.hash"
168 {"textarea", 1, 0, 0, 1, 1, 1, 0, 0, {INLINE_PARENT, "a", "label", NULL}},
169 {""},
170 #line 61 "dtd.hash"
171 {"%data", 1, 0, 0, 1, 0, 0, 0, 0, {"p", NULL}},
172 {""},
173 #line 84 "dtd.hash"
174 {"dd", 1, 0, 0, 1, 0, 0, 1, 1, {"dl", NULL}},
175 #line 85 "dtd.hash"
176 {"del", 1, 0, 0, 1, 1, 0, 0, 0, {INLINE_PARENT, BLOCK_PARENT, "a", "button", "noscript", "form", "label", "option", "textarea", NULL}},
177 #line 120 "dtd.hash"
178 {"meta", 0, 1, 0, 1, 0, 0, 1, 0, {INLINE_PARENT, "head", "a", "button", "noscript", "label", NULL}},
179 #line 92 "dtd.hash"
180 {"embed", 0, 1, 0, 1, 0, 0, 0, 0, {INLINE_PARENT, "a", "button", "noscript", "label", NULL}},
181 #line 115 "dtd.hash"
182 {"legend", 1, 0, 0, 1, 1, 0, 1, 1, {"fieldset", NULL}},
183 #line 91 "dtd.hash"
184 {"em", 1, 0, 0, 1, 1, 0, 0, 0, {INLINE_PARENT, "a", "button", "noscript", "label", NULL}},
185 {""}, {""},
186 #line 150 "dtd.hash"
187 {"title", 1, 0, 0, 1, 1, 0, 1, 1, {"head", NULL}},
188 {""},
189 #line 89 "dtd.hash"
190 {"dl", 0, 0, 0, 1, 1, 0, 1, 1, {BLOCK_PARENT, FLOW, "button", "noscript", "form", NULL}},
191 {""}, {""},
192 #line 114 "dtd.hash"
193 {"label", 1, 0, 0, 1, 1, 0, 0, 0, {INLINE_PARENT, "a", NULL}},
194 {""}, {""}, {""}, {""},
195 #line 139 "dtd.hash"
196 {"style", 1, 0, 1, 1, 1, 1, 1, 0, {"head", NULL}},
197 #line 134 "dtd.hash"
198 {"select", 0, 0, 0, 1, 1, 0, 0, 0, {INLINE_PARENT, "a", "label", NULL}},
199 {""}, {""}, {""},
200 #line 68 "dtd.hash"
201 {"aside", 1, 0, 0, 1, 1, 0, 1, 1, {BLOCK_PARENT, FLOW, "button", "noscript", "form", NULL}},
202 #line 108 "dtd.hash"
203 {"i", 1, 0, 0, 1, 1, 0, 0, 0, {INLINE_PARENT, "a", "button", "noscript", "label", NULL}},
204 #line 86 "dtd.hash"
205 {"details", 1, 0, 0, 1, 1, 0, 1, 1, {INLINE_PARENT, "a", "button", "noscript", "label", NULL}},
206 #line 119 "dtd.hash"
207 {"map", 0, 0, 0, 1, 1, 0, 0, 0, {INLINE_PARENT, "a", "button", "noscript", "label", NULL}},
208 #line 118 "dtd.hash"
209 {"main", 1, 0, 0, 1, 1, 0, 1, 1, {"body", "div", "noscript", NULL}},
210 #line 128 "dtd.hash"
211 {"param", 0, 1, 0, 1, 0, 0, 1, 1, {"object", NULL}},
212 #line 113 "dtd.hash"
213 {"keygen", 0, 1, 0, 1, 0, 0, 0, 0, {INLINE_PARENT, "a", "button", "noscript", "label", NULL}},
214 #line 65 "dtd.hash"
215 {"address", 1, 0, 0, 1, 1, 0, 1, 1, {BLOCK_PARENT, FLOW, "button", "noscript", "form", NULL}},
216 {""},
217 #line 117 "dtd.hash"
218 {"link", 0, 1, 0, 1, 0, 0, 1, 0, {"head", NULL}},
219 #line 110 "dtd.hash"
220 {"input", 0, 1, 0, 1, 0, 0, 0, 0, {INLINE_PARENT, "a", "label", NULL}},
221 #line 127 "dtd.hash"
222 {"p", 1, 0, 0, 1, 0, 0, 1, 1, {BLOCK_PARENT, FLOW, "button", "noscript", "form", NULL}},
223 #line 116 "dtd.hash"
224 {"li", 1, 0, 0, 1, 0, 0, 1, 1, {"ul", "ol", NULL}},
225 {""}, {""},
226 #line 135 "dtd.hash"
227 {"small", 1, 0, 0, 1, 1, 0, 0, 0, {INLINE_PARENT, "a", "button", "noscript", "label", NULL}},
228 {""},
229 #line 124 "dtd.hash"
230 {"ol", 0, 0, 0, 1, 1, 0, 1, 1, {BLOCK_PARENT, FLOW, "button", "noscript", "form", NULL}},
231 {""}, {""}, {""}, {""},
232 #line 133 "dtd.hash"
233 {"section", 1, 0, 0, 1, 1, 0, 1, 1, {BLOCK_PARENT, FLOW, "button", "noscript", "form", NULL}},
234 {""},
235 #line 131 "dtd.hash"
236 {"samp", 1, 0, 0, 1, 1, 0, 0, 0, {INLINE_PARENT, "a", "button", "noscript", "label", NULL}},
237 {""}, {""},
238 #line 103 "dtd.hash"
239 {"h6", 1, 0, 0, 1, 1, 0, 1, 1, {BLOCK_PARENT, FLOW, "button", "noscript", "form", NULL}},
240 #line 122 "dtd.hash"
241 {"noscript", 1, 0, 0, 1, 1, 0, 0, 0, {INLINE_PARENT, BLOCK_PARENT, "a", "button", "noscript", "form", "label", "option", "textarea", NULL}},
242 #line 71 "dtd.hash"
243 {"base", 0, 1, 0, 1, 0, 0, 1, 1, {"head", NULL}},
244 #line 109 "dtd.hash"
245 {"img", 0, 1, 0, 1, 0, 0, 0, 0, {INLINE_PARENT, "a", "button", "noscript", "label", NULL}},
246 #line 136 "dtd.hash"
247 {"source", 0, 1, 0, 1, 0, 0, 1, 1, {"audio", "video", "template", NULL}},
248 {""},
249 #line 138 "dtd.hash"
250 {"strong", 1, 0, 0, 1, 1, 0, 0, 0, {INLINE_PARENT, "a", "button", "noscript", "label", NULL}},
251 #line 104 "dtd.hash"
252 {"head", 0, 0, 0, 0, 0, 0, 1, 1, {"html", NULL}},
253 #line 149 "dtd.hash"
254 {"thead", 0, 0, 0, 1, 0, 0, 1, 1, {"table", NULL}},
255 {""},
256 #line 102 "dtd.hash"
257 {"h5", 1, 0, 0, 1, 1, 0, 1, 1, {BLOCK_PARENT, FLOW, "button", "noscript", "form", NULL}},
258 #line 111 "dtd.hash"
259 {"ins", 1, 0, 0, 1, 1, 0, 0, 0, {INLINE_PARENT, BLOCK_PARENT, "a", "button", "noscript", "form", "label", "option", "textarea", NULL}},
260 #line 107 "dtd.hash"
261 {"html", 0, 0, 0, 0, 0, 0, 1, 1, {NULL, NULL}},
262 #line 75 "dtd.hash"
263 {"blockquote", 0, 0, 0, 1, 1, 0, 1, 1, {BLOCK_PARENT, FLOW, "button", "noscript", "form", NULL}},
264 {""}, {""},
265 #line 112 "dtd.hash"
266 {"kbd", 1, 0, 0, 1, 1, 0, 0, 0, {INLINE_PARENT, "a", "button", "noscript", "label", NULL}},
267 #line 137 "dtd.hash"
268 {"span", 1, 0, 0, 1, 1, 0, 0, 0, {INLINE_PARENT, "a", "button", "noscript", "label", NULL}},
269 {""}, {""},
270 #line 154 "dtd.hash"
271 {"ul", 0, 0, 0, 1, 1, 0, 1, 1, {BLOCK_PARENT, FLOW, "button", "noscript", "form", NULL}},
272 #line 72 "dtd.hash"
273 {"bdi", 1, 0, 0, 1, 1, 0, 0, 0, {INLINE_PARENT, "a", "button", "noscript", "label", NULL}},
274 {""},
275 #line 147 "dtd.hash"
276 {"tfoot", 0, 0, 0, 1, 0, 0, 1, 1, {"table", NULL}},
277 #line 126 "dtd.hash"
278 {"option", 1, 0, 0, 1, 0, 0, 1, 1, {"select", "optgroup", NULL}},
279 #line 67 "dtd.hash"
280 {"article", 1, 0, 0, 1, 1, 0, 1, 1, {BLOCK_PARENT, FLOW, "button", "noscript", "form", NULL}},
281 #line 125 "dtd.hash"
282 {"optgroup", 0, 0, 0, 1, 1, 0, 1, 1, {"select", NULL}},
283 #line 66 "dtd.hash"
284 {"area", 0, 1, 0, 1, 0, 0, 0, 0, {"map", NULL}},
285 {""}, {""},
286 #line 101 "dtd.hash"
287 {"h4", 1, 0, 0, 1, 1, 0, 1, 1, {BLOCK_PARENT, FLOW, "button", "noscript", "form", NULL}},
288 {""}, {""},
289 #line 152 "dtd.hash"
290 {"track", 0, 1, 0, 1, 0, 0, 1, 1, {"audio", "video", "template", NULL}},
291 #line 123 "dtd.hash"
292 {"object", 1, 0, 0, 1, 1, 0, 0, 0, {INLINE_PARENT, "a", "button", "noscript", "del", "header", "aside", "section", "main", "article", "nav", "fieldset", "head", "ins", "label", "object", NULL}},
293 #line 64 "dtd.hash"
294 {"acronym", 1, 0, 0, 1, 1, 0, 0, 0, {INLINE_PARENT, "a", "button", "noscript", "label", NULL}},
295 #line 73 "dtd.hash"
296 {"bdo", 1, 0, 0, 1, 1, 0, 0, 0, {INLINE_PARENT, "a", "button", "noscript", "label", NULL}},
297 #line 80 "dtd.hash"
298 {"cite", 1, 0, 0, 1, 1, 0, 0, 0, {INLINE_PARENT, "a", "button", "noscript", "label", NULL}},
299 #line 144 "dtd.hash"
300 {"tbody", 0, 0, 0, 0, 0, 0, 1, 1, {"table", NULL}},
301 {""},
302 #line 100 "dtd.hash"
303 {"h3", 1, 0, 0, 1, 1, 0, 1, 1, {BLOCK_PARENT, FLOW, "button", "noscript", "form", NULL}},
304 #line 129 "dtd.hash"
305 {"pre", 1, 0, 0, 1, 1, 1, 1, 1, {BLOCK_PARENT, FLOW, "button", "noscript", "form", NULL}},
306 {""},
307 #line 69 "dtd.hash"
308 {"audio", 1, 0, 0, 1, 1, 0, 0, 0, {INLINE_PARENT, "a", "button", "noscript", "label", NULL}},
309 #line 95 "dtd.hash"
310 {"figure", 1, 0, 0, 1, 1, 0, 1, 1, {BLOCK_PARENT, FLOW, "button", "noscript", "form", NULL}},
311 {""},
312 #line 93 "dtd.hash"
313 {"fieldset", 1, 0, 0, 1, 1, 0, 1, 1, {BLOCK_PARENT, FLOW, "form", NULL}},
314 {""}, {""},
315 #line 132 "dtd.hash"
316 {"script", 1, 0, 1, 1, 1, 1, 1, 0, {"body", INLINE_PARENT, "blockquote", "head", "map", "a", "button", "noscript", "form", "label", NULL}},
317 #line 79 "dtd.hash"
318 {"caption", 1, 0, 0, 1, 1, 0, 1, 1, {"table", NULL}},
319 #line 87 "dtd.hash"
320 {"dfn", 1, 0, 0, 1, 1, 0, 0, 0, {INLINE_PARENT, "a", "button", "noscript", "label", NULL}},
321 #line 81 "dtd.hash"
322 {"code", 1, 0, 0, 1, 1, 0, 0, 0, {INLINE_PARENT, "a", "button", "noscript", "label", NULL}},
323 #line 74 "dtd.hash"
324 {"big", 1, 0, 0, 1, 1, 0, 0, 0, {INLINE_PARENT, "a", "button", "noscript", "label", NULL}},
325 #line 70 "dtd.hash"
326 {"b", 1, 0, 0, 1, 1, 0, 0, 0, {INLINE_PARENT, "a", "button", "noscript", "label", NULL}},
327 {""},
328 #line 142 "dtd.hash"
329 {"sup", 1, 0, 0, 1, 1, 0, 0, 0, {INLINE_PARENT, "a", "button", "noscript", "label", NULL}},
330 {""}, {""}, {""},
331 #line 99 "dtd.hash"
332 {"h2", 1, 0, 0, 1, 1, 0, 1, 1, {BLOCK_PARENT, FLOW, "button", "noscript", "form", NULL}},
333 #line 82 "dtd.hash"
334 {"col", 0, 1, 0, 1, 0, 0, 0, 0, {"colgroup", "table", NULL}},
335 {""}, {""}, {""},
336 #line 148 "dtd.hash"
337 {"th", 1, 0, 0, 1, 0, 0, 1, 1, {"tr", NULL}},
338 #line 88 "dtd.hash"
339 {"div", 1, 0, 0, 1, 1, 0, 1, 1, {BLOCK_PARENT, FLOW, "button", "noscript", "form", NULL}},
340 #line 97 "dtd.hash"
341 {"form", 0, 0, 0, 1, 1, 0, 1, 1, {BLOCK_PARENT, FLOW, NULL}},
342 {""}, {""},
343 #line 98 "dtd.hash"
344 {"h1", 1, 0, 0, 1, 1, 0, 1, 1, {BLOCK_PARENT, FLOW, "button", "noscript", "form", NULL}},
345 #line 121 "dtd.hash"
346 {"nav", 1, 0, 0, 1, 1, 0, 1, 1, {BLOCK_PARENT, FLOW, "button", "noscript", "form", NULL}},
347 #line 76 "dtd.hash"
348 {"body", 0, 0, 0, 0, 0, 0, 1, 1, {"html", NULL}},
349 #line 94 "dtd.hash"
350 {"figcaption", 1, 0, 0, 1, 1, 0, 1, 1, {"figure", NULL}},
351 {""},
352 #line 141 "dtd.hash"
353 {"summary", 1, 0, 0, 1, 1, 0, 1, 1, {"details", NULL}},
354 #line 157 "dtd.hash"
355 {"wbr", 0, 1, 0, 1, 0, 0, 0, 0, {INLINE_PARENT, "a", "button", "noscript", "label", NULL}},
356 {""}, {""}, {""}, {""},
357 #line 83 "dtd.hash"
358 {"colgroup", 0, 0, 0, 1, 1, 0, 1, 1, {"table", NULL}},
359 #line 63 "dtd.hash"
360 {"abbr", 1, 0, 0, 1, 1, 0, 0, 0, {INLINE_PARENT, "a", "button", "noscript", "label", NULL}},
361 {""},
362 #line 105 "dtd.hash"
363 {"header", 1, 0, 0, 1, 1, 0, 1, 1, {BLOCK_PARENT, FLOW, "button", "noscript", "form", NULL}},
364 {""}, {""}, {""}, {""},
365 #line 78 "dtd.hash"
366 {"button", 1, 0, 0, 1, 1, 0, 0, 0, {INLINE_PARENT, "a", "label", NULL}},
367 {""},
368 #line 140 "dtd.hash"
369 {"sub", 1, 0, 0, 1, 1, 0, 0, 0, {INLINE_PARENT, "a", "button", "noscript", "label", NULL}},
370 {""}, {""}, {""},
371 #line 151 "dtd.hash"
372 {"tr", 0, 0, 0, 1, 0, 0, 1, 1, {"tbody", "tfoot", "thead", NULL}},
373 {""}, {""},
374 #line 156 "dtd.hash"
375 {"video", 1, 0, 0, 1, 1, 0, 0, 0, {INLINE_PARENT, "a", "button", "noscript", "label", NULL}},
376 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
377 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
378 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
379 #line 155 "dtd.hash"
380 {"var", 1, 0, 0, 1, 1, 0, 0, 0, {INLINE_PARENT, "a", "button", "noscript", "label", NULL}},
381 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
382 {""}, {""}, {""},
383 #line 96 "dtd.hash"
384 {"footer", 1, 0, 0, 1, 1, 0, 1, 1, {BLOCK_PARENT, FLOW, "button", "noscript", "form", NULL}},
385 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
386 {""}, {""}, {""}, {""}, {""}, {""},
387 #line 77 "dtd.hash"
388 {"br", 0, 1, 0, 1, 0, 0, 0, 1, {INLINE_PARENT, "a", "button", "noscript", "label", NULL}},
389 {""}, {""}, {""}, {""},
390 #line 106 "dtd.hash"
391 {"hr", 0, 1, 0, 1, 0, 0, 1, 1, {BLOCK_PARENT, FLOW, "button", "noscript", "form", NULL}}
392 };
393
394 if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
395 {
396 register unsigned int key = hash (str, len);
397
398 if (key <= MAX_HASH_VALUE)
399 {
400 register const char *s = wordlist[key].name;
401
402 if (*str == *s && !strncmp (str + 1, s + 1, len - 1) && s[len] == '\0')
403 return &wordlist[key];
404 }
405 }
406 return 0;
407 }
408 #line 158 "dtd.hash"
409
410