X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=tokens.inc;h=11f4a7ffa5b5c2a2978c8400d6a637b6685b0903;hb=c2564629583b7a0969aa0102d628f065b1ed66d3;hp=d6d6483a187c3d0d282f7915db7168f4cf35c49f;hpb=85501c9cb6a97b8b1c1fea0705756a9f347e6402;p=cparser diff --git a/tokens.inc b/tokens.inc index d6d6483..11f4a7f 100644 --- a/tokens.inc +++ b/tokens.inc @@ -10,9 +10,11 @@ TS(FLOATINGPOINT, "floatingpoint number",) TS(STRING_LITERAL, "string literal",) TS(WIDE_STRING_LITERAL, "wide string literal",) -#define PUNCTUATOR(name,string,val) T(_ALL,name,string,val) +#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 #define S(mode,x) T(mode,x,#x,) S(_ALL, auto) @@ -45,6 +47,43 @@ S(_ALL, unsigned) S(_ALL, void) S(_ALL, while) +/* C++ keywords */ +#undef bool +S(_CXX, bool) +#define bool _Bool +S(_CXX, catch) +S(_CXX, class) +S(_CXX, const_cast) +S(_CXX, delete) +S(_CXX, dynamic_cast) +S(_CXX, explicit) +S(_CXX, export) +#undef false +S(_CXX, false) +#define false 0 +S(_CXX, friend) +S(_CXX, mutable) +S(_CXX, namespace) +S(_CXX, new) +S(_CXX, operator) +S(_CXX, private) +S(_CXX, protected) +S(_CXX, public) +S(_CXX, reinterpret_cast) +S(_CXX, static_cast) +S(_CXX, template) +S(_CXX, this) +S(_CXX, throw) +#undef true +S(_CXX, true) +#define true 1 +S(_CXX, try) +S(_CXX, typeid) +S(_CXX, typename) +S(_CXX, using) +S(_CXX, virtual) +S(_CXX, wchar_t) + S(_C99|_GNUC, _Bool) S(_ALL, __thread) S(_ALL, __extension__) @@ -129,7 +168,7 @@ S(_ALL, __asm, = T_asm) S(_ANSI|_C99, volatile, ) S(_ALL, __volatile, = T_volatile) S(_ALL, __volatile__, = T_volatile) -S(_C99, inline, ) +S(_C99|_CXX, inline, ) S(_ALL, __inline, = T_inline) S(_ALL, __inline__, = T_inline) S(_GNUC, typeof, )