1 /* C code produced by gperf version 2.5 (GNU C++ version) */
2 /* Command-line: gperf -p -j1 -g -o -t -N is_reserved_word -k1,4,$,7 gxx.gperf */
3 struct resword
{ char *name
; short token
; enum rid rid
;};
5 #define TOTAL_KEYWORDS 103
6 #define MIN_WORD_LENGTH 2
7 #define MAX_WORD_LENGTH 16
8 #define MIN_HASH_VALUE 4
9 #define MAX_HASH_VALUE 195
10 /* maximum key range = 192, duplicates = 0 */
18 register int unsigned len
;
20 static unsigned char asso_values
[] =
22 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
23 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
24 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
25 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
26 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
27 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
28 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
29 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
30 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
31 196, 196, 196, 196, 196, 0, 196, 80, 26, 28,
32 44, 0, 49, 38, 6, 81, 196, 2, 0, 41,
33 16, 47, 4, 31, 32, 5, 6, 62, 20, 96,
34 17, 25, 196, 196, 196, 196, 196, 196,
36 register int hval
= len
;
42 hval
+= asso_values
[str
[6]];
46 hval
+= asso_values
[str
[3]];
50 hval
+= asso_values
[str
[0]];
53 return hval
+ asso_values
[str
[len
- 1]];
60 is_reserved_word (str
, len
)
62 register unsigned int len
;
64 static struct resword wordlist
[] =
66 {"",}, {"",}, {"",}, {"",},
67 {"else", ELSE
, NORID
,},
69 {"__real", REALPART
, NORID
},
71 {"__real__", REALPART
, NORID
},
73 {"true", CXX_TRUE
, NORID
,},
75 {"__asm__", GCC_ASM_KEYWORD
, NORID
},
76 {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
77 {"this", THIS
, NORID
,},
79 {"extern", SCSPEC
, RID_EXTERN
,},
80 {"switch", SWITCH
, NORID
,},
81 {"template", TEMPLATE
, RID_TEMPLATE
,},
84 {"__alignof__", ALIGNOF
, NORID
},
85 {"static_cast", STATIC_CAST
, NORID
,},
87 {"bool", TYPESPEC
, RID_BOOL
,},
88 {"private", VISSPEC
, RID_PRIVATE
,},
89 {"case", CASE
, NORID
,},
90 {"virtual", SCSPEC
, RID_VIRTUAL
,},
93 {"compl", '~', NORID
,},
94 {"public", VISSPEC
, RID_PUBLIC
,},
96 {"__inline", SCSPEC
, RID_INLINE
},
98 {"__inline__", SCSPEC
, RID_INLINE
},
99 {"class", AGGR
, RID_CLASS
,},
100 {"const", CV_QUALIFIER
, RID_CONST
,},
101 {"static", SCSPEC
, RID_STATIC
,},
102 {"__extension__", EXTENSION
, NORID
},
104 {"short", TYPESPEC
, RID_SHORT
,},
105 {"__imag__", IMAGPART
, NORID
},
106 {"delete", DELETE
, NORID
,},
107 {"__asm", GCC_ASM_KEYWORD
, NORID
},
108 {"xor", '^', NORID
,},
109 {"not_eq", EQCOMPARE
, NORID
,},
110 {"xor_eq", ASSIGN
, NORID
,},
111 {"typename", TYPENAME_KEYWORD
, NORID
,},
112 {"typeid", TYPEID
, NORID
,},
114 {"__complex__", TYPESPEC
, RID_COMPLEX
},
115 {"false", CXX_FALSE
, NORID
,},
116 {"sizeof", SIZEOF
, NORID
,},
117 {"typeof", TYPEOF
, NORID
,},
118 {"__const__", CV_QUALIFIER
, RID_CONST
},
119 {"__volatile", CV_QUALIFIER
, RID_VOLATILE
},
121 {"__volatile__", CV_QUALIFIER
, RID_VOLATILE
},
122 {"__const", CV_QUALIFIER
, RID_CONST
},
123 {"catch", CATCH
, NORID
,},
124 {"__null", CONSTANT
, RID_NULL
},
125 {"protected", VISSPEC
, RID_PROTECTED
,},
127 {"signed", TYPESPEC
, RID_SIGNED
,},
129 {"__complex", TYPESPEC
, RID_COMPLEX
},
130 {"__alignof", ALIGNOF
, NORID
},
131 {"__wchar_t", TYPESPEC
, RID_WCHAR
/* Unique to ANSI C++ */,},
132 {"double", TYPESPEC
, RID_DOUBLE
,},
133 {"const_cast", CONST_CAST
, NORID
,},
135 {"struct", AGGR
, RID_RECORD
,},
136 {"long", TYPESPEC
, RID_LONG
,},
137 {"or", OROR
, NORID
,},
138 {"__typeof__", TYPEOF
, NORID
},
139 {"or_eq", ASSIGN
, NORID
,},
140 {"for", FOR
, NORID
,},
141 {"__imag", IMAGPART
, NORID
},
142 {"enum", ENUM
, NORID
,},
144 {"__label__", LABEL
, NORID
},
145 {"int", TYPESPEC
, RID_INT
,},
146 {"__signed__", TYPESPEC
, RID_SIGNED
},
147 {"signature", AGGR
, RID_SIGNATURE
/* Extension */,},
150 {"explicit", SCSPEC
, RID_EXPLICIT
,},
151 {"char", TYPESPEC
, RID_CHAR
,},
153 {"__attribute", ATTRIBUTE
, NORID
},
154 {"friend", SCSPEC
, RID_FRIEND
,},
155 {"__attribute__", ATTRIBUTE
, NORID
},
156 {"while", WHILE
, NORID
,},
157 {"reinterpret_cast", REINTERPRET_CAST
, NORID
,},
159 {"continue", CONTINUE
, NORID
,},
160 {"namespace", NAMESPACE
, NORID
,},
161 {"sigof", SIGOF
, NORID
/* Extension */,},
163 {"volatile", CV_QUALIFIER
, RID_VOLATILE
,},
165 {"bitor", '|', NORID
,},
166 {"typedef", SCSPEC
, RID_TYPEDEF
,},
167 {"void", TYPESPEC
, RID_VOID
,},
168 {"break", BREAK
, NORID
,},
170 {"new", NEW
, NORID
,},
171 {"return", RETURN
, NORID
,},
172 {"and_eq", ASSIGN
, NORID
,},
174 {"using", USING
, NORID
,},
176 {"asm", ASM_KEYWORD
, NORID
,},
178 {"and", ANDAND
, NORID
,},
179 {"mutable", SCSPEC
, RID_MUTABLE
,},
180 {"__typeof", TYPEOF
, NORID
},
181 {"union", AGGR
, RID_UNION
,},
184 {"__signed", TYPESPEC
, RID_SIGNED
},
186 {"goto", GOTO
, NORID
,},
188 {"__sigof__", SIGOF
, NORID
/* Extension */,},
189 {"float", TYPESPEC
, RID_FLOAT
,},
191 {"default", DEFAULT
, NORID
,},
192 {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
193 {"register", SCSPEC
, RID_REGISTER
,},
194 {"throw", THROW
, NORID
,},
196 {"bitand", '&', NORID
,},
197 {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
198 {"operator", OPERATOR
, NORID
,},
200 {"inline", SCSPEC
, RID_INLINE
,},
202 {"dynamic_cast", DYNAMIC_CAST
, NORID
,},
204 {"__signature__", AGGR
, RID_SIGNATURE
/* Extension */,},
206 {"auto", SCSPEC
, RID_AUTO
,},
207 {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
208 {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
209 {"unsigned", TYPESPEC
, RID_UNSIGNED
,},
212 if (len
<= MAX_WORD_LENGTH
&& len
>= MIN_WORD_LENGTH
)
214 register int key
= hash (str
, len
);
216 if (key
<= MAX_HASH_VALUE
&& key
>= 0)
218 register char *s
= wordlist
[key
].name
;
220 if (*s
== *str
&& !strcmp (str
+ 1, s
+ 1))
221 return &wordlist
[key
];