1 /* C code produced by gperf version 2.7 */
2 /* Command-line: gperf -L C -F , 0, 0 -p -j1 -i 1 -g -o -t -G -N is_reserved_word -k1,3,$ ../../egcs/gcc/c-parse.gperf */
3 /* Command-line: gperf -L C -F ', 0, 0' -p -j1 -i 1 -g -o -t -N is_reserved_word -k1,3,$ c-parse.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 92
15 #define MIN_WORD_LENGTH 2
16 #define MAX_WORD_LENGTH 20
17 #define MIN_HASH_VALUE 17
18 #define MAX_HASH_VALUE 301
19 /* maximum key range = 285, duplicates = 0 */
26 register const char *str
;
27 register unsigned int len
;
29 static unsigned short asso_values
[] =
31 302, 302, 302, 302, 302, 302, 302, 302, 302, 302,
32 302, 302, 302, 302, 302, 302, 302, 302, 302, 302,
33 302, 302, 302, 302, 302, 302, 302, 302, 302, 302,
34 302, 302, 302, 302, 302, 302, 302, 302, 302, 302,
35 302, 302, 302, 302, 302, 302, 302, 302, 302, 302,
36 302, 302, 302, 302, 302, 302, 302, 302, 302, 302,
37 302, 302, 302, 302, 113, 302, 302, 302, 302, 302,
38 302, 302, 302, 302, 302, 302, 302, 302, 302, 302,
39 302, 302, 302, 302, 302, 302, 302, 302, 302, 302,
40 302, 302, 302, 302, 302, 1, 302, 78, 52, 111,
41 34, 9, 46, 59, 1, 20, 302, 1, 118, 17,
42 18, 39, 58, 302, 7, 6, 33, 70, 21, 2,
43 5, 1, 1, 302, 302, 302, 302, 302, 302, 302,
44 302, 302, 302, 302, 302, 302, 302, 302, 302, 302,
45 302, 302, 302, 302, 302, 302, 302, 302, 302, 302,
46 302, 302, 302, 302, 302, 302, 302, 302, 302, 302,
47 302, 302, 302, 302, 302, 302, 302, 302, 302, 302,
48 302, 302, 302, 302, 302, 302, 302, 302, 302, 302,
49 302, 302, 302, 302, 302, 302, 302, 302, 302, 302,
50 302, 302, 302, 302, 302, 302, 302, 302, 302, 302,
51 302, 302, 302, 302, 302, 302, 302, 302, 302, 302,
52 302, 302, 302, 302, 302, 302, 302, 302, 302, 302,
53 302, 302, 302, 302, 302, 302, 302, 302, 302, 302,
54 302, 302, 302, 302, 302, 302, 302, 302, 302, 302,
55 302, 302, 302, 302, 302, 302, 302, 302, 302, 302,
56 302, 302, 302, 302, 302, 302
58 register int hval
= len
;
64 hval
+= asso_values
[(unsigned char)str
[2]];
67 hval
+= asso_values
[(unsigned char)str
[0]];
70 return hval
+ asso_values
[(unsigned char)str
[len
- 1]];
73 static struct resword wordlist
[] =
75 {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
76 {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
77 {"__real__", REALPART
, NORID
},
78 {"__signed__", TYPESPEC
, RID_SIGNED
},
79 {"", 0, 0}, {"", 0, 0},
80 {"__restrict__", TYPE_QUAL
, RID_RESTRICT
},
81 {"", 0, 0}, {"", 0, 0},
82 {"__extension__", EXTENSION
, NORID
},
83 {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
84 {"else", ELSE
, NORID
},
86 {"__imag__", IMAGPART
, NORID
},
88 {"__inline__", SCSPEC
, RID_INLINE
},
89 {"switch", SWITCH
, NORID
},
91 {"__volatile__", TYPE_QUAL
, RID_VOLATILE
},
92 {"while", WHILE
, NORID
},
94 {"__inline", SCSPEC
, RID_INLINE
},
96 {"in", TYPE_QUAL
, RID_IN
},
97 {"__volatile", TYPE_QUAL
, RID_VOLATILE
},
98 {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
99 {"__typeof__", TYPEOF
, NORID
},
100 {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
101 {"__signed", TYPESPEC
, RID_SIGNED
},
103 {"__restrict", TYPE_QUAL
, RID_RESTRICT
},
104 {"struct", STRUCT
, NORID
},
106 {"restrict", TYPE_QUAL
, RID_RESTRICT
},
107 {"oneway", TYPE_QUAL
, RID_ONEWAY
},
108 {"id", OBJECTNAME
, RID_ID
},
109 {"", 0, 0}, {"", 0, 0},
110 {"sizeof", SIZEOF
, NORID
},
111 {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
113 {"return", RETURN
, NORID
},
114 {"__bounded__", TYPE_QUAL
, RID_BOUNDED
},
115 {"extern", SCSPEC
, RID_EXTERN
},
116 {"break", BREAK
, NORID
},
118 {"", 0, 0}, {"", 0, 0},
119 {"__ptrbase__", PTR_BASE
, NORID
},
120 {"__ptrvalue__", PTR_VALUE
, NORID
},
121 {"__ptrextent__", PTR_EXTENT
, NORID
},
125 {"__ptrbase", PTR_BASE
, NORID
},
126 {"__ptrvalue", PTR_VALUE
, NORID
},
127 {"void", TYPESPEC
, RID_VOID
},
129 {"register", SCSPEC
, RID_REGISTER
},
131 {"short", TYPESPEC
, RID_SHORT
},
133 {"__unbounded__", TYPE_QUAL
, RID_UNBOUNDED
},
134 {"__imag", IMAGPART
, NORID
},
135 {"__asm__", ASM_KEYWORD
, NORID
},
136 {"__typeof", TYPEOF
, NORID
},
137 {"int", TYPESPEC
, RID_INT
},
139 {"__alignof__", ALIGNOF
, NORID
},
141 {"__attribute__", ATTRIBUTE
, NORID
},
142 {"", 0, 0}, {"", 0, 0},
143 {"__bounded", TYPE_QUAL
, RID_BOUNDED
},
144 {"inout", TYPE_QUAL
, RID_INOUT
},
146 {"__attribute", ATTRIBUTE
, NORID
},
147 {"enum", ENUM
, NORID
},
148 {"__asm", ASM_KEYWORD
, NORID
},
150 {"__ptrextent", PTR_EXTENT
, NORID
},
152 {"signed", TYPESPEC
, RID_SIGNED
},
153 {"", 0, 0}, {"", 0, 0},
154 {"out", TYPE_QUAL
, RID_OUT
},
156 {"byref", TYPE_QUAL
, RID_BYREF
},
157 {"", 0, 0}, {"", 0, 0},
158 {"union", UNION
, NORID
},
160 {"asm", ASM_KEYWORD
, NORID
},
161 {"__unbounded", TYPE_QUAL
, RID_UNBOUNDED
},
163 {"unsigned", TYPESPEC
, RID_UNSIGNED
},
164 {"double", TYPESPEC
, RID_DOUBLE
},
165 {"default", DEFAULT
, NORID
},
167 {"__const__", TYPE_QUAL
, RID_CONST
},
168 {"float", TYPESPEC
, RID_FLOAT
},
169 {"__complex__", TYPESPEC
, RID_COMPLEX
},
171 {"__complex", TYPESPEC
, RID_COMPLEX
},
173 {"__builtin_va_arg", VA_ARG
, NORID
},
174 {"__label__", LABEL
, NORID
},
175 {"case", CASE
, NORID
},
177 {"__real", REALPART
, NORID
},
178 {"@defs", DEFS
, NORID
},
179 {"__alignof", ALIGNOF
, NORID
},
180 {"goto", GOTO
, NORID
},
182 {"@private", PRIVATE
, NORID
},
183 {"@selector", SELECTOR
, NORID
},
184 {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
185 {"typeof", TYPEOF
, NORID
},
186 {"typedef", SCSPEC
, RID_TYPEDEF
},
188 {"continue", CONTINUE
, NORID
},
189 {"@encode", ENCODE
, NORID
},
190 {"", 0, 0}, {"", 0, 0},
191 {"@interface", INTERFACE
, NORID
},
193 {"__const", TYPE_QUAL
, RID_CONST
},
194 {"inline", SCSPEC
, RID_INLINE
},
195 {"auto", SCSPEC
, RID_AUTO
},
197 {"volatile", TYPE_QUAL
, RID_VOLATILE
},
198 {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
199 {"@implementation", IMPLEMENTATION
, NORID
},
200 {"@protected", PROTECTED
, NORID
},
201 {"", 0, 0}, {"", 0, 0},
202 {"const", TYPE_QUAL
, RID_CONST
},
204 {"@end", END
, NORID
},
205 {"bycopy", TYPE_QUAL
, RID_BYCOPY
},
206 {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
207 {"@compatibility_alias", ALIAS
, NORID
},
208 {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
209 {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
210 {"", 0, 0}, {"", 0, 0},
211 {"long", TYPESPEC
, RID_LONG
},
212 {"char", TYPESPEC
, RID_CHAR
},
213 {"static", SCSPEC
, RID_STATIC
},
214 {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
215 {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
216 {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
217 {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
218 {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
219 {"@class", CLASS
, NORID
},
220 {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
221 {"@protocol", PROTOCOL
, NORID
},
222 {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
223 {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
224 {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
225 {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
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},
228 {"@public", PUBLIC
, NORID
}
235 is_reserved_word (str
, len
)
236 register const char *str
;
237 register unsigned int len
;
239 if (len
<= MAX_WORD_LENGTH
&& len
>= MIN_WORD_LENGTH
)
241 register int key
= hash (str
, len
);
243 if (key
<= MAX_HASH_VALUE
&& key
>= 0)
245 register const char *s
= wordlist
[key
].name
;
247 if (*str
== *s
&& !strcmp (str
+ 1, s
+ 1))
248 return &wordlist
[key
];