X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=tokens.inc;h=0a373abfcad9e5d35adf486274b9808cbfce08b2;hb=516b4ed5ac675f2d94becf9fa0815ddc65f637ac;hp=607e3e295a795cc8d54da2daee13dcd321ce1fcc;hpb=480e518baafe5100f6331fa10cb2e4aaa29b4b08;p=cparser diff --git a/tokens.inc b/tokens.inc index 607e3e2..0a373ab 100644 --- a/tokens.inc +++ b/tokens.inc @@ -2,20 +2,22 @@ #define TS(x,str,val) #endif -TS(IDENTIFIER, "identifier", = 256) -TS(INTEGER, "integer number",) -TS(CHARACTER_CONSTANT, "character constant",) -TS(WIDE_CHARACTER_CONSTANT, "wide character constant",) -TS(FLOATINGPOINT, "floatingpoint number",) -TS(STRING_LITERAL, "string literal",) -TS(WIDE_STRING_LITERAL, "wide string literal",) - +/* 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(EOF, "end of input",) +TS(IDENTIFIER, "identifier",) +TS(NUMBER, "number constant",) +TS(CHARACTER_CONSTANT, "character constant",) +TS(STRING_LITERAL, "string literal",) +TS(HEADERNAME, "headername",) +TS(MACRO_PARAMETER, "macro parameter",) +TS(UNKNOWN_CHAR, "unknown character",) + #define S(mode,x) T(mode,x,#x,) S(_ALL, auto) S(_ALL, break) @@ -89,94 +91,48 @@ S(_ALL, __thread) S(_ALL, __extension__) S(_ALL, __builtin_classify_type) S(_ALL, __builtin_va_list) -S(_ALL, __builtin_expect) -S(_ALL, __builtin_offsetof) S(_ALL, __builtin_va_arg) -S(_ALL, __builtin_va_end) -S(_ALL, __builtin_alloca) -S(_ALL, __builtin_inf) -S(_ALL, __builtin_inff) -S(_ALL, __builtin_infl) -S(_ALL, __builtin_nan) -S(_ALL, __builtin_nanf) -S(_ALL, __builtin_nanl) +S(_ALL, __builtin_va_copy) +S(_ALL, __builtin_offsetof) +S(_ALL, __builtin_constant_p) +S(_ALL, __builtin_types_compatible_p) S(_ALL, __builtin_isgreater) S(_ALL, __builtin_isgreaterequal) S(_ALL, __builtin_isless) S(_ALL, __builtin_islessequal) S(_ALL, __builtin_islessgreater) S(_ALL, __builtin_isunordered) -S(_ALL, __builtin_constant_p) -S(_ALL, __builtin_prefetch) -S(_ALL, __builtin_huge_val) -S(_ALL, __builtin_return_address) -S(_ALL, __builtin_frame_address) -S(_ALL, __builtin_ffs) -S(_ALL, __builtin_clz) -S(_ALL, __builtin_ctz) -S(_ALL, __builtin_popcount) -S(_ALL, __builtin_parity) -S(_ALL, __builtin_trap) -S(_ALL, __builtin_types_compatible_p) S(_ALL, __PRETTY_FUNCTION__) -S(_ALL, __FUNCTION__) S(_ALL, __label__) -S(_C99, __func__) S(_MS, __FUNCSIG__) S(_MS, __FUNCDNAME__) #undef S /* needed on Windows */ -#ifdef __w64 #undef __w64 -#endif -#ifdef __ptr64 +#undef __ptr32 #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(_C99, __func__,) +S(_ALL, __FUNCTION__, = T___func__) S(_ANSI|_C99|_CXX, signed, ) S(_ALL, __signed, = T_signed) S(_ALL, __signed__, = T_signed) @@ -205,7 +161,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, )