Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / ACE / apps / gperf / tests / test-3.exp
blob7ea59af01fee62d38fda9601aac4d362894113bd
1 /* C code produced by gperf version 2.8 (ACE version) */
2 /* Command-line: ../src/gperf -p -j 1 -o -a -C -g -t -k1,4,$ */
3 /* Command-line: gperf -p -j1 -o -t -N is_reserved_word -k1,4,$ gplus.gperf */
4 #include <string.h>
5 struct resword { const char *name; short token; enum rid rid;};
7 #define TOTAL_KEYWORDS 71
8 #define MIN_WORD_LENGTH 2
9 #define MAX_WORD_LENGTH 13
10 #define MIN_HASH_VALUE 4
11 #define MAX_HASH_VALUE 147
12 #define HASH_VALUE_RANGE 144
13 #define DUPLICATES 0
14 #define WORDLIST_SIZE 75
16 inline
17 static unsigned int
18 hash (const char *str, unsigned int len)
20 static const unsigned char asso_values[] =
22 #if defined (ACE_MVS)
23 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
24 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
25 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
26 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
27 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
28 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
29 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
30 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
31 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
32 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
33 148, 148, 148, 148, 148, 148, 148, 148, 148, 0,
34 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
35 148, 148, 148, 148, 148, 148, 148, 148, 148, 19,
36 6, 27, 37, 0, 12, 1, 15, 63, 148, 148,
37 148, 148, 148, 148, 148, 148, 4, 0, 56, 20,
38 15, 42, 148, 31, 148, 148, 148, 148, 148, 148,
39 148, 148, 5, 26, 39, 32, 10, 148, 40, 148,
40 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
41 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
42 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
43 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
44 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
45 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
46 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
47 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
48 148, 148, 148, 148, 148, 148,
49 #else
50 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
51 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
52 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
53 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
54 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
55 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
56 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
57 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
58 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
59 148, 148, 148, 148, 148, 0, 148, 19, 6, 27,
60 37, 0, 12, 1, 15, 63, 148, 4, 0, 56,
61 20, 15, 42, 148, 31, 5, 26, 39, 32, 10,
62 148, 40, 148, 148, 148, 148, 148, 148,
63 #endif /* ACE_MVS */
65 unsigned int hval = len;
67 switch (hval)
69 default:
70 case 4:
71 hval += asso_values[(int) str[3]];
72 case 3:
73 case 2:
74 case 1:
75 hval += asso_values[(int) str[0]];
77 return hval + asso_values[(int) str[len - 1]];
80 inline
81 const struct resword *
82 in_word_set (const char *str, unsigned int len)
84 static const struct resword wordlist[] =
86 {"",},{"",},{"",},{"",},
87 {"else", ELSE, NORID,},
88 {"",},
89 {"long", TYPESPEC, RID_LONG,},
90 {"",},{"",},{"",},{"",},
91 {"__alignof__", ALIGNOF, NORID},
92 {"__asm__", ASM, NORID},
93 {"",},{"",},
94 {"while", WHILE, NORID,},
95 {"",},{"",},{"",},{"",},{"",},
96 {"__alignof", ALIGNOF, NORID},
97 {"all", ALL, NORID /* Extension */,},
98 {"sizeof", SIZEOF, NORID,},
99 {"__const__", TYPE_QUAL, RID_CONST},
100 {"__volatile", TYPE_QUAL, RID_VOLATILE},
101 {"extern", SCSPEC, RID_EXTERN,},
102 {"__volatile__", TYPE_QUAL, RID_VOLATILE},
103 {"__inline", SCSPEC, RID_INLINE},
104 {"exception", AGGR, RID_EXCEPTION /* Extension */,},
105 {"__inline__", SCSPEC, RID_INLINE},
106 {"case", CASE, NORID,},
107 {"except", EXCEPT, NORID /* Extension */,},
108 {"new", NEW, NORID,},
109 {"break", BREAK, NORID,},
110 {"goto", GOTO, NORID,},
111 {"",},
112 {"__attribute", ATTRIBUTE, NORID},
113 {"",},
114 {"__attribute__", ATTRIBUTE, NORID},
115 {"this", THIS, NORID,},
116 {"raise", RAISE, NORID /* Extension */,},
117 {"class", AGGR, RID_CLASS,},
118 {"delete", DELETE, NORID,},
119 {"typeof", TYPEOF, NORID,},
120 {"typedef", SCSPEC, RID_TYPEDEF,},
121 {"for", FOR, NORID,},
122 {"raises", RAISES, NORID /* Extension */,},
123 {"__const", TYPE_QUAL, RID_CONST},
124 {"double", TYPESPEC, RID_DOUBLE,},
125 {"__typeof__", TYPEOF, NORID},
126 {"",},
127 {"switch", SWITCH, NORID,},
128 {"auto", SCSPEC, RID_AUTO,},
129 {"do", DO, NORID,},
130 {"friend", SCSPEC, RID_FRIEND,},
131 {"",},
132 {"reraise", RERAISE, NORID /* Extension */,},
133 {"",},
134 {"volatile", TYPE_QUAL, RID_VOLATILE,},
135 {"__typeof", TYPEOF, NORID},
136 {"continue", CONTINUE, NORID,},
137 {"float", TYPESPEC, RID_FLOAT,},
138 {"const", TYPE_QUAL, RID_CONST,},
139 {"static", SCSPEC, RID_STATIC,},
140 {"virtual", SCSPEC, RID_VIRTUAL,},
141 {"__asm", ASM, NORID},
142 {"short", TYPESPEC, RID_SHORT,},
143 {"signed", TYPESPEC, RID_SIGNED,},
144 {"try", TRY, NORID /* Extension */,},
145 {"",},{"",},{"",},
146 {"__signed__", TYPESPEC, RID_SIGNED},
147 {"catch", CATCH, NORID,},
148 {"public", PUBLIC, NORID,},
149 {"struct", AGGR, RID_RECORD,},
150 {"if", IF, NORID,},
151 {"asm", ASM, NORID,},
152 {"union", AGGR, RID_UNION,},
153 {"",},
154 {"private", PRIVATE, NORID,},
155 {"",},{"",},{"",},
156 {"operator", OPERATOR, NORID,},
157 {"",},{"",},{"",},
158 {"default", DEFAULT, NORID,},
159 {"dynamic", DYNAMIC, NORID,},
160 {"overload", OVERLOAD, NORID,},
161 {"int", TYPESPEC, RID_INT,},
162 {"char", TYPESPEC, RID_CHAR,},
163 {"",},{"",},
164 {"return", RETURN, NORID,},
165 {"",},{"",},{"",},{"",},{"",},{"",},{"",},{"",},{"",},
166 {"",},{"",},
167 {"__signed", TYPESPEC, RID_SIGNED},
168 {"",},
169 {"void", TYPESPEC, RID_VOID,},
170 {"",},{"",},{"",},
171 {"protected", PROTECTED, NORID,},
172 {"",},
173 {"enum", ENUM, NORID,},
174 {"",},{"",},{"",},{"",},{"",},{"",},{"",},{"",},{"",},
175 {"",},{"",},{"",},{"",},{"",},{"",},
176 {"inline", SCSPEC, RID_INLINE,},
177 {"register", SCSPEC, RID_REGISTER,},
178 {"",},{"",},{"",},{"",},{"",},{"",},{"",},{"",},{"",},
179 {"",},{"",},{"",},{"",},
180 {"unsigned", TYPESPEC, RID_UNSIGNED,},
183 if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
185 unsigned int key = hash (str, len);
187 if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE)
189 const char *s = wordlist[key].name;
191 if (*str == *s && !strcmp (str + 1, s + 1))
192 return &wordlist[key];
195 return 0;