ack/lang/m2/comp/LLlex.h

29 lines
664 B
C
Raw Normal View History

1986-03-26 15:11:02 +00:00
/* T O K E N D E S C R I P T O R D E F I N I T I O N */
1986-03-20 14:52:03 +00:00
/* $Header$ */
struct token {
int tk_symb; /* token itself */
1986-03-24 17:29:57 +00:00
int tk_lineno; /* linenumber on which it occurred */
1986-03-20 14:52:03 +00:00
union {
struct idf *tk_idf; /* IDENT */
char *tk_str; /* STRING */
struct { /* INTEGER */
1986-03-26 15:11:02 +00:00
struct type *tk_type; /* type */
arith tk_value; /* value */
1986-03-20 14:52:03 +00:00
} tk_int;
char *tk_real; /* REAL */
} tk_data;
};
#define TOK_IDF tk_data.tk_idf
#define TOK_STR tk_data.tk_str
#define TOK_ITP tk_data.tk_int.tk_type
#define TOK_INT tk_data.tk_int.tk_value
#define TOK_REL tk_data.tk_real
extern struct token dot, aside;
#define DOT dot.tk_symb
#define ASIDE aside.tk_symb