make extensions starting with __ available for all configurations
[cparser] / tokens.inc
1 #ifndef TS
2 #define TS(x,str,val)
3 #endif
4
5 TS(IDENTIFIER,              "identifier", = 256)
6 TS(INTEGER,                 "integer number",)
7 TS(CHARACTER_CONSTANT,      "character constant",)
8 TS(WIDE_CHARACTER_CONSTANT, "wide character constant",)
9 TS(FLOATINGPOINT,           "floatingpoint number",)
10 TS(STRING_LITERAL,          "string literal",)
11 TS(WIDE_STRING_LITERAL,     "wide string literal",)
12
13 #define PUNCTUATOR(name,string,val)   T(_ALL,name,string,val)
14 #include "tokens_punctuator.inc"
15 #undef PUNCTUATOR
16
17 #define S(mode,x)   T(mode,x,#x,)
18 S(_ALL, auto)
19 S(_ALL, break)
20 S(_ALL, case)
21 S(_ALL, char)
22 S(_ALL, continue)
23 S(_ALL, default)
24 S(_ALL, do)
25 S(_ALL, double)
26 S(_ALL, else)
27 S(_ALL, enum)
28 S(_ALL, extern)
29 S(_ALL, float)
30 S(_ALL, for)
31 S(_ALL, goto)
32 S(_ALL, if)
33 S(_ALL, int)
34 S(_ALL, long)
35 S(_ALL, register)
36 S(_ALL, return)
37 S(_ALL, short)
38 S(_ALL, sizeof)
39 S(_ALL, static)
40 S(_ALL, struct)
41 S(_ALL, switch)
42 S(_ALL, typedef)
43 S(_ALL, union)
44 S(_ALL, unsigned)
45 S(_ALL, void)
46 S(_ALL, while)
47
48 S(_C99|_GNUC, _Bool)
49 S(_ALL, __thread)
50 S(_ALL, __extension__)
51 S(_ALL, __builtin_classify_type)
52 S(_ALL, __builtin_va_list)
53 S(_ALL, __builtin_expect)
54 S(_ALL, __builtin_offsetof)
55 S(_ALL, __builtin_va_arg)
56 S(_ALL, __builtin_va_end)
57 S(_ALL, __builtin_alloca)
58 S(_ALL, __builtin_nanf)
59 S(_ALL, __builtin_nan)
60 S(_ALL, __builtin_nand)
61 S(_ALL, __builtin_isgreater)
62 S(_ALL, __builtin_isgreaterequal)
63 S(_ALL, __builtin_isless)
64 S(_ALL, __builtin_islessequal)
65 S(_ALL, __builtin_islessgreater)
66 S(_ALL, __builtin_isunordered)
67 S(_ALL, __builtin_constant_p)
68 S(_ALL, __builtin_prefetch)
69 S(_ALL, __PRETTY_FUNCTION__)
70 S(_ALL, __FUNCTION__)
71 S(_C99, __func__)
72 S(_MS, __FUNCSIG__)
73 S(_MS, __FUNCDNAME__)
74 #undef S
75
76 T(_ANSI|_C99,   signed,       "signed",)
77 T(_ALL,       __signed,       "__signed",               = T_signed)
78 T(_ALL,       __signed__,     "__signed__",             = T_signed)
79 T(_C99|_GNUC, _Complex,       "_Complex",)
80 T(_ALL,       __complex__,    "__complex__",            = T__Complex)
81 T(_ALL,       __complex,      "__complex",              = T__Complex)
82 T(_C99|_GNUC, _Imaginary,     "_Imaginary",)
83 T(_ALL,       __real__,       "__real__",)
84 T(_ALL,       __real,         "__real",                 = T___real__)
85 T(_ALL,       __imag__,       "__imag__",)
86 T(_ALL,       __imag,         "__imag",                 = T___imag__)
87 T(_ALL,       __alignof__,    "__alignof__",)
88 T(_ALL,       __alignof,      "__alignof",              = T___alignof__)
89 T(_MS,        _alignof,       "_alignof",               = T___alignof__)
90 T(_ANSI|_C99, const,          "const",)
91 T(_ALL,       __const,        "__const",                = T_const)
92 T(_ALL,       __const__,      "__const__",              = T_const)
93 T(_C99,       restrict,       "restrict",)
94 T(_ALL,       __restrict__,   "__restrict__",           = T_restrict)
95 T(_ALL,       __restrict,     "__restrict",             = T_restrict)
96 T(_MS,        _restrict,      "_restrict",              = T_restrict)
97 T(_ALL,       asm,            "asm",)
98 T(_ALL,       __asm__,        "__asm__",                = T_asm)
99 T(_MS,        _asm,           "_asm",                   = T_asm)
100 T(_ALL,       __asm,          "__asm",                  = T_asm)
101 T(_ANSI|_C99, volatile,       "volatile",)
102 T(_ALL,       __volatile,     "__volatile",             = T_volatile)
103 T(_ALL,       __volatile__,   "__volatile__",           = T_volatile)
104 T(_C99,       inline,         "inline",)
105 T(_ALL,       __inline,       "__inline",               = T_inline)
106 T(_ALL,       __inline__,     "__inline__",             = T_inline)
107 T(_GNUC,      typeof,         "typeof",)
108 T(_ALL,       __typeof,       "__typeof",               = T_typeof)
109 T(_ALL,       __typeof__,     "__typeof__",             = T_typeof)
110 T(_ALL,       __attribute__,  "__attribute__",)
111
112 T(_ALL,     __builtin_va_start,     "__builtin_va_start",)
113 T(_ALL,     __builtin_stdarg_start, "__builtin_stdarg_start", = T___builtin_va_start)
114
115 T(_MS,      _near,            "_near",)
116 T(_MS,      __near,           "__near",                  = T__near)
117 T(_MS,      _far,             "_far",)
118 T(_MS,      __far,            "__far",                   = T__far)
119 T(_MS,      cdecl,            "cdecl",)
120 T(_MS,      _cdecl,           "_cdecl",                  = T_cdecl)
121 T(_MS,      __cdecl,          "__cdecl",                 = T_cdecl)
122 T(_MS,      _stdcall,         "_stdcall",)
123 T(_MS,      __stdcall,        "__stdcall",               = T__stdcall)
124 T(_MS,      _fastcall,        "_fastcall",)
125 T(_MS,      __fastcall,       "__fastcall",              = T__fastcall)
126 T(_MS,      __thiscall,       "__thiscall",)
127 T(_MS,      _forceinline,     "_forceinline",)
128 T(_MS,      __forceinline,    "__forceinline",           = T__forceinline)
129 T(_MS,      __unaligned,      "__unaligned",)
130 T(_MS,      _assume,          "_assume",)
131 T(_MS,      __assume,         "__assume",                = T__assume)
132 T(_MS,      _try,             "_try",)
133 T(_MS,      __try,            "__try",                   = T__try)
134 T(_MS,      _finally,         "_finally",)
135 T(_MS,      __finally,        "__finally",               = T__finally)
136 T(_MS,      _leave,           "_leave",)
137 T(_MS,      __leave,          "__leave",                 = T__leave)
138 T(_MS,      _except,          "_except",)
139 T(_MS,      __except,         "__except",                = T__except)
140 T(_MS,      _declspec,        "_declspec",)
141 T(_MS,      __declspec,       "__declspec",              = T__declspec)
142 T(_MS,      _based,            "_based",)
143 T(_MS,      __based,          "__based",                 = T__based)
144 T(_MS,      __noop,           "__noop",)
145
146 T(_MS,      __ptr32,          "__ptr32",)
147 T(_MS,      __ptr64,          "__ptr64",)
148 T(_MS,      __sptr,           "__sptr",)
149 T(_MS,      __uptr,           "__uptr",)
150 T(_MS,      _w64,             "_w64",)
151 T(_MS,      __w64,            "__w64",                   = T__w64)
152
153 T(_MS,      _int8,            "_int8",)
154 T(_MS,      __int8,           "__int8",                  = T__int8)
155 T(_MS,      _int16,           "_int16",)
156 T(_MS,      __int16,          "__int16",                 = T__int16)
157 T(_MS,      _int32,           "_int32",)
158 T(_MS,      __int32,          "__int32",                 = T__int32)
159 T(_MS,      _int64,           "_int64",)
160 T(_MS,      __int64,          "__int64",                 = T__int64)
161 T(_MS,      _int128,          "_int128",)
162 T(_MS,      __int128,         "__int128",                = T__int128)
163
164 #undef _T