OSDN Git Service

* fix-header.c (read_scan_file): Macro expansion is not a file buffer.
[pf3gnuchains/gcc-fork.git] / gcc / c-gperf.h
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; };
5 #ifdef __GNUC__
6 __inline
7 #endif
8 static unsigned int hash PARAMS ((const char *, unsigned int));
9 #ifdef __GNUC__
10 __inline
11 #endif
12 struct resword *is_reserved_word PARAMS ((const char *, unsigned int));
13
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 */
20
21 #ifdef __GNUC__
22 __inline
23 #endif
24 static unsigned int
25 hash (str, len)
26      register const char *str;
27      register unsigned int len;
28 {
29   static unsigned short asso_values[] =
30     {
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
57     };
58   register int hval = len;
59
60   switch (hval)
61     {
62       default:
63       case 3:
64         hval += asso_values[(unsigned char)str[2]];
65       case 2:
66       case 1:
67         hval += asso_values[(unsigned char)str[0]];
68         break;
69     }
70   return hval + asso_values[(unsigned char)str[len - 1]];
71 }
72
73 static struct resword wordlist[] =
74   {
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},
85     {"", 0, 0},
86     {"__imag__", IMAGPART, NORID},
87     {"", 0, 0},
88     {"__inline__", SCSPEC, RID_INLINE},
89     {"switch", SWITCH, NORID},
90     {"", 0, 0},
91     {"__volatile__", TYPE_QUAL, RID_VOLATILE},
92     {"while", WHILE, NORID},
93     {"", 0, 0},
94     {"__inline", SCSPEC, RID_INLINE},
95     {"", 0, 0},
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},
102     {"", 0, 0},
103     {"__restrict", TYPE_QUAL, RID_RESTRICT},
104     {"struct", STRUCT, NORID},
105     {"", 0, 0},
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},
112     {"for", FOR, NORID},
113     {"return", RETURN, NORID},
114     {"__bounded__", TYPE_QUAL, RID_BOUNDED},
115     {"extern", SCSPEC, RID_EXTERN},
116     {"break", BREAK, NORID},
117     {"if", IF, NORID},
118     {"", 0, 0}, {"", 0, 0},
119     {"__ptrbase__", PTR_BASE, NORID},
120     {"__ptrvalue__", PTR_VALUE, NORID},
121     {"__ptrextent__", PTR_EXTENT, NORID},
122     {"", 0, 0},
123     {"do", DO, NORID},
124     {"", 0, 0},
125     {"__ptrbase", PTR_BASE, NORID},
126     {"__ptrvalue", PTR_VALUE, NORID},
127     {"void", TYPESPEC, RID_VOID},
128     {"", 0, 0},
129     {"register", SCSPEC, RID_REGISTER},
130     {"", 0, 0},
131     {"short", TYPESPEC, RID_SHORT},
132     {"", 0, 0},
133     {"__unbounded__", TYPE_QUAL, RID_UNBOUNDED},
134     {"__imag", IMAGPART, NORID},
135     {"__asm__", ASM_KEYWORD, NORID},
136     {"__typeof", TYPEOF, NORID},
137     {"int", TYPESPEC, RID_INT},
138     {"", 0, 0},
139     {"__alignof__", ALIGNOF, NORID},
140     {"", 0, 0},
141     {"__attribute__", ATTRIBUTE, NORID},
142     {"", 0, 0}, {"", 0, 0},
143     {"__bounded", TYPE_QUAL, RID_BOUNDED},
144     {"inout", TYPE_QUAL, RID_INOUT},
145     {"", 0, 0},
146     {"__attribute", ATTRIBUTE, NORID},
147     {"enum", ENUM, NORID},
148     {"__asm", ASM_KEYWORD, NORID},
149     {"", 0, 0},
150     {"__ptrextent", PTR_EXTENT, NORID},
151     {"", 0, 0},
152     {"signed", TYPESPEC, RID_SIGNED},
153     {"", 0, 0}, {"", 0, 0},
154     {"out", TYPE_QUAL, RID_OUT},
155     {"", 0, 0},
156     {"byref", TYPE_QUAL, RID_BYREF},
157     {"", 0, 0}, {"", 0, 0},
158     {"union", UNION, NORID},
159     {"", 0, 0},
160     {"asm", ASM_KEYWORD, NORID},
161     {"__unbounded", TYPE_QUAL, RID_UNBOUNDED},
162     {"", 0, 0},
163     {"unsigned", TYPESPEC, RID_UNSIGNED},
164     {"double", TYPESPEC, RID_DOUBLE},
165     {"default", DEFAULT, NORID},
166     {"", 0, 0},
167     {"__const__", TYPE_QUAL, RID_CONST},
168     {"float", TYPESPEC, RID_FLOAT},
169     {"__complex__", TYPESPEC, RID_COMPLEX},
170     {"", 0, 0},
171     {"__complex", TYPESPEC, RID_COMPLEX},
172     {"", 0, 0},
173     {"__builtin_va_arg", VA_ARG, NORID},
174     {"__label__", LABEL, NORID},
175     {"case", CASE, NORID},
176     {"", 0, 0},
177     {"__real", REALPART, NORID},
178     {"@defs", DEFS, NORID},
179     {"__alignof", ALIGNOF, NORID},
180     {"goto", GOTO, NORID},
181     {"", 0, 0},
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},
187     {"", 0, 0},
188     {"continue", CONTINUE, NORID},
189     {"@encode", ENCODE, NORID},
190     {"", 0, 0}, {"", 0, 0},
191     {"@interface", INTERFACE, NORID},
192     {"", 0, 0},
193     {"__const", TYPE_QUAL, RID_CONST},
194     {"inline", SCSPEC, RID_INLINE},
195     {"auto", SCSPEC, RID_AUTO},
196     {"", 0, 0},
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},
203     {"", 0, 0},
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}
229   };
230
231 #ifdef __GNUC__
232 __inline
233 #endif
234 struct resword *
235 is_reserved_word (str, len)
236      register const char *str;
237      register unsigned int len;
238 {
239   if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
240     {
241       register int key = hash (str, len);
242
243       if (key <= MAX_HASH_VALUE && key >= 0)
244         {
245           register const char *s = wordlist[key].name;
246
247           if (*str == *s && !strcmp (str + 1, s + 1))
248             return &wordlist[key];
249         }
250     }
251   return 0;
252 }