X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=tokens.inc;h=686adf04c517e9d28a9688ed2dde637c2673d55c;hb=3ebfcac30456a053d3eba3fb1a2df7b1e73668b8;hp=d4741e47d628809402de83caee95489cd023e7a9;hpb=912addb873c5f8b193970fe4f0926ff89aec3fc8;p=cparser diff --git a/tokens.inc b/tokens.inc index d4741e4..686adf0 100644 --- a/tokens.inc +++ b/tokens.inc @@ -2,20 +2,24 @@ #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(IDENTIFIER, "identifier",) +TS(INTEGER, "integer number",) +TS(INTEGER_OCTAL, "octal integer number",) +TS(INTEGER_HEXADECIMAL, "hexadecimal integer number",) +TS(FLOATINGPOINT, "floatingpoint number",) +TS(FLOATINGPOINT_HEXADECIMAL, "hexadecimal floatingpoint number",) +TS(CHARACTER_CONSTANT, "character constant",) +TS(WIDE_CHARACTER_CONSTANT, "wide character constant",) +TS(STRING_LITERAL, "string literal",) +TS(WIDE_STRING_LITERAL, "wide string literal",) + #define S(mode,x) T(mode,x,#x,) S(_ALL, auto) S(_ALL, break) @@ -89,8 +93,9 @@ S(_ALL, __thread) S(_ALL, __extension__) S(_ALL, __builtin_classify_type) S(_ALL, __builtin_va_list) -S(_ALL, __builtin_offsetof) S(_ALL, __builtin_va_arg) +S(_ALL, __builtin_va_copy) +S(_ALL, __builtin_offsetof) S(_ALL, __builtin_constant_p) S(_ALL, __builtin_types_compatible_p) S(_ALL, __builtin_isgreater) @@ -108,54 +113,26 @@ 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(_ANSI|_C99|_CXX, signed, )