1/* C code produced by gperf version 3.0.4 */
2/* Command-line: ../src/gperf -D -t -k'1,$'  */
3
4#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
5      && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
6      && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
7      && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
8      && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
9      && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
10      && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
11      && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
12      && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
13      && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
14      && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
15      && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
16      && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
17      && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
18      && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
19      && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
20      && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
21      && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
22      && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
23      && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
24      && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
25      && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
26      && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
27/* The character set is not based on ISO-646.  */
28error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
29#endif
30
31
32/* Command-line: gperf -L KR-C -F ', 0, 0' -j1 -i 1 -g -o -t -N is_reserved_word -k1,3,$ c-parse.gperf  */
33struct resword { const char *name; short token; enum rid rid; };
34
35#define TOTAL_KEYWORDS 83
36#define MIN_WORD_LENGTH 2
37#define MAX_WORD_LENGTH 20
38#define MIN_HASH_VALUE 4
39#define MAX_HASH_VALUE 127
40/* maximum key range = 124, duplicates = 8 */
41
42#ifdef __GNUC__
43__inline
44#else
45#ifdef __cplusplus
46inline
47#endif
48#endif
49static unsigned int
50hash (str, len)
51     register const char *str;
52     register unsigned int len;
53{
54  static unsigned char asso_values[] =
55    {
56      128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
57      128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
58      128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
59      128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
60      128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
61      128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
62      128, 128, 128, 128,   0, 128, 128, 128, 128, 128,
63      128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
64      128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
65      128, 128, 128, 128, 128,   5, 128,   0,  15,  50,
66       55,   0,  15,  35,  65,  60, 128,  40,   0,  60,
67       65,  10, 128, 128,  15,  20,  30,  20,  40,   0,
68       20,  15, 128, 128, 128, 128, 128, 128, 128, 128,
69      128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
70      128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
71      128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
72      128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
73      128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
74      128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
75      128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
76      128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
77      128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
78      128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
79      128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
80      128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
81      128, 128, 128, 128, 128, 128
82    };
83  return len + asso_values[(unsigned char)str[len - 1]] + asso_values[(unsigned char)str[0]];
84}
85
86#ifdef __GNUC__
87__inline
88#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
89__attribute__ ((__gnu_inline__))
90#endif
91#endif
92struct resword *
93in_word_set (str, len)
94     register const char *str;
95     register unsigned int len;
96{
97  static struct resword wordlist[] =
98    {
99      {"else", ELSE, NORID},
100      {"while", WHILE, NORID},
101      {"@encode", ENCODE, NORID},
102      {"@private", PRIVATE, NORID},
103      {"@protocol", PROTOCOL, NORID},
104      {"@interface", INTERFACE, NORID},
105      {"__real", REALPART, NORID},
106      {"__inline", SCSPEC, RID_INLINE},
107      {"auto", SCSPEC, RID_AUTO},
108      {"__volatile", TYPE_QUAL, RID_VOLATILE},
109      {"__attribute", ATTRIBUTE, NORID},
110      {"__asm__", ASM_KEYWORD, NORID},
111      {"__imag__", IMAGPART, NORID},
112      {"__real__", REALPART, NORID},
113      {"__const__", TYPE_QUAL, RID_CONST},
114      {"__label__", LABEL, NORID},
115      {"__inline__", SCSPEC, RID_INLINE},
116      {"__typeof__", TYPEOF, NORID},
117      {"__signed__", TYPESPEC, RID_SIGNED},
118      {"__alignof__", ALIGNOF, NORID},
119      {"__complex__", TYPESPEC, RID_COMPLEX},
120      {"__iterator__", SCSPEC, RID_ITERATOR},
121      {"__volatile__", TYPE_QUAL, RID_VOLATILE},
122      {"__restrict__", TYPE_QUAL, RID_RESTRICT},
123      {"__attribute__", ATTRIBUTE, NORID},
124      {"__extension__", EXTENSION, NORID},
125      {"@selector", SELECTOR, NORID},
126      {"@defs", DEFS, NORID},
127      {"@class", CLASS, NORID},
128      {"__typeof", TYPEOF, NORID},
129      {"__alignof", ALIGNOF, NORID},
130      {"__iterator", SCSPEC, RID_ITERATOR},
131      {"oneway", TYPE_QUAL, RID_ONEWAY},
132      {"for", FOR, NORID},
133      {"__complex", TYPESPEC, RID_COMPLEX},
134      {"byref", TYPE_QUAL, RID_BYREF},
135      {"bycopy", TYPE_QUAL, RID_BYCOPY},
136      {"register", SCSPEC, RID_REGISTER},
137      {"long", TYPESPEC, RID_LONG},
138      {"@compatibility_alias", ALIAS, NORID},
139      {"sizeof", SIZEOF, NORID},
140      {"__const", TYPE_QUAL, RID_CONST},
141      {"out", TYPE_QUAL, RID_OUT},
142      {"__restrict", TYPE_QUAL, RID_RESTRICT},
143      {"__imag", IMAGPART, NORID},
144      {"volatile", TYPE_QUAL, RID_VOLATILE},
145      {"goto", GOTO, NORID},
146      {"float", TYPESPEC, RID_FLOAT},
147      {"typeof", TYPEOF, NORID},
148      {"typedef", SCSPEC, RID_TYPEDEF},
149      {"restrict", TYPE_QUAL, RID_RESTRICT},
150      {"case", CASE, NORID},
151      {"short", TYPESPEC, RID_SHORT},
152      {"struct", STRUCT, NORID},
153      {"@public", PUBLIC, NORID},
154      {"continue", CONTINUE, NORID},
155      {"@end", END, NORID},
156      {"break", BREAK, NORID},
157      {"double", TYPESPEC, RID_DOUBLE},
158      {"asm", ASM_KEYWORD, NORID},
159      {"enum", ENUM, NORID},
160      {"@protected", PROTECTED, NORID},
161      {"inline", SCSPEC, RID_INLINE},
162      {"do", DO, NORID},
163      {"__signed", TYPESPEC, RID_SIGNED},
164      {"char", TYPESPEC, RID_CHAR},
165      {"__asm", ASM_KEYWORD, NORID},
166      {"extern", SCSPEC, RID_EXTERN},
167      {"static", SCSPEC, RID_STATIC},
168      {"if", IF, NORID},
169      {"@implementation", IMPLEMENTATION, NORID},
170      {"signed", TYPESPEC, RID_SIGNED},
171      {"unsigned", TYPESPEC, RID_UNSIGNED},
172      {"const", TYPE_QUAL, RID_CONST},
173      {"return", RETURN, NORID},
174      {"union", UNION, NORID},
175      {"switch", SWITCH, NORID},
176      {"default", DEFAULT, NORID},
177      {"int", TYPESPEC, RID_INT},
178      {"inout", TYPE_QUAL, RID_INOUT},
179      {"void", TYPESPEC, RID_VOID},
180      {"id", OBJECTNAME, RID_ID},
181      {"in", TYPE_QUAL, RID_IN}
182    };
183
184  static short lookup[] =
185    {
186        -1,   -1,   -1,   -1,    0,    1,   -1,    2,
187         3,    4,    5,    6,   -1,    7,    8,    9,
188        10,   11, -184, -180, -171, -162, -158, -156,
189        26,   27,   28,   -1,   29,   30,   31,   32,
190        -1,   33,   34,   35,   36,   -1,   37,   38,
191        39,   40,   41,   42,   -1,   43,   44,   -1,
192        45,   46,   47,   48,   49,   50,   51,   52,
193        53,   54,   55,   56,   57,   58,   -1,   59,
194        60,   61,   62,   63,   64,   65,   66,   67,
195       -59,   -2,  -62,   -3,   68,   69,  -64,   -2,
196        70,   71,   -1,   72,   -1,   73,   74,  -67,
197        -3,   -1,   75,   76,   77,   78,   -1,   79,
198       -69,   -2,   -1,   80,  -71,   -2,   -1,   -1,
199        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
200        -1,   -1,   -1,   -1,   -1,   81,   -1,   -1,
201        -1,   -1,   -1,   -1,   -1,   -1,   -1,   82
202    };
203
204  if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
205    {
206      register int key = hash (str, len);
207
208      if (key <= MAX_HASH_VALUE && key >= 0)
209        {
210          register int index = lookup[key];
211
212          if (index >= 0)
213            {
214              register const char *s = wordlist[index].name;
215
216              if (*str == *s && !strcmp (str + 1, s + 1))
217                return &wordlist[index];
218            }
219          else if (index < -TOTAL_KEYWORDS)
220            {
221              register int offset = - 1 - TOTAL_KEYWORDS - index;
222              register struct resword *wordptr = &wordlist[TOTAL_KEYWORDS + lookup[offset]];
223              register struct resword *wordendptr = wordptr + -lookup[offset + 1];
224
225              while (wordptr < wordendptr)
226                {
227                  register const char *s = wordptr->name;
228
229                  if (*str == *s && !strcmp (str + 1, s + 1))
230                    return wordptr;
231                  wordptr++;
232                }
233            }
234        }
235    }
236  return 0;
237}
238