1 /* BEGIN INCLUDE FILE ..... rgl_tree.incl.pl1 ..... 12/14/76 J Falksen */
  2 
  3 dcl  space area based(area_ptr);
  4 dcl  area_ptr ptr;
  5 
  6 dcl tree_ptr ptr;
  7 dcl 1 tree based(tree_ptr),
  8           2 table,                      /* symbol table */
  9             3 (b,e) ptr unal,
 10           2 parm_pos like tree.table,   /* positional parameter dcl */
 11           2 ppos_ct fixed bin,
 12           2 parm_key like tree.table,   /* keyword parameter dcl */
 13           2 pkey_ct fixed bin,
 14           2 parm_check like tree.table, /* STOP list, after all parms processed */
 15           2 input   like tree.table,    /* input declaration */
 16           2 input_check like tree.table,/* STOP/SKIP list, record level */
 17           2 rec_str fixed bin(17)unal,  /* -2 STREAM, -1 RECORD, >0 RECORD n */
 18           2 res_siz fixed bin(17)unal,  /* size of record area to set aside */
 19           2 from    ptr unal, /* FILE | ATTACH */
 20           2 local   like tree.table,    /* local declaration list */
 21           2 report  like tree.table,    /* report description list */
 22           2 phase0  like tree.table,
 23           2 hold    like tree.table,    /* hold list */
 24           2 exec    like tree.table,    /* executable list */
 25           2 sourcep ptr unal,           /* pointer to source segment */
 26           2 bits,
 27             3 mmddyy bit(1)unal,
 28             3 yyddd bit(1)unal,
 29             3 month bit(1)unal,
 30             3 day bit(1)unal,
 31             3 hhmmss bit(1)unal,
 32             3 filler bit(31)unal;
 33 
 34 dcl       symtabptr ptr;
 35 dcl 1 symtab based(symtabptr),
 36           2 hdr,                        /* "ID" | "NU" | "ST" */
 37             3 type char(2)unal,
 38             3 fill bit(90)unal,
 39             3 next ptr unal,
 40           2 use like tree.table,        /* list of usage of this symbol */
 41           2 leng    fixed bin(24),      /* length of data */
 42           2 data    char(symbol_leng refer(symtab.leng));   /* symbol data */
 43 dcl       symbol_leng         fixed bin(24);
 44 
 45 dcl       daptr     ptr;
 46 dcl 1 datum based(daptr),
 47           2 hdr like stmt.hdr,          /* "DC", "IN" */
 48           2 kind    fixed bin(17)unal,  /* kind of field */
 49           2 leng    fixed bin(17)unal,
 50           2 pos     fixed bin,          /* IN position */
 51           2 check like tree.table,      /* SKIP/STOP list, field level */
 52           2 datal like tree.table;
 53 
 54 dcl       srefptr   ptr;
 55 dcl 1 symref based(srefptr),
 56           2 hdr like stmt.hdr,          /* "SY" */
 57           2 kind fixed bin(17)unal;
 58 
 59 dcl       opptr     ptr;
 60 dcl 1 opn based(opptr),
 61           2 hdr like stmt.hdr,          /* "OP" */
 62           2 op      fixed bin(17)unal,            /* operation */
 63           2 kind    fixed bin(17)unal,
 64           2 op1     ptr unal,                     /* first operand */
 65           2 op2     ptr unal,                     /* second operand,   if any */
 66           2 op3     ptr unal;                     /* third operand, if any */
 67 
 68 dcl  headptr ptr;
 69 dcl 1 head based(headptr),
 70           2 hdr like stmt.hdr,          /* "HD" */
 71           2 list like tree.table;
 72 
 73 dcl       repptr    ptr;
 74 dcl 1 report based(repptr),
 75           2 hdr like stmt.hdr,          /* "RP" */
 76           2 pw      fixed bin(24),      /* PAGEWIDTH */
 77           2 pl      fixed bin(24),      /* PAGELENGTH */
 78           2 minl    fixed bin(24),      /* MINLINE */
 79           2 maxl    fixed bin(24),      /* MAXLINE */
 80           2 onlist  like tree.table,    /* ON list */
 81           2 brlist  like tree.table,    /* BREAK list */
 82           2 part    like tree.table;    /* part list */
 83 
 84 dcl       partptr   ptr;
 85 dcl 1 part          based(partptr),
 86           2 hdr like stmt.hdr,          /* "RH", "PH", "DH", "DT", "DF", "PF", "RF" */
 87           2 maxl    fixed bin,
 88           2 ctl     ptr unal,           /* IF */
 89           2 lines   like tree.table;    /* line list */
 90 
 91 dcl       linptr    ptr;
 92 dcl 1 lines based(linptr),
 93           2 hdr like stmt.hdr,          /* "LN" */
 94           2 number  fixed bin(17)unal,  /* <0 absolute line, >0 relative line */
 95           2 ctl     ptr unal, /* IF */
 96           2 field   like tree.table;    /* field list */
 97 
 98 dcl       fldptr    ptr;
 99 dcl 1 field based(fldptr),
