1 /* C code produced by gperf version
2.8 (ACE version
) */
2 /* Command
-line
: ..
/src
/gperf
-p
-j
1 -o
-a
-C
-g
-t
-k1
,4,$
*/
3 /* Command
-line
: gperf
-p
-j1
-o
-t
-N is_reserved_word
-k1
,4,$ gplus.gperf
*/
5 struct resword
{ const char
*name; short token
; enum rid rid
;};
7 #
define TOTAL_KEYWORDS
71
8 #
define MIN_WORD_LENGTH
2
9 #
define MAX_WORD_LENGTH
13
10 #
define MIN_HASH_VALUE
4
11 #
define MAX_HASH_VALUE
147
12 #
define HASH_VALUE_RANGE
144
14 #
define WORDLIST_SIZE
75
18 hash
(const char
*str
, unsigned
int len
)
20 static const unsigned char asso_values
[] =
23 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
24 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
25 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
26 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
27 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
28 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
29 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
30 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
31 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
32 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
33 148, 148, 148, 148, 148, 148, 148, 148, 148, 0,
34 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
35 148, 148, 148, 148, 148, 148, 148, 148, 148, 19,
36 6, 27, 37, 0, 12, 1, 15, 63, 148, 148,
37 148, 148, 148, 148, 148, 148, 4, 0, 56, 20,
38 15, 42, 148, 31, 148, 148, 148, 148, 148, 148,
39 148, 148, 5, 26, 39, 32, 10, 148, 40, 148,
40 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
41 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
42 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
43 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
44 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
45 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
46 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
47 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
48 148, 148, 148, 148, 148, 148,
50 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
51 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
52 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
53 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
54 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
55 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
56 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
57 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
58 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
59 148, 148, 148, 148, 148, 0, 148, 19, 6, 27,
60 37, 0, 12, 1, 15, 63, 148, 4, 0, 56,
61 20, 15, 42, 148, 31, 5, 26, 39, 32, 10,
62 148, 40, 148, 148, 148, 148, 148, 148,
65 unsigned
int hval
= len
;
71 hval
+= asso_values
[(int) str
[3]];
75 hval
+= asso_values
[(int) str
[0]];
77 return hval
+ asso_values
[(int) str
[len
- 1]];
81 const struct resword
*
82 in_word_set
(const char
*str
, unsigned
int len
)
84 static const struct resword wordlist
[] =
86 {"",},{"",},{"",},{"",},
87 {"else", ELSE, NORID,},
89 {"long", TYPESPEC, RID_LONG,},
90 {"",},{"",},{"",},{"",},
91 {"__alignof__", ALIGNOF, NORID},
92 {"__asm__", ASM, NORID},
94 {"while", WHILE, NORID,},
95 {"",},{"",},{"",},{"",},{"",},
96 {"__alignof", ALIGNOF, NORID},
97 {"all", ALL, NORID /* Extension */,},
98 {"sizeof", SIZEOF, NORID,},
99 {"__const__", TYPE_QUAL, RID_CONST},
100 {"__volatile", TYPE_QUAL, RID_VOLATILE},
101 {"extern", SCSPEC, RID_EXTERN,},
102 {"__volatile__", TYPE_QUAL, RID_VOLATILE},
103 {"__inline", SCSPEC, RID_INLINE},
104 {"exception", AGGR, RID_EXCEPTION /* Extension */,},
105 {"__inline__", SCSPEC, RID_INLINE},
106 {"case", CASE, NORID,},
107 {"except", EXCEPT, NORID /* Extension */,},
108 {"new", NEW, NORID,},
109 {"break", BREAK, NORID,},
110 {"goto", GOTO, NORID,},
112 {"__attribute", ATTRIBUTE, NORID},
114 {"__attribute__", ATTRIBUTE, NORID},
115 {"this", THIS, NORID,},
116 {"raise", RAISE, NORID /* Extension */,},
117 {"class", AGGR, RID_CLASS,},
118 {"delete", DELETE, NORID,},
119 {"typeof", TYPEOF, NORID,},
120 {"typedef", SCSPEC, RID_TYPEDEF,},
121 {"for", FOR, NORID,},
122 {"raises", RAISES, NORID /* Extension */,},
123 {"__const", TYPE_QUAL, RID_CONST},
124 {"double", TYPESPEC, RID_DOUBLE,},
125 {"__typeof__", TYPEOF, NORID},
127 {"switch", SWITCH, NORID,},
128 {"auto", SCSPEC, RID_AUTO,},
130 {"friend", SCSPEC, RID_FRIEND,},
132 {"reraise", RERAISE, NORID /* Extension */,},
134 {"volatile", TYPE_QUAL, RID_VOLATILE,},
135 {"__typeof", TYPEOF, NORID},
136 {"continue", CONTINUE, NORID,},
137 {"float", TYPESPEC, RID_FLOAT,},
138 {"const", TYPE_QUAL, RID_CONST,},
139 {"static", SCSPEC, RID_STATIC,},
140 {"virtual", SCSPEC, RID_VIRTUAL,},
141 {"__asm", ASM, NORID},
142 {"short", TYPESPEC, RID_SHORT,},
143 {"signed", TYPESPEC, RID_SIGNED,},
144 {"try", TRY, NORID /* Extension */,},
146 {"__signed__", TYPESPEC, RID_SIGNED},
147 {"catch", CATCH, NORID,},
148 {"public", PUBLIC, NORID,},
149 {"struct", AGGR, RID_RECORD,},
151 {"asm", ASM, NORID,},
152 {"union", AGGR, RID_UNION,},
154 {"private", PRIVATE, NORID,},
156 {"operator", OPERATOR, NORID,},
158 {"default", DEFAULT, NORID,},
159 {"dynamic", DYNAMIC, NORID,},
160 {"overload", OVERLOAD, NORID,},
161 {"int", TYPESPEC, RID_INT,},
162 {"char", TYPESPEC, RID_CHAR,},
164 {"return", RETURN, NORID,},
165 {"",},{"",},{"",},{"",},{"",},{"",},{"",},{"",},{"",},
167 {"__signed", TYPESPEC, RID_SIGNED},
169 {"void", TYPESPEC, RID_VOID,},
171 {"protected", PROTECTED, NORID,},
173 {"enum", ENUM, NORID,},
174 {"",},{"",},{"",},{"",},{"",},{"",},{"",},{"",},{"",},
175 {"",},{"",},{"",},{"",},{"",},{"",},
176 {"inline", SCSPEC, RID_INLINE,},
177 {"register", SCSPEC, RID_REGISTER,},
178 {"",},{"",},{"",},{"",},{"",},{"",},{"",},{"",},{"",},
179 {"",},{"",},{"",},{"",},
180 {"unsigned", TYPESPEC, RID_UNSIGNED,},
183 if (len
<= MAX_WORD_LENGTH
&& len
>= MIN_WORD_LENGTH
)
185 unsigned
int key = hash
(str
, len
);
187 if (key <= MAX_HASH_VALUE
&& key >= MIN_HASH_VALUE
)
189 const char
*s
= wordlist
[key].
name;
191 if (*str
== *s
&& !strcmp
(str
+ 1, s
+ 1))
192 return &wordlist
[key];