Debian Codegraph @

tests/objc.exp

raw
1 /* ANSI-C code produced by gperf version 3.3 */
2 /* Command-line: gperf -j1 -i 1 -g -o -t -N is_reserved_word -k'1,3,$' */
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. */
28 #error "gperf generated tables don't work with this execution character set. Please report a bug to <[email protected]>."
29 #endif
30
31
32 /* Command-line: gperf -j1 -i 1 -g -o -t -N is_reserved_word -k1,3,$ objc.gperf */
33 struct resword { char *name; short token; enum rid rid; };
34
35 #define TOTAL_KEYWORDS 59
36 #define MIN_WORD_LENGTH 2
37 #define MAX_WORD_LENGTH 15
38 #define MIN_HASH_VALUE 8
39 #define MAX_HASH_VALUE 95
40 /* maximum key range = 88, duplicates = 0 */
41
42 #ifdef __GNUC__
43 __inline
44 #else
45 #ifdef __cplusplus
46 inline
47 #endif
48 #endif
49 static unsigned int
50 hash (register const char *str, register size_t len)
51 {
52 static unsigned char asso_values[] =
53 {
54 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
55 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
56 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
57 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
58 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
59 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
60 96, 96, 96, 96, 19, 96, 96, 96, 96, 96,
61 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
62 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
63 96, 96, 96, 96, 96, 2, 96, 2, 1, 10,
64 26, 1, 23, 27, 27, 24, 96, 1, 25, 36,
65 10, 34, 23, 96, 10, 6, 8, 11, 41, 2,
66 96, 96, 23, 96, 96, 96, 96, 96, 96, 96,
67 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
68 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
69 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
70 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
71 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
72 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
73 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
74 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
75 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
76 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
77 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
78 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
79 96, 96, 96, 96, 96, 96
80 };
81 register unsigned int hval = len;
82
83 switch (hval)
84 {
85 default:
86 hval += asso_values[(unsigned char)str[2]];
87 #if (defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang__ && __clang_major__ + (__clang_minor__ >= 9) > 3))) || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 202000L && ((defined __GNUC__ && __GNUC__ >= 10) || (defined __clang__ && __clang_major__ >= 9)))
88 [[fallthrough]];
89 #elif (defined __GNUC__ && __GNUC__ >= 7) || (defined __clang__ && __clang_major__ >= 10)
90 __attribute__ ((__fallthrough__));
91 #endif
92 /*FALLTHROUGH*/
93 case 2:
94 case 1:
95 hval += asso_values[(unsigned char)str[0]];
96 break;
97 }
98 return hval + asso_values[(unsigned char)str[len - 1]];
99 }
100
101 struct resword *
102 is_reserved_word (register const char *str, register size_t len)
103 {
104 #if (defined __GNUC__ && __GNUC__ + (__GNUC_MINOR__ >= 6) > 4) || (defined __clang__ && __clang_major__ >= 3)
105 #pragma GCC diagnostic push
106 #pragma GCC diagnostic ignored "-Wmissing-field-initializers"
107 #endif
108 static struct resword wordlist[] =
109 {
110 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
111 {"break", BREAK, NORID},
112 {""}, {""}, {""},
113 {"else", ELSE, NORID},
114 {"__asm__", ASM, NORID},
115 {""}, {""},
116 {"__attribute", ATTRIBUTE, NORID},
117 {"__alignof__", ALIGNOF, NORID},
118 {"__extension__", EXTENSION, NORID},
119 {"__attribute__", ATTRIBUTE, NORID},
120 {"__signed__", TYPESPEC, RID_SIGNED},
121 {"case", CASE, NORID},
122 {"__typeof__", TYPEOF, NORID},
123 {"__const__", TYPE_QUAL, RID_CONST},
124 {"static", SCSPEC, RID_STATIC},
125 {"extern", SCSPEC, RID_EXTERN},
126 {"char", TYPESPEC, RID_CHAR},
127 {"__const", TYPE_QUAL, RID_CONST},
128 {""},
129 {"continue", CONTINUE, NORID},
130 {"struct", STRUCT, NORID},
131 {"@defs", DEFS, NORID},
132 {"while", WHILE, NORID},
133 {"const", TYPE_QUAL, RID_CONST},
134 {"return", RETURN, NORID},
135 {"__inline", SCSPEC, RID_INLINE},
136 {"__alignof", ALIGNOF, NORID},
137 {"@encode", ENCODE, NORID},
138 {"__inline__", SCSPEC, RID_INLINE},
139 {"@selector", SELECTOR, NORID},
140 {"@interface", INTERFACE, NORID},
141 {"__typeof", TYPEOF, NORID},
142 {"__signed", TYPESPEC, RID_SIGNED},
143 {"int", TYPESPEC, RID_INT},
144 {"double", TYPESPEC, RID_DOUBLE},
145 {"__asm", ASM, NORID},
146 {"for", FOR, NORID},
147 {"@public", PUBLIC, NORID},
148 {"auto", SCSPEC, RID_AUTO},
149 {"if", IF, NORID},
150 {"union", UNION, NORID},
151 {"unsigned", TYPESPEC, RID_UNSIGNED},
152 {"enum", ENUM, NORID},
153 {"short", TYPESPEC, RID_SHORT},
154 {"__volatile", TYPE_QUAL, RID_VOLATILE},
155 {"register", SCSPEC, RID_REGISTER},
156 {"inline", SCSPEC, RID_INLINE},
157 {"__volatile__", TYPE_QUAL, RID_VOLATILE},
158 {"sizeof", SIZEOF, NORID},
159 {"@end", END, NORID},
160 {"typeof", TYPEOF, NORID},
161 {"typedef", SCSPEC, RID_TYPEDEF},
162 {"do", DO, NORID},
163 {"switch", SWITCH, NORID},
164 {"default", DEFAULT, NORID},
165 {"signed", TYPESPEC, RID_SIGNED},
166 {"long", TYPESPEC, RID_LONG},
167 {""}, {""}, {""},
168 {"float", TYPESPEC, RID_FLOAT},
169 {""}, {""},
170 {"goto", GOTO, NORID},
171 {""},
172 {"volatile", TYPE_QUAL, RID_VOLATILE},
173 {""},
174 {"asm", ASM, NORID},
175 {""}, {""},
176 {"@implementation", IMPLEMENTATION, NORID},
177 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
178 {""}, {""}, {""}, {""}, {""},
179 {"void", TYPESPEC, RID_VOID}
180 };
181 #if (defined __GNUC__ && __GNUC__ + (__GNUC_MINOR__ >= 6) > 4) || (defined __clang__ && __clang_major__ >= 3)
182 #pragma GCC diagnostic pop
183 #endif
184
185 if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
186 {
187 register unsigned int key = hash (str, len);
188
189 if (key <= MAX_HASH_VALUE)
190 {
191 register const char *s = wordlist[key].name;
192
193 if (*str == *s && !strcmp (str + 1, s + 1))
194 return &wordlist[key];
195 }
196 }
197 return (struct resword *) 0;
198 }