1 /* C++ code produced by gperf version 3.0.1 */
2 /* Command-line: gperf -C -t -l -L C++ -m 20 -Z PdfKeywordHash keyword_list */
3 /* Computed positions: -k'4-5,$' */
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-gnu-gperf@gnu.org>."
32 #line 1 "keyword_list"
33 struct hash_entry
{ const char* name
; enum parseKey eKey
; };
36 #pragma GCC system_header
39 #define TOTAL_KEYWORDS 46
40 #define MIN_WORD_LENGTH 7
41 #define MAX_WORD_LENGTH 19
42 #define MIN_HASH_VALUE 8
43 #define MAX_HASH_VALUE 68
44 /* maximum key range = 61, duplicates = 0 */
49 static inline unsigned int hash (const char *str
, unsigned int len
);
51 static const struct hash_entry
*in_word_set (const char *str
, unsigned int len
);
55 PdfKeywordHash::hash (register const char *str
, register unsigned int len
)
57 static const unsigned char asso_values
[] =
59 69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
60 69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
61 69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
62 69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
63 69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
64 69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
65 69, 69, 69, 69, 69, 69, 9, 69, 38, 69,
66 1, 69, 69, 69, 31, 69, 16, 35, 21, 69,
67 15, 0, 69, 21, 15, 69, 69, 69, 69, 69,
68 69, 69, 69, 69, 69, 69, 69, 0, 15, 69,
69 69, 5, 8, 69, 4, 8, 0, 20, 2, 27,
70 11, 31, 0, 69, 0, 9, 0, 5, 69, 5,
71 69, 13, 69, 69, 69, 69, 69, 69, 69, 69,
72 69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
73 69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
74 69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
75 69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
76 69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
77 69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
78 69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
79 69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
80 69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
81 69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
82 69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
83 69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
84 69, 69, 69, 69, 69, 69, 69
86 return len
+ asso_values
[(unsigned char)str
[4]+1] + asso_values
[(unsigned char)str
[3]] + asso_values
[(unsigned char)str
[len
- 1]];
89 const struct hash_entry
*
90 PdfKeywordHash::in_word_set (register const char *str
, register unsigned int len
)
92 static const unsigned char lengthtable
[] =
94 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 8, 12,
95 8, 10, 10, 12, 13, 9, 15, 16, 17, 14, 15, 15, 10, 13,
96 14, 15, 14, 11, 12, 9, 9, 17, 13, 19, 11, 8, 14, 9,
97 7, 9, 19, 17, 15, 10, 13, 10, 9, 8, 17, 12, 8, 0,
98 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 8
100 static const struct hash_entry wordlist
[] =
102 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
103 #line 29 "keyword_list"
106 #line 8 "keyword_list"
107 {"clipPath",CLIPPATH
},
108 #line 28 "keyword_list"
109 {"setFillColor",SETFILLCOLOR
},
110 #line 19 "keyword_list"
111 {"fillPath",FILLPATH
},
112 #line 46 "keyword_list"
113 {"updateFont",UPDATEFONT
},
114 #line 17 "keyword_list"
115 {"eoClipPath",EOCLIPPATH
},
116 #line 25 "keyword_list"
117 {"restoreState",RESTORESTATE
},
118 #line 47 "keyword_list"
119 {"updateLineCap",UPDATELINECAP
},
120 #line 39 "keyword_list"
121 {"startPage",STARTPAGE
},
122 #line 43 "keyword_list"
123 {"updateFillColor",UPDATEFILLCOLOR
},
124 #line 51 "keyword_list"
125 {"updateMiterLimit",UPDATEMITERLIMIT
},
126 #line 52 "keyword_list"
127 {"updateStrokeColor",UPDATESTROKECOLOR
},
128 #line 48 "keyword_list"
129 {"updateLineDash",UPDATELINEDASH
},
130 #line 50 "keyword_list"
131 {"updateLineWidth",UPDATELINEWIDTH
},
132 #line 41 "keyword_list"
133 {"updateBlendMode",UPDATEBLENDMODE
},
134 #line 30 "keyword_list"
135 {"setLineCap",SETLINECAP
},
136 #line 21 "keyword_list"
137 {"intersectClip",INTERSECTCLIP
},
138 #line 45 "keyword_list"
139 {"updateFlatness",UPDATEFLATNESS
},
140 #line 22 "keyword_list"
141 {"intersectEoClip",INTERSECTEOCLIP
},
142 #line 49 "keyword_list"
143 {"updateLineJoin",UPDATELINEJOIN
},
144 #line 31 "keyword_list"
145 {"setLineDash",SETLINEDASH
},
146 #line 33 "keyword_list"
147 {"setLineWidth",SETLINEWIDTH
},
148 #line 24 "keyword_list"
149 {"pushState",PUSHSTATE
},
150 #line 26 "keyword_list"
151 {"saveState",SAVESTATE
},
152 #line 44 "keyword_list"
153 {"updateFillOpacity",UPDATEFILLOPACITY
},
154 #line 16 "keyword_list"
155 {"endTextObject",ENDTEXTOBJECT
},
156 #line 53 "keyword_list"
157 {"updateStrokeOpacity",UPDATESTROKEOPACITY
},
158 #line 32 "keyword_list"
159 {"setLineJoin",SETLINEJOIN
},
160 #line 23 "keyword_list"
161 {"popState",POPSTATE
},
162 #line 36 "keyword_list"
163 {"setStrokeColor",SETSTROKECOLOR
},
164 #line 42 "keyword_list"
165 {"updateCtm",UPDATECTM
},
166 #line 15 "keyword_list"
168 #line 20 "keyword_list"
169 {"hyperLink",HYPERLINK
},
170 #line 14 "keyword_list"
171 {"drawSoftMaskedImage",DRAWSOFTMASKEDIMAGE
},
172 #line 37 "keyword_list"
173 {"setTextRenderMode",SETTEXTRENDERMODE
},
174 #line 13 "keyword_list"
175 {"drawMaskedImage",DRAWMASKEDIMAGE
},
176 #line 40 "keyword_list"
177 {"strokePath",STROKEPATH
},
178 #line 34 "keyword_list"
179 {"setMiterLimit",SETMITERLIMIT
},
180 #line 18 "keyword_list"
181 {"eoFillPath",EOFILLPATH
},
182 #line 10 "keyword_list"
183 {"drawImage",DRAWIMAGE
},
184 #line 9 "keyword_list"
185 {"drawChar",DRAWCHAR
},
186 #line 38 "keyword_list"
187 {"setTransformation",SETTRANSFORMATION
},
188 #line 27 "keyword_list"
189 {"setBlendMode",SETBLENDMODE
},
190 #line 12 "keyword_list"
191 {"drawMask",DRAWMASK
},
192 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
194 #line 35 "keyword_list"
195 {"setPageNum",SETPAGENUM
},
196 #line 11 "keyword_list"
197 {"drawLink",DRAWLINK
}
200 if (len
<= MAX_WORD_LENGTH
&& len
>= MIN_WORD_LENGTH
)
202 register int key
= hash (str
, len
);
204 if (key
<= MAX_HASH_VALUE
&& key
>= 0)
205 if (len
== lengthtable
[key
])
207 register const char *s
= wordlist
[key
].name
;
209 if (*str
== *s
&& !memcmp (str
+ 1, s
+ 1, len
- 1))
210 return &wordlist
[key
];