```   1: /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
2:
3: /*
4:   \$Header: b2nod.h,v 1.4 85/08/22 16:42:43 timo Exp \$
5: */
6:
7: /* Units */
8:
9: typedef intlet typenode;
10:
11: #define _Nodetype(len)   ((len) & 0377)
12: #define _Nbranches(len)  ((len) >> 8)
13: #define Nodetype(v)   _Nodetype((v)->len)
14: #define Nbranches(v)  _Nbranches((v)->len)
15: #define Branch(v, n)  ((Ats(v)+(n)))
16:
17: #define Unit(n)       (n>=HOW_TO && n<=REFINEMENT)
18: #define Command(n)    (n>=SUITE && n<=EXTENDED_COMMAND)
19: #define Expression(n) ((n>=TAG && n<=TAB_DIS)||(n>=TAGformal && n<=TAGzerprd))
20: #define Comparison(n) (n>=LESS_THAN && n<=UNEQUAL)
21:
22: #define HOW_TO          0
23: #define YIELD           1
24: #define TEST            2
25: #define REFINEMENT      3
26:
27: /* Commands */
28:
29: #define SUITE           4
30: #define PUT         5
31: #define INSERT          6
32: #define REMOVE          7
33: #define CHOOSE          8
34: #define DRAW            9
35: #define SET_RANDOM      10
36: #define DELETE          11
37: #define CHECK           12
38: #define SHARE           13
39:
40: #define WRITE           14
43:
44: #define IF          17
45: #define WHILE           18
46: #define FOR         19
47:
48: #define SELECT          20
49: #define TEST_SUITE      21
50: #define ELSE            22
51:
52: #define QUIT            23
53: #define RETURN          24
54: #define REPORT          25
55: #define SUCCEED         26
56: #define FAIL            27
57:
58: #define USER_COMMAND        28
59: #define EXTENDED_COMMAND    29
60:
61: /* Expressions, targets, tests */
62:
63: #define TAG         30
64: #define COMPOUND        31
65:
66: /* Expressions, targets */
67:
68: #define COLLATERAL      32
69: #define SELECTION       33
71: #define CURTAIL         35
72:
73: /* Expressions, tests */
74:
75: #define UNPARSED        36
76:
77: /* Expressions */
78:
79: #define MONF            37
80: #define DYAF            38
81: #define NUMBER          39
82: #define TEXT_DIS        40
83: #define TEXT_LIT        41
84: #define TEXT_CONV       42
85: #define ELT_DIS         43
86: #define LIST_DIS        44
87: #define RANGE_DIS       45
88: #define TAB_DIS         46
89:
90: /* Tests */
91:
92: #define AND         47
93: #define OR          48
94: #define NOT         49
95: #define SOME_IN         50
96: #define EACH_IN         51
97: #define NO_IN           52
98: #define SOME_PARSING        53
99: #define EACH_PARSING        54
100: #define NO_PARSING      55
101: #define MONPRD          56
102: #define DYAPRD          57
103: #define LESS_THAN       58
104: #define AT_MOST         59
105: #define GREATER_THAN        60
106: #define AT_LEAST        61
107: #define EQUAL           62
108: #define UNEQUAL         63
109: #define Nonode          64
110:
111: #define TAGformal       65
112: #define TAGlocal        66
113: #define TAGglobal       67
114: #define TAGmystery      68
115: #define TAGrefinement       69
116: #define TAGzerfun       70
117: #define TAGzerprd       71
118:
119: #define ACTUAL          72
120: #define FORMAL          73
121:
122: value node1();
123: value node2();
124: value node3();
125: value node4();
126: value node5();
127: value node6();
128: value node8();
129: value node9();
130: typenode nodetype();
131: /* Procedure display(); */
132: /* Procedure fix_nodes(); */
133:
134: #define First_fieldnr   0
135:
136: #define UNIT_NAME   First_fieldnr
137: #define HOW_FORMALS First_fieldnr + 1   /* HOW'TO */
138: #define HOW_COMMENT First_fieldnr + 2
139: #define HOW_SUITE   First_fieldnr + 3
140: #define HOW_REFINEMENT  First_fieldnr + 4
141: #define HOW_R_NAMES First_fieldnr + 5
142: #define HOW_NLOCALS First_fieldnr + 6
143: #define FPR_ADICITY First_fieldnr + 1   /* YIELD, TEST */
144: #define FPR_FORMALS First_fieldnr + 2
145: #define FPR_COMMENT First_fieldnr + 3
146: #define FPR_SUITE   First_fieldnr + 4
147: #define FPR_REFINEMENT  First_fieldnr + 5
148: #define FPR_R_NAMES First_fieldnr + 6
149: #define FPR_NLOCALS First_fieldnr + 7
150:
151: #define FML_KEYW    First_fieldnr       /* FORMALS HOW'TO */
152: #define FML_TAG     First_fieldnr + 1
153: #define FML_NEXT    First_fieldnr + 2
154:
155: #define SUI_LINO    First_fieldnr       /* SUITE */
156: #define SUI_CMD     First_fieldnr + 1
157: #define SUI_COMMENT First_fieldnr + 2
158: #define SUI_NEXT    First_fieldnr + 3
159: #define REF_NAME    First_fieldnr       /* REFINEMENT */
160: #define REF_COMMENT First_fieldnr + 1
161: #define REF_SUITE   First_fieldnr + 2
162: #define REF_NEXT    First_fieldnr + 3
163: #define REF_START   First_fieldnr + 4
164:
165: #define PUT_EXPR    First_fieldnr       /* PUT */
166: #define PUT_TARGET  First_fieldnr + 1
167: #define INS_EXPR    First_fieldnr       /* INSERT */
168: #define INS_TARGET  First_fieldnr + 1
169: #define RMV_EXPR    First_fieldnr       /* REMOVE */
170: #define RMV_TARGET  First_fieldnr + 1
171: #define CHS_TARGET  First_fieldnr       /* CHOOSE */
172: #define CHS_EXPR    First_fieldnr + 1
173: #define DRW_TARGET  First_fieldnr       /* DRAW */
174: #define SET_EXPR    First_fieldnr       /* SET'RANDOM */
175: #define DEL_TARGET  First_fieldnr       /* DELETE */
176: #define CHK_TEST    First_fieldnr       /* CHECK */
177: #define SHR_TARGET  First_fieldnr       /* SHARE */
178:
179: #define WRT_L_LINES First_fieldnr       /* WRITE */
180: #define WRT_EXPR    First_fieldnr + 1
181: #define WRT_R_LINES First_fieldnr + 2
182: #define RD_TARGET   First_fieldnr       /* READ */
183: #define RD_EXPR     First_fieldnr + 1
184: #define RDW_TARGET  First_fieldnr       /* READ'RAW */
185:
186: #define IF_TEST     First_fieldnr       /* IF */
187: #define IF_COMMENT  First_fieldnr + 1
188: #define IF_SUITE    First_fieldnr + 2
189: #define WHL_TEST    First_fieldnr       /* WHILE */
190: #define WHL_COMMENT First_fieldnr + 1
191: #define WHL_SUITE   First_fieldnr + 2
192: #define FOR_TARGET  First_fieldnr       /* FOR */
193: #define FOR_EXPR    First_fieldnr + 1
194: #define FOR_COMMENT First_fieldnr + 2
195: #define FOR_SUITE   First_fieldnr + 3
196:
197: #define SLT_COMMENT First_fieldnr       /* SELECT */
198: #define SLT_TSUITE  First_fieldnr + 1
199: #define TSUI_LINO   First_fieldnr       /* TEST SUITE */
200: #define TSUI_TEST   First_fieldnr + 1
201: #define TSUI_COMMENT    First_fieldnr + 2
202: #define TSUI_SUITE  First_fieldnr + 3
203: #define TSUI_NEXT   First_fieldnr + 4
204: #define ELSE_LINO   First_fieldnr       /* ELSE */
205: #define ELSE_COMMENT    First_fieldnr + 1
206: #define ELSE_SUITE  First_fieldnr + 2
207:
208: #define RTN_EXPR    First_fieldnr       /* RETURN */
209: #define RPT_TEST    First_fieldnr       /* REPORT */
210:
211: #define UCMD_NAME   First_fieldnr       /* USER COMMAND */
212: #define UCMD_ACTUALS    First_fieldnr + 1
213: #define UCMD_DEF    First_fieldnr + 2
214: #define ACT_KEYW    First_fieldnr       /* ACTUALS USER COMMAND */
215: #define ACT_EXPR    First_fieldnr + 1
216: #define ACT_NEXT    First_fieldnr + 2
217: #define ACT_START   First_fieldnr + 3
218:
219: #define ECMD_NAME   First_fieldnr       /* EXTENDED COMMAND */
220: #define ECMD_ACTUALS    First_fieldnr + 1
221:
222: #define COMP_FIELD  First_fieldnr       /* COMPOUND */
223: #define COLL_SEQ    First_fieldnr       /* COLLATERAL */
224: #define MON_NAME    First_fieldnr       /* MONADIC FUNCTION */
225: #define MON_RIGHT   First_fieldnr + 1
226: #define MON_FCT     First_fieldnr + 2
227: #define DYA_NAME    First_fieldnr + 1   /* DYADIC FUNCTION */
228: #define DYA_LEFT    First_fieldnr
229: #define DYA_RIGHT   First_fieldnr + 2
230: #define DYA_FCT     First_fieldnr + 3
231: #define TAG_NAME    First_fieldnr       /* TAG */
232: #define TAG_ID      First_fieldnr + 1
233: #define NUM_VALUE   First_fieldnr       /* NUMBER */
234: #define NUM_TEXT    First_fieldnr + 1
235: #define XDIS_QUOTE  First_fieldnr       /* TEXT DIS */
236: #define XDIS_NEXT   First_fieldnr + 1
237: #define XLIT_TEXT   First_fieldnr       /* TEXT LIT */
238: #define XLIT_NEXT   First_fieldnr + 1
239: #define XCON_EXPR   First_fieldnr       /* TEXT CONV */
240: #define XCON_NEXT   First_fieldnr + 1
241: #define LDIS_SEQ    First_fieldnr       /* LIST DIS */
242: #define RDIS_LWB    First_fieldnr       /* RANGE DIS */
243: #define RDIS_UPB    First_fieldnr + 1
244: #define TDIS_SEQ    First_fieldnr       /* TAB_DIS */
245: #define SEL_TABLE   First_fieldnr       /* SELECTION */
246: #define SEL_KEY     First_fieldnr + 1
247: #define TRIM_LEFT   First_fieldnr       /* BEHEAD, CURTAIL */
248: #define TRIM_RIGHT  First_fieldnr + 1
249: #define UNP_SEQ     First_fieldnr       /* UNPARSED */
250: #define UNP_TEXT    First_fieldnr + 1
251:
252: #define AND_LEFT    First_fieldnr       /* AND */
253: #define AND_RIGHT   First_fieldnr + 1
254: #define OR_LEFT     First_fieldnr       /* OR */
255: #define OR_RIGHT    First_fieldnr + 1
256: #define NOT_RIGHT   First_fieldnr       /* NOT */
257: #define QUA_TARGET  First_fieldnr       /* QUANTIFICATION */
258: #define QUA_EXPR    First_fieldnr + 1
259: #define QUA_TEST    First_fieldnr + 2
260: #define REL_LEFT    First_fieldnr       /* ORDER TEST */
261: #define REL_RIGHT   First_fieldnr + 1
```

