X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=token_t.h;h=27832f8a06d870dffa996b6fc7f96a1c0a477eed;hb=353985d8d06fcac2f36682820b8ae635c5e6162e;hp=be48841cafae76aea7271e879effb6c9afea3c15;hpb=fbad4d6c6c4f43d7ae379d1ff48c1c1c21768edf;p=cparser diff --git a/token_t.h b/token_t.h index be48841..27832f8 100644 --- a/token_t.h +++ b/token_t.h @@ -16,13 +16,29 @@ typedef enum { T_ERROR = -2 } token_type_t; +typedef enum { +#define T(x,str,val) TP_##x val, +#define TS(x,str,val) TP_##x val, +#include "tokens_preprocessor.inc" +#undef TS +#undef T +} preprocessor_token_type_t; + +typedef struct source_position_t source_position_t; +struct source_position_t { + const char *input_name; + unsigned linenr; +}; + typedef struct { int type; union { symbol_t *symbol; int intvalue; + double floatvalue; const char *string; } v; + source_position_t source_position; } token_t; void init_tokens(void);