1 /* C code produced by gperf version 2.7.1 (19981006 egcs) */
2 /* Command-line: gperf -L C -F , 0, 0 -p -j1 -g -o -t -N is_reserved_word -k1,4,7,$ ../../../gcc/cp/gxx.gperf */
3 /* Command-line: gperf -L C -F ', 0, 0' -p -j1 -g -o -t -N is_reserved_word -k1,4,$,7 gplus.gperf */
4 struct resword
{ const char *name
; short token
; enum rid rid
;};
8 static unsigned int hash
PARAMS ((const char *, unsigned int));
12 struct resword
*is_reserved_word
PARAMS ((const char *, unsigned int));
14 #define TOTAL_KEYWORDS 103
15 #define MIN_WORD_LENGTH 2
16 #define MAX_WORD_LENGTH 16
17 #define MIN_HASH_VALUE 4
18 #define MAX_HASH_VALUE 274
19 /* maximum key range = 271, duplicates = 0 */
26 register const char *str
;
27 register unsigned int len
;
29 static unsigned short asso_values
[] =
31 275, 275, 275, 275, 275, 275, 275, 275, 275, 275,
32 275, 275, 275, 275, 275, 275, 275, 275, 275, 275,
33 275, 275, 275, 275, 275, 275, 275, 275, 275, 275,
34 275, 275, 275, 275, 275, 275, 275, 275, 275, 275,
35 275, 275, 275, 275, 275, 275, 275, 275, 275, 275,
36 275, 275, 275, 275, 275, 275, 275, 275, 275, 275,
37 275, 275, 275, 275, 275, 275, 275, 275, 275, 275,
38 275, 275, 275, 275, 275, 275, 275, 275, 275, 275,
39 275, 275, 275, 275, 275, 275, 275, 275, 275, 275,
40 275, 275, 275, 275, 275, 0, 275, 97, 1, 19,
41 40, 0, 12, 68, 0, 74, 275, 0, 11, 67,
42 27, 0, 70, 6, 96, 43, 6, 37, 3, 10,
43 8, 104, 275, 275, 275, 275, 275, 275, 275, 275,
44 275, 275, 275, 275, 275, 275, 275, 275, 275, 275,
45 275, 275, 275, 275, 275, 275, 275, 275, 275, 275,
46 275, 275, 275, 275, 275, 275, 275, 275, 275, 275,
47 275, 275, 275, 275, 275, 275, 275, 275, 275, 275,
48 275, 275, 275, 275, 275, 275, 275, 275, 275, 275,
49 275, 275, 275, 275, 275, 275, 275, 275, 275, 275,
50 275, 275, 275, 275, 275, 275, 275, 275, 275, 275,
51 275, 275, 275, 275, 275, 275, 275, 275, 275, 275,
52 275, 275, 275, 275, 275, 275, 275, 275, 275, 275,
53 275, 275, 275, 275, 275, 275, 275, 275, 275, 275,
54 275, 275, 275, 275, 275, 275, 275, 275, 275, 275,
55 275, 275, 275, 275, 275, 275, 275, 275, 275, 275,
56 275, 275, 275, 275, 275, 275
58 register int hval
= len
;
64 hval
+= asso_values
[(unsigned char)str
[6]];
68 hval
+= asso_values
[(unsigned char)str
[3]];
72 hval
+= asso_values
[(unsigned char)str
[0]];
75 return hval
+ asso_values
[(unsigned char)str
[len
- 1]];
82 is_reserved_word (str
, len
)
83 register const char *str
;
84 register unsigned int len
;
86 static struct resword wordlist
[] =
88 {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
89 {"else", ELSE
, RID_UNUSED
,},
90 {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
91 {"__real__", REALPART
, RID_UNUSED
},
93 {"true", CXX_TRUE
, RID_UNUSED
,},
94 {"or_eq", ASSIGN
, RID_UNUSED
,},
95 {"export", SCSPEC
, RID_EXPORT
,},
96 {"", 0, 0}, {"", 0, 0},
97 {"__const__", CV_QUALIFIER
, RID_CONST
},
98 {"__volatile", CV_QUALIFIER
, RID_VOLATILE
},
99 {"__real", REALPART
, RID_UNUSED
},
100 {"__volatile__", CV_QUALIFIER
, RID_VOLATILE
},
101 {"__const", CV_QUALIFIER
, RID_CONST
},
102 {"xor_eq", ASSIGN
, RID_UNUSED
,},
103 {"throw", THROW
, RID_UNUSED
,},
104 {"__complex__", TYPESPEC
, RID_COMPLEX
},
105 {"case", CASE
, RID_UNUSED
,},
106 {"typeof", TYPEOF
, RID_UNUSED
,},
108 {"while", WHILE
, RID_UNUSED
,},
109 {"bool", TYPESPEC
, RID_BOOL
,},
110 {"__complex", TYPESPEC
, RID_COMPLEX
},
111 {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
112 {"extern", SCSPEC
, RID_EXTERN
,},
113 {"", 0, 0}, {"", 0, 0},
114 {"not", '!', RID_UNUSED
,},
115 {"typedef", SCSPEC
, RID_TYPEDEF
,},
116 {"virtual", SCSPEC
, RID_VIRTUAL
,},
117 {"not_eq", EQCOMPARE
, RID_UNUSED
,},
118 {"new", NEW
, RID_UNUSED
,},
120 {"do", DO
, RID_UNUSED
,},
121 {"catch", CATCH
, RID_UNUSED
,},
122 {"", 0, 0}, {"", 0, 0},
123 {"delete", DELETE
, RID_UNUSED
,},
124 {"double", TYPESPEC
, RID_DOUBLE
,},
125 {"__extension__", EXTENSION
, RID_UNUSED
},
126 {"__alignof__", ALIGNOF
, RID_UNUSED
},
127 {"__asm__", ASM_KEYWORD
, RID_UNUSED
},
129 {"typeid", TYPEID
, RID_UNUSED
,},
131 {"__null", CONSTANT
, RID_NULL
},
132 {"switch", SWITCH
, RID_UNUSED
,},
133 {"", 0, 0}, {"", 0, 0},
134 {"friend", SCSPEC
, RID_FRIEND
,},
135 {"__alignof", ALIGNOF
, RID_UNUSED
},
136 {"false", CXX_FALSE
, RID_UNUSED
,},
137 {"sizeof", SIZEOF
, RID_UNUSED
,},
138 {"__inline", SCSPEC
, RID_INLINE
},
140 {"__inline__", SCSPEC
, RID_INLINE
},
142 {"static_cast", STATIC_CAST
, RID_UNUSED
,},
143 {"", 0, 0}, {"", 0, 0},
144 {"union", AGGR
, RID_UNION
,},
145 {"continue", CONTINUE
, RID_UNUSED
,},
147 {"goto", GOTO
, RID_UNUSED
,},
148 {"const", CV_QUALIFIER
, RID_CONST
,},
149 {"static", SCSPEC
, RID_STATIC
,},
150 {"__imag__", IMAGPART
, RID_UNUSED
},
151 {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
152 {"private", VISSPEC
, RID_PRIVATE
,},
153 {"typename", TYPENAME_KEYWORD
, RID_UNUSED
,},
155 {"int", TYPESPEC
, RID_INT
,},
156 {"__signed__", TYPESPEC
, RID_SIGNED
},
157 {"", 0, 0}, {"", 0, 0},
158 {"void", TYPESPEC
, RID_VOID
,},
159 {"if", IF
, RID_UNUSED
,},
161 {"template", TEMPLATE
, RID_TEMPLATE
,},
162 {"__attribute", ATTRIBUTE
, RID_UNUSED
},
163 {"struct", AGGR
, RID_RECORD
,},
164 {"__attribute__", ATTRIBUTE
, RID_UNUSED
},
165 {"", 0, 0}, {"", 0, 0},
166 {"this", THIS
, RID_UNUSED
,},
167 {"const_cast", CONST_CAST
, RID_UNUSED
,},
168 {"or", OROR
, RID_UNUSED
,},
169 {"explicit", SCSPEC
, RID_EXPLICIT
,},
171 {"auto", SCSPEC
, RID_AUTO
,},
172 {"bitor", '|', RID_UNUSED
,},
173 {"break", BREAK
, RID_UNUSED
,},
175 {"compl", '~', RID_UNUSED
,},
176 {"public", VISSPEC
, RID_PUBLIC
,},
177 {"xor", '^', RID_UNUSED
,},
178 {"__restrict__", CV_QUALIFIER
, RID_RESTRICT
},
179 {"and_eq", ASSIGN
, RID_UNUSED
,},
180 {"class", AGGR
, RID_CLASS
,},
181 {"for", FOR
, RID_UNUSED
,},
182 {"__restrict", CV_QUALIFIER
, RID_RESTRICT
},
183 {"try", TRY
, RID_UNUSED
,},
184 {"__typeof__", TYPEOF
, RID_UNUSED
},
185 {"__asm", ASM_KEYWORD
, RID_UNUSED
},
186 {"signed", TYPESPEC
, RID_SIGNED
,},
187 {"__label__", LABEL
, RID_UNUSED
},
189 {"volatile", CV_QUALIFIER
, RID_VOLATILE
,},
190 {"float", TYPESPEC
, RID_FLOAT
,},
192 {"__signed", TYPESPEC
, RID_SIGNED
},
194 {"__typeof", TYPEOF
, RID_UNUSED
},
195 {"", 0, 0}, {"", 0, 0},
196 {"__builtin_va_arg", VA_ARG
, RID_UNUSED
},
197 {"", 0, 0}, {"", 0, 0},
198 {"__wchar_t", TYPESPEC
, RID_WCHAR
/* Unique to ANSI C++ */,},
199 {"protected", VISSPEC
, RID_PROTECTED
,},
201 {"namespace", NAMESPACE
, RID_UNUSED
,},
202 {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
203 {"using", USING
, RID_UNUSED
,},
204 {"enum", ENUM
, RID_UNUSED
,},
206 {"and", ANDAND
, RID_UNUSED
,},
207 {"__imag", IMAGPART
, RID_UNUSED
},
208 {"", 0, 0}, {"", 0, 0},
209 {"bitand", '&', RID_UNUSED
,},
210 {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
211 {"short", TYPESPEC
, RID_SHORT
,},
212 {"long", TYPESPEC
, RID_LONG
,},
213 {"", 0, 0}, {"", 0, 0},
214 {"inline", SCSPEC
, RID_INLINE
,},
216 {"default", DEFAULT
, RID_UNUSED
,},
217 {"", 0, 0}, {"", 0, 0},
218 {"unsigned", TYPESPEC
, RID_UNSIGNED
,},
219 {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
220 {"return", RETURN_KEYWORD
, RID_UNUSED
,},
221 {"asm", ASM_KEYWORD
, RID_UNUSED
,},
222 {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
223 {"mutable", SCSPEC
, RID_MUTABLE
,},
224 {"", 0, 0}, {"", 0, 0},
225 {"dynamic_cast", DYNAMIC_CAST
, RID_UNUSED
,},
226 {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
227 {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
228 {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
229 {"operator", OPERATOR
, RID_UNUSED
,},
230 {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
231 {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
232 {"char", TYPESPEC
, RID_CHAR
,},
233 {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
234 {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
235 {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
236 {"reinterpret_cast", REINTERPRET_CAST
, RID_UNUSED
,},
237 {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
238 {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
239 {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
240 {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
241 {"register", SCSPEC
, RID_REGISTER
,}
244 if (len
<= MAX_WORD_LENGTH
&& len
>= MIN_WORD_LENGTH
)
246 register int key
= hash (str
, len
);
248 if (key
<= MAX_HASH_VALUE
&& key
>= 0)
250 register const char *s
= wordlist
[key
].name
;
252 if (*str
== *s
&& !strcmp (str
+ 1, s
+ 1))
253 return &wordlist
[key
];