1: /*
2: * Copyright (c) 1980 Regents of the University of California.
3: * All rights reserved. The Berkeley software License Agreement
4: * specifies the terms and conditions for redistribution.
5: *
6: * @(#)opinfo.h 5.1 (Berkeley) 6/6/85
7: */
8:
9: /*
10: * Tree operator definitions.
11: */
12:
13: struct opinfo {
14: short opflags;
15: char *opstring;
16: };
17:
18: OPINFO opinfo[];
19:
20: #define O_NOP 0 /* no op */
21: #define O_NAME 1 /* leaf op for address of a variable */
22: #define O_QNAME 2 /* variable qualified by surrounding block */
23: #define O_LCON 3 /* long constant (i.e. integer) */
24: #define O_FCON 4 /* floating constant (i.e. real) */
25: #define O_SCON 5 /* string constant (type alfa) */
26: #define O_INDEX 6 /* array subscript (does just one index) */
27: #define O_INDIR 7 /* indirection through a pointer */
28: #define O_RVAL 8 /* get value of an operand address */
29: #define O_COMMA 9 /* as in parameter lists */
30:
31: /*
32: * arithmetic operators
33: */
34:
35: #define O_ITOF 10 /* convert integer to real */
36: #define O_ADD 11
37: #define O_ADDF 12
38: #define O_SUB 13
39: #define O_SUBF 14
40: #define O_NEG 15
41: #define O_NEGF 16
42: #define O_MUL 17
43: #define O_MULF 18
44: #define O_DIVF 19 /* real divided by real */
45: #define O_DIV 20 /* integer divided by integer, integer result */
46: #define O_MOD 21
47:
48: /*
49: * logical operators
50: */
51:
52: #define O_AND 22
53: #define O_OR 23
54:
55: /*
56: * relational operators
57: */
58:
59: #define O_LT 24
60: #define O_LTF 25
61: #define O_LE 26
62: #define O_LEF 27
63: #define O_GT 28
64: #define O_GTF 29
65: #define O_GE 30
66: #define O_GEF 31
67: #define O_EQ 32
68: #define O_EQF 33
69: #define O_NE 34
70: #define O_NEF 35
71:
72: /*
73: * debugger commands
74: */
75:
76: #define O_ASSIGN 36
77: #define O_CHFILE 37
78: #define O_CONT 38
79: #define O_LIST 39
80: #define O_NEXT 40
81: #define O_PRINT 41
82: #define O_STEP 42
83: #define O_WHATIS 43
84: #define O_WHERE 44
85: #define O_XI 45
86: #define O_XD 46
87: #define O_CALL 47
88: #define O_EDIT 48
89: #define O_DUMP 49
90: #define O_HELP 50
91: #define O_REMAKE 51
92: #define O_RUN 52
93: #define O_SOURCE 53
94: #define O_STATUS 54
95: #define O_TRACE 55
96: #define O_TRACEI 56
97: #define O_STOP 57
98: #define O_STOPI 58
99: #define O_DELETE 59
100: #define O_WHICH 60
101: #define O_QLINE 61 /* filename : linenumber */
102: #define O_ALIAS 62
103: #define O_GRIPE 63
104:
105: #define O_LASTOP 63 /* must be number of last operator */
106:
107: /*
108: * operator flags and predicates
109: */
110:
111: #define LEAF 01
112: #define UNARY 02
113: #define BINARY 04
114: #define BOOL 010
115: #define REALOP 020
116: #define INTOP 040
117:
118: #define isbitset(a, m) ((a&m) == m)
119: #define isleaf(o) isbitset(opinfo[o].opflags, LEAF)
120: #define isunary(o) isbitset(opinfo[o].opflags, UNARY)
121: #define isbinary(o) isbitset(opinfo[o].opflags, BINARY)
122: #define isreal(o) isbitset(opinfo[o].opflags, REALOP)
123: #define isint(o) isbitset(opinfo[o].opflags, INTOP)
124: #define isboolean(o) isbitset(opinfo[o].opflags, BOOL)
125:
126: #define degree(o) (opinfo[o].opflags&(LEAF|UNARY|BINARY))
Defined struct's
Defined macros
BOOL
defined in line
114; used 1 times
INTOP
defined in line
116; used 16 times
LEAF
defined in line
111; used 9 times
O_ADD
defined in line
36;
never used
O_AND
defined in line
52;
never used
O_DIV
defined in line
45;
never used
O_EQ
defined in line
67;
never used
O_EQF
defined in line
68;
never used
O_GE
defined in line
65;
never used
O_GEF
defined in line
66;
never used
O_GT
defined in line
63;
never used
O_GTF
defined in line
64;
never used
O_LE
defined in line
61;
never used
O_LEF
defined in line
62;
never used
O_LT
defined in line
59;
never used
O_LTF
defined in line
60;
never used
O_MOD
defined in line
46;
never used
O_MUL
defined in line
42;
never used
O_NE
defined in line
69;
never used
O_NEF
defined in line
70;
never used
O_NEG
defined in line
40;
never used
O_NOP
defined in line
20;
never used
O_OR
defined in line
53;
never used
O_RUN
defined in line
92;
never used
O_SUB
defined in line
38;
never used
O_XD
defined in line
86;
never used
O_XI
defined in line
85;
never used
Usage of this include