2 * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
3 * See the copyright notice in the ACK home directory, in the file "Copyright".
5 * Author: Ceriel J.H. Jacobs
8 /* 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 */
10 /* $Id: LLlex.h,v 1.22 1994/06/24 12:39:31 ceriel Exp $ */
14 /* Structure to store a string constant
17 unsigned s_length; /* length of a string */
18 char *s_str; /* the string itself */
22 struct string *tk_str;
31 struct node *tky_next;
34 struct node *tkx_left, *tkx_right;
37 #define tk_left tk_x.tkx_left
38 #define tk_right tk_x.tkx_right
39 #define tk_next tk_y.tky_next
40 #define tk_idf tk_y.tk_yy.tky_idf
41 #define tk_def tk_y.tk_yy.tky_def
42 #define tk_set tk_y.tk_yy.tky_set
44 /* Token structure. Keep it small, as it is part of a parse-tree node
47 short tk_symb; /* token itself */
48 unsigned short tk_lineno; /* linenumber on which it occurred */
49 union tk_attr tk_data;
52 typedef struct token t_token;
54 #define TOK_IDF tk_data.tk_idf
55 #define TOK_SSTR tk_data.tk_str
56 #define TOK_STR tk_data.tk_str->s_str
57 #define TOK_SLE tk_data.tk_str->s_length
58 #define TOK_INT tk_data.tk_int
59 #define TOK_REAL tk_data.tk_real
60 #define TOK_RSTR tk_data.tk_real->r_real
61 #define TOK_RVAL tk_data.tk_real->r_val
63 extern t_token dot, aside;
64 extern struct type *toktype;
66 #define DOT dot.tk_symb
67 #define ASIDE aside.tk_symb
70 extern int tk_nmb_at_last_syn_err;