8sa1-gcc/gcc/cp/gxx.gperf
Kaveh R. Ghazi f5984164b7 gxx.gperf (hash, [...]): Add prototypes.
* gxx.gperf (hash, is_reserved_word): Add prototypes.

	* init.c (build_vec_init): Initialize variable `try_block'.

	* lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
	Likewise for bzero/memset.
	(token_getch, token_put_back): Add static prototypes.  Remove
	`inline' from the definitions.
	(retrofit_lang_decl): Call memset, not bzero, to avoid casts.

From-SVN: r29042
1999-09-02 03:13:16 +00:00

117 lines
3.4 KiB
Plaintext

%{
/* Command-line: gperf -L C -F ', 0, 0' -p -j1 -g -o -t -N is_reserved_word -k1,4,$,7 gplus.gperf */
%}
struct resword { const char *name; short token; enum rid rid;};
#ifdef __GNUC__
__inline
#endif
static unsigned int hash PARAMS ((const char *, unsigned int));
#ifdef __GNUC__
__inline
#endif
struct resword *is_reserved_word PARAMS ((const char *, unsigned int));
%%
__alignof, ALIGNOF, RID_UNUSED
__alignof__, ALIGNOF, RID_UNUSED
__asm, ASM_KEYWORD, RID_UNUSED
__asm__, ASM_KEYWORD, RID_UNUSED
__attribute, ATTRIBUTE, RID_UNUSED
__attribute__, ATTRIBUTE, RID_UNUSED
__builtin_va_arg, VA_ARG, RID_UNUSED
__complex, TYPESPEC, RID_COMPLEX
__complex__, TYPESPEC, RID_COMPLEX
__const, CV_QUALIFIER, RID_CONST
__const__, CV_QUALIFIER, RID_CONST
__extension__, EXTENSION, RID_UNUSED
__imag, IMAGPART, RID_UNUSED
__imag__, IMAGPART, RID_UNUSED
__inline, SCSPEC, RID_INLINE
__inline__, SCSPEC, RID_INLINE
__label__, LABEL, RID_UNUSED
__null, CONSTANT, RID_NULL
__real, REALPART, RID_UNUSED
__real__, REALPART, RID_UNUSED
__restrict, CV_QUALIFIER, RID_RESTRICT
__restrict__, CV_QUALIFIER, RID_RESTRICT
__signed, TYPESPEC, RID_SIGNED
__signed__, TYPESPEC, RID_SIGNED
__typeof, TYPEOF, RID_UNUSED
__typeof__, TYPEOF, RID_UNUSED
__volatile, CV_QUALIFIER, RID_VOLATILE
__volatile__, CV_QUALIFIER, RID_VOLATILE
__wchar_t, TYPESPEC, RID_WCHAR /* Unique to ANSI C++ */,
asm, ASM_KEYWORD, RID_UNUSED,
and, ANDAND, RID_UNUSED,
and_eq, ASSIGN, RID_UNUSED,
auto, SCSPEC, RID_AUTO,
bitand, '&', RID_UNUSED,
bitor, '|', RID_UNUSED,
bool, TYPESPEC, RID_BOOL,
break, BREAK, RID_UNUSED,
case, CASE, RID_UNUSED,
catch, CATCH, RID_UNUSED,
char, TYPESPEC, RID_CHAR,
class, AGGR, RID_CLASS,
compl, '~', RID_UNUSED,
const, CV_QUALIFIER, RID_CONST,
const_cast, CONST_CAST, RID_UNUSED,
continue, CONTINUE, RID_UNUSED,
default, DEFAULT, RID_UNUSED,
delete, DELETE, RID_UNUSED,
do, DO, RID_UNUSED,
double, TYPESPEC, RID_DOUBLE,
dynamic_cast, DYNAMIC_CAST, RID_UNUSED,
else, ELSE, RID_UNUSED,
enum, ENUM, RID_UNUSED,
explicit, SCSPEC, RID_EXPLICIT,
export, SCSPEC, RID_EXPORT,
extern, SCSPEC, RID_EXTERN,
false, CXX_FALSE, RID_UNUSED,
float, TYPESPEC, RID_FLOAT,
for, FOR, RID_UNUSED,
friend, SCSPEC, RID_FRIEND,
goto, GOTO, RID_UNUSED,
if, IF, RID_UNUSED,
inline, SCSPEC, RID_INLINE,
int, TYPESPEC, RID_INT,
long, TYPESPEC, RID_LONG,
mutable, SCSPEC, RID_MUTABLE,
namespace, NAMESPACE, RID_UNUSED,
new, NEW, RID_UNUSED,
not, '!', RID_UNUSED,
not_eq, EQCOMPARE, RID_UNUSED,
operator, OPERATOR, RID_UNUSED,
or, OROR, RID_UNUSED,
or_eq, ASSIGN, RID_UNUSED,
private, VISSPEC, RID_PRIVATE,
protected, VISSPEC, RID_PROTECTED,
public, VISSPEC, RID_PUBLIC,
register, SCSPEC, RID_REGISTER,
reinterpret_cast, REINTERPRET_CAST, RID_UNUSED,
return, RETURN_KEYWORD, RID_UNUSED,
short, TYPESPEC, RID_SHORT,
signed, TYPESPEC, RID_SIGNED,
sizeof, SIZEOF, RID_UNUSED,
static, SCSPEC, RID_STATIC,
static_cast, STATIC_CAST, RID_UNUSED,
struct, AGGR, RID_RECORD,
switch, SWITCH, RID_UNUSED,
template, TEMPLATE, RID_TEMPLATE,
this, THIS, RID_UNUSED,
throw, THROW, RID_UNUSED,
true, CXX_TRUE, RID_UNUSED,
try, TRY, RID_UNUSED,
typedef, SCSPEC, RID_TYPEDEF,
typename, TYPENAME_KEYWORD, RID_UNUSED,
typeid, TYPEID, RID_UNUSED,
typeof, TYPEOF, RID_UNUSED,
union, AGGR, RID_UNION,
unsigned, TYPESPEC, RID_UNSIGNED,
using, USING, RID_UNUSED,
virtual, SCSPEC, RID_VIRTUAL,
void, TYPESPEC, RID_VOID,
volatile, CV_QUALIFIER, RID_VOLATILE,
while, WHILE, RID_UNUSED,
xor, '^', RID_UNUSED,
xor_eq, ASSIGN, RID_UNUSED,