Go to the documentation of this file.
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>."
39#define TOTAL_KEYWORDS 33
40#define MIN_WORD_LENGTH 1
41#define MAX_WORD_LENGTH 12
42#define MIN_HASH_VALUE 1
43#define MAX_HASH_VALUE 33
44/* maximum key range = 33, duplicates = 0 */
49 static inline unsigned int hash (const char *str, size_t len);
51 static const struct xmltoken *in_word_set (const char *str, size_t len);
55Perfect_Hash::hash (const char *str, size_t len)
57 static const unsigned char asso_values[] =
59 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
60 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
61 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
62 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
63 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
64 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
65 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
66 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
67 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
68 34, 34, 34, 34, 34, 34, 34, 1, 0, 14,
69 27, 3, 5, 21, 23, 0, 34, 34, 26, 8,
70 19, 17, 2, 34, 2, 6, 12, 34, 12, 18,
71 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
72 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
73 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
74 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
75 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
76 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
77 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
78 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
79 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
80 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
81 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
82 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
83 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
84 34, 34, 34, 34, 34, 34
86 unsigned int hval = len;
91 hval += asso_values[static_cast<unsigned char>(str[1])];
92#if (defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang__ && __clang_major__ + (__clang_minor__ >= 9) > 3))) || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 202000L && ((defined __GNUC__ && __GNUC__ >= 10) || (defined __clang__ && __clang_major__ >= 9)))
94#elif (defined __GNUC__ && __GNUC__ >= 7) || (defined __clang__ && __clang_major__ >= 10)
95 __attribute__ ((__fallthrough__));
99 hval += asso_values[static_cast<unsigned char>(str[0])];
105#if (defined __GNUC__ && __GNUC__ + (__GNUC_MINOR__ >= 6) > 4) || (defined __clang__ && __clang_major__ >= 3)
106#pragma GCC diagnostic push
107#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
109static const struct xmltoken wordlist[] =
112#line 27 "tokens.gperf"
114#line 11 "tokens.gperf"
116#line 35 "tokens.gperf"
118#line 15 "tokens.gperf"
120#line 37 "tokens.gperf"
122#line 22 "tokens.gperf"
124#line 39 "tokens.gperf"
126#line 12 "tokens.gperf"
127 {"abiword",XML_ABIWORD},
128#line 33 "tokens.gperf"
130#line 23 "tokens.gperf"
132#line 36 "tokens.gperf"
133 {"pagesize",XML_PAGESIZE},
134#line 25 "tokens.gperf"
136#line 29 "tokens.gperf"
138#line 38 "tokens.gperf"
139 {"revisions",XML_REVISIONS},
140#line 16 "tokens.gperf"
142#line 40 "tokens.gperf"
143 {"section",XML_SECTION},
144#line 17 "tokens.gperf"
146#line 42 "tokens.gperf"
148#line 34 "tokens.gperf"
149 {"metadata",XML_METADATA},
150#line 30 "tokens.gperf"
152#line 18 "tokens.gperf"
154#line 43 "tokens.gperf"
155 {"version",XML_VERSION},
156#line 13 "tokens.gperf"
158#line 41 "tokens.gperf"
159 {"styles",XML_STYLES},
160#line 14 "tokens.gperf"
161 {"bookmark",XML_BOOKMARK},
162#line 24 "tokens.gperf"
164#line 31 "tokens.gperf"
166#line 19 "tokens.gperf"
168#line 21 "tokens.gperf"
169 {"endnote",XML_ENDNOTE},
170#line 26 "tokens.gperf"
171 {"history",XML_HISTORY},
172#line 32 "tokens.gperf"
174#line 20 "tokens.gperf"
176#line 28 "tokens.gperf"
177 {"ignoredwords",XML_IGNOREDWORDS}
179#if (defined __GNUC__ && __GNUC__ + (__GNUC_MINOR__ >= 6) > 4) || (defined __clang__ && __clang_major__ >= 3)
180#pragma GCC diagnostic pop
183const struct xmltoken *
184Perfect_Hash::in_word_set (const char *str, size_t len)
186 if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
188 unsigned int key = hash (str, len);
190 if (key <= MAX_HASH_VALUE)
192 const char *s = wordlist[key].name;
194 if (s && *str == *s && !strncmp (str + 1, s + 1, len - 1) && s[len] == '\0')
195 return &wordlist[key];
198 return static_cast<struct xmltoken *> (0);
200#line 44 "tokens.gperf"
Generated for libwpd by
doxygen 1.14.0