implemented anchor set
[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(_ANSI|_C99, signed)
39 S(_ALL, sizeof)
40 S(_ALL, static)
41 S(_ALL, struct)
42 S(_ALL, switch)
43 S(_ALL, typedef)
44 S(_ALL, union)
45 S(_ALL, unsigned)
46 S(_ALL, void)
47 S(_ALL, while)
48
49 S(_C99|_GNUC, _Bool)
50 S(_C99|_GNUC, _Complex)
51 S(_C99|_GNUC, _Imaginary)
52 S(_GNUC, __thread)
53 S(_GNUC, __extension__)
54 S(_GNUC, __builtin_classify_type)
55 S(_GNUC, __builtin_va_list)
56 S(_GNUC, __builtin_expect)
57 S(_GNUC, __builtin_offsetof)
58 S(_GNUC, __builtin_va_arg)
59 S(_GNUC, __builtin_va_end)
60 S(_GNUC, __builtin_alloca)
61 S(_GNUC, __builtin_nanf)
62 S(_GNUC, __builtin_nan)
63 S(_GNUC, __builtin_nand)
64 S(_GNUC, __builtin_isgreater)
65 S(_GNUC, __builtin_isgreaterequal)
66 S(_GNUC, __builtin_isless)
67 S(_GNUC, __builtin_islessequal)
68 S(_GNUC, __builtin_islessgreater)
69 S(_GNUC, __builtin_isunordered)
70 S(_GNUC, __builtin_constant_p)
71 S(_GNUC, __builtin_prefetch)
72 S(_GNUC, __PRETTY_FUNCTION__)
73 S(_ALL, __FUNCTION__)
74 S(_C99, __func__)
75 #undef S
76
77 T(_GNUC,      __real__,       "__real__",)
78 T(_GNUC,      __real,         "__real",                 = T___real__)
79 T(_GNUC,      __imag__,       "__imag__",)
80 T(_GNUC,      __imag,         "__imag",                 = T___imag__)
81 T(_GNUC|_MS,  __alignof__,    "__alignof__",)
82 T(_GNUC|_MS,  __alignof,      "__alignof",              = T___alignof__)
83 T(_MS,        _alignof,       "_alignof",               = T___alignof__)
84 T(_ANSI|_C99, const,          "const",)
85 T(_GNUC,      __const,        "__const",                = T_const)
86 T(_C99,       restrict,       "restrict",)
87 T(_GNUC,      __restrict__,   "__restrict__",           = T_restrict)
88 T(_GNUC,      __restrict,     "__restrict",             = T_restrict)
89 T(_MS,        _restrict,      "_restrict",              = T_restrict)
90 T(_ALL,       asm,            "asm",)
91 T(_GNUC,      __asm__,        "__asm__",                = T_asm)
92 T(_MS,        _asm,           "_asm",                   = T_asm)
93 T(_GNUC|_MS,  __asm,          "__asm",                  = T_asm)
94 T(_ANSI|_C99, volatile,       "volatile",)
95 T(_GNUC,      __volatile__,   "__volatile__",           = T_volatile)
96 T(_C99,       inline,         "inline",)
97 T(_GNUC|_MS,  __inline,       "__inline",               = T_inline)
98 T(_GNUC,      __inline__,     "__inline__",             = T_inline)
99 T(_GNUC,      typeof,         "typeof",)
100 T(_GNUC,      __typeof,       "__typeof",               = T_typeof)
101 T(_GNUC,      __typeof__,     "__typeof__",             = T_typeof)
102 T(_GNUC,      __attribute__,  "__attribute__",)
103
104 T(_GNUC,     __builtin_va_start,     "__builtin_va_start",)
105 T(_GNUC,     __builtin_stdarg_start, "__builtin_stdarg_start", = T___builtin_va_start)
106
107 T(_MS,       near,            "_near",)
108 T(_MS,       _near,           "__near",                  = T_near)
109 T(_MS,       far,             "_far",)
110 T(_MS,       _far,            "__far",                   = T_far)
111 T(_MS,      cdecl,            "cdecl",)
112 T(_MS,      _cdecl,           "_cdecl",                  = T_cdecl)
113 T(_MS,      __cdecl,          "__cdecl",                 = T_cdecl)
114 T(_MS,      stdcall,          "_stdcall",)
115 T(_MS,      __stdcall,        "__stdcall",               = T_stdcall)
116 T(_MS,      fastcall,         "_fastcall",)
117 T(_MS,      __fastcall,       "__fastcall",              = T_fastcall)
118 T(_MS,      thiscall,         "_thiscall",)
119 T(_MS,      __thiscall,       "__thiscall",              = T_thiscall)
120 T(_MS,      forceinline,      "_forceinline",)
121 T(_MS,      __forceinline,    "__forceinline",           = T_forceinline)
122 T(_MS,      unaligned,        "_unaligned",)
123 T(_MS,      __unaligned,      "__unaligned",             = T_unaligned)
124 T(_MS,      assume,           "_assume",)
125 T(_MS,      __assume,         "__assume",                = T_assume)
126 T(_MS,      try,              "_try",)
127 T(_MS,      __try,            "__try",                   = T_try)
128 T(_MS,      finally,          "_finally",)
129 T(_MS,      __finally,        "__finally",               = T_finally)
130 T(_MS,      leave,            "_leave",)
131 T(_MS,      __leave,          "__leave",                 = T_leave)
132 T(_MS,      except,           "_except",)
133 T(_MS,      __except,         "__except",                = T_except)
134 T(_MS,      declspec,         "_declspec",)
135 T(_MS,      __declspec,       "__declspec",              = T_declspec)
136 T(_MS,      based,            "_based",)
137 T(_MS,      __based,          "__based",                 = T_based)
138
139 T(_MS,      ptr32,            "__ptr32",)
140 T(_MS,      ptr64,            "__ptr64",)
141 T(_MS,      sptr,             "__sptr",)
142 T(_MS,      uptr,             "__uptr",)
143 T(_MS,      w64,              "__w64",)
144
145 T(_MS,      int8,             "_int8",)
146 T(_MS,      __int8,           "__int8",                  = T_int8)
147 T(_MS,      int16,            "_int16",)
148 T(_MS,      __int16,          "__int16",                 = T_int16)
149 T(_MS,      int32,            "_int32",)
150 T(_MS,      __int32,          "__int32",                 = T_int32)
151 T(_MS,      int64,            "_int64",)
152 T(_MS,      __int64,          "__int64",                 = T_int64)
153
154 #undef _T