* Copyright (c) 1980 The Regents of the University of California.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* @(#)opinfo.h 5.2 (Berkeley) 4/16/91
* 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 63 /* 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))