#### Defined macros

ACTUAL defined in line 119; used 1 times
AND_LEFT defined in line 252; never used
AND_RIGHT defined in line 253; never used
CHK_TEST defined in line 176; never used
CHS_EXPR defined in line 172; never used
CHS_TARGET defined in line 171; never used
COMP_FIELD defined in line 222; never used
DEL_TARGET defined in line 175; never used
DRW_TARGET defined in line 173; never used
ECMD_ACTUALS defined in line 220; used 1 times
ECMD_NAME defined in line 219; used 1 times
ELSE_COMMENT defined in line 205; never used
ELSE_LINO defined in line 204; never used
ELSE_SUITE defined in line 206; never used
Expression defined in line 19; used 1 times
FML_KEYW defined in line 151; used 2 times
FML_TAG defined in line 152; used 1 times
FORMAL defined in line 120; used 1 times
FOR_COMMENT defined in line 194; never used
FOR_EXPR defined in line 193; never used
FOR_SUITE defined in line 195; never used
FOR_TARGET defined in line 192; never used
FPR_ADICITY defined in line 143; used 1 times
FPR_COMMENT defined in line 145; never used
FPR_FORMALS defined in line 144; used 1 times
FPR_NLOCALS defined in line 149; used 1 times
FPR_REFINEMENT defined in line 147; used 2 times
FPR_SUITE defined in line 146; used 2 times
HOW_COMMENT defined in line 138; never used
HOW_NLOCALS defined in line 142; used 1 times
HOW_REFINEMENT defined in line 140; used 1 times
HOW_SUITE defined in line 139; used 1 times
IF_COMMENT defined in line 187; never used
IF_SUITE defined in line 188; never used
IF_TEST defined in line 186; never used
INS_EXPR defined in line 167; never used
INS_TARGET defined in line 168; never used
LDIS_SEQ defined in line 241; used 1 times
NOT_RIGHT defined in line 256; never used
NUM_TEXT defined in line 234; never used
NUM_VALUE defined in line 233; used 1 times
Nbranches defined in line 14; used 2 times
OR_LEFT defined in line 254; never used
OR_RIGHT defined in line 255; never used
PUT_EXPR defined in line 165; never used
PUT_TARGET defined in line 166; never used
QUA_EXPR defined in line 258; never used
QUA_TARGET defined in line 257; never used
QUA_TEST defined in line 259; never used
RDIS_LWB defined in line 242; never used
RDIS_UPB defined in line 243; never used
RDW_TARGET defined in line 184; never used
RD_EXPR defined in line 183; never used
RD_TARGET defined in line 182; never used
REF_COMMENT defined in line 160; never used
REF_NAME defined in line 159; used 1 times
REF_NEXT defined in line 162; used 1 times
REF_SUITE defined in line 161; never used
REL_RIGHT defined in line 261; used 1 times
RMV_EXPR defined in line 169; never used
RMV_TARGET defined in line 170; never used
RPT_TEST defined in line 209; never used
RTN_EXPR defined in line 208; never used
SEL_KEY defined in line 246; never used
SEL_TABLE defined in line 245; never used
SET_EXPR defined in line 174; never used
SHR_TARGET defined in line 177; never used
SLT_COMMENT defined in line 197; never used
SLT_TSUITE defined in line 198; never used
SUI_CMD defined in line 156; used 1 times
SUI_COMMENT defined in line 157; never used
SUI_LINO defined in line 155; used 1 times
SUI_NEXT defined in line 158; never used
TAB_DIS defined in line 88; used 3 times
TAG_ID defined in line 232; used 8 times
TAGformal defined in line 111; used 4 times
TDIS_SEQ defined in line 244; used 1 times
TEXT_CONV defined in line 84; used 1 times
TEXT_LIT defined in line 83; used 3 times
TRIM_LEFT defined in line 247; never used
TRIM_RIGHT defined in line 248; never used
TSUI_COMMENT defined in line 201; never used
TSUI_LINO defined in line 199; never used
TSUI_NEXT defined in line 203; never used
TSUI_SUITE defined in line 202; never used
TSUI_TEST defined in line 200; never used
UNEQUAL defined in line 108; used 3 times
UNIT_NAME defined in line 136; used 2 times
UNP_SEQ defined in line 249; used 1 times
UNP_TEXT defined in line 250; used 2 times
WHL_COMMENT defined in line 190; never used
WHL_SUITE defined in line 191; never used
WHL_TEST defined in line 189; never used
XCON_EXPR defined in line 239; used 1 times
XDIS_NEXT defined in line 236; used 1 times
XDIS_QUOTE defined in line 235; used 1 times
_Nbranches defined in line 12; used 2 times
_Nodetype defined in line 11; used 1 times
• in line 13

#### Usage of this include

 Last modified: 1985-08-27 Generated: 2016-12-26 Generated by src2html V0.67 page hit count: 5668