1/* These must go first. Some set explicit values. */ 2#define ALTERNATE(name, val) T(_CXX, T_##name, #name, val) 3#define PUNCTUATOR(name, string, val) T(_ALL, T_##name, string, val) 4#include "tokens_punctuator.inc" 5#undef PUNCTUATOR 6#undef ALTERNATE 7 8#define S(name, description) T(_ALL, T_##name, description,) 9S(EOF, "end of input") 10S(IDENTIFIER, "identifier") 11S(NUMBER, "number constant") 12S(CHARACTER_CONSTANT, "character constant") 13S(STRING_LITERAL, "string literal") 14S(MACRO_PARAMETER, "macro parameter") 15S(UNKNOWN_CHAR, "unknown character") 16#undef S 17 18#define S(mode,x) T(mode,T_##x,#x,) 19S(_ALL, auto) 20S(_ALL, break) 21S(_ALL, case) 22S(_ALL, char) 23S(_ALL, continue) 24S(_ALL, default) 25S(_ALL, do) 26S(_ALL, double) 27S(_ALL, else) 28S(_ALL, enum) 29S(_ALL, extern) 30S(_ALL, float) 31S(_ALL, for) 32S(_ALL, goto) 33S(_ALL, if) 34S(_ALL, int) 35S(_ALL, long) 36S(_ALL, register) 37S(_ALL, return) 38S(_ALL, short) 39S(_ALL, sizeof) 40S(_ALL, static) 41S(_ALL, struct) 42S(_ALL, switch) 43S(_ALL, typedef) 44S(_ALL, union) 45S(_ALL, unsigned) 46S(_ALL, void) 47S(_ALL, while) 48 49/* C++ keywords */ 50S(_CXX, bool) 51S(_CXX, catch) 52S(_CXX, class) 53S(_CXX, const_cast) 54S(_CXX, delete) 55S(_CXX, dynamic_cast) 56S(_CXX, explicit) 57S(_CXX, export) 58S(_CXX, false) 59S(_CXX, friend) 60S(_CXX, mutable) 61S(_CXX, namespace) 62S(_CXX, new) 63S(_CXX, operator) 64S(_CXX, private) 65S(_CXX, protected) 66S(_CXX, public) 67S(_CXX, reinterpret_cast) 68S(_CXX, static_cast) 69S(_CXX, template) 70S(_CXX, this) 71S(_CXX, throw) 72S(_CXX, true) 73S(_CXX, try) 74S(_CXX, typeid) 75S(_CXX, typename) 76S(_CXX, using) 77S(_CXX, virtual) 78S(_CXX, wchar_t) 79 80S(_C99|_GNUC, _Bool) 81 82S(_C11, _Alignas) 83S(_C11, _Atomic) 84S(_C11, _Generic) 85S(_C11, _Noreturn) 86S(_C11, _Static_assert) 87 88S(_ALL, __extension__) 89S(_ALL, __builtin_classify_type) 90S(_ALL, __builtin_va_list) 91S(_ALL, __builtin_va_arg) 92S(_ALL, __builtin_va_copy) 93S(_ALL, __builtin_offsetof) 94S(_ALL, __builtin_constant_p) 95S(_ALL, __builtin_types_compatible_p) 96S(_ALL, __builtin_isgreater) 97S(_ALL, __builtin_isgreaterequal) 98S(_ALL, __builtin_isless) 99S(_ALL, __builtin_islessequal) 100S(_ALL, __builtin_islessgreater) 101S(_ALL, __builtin_isunordered) 102S(_ALL, __PRETTY_FUNCTION__) 103S(_ALL, __label__) 104S(_MS, __FUNCSIG__) 105S(_MS, __FUNCDNAME__) 106#undef S 107 108#define S(mode, x, val) T(mode, T_##x, #x, val) 109S(_C99, __func__,) 110S(_ALL, __FUNCTION__, = T___func__) 111S(_C11, _Thread_local, ) 112S(_ALL, __thread, = T__Thread_local) 113S(_ALL, signed, ) 114S(_ALL, __signed, = T_signed) 115S(_ALL, __signed__, = T_signed) 116S(_C99|_GNUC, _Complex, ) 117S(_ALL, __complex__, = T__Complex) 118S(_ALL, __complex, = T__Complex) 119S(_C99|_GNUC, _Imaginary, ) 120S(_ALL, __real__, ) 121S(_ALL, __real, = T___real__) 122S(_ALL, __imag__, ) 123S(_ALL, __imag, = T___imag__) 124S(_C11, _Alignof, ) 125S(_ALL, __alignof__, = T__Alignof) 126S(_ALL, __alignof, = T__Alignof) 127S(_MS, _alignof, = T__Alignof) 128S(_ALL, const, ) 129S(_ALL, __const, = T_const) 130S(_ALL, __const__, = T_const) 131S(_C99, restrict, ) 132S(_ALL, __restrict__, = T_restrict) 133S(_ALL, __restrict, = T_restrict) 134S(_MS, _restrict, = T_restrict) 135S(_ALL, asm, ) 136S(_ALL, __asm__, = T_asm) 137S(_MS, _asm, = T_asm) 138S(_ALL, __asm, = T_asm) 139S(_ALL, volatile, ) 140S(_ALL, __volatile, = T_volatile) 141S(_ALL, __volatile__, = T_volatile) 142S(_C99|_CXX|_GNUC, inline, ) 143S(_ALL, __inline, = T_inline) 144S(_ALL, __inline__, = T_inline) 145S(_GNUC, typeof, ) 146S(_ALL, __typeof, = T_typeof) 147S(_ALL, __typeof__, = T_typeof) 148S(_ALL, __attribute__, ) 149 150S(_ALL, __builtin_va_start, ) 151S(_ALL, __builtin_stdarg_start, = T___builtin_va_start) 152 153S(_MS, _near, ) 154S(_MS, __near, = T__near) 155S(_MS, _far, ) 156S(_MS, __far, = T__far) 157S(_MS, cdecl, ) 158S(_MS, _cdecl, = T_cdecl) 159S(_MS, __cdecl, = T_cdecl) 160S(_MS, _stdcall, ) 161S(_MS, __stdcall, = T__stdcall) 162S(_MS, _fastcall, ) 163S(_MS, __fastcall, = T__fastcall) 164S(_MS, __thiscall, ) 165S(_MS, _forceinline, ) 166S(_MS, __forceinline, = T__forceinline) 167S(_MS, __unaligned, ) 168S(_MS, _assume, ) 169S(_MS, __assume, = T__assume) 170S(_MS, _try, ) 171S(_MS, __try, = T__try) 172S(_MS, _finally, ) 173S(_MS, __finally, = T__finally) 174S(_MS, _leave, ) 175S(_MS, __leave, = T__leave) 176S(_MS, _except, ) 177S(_MS, __except, = T__except) 178S(_MS, _declspec, ) 179S(_MS, __declspec, = T__declspec) 180S(_MS, _based, ) 181S(_MS, __based, = T__based) 182S(_MS, __noop, ) 183 184S(_MS, __ptr32, ) 185S(_MS, __ptr64, ) 186S(_MS, __sptr, ) 187S(_MS, __uptr, ) 188S(_MS, _w64, ) 189S(_MS, __w64, = T__w64) 190 191S(_MS, _int8, ) 192S(_MS, __int8, = T__int8) 193S(_MS, _int16, ) 194S(_MS, __int16, = T__int16) 195S(_MS, _int32, ) 196S(_MS, __int32, = T__int32) 197S(_MS, _int64, ) 198S(_MS, __int64, = T__int64) 199S(_MS, _int128, ) 200S(_MS, __int128, = T__int128) 201#undef S 202 203/* Redefine required macros for MinGW headers */ 204#if defined(__MINGW32__) || defined(__CYGWIN__) 205#define __stdcall __attribute__((__stdcall__)) 206#define __fastcall __attribute__((__fastcall__)) 207#define __cdecl __attribute__((__cdecl__)) 208#endif 209