100           2 hdr like stmt.hdr,          /* "FD" */
101           2 value   like tree.table,    /* value list */
102           2 let     like tree.table,    /* LET list */
103           2 kind    fixed bin(17)unal,  /* kind of field */
104           2 align   fixed bin(17)unal,  /* alignment of field */
105           2 alch    char(1)unal,                  /* align character */
106           2 bsp     bit(1)unal,
107           2 XXX     bit(26)unal,
108           2 fill(2) fixed bin(17)unal,  /* fill indents */
109           2 col     fixed bin(24),      /* COLUMN */
110           2 leng    fixed bin(24),      /* length of field or mask */
111           2 data    ptr unal; /* mask  */
112 
113 dcl       valptr    ptr;
114 dcl 1 value based(valptr),
115           2 hdr like stmt.hdr,          /* "VL", "FL", "SW", "AT" */
116           2 numb    fixed bin(24),
117           2 ctl     ptr unal; /* if control */
118 
119 dcl       atptr     ptr;
120 dcl 1 attr based(atptr),
121           2 hdr like stmt.hdr,          /* "DV" | "KY" */
122           2 attr,
123            3 asc    bit(1)unal,         /* ASCending key */
124            3 des    bit(1)unal,         /* DEScending key */
125            3 fill   bit(16)unal;
126 
127 dcl       paptr     ptr;
128 dcl 1 param based(paptr),
129           2 hdr like stmt.hdr,          /* "PM" */
130           2 kind    fixed bin(17)unal,
131           2 attr    like tree.table,    /* attribute (default and keyword) list */
132           2 check   like tree.table,    /* STOP list, parameter level */
133           2 leng    fixed bin(24);
134 
135 dcl       stmtptr   ptr;
136 dcl 1 stmt based(stmtptr),
137           2 hdr,                                  /* "IF", ":=" "=:", "PR", "HD", "SR", "SU" */
138             3 type char(2)unal,
139             3 line  fixed bin(17)unal,  /* beginning line number */
140             3 bchar fixed bin(24),      /* beginning character in file */
141             3 echar fixed bin(24),      /* ending character in file */
142             3 next  ptr unal,           /* link to next element */
143             3 sym ptr unal,             /* pointer to symbol table entry (if any) */
144             3 usage ptr unal,           /* pointer to next symbol usage */
145           2 ref1    like tree.table,
146           2 ref2    like tree.table,
147           2 ref3    like tree.table;
148 
149 dcl       Bool      fixed bin int static init(     1);
150 dcl       Char      fixed bin int static init(     2);
151 dcl       Chard     fixed bin int static init(     3);
152 dcl       Integer   fixed bin int static init(     4);
153 dcl       Decimal   fixed bin int static init(     5);
154 dcl       Pic       fixed bin int static init(     6);
155 dcl       Charn     fixed bin int static init(     7);
156 dcl       Edit      fixed bin int static init(    14);
157 dcl       Left      fixed bin int static init(     8);
158 dcl       Center    fixed bin int static init(     9);
159 dcl       Right     fixed bin int static init(    10);
160 dcl       Fill      fixed bin int static init(    12);
161 dcl       Align     fixed bin int static init(    11);
162 dcl       Fold      fixed bin int static init(    13);
163 dcl       Table     fixed bin int static init(    15);
164 dcl       Tablev    fixed bin int static init(    16);
165 dcl       Set       fixed bin int static init(    17);
166 dcl       DecSpec   fixed bin int static init(    18);
167 dcl       Tabled    fixed bin int static init(    19);
168 
169 dcl kind_char(0:19) char(16)var int static init(
170 "-default-",
171 "bit",
172 "char",
173 "var char",
174 "fixed bin",
175 "float dec(20)",
176 "picture",
177 "varying char",
178 " LEFT",
179 " CENTER",
180 " RIGHT",
181 " ALIGN",
182 " FILL",
183 " FOLD",
184 " EDIT",
185 "TABLE",
186 "TABLEV",
187 "SET",
188 "dec(20)float",
189 "TABLED" );
190 
191 /* operation codes */
192 dcl       Add       fixed bin int static init(1);
193 dcl       And       fixed bin int static init(2);
194 dcl       Cat       fixed bin int static init(3);
195 dcl       Div       fixed bin int static init(4);
196 dcl       EQ        fixed bin int static init(5);
197 dcl       GE        fixed bin int static init(6);
198 dcl       GT        fixed bin int static init(7);
199 dcl       LE        fixed bin int static init(8);
200 dcl       LT        fixed bin int static init(9);
201 dcl       Mul       fixed bin int static init(10);
202 dcl       NE        fixed bin int static init(11);
203 dcl       Not       fixed bin int static init(12);
204 dcl       Or        fixed bin int static init(13);
205 dcl       Paren     fixed bin int static init(14);
206 dcl       Rpt       fixed bin int static init(15);
207 dcl       Sub       fixed bin int static init(16);
208 dcl       Func      fixed bin int static init(17);
209 dcl       Pnum      fixed bin int static init(18);
210 dcl       Level     fixed bin int static init(19);
211 dcl       Beg       fixed bin int static init(20);
212 dcl       End       fixed bin int static init(21);
213 dcl       Cont      fixed bin int static init(22);
214 dcl       Nbeg      fixed bin int static init(23);
215 dcl       Nend      fixed bin int static init(24);
216 dcl       Ncont     fixed bin int static init(25);
217 dcl       Begw      fixed bin int static init(26);
218 dcl       Endw      fixed bin int static init(27);
219 dcl       Contw     fixed bin int static init(28);
220 dcl       Nbegw     fixed bin int static init(29);
221 dcl       Nendw     fixed bin int static init(30);
222 dcl       Ncontw    fixed bin int static init(31);
223 dcl       In        fixed bin int static init(32);
224 dcl       Nin       fixed bin int static init(33);
225 dcl       Skip      fixed bin int static init(34);
226 dcl       Stop      fixed bin int static init(35);
227 dcl       n_n       fixed bin int static init(36);
228 dcl       n_s       fixed bin int static init(37);
229 dcl       s_n       fixed bin int static init(38);
230 dcl       s_s       fixed bin int static init(39);
231 dcl       b_c       fixed bin int static init(40);
232 dcl       b_d       fixed bin int static init(41);
233 dcl       c_b       fixed bin int static init(42);
234 dcl       c_d       fixed bin int static init(43);
235 dcl       d_b       fixed bin int static init(44);
236 dcl       d_c       fixed bin int static init(45);
237 dcl       Tran      fixed bin int static init(46);
238 dcl       Substr    fixed bin int static init(47);
239 dcl       If        fixed bin int static init(48);
240 
241 dcl op_char(0:48) char(8)var int static init(
242 "-BAD-",
243 "Add",
244 "And",
245 "Cat",
246 "Div",
247 "EQ",
248 "GE",
249 "GT",
250 "LE",
251 "LT",
252 "Mul",
253 "NE",
254 "Not",
255 "Or",
256 "Paren",
257 "Rpt",
258 "Sub",
259 "Func",
260 "Pnum",
261 "Level",
262 "Beg",
263 "End",
264 "Cont",
265 "Nbeg",
266 "Nend",
267 "Ncont",
268 "Begw",
269 "Endw",
270 "Contw",
271 "Nbegw",
272 "Nendw",
273 "Ncontw",
274 "In",
275 "Nin",
276 "Skip",
277 "Stop",
278 "n_n",
279 "n_s",
280 "s_n",
281 "s_s",
282 "b_c",
283 "b_d",
284 "c_b",
285 "c_d",
286 "d_b",
287 "d_c",
288 "Tran",
289 "Substr",
290 "If" );
291 
292 /* END INCLUDE FILE ..... rgl_tree.incl.pl1 ..... */