Remove the token registration macro TS.
authorChristoph Mallon <christoph.mallon@gmx.de>
Tue, 3 Jul 2012 10:52:24 +0000 (12:52 +0200)
committerChristoph Mallon <christoph.mallon@gmx.de>
Tue, 3 Jul 2012 10:57:15 +0000 (12:57 +0200)
T is sufficient.

token.c
token_t.h
tokens.inc

diff --git a/token.c b/token.c
index 1177945..f8c3752 100644 (file)
--- a/token.c
+++ b/token.c
@@ -70,9 +70,7 @@ void init_tokens(void)
        memset(token_symbols, 0, T_LAST_TOKEN * sizeof(token_symbols[0]));
 
 #define T(mode,x,str,val)  register_token(mode, x, str);
-#define TS(x,str,val)      intern_register_token(x, str);
 #include "tokens.inc"
-#undef TS
 #undef T
 
 #define T(token) register_pp_token(TP_##token, #token);
index 9f3d73e..20c64ad 100644 (file)
--- a/token_t.h
+++ b/token_t.h
@@ -29,9 +29,7 @@
 typedef enum token_kind_tag_t {
        T_NULL  =  0,
 #define T(mode,x,str,val) x val,
-#define TS(x,str,val)     x val,
 #include "tokens.inc"
-#undef TS
 #undef T
        T_LAST_TOKEN
 } token_kind_tag_t;
index eab05be..4768d49 100644 (file)
@@ -1,7 +1,3 @@
-#ifndef TS
-#define TS(x,str,val)
-#endif
-
 /* These must go first. Some set explicit values. */
 #define ALTERNATE(name, val)          T(_CXX, T_##name, #name,  val)
 #define PUNCTUATOR(name, string, val) T(_ALL, T_##name, string, val)
@@ -9,7 +5,7 @@
 #undef PUNCTUATOR
 #undef ALTERNATE
 
-#define S(name, description) TS(T_##name, description,)
+#define S(name, description) T(_ALL, T_##name, description,)
 S(EOF,                "end of input")
 S(IDENTIFIER,         "identifier")
 S(NUMBER,             "number constant")