/* Copyright (c) 1982 Regents of the University of California */
static char sccsid
[] = "@(#)opinfo.h 1.1 %G%";
* tree operator definitions
#define O_NOP 0 /* no op */
#define O_NAME 1 /* leaf op for address of a variable */
#define O_QNAME 2 /* variable qualified by surrounding block */
#define O_LCON 3 /* long constant (i.e. integer) */
#define O_FCON 4 /* floating constant (i.e. real) */
#define O_SCON 5 /* string constant (type alfa) */
#define O_INDEX 6 /* array subscript (does just one index) */
#define O_INDIR 7 /* indirection through a pointer */
#define O_RVAL 8 /* get value of an operand address */
#define O_COMMA 9 /* as in parameter lists */
#define O_ITOF 10 /* convert integer to real */
#define O_DIVF 19 /* real divided by real */
#define O_DIV 20 /* integer divided by integer, integer result */
#define O_QLINE 61 /* filename : linenumber */
#define O_LASTOP 62 /* must be number of last operator */
* operator flags and predicates
#define isbitset(a, m) ((a&m) == m)
#define isleaf(o) isbitset(opinfo[o].opflags, LEAF)
#define isunary(o) isbitset(opinfo[o].opflags, UNARY)
#define isbinary(o) isbitset(opinfo[o].opflags, BINARY)
#define isreal(o) isbitset(opinfo[o].opflags, REALOP)
#define isint(o) isbitset(opinfo[o].opflags, INTOP)
#define isboolean(o) isbitset(opinfo[o].opflags, BOOL)
#define degree(o) (opinfo[o].opflags&(LEAF|UNARY|BINARY))