ack/util/grind/tree.hh

34 lines
739 B
C++
Raw Normal View History

1990-08-31 18:22:53 +00:00
/* $Header$ */
#define MAXARGS 3
typedef struct tree {
1990-09-07 14:56:24 +00:00
short t_oper; /* tree operator */
short t_whichoper; /* expression operator */
1990-08-31 18:22:53 +00:00
t_addr t_address; /* some operators use an address */
union {
long tt_ival;
1990-09-07 14:56:24 +00:00
char *tt_sval;
double tt_fval;
1990-08-31 18:22:53 +00:00
struct {
struct idf *tt_idf;
char *tt_str;
} tt_x;
struct tree *tt_args[MAXARGS];
t_position tt_pos;
} t_xxxx;
#define t_ival t_xxxx.tt_ival
1990-09-07 14:56:24 +00:00
#define t_sval t_xxxx.tt_sval
#define t_fval t_xxxx.tt_fval
1990-08-31 18:22:53 +00:00
#define t_idf t_xxxx.tt_x.tt_idf
#define t_str t_xxxx.tt_x.tt_str
#define t_args t_xxxx.tt_args
#define t_lino t_xxxx.tt_pos.lineno
#define t_filename t_xxxx.tt_pos.filename
#define t_pos t_xxxx.tt_pos
} t_tree, *p_tree;
/* ALLOCDEF "tree" 100 */
extern p_tree mknode();