1 /** @file my-html-tok.h
2  *  @brief Map string to html tag code
3  */
4 /* Warning: This file is generated by ./gen-myhtmltags - do not modify directly! */
5 /* Copyright (C) 2012,2013 Olly Betts
6  *
7  * Permission is hereby granted, free of charge, to any person obtaining a copy
8  * of this software and associated documentation files (the "Software"), to
9  * deal in the Software without restriction, including without limitation the
10  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
11  * sell copies of the Software, and to permit persons to whom the Software is
12  * furnished to do so, subject to the following conditions:
13  *
14  * The above copyright notice and this permission notice shall be included in
15  * all copies or substantial portions of the Software.
16  *
17  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
23  * IN THE SOFTWARE.
24  */
25 
26 #ifndef XAPIAN_INCLUDED_MY_HTML_TOK_H
27 #define XAPIAN_INCLUDED_MY_HTML_TOK_H
28 
29 enum html_tag {
30     ADDRESS = 0,
31     APPLET = 1,
32     BLOCKQUOTE = 2,
33     BR = 3,
34     CENTER = 4,
35     DD = 5,
36     DIR = 6,
37     DIV = 7,
38     DL = 8,
39     DT = 9,
40     EMBED = 10,
41     FIELDSET = 11,
42     FORM = 12,
43     H1 = 13,
44     H2 = 14,
45     H3 = 15,
46     H4 = 16,
47     H5 = 17,
48     H6 = 18,
49     HR = 19,
50     IFRAME = 20,
51     IMG = 21,
52     INPUT = 22,
53     ISINDEX = 23,
54     KEYGEN = 24,
55     LEGEND = 25,
56     LI = 26,
57     LISTING = 27,
58     MARQUEE = 28,
59     MENU = 29,
60     META = 30,
61     MULTICOL = 31,
62     OBJECT = 32,
63     OL = 33,
64     OPTION = 34,
65     P = 35,
66     PLAINTEXT = 36,
67     PRE = 37,
68     Q = 38,
69     SCRIPT = 39,
70     SELECT = 40,
71     STYLE = 41,
72     TABLE = 42,
73     TD = 43,
74     TEXTAREA = 44,
75     TH = 45,
76     TITLE = 46,
77     TR = 47,
78     UL = 48,
79     XMP = 49
80 };
81 
82 static const unsigned char tab[] = {
83     10,
84 
85       0, 157,  44,  28,  93, 209, 124,  65,
86       5,  16,
87 
88     (2 - 1),
89     P, 'p',
90     Q, 'q',
91 
92     (1 - 1),
93     PLAINTEXT, 'p','l','a','i','n','t','e','x','t',
94 
95     (1 - 1),
96     BLOCKQUOTE, 'b','l','o','c','k','q','u','o','t','e',
97 
98     (3 - 1),
99     FORM, 'f','o','r','m',
100     MENU, 'm','e','n','u',
101     META, 'm','e','t','a',
102 
103     (5 - 1),
104     DIR, 'd','i','r',
105     DIV, 'd','i','v',
106     IMG, 'i','m','g',
107     PRE, 'p','r','e',
108     XMP, 'x','m','p',
109 
110     (3 - 1),
111     FIELDSET, 'f','i','e','l','d','s','e','t',
112     MULTICOL, 'm','u','l','t','i','c','o','l',
113     TEXTAREA, 't','e','x','t','a','r','e','a',
114 
115     (5 - 1),
116     EMBED, 'e','m','b','e','d',
117     INPUT, 'i','n','p','u','t',
118     STYLE, 's','t','y','l','e',
119     TABLE, 't','a','b','l','e',
120     TITLE, 't','i','t','l','e',
121 
122     (4 - 1),
123     ADDRESS, 'a','d','d','r','e','s','s',
124     ISINDEX, 'i','s','i','n','d','e','x',
125     LISTING, 'l','i','s','t','i','n','g',
126     MARQUEE, 'm','a','r','q','u','e','e',
127 
128     (17 - 1),
129     BR, 'b','r',
130     DD, 'd','d',
131     DL, 'd','l',
132     DT, 'd','t',
133     H1, 'h','1',
134     H2, 'h','2',
135     H3, 'h','3',
136     H4, 'h','4',
137     H5, 'h','5',
138     H6, 'h','6',
139     HR, 'h','r',
140     LI, 'l','i',
141     OL, 'o','l',
142     TD, 't','d',
143     TH, 't','h',
144     TR, 't','r',
145     UL, 'u','l',
146 
147     (9 - 1),
148     APPLET, 'a','p','p','l','e','t',
149     CENTER, 'c','e','n','t','e','r',
150     IFRAME, 'i','f','r','a','m','e',
151     KEYGEN, 'k','e','y','g','e','n',
152     LEGEND, 'l','e','g','e','n','d',
153     OBJECT, 'o','b','j','e','c','t',
154     OPTION, 'o','p','t','i','o','n',
155     SCRIPT, 's','c','r','i','p','t',
156     SELECT, 's','e','l','e','c','t'
157 };
158 
159 enum { SPACE = 1, COLUMN = 2, BREAK = 3, BLOCK = 4, PAGE = 5, NOCLOSE = 8, TOKEN_SPACE_MASK = 7 };
160 
161 static const unsigned char token_space[] = {
162     BLOCK,
163     SPACE | NOCLOSE,
164     BLOCK,
165     BREAK | NOCLOSE,
166     BLOCK,
167     BLOCK,
168     BLOCK,
169     BLOCK,
170     BLOCK,
171     BLOCK,
172     SPACE | NOCLOSE,
173     BLOCK,
174     BLOCK,
175     BLOCK,
176     BLOCK,
177     BLOCK,
178     BLOCK,
179     BLOCK,
180     BLOCK,
181     BLOCK,
182     BLOCK,
183     SPACE | NOCLOSE,
184     SPACE | NOCLOSE,
185     BLOCK | NOCLOSE,
186     SPACE | NOCLOSE,
187     BLOCK,
188     BLOCK,
189     BLOCK,
190     BLOCK,
191     BLOCK,
192     0 | NOCLOSE,
193     BLOCK,
194     SPACE | NOCLOSE,
195     BLOCK,
196     BLOCK,
197     BLOCK,
198     BLOCK,
199     BLOCK,
200     SPACE,
201     0,
202     BLOCK,
203     0,
204     BLOCK,
205     COLUMN,
206     BLOCK,
207     COLUMN,
208     0,
209     BLOCK,
210     BLOCK,
211     SPACE,
212 };
213 
214 #endif
215