Skip to content
This repository
Newer
Older
100644 203 lines (192 sloc) 6.76 kb
5babd92c »
2008-02-25 adding bridgesupport files, and build them only if BridgeSupport.fram…
1 /* ANSI-C code produced by gperf version 3.0.1 */
2 /* Command-line: gperf --switch=1 --language=ANSI-C --struct-type -N bs_xml_element bs.gperf */
3 /* Computed positions: -k'1' */
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-gnu-gperf@gnu.org>."
30 #endif
31
32 #line 1 "bs.gperf"
33 struct bs_xml_atom { char *name; int val; };
34
35 #define TOTAL_KEYWORDS 14
36 #define MIN_WORD_LENGTH 3
37 #define MAX_WORD_LENGTH 17
38 #define MIN_HASH_VALUE 3
39 #define MAX_HASH_VALUE 25
40 /* maximum key range = 23, duplicates = 0 */
41
42 #ifdef __GNUC__
43 __inline
44 #else
45 #ifdef __cplusplus
46 inline
47 #endif
48 #endif
49 static unsigned int
50 hash (register const char *str, register unsigned int len)
51 {
52 static unsigned char asso_values[] =
53 {
54 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
55 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
56 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
57 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
58 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
59 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
60 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
61 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
62 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
63 26, 26, 26, 26, 26, 26, 26, 0, 26, 5,
64 15, 0, 0, 26, 26, 0, 26, 26, 26, 14,
65 26, 15, 26, 26, 10, 0, 26, 26, 26, 26,
66 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
67 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
68 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
69 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
70 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
71 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
72 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
73 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
74 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
75 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
76 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
77 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
78 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
79 26, 26, 26, 26, 26, 26
80 };
81 return len + asso_values[(unsigned char)str[0]];
82 }
83
84 #ifdef __GNUC__
5f2ea727 »
2009-08-11 fixed compilation on Leopard
85 static __inline
5babd92c »
2008-02-25 adding bridgesupport files, and build them only if BridgeSupport.fram…
86 #endif
87 struct bs_xml_atom *
88 bs_xml_element (register const char *str, register unsigned int len)
89 {
90 static struct bs_xml_atom wordlist[] =
91 {
92 #line 7 "bs.gperf"
93 {"arg", 5 },
94 #line 4 "bs.gperf"
95 {"enum", 2 },
96 #line 5 "bs.gperf"
97 {"struct", 3 },
98 #line 9 "bs.gperf"
99 {"function", 7},
100 #line 10 "bs.gperf"
101 {"class", 8},
102 #line 12 "bs.gperf"
103 {"cftype", 10},
104 #line 3 "bs.gperf"
105 {"constant", 1},
106 #line 14 "bs.gperf"
107 {"function_alias", 12},
108 #line 15 "bs.gperf"
109 {"string_constant", 13},
110 #line 8 "bs.gperf"
111 {"retval", 6},
112 #line 6 "bs.gperf"
113 {"informal_protocol", 4},
114 #line 11 "bs.gperf"
115 {"method", 9 },
116 #line 13 "bs.gperf"
117 {"opaque", 11},
118 #line 16 "bs.gperf"
119 {"depends_on", 14}
120 };
121
122 if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
123 {
124 register int key = hash (str, len);
125
126 if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE)
127 {
128 register struct bs_xml_atom *resword;
129
130 switch (key - 3)
131 {
132 case 0:
133 resword = &wordlist[0];
134 goto compare;
135 case 1:
136 resword = &wordlist[1];
137 goto compare;
138 case 3:
139 resword = &wordlist[2];
140 goto compare;
141 case 5:
142 resword = &wordlist[3];
143 goto compare;
144 case 7:
145 resword = &wordlist[4];
146 goto compare;
147 case 8:
148 resword = &wordlist[5];
149 goto compare;
150 case 10:
151 resword = &wordlist[6];
152 goto compare;
153 case 11:
154 resword = &wordlist[7];
155 goto compare;
156 case 12:
157 resword = &wordlist[8];
158 goto compare;
159 case 13:
160 resword = &wordlist[9];
161 goto compare;
162 case 14:
163 resword = &wordlist[10];
164 goto compare;
165 case 17:
166 resword = &wordlist[11];
167 goto compare;
168 case 18:
169 resword = &wordlist[12];
170 goto compare;
171 case 22:
172 resword = &wordlist[13];
173 goto compare;
174 }
175 return 0;
176 compare:
177 {
178 register const char *s = resword->name;
179
180 if (*str == *s && !strcmp (str + 1, s + 1))
181 return resword;
182 }
183 }
184 }
185 return 0;
186 }
187 #line 17 "bs.gperf"
188
189 #define BS_XML_CONSTANT 1
190 #define BS_XML_ENUM 2
191 #define BS_XML_STRUCT 3
192 #define BS_XML_INFORMAL_PROTOCOL 4
193 #define BS_XML_ARG 5
194 #define BS_XML_RETVAL 6
195 #define BS_XML_FUNCTION 7
196 #define BS_XML_CLASS 8
197 #define BS_XML_METHOD 9
198 #define BS_XML_CFTYPE 10
199 #define BS_XML_OPAQUE 11
200 #define BS_XML_FUNCTION_ALIAS 12
201 #define BS_XML_STRING_CONSTANT 13
202 #define BS_XML_DEPENDS_ON 14
Something went wrong with that request. Please try again.