X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=tokens_preprocessor.inc;h=cad600b58d7e803e92b3886e6334f1ae8c7c70ed;hb=b63886b188eeedf36d8df12df3fe1f5fd90818d4;hp=e2ab81de88a4b4acc4928331fff421259c8f6c16;hpb=6ff85b6a89c74076dc516e3a38bc26bd80c37fa5;p=cparser diff --git a/tokens_preprocessor.inc b/tokens_preprocessor.inc index e2ab81d..cad600b 100644 --- a/tokens_preprocessor.inc +++ b/tokens_preprocessor.inc @@ -1,3 +1,23 @@ +#ifndef TS +#define TS(x,str,val) +#endif + +TS(HEADERNAME, "header name", = 256) +TS(IDENTIFIER, "identifier",) +TS(NUMBER, "number",) +TS(CHARACTER_CONSTANT, "character constant",) +TS(WIDE_CHARACTER_CONSTANT, "character constant",) +TS(STRING_LITERAL, "string literal",) +TS(WIDE_STRING_LITERAL, "wide string literal",) +TS(PUNCTUATOR, "punctuator",) +TS(NEWLINE, "newline", = '\n') + +#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(x) T(_ALL,x,#x,) S(if) @@ -13,6 +33,17 @@ S(line) S(error) S(pragma) -#undef S +S(defined) +T(_ALL, va_args, "__VA_ARGS__",) +T(_MS, __COUNTER__, "__COUNTER__",) +T(_MS, __TIMESTAMP__, "__TIMESTAMP__",) + +S(STDC) +S(ON) +S(OFF) +S(DEFAULT) +S(FP_CONTRACT) +S(FENV_ACCESS) +S(CX_LIMITED_RANGE) -#define TP_LAST_TOKEN (TP_pragma + 1) +#undef S