tokenhash.h
Go to the documentation of this file.
1/* C++ code produced by gperf version 3.2 */
2/* Command-line: gperf --compare-strncmp -C -m 20 tokens.gperf */
3/* Computed positions: -k'1,4-5,8' */
4
5#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
6 && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
7 && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
8 && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
9 && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
10 && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
11 && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
12 && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
13 && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
14 && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
15 && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
16 && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
17 && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
18 && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
19 && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
20 && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
21 && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
22 && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
23 && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
24 && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
25 && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
26 && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
27 && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
28/* The character set is not based on ISO-646. */
29#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gperf@gnu.org>."
30#endif
31
32#line 5 "tokens.gperf"
33struct fhtoken
34{
35 const char *name;
36 int tokenId;
37};
38
39#define TOTAL_KEYWORDS 124
40#define MIN_WORD_LENGTH 4
41#define MAX_WORD_LENGTH 24
42#define MIN_HASH_VALUE 18
43#define MAX_HASH_VALUE 187
44/* maximum key range = 170, duplicates = 0 */
45
46class Perfect_Hash
47{
48private:
49 static inline unsigned int hash (const char *str, size_t len);
50public:
51 static const struct fhtoken *in_word_set (const char *str, size_t len);
52};
53
54inline unsigned int
55Perfect_Hash::hash (const char *str, size_t len)
56{
57 static const unsigned char asso_values[] =
58 {
59 188, 188, 188, 188, 188, 188, 188, 188, 188, 188,
60 188, 188, 188, 188, 188, 188, 188, 188, 188, 188,
61 188, 188, 188, 188, 188, 188, 188, 188, 188, 188,
62 188, 188, 188, 188, 188, 188, 188, 188, 188, 188,
63 188, 188, 188, 188, 188, 188, 188, 188, 188, 188,
64 188, 188, 188, 188, 188, 188, 188, 188, 188, 188,
65 188, 188, 188, 188, 188, 91, 12, 10, 57, 24,
66 6, 14, 5, 51, 188, 188, 9, 6, 49, 101,
67 37, 188, 81, 44, 5, 7, 31, 188, 17, 188,
68 188, 188, 188, 188, 188, 188, 188, 6, 12, 14,
69 94, 9, 5, 31, 50, 5, 5, 111, 24, 50,
70 54, 29, 12, 188, 6, 37, 5, 81, 39, 13,
71 188, 34, 188, 188, 188, 188, 188, 188, 188, 188,
72 188, 188, 188, 188, 188, 188, 188, 188, 188, 188,
73 188, 188, 188, 188, 188, 188, 188, 188, 188, 188,
74 188, 188, 188, 188, 188, 188, 188, 188, 188, 188,
75 188, 188, 188, 188, 188, 188, 188, 188, 188, 188,
76 188, 188, 188, 188, 188, 188, 188, 188, 188, 188,
77 188, 188, 188, 188, 188, 188, 188, 188, 188, 188,
78 188, 188, 188, 188, 188, 188, 188, 188, 188, 188,
79 188, 188, 188, 188, 188, 188, 188, 188, 188, 188,
80 188, 188, 188, 188, 188, 188, 188, 188, 188, 188,
81 188, 188, 188, 188, 188, 188, 188, 188, 188, 188,
82 188, 188, 188, 188, 188, 188, 188, 188, 188, 188,
83 188, 188, 188, 188, 188, 188, 188, 188, 188, 188,
84 188, 188, 188, 188, 188, 188
85 };
86 unsigned int hval = len;
87
88 switch (hval)
89 {
90 default:
91 hval += asso_values[static_cast<unsigned char>(str[7])];
92#if defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang_major__ && defined __clang_minor__ && __clang_major__ + (__clang_minor__ >= 9) > 3))
93 [[fallthrough]];
94#elif defined __GNUC__ && __GNUC__ >= 7
95 __attribute__ ((__fallthrough__));
96#endif
97 /*FALLTHROUGH*/
98 case 7:
99 case 6:
100 case 5:
101 hval += asso_values[static_cast<unsigned char>(str[4])];
102#if defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang_major__ && defined __clang_minor__ && __clang_major__ + (__clang_minor__ >= 9) > 3))
103 [[fallthrough]];
104#elif defined __GNUC__ && __GNUC__ >= 7
105 __attribute__ ((__fallthrough__));
106#endif
107 /*FALLTHROUGH*/
108 case 4:
109 hval += asso_values[static_cast<unsigned char>(str[3])];
110#if defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang_major__ && defined __clang_minor__ && __clang_major__ + (__clang_minor__ >= 9) > 3))
111 [[fallthrough]];
112#elif defined __GNUC__ && __GNUC__ >= 7
113 __attribute__ ((__fallthrough__));
114#endif
115 /*FALLTHROUGH*/
116 case 3:
117 case 2:
118 case 1:
119 hval += asso_values[static_cast<unsigned char>(str[0])];
120 break;
121 }
122 return hval;
123}
124
125static const struct fhtoken wordlist[] =
126 {
127 {(char*)0, 0}, {(char*)0, 0}, {(char*)0, 0}, {(char*)0, 0},
128 {(char*)0, 0}, {(char*)0, 0}, {(char*)0, 0}, {(char*)0, 0},
129 {(char*)0, 0}, {(char*)0, 0}, {(char*)0, 0}, {(char*)0, 0},
130 {(char*)0, 0}, {(char*)0, 0}, {(char*)0, 0}, {(char*)0, 0},
131 {(char*)0, 0}, {(char*)0, 0},
132#line 70 "tokens.gperf"
133 {"List",FH_LIST},
134 {(char*)0, 0}, {(char*)0, 0}, {(char*)0, 0}, {(char*)0, 0},
135#line 119 "tokens.gperf"
136 {"TString",FH_TSTRING},
137#line 75 "tokens.gperf"
138 {"MString",FH_MSTRING},
139#line 131 "tokens.gperf"
140 {"UString",FH_USTRING},
141#line 117 "tokens.gperf"
142 {"TEffect",FH_TEFFECT},
143 {(char*)0, 0}, {(char*)0, 0},
144#line 65 "tokens.gperf"
145 {"Layer",FH_LAYER},
146#line 71 "tokens.gperf"
147 {"MDict",FH_MDICT},
148 {(char*)0, 0},
149#line 61 "tokens.gperf"
150 {"Halftone",FH_HALFTONE},
151#line 120 "tokens.gperf"
152 {"TabTable",FH_TABTABLE},
153 {(char*)0, 0},
154#line 83 "tokens.gperf"
155 {"MultiBlend",FH_MULTIBLEND},
156#line 82 "tokens.gperf"
157 {"MpObject",FH_MPOBJECT},
158#line 121 "tokens.gperf"
159 {"TaperedFill",FH_TAPEREDFILL},
160#line 122 "tokens.gperf"
161 {"TaperedFillX",FH_TAPEREDFILLX},
162#line 69 "tokens.gperf"
163 {"LinearFill",FH_LINEARFILL},
164#line 74 "tokens.gperf"
165 {"MQuickDict",FH_MQUICKDICT},
166#line 32 "tokens.gperf"
167 {"ContentFill",FH_CONTENTFILL},
168#line 76 "tokens.gperf"
169 {"MasterPageDocMan",FH_MASTERPAGEDOCMAN},
170#line 77 "tokens.gperf"
171 {"MasterPageElement",FH_MASTERPAGEELEMENT},
172#line 25 "tokens.gperf"
173 {"CharacterFill",FH_CHARACTERFILL},
174#line 50 "tokens.gperf"
175 {"FWFeatherFilter",FH_FWFEATHERFILTER},
176#line 56 "tokens.gperf"
177 {"FilterAttributeHolder",FH_FILTERATTRIBUTEHOLDER},
178#line 80 "tokens.gperf"
179 {"MasterPageSymbolClass",FH_MASTERPAGESYMBOLCLASS},
180#line 78 "tokens.gperf"
181 {"MasterPageLayerElement",FH_MASTERPAGELAYERELEMENT},
182#line 79 "tokens.gperf"
183 {"MasterPageLayerInstance",FH_MASTERPAGELAYERINSTANCE},
184#line 81 "tokens.gperf"
185 {"MasterPageSymbolInstance",FH_MASTERPAGESYMBOLINSTANCE},
186#line 28 "tokens.gperf"
187 {"Color6",FH_COLOR6},
188#line 127 "tokens.gperf"
189 {"TileFill",FH_TILEFILL},
190#line 72 "tokens.gperf"
191 {"MList",FH_MLIST},
192#line 84 "tokens.gperf"
193 {"MultiColorList",FH_MULTICOLORLIST},
194#line 132 "tokens.gperf"
195 {"VDict",FH_VDICT},
196#line 68 "tokens.gperf"
197 {"LineTable",FH_LINETABLE},
198#line 30 "tokens.gperf"
199 {"ConeFill",FH_CONEFILL},
200#line 128 "tokens.gperf"
201 {"TintColor",FH_TINTCOLOR},
202#line 129 "tokens.gperf"
203 {"TintColor6",FH_TINTCOLOR6},
204#line 34 "tokens.gperf"
205 {"CustomProc",FH_CUSTOMPROC},
206#line 33 "tokens.gperf"
207 {"ContourFill",FH_CONTOURFILL},
208#line 67 "tokens.gperf"
209 {"LinePat",FH_LINEPAT},
210#line 24 "tokens.gperf"
211 {"CalligraphicStroke",FH_CALLIGRAPHICSTROKE},
212#line 15 "tokens.gperf"
213 {"BasicFill",FH_BASICFILL},
214#line 104 "tokens.gperf"
215 {"PropLst",FH_PROPLST},
216#line 47 "tokens.gperf"
217 {"FHDocHeader",FH_FHDOCHEADER},
218#line 35 "tokens.gperf"
219 {"Data",FH_DATA},
220#line 97 "tokens.gperf"
221 {"PatternFill",FH_PATTERNFILL},
222#line 29 "tokens.gperf"
223 {"CompositePath",FH_COMPOSITEPATH},
224#line 73 "tokens.gperf"
225 {"MName",FH_MNAME},
226#line 98 "tokens.gperf"
227 {"PatternLine",FH_PATTERNLINE},
228#line 90 "tokens.gperf"
229 {"PSFill",FH_PSFILL},
230#line 48 "tokens.gperf"
231 {"FWBevelFilter",FH_FWBEVELFILTER},
232#line 44 "tokens.gperf"
233 {"Envelope",FH_ENVELOPE},
234#line 102 "tokens.gperf"
235 {"Procedure",FH_PROCEDURE},
236#line 51 "tokens.gperf"
237 {"FWGlowFilter",FH_FWGLOWFILTER},
238#line 126 "tokens.gperf"
239 {"TextInPath",FH_TEXTINPATH},
240#line 134 "tokens.gperf"
241 {"Xform",FH_XFORM},
242#line 125 "tokens.gperf"
243 {"TextEffs",FH_TEXTEFFS},
244#line 109 "tokens.gperf"
245 {"SketchFilter",FH_SKETCHFILTER},
246#line 27 "tokens.gperf"
247 {"Collector",FH_COLLECTOR},
248#line 103 "tokens.gperf"
249 {"ProcessColor",FH_PROCESSCOLOR},
250#line 39 "tokens.gperf"
251 {"DuetFilter",FH_DUETFILTER},
252#line 66 "tokens.gperf"
253 {"LensFill",FH_LENSFILL},
254#line 36 "tokens.gperf"
255 {"DataList",FH_DATALIST},
256#line 53 "tokens.gperf"
257 {"FWSharpenFilter",FH_FWSHARPENFILTER},
258 {(char*)0, 0},
259#line 37 "tokens.gperf"
260 {"DateTime",FH_DATETIME},
261#line 52 "tokens.gperf"
262 {"FWShadowFilter",FH_FWSHADOWFILTER},
263#line 43 "tokens.gperf"
264 {"Element",FH_ELEMENT},
265#line 94 "tokens.gperf"
266 {"Path",FH_PATH},
267#line 64 "tokens.gperf"
268 {"Import",FH_IMPORT},
269#line 92 "tokens.gperf"
270 {"PantoneColor",FH_PANTONECOLOR},
271#line 16 "tokens.gperf"
272 {"BasicLine",FH_BASICLINE},
273#line 93 "tokens.gperf"
274 {"Paragraph",FH_PARAGRAPH},
275#line 41 "tokens.gperf"
276 {"ElemList",FH_ELEMLIST},
277#line 110 "tokens.gperf"
278 {"SpotColor",FH_SPOTCOLOR},
279#line 111 "tokens.gperf"
280 {"SpotColor6",FH_SPOTCOLOR6},
281#line 54 "tokens.gperf"
282 {"Figure",FH_FIGURE},
283#line 55 "tokens.gperf"
284 {"FileDescriptor",FH_FILEDESCRIPTOR},
285#line 45 "tokens.gperf"
286 {"ExpandFilter",FH_EXPANDFILTER},
287#line 91 "tokens.gperf"
288 {"PSLine",FH_PSLINE},
289#line 116 "tokens.gperf"
290 {"SymbolLibrary",FH_SYMBOLLIBRARY},
291#line 20 "tokens.gperf"
292 {"Brush",FH_BRUSH},
293#line 95 "tokens.gperf"
294 {"PathText",FH_PATHTEXT},
295#line 100 "tokens.gperf"
296 {"PerspectiveGrid",FH_PERSPECTIVEGRID},
297#line 105 "tokens.gperf"
298 {"RadialFill",FH_RADIALFILL},
299#line 106 "tokens.gperf"
300 {"RadialFillX",FH_RADIALFILLX},
301#line 38 "tokens.gperf"
302 {"DisplayText",FH_DISPLAYTEXT},
303#line 99 "tokens.gperf"
304 {"PerspectiveEnvelope",FH_PERSPECTIVEENVELOPE},
305#line 124 "tokens.gperf"
306 {"TextColumn",FH_TEXTCOLUMN},
307#line 59 "tokens.gperf"
308 {"Group",FH_GROUP},
309#line 96 "tokens.gperf"
310 {"PathTextLineInfo",FH_PATHTEXTLINEINFO},
311#line 63 "tokens.gperf"
312 {"ImageImport",FH_IMAGEIMPORT},
313#line 31 "tokens.gperf"
314 {"ConnectorLine",FH_CONNECTORLINE},
315#line 22 "tokens.gperf"
316 {"BrushStroke",FH_BRUSHSTROKE},
317#line 130 "tokens.gperf"
318 {"TransformFilter",FH_TRANSFORMFILTER},
319#line 112 "tokens.gperf"
320 {"StylePropLst",FH_STYLEPROPLST},
321#line 23 "tokens.gperf"
322 {"BrushTip",FH_BRUSHTIP},
323#line 114 "tokens.gperf"
324 {"SymbolClass",FH_SYMBOLCLASS},
325#line 101 "tokens.gperf"
326 {"PolygonFigure",FH_POLYGONFIGURE},
327#line 14 "tokens.gperf"
328 {"AttributeHolder",FH_ATTRIBUTEHOLDER},
329#line 60 "tokens.gperf"
330 {"Guides",FH_GUIDES},
331#line 62 "tokens.gperf"
332 {"ImageFill",FH_IMAGEFILL},
333#line 108 "tokens.gperf"
334 {"Rectangle",FH_RECTANGLE},
335#line 26 "tokens.gperf"
336 {"ClipGroup",FH_CLIPGROUP},
337#line 17 "tokens.gperf"
338 {"BendFilter",FH_BENDFILTER},
339#line 49 "tokens.gperf"
340 {"FWBlurFilter",FH_FWBLURFILTER},
341#line 89 "tokens.gperf"
342 {"Oval",FH_OVAL},
343 {(char*)0, 0},
344#line 86 "tokens.gperf"
345 {"NewContourFill",FH_NEWCONTOURFILL},
346#line 58 "tokens.gperf"
347 {"GraphicStyle",FH_GRAPHICSTYLE},
348#line 11 "tokens.gperf"
349 {"AGDFont",FH_AGDFONT},
350#line 42 "tokens.gperf"
351 {"ElemPropLst",FH_ELEMPROPLST},
352 {(char*)0, 0},
353#line 57 "tokens.gperf"
354 {"GradientMaskFilter",FH_GRADIENTMASKFILTER},
355 {(char*)0, 0},
356#line 107 "tokens.gperf"
357 {"RaggedFilter",FH_RAGGEDFILTER},
358#line 88 "tokens.gperf"
359 {"OpacityFilter",FH_OPACITYFILTER},
360#line 40 "tokens.gperf"
361 {"EPSImport",FH_EPSIMPORT},
362#line 123 "tokens.gperf"
363 {"TextBlok",FH_TEXTBLOK},
364#line 19 "tokens.gperf"
365 {"Block",FH_BLOCK},
366 {(char*)0, 0}, {(char*)0, 0},
367#line 21 "tokens.gperf"
368 {"BrushList",FH_BRUSHLIST},
369 {(char*)0, 0},
370#line 13 "tokens.gperf"
371 {"ArrowPath",FH_ARROWPATH},
372 {(char*)0, 0},
373#line 46 "tokens.gperf"
374 {"Extrusion",FH_EXTRUSION},
375#line 133 "tokens.gperf"
376 {"VMpObj",FH_VMPOBJ},
377 {(char*)0, 0}, {(char*)0, 0},
378#line 115 "tokens.gperf"
379 {"SymbolInstance",FH_SYMBOLINSTANCE},
380#line 118 "tokens.gperf"
381 {"TFOnPath",FH_TFONPATH},
382#line 87 "tokens.gperf"
383 {"NewRadialFill",FH_NEWRADIALFILL},
384 {(char*)0, 0}, {(char*)0, 0}, {(char*)0, 0}, {(char*)0, 0},
385#line 113 "tokens.gperf"
386 {"SwfImport",FH_SWFIMPORT},
387 {(char*)0, 0}, {(char*)0, 0}, {(char*)0, 0}, {(char*)0, 0},
388 {(char*)0, 0}, {(char*)0, 0}, {(char*)0, 0}, {(char*)0, 0},
389 {(char*)0, 0},
390#line 12 "tokens.gperf"
391 {"AGDSelection",FH_AGDSELECTION},
392 {(char*)0, 0}, {(char*)0, 0}, {(char*)0, 0}, {(char*)0, 0},
393 {(char*)0, 0},
394#line 18 "tokens.gperf"
395 {"BlendObject",FH_BLENDOBJECT},
396 {(char*)0, 0}, {(char*)0, 0}, {(char*)0, 0}, {(char*)0, 0},
397 {(char*)0, 0}, {(char*)0, 0}, {(char*)0, 0}, {(char*)0, 0},
398 {(char*)0, 0}, {(char*)0, 0},
399#line 85 "tokens.gperf"
400 {"NewBlend",FH_NEWBLEND}
401 };
402
403const struct fhtoken *
404Perfect_Hash::in_word_set (const char *str, size_t len)
405{
406 if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
407 {
408 unsigned int key = hash (str, len);
409
410 if (key <= MAX_HASH_VALUE)
411 {
412 const char *s = wordlist[key].name;
413
414 if (s && *str == *s && !strncmp (str + 1, s + 1, len - 1) && s[len] == '\0')
415 return &wordlist[key];
416 }
417 }
418 return 0;
419}
420#line 135 "tokens.gperf"
421

Generated for libfreehand by doxygen 1.18.0