X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=tokens.inc;h=cbe19ec01ce1c41194c49fc27894d14ec42805f5;hb=a81dc4c1999d4853ddff49a749240440024aa6a3;hp=39c5a6a2baca4da617b5e22535c84ceac879e7bb;hpb=2beaa4f65961fe297663e1cec9e5632b7f3e1cba;p=cparser diff --git a/tokens.inc b/tokens.inc index 39c5a6a..cbe19ec 100644 --- a/tokens.inc +++ b/tokens.inc @@ -2,7 +2,14 @@ #define TS(x,str,val) #endif -TS(IDENTIFIER, "identifier", = 256) +/* These must go first. Some set explicit values. */ +#define ALTERNATE(name, val) T(_CXX, name, #name, val) +#define PUNCTUATOR(name, string, val) T(_ALL, name, string, val) +#include "tokens_punctuator.inc" +#undef PUNCTUATOR +#undef ALTERNATE + +TS(IDENTIFIER, "identifier",) TS(INTEGER, "integer number",) TS(INTEGER_OCTAL, "octal integer number",) TS(INTEGER_HEXADECIMAL, "hexadecimal integer number",) @@ -13,12 +20,6 @@ TS(WIDE_CHARACTER_CONSTANT, "wide character constant",) TS(STRING_LITERAL, "string literal",) TS(WIDE_STRING_LITERAL, "wide string literal",) -#define ALTERNATE(name, val) T(_CXX, name, #name, val) -#define PUNCTUATOR(name, string, val) T(_ALL, name, string, val) -#include "tokens_punctuator.inc" -#undef PUNCTUATOR -#undef ALTERNATE - #define S(mode,x) T(mode,x,#x,) S(_ALL, auto) S(_ALL, break) @@ -112,57 +113,26 @@ S(_MS, __FUNCDNAME__) #undef S /* needed on Windows */ -#ifdef __w64 #undef __w64 -#endif -#ifdef __ptr32 #undef __ptr32 -#endif -#ifdef __ptr64 #undef __ptr64 -#endif /* needed on MinGW */ -#ifdef __MINGW32__ -#ifdef __int8 #undef __int8 -#endif -#ifdef __int16 #undef __int16 -#endif -#ifdef __int32 #undef __int32 -#endif -#ifdef __int64 #undef __int64 -#endif -#endif -#if defined(__MINGW32__) || defined(__CYGWIN__) -#ifdef __cdecl +/* needed on MinGW and Cygwin */ #undef __cdecl -#endif -#ifdef __stdcall #undef __stdcall -#endif -#ifdef __fastcall #undef __fastcall -#endif -#endif -/* needed on darwin... */ -#ifdef __signed +/* needed on Darwin... */ #undef __signed -#endif -#ifdef __volatile #undef __volatile -#endif -#ifdef __const #undef __const -#endif -#ifdef __restrict #undef __restrict -#endif #define S(mode, x, val) T(mode, x, #x, val) S(_ANSI|_C99|_CXX, signed, ) @@ -193,7 +163,7 @@ S(_ALL, __asm, = T_asm) S(_ANSI|_C99|_CXX, volatile, ) S(_ALL, __volatile, = T_volatile) S(_ALL, __volatile__, = T_volatile) -S(_C99|_CXX, inline, ) +S(_C99|_CXX|_GNUC, inline, ) S(_ALL, __inline, = T_inline) S(_ALL, __inline__, = T_inline) S(_GNUC, typeof, )