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

Generated for libfreehand by doxygen 1.11.0