perm filename EDIT.DIF[EAL,HE] blob sn#704675 filedate 1983-03-22 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00231 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00032 00002	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 1,1
C00037 00003	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 1,1
C00041 00004	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 1,1
C00044 00005	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 1,1
C00049 00006	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 1,1
C00053 00007	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 4,4
C00056 00008	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 4,4
C00059 00009	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 6,6
C00063 00010	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 7,7
C00066 00011	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 11,11
C00070 00012	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 12,12
C00074 00013	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 12,12
C00078 00014	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 12,12
C00081 00015	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 13,13
C00084 00016	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 14,13
C00087 00017	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 14,13
C00090 00018	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 14,13
C00093 00019	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 14,13
C00096 00020	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 14,13
C00099 00021	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 14,13
C00102 00022	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 14,13
C00105 00023	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 14,13
C00108 00024	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 14,13
C00110 00025	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 14,13
C00113 00026	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 14,13
C00115 00027	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 14,13
C00118 00028	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 14,13
C00121 00029	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 14,13
C00125 00030	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 14,13
C00129 00031	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 14,13
C00133 00032	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 14,13
C00136 00033	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 18,15
C00140 00034	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 18,15
C00144 00035	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 18,15
C00147 00036	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 18,15
C00150 00037	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 18,15
C00154 00038	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 18,15
C00157 00039	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 19,16
C00160 00040	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 19,16
C00163 00041	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 20,17
C00166 00042	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 20,17
C00169 00043	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 21,18
C00172 00044	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 21,18
C00176 00045	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 21,18
C00179 00046	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 21,18
C00182 00047	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 22,18
C00185 00048	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 22,18
C00189 00049	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 22,18
C00192 00050	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 22,18
C00195 00051	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 22,18
C00198 00052	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 22,18
C00201 00053	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 22,18
C00204 00054	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 22,18
C00208 00055	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 22,18
C00211 00056	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 23,19
C00214 00057	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 24,20
C00217 00058	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 26,22
C00220 00059	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 27,23
C00223 00060	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 28,24
C00226 00061	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 28,24
C00228 00062	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 28,24
C00231 00063	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 29,25
C00234 00064	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 29,25
C00237 00065	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 29,25
C00240 00066	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 29,25
C00243 00067	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 29,25
C00246 00068	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 29,25
C00249 00069	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 29,25
C00252 00070	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 30,26
C00255 00071	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 31,27
C00258 00072	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 32,28
C00261 00073	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 32,28
C00265 00074	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 32,28
C00268 00075	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 32,28
C00272 00076	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 32,28
C00276 00077	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 32,28
C00279 00078	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 32,28
C00283 00079	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 32,28
C00286 00080	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 32,28
C00290 00081	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 32,28
C00294 00082	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 32,28
C00297 00083	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 32,28
C00301 00084	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 32,28
C00304 00085	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 35,31
C00308 00086	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 35,31
C00311 00087	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 35,31
C00314 00088	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 36,31
C00317 00089	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 36,31
C00320 00090	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 36,31
C00323 00091	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 36,31
C00325 00092	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 36,31
C00328 00093	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 36,31
C00331 00094	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 37,32
C00334 00095	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 37,32
C00337 00096	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 37,32
C00339 00097	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 37,32
C00342 00098	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 37,32
C00345 00099	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 37,32
C00348 00100	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 37,32
C00350 00101	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 37,32
C00353 00102	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 37,32
C00356 00103	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 37,32
C00359 00104	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 37,32
C00363 00105	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 37,32
C00366 00106	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 39,33
C00369 00107	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 39,33
C00372 00108	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 39,33
C00375 00109	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 39,33
C00379 00110	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 39,33
C00382 00111	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 39,33
C00385 00112	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 40,34
C00388 00113	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 40,34
C00390 00114	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 40,34
C00393 00115	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 41,35
C00397 00116	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 41,35
C00400 00117	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 42,36
C00404 00118	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 42,36
C00407 00119	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 42,36
C00410 00120	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 43,37
C00413 00121	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 43,37
C00416 00122	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 44,38
C00419 00123	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 44,38
C00422 00124	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 44,38
C00425 00125	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 44,38
C00428 00126	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 44,38
C00431 00127	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 45,39
C00434 00128	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 46,40
C00437 00129	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 46,40
C00441 00130	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 46,40
C00445 00131	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 46,40
C00448 00132	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 46,40
C00451 00133	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 46,40
C00454 00134	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 46,40
C00457 00135	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 46,40
C00460 00136	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 47,41
C00463 00137	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 47,41
C00466 00138	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 47,41
C00469 00139	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 47,41
C00472 00140	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 47,41
C00475 00141	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 47,41
C00479 00142	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 47,41
C00482 00143	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 48,42
C00485 00144	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 48,42
C00489 00145	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 48,42
C00492 00146	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 49,43
C00495 00147	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 49,43
C00498 00148	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 49,43
C00501 00149	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 49,43
C00504 00150	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 49,43
C00507 00151	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 49,43
C00510 00152	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 49,43
C00513 00153	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 49,43
C00516 00154	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 49,43
C00519 00155	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 49,43
C00522 00156	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 49,43
C00525 00157	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 49,43
C00528 00158	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 50,44
C00531 00159	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 50,44
C00535 00160	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 50,44
C00538 00161	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 51,45
C00542 00162	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 51,45
C00545 00163	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 51,45
C00549 00164	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 51,45
C00552 00165	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 51,45
C00555 00166	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 52,46
C00558 00167	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 52,46
C00561 00168	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 52,46
C00564 00169	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 52,46
C00567 00170	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 52,46
C00570 00171	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 53,47
C00573 00172	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 53,47
C00576 00173	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 53,47
C00579 00174	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 53,47
C00582 00175	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 53,47
C00585 00176	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 53,47
C00588 00177	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 58,51
C00590 00178	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 58,51
C00592 00179	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 58,51
C00595 00180	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 58,51
C00598 00181	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 58,51
C00602 00182	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 58,51
C00605 00183	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 58,51
C00608 00184	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 58,51
C00612 00185	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 59,52
C00615 00186	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 59,53
C00618 00187	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 59,53
C00621 00188	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 60,53
C00624 00189	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 60,53
C00627 00190	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 60,53
C00630 00191	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 60,53
C00633 00192	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 60,53
C00636 00193	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 60,53
C00639 00194	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 61,54
C00642 00195	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 61,54
C00646 00196	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 61,54
C00649 00197	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 61,54
C00652 00198	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 61,54
C00655 00199	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 61,54
C00658 00200	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 61,54
C00661 00201	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 61,54
C00664 00202	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 61,54
C00667 00203	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 61,54
C00670 00204	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 61,54
C00673 00205	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 61,54
C00676 00206	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 61,54
C00679 00207	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 61,54
C00682 00208	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 61,54
C00685 00209	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 61,54
C00689 00210	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 62,55
C00692 00211	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 62,55
C00695 00212	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 63,56
C00698 00213	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 66,59
C00701 00214	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 66,59
C00704 00215	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 66,59
C00707 00216	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 67,60
C00710 00217	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 67,60
C00713 00218	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 67,60
C00716 00219	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 69,62
C00719 00220	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 69,62
C00723 00221	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 71,64
C00726 00222	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 71,64
C00729 00223	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 71,65
C00732 00224	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 71,65
C00735 00225	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 71,65
C00738 00226	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 71,65
C00741 00227	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 72,65
C00744 00228	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 72,65
C00747 00229	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 72,65
C00750 00230	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 72,65
C00753 00231	  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 72,65
C00754 ENDMK
C⊗;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 1,1

**** File 1) EDIT.PAS[AL,HE]/1P/1L
1)	COMMENT ⊗   VALID 00072 PAGES
1)	C REC  PAGE   DESCRIPTION
1)	C00001 00001
1)	C00009 00002	(*$E+ Routines to print out an AL statement given the internal format *)
1)	C00013 00003	(* datatype definitions *)
1)	C00016 00004	(* statement definitions *)
1)	C00020 00005	(* auxiliary definitions: variable, etc. *)
1)	C00022 00006	(* definition of the ubiquitous NODE record *)
1)	C00029 00007	(* records for parser: ident, token, resword *)
1)	C00033 00008	(* process descriptor blocks & environment record definitions *)
1)	C00037 00009	(* definition of AL-ARM messages *)
1)	C00039 00010	(* print related records: *)
1)	C00040 00011	(* global variables *)
1)	C00044 00012	(* external routines *)
1)	C00050 00013	(* aux routines: GetAChar,out1Line,clearLine,appendEnd,makeOuterBlock *)
1)	C00054 00014	(* lookup routines: upperCase,eqStrng,hash,resLookup,idLookup,freeIds,findResword *)
1)	C00059 00015	(* routine to make reserved words: initReswords *)
1)	C00074 00016	(* routine to make predeclared identifiers & constants: initIdents *)
1)	C00095 00017	(* allocation routines: getLine, relLine *)
1)	C00100 00018	(* expression/line editor: exprEditor *)
1)	C00118 00019	(* page printer routines: ppGlitch,ppChar,ppOutNow,ppLine,pp5,pp10(L),pp20(L),ppInt,ppReal,ppStrng,ppDelChar,ppFlush *)
1)	C00125 00020	(* aux routines: makeNVar, makeUVar, varLookup, flushVar, makeNewVar *)
1)	C00134 00021	(* basic read routines: readPPLine, readLine & errprnt *)
1)	C00144 00022	(* getToken *)
1)	C00166 00023	(* initialization routines: initEditor & initOuterBlock *)
1)	C00170 00024	(* print routines: putChar, put5, put10, putLine *)
1)	C00174 00025	(* aux print routines: putReal, putInt, putVec, putTrans, putStrng, putTlist *)
1)	C00180 00026	(* expression related routines: getExprLength & putExpr *)
1)	C00189 00027	(* cursorStack routines: pushStmnt, pushNode, ... *)
1)	C00191 00028	(* putStmnt: aux routines: newline, outExpr, putVars, putClause, codeLength *)
1)	C00205 00029	(* putStmnt: main body *)
1)	C00228 00030	(* cursor moving routines: nextStmnt, lastStmnt, parentStmnt *)
1)	C00246 00031	(* setUpStmnt,bannerLine,borderLines,redrawDisplay,adjustDisplay *)
1)	C00251 00032	(* displayLines routine *)
1)	C00260 00033	(* routines to shift display: deleteLines, insertLines, reFormatStmnt *)
1)	C00275 00034	(* aux routines for parsing exprs: matchdim,getdim,dimCheck,getDelim,getDo,ppDtype *)
1)	C00283 00035	(* aux routines for parsing exprs: defNode,getDtype,checkarg,copyExpr *)
1)	C00289 00036	(* aux routines for parsing expressions(cont): getArgs *)
1)	C00303 00037	(* function to parse expressions: exprParse *)
1)	C00323 00038	(* auxiliary expression mungers: relExpr & evalOrder *)
1)	C00332 00039	(* aux routine to set up evaluation order for motions: moveOrder *)
1)	C00348 00040	(* assignParse *)
1)	C00356 00041	(* forParse *)
1)	C00360 00042	(* affixParse & unfixParse *)
1)	C00368 00043	(* enableParse *)
1)	C00371 00044	(* getBlkId, idGet & plistParse *)
1)	C00380 00045	(* labelParse & clabelParse *)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 1,1

1)	C00383 00046	(* aux routines: declarationp, getDeclarations & addNewDeclarations *)
1)	C00405 00047	(* aux routine: reParse *)
1)	C00426 00048	(* varParse & procParse *)
1)	C00443 00049	(* aux functions for motion clauses: thenCode, getcsys & clauseParse *)
1)	C00462 00050	(* cmonParse *)
1)	C00469 00051	(* moveParse *)
1)	C00475 00052	(* mClauseParse *)
1)	C00482 00053	(* stopParse *)
1)	C00485 00054	(* returnParse *)
1)	C00487 00055	(* waitParse & wristParse *)
1)	C00492 00056	(* armMagicParse *)
1)	C00496 00057	(* editStmnt: aux routines: echarDo, goEd, editExpr, downLine *)
1)	C00499 00058	(* editStmnt: main body *)
1)	C00515 00059	(* addStmnt: aux routines: getEmptyStmnt,flushSemi,descend,elseTest,restoreCursor,setUpNewStmnt,viaOk *)
1)	C00523 00060	(* addStmnt: aux routines: addNewSt,addNode,addNewEnv,addCmon & addDeclSt *)
1)	C00536 00061	(* addStmnt: main body *)
1)	C00567 00062	(* delStmnt *)
1)	C00583 00063	(* bracketStmnt *)
1)	C00587 00064	(* aux routines: mark, unmark & gotoMark *)
1)	C00590 00065	(* aux routine: setPPSize, flushOldEnvironments, saveOutermostEnv *)
1)	C00596 00066	(* aux routine: fileParse, writeProg, readProg *)
1)	C00605 00067	(* aux routine: varDefine *)
1)	C00610 00068	(* routines for breakpoints: setBpt,clrBpt,clrAllBpts,setTBpt,stepStmnt,clrTBpts *)
1)	C00619 00069	(* debugging routines: dGetPdb,dfreePdb,getPCline,runStmnt,executeStmnt,pevalExpr,goStmnt *)
1)	C00632 00070	(* debugging routines: tracePdb, trace, setECurInt *)
1)	C00637 00071	(* edit: aux routines: getCChar,getEcmd,doSetCmd,collectStmnt,atStmnt,doAtCmd *)
1)	C00651 00072	(* main editing routine: edit *)
1)	C00673 ENDMK
1)	C⊗;
1)	(*$E+ Routines to print out an AL statement given the internal format *)
1)	(*$S3000 use a large codesize *)
1)	program edit;
1)	const 
1)	  version = 10;		(* 10 for simulation version, 11 for real thing *)
1)	  maxLines = 40;
1)	  maxPPLines = 30;
1)	  maxBpts = 25;
1)	  maxTBpts = 20;	(* max could be exceeded by huge case stmnt *)
1)	  listinglength = 4000;	(* Length of Listingarray *)
1)	(* Control character definitions and others *)
1)	  ctlA = 01;		(* Control-A *)
1)	  ctlB = 02;
1)	  ctlC = 03;
1)	  ctlD = 04;
1)	  ctlE = 05;
1)	  ctlF = 06;
1)	  ctlG = 07;
1)	  ctlH = 08;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 1,1

1)	  ctlI = 09;
1)	  ctlJ = 10;
1)	  ctlK = 11;
1)	  ctlL = 12;
1)	  ctlM = 13;
1)	  ctlN = 14;
1)	  ctlO = 15;
1)	  ctlP = 16;
1)	  ctlQ = 17;
1)	  ctlR = 18;
1)	  ctlS = 19;
1)	  ctlT = 20;
1)	  ctlU = 21;
1)	  ctlV = 22;
1)	  ctlW = 23;
1)	  ctlX = 24;
1)	  ctlY = 25;
1)	  ctlZ = 26;
1)	  ESC  = 27;		(* Escape *)
1)	  ctlBslash = 28;	(* Control - backslash ↑\ *)
1)	  VT   = ctlK;		(* Vertical tab *)
1)	  FF   = ctlL;		(* Form feed *)
1)	  CR   = ctlM;		(* Carriage return *)
1)	  LF   = ctlJ;		(* Line feed *)
1)	  TAB  = ctlI;		(* Tab *)
1)	  smallA = 97;		(* Lowercase a  (sail pascal converts all input to upper case)  *)
1)	  smallC = 99;		(* Lowercase c *)
1)	  smallZ = 122;		(* Lowercase z *)
1)	  undline = 95;		(* Underline _  *)
1)	  vbar   = 124;		(* Vertical bar |  *)
1)	  lbrace = 123;		(* Left brace (curly bracket)  *)
1)	  rbrace = 126;		(* and right brace *)	(* *** SAIL <> ascii *** *)
1)	  deletekey = 127;	(* Delete key code *)
1)	  sailundline = 24; 	(* Underline, only for SAIL *)
1)	  sailbackarrow = 95; 	(* Back arrow (←), only for SAIL *)
1)	type
1)	(* random type declarations for OMSI/SAIL compatibility *)
1)	(* ascii = char; *)
**** File 2) EDIT.PAS[EAL,HE]/1P/1L
2)	COMMENT ⊗   VALID 00065 PAGES
2)	C REC  PAGE   DESCRIPTION
2)	C00001 00001
2)	C00008 00002	(*$E+ Routines to print out an AL statement given the internal format *)
2)	C00010 00003	(* datatype definitions *)
2)	C00013 00004	(* statement definitions *)
2)	C00017 00005	(* auxiliary definitions: variable, etc. *)
2)	C00019 00006	(* definition of the ubiquitous NODE record *)
2)	C00025 00007	(* records for parser: ident, token, resword *)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 1,1

2)	C00029 00008	(* process descriptor blocks & environment record definitions *)
2)	C00033 00009	(* definition of AL-ARM messages *)
2)	C00035 00010	(* print related records: *)
2)	C00036 00011	(* global variables *)
2)	C00039 00012	(* external routines *)
2)	C00045 00013	(* aux routines: GetAChar, out1Line, clearLine, eUppercase, eEqStrng, eResLookup, eIdLookup *)
2)	C00049 00014	(* allocation routines: getLine, relLine *)
2)	C00054 00015	(* expression/line editor: exprEditor *)
2)	C00071 00016	(* page printer routines: ppGlitch,ppChar,ppOutNow,ppLine,pp5,pp10(L),pp20(L),ppInt,ppReal,ppStrng,ppDelChar,eReadLine *)
2)	C00078 00017	(* aux routines: eMakeVar, eMakeUVar, eVarLookup, flushVar, eMakeNewVar *)
2)	C00087 00018	(* eGetToken *)
2)	C00107 00019	(* initialization routines: initEditor & initOuterBlock *)
2)	C00111 00020	(* print routines: putChar, put5, put10, putLine *)
2)	C00115 00021	(* aux print routines: putReal, putInt, putVec, putTrans, putStrng, putTlist *)
2)	C00121 00022	(* expression related routines: getExprLength & putExpr *)
2)	C00130 00023	(* cursorStack routines: pushStmnt, pushNode, ... *)
2)	C00132 00024	(* putStmnt: aux routines: newline, outExpr, putVars, putClause, codeLength *)
2)	C00144 00025	(* putStmnt: main body *)
2)	C00165 00026	(* cursor moving routines: nextStmnt, lastStmnt, parentStmnt *)
2)	C00182 00027	(* setUpStmnt, bannerLine, borderLines, redrawDisplay & adjustDisplay *)
2)	C00188 00028	(* displayLines routine *)
2)	C00197 00029	(* routines to shift display: deleteLines, insertLines *)
2)	C00209 00030	(* aux routines for parsing expressions: eDimCheck, eGetDelim, ppDtype *)
2)	C00213 00031	(* aux routines for parsing expressions(cont): eGetArgs *)
2)	C00227 00032	(* function to parse expressions: eExprParse *)
2)	C00246 00033	(* aux routine to set up evaluation order for motions: moveOrder *)
2)	C00260 00034	(* eAssignParse *)
2)	C00268 00035	(* eForParse *)
2)	C00272 00036	(* eAffixParse & eUnfixParse *)
2)	C00279 00037	(* eEnableParse *)
2)	C00282 00038	(* idGet & ePlistParse *)
2)	C00291 00039	(* labelParse & eClabelParse *)
2)	C00294 00040	(* aux routines: declarationp, getEDeclarations & addNewDeclarations *)
2)	C00314 00041	(* aux routine: reParse *)
2)	C00327 00042	(* eVarParse & eProcParse *)
2)	C00344 00043	(* aux functions for motion clauses: eThenCode & eClauseParse *)
2)	C00360 00044	(* eCmonParse *)
2)	C00367 00045	(* eMoveParse *)
2)	C00372 00046	(* eMClauseParse *)
2)	C00378 00047	(* eStopParse *)
2)	C00381 00048	(* eReturnParse *)
2)	C00383 00049	(* eWristParse *)
2)	C00385 00050	(* editStmnt: aux routines: echarDo, editExpr, downLine *)
2)	C00388 00051	(* editStmnt: main body *)
2)	C00404 00052	(* addStmnt: aux routines: getEmptyStmnt, getBlkId & flushSemi *)
2)	C00407 00053	(* addStmnt: aux routines: addNewSt, addNode, addCmon & addDeclSt *)
2)	C00420 00054	(* addStmnt: main body *)
2)	C00444 00055	(* delStmnt *)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 1,1

2)	C00457 00056	(* bracketStmnt *)
2)	C00461 00057	(* aux routines: mark, unmark & gotoMark *)
2)	C00464 00058	(* aux routine: setPPSize, flushOldEnvironments, saveOutermostEnv *)
2)	C00470 00059	(* aux routine: fileParse, writeProg, readProg *)
2)	C00476 00060	(* aux routine: varDefine *)
2)	C00481 00061	(* routines for breakpoints: setBpt,clrBpt,clrAllBpts,setTBpt,stepStmnt,clrTBpts *)
2)	C00490 00062	(* debugging routines: dGetPdb,dfreePdb,getPCline,runStmnt,executeStmnt,pevalExpr,goStmnt *)
2)	C00503 00063	(* debugging routines: tracePdb, trace, setECurInt *)
2)	C00508 00064	(* edit: aux routines: getCChar, getEcmd, doSetCmd, collectStmnt, atStmnt *)
2)	C00517 00065	(* main editing routine: edit *)
2)	C00540 ENDMK
2)	C⊗;
2)	(*$E+ Routines to print out an AL statement given the internal format *)
2)	(*$S3000 use a large codesize *)
2)	program edit;
2)	(* random type declarations for OMSI/SAIL compatibility *)
2)	const maxLines = 40;
2)	      maxPPLines = 30;
2)	      maxBpts = 25;
2)	      maxTBpts = 20;	(* max could be exceeded by huge case stmnt *)
2)	      listinglength = 4000;	(* Length of Listingarray *)
2)	type
2)	(* ascii = char; *)
***************


**** File 1) EDIT.PAS[AL,HE]/4P/9L
1)			movetype,jtmovetype,operatetype,opentype,closetype,centertype,
1)			floattype, stoptype, retrytype,
1)			requiretype, definetype, macrotype, commenttype, dimdeftype,
1)			setbasetype, wristtype, saytype, declaretype, emptytype,
1)			evaltype, armmagictype);
1)			(* more??? *)
**** File 2) EDIT.PAS[EAL,HE]/4P/9L
2)			movetype, operatetype, opentype, closetype, centertype,
2)			stoptype, retrytype,
2)			requiretype, definetype, macrotype, commenttype, dimdeftype,
2)			setbasetype, wristtype, tovaltype, declaretype, emptytype);
2)			(* more??? *)
***************


**** File 1) EDIT.PAS[AL,HE]/4P/21L
1)			bpt,bad: boolean;
1)			case stype: stmntypes of
**** File 2) EDIT.PAS[EAL,HE]/4P/20L
2)			bpt: boolean;
2)			case stype: stmntypes of
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 4,4

***************


**** File 1) EDIT.PAS[AL,HE]/4P/39L
1)	    aborttype,
1)	    saytype:	    (plist: nodep; debugLev: integer);
1)	    returntype:	    (retval, rproc: nodep);
1)	    evaltype,
1)	    calltype,
**** File 2) EDIT.PAS[EAL,HE]/4P/38L
2)	    aborttype:	    (plist: nodep; debugLev: integer);
2)	    returntype:	    (retval, rproc: nodep);
2)	    calltype,
***************


**** File 1) EDIT.PAS[AL,HE]/4P/50L
1)	    jtmovetype,
1)	    operatetype,
1)	    opentype,
1)	    closetype,
1)	    centertype,
1)	    floattype,
1)	    setbasetype,
1)	    stoptype:	    (cf, clauses: nodep);
1)	    retrytype:	    (rcode, rparent: statementp; olevel: integer);
1)	    wristtype:	    (arm, ff, fvec, tvec: nodep; csys: boolean);
1)	    cmtype:	    (oncond: nodep; conclusion: statementp;
**** File 2) EDIT.PAS[EAL,HE]/4P/47L
2)	    operatetype,
2)	    opentype,
2)	    closetype,
2)	    centertype,
2)	    stoptype:	    (cf, clauses: nodep);
2)	    retrytype:	    (rcode, rparent: statementp; olevel: integer);
2)	    cmtype:	    (oncond: nodep; conclusion: statementp;
***************


**** File 1) EDIT.PAS[AL,HE]/4P/68L
1)	    armmagictype:   (cmdnum,dev,iargs,oargs: nodep);
1)			end;
**** File 2) EDIT.PAS[EAL,HE]/4P/61L
2)	    setbasetype,
2)	    wristtype:	    (fvec, tvec: nodep);
2)	    tovaltype:	    (vstr: strngp; vlen: integer; waitp: boolean);
2)			end;
***************
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 4,4



**** File 1) EDIT.PAS[AL,HE]/6P/4L
1)			deprnode, viaptnode, apprnode, destnode, byptnode, durnode,
1)			sfacnode, wobblenode, swtnode, nullingnode, wristnode, cwnode,
1)			arrivalnode, departingnode,
1)			ffnode, forcenode, stiffnode, gathernode, cmonnode, errornode,
1)			calcnode, arraydefnode, bnddefnode, bndvalnode,
1)			waitlistnode, procdefnode, tlistnode, dimnode, commentnode,
1)			linearnode, elbownode, shouldernode, flipnode, wrtnode,
1)			loadnode,velocitynode);
1)	exprtypes =  (	svalop,					(* scalar operators *)
**** File 2) EDIT.PAS[EAL,HE]/6P/4L
2)			deprnode, viaptnode, apprnode, destnode, durnode,
2)			sfacnode, wobblenode, swtnode, nullingnode, wristnode, cwnode,
2)			arrivalnode, departingnode,
2)			ffnode, forcenode, stiffnode, gathernode, cmonnode, errornode,
2)			calcnode, arraydefnode, bnddefnode, bndvalnode,
2)			waitlistnode, procdefnode, tlistnode, dimnode, commentnode);
2)	exprtypes =  (	svalop,					(* scalar operators *)
***************


**** File 1) EDIT.PAS[AL,HE]/6P/31L
1)			arefop, callop, grinchop, macroop, vmop, adcop, dacop, jointop,
1)			badop,
**** File 2) EDIT.PAS[EAL,HE]/6P/29L
2)			arefop, callop, grinchop, macroop, vmop, adcop, dacop,
2)			badop,
***************


**** File 1) EDIT.PAS[AL,HE]/6P/56L
1)	    wrtnode,
1)	    deprnode,
1)	    apprnode,
1)	    destnode:	(loc: nodep; code: statementp);
1)	    byptnode,
1)	    viaptnode:	(vlist: boolean; via,vclauses: nodep; vcode: statementp);
1)	    durnode:	(durrel: reltypes; durval: nodep);
1)	    velocitynode,
1)	    sfacnode,
1)	    wobblenode,
1)	    swtnode:	(clval: nodep);
1)	    nullingnode,			(* true = nonulling *)
1)	    wristnode,				(*	= don't zero force wrist *)
1)	    cwnode,				(*	= counter_clockwise *)
1)	    elbownode,				(*	= elbow up *)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 6,6

1)	    shouldernode,			(*	= right shoulder *)
1)	    flipnode,				(*	= don't flip wrist *)
1)	    linearnode:	(notp: boolean);	(*	= linear motion *)
1)	    ffnode:	(ff,cf: nodep; csys, pdef: boolean); (* true = world, false = hand *)
1)	    loadnode:	(loadval,loadvec: nodep; lcsys: boolean); (* lcsys = csys above *)
1)	    forcenode:	(ftype: forcetypes; frel: reltypes; fval, fvec, fframe: nodep);
1)	    stiffnode:	(fv, mv, cocff: nodep);
1)	    gathernode:	(gbits: integer);
**** File 2) EDIT.PAS[EAL,HE]/6P/54L
2)	    deprnode,
2)	    apprnode,
2)	    destnode:	(loc: nodep; code: statementp);
2)	    viaptnode:	(vlist: boolean; via,duration,velocity: nodep; vcode: statementp);
2)	    durnode:	(durrel: reltypes; durval: nodep);
2)	    sfacnode,
2)	    wobblenode,
2)	    swtnode:	(clval: nodep);
2)	    nullingnode,
2)	    wristnode,
2)	    cwnode:	(notp: boolean); (* true = nonulling/zero wrist/counter_clockwise *)
2)	    ffnode:	(ff: nodep; csys, pdef: boolean); (* true = world, false = hand *)
2)	    forcenode:	(ftype: forcetypes; frel: reltypes; fval, fvec, fframe: nodep);
2)	    stiffnode:	(fv, mv, coc: nodep);
2)	    gathernode:	(gbits: integer);
***************


**** File 1) EDIT.PAS[AL,HE]/7P/22L
1)			ontype,offtype,ppsizetype,collecttype,alltype,lextype,
1)			notype,righttype,lefttype,uptype,downtype,motiontype);
1)	clsetypes = (approachtype,arrivaltype,departuretype,departingtype,durationtype,
1)			errortype,forcetype,forceframetype,forcewristtype,gathertype,
1)			nildeproachtype,nullingtype,stiffnesstype,
1)			torquetype,velocitytype,wobbletype,
1)			cwtype,ccwtype,stopwaittimetype,angularvelocitytype,
1)			respecttype,elbowtype,shouldertype,fliptype,lineartype,
1)			jointspacetype,loadtype);
1)	edittypes = (getcmd,savecmd,insertcmd,renamecmd,startcmd,gocmd,proceedcmd,
1)			stepcmd,sstepcmd,nstepcmd,gstepcmd,executecmd,setcmd,tracecmd,
1)			breakcmd,unbreakcmd,tbreakcmd,definecmd,markcmd,unmarkcmd,
1)			popcmd,atcmd,calibratecmd);
1)	token = record
**** File 2) EDIT.PAS[EAL,HE]/7P/22L
2)			ontype,offtype,ppsizetype,collecttype,alltype,lextype);
2)	clsetypes = (approachtype,arrivaltype,departuretype,departingtype,durationtype,
2)			errortype,forcetype,forceframetype,forcewristtype,gathertype,
2)			nildeproachtype,nonullingtype,nullingtype,stiffnesstype,
2)			torquetype,velocitytype,wobbletype,
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 7,7

2)			cwtype,ccwtype,stopwaittimetype,angularvelocitytype,
2)			fxtype,fytype,fztype,mxtype,mytype,mztype,
2)			t1type,t2type,t3type,t4type,t5type,t6type,tbltype);
2)	edittypes = (getcmd,savecmd,insertcmd,renamecmd,startcmd,gocmd,proceedcmd,
2)			stepcmd,sstepcmd,nstepcmd,gstepcmd,executecmd,setcmd,tracecmd,
2)			breakcmd,unbreakcmd,tbreakcmd,definecmd,markcmd,unmarkcmd,
2)			popcmd);
2)	token = record
***************


**** File 1) EDIT.PAS[AL,HE]/9P/8L
1)		    errorcmd,floatcmd,settoolcmd,setloadcmd,armmagiccmd);
1)	message = record
**** File 2) EDIT.PAS[EAL,HE]/9P/8L
2)		    errorcmd,floatcmd,setloadcmd,
2)		    armmagiccmd,realcmd,vectorcmd,transcmd);
2)	errortypes = (noerror,noarmsol,timerr,durerr,toolong,useopr,nosuchdev,featna,
2)		      unkmess,srvdead,adcdead,nozind,exjtfc,paslim,nopower,badpot,devbusy,
2)		      baddev,timout,panicb,nocart,cbound);
2)	message = record
***************


**** File 1) EDIT.PAS[AL,HE]/9P/22L
1)			4: (max,min: real));
1)		2:   (fv1,fv2,fv3,mv1,mv2,mv3: real);	(* may never use these... *)
1)		3:   (t: array [1..6] of real);
1)		  end;
1)	(* print related records: *)
**** File 2) EDIT.PAS[EAL,HE]/9P/27L
2)			4: (max,min: real);
2)			5: (error: errortypes));
2)		2:   (fv1,fv2,fv3,mv1,mv2,mv3: real);	(* may never use these... *)
2)		3:   (t: array [1..6] of real);
2)		  end;
2)	interr = record
2)	         case integer of
2)	           0: (i: integer);
2)		   1: (err,foo: errortypes);
2)		 end;
2)	(* print related records: *)
***************


**** File 1) EDIT.PAS[AL,HE]/11P/17L
1)	    setUp,setExpr,setCursor,dontPrint,outFilep,collect,fParse,sParse,
1)	    eofError,endOfLine,backup,expandmacros,flushcomments,checkDims,
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 11,11

1)	    shownLine: boolean;
1)	    reswords: array [0..26] of reswordp;
1)	    idents: array [0..26] of identp;
1)	    sysVars: varidefp;
1)	    dProg: statementp;
1)	    curBlock, newDeclarations, findStmnt: statementp;
1)	    macrostack: array [1..10] of tokenp;
1)	    curmacstack: array [1..10] of varidefp;
1)	    macrodepth: integer;
1)	    curtoken: token;
1)	    file1,file2,file3,file4,file5,outFile: atext;
1)	    filedepth, errCount, sCursor: integer;
1)	    curChar, maxChar, curFLine, curPage: integer;
1)	    nodim, distancedim, timedim, angledim,
1)	    forcedim, torquedim, veldim, angveldim: varidefp;
1)	    fvstiffdim, mvstiffdim: nodep;
1)	    pnode: nodep;
1)	    xhat,yhat,zhat,nilvect: vectorp;		(* various constant pointers *)
1)	    niltrans: transp;
1)	    bpark, gpark, rpark: transp;		(* arm park positions *)
1)	    bpts: array [1..maxBpts] of statementp;	(* debugging crap *)
1)	    tbpts: array [1..maxTBpts] of statementp;
**** File 2) EDIT.PAS[EAL,HE]/11P/17L
2)	    setUp,setExpr,setCursor,dontPrint,outFilep,newVarOk,collect: boolean;
2)	    outFile: atext;
2)	    dProg: statementp;
2)	    endOfLine, backup, expandmacros, flushcomments, dimCheck: boolean;
2)	    curBlock, newDeclarations, findStmnt: statementp;
2)	    curProc: varidefp;
2)	    macrostack: array [1..10] of tokenp;
2)	    curmacstack: array [1..10] of varidefp;
2)	    macrodepth: integer;
2)	    curtoken: token;
2)	    curChar, maxChar: integer;
2)	    nodim, distancedim, timedim, angledim,
2)	    forcedim, torquedim, veldim, angveldim: varidefp;
2)	    fvstiffdim, mvstiffdim: nodep;
2)	    pnode: nodep;
2)	    xhat,yhat,zhat: vectorp;
2)	    niltrans: transp;
2)	    bpts: array [1..maxBpts] of statementp;
2)	    tbpts: array [1..maxTBpts] of statementp;
***************


**** File 1) EDIT.PAS[AL,HE]/12P/11L
1)	function getChar: ascii; extern;
**** File 2) EDIT.PAS[EAL,HE]/12P/11L
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 12,12

2)	procedure loadEditor(line,start,length,curpos: integer); extern;
2)	procedure linedPos(y: integer); extern;
2)	function getChar: ascii; extern;
***************


**** File 1) EDIT.PAS[AL,HE]/12P/18L
1)	function newToken: tokenp; extern;			(* from ALLOC.PAS *)
1)	procedure relToken(t: tokenp); extern;
1)	function newVector: vectorp; extern;
1)	procedure relVector(v: vectorp); extern;
1)	function newTrans: transp; extern;
1)	procedure relTrans(n: transp); extern;
1)	function newNode: nodep; extern;
**** File 2) EDIT.PAS[EAL,HE]/12P/20L
2)	function resLookup(str,len: integer): reswordp; extern;	(* from PARSE.PAS *)
2)	function findResword(what: reswdtypes; which,where: integer): reswordp; extern;
2)	function copyExpr(n: nodep; lcp: boolean): nodep; extern;
2)	function matchdim(d1,d2: nodep; exactp: boolean): boolean; extern;
2)	function getdim(n: nodep; var d: nodep): nodep; extern;
2)	function defNode(d: datatypes): nodep; extern;
2)	function getDtype(n: nodep): datatypes; extern;
2)	function checkArg(n: nodep; d: datatypes): nodep; extern;
2)	procedure relExpr(n: nodep); extern;
2)	function evalOrder(what,last: nodep; pcons: boolean): nodep; extern;
2)	procedure parpntrs(var n,d,t,a,f,tor,v,av: varidefp; var fv,mv,p: nodep;
2)			   var nt: transp; var x,y,z: vectorp); extern;
2)	function getReswords(ch: ascii): reswordp; extern;
2)	function getIdents(ch: ascii): identp; extern;
2)	procedure enterIdent(id: identp); extern;
2)	procedure appendEnd(s,so: statementp); extern;
2)	function eStmntParse(var cblk,newDecs: statementp;
2)				 cproc: varidefp): statementp; extern;
2)	function parse(fname: cstring; ppn: integer): statementp; extern;
2)	function newToken: tokenp; extern;			(* from ALLOC.PAS *)
2)	procedure relToken(t: tokenp); extern;
2)	procedure relVector(v: vectorp); extern;
2)	function newNode: nodep; extern;
***************


**** File 1) EDIT.PAS[AL,HE]/12P/42L
1)	procedure freStrng(st: strngp); extern;
1)	function getCurInt: pdbp; extern;	(*only sail*)	(* from INTERP.PAS *)
**** File 2) EDIT.PAS[EAL,HE]/12P/62L
2)	function getCurInt: pdbp; extern;	(*only sail*)	(* from INTERP.PAS *)
***************

  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 12,12


**** File 1) EDIT.PAS[AL,HE]/12P/51L
1)	procedure unwind(p: pdbp; eLev: integer); extern;
1)	procedure Interp(debugLevel: integer); extern;
1)	function getELev(hdr: envheaderp): integer; extern;
1)	function getEntry (level, offset: byte): enventryp; extern;
1)	procedure makeVar(e: enventryp; vari: varidefp; tbits: integer); extern;
1)	procedure killVar(e: enventryp); extern;
1)	procedure swap(newp: pdbp); extern;
1)	function pop: nodep; extern;
1)	procedure prntStrng(length: integer; s: strngp); extern;
1)	procedure passConstants(var x,y,z,nv: vectorp; var b,g,r,nt: transp); extern;
1)	procedure calibrate; extern;
1)	function getsysVars: varidefp;				(* for INTERP.PAS *)
1)	 begin getsysVars := sysVars; end;
1)	function taxis (t: transp): vectorp; extern;		(* from ARITH.PAS *)
1)	function tmagn (t: transp): scalar; extern;
1)	procedure relExpr(n: nodep); forward;
1)	procedure borderLines; forward;
1)	procedure putReal(s: real); forward;
1)	function copyExpr(n: nodep; lcp: boolean): nodep; forward;
1)	procedure setECurInt; forward;
1)	function exprParse: nodep; forward;
1)	procedure errprnt; forward;
1)	procedure setUpStmnt; forward;
1)	procedure flushOldEnvironments(dLev: integer); forward;
1)	procedure executeStmnt(st: statementp); forward;
1)	(* aux routines: GetAChar,out1Line,clearLine,appendEnd,makeOuterBlock *)
1)	function getAChar: ascii;
1)	 var ch: ascii; i: integer;
1)	 begin
1)	 repeat ch := getChar until ch <> chr(LF);	(* skip over any <lf>'s *)
1)	 i := ord(ch);
1)	 if i > deletekey then ch := chr(i-128)		(* strip off SAIL control bit *)
1)	  else if i < ord(' ') then 			(* or undo ASCII control key *)
1)	   if ((i < ctlH) or (CR < i)) and (i <> sailundline) then ch := chr(i+64);
1)	 getAChar := ch;
**** File 2) EDIT.PAS[EAL,HE]/12P/69L
2)	(* procedure flushPdb(p: pdbp); extern; *)
2)	procedure unwind(p: pdbp; eLev: integer); extern;
2)	procedure Interp(debugLevel: integer); extern;
2)	function getELev(hdr: envheaderp): integer; extern;
2)	function getEntry (level, offset: byte): enventryp; extern;
2)	procedure getVal (level, offset: byte); extern;
2)	procedure makeVar(e: enventryp; vari: varidefp; tbits: integer); extern;
2)	procedure killVar(e: enventryp); extern;
2)	procedure swap(newp: pdbp); extern;
2)	function pop: nodep; extern;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 12,12

2)	procedure prntStrng(length: integer; s: strngp); extern;
2)	function taxis (t: transp): vectorp; extern;		(* from ARITH.PAS *)
2)	function tmagn (t: transp): scalar; extern;
2)	(* aux routines: GetAChar, out1Line, clearLine, eUppercase, eEqStrng, eResLookup, eIdLookup *)
2)	function getAChar: ascii;
2)	 var ch: ascii; i: integer;
2)	 begin
2)	 repeat ch := getChar until ch <> chr(12B);	(* skip over any <lf>'s *)
2)	 i := ord(ch);
2)	 if i > 177B then ch := chr(i-200B)		(* strip off SAIL control bit *)
2)	  else if i < 40B then 				(* or undo ASCII control key *)
2)	   if ((i < 10B) or (15B < i)) and (i <> 30B) then ch := chr(i+100B);
2)	 getAChar := ch;
***************


**** File 1) EDIT.PAS[AL,HE]/13P/21L
1)	 var ch: ascii;
1)	 begin
1)	 ch := listing[1];
1)	 listing[1] := ' ';
1)	 outLine(i,1,1,1);
1)	 listing[1] := ch;
1)	 end;
1)	procedure appendEnd(s,so: statementp);
1)	 var st: statementp;
1)	 begin
1)	 if so <> nil then
1)	   begin
1)	   st := newStatement;
1)	   so↑.next := st;
1)	   with st↑ do
1)	    begin
1)	    last := so;
1)	    blkid := nil;
1)	    stype := endtype;
1)	    bparent := s;
1)	    end;
1)	   end;
1)	 end;
1)	procedure makeOuterBlock;		(* Make initial BEGIN-END block *)
1)	 begin
1)	 dprog := newStatement;
1)	 with dprog↑ do
1)	  begin
1)	  stype := progtype;
1)	  pcode := newStatement;
1)	  with pcode↑ do
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 13,13

1)	   begin
1)	   stype := blocktype;
1)	   blkid := nil;
1)	   level := 1;
1)	   numvars := 0;
1)	   variables := nil;
1)	   bparent := nil;
1)	   end;
1)	  appendEnd(pcode,pcode);
1)	  with pcode↑ do bcode := next;
1)	  errors := 0;
1)	  appendEnd(dprog,pcode);
1)	  end;
1)	 setUpStmnt;
1)	 end;
1)	(* lookup routines: upperCase,eqStrng,hash,resLookup,idLookup,freeIds,findResword *)
1)	function upperCase(c: ascii): ascii;
1)	 begin
1)	 if (c < chr(smallA)) or (chr(smallZ) < c) then upperCase := c
1)	  else upperCase := chr(ord(c) - smallA + ord('A'));	(* c - 'a' + 'A' *)
1)	 end;
1)	function eqStrng(s1: strngp; s2,len: integer): boolean;
1)	 var i,j: integer; b: boolean;
**** File 2) EDIT.PAS[EAL,HE]/13P/21L
2)	 begin
2)	 listing[1] := ' ';
2)	 outLine(i,1,1,1);
2)	 end;
2)	function eUpperCase(c: ascii): ascii;
2)	 begin
2)	 if (c < chr(141B)) or (chr(172B) < c) then eUpperCase := c
2)	  else eUpperCase := chr(ord(c) - 40B);		(* c - 'a' + 'A' *)
2)	 end;
2)	function eEqStrng(s1: strngp; s2,len: integer): boolean;
2)	 var i,j: integer; b: boolean;
***************


**** File 1) EDIT.PAS[AL,HE]/14P/16L
1)	  if upperCase(s1↑.ch[j]) <> upperCase(listing[s2+i]) then b := false
1)	   else
**** File 2) EDIT.PAS[EAL,HE]/13P/39L
2)	  if eUpperCase(s1↑.ch[j]) <> eUpperCase(listing[s2+i]) then b := false
2)	   else
***************


**** File 1) EDIT.PAS[AL,HE]/14P/24L
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 14,13

1)	 eqStrng := b;
1)	 end;
1)	function hash(ch: ascii): integer;
1)	 var i: integer;
1)	 begin			(* this will only work for ascii *)
1)	 i := ord(ch);
1)	 if ('A' <= ch) and (ch <= 'Z') then i := i - ord('A') + 1
1)	  else if (chr(smallA) <= ch) and (ch <= chr(smallZ)) then i := i - smallA + 1
1)	  else i := 0;
1)	 hash := i;
1)	 end;
1)	function resLookup(str,len: integer): reswordp;
1)	 var res: reswordp; b: boolean;
1)	 begin
1)	 res := reswords[hash(listing[str])];	(* look in right bucket *)
1)	 b := true;
1)	 while (res <> nil) and b do
1)	  if res↑.length = len then
1)	    if eqStrng(res↑.name,str,len) then b := false
1)	     else res := res↑.next
1)	   else res := res↑.next;
1)	 resLookup := res;
1)	 end;
1)	function idLookup(str,len: integer): identp;
1)	 var id: identp; b: boolean;
1)	 begin
1)	 id := idents[hash(listing[str])];	(* look in right bucket *)
1)	 b := true;
1)	 while (id <> nil) and b do
1)	  if id↑.length = len then
1)	    if eqStrng(id↑.name,str,len) then b := false
1)	     else id := id↑.next
1)	   else id := id↑.next;
1)	 idLookup := id;
1)	 end;
1)	procedure freeIds;
1)	 var i: integer; id,idp,idn: identp; st,stp: strngp;
1)	 begin
1)	 for i := 1 to 26 do
1)	  begin
1)	  idp := nil;
1)	  id := idents[i];
1)	  while id <> nil do
1)	   with id↑ do
1)	    begin
1)	    idn := next;
1)	    if predefined = nil then
1)	      begin				(* flush id now *)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 14,13

1)	      st := name;			(* done with string *)
1)	      while st <> nil do
1)		 begin stp := st↑.next; relStrng(st); st := stp end;
1)	      relIdent(id);			(* and ident *)
1)	      end
1)	     else
1)	      begin
1)	      if idp = nil then idents[i] := id else idp↑.next := id;
1)	      idp := id;
1)	      end;
1)	    id := idn;
1)	    end;
1)	  if idp = nil then idents[i] := nil;
1)	  end;
1)	 end;
1)	function findResword(what: reswdtypes; which, where: integer): reswordp;
1)	 var b: boolean; i: integer; r: reswordp;
1)	 begin
1)	 b := true;
1)	 i := where;
1)	 while b and (i<=26) do
1)	  begin		(* try to find reserved word & print it out *)
1)	  r := reswords[i];	(* try next bucket *)
1)	  while b and (r <> nil) do
1)	   with r↑ do
1)	    if (what=rtype) and (which = ord(stmnt)) then b := false else r := next;
1)	  i := i + 1;
1)	  end;
1)	 findResword := r;
1)	 end;
1)	(* routine to make reserved words: initReswords *)
1)	procedure initReswords;
1)	 var i: integer; res: reswordp; Estr: strngp;
1)	 function makeResword(t: reswdtypes; s: cstring): reswordp;
1)	  var res: reswordp; str: strngp; i,len: integer;
1)	  begin
1)	  new(res);
1)	  with res↑ do
1)	    begin
1)	    rtype := t;
1)	    str := newStrng;
1)	    str↑.ch := s;
1)	    name := str;
1)	    len := 10;
1)	    while s[len] = ' ' do len := len - 1;
1)	    length := len;
1)	    end;
1)	  i := hash(s[1]);		(* find proper bucket *)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 14,13

1)	  res↑.next := reswords[i];	(* link us onto list of reserved words *)
1)	  reswords[i] := res;
1)	  makeResword := res;
1)	 end;
1)	 procedure stmake(st: stmntypes; s: cstring);
1)	  var res: reswordp;
1)	  begin
1)	  res := makeResword(stmnttype,s);
1)	  res↑.stmnt := st;
1)	  end;
1)	 procedure filmake(fil: filtypes; s: cstring);
1)	  var res: reswordp;
1)	  begin
1)	  res := makeResword(filtype,s);
1)	  res↑.filler := fil;
1)	  end;
1)	 procedure clmake(cl: clsetypes; s: cstring);
1)	  var res: reswordp;
1)	  begin
1)	  res := makeResword(clsetype,s);
1)	  res↑.clause := cl;
1)	  end;
1)	 procedure dcmake(dc: datatypes; s: cstring);
1)	  var res: reswordp;
1)	  begin
1)	  res := makeResword(decltype,s);
1)	  res↑.decl := dc;
1)	  end;
1)	 procedure opmake(opr: exprtypes; s: cstring);
1)	  var res: reswordp;
1)	  begin
1)	  res := makeResword(optype,s);
1)	  res↑.op := opr;
1)	  end;
1)	 procedure editmake(ed: edittypes; s: cstring);
1)	  var res: reswordp;
1)	  begin
1)	  res := makeResword(edittype,s);
1)	  res↑.ed := ed;
1)	  end;
1)	 begin
1)	 for i := 0 to 26 do reswords[i] := nil;
1)	 stmake(progtype,'PROGRAM   ');
1)	 stmake(blocktype,'BEGIN     ');
1)	 stmake(coblocktype,'COBEGIN   ');
1)	 stmake(coendtype,'COEND     ');
1)	 stmake(endtype,'END       ');
1)	 stmake(assigntype,':=        ');
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 14,13

1)	 stmake(fortype,'FOR       ');
1)	 stmake(iftype,'IF        ');
1)	 stmake(whiletype,'WHILE     ');
1)	 stmake(casetype,'CASE      ');
1)	 stmake(returntype,'RETURN    ');
1)	 stmake(printtype,'PRINT     ');
1)	 stmake(prompttype,'PROMPT    ');
1)	 stmake(pausetype,'PAUSE     ');
1)	 stmake(aborttype,'ABORT     ');
1)	 stmake(signaltype,'SIGNAL    ');
1)	 stmake(waittype,'WAIT      ');
1)	 stmake(enabletype,'ENABLE    ');
1)	 stmake(disabletype,'DISABLE   ');
1)	 stmake(cmtype,'ON        ');
1)	 stmake(affixtype,'AFFIX     ');
1)	 stmake(unfixtype,'UNFIX     ');
1)	 stmake(movetype,'MOVE      ');
1)	 stmake(operatetype,'OPERATE   ');
1)	 stmake(opentype,'OPEN      ');
1)	 stmake(closetype,'CLOSE     ');
1)	 stmake(centertype,'CENTER    ');
1)	 stmake(floattype,'FLOAT     ');
1)	 stmake(stoptype,'STOP      ');
1)	 stmake(retrytype,'RETRY     ');
1)	 stmake(requiretype,'REQUIRE   ');
1)	 stmake(definetype,'DEFINE    ');
1)	 stmake(dimdeftype,'DIMENSION ');
1)	 stmake(commenttype,'COMMENT   ');
1)	 stmake(setbasetype,'SETBASE   ');
1)	 stmake(wristtype,'WRIST     ');
1)	 stmake(saytype,'SAY       ');
1)	 stmake(armmagictype,'ARM_MAGIC ');
1)	 filmake(abouttype,'ABOUT     ');
1)	 filmake(alongtype,'ALONG     ');
1)	 filmake(attype,'AT        ');
1)	 filmake(bytype,'BY        ');
1)	 filmake(defertype,'DEFER     ');
1)	 filmake(dotype,'DO        ');
1)	 filmake(elsetype,'ELSE      ');
1)	 res := makeResword(filtype,'ERROR_MODE');
1)	 res↑.name↑.next := newStrng;
1)	 res↑.name↑.next↑.ch := 'S         '; 
1)	 res↑.length := 11; 
1)	 res↑.filler := errmodestype;
1)	 filmake(fromtype,'FROM      ');
1)	 filmake(handtype,'HAND      ');
1)	 filmake(intype,'IN        ');
1)	 filmake(nonrigidlytype,'NONRIGIDLY');
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 14,13

1)	 filmake(rigidlytype,'RIGIDLY   ');
1)	 res := makeResword(filtype,'SOURCE_FIL');
1)	 Estr := newStrng;
1)	 Estr↑.ch := 'E         '; 
1)	 res↑.name↑.next := Estr;
1)	 res↑.length := 11; 
1)	 res↑.filler := sourcefiletype;
1)	 filmake(steptype,'STEP      ');
1)	 filmake(thentype,'THEN      ');
1)	 filmake(totype,'TO        ');
1)	 filmake(untltype,'UNTIL     ');
1)	 filmake(viatype,'VIA       ');
1)	 filmake(withtype,'WITH      ');
1)	 filmake(worldtype,'WORLD     ');
1)	 filmake(zeroedtype,'ZEROED    ');
1)	 filmake(oftype,'OF        ');
1)	 filmake(wheretype,'WHERE     ');
1)	 filmake(nowaittype,'NOWAIT    ');
1)	 filmake(notype,'NO        ');
1)	 filmake(righttype,'RIGHT     ');
1)	 filmake(lefttype,'LEFT      ');
1)	 filmake(uptype,'UP        ');
1)	 filmake(downtype,'DOWN      ');
1)	 filmake(motiontype,'MOTION    ');
1)	 clmake(approachtype,'APPROACH  ');
1)	 clmake(arrivaltype,'ARRIVAL   ');
1)	 clmake(departuretype,'DEPARTURE ');
1)	 clmake(departingtype,'DEPARTING ');
1)	 clmake(durationtype,'DURATION  ');
1)	 clmake(errortype,'ERROR     ');
1)	 clmake(forcetype,'FORCE     ');
1)	 res := makeResword(clsetype,'FORCE_FRAM');
1)	 res↑.name↑.next := Estr;
1)	 res↑.length := 11; 
1)	 res↑.clause := forceframetype;
1)	 res := makeResword(clsetype,'FORCE_WRIS');
1)	 res↑.name↑.next := newStrng;
1)	 res↑.name↑.next↑.ch := 'T         '; 
1)	 res↑.length := 11; 
1)	 res↑.clause := forcewristtype;
1)	 clmake(gathertype,'GATHER    ');
1)	 res := makeResword(clsetype,'NILDEPROAC');
1)	 res↑.name↑.next := newStrng;
1)	 res↑.name↑.next↑.ch := 'H         '; 
1)	 res↑.length := 11; 
1)	 res↑.clause := nildeproachtype;
1)	 clmake(nullingtype,'NULLING   ');
1)	 clmake(stiffnesstype,'STIFFNESS ');
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 14,13

1)	 clmake(torquetype,'TORQUE    ');
1)	 clmake(velocitytype,'VELOCITY  ');
1)	 clmake(wobbletype,'WOBBLE    ');
1)	 clmake(cwtype,'CW        ');
1)	 clmake(cwtype,'CLOCKWISE ');
1)	 clmake(ccwtype,'CCW       ');
1)	 res := makeResword(clsetype,'COUNTER_CL');
1)	 res↑.name↑.next := newStrng;
1)	 res↑.name↑.next↑.ch := 'OCKWISE   '; 
1)	 res↑.length := 17; 
1)	 res↑.clause := ccwtype;
1)	 res := makeResword(clsetype,'ANGULAR_VE');
1)	 res↑.name↑.next := newStrng;
1)	 res↑.name↑.next↑.ch := 'LOCITY    '; 
1)	 res↑.length := 16; 
1)	 res↑.clause := angularvelocitytype;
1)	 res := makeResword(clsetype,'STOP_WAIT_');
1)	 res↑.name↑.next := newStrng;
1)	 res↑.name↑.next↑.ch := 'TIME      '; 
1)	 res↑.length := 14; 
1)	 res↑.clause := stopwaittimetype;
1)	 clmake(respecttype,'RESPECT   ');
1)	 clmake(elbowtype,'ELBOW     ');
1)	 clmake(shouldertype,'SHOULDER  ');
1)	 clmake(fliptype,'FLIP      ');
1)	 clmake(lineartype,'LINEAR    ');
1)	 res := makeResword(clsetype,'JOINT_SPAC');
1)	 res↑.name↑.next := newStrng;
1)	 res↑.name↑.next↑.ch := 'E         '; 
1)	 res↑.length := 11; 
1)	 res↑.clause := jointspacetype;
1)	 clmake(loadtype,'LOAD      ');
1)	 dcmake(arraytype,'ARRAY     ');
1)	 dcmake(eventtype,'EVENT     ');
1)	 dcmake(labeltype,'LABEL     ');
1)	 dcmake(proctype,'PROCEDURE ');
1)	 dcmake(reftype,'REFERENCE ');
1)	 dcmake(svaltype,'SCALAR    ');
1)	 dcmake(valtype,'VALUE     ');
1)	 opmake(sltop,'<         ');
1)	 opmake(sleop,'<=        ');
1)	 opmake(sleop,'=<        ');
1)	 opmake(seqop,'=         ');
1)	 opmake(sgeop,'>=        ');
1)	 opmake(sgeop,'=>        ');
1)	 opmake(sgtop,'>         ');
1)	 opmake(sneop,'<>        ');
1)	 opmake(notop,'NOT       ');
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 14,13

1)	 opmake(orop,'OR        ');
1)	 opmake(xorop,'XOR       ');
1)	 opmake(andop,'AND       ');
1)	 opmake(eqvop,'EQV       ');
1)	 opmake(sexpop,'↑         ');
1)	 opmake(maxop,'MAX       ');
1)	 opmake(minop,'MIN       ');
1)	 opmake(intop,'INT       ');
1)	 opmake(idivop,'DIV       ');
1)	 opmake(modop,'MOD       ');
1)	 opmake(sqrtop,'SQRT      ');
1)	 opmake(logop,'LOG       ');
1)	 opmake(expop,'EXP       ');
1)	 opmake(timeop,'RUNTIME   ');
1)	 opmake(sinop,'SIN       ');
1)	 opmake(cosop,'COS       ');
1)	 opmake(tanop,'TAN       ');
1)	 opmake(asinop,'ASIN      ');
1)	 opmake(acosop,'ACOS      ');
1)	 opmake(atan2op,'ATAN2     ');
1)	 opmake(vdotop,'.         ');
1)	 opmake(unitvop,'UNIT      ');
1)	 opmake(vmakeop,'VECTOR    ');
1)	 opmake(wrtop,'WRT       ');
1)	 opmake(tposop,'POS       ');
1)	 opmake(taxisop,'AXIS      ');
1)	 opmake(tmakeop,'TRANS     ');
1)	 opmake(fmakeop,'FRAME     ');
1)	 opmake(torientop,'ORIENT    ');
1)	 opmake(tinvrtop,'INV       ');
1)	 opmake(vsaxwrop,'ROT       ');
1)	 opmake(constrop,'CONSTRUCT ');
1)	 opmake(deproachop,'DEPROACH  ');
1)	 opmake(ftofop,'->        ');
1)	 opmake(queryop,'QUERY     ');
1)	 opmake(inscalarop,'INSCALAR  ');
1)	 opmake(adcop,'ADC       ');
1)	 opmake(dacop,'DAC       ');
1)	 opmake(addop,'+         ');
1)	 opmake(subop,'-         ');
1)	 opmake(mulop,'*         ');
1)	 opmake(divop,'/         ');
1)	(*  opmake(absop,'|         ');	since dumb SAIL doesn't handle the | char *)
1)	 res := makeResword(optype,'|         ');
1)	 res↑.op := absop;
1)	 res↑.name↑.ch[1] := chr(vbar);
1)	 opmake(grinchop,'#         ');
1)	 editmake(getcmd,'GET       ');		(* for use by the editor/debugger *)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 14,13

1)	 editmake(savecmd,'SAVE      ');
1)	 editmake(insertcmd,'INSERT    ');
1)	 editmake(renamecmd,'RENAME    ');
1)	 editmake(startcmd,'START     ');
1)	 editmake(startcmd,'RUN       ');
1)	 editmake(gocmd,'GO        ');
1)	 editmake(proceedcmd,'PROCEED   ');
1)	 editmake(sstepcmd,'SSTEP     ');
1)	 editmake(nstepcmd,'NSTEP     ');
1)	 editmake(gstepcmd,'GSTEP     ');
1)	 editmake(executecmd,'EXECUTE   ');
1)	 editmake(setcmd,'SET       ');
1)	 editmake(tracecmd,'TRACE     ');
1)	 editmake(breakcmd,'BREAK     ');
1)	 editmake(unbreakcmd,'UNBREAK   ');
1)	 editmake(tbreakcmd,'TBREAK    ');
1)	 editmake(markcmd,'MARK      ');
1)	 editmake(unmarkcmd,'UNMARK    ');
1)	 editmake(popcmd,'POP       ');
1)	 editmake(calibratecmd,'CALIBRATE ');
1)	 filmake(offtype,'OFF       ');
1)	 filmake(ppsizetype,'BOTSIZE   ');
1)	 filmake(collecttype,'COLLECT   ');
1)	 filmake(alltype,'ALL       ');
1)	 filmake(lextype,'LEX       ');
1)	 end;
1)	(* routine to make predeclared identifiers & constants: initIdents *)
1)	procedure initIdents;
1)	 var i: integer; id: identp; v,vp: varidefp; n: nodep; str,Rstr: strngp;
1)	     sfId,degId,secId: identp; t,tp: tokenp;	(* for macro defs *)
1)	 function makeIdent(s: cstring): identp;
1)	  var id: identp; str: strngp; i,len: integer;
1)	  begin
1)	  id := newIdent;
1)	  with id↑ do
1)	    begin
1)	    predefined := nil;
1)	    str := newStrng;
1)	    str↑.ch := s;
1)	    name := str;
1)	    len := 10;
1)	    while s[len] = ' ' do len := len - 1;
1)	    length := len;
1)	    end;
1)	  i := hash(id↑.name↑.ch[1]);		(* find proper bucket *)
1)	  id↑.next := idents[i];		(* link us onto list of identifiers *)
1)	  idents[i] := id;
1)	  makeIdent := id;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 14,13

1)	  end;
1)	 function DimMake(s: cstring): varidefp;
1)	  var id: identp; vdef: varidefp; n: nodep;
1)	  begin
1)	  id := makeIdent(s);
1)	  vdef := newVaridef;
1)	  id↑.predefined := vdef;
1)	  n := newNode;		(* need to make up a dimension node *)
1)	  with n↑ do
1)	   begin
1)	   next := nil;
1)	   ntype := dimnode;
1)	   time := 0;
1)	   distance := 0;
1)	   angle := 0;
1)	   dforce := 0;
1)	   end;
1)	  with vdef↑ do
1)	   begin
1)	   name := id;
1)	   vtype := dimensiontype;
1)	   dtype := vdef;		(* a bit circular, but... *)
1)	   offset := 0;
1)	   tbits := 0;
1)	   dbits := 0;
1)	   dim := n;
1)	   dnext := nil;
1)	   end;
1)	  DimMake := vdef;
1)	  end;
1)	 function Idmake(s: cstring; d: datatypes; vdim: varidefp; o: integer): identp;
1)	  var id: identp; vdef: varidefp;
1)	  begin
1)	  id := makeIdent(s);
1)	  vdef := newVaridef;
1)	  id↑.predefined := vdef;
1)	  with vdef↑ do
1)	   begin
1)	   name := id;
1)	   vtype := d;
1)	   dtype := vdim;
1)	   level := 0;
1)	   offset := o;
1)	   tbits := 0;
1)	   dbits := 0;
1)	   next := sysVars;
1)	   dnext := nil;
1)	   end;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 14,13

1)	  sysVars := vdef;	(* add us to list of system variables *)
1)	  Idmake := id;
1)	  end;
1)	 function ConMake(s: cstring; d: datatypes; vdim: varidefp;
1)						    sv: real; n: nodep): identp;
1)	  var id: identp; vdef: varidefp;
1)	  begin
1)	  id := makeIdent(s);
1)	  vdef := newVaridef;
1)	  id↑.predefined := vdef;
1)	  if n = nil then	(* need to make up a new constant node *)
1)	    begin
1)	    n := newNode;
1)	    with n↑ do
1)	     begin
1)	     next := nil;
1)	     ntype := leafnode;
1)	     ltype := d;
1)	     if d = svaltype then s := sv;
1)	     end;
1)	    end;
1)	  with vdef↑ do
1)	   begin
1)	   name := id;
1)	   vtype := pconstype;
1)	   dtype := vdim;
1)	   offset := 0;
1)	   tbits := 0;
1)	   dbits := 0;
1)	   c := n;
1)	   dnext := nil;
1)	   end;
1)	  ConMake := id;
1)	  end;
1)	 function MacMake(s: cstring): identp;
1)	  var id: identp; vdef: varidefp;
1)	  begin
1)	  id := makeIdent(s);
1)	  vdef := newVaridef;
1)	  id↑.predefined := vdef;
1)	  vdef↑.name := id;
1)	  vdef↑.vtype := macargtype;
1)	  MacMake := id;
1)	  end;
1)	 function CToken(num: real; tp: tokenp): tokenp;
1)	  var t: tokenp; n: nodep;
1)	  begin
1)	  t := newToken;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 14,13

1)	  if tp <> nil then tp↑.next := t;
1)	  n := newNode;
1)	  t↑.ttype := constype;
1)	  t↑.cons := n;
1)	  n↑.ntype := leafnode;
1)	  n↑.ltype := svaltype;
1)	  n↑.s := num;
1)	  CToken := t;
1)	  end;
1)	 function IToken(i: identp; tp: tokenp): tokenp;
1)	  var t: tokenp;
1)	  begin
1)	  t := newToken;
1)	  if tp <> nil then tp↑.next := t;
1)	  t↑.ttype := identtype;
1)	  t↑.id := i;
1)	  IToken := t;
1)	  end;
1)	 function RToken(r: reswdtypes): tokenp;
1)	  var t: tokenp;
1)	  begin
1)	  t := newToken;
1)	  t↑.ttype := reswdtype;
1)	  t↑.rtype := r;
1)	  RToken := t;
1)	  end;
1)	 function WithToken(tp: tokenp): tokenp;
1)	  var t: tokenp;
1)	  begin
1)	  t := RToken(filtype);
1)	  if tp <> nil then tp↑.next := t;
1)	  t↑.filler := withtype;
1)	  WithToken := t;
1)	  end;
1)	 function OpToken(tp: tokenp): tokenp;
1)	  var t: tokenp;
1)	  begin
1)	  t := RToken(optype);
1)	  if tp <> nil then tp↑.next := t;
1)	  t↑.op := seqop;
1)	  OpToken := t;
1)	  end;
1)	 function ClToken(cl: clsetypes; tp: tokenp): tokenp;
1)	  var t: tokenp;
1)	  begin
1)	  t := RToken(clsetype);
1)	  if tp <> nil then tp↑.next := t;
1)	  t↑.clause := cl;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 14,13

1)	  ClToken := t;
1)	  end;
1)	 function FilToken(fil: filtypes; tp: tokenp): tokenp;
1)	  var t: tokenp;
1)	  begin
1)	  t := RToken(filtype);
1)	  if tp <> nil then tp↑.next := t;
1)	  t↑.filler := fil;
1)	  FilToken := t;
1)	  end;
1)	 procedure SpdSt(id: identp; spd: real);
1)	  var t,tp: tokenp;
1)	  begin
1)	  t := IToken(sfId,nil);
1)	  id↑.predefined↑.marg := t;
1)	  tp := RToken(stmnttype);
1)	  t↑.next := tp;
1)	  tp↑.stmnt := assigntype;
1)	  t := CToken(spd,tp);
1)	  t↑.next := nil;
1)	  end;
1)	 procedure SpdCl(id: identp; spd: real);
1)	  var t,tp: tokenp;
1)	  begin
1)	  t := WithToken(nil);
1)	  id↑.predefined↑.marg := t;
1)	  tp := IToken(sfId,t);
1)	  t := OpToken(tp);
1)	  tp := CToken(spd,t);
1)	  tp↑.next := nil;
1)	  end;
1)	 procedure SwtCl(id: identp; swt: real);
1)	  var t,tp: tokenp;
1)	  begin
1)	  t := WithToken(nil);
1)	  id↑.predefined↑.marg := t;
1)	  tp := ClToken(stopwaittimetype,t);
1)	  t := OpToken(tp);
1)	  tp := CToken(swt,t);
1)	  tp↑.next := nil;
1)	  end;
1)	 begin
1)	 for i := 0 to 26 do idents[i] := nil;
1)	 nodim := DimMake('DIMENSIONL');	(* define basic dimension types *)
1)	 nodim↑.name↑.name↑.next := newStrng;
1)	 nodim↑.name↑.name↑.next↑.ch := 'ESS       '; 
1)	 nodim↑.name↑.length := 13; 
1)	 angledim := DimMake('ANGLE     ');
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 14,13

1)	 angledim↑.dim↑.angle := 64;	(* really 1, but use 64 so sqrt has a chance *)
1)	 distancedim := DimMake('DISTANCE  ');
1)	 distancedim↑.dim↑.distance := 64;
1)	 timedim := DimMake('TIME      ');
1)	 timedim↑.dim↑.time := 64;
1)	 forcedim := DimMake('FORCE     ');
1)	 forcedim↑.dim↑.dforce := 64;
1)	 torquedim := DimMake('TORQUE    ');
1)	 torquedim↑.dim↑.dforce := 64;		(* torque = distance * force *)
1)	 torquedim↑.dim↑.distance := 64;
1)	 veldim := DimMake('VELOCITY  ');
1)	 veldim↑.dim↑.time := -64;		(* velocity = distance / time *)
1)	 veldim↑.dim↑.distance := 64;
1)	 angveldim := DimMake('ANGULAR_VE');
1)	 angveldim↑.name↑.name↑.next := newStrng;
1)	 angveldim↑.name↑.name↑.next↑.ch := 'LOCITY    '; 
1)	 angveldim↑.name↑.length := 16; 
1)	 angveldim↑.dim↑.time := -64;		(* angular_velocity = angle / time *)
1)	 angveldim↑.dim↑.angle := 64;
1)	 fvstiffdim := newNode;			(* stiffness fv = force / distance *)
1)	 with fvstiffdim↑ do
1)	  begin
1)	  next := nil;
1)	  ntype := dimnode;
1)	  time := 0;
1)	  distance := -64;
1)	  angle := 0;
1)	  dforce := 64;
1)	  end;
1)	 mvstiffdim := newNode;			(* stiffness mv = torque / angle *)
1)	 with mvstiffdim↑ do
1)	  begin
1)	  next := nil;
1)	  ntype := dimnode;
1)	  time := 0;
1)	  distance := 64;
1)	  angle := -64;
1)	  dforce := 64;
1)	  end;
1)	 sysVars := nil;			(* declare all the system variables *)
1)	 id := Idmake('BARM      ',frametype,distancedim,0);
1)	 id := Idmake('BARM_ERROR',svaltype,nodim,1);
1)	 id := Idmake('BHAND     ',svaltype,distancedim,2);
1)	 id := Idmake('BHAND_ERRO',svaltype,nodim,3);
1)	 Rstr := newStrng;
1)	 Rstr↑.ch := 'R         '; 
1)	 id↑.name↑.next := Rstr;
1)	 id↑.length := 11; 
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 14,13

1)	 id := Idmake('GARM      ',frametype,distancedim,4);
1)	 id := Idmake('GARM_ERROR',svaltype,nodim,5);
1)	 id := Idmake('GHAND     ',svaltype,distancedim,6);
1)	 id := Idmake('GHAND_ERRO',svaltype,nodim,7);
1)	 id↑.name↑.next := Rstr;
1)	 id↑.length := 11; 
1)	 id := Idmake('RARM      ',frametype,distancedim,8);
1)	 id := Idmake('RARM_ERROR',svaltype,nodim,9);
1)	 id := Idmake('RHAND     ',svaltype,distancedim,10);
1)	 id := Idmake('RHAND_ERRO',svaltype,nodim,11);
1)	 id↑.name↑.next := Rstr;
1)	 id↑.length := 11; 
1)	 id := Idmake('DRIVER    ',svaltype,nodim,12);	(* same as DRIVER_TURNS *)
1)	 id := Idmake('DRIVER_TUR',svaltype,nodim,12);	(* same as DRIVER *)
1)	 id↑.name↑.next := newStrng;
1)	 id↑.name↑.next↑.ch := 'NS        '; 
1)	 id↑.length := 12; 
1)	 sysVars := sysVars↑.next;		(* don't want both in list of sysVars *)
1)	 id := Idmake('DRIVER_ERR',svaltype,nodim,13);
1)	 id↑.name↑.next := newStrng;
1)	 id↑.name↑.next↑.ch := 'OR        '; 
1)	 id↑.length := 12;
1)	 id := Idmake('DRIVER_TIP',frametype,distancedim,14);
1)	 id := Idmake('DRIVER_GRA',frametype,distancedim,15);
1)	 id↑.name↑.next := newStrng;
1)	 id↑.name↑.next↑.ch := 'SP        '; 
1)	 id↑.length := 12; 
1)	 id := Idmake('VISE      ',svaltype,distancedim,16);
1)	 id := Idmake('VISE_ERROR',svaltype,nodim,17);
1)	 id := Idmake('FIXED_JAW ',frametype,distancedim,18);
1)	 id := Idmake('MOVING_JAW',frametype,distancedim,19);
1)	 sfId := Idmake('SPEED_FACT',svaltype,nodim,20);
1)	 sfid↑.name↑.next := newStrng;
1)	 sfid↑.name↑.next↑.ch := 'OR        '; 
1)	 sfId↑.length := 12; 
1)	 v := sysVars;		(* reverse the list so it's in the right order *)
1)	 while v <> nil do
1)	  begin
1)	  vp := v↑.next;
1)	  if vp <> nil then vp↑.dnext := v	(* set up a back pointer for next step *)
1)	   else sysVars := v;
1)	  v↑.next := v↑.dnext;			(* use back pointer to reverse list *)
1)	  v↑.dnext := nil;
1)	  v := vp;
1)	  end;
1)						(* now make up the constants *)
1)	 id := ConMake('BPARK     ',transtype,distancedim,0.0,nil);
1)	 id↑.predefined↑.c↑.t := bpark;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 14,13

1)	 id := ConMake('RPARK     ',transtype,distancedim,0.0,nil);
1)	 id↑.predefined↑.c↑.t := rpark;
1)	 id := ConMake('GPARK     ',transtype,distancedim,0.0,nil);
1)	 id↑.predefined↑.c↑.t := gpark;
1)	 id := ConMake('NILTRANS  ',transtype,distancedim,0.0,nil);
1)	 n := id↑.predefined↑.c;
1)	 n↑.t := niltrans;
1)	 id := ConMake('NILROT    ',transtype,angledim,0.0,n);
1)	 id := ConMake('STATION   ',transtype,distancedim,0.0,n);
1)	 id := ConMake('XHAT      ',vectype,nodim,0.0,nil);
1)	 id↑.predefined↑.c↑.v := xhat;
1)	 id := ConMake('YHAT      ',vectype,nodim,0.0,nil);
1)	 id↑.predefined↑.c↑.v := yhat;
1)	 id := ConMake('ZHAT      ',vectype,nodim,0.0,nil);
1)	 id↑.predefined↑.c↑.v := zhat;
1)	 id := ConMake('NILVECT   ',vectype,nodim,0.0,nil);
1)	 id↑.predefined↑.c↑.v := nilvect;
1)	 id := ConMake('TRUE      ',svaltype,nodim,1.0,nil);
1)	 n := id↑.predefined↑.c;
1)	 degId := ConMake('DEG       ',svaltype,angledim,0.0,n);
1)	 id := ConMake('DEGREES   ',svaltype,angledim,0.0,n);
1)	 id := ConMake('INCH      ',svaltype,distancedim,0.0,n);
1)	 id := ConMake('INCHES    ',svaltype,distancedim,0.0,n);
1)	 id := ConMake('OUNCES    ',svaltype,forcedim,0.0,n);
1)	 id := ConMake('OZ        ',svaltype,forcedim,0.0,n);
1)	 secId := ConMake('SEC       ',svaltype,timedim,0.0,n);
1)	 id := ConMake('SECOND    ',svaltype,timedim,0.0,n);
1)	 id := ConMake('SECONDS   ',svaltype,timedim,0.0,n);
1)	 id := ConMake('FALSE     ',svaltype,nodim,0.0,nil);
1)	 id := ConMake('CM        ',svaltype,distancedim,0.3937008,nil);
1)	 id := ConMake('GM        ',svaltype,forcedim,0.035274,nil);
1)	 id := ConMake('RADIANS   ',svaltype,angledim,57.295779,nil);
1)	 id := ConMake('PI        ',svaltype,nodim,3.1415927,nil);
1)	 id := ConMake('LBS       ',svaltype,forcedim,16.0,nil);
1)	 id := ConMake('RPM       ',svaltype,angveldim,6.0,nil);
1)	 id := ConMake('CRLF      ',strngtype,nodim,0.0,nil);
1)	 str := newStrng;
1)	 str↑.ch[1] := chr(CR); (* cr *)
1)	 str↑.ch[2] := chr(LF); (* lf *)
1)	 id↑.predefined↑.c↑.str := str;
1)	 id↑.predefined↑.c↑.length := 2; 
1)	 id := ConMake('PANIC_BUTT',svaltype,nodim,1024.0,nil);	(* '2000 *)
1)	 id↑.name↑.next := newStrng;
1)	 id↑.name↑.next↑.ch := 'ON        '; 
1)	 id↑.length := 12; 
1)	 id := ConMake('EXCESSIVE_',svaltype,nodim,2048.0,nil);	(* '4000 *)
1)	 id↑.name↑.next := newStrng;
1)	 id↑.name↑.next↑.ch := 'FORCE     '; 
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 14,13

1)	 id↑.length := 15; 
1)	 id := ConMake('TIME_OUT  ',svaltype,nodim,4096.0,nil);	(* '10000 *)
1)	 id := MacMake('DIRECTLY  ');		(* now make predeclared macros *)
1)	 t := WithToken(nil);			(*   "WITH APPROACH = NILDEPROACH" *)
1)	 id↑.predefined↑.marg := t;
1)	 tp := ClToken(approachtype,t);
1)	 t := OpToken(tp);
1)	 tp := ClToken(nildeproachtype,t);
1)	 t := WithToken(tp);			(*   "WITH DEPARTURE = NILDEPROACH" *)
1)	 tp := ClToken(departuretype,t);
1)	 t := OpToken(tp);
1)	 tp := ClToken(nildeproachtype,t);
1)	 tp↑.next := nil;
1)	 SpdSt(MacMake('QUICK     '),1.0);	(* QUICK = "SPEEDFACTOR := 1.0" *)
1)	 SpdSt(MacMake('SLOW      '),3.0);	(* SLOW = "SPEEDFACTOR := 3.0" *)
1)	 SpdSt(MacMake('CAUTIOUS  '),4.0);	(* CAUTIOUS = "SPEEDFACTOR := 4.0" *)
1)	 SpdCl(MacMake('QUICKLY   '),1.0);	(* QUICKLY = "WITH SPEEDFACTOR = 1.0" *)
1)	 SpdCl(MacMake('NORMALLY  '),2.0);	(* NORMALLY = "WITH SPEEDFACTOR = 2.0" *)
1)	 SpdCl(MacMake('SLOWLY    '),3.0);	(* SLOWLY = "WITH SPEEDFACTOR = 3.0" *)
1)	 SpdCl(MacMake('CAUTIOUSLY'),4.0);	(* CAUTIOUSLY = "WITH SPEEDFACTOR = 4.0" *)
1)	 id := MacMake('APPROXIMAT');
1)	 id↑.name↑.next := newStrng;
1)	 id↑.name↑.next↑.ch := 'ELY       '; 
1)	 id↑.length := 13; 
1)	 t := WithToken(nil);			(* APPP↓ ∂XIMATELY = "WITH NO NULLING" *)
1)	 id↑.predefined↑.marg := t;
1)	 tp := RToken(filtype);
1)	 t↑.next := tp;
1)	 tp↑.filler := notype;
1)	 t := ClToken(nullingtype,tp);
1)	 t↑.next := nil;
1)	 id := MacMake('PRECISELY ');
1)	 t := WithToken(nil);			(* PRECISELY = "WITH NULLING" *)
1)	 id↑.predefined↑.marg := t;
1)	 tp := ClToken(nullingtype,t);
1)	 tp↑.next := nil;
1)	 id := MacMake('LINEARLY  ');
1)	 t := WithToken(nil);			(* LINEARLY = "WITH LINEAR MOTION" *)
1)	 id↑.predefined↑.marg := t;
1)	 tp := ClToken(lineartype,t);
1)	 t := RToken(filtype);
1)	 tp↑.next := t;
1)	 t↑.filler := motiontype;
1)	 t↑.next := nil;
1)	 SwtCl(MacMake('GENTLY    '),0.0);	(* GENTLY = "WITH STOPWAITTIME = 0.0" *)
1)	 SwtCl(MacMake('TIGHTLY   '),0.5);	(* TIGHTLY = "WITH STOPWAITTIME = 0.5" *)
1)	 id := MacMake('TIL       ');
1)	 t := filToken(steptype,nil);		(* TIL = "STEP 1 UNTIL" *)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 14,13

1)	 id↑.predefined↑.marg := t;
1)	 tp := CToken(1.0,t);
1)	 t := filToken(untltype,tp);
1)	 t↑.next := nil;
1)	 end;
**** File 2) EDIT.PAS[EAL,HE]/13P/47L
2)	 eEqStrng := b;
2)	 end;
2)	function eResLookup(str,len: integer): reswordp;
2)	 var res: reswordp; b: boolean;
2)	 begin
2)	 res := getReswords(listing[str]);	(* look in right bucket *)
2)	 b := true;
2)	 while (res <> nil) and b do
2)	  if res↑.length = len then
2)	    if eEqStrng(res↑.name,str,len) then b := false
2)	     else res := res↑.next
2)	   else res := res↑.next;
2)	 eResLookup := res;
2)	 end;
2)	function eIdLookup(str,len: integer): identp;
2)	 var id: identp; b: boolean;
2)	 begin
2)	 id := getIdents(listing[str]);		(* look in right bucket *)
2)	 b := true;
2)	 while (id <> nil) and b do
2)	  if id↑.length = len then
2)	    if eEqStrng(id↑.name,str,len) then b := false
2)	     else id := id↑.next
2)	   else id := id↑.next;
2)	 eIdLookup := id;
2)	 end;
***************


**** File 1) EDIT.PAS[AL,HE]/18P/1L
1)	(* expression/line editor: exprEditor *)
**** File 2) EDIT.PAS[EAL,HE]/14P/83L
2)	procedure borderLines; forward;		(* used by exprEditor on next page *)
2)	(* expression/line editor: exprEditor *)
***************


**** File 1) EDIT.PAS[AL,HE]/18P/15L
1)	   if ch = chr(CR) then		(* need to treat <cr> specially *)
1)	     if right then seek := estart + elength	(* end of expression *)
**** File 2) EDIT.PAS[EAL,HE]/15P/15L
2)	   if ch = chr(15B) then	(* need to treat <cr> specially *)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 18,15

2)	     if right then seek := estart + elength	(* end of expression *)
***************


**** File 1) EDIT.PAS[AL,HE]/18P/91L
1)	  repeat ch := getChar until ch <> chr(LF);	(* skip over any <lf>'s *)
1)	  iCh := ord(ch);
1)	  if iCh = ctlBslash then		(* ↑\ *)
1)	    begin				(* get repeat count *)
**** File 2) EDIT.PAS[EAL,HE]/15P/91L
2)	  repeat ch := getChar until ch <> chr(12B);	(* skip over any <lf>'s *)
2)	  iCh := ord(ch);
2)	  if iCh = 34B then			(* ↑\ *)
2)	    begin				(* get repeat count *)
***************


**** File 1) EDIT.PAS[AL,HE]/18P/104L
1)	   else if (version = 10) and (260B <= iCh) and (iCh <= 272B) then
1)	    begin			(* get repeat count -- for SAIL <cntl><digit> *)
1)	    arg := 0;
**** File 2) EDIT.PAS[EAL,HE]/15P/104L
2)	   else if (260B <= iCh) and (iCh <= 272B) then	(* for SAIL <cntl><digit> *)
2)	    begin				(* get repeat count *)
2)	    arg := 0;
***************


**** File 1) EDIT.PAS[AL,HE]/18P/114L
1)	  if (iCh <> sailundline) and 
1)	     ((iCh < ord(' ')) or (deletekey <= iCh)) then	(* control character *)
1)	    begin
1)	    if (version = 10) and (iCh > deletekey) then	(* For sail only *)
1)	      begin			(* handle special SAIL bucky bits here *)
1)	      iCh := iCh - 128;			(* strip off control bit *)
1)	      if (smallA <= iCh) and (iCh <= smallZ) then
1)	        iCh := iCh - ord(' ');		(* convert lower to upper case *)
1)	      if iCh = ord(' ') then iCh := ctlA	(* cntl-space *)
1)	       else if iCh = deletekey then
1)		begin				(* cntl-bs *)
1)		insertmode := false;
1)		iCh := ctlH;
1)		end
1)	       else if iCh = TAB then
1)		iCh := ctlE	(* make ↑tab into ↑E for compatibility with SAIL line-ed *)
1)	       else if iCh = FF then iCh := ctlF	(* make ↑ff into ↑F *)
1)	       else
1)	      if (ord('A') <= iCh) and (iCh < sailbackarrow) then 
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 18,15

1)		iCh := iCh - ord('@');			(* make into cntl-char *)
1)	      end;
1)	    if iCh = deletekey then iCh := ctlH;   (* convert rubout to backspace *)
1)	    case iCh of
1)	TAB:	insertmode := true;		(* ↑I *)
1)	ctlH:	begin				(* backspace *)
1)		if col - arg < estart then arg := col - estart;
1)		col := col - arg;
1)		if insert and (arg > 0) then dchar;
1)		end;
1)	ctlD:	begin				(* ↑D *)
1)		if col + arg > estart + elength then arg := estart + elength - col;
1)		if arg > 0 then dchar;
1)		end;
1)	ctlA:	col := col + arg;		(* ↑A *)
1)	ctlE:	col := estart + elength;	(* ↑E *)
1)	ctlF:	col := estart;			(* ↑F *)
1)	ctlO:	begin				(* ↑O *)
1)		j := llength + elenOld - elength;	(* restore initial line length *)
**** File 2) EDIT.PAS[EAL,HE]/15P/114L
2)	  if (iCh <> 30B) and ((iCh < 37B) or (177B <= iCh)) then	(* control character *)
2)	    begin
2)	    if iCh > 177B then
2)	      begin			(* handle special SAIL bucky bits here *)
2)	      iCh := iCh - 200B;			(* strip off control bit *)
2)	      if (140B<iCh) and (iCh<173B) then iCh := iCh-40B;  (* convert lower to upper case *)
2)	      if iCh = 40B then iCh := 1		(* cntl-space *)
2)	       else
2)	      if iCh = 177B then
2)		begin				(* cntl-bs *)
2)		insertmode := false;
2)		iCh := 10B;
2)		end
2)	       else
2)	      if iCh = 11B then iCh := 5B	(* make ↑tab into ↑E for compatibility with SAIL line-ed *)
2)	       else
2)	      if iCh = 14B then iCh := 6B	(* make ↑ff into ↑F *)
2)	       else
2)	      if (100B < iCh) and (iCh < 140B) then iCh := iCh - 100B	(* make into cntl-char *)
2)	      end;
2)	    if iCh = 177B then iCh := 10B;	(* convert rubout to backspace *)
2)	    case iCh of
2)	11B:	insertmode := true;		(* ↑I *)
2)	10B:	begin				(* backspace *)
2)		if col - arg < estart then arg := col - estart;
2)		col := col - arg;
2)		if insertmode  and (arg > 0) then dchar;
2)		end;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 18,15

2)	4B:	begin				(* ↑D *)
2)		if col + arg > estart + elength then arg := estart + elength - col;
2)		if arg > 0 then dchar;
2)		end;
2)	1B:	col := col + arg;		(* ↑A *)
2)	5B:	col := estart + elength;	(* ↑E *)
2)	6B:	col := estart;			(* ↑F *)
2)	17B:	begin				(* ↑O *)
2)		j := llength + elenOld - elength;	(* restore initial line length *)
***************


**** File 1) EDIT.PAS[AL,HE]/18P/170L
1)	ESC,					(* at SAIL ↑Z = 33B *)
1)	ctlZ:	begin				(* ↑Z *)
1)		col := estart;			(* zero the expression *)
1)		arg := elength;
1)		dchar;
1)		elength := 0;
1)		end;
1)	ctlR:	begin				(* ↑R *)
1)		i := seek(sch);			(* repeat last search/kill command *)
**** File 2) EDIT.PAS[EAL,HE]/15P/169L
2)	33B,					(* at SAIL ↑Z = 33B *)
2)	32B:	begin				(* ↑Z *)
2)		col := estart;			(* zero the expression *)
2)		arg := elength;
2)		dchar;
2)		elength := 0;
2)		end;
2)	22B:	begin				(* ↑R *)
2)		i := seek(sch);			(* repeat last search/kill command *)
***************


**** File 1) EDIT.PAS[AL,HE]/18P/196L
1)	ctlS:	begin				(* ↑S *)
1)		search := true;			(* remember for ↑R command *)
**** File 2) EDIT.PAS[EAL,HE]/15P/195L
2)	23B:	begin				(* ↑S *)
2)		search := true;			(* remember for ↑R command *)
***************


**** File 1) EDIT.PAS[AL,HE]/18P/203L
1)	ctlB:	begin				(* ↑B *)
1)		search := true;			(* remember for ↑R command *)
**** File 2) EDIT.PAS[EAL,HE]/15P/202L
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 18,15

2)	2B:	begin				(* ↑B *)
2)		search := true;			(* remember for ↑R command *)
***************


**** File 1) EDIT.PAS[AL,HE]/18P/210L
1)	ctlT:	if col > estart + 1 then	(* ↑T *)
1)		 begin
**** File 2) EDIT.PAS[EAL,HE]/15P/209L
2)	24B:	if col > estart + 1 then	(* ↑T *)
2)		 begin
***************


**** File 1) EDIT.PAS[AL,HE]/18P/222L
1)	ctlK:	begin				(* ↑K <vt> *)
1)		search := false;		(* remember for ↑R command *)
**** File 2) EDIT.PAS[EAL,HE]/15P/221L
2)	13B:	begin				(* ↑K <vt> *)
2)		search := false;		(* remember for ↑R command *)
***************


**** File 1) EDIT.PAS[AL,HE]/18P/233L
1)	ctlL:	begin				(* ↑L <ff> *)
1)		search := false;		(* remember for ↑R command *)
**** File 2) EDIT.PAS[EAL,HE]/15P/232L
2)	14B:	begin				(* ↑L <ff> *)
2)		search := false;		(* remember for ↑R command *)
***************


**** File 1) EDIT.PAS[AL,HE]/18P/249L
1)	    if (iCh <> ctlH) and (iCh <> TAB) then insertmode := false;
1)	    end
**** File 2) EDIT.PAS[EAL,HE]/15P/248L
2)	    if (iCh <> 10B) and (iCh <> 11B) then insertmode := false;
2)	    end
***************


**** File 1) EDIT.PAS[AL,HE]/18P/313L
1)	 if version = 10 then
1)	   repeat					(* for SAIL *)
1)	    if listing[i] = chr(sailundline) then listing[i] := '_'
1)	     else if listing[i] = chr(sailbackarrow) then
1)	      begin					(* convert "←" to ":=" *)
1)	      listing[i] := ':';
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 18,15

1)	      llength := llength + 1;
1)	      elength := elength + 1;
1)	      i := i + 1;
1)	      for j := llength downto i do listing[j+1] := listing[j];
1)	      listing[i] := '='    
1)	      end;
1)	    i := i + 1;
1)	   until i > estart + elength - 1;
1)	 curChar := estart;		(* set up for parsing the expression *)
**** File 2) EDIT.PAS[EAL,HE]/15P/312L
2)	 repeat							(* for SAIL *)
2)	  if listing[i] = chr(30B) then listing[i] := '_'
2)	   else if listing[i] = chr(137B) then
2)	    begin					(* convert "←" to ":=" *)
2)	    listing[i] := ':';
2)	    llength := llength + 1;
2)	    elength := elength + 1;
2)	    i := i + 1;
2)	    for j := llength downto i do listing[j+1] := listing[j];
2)	    listing[i] := '='    
2)	    end;
2)	  i := i + 1;
2)	 until i > estart + elength - 1;
2)	 curChar := estart;		(* set up for parsing the expression *)
***************


**** File 1) EDIT.PAS[AL,HE]/18P/333L
1)	 if (version = 10) and (iCh > deletekey) then
1)	   begin
1)	   iCh := iCh - 128;		(* strip off SAIL cntl bit *)
1)	   if (smallA <= iCh) and (iCh <= smallZ) then
1)	     iCh := iCh - ord(' ');		(* convert lower to upper case *)
1)	   end
1)	  else if iCh < ord(' ') then
1)	   if iCh <> CR then iCh := iCh + ord('@');	(* convert back to ascii *)
1)	 exprEditor := chr(iCh);			(* activating character *)
1)	 end;
1)	(* page printer routines: ppGlitch,ppChar,ppOutNow,ppLine,pp5,pp10(L),pp20(L),ppInt,ppReal,ppStrng,ppDelChar,ppFlush *)
1)	procedure ppGlitch;
**** File 2) EDIT.PAS[EAL,HE]/15P/331L
2)	 if iCh > 177B then
2)	   begin
2)	   iCh := iCh - 200B;		(* strip off SAIL cntl bit *)
2)	   if (140B<iCh) and (iCh<173B) then iCh := iCh-40B;  (* convert lower to upper case *)
2)	   end
2)	  else if iCh < 40B then
2)	   if iCh <> 15B then iCh := iCh + 100B;	(* convert back to ascii *)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 18,15

2)	 exprEditor := chr(iCh);			(* activating character *)
2)	 end;
2)	(* page printer routines: ppGlitch,ppChar,ppOutNow,ppLine,pp5,pp10(L),pp20(L),ppInt,ppReal,ppStrng,ppDelChar,eReadLine *)
2)	procedure ppGlitch;
***************


**** File 1) EDIT.PAS[AL,HE]/19P/25L
1)	   if ppsize < 5 then j := 1		(* determine glitch size *)
1)	    else if ppsize < 7 then j := 2
1)	    else if ppsize < 11 then j := 3
1)	    else j := 5;
1)	   for i := 1 to j do relLine(ppLines[i]);
1)	   for i := 1 to ppSize-j do ppLines[i] := ppLines[i+j];
1)	   for i := ppSize-j+1 to ppSize do ppLines[i] := nil;
1)	   if smartTerminal then delLine(dispHeight+2,j)
1)	    else
1)	     begin
1)	     for i := 1 to ppSize do
1)	      if ppLines[i] <> nil then
1)		with ppLines[i]↑ do
1)		 outLine(dispHeight+i+1,1,start,length)	(* re-draw top lines *)
1)	       else clearLine(dispHeight+i+1);
1)	     end;
1)	   ppOffset := ppOffset - j + 1;
1)	   end
1)	  else ppOffset := ppOffset + 1;		(* just move to next line *)
1)	 end;
1)	procedure ppChar(ch: ascii);
1)	 begin
1)	 if ch = chr(CR) then ppGlitch		(* scroll up page printer *)
1)	  else if ch <> chr(LF) then		(* flush linefeeds *)
1)	   begin				(* add character to pp buffer *)
**** File 2) EDIT.PAS[EAL,HE]/16P/25L
2)	   relLine(ppLines[1]);
2)	   for i := 2 to ppSize do ppLines[i-1] := ppLines[i];
2)	   ppLines[ppSize] := nil;
2)	   if smartTerminal then delLine(dispHeight+2,1)
2)	    else
2)	     begin
2)	     for i := 1 to ppSize-1 do
2)	      if ppLines[i] <> nil then
2)		with ppLines[i]↑ do
2)		 outLine(dispHeight+i+1,1,start,length)	(* re-draw top lines *)
2)	       else clearLine(dispHeight+i+1);
2)	     clearLine(dispHeight+ppSize+1);
2)	     end;
2)	   end
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 19,16

2)	  else ppOffset := ppOffset + 1;		(* just move to next line *)
2)	 end;
2)	procedure ppChar(ch: ascii);
2)	 begin
2)	 if ch = chr(15B) then ppGlitch		(* scroll up page printer *)
2)	  else if ch <> chr(12B) then		(* flush linefeeds *)
2)	   begin				(* add character to pp buffer *)
***************


**** File 1) EDIT.PAS[AL,HE]/19P/63L
1)	 showCursor(dispHeight+ppOffset+1,ppBufp+1);
1)	 end;
1)	procedure ppLine;	(* Does the same as ppGlitch *)
1)	 begin
1)	 ppChar(chr(CR));		(* cr *)
1)	 end;
**** File 2) EDIT.PAS[EAL,HE]/16P/59L
2)	 end;
2)	procedure ppLine;	(* Does the same as ppGlitch *)
2)	 begin
2)	 ppChar(chr(15B));		(* cr *)
2)	 end;
***************


**** File 1) EDIT.PAS[AL,HE]/19P/111L
1)	procedure ppReal(r: real);
**** File 2) EDIT.PAS[EAL,HE]/16P/106L
2)	procedure putReal(s: real); forward;
2)	procedure ppReal(r: real);
***************


**** File 1) EDIT.PAS[AL,HE]/19P/142L
1)	   showCursor(dispHeight+ppOffset+1,ppBufp+1);
1)	   end;
1)	 end;
1)	procedure ppFlush;
1)	 begin
1)	 pp20(' Will flush statemen',20); ppChar('t');
1)	 end;
1)	(* aux routines: makeNVar, makeUVar, varLookup, flushVar, makeNewVar *)
1)	function makeNVar(vartype: datatypes; vid: identp): varidefp;
1)	 var v,vo: varidefp; b: boolean;
**** File 2) EDIT.PAS[EAL,HE]/16P/139L
2)	   end;
2)	 end;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 19,16

2)	function eReadLine(var line: linestr): integer;
2)	 var i: integer; ch: ascii;
2)	 begin
2)	 if ppBufp > 0 then ppLine;
2)	 listing[1] := '*';
2)	 outline(dispHeight+ppOffset+1,1,1,1);
2)	 i := 0;
2)	 ch := exprEditor(dispHeight+ppOffset+1,1,1,2,i,0);
2)	 if smartTerminal then                       (* deboldify it *)
2)	   out1Line(dispHeight+ppOffset+1,1,maxchar);
2)	 for i := 1 to maxChar do ppBuf[i] := listing[i];
2)	 ppBufp := maxChar;
2)	 oppBufp := maxChar;
2)	 ppLine;
2)	 listing[maxChar+1] := ' ';
2)	 for i := 2 to maxChar+1 do line[i-1] := listing[i];
2)	 eReadLine := maxChar-1;
2)	 end;
2)	function eCopyLine(var line: linestr): integer;
2)	 var i: integer;
2)	 begin
2)	 for i := 1 to maxChar+1 do line[i] := listing[i];
2)	 eCopyLine := maxChar;
2)	 end;
2)	(* aux routines: eMakeVar, eMakeUVar, eVarLookup, flushVar, eMakeNewVar *)
2)	function eMakeVar(vartype: datatypes; vid: identp): varidefp;
2)	 var v,vo: varidefp; b: boolean;
***************


**** File 1) EDIT.PAS[AL,HE]/20P/47L
1)	 makeNVar := v;
1)	 end;
1)	function makeUVar(vartype: datatypes; vid: identp): varidefp;
1)	 var v: varidefp; sp,oldCurBlock: statementp; i: integer; b: boolean;
1)	 begin
1)	 oldCurBlock := curBlock;
1)	 curBlock := cursorStack[2].st;		(* assume outermost block *)
1)	 b := true;
1)	 i := cursor;			(* unless in body of an enclosing procedure *)
**** File 2) EDIT.PAS[EAL,HE]/17P/47L
2)	 eMakeVar := v;
2)	 end;
2)	function eMakeUVar(vartype: datatypes; vid: identp): varidefp;
2)	 var v: varidefp; sp,oldCurBlock: statementp; i: integer;
2)	 begin
2)	 oldCurBlock := curBlock;
2)	 curBlock := cursorStack[2].st;		(* assume outermost block *)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 20,17

2)	 i := cursor;			(* unless in body of an enclosing procedure *)
***************


**** File 1) EDIT.PAS[AL,HE]/20P/63L
1)		 begin					(* found one *)
1)		 curBlock := nd↑.body;
1)		 b := not(sParse and (i >= sCursor)); (* special case for stmnt parsing *)
1)		 i := 0
1)		 end;
1)	  i := i - 1;
1)	  end;
1)	 v := makeNVar(vartype,vid);
1)	 sp := newStatement;	(* add a new declaration statement to start of block *)
1)	 with sp↑ do
1)	  begin
1)	  stype := declaretype; variables := v; numvars := 1;
1)	  next := curBlock↑.bcode;
1)	  if b then
1)	    if newDeclarations = nil then last := curBlock
1)	     else begin last := newDeclarations; newDeclarations↑.next := sp end
1)	   else begin last := curBlock; curBlock↑.bcode := sp end;
1)	  nlines := 1;
1)	  end;
1)	 if b then newDeclarations := sp;
1)	(* fix the display up later - hopefully the variable will be defined by then *)
1)	 curBlock := oldCurBlock;
1)	 makeUVar := v;
1)	 end;
1)	function varLookup(id: identp): varidefp;
1)	 var v: varidefp; i: integer; b: boolean;
**** File 2) EDIT.PAS[EAL,HE]/17P/62L
2)		 begin curBlock := nd↑.body; i := 0 end;	(* found one *)
2)	  i := i - 1;
2)	  end;
2)	 v := eMakeVar(vartype,vid);
2)	 sp := newStatement;	(* add a new declaration statement to start of block *)
2)	 with sp↑ do
2)	  begin
2)	  stype := declaretype; variables := v; numvars := 1;
2)	  if newDeclarations = nil then last := curBlock
2)	   else begin last := newDeclarations; newDeclarations↑.next := sp end;
2)	  next := curBlock↑.bcode;
2)	  nlines := 1;
2)	  end;
2)	 newDeclarations := sp;
2)	(* fix the display up later - hopefully the variable will be defined by then *)
2)	 curBlock := oldCurBlock;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 20,17

2)	 eMakeUVar := v;
2)	 end;
2)	function eVarLookup(id: identp): varidefp;
2)	 var v: varidefp; i: integer; b: boolean;
***************


**** File 1) EDIT.PAS[AL,HE]/20P/104L
1)	 varLookup := v;
1)	 end;
**** File 2) EDIT.PAS[EAL,HE]/17P/97L
2)	 eVarLookup := v;
2)	 end;
***************


**** File 1) EDIT.PAS[AL,HE]/20P/149L
1)	procedure makeNewVar(newvar: varidefp);
1)	 var i,j,k: integer; env: environp; envhdr: envheaderp;
**** File 2) EDIT.PAS[EAL,HE]/17P/142L
2)	procedure eMakeNewVar(newvar: varidefp);
2)	 var i,j,k: integer; env: environp; envhdr: envheaderp;
***************


**** File 1) EDIT.PAS[AL,HE]/21P/1L
1)	(* basic read routines: readPPLine, readLine & errprnt *)
1)	procedure readPPLine(off: integer);
1)	 var ch: ascii; i,j: integer;
1)	 begin
1)	 if ppOffset >= ppSize then
1)	   begin
1)	   ch := listing[1];
1)	   ppGlitch;			(* so line has room to overflow *)
1)	   ppOffset := ppOffset - 1;
1)	   listing[1] := ch;
1)	   end;
1)	 j := dispHeight+ppOffset+1;
1)	 if (off = 0) or not smartTerminal then
1)	   outline(j,1,1,1);			(* put out prompt or echo *)
1)	 i := off;
1)	 ch := exprEditor(j,1,1,2-off,i,off);
1)	 if smartTerminal then				(* deboldify it *)
1)	   out1Line(j,1,maxchar);
1)	 for i := 1 to maxChar do ppBuf[i] := listing[i];
1)	 ppBufp := maxChar;
1)	 oppBufp := maxChar;
1)	 ppLine;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 21,18

1)	 listing[1] := ppBuf[1];		(* fix things up for getToken *)
1)	 listing[maxChar+1] := ' ';
1)	 end;
1)	procedure readline;
1)	 var i: integer;
1)	procedure rdLine(var fi: atext);
1)	 var ch: ascii; i,j: integer;
1)	 procedure addit(c: c4str);
1)	  var i: integer;
1)	  begin
1)	  if c[1] = ' ' then
1)	    begin
1)	    for i := 1 to 4 do listing[maxchar+i-1] := c[i];
1)	    ch := ' ';
1)	    maxchar := maxchar + 4;
1)	    end
1)	   else
1)	    begin
1)	    listing[maxchar] := c[1];
1)	    ch := c[2];
1)	    maxchar := maxchar + 1;
1)	    end;
1)	  end;
1)	 begin
1)	 maxchar := 0;
1)	 curchar := 1;
1)	 if eofError or eof(fi) then
1)	   begin
1)	   if filedepth >= 1 then 
1)	     begin			(* continue with last file *)
1)	     filedepth := filedepth - 1;(* pop up a level *)
1)	     ppLine;			(* give luser a sense of progress *)
1)	     readline;			(* try again with popped file *)
1)	     end
1)	    else
1)	     begin		     	(* yow - no file left - complain *)
1)	     pp20L('*** End of File enco',20); pp20L('untered while parsin',20);
1)	     pp10('g program ',10); ppLine;
1)	     eofError := true;
1)	     listing[1] := 'E';		(* force parser to give up *)
1)	     listing[2] := 'N';
1)	     listing[3] := 'D';
1)	     listing[4] := ';';
1)	     listing[5] := ' ';
1)	     maxchar := 5;
1)	     end
1)	   end
1)	  else
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 21,18

1)	   begin			(* normal case - read in next line *)
1)	   if ord(fi↑) = CR then get(fi);	(* readln *)
1)	   while (ord(fi↑) = CR) or (ord(fi↑) = LF) or (ord(fi↑) = 0) do
1)	    begin
1)	    if ord(fi↑) = CR then curFLine := curFLine + 1; (* count blank lines too *)
1)	    get(fi);
1)	    end;
1)	   if ord(fi↑) <> FF then curFLine := curFLine + 1
1)	    else				(* new page *)
1)	     begin
1)	     get(fi);			(* skip past page mark (= ff) *)
1)	     curPage := curPage + 1;
1)	     ppInt(curpage);		(* give luser a sense of progress *)
1)	     ppChar(' ');
1)	     ppOutNow;
1)	     curFLine := 1;
1)	     end;
1)	   if version = 10 then
1)	     begin (* for SAIL we have to use the following to get full ASCII character set *)
1)	     while not eof(fi) and not (ord(fi↑)=15B) and (maxchar < 129) do
1)	      begin
1)	      ch := fi↑;
1)	      if not ((ord(ch) = 12B) or (ord(ch) = 0)) then (* ignore linefeeds & nulls *)
1)	       begin
1)	       maxchar := maxchar + 1;
1)	       case ord(ch) of	(* so we can use some of the extra characters on SAIL *)
1)	137B:	addit(':=  ');	(* "←" → ":=" *)
1)	034B:	addit('<=  ');	(* "≤" → "<=" *)
1)	035B:	addit('>=  ');	(* "≥" → ">=" *)
1)	033B:	addit('<>  ');	(* "≠" → "<>" *)
1)	031B:	addit('->  ');	(* "→" → "->" *)
1)	004B:	addit(' and');	(* "∧" → " and " *)
1)	005B:	addit(' not');	(* "¬" → " not " *)
1)	037B:	addit(' or ');	(* "∨" → " or " *)
1)	036B:	addit(' eqv');	(* "≡" → " eqv " *)
1)	026B:	ch := '#';	(* "⊗" → "#" *)
1)	007B:	addit(' pi ');	(* "π" → " pi " *)
1)	020B,			(* "⊂" → "\" so we can read old AL macro delimiters *)
1)	021B:	ch := '\';	(* "⊃" → "\" *)
1)	030B:	ch := '_';	(* "_" → "_" because Pascal on SAIL's so dumb *)
1)	others:	begin end;	(* nothing to do *)
1)		end;
1)	       if ord(ch) <> TAB then listing[maxchar] := ch
1)		else
1)		 begin			(* turn tabs into spaces *)
1)		 i := 8*(((maxchar - 1) div 8) + 1);
1)		 for j := maxchar to i do listing[j] := ' ';
1)		 maxchar := i;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 21,18

1)		 end;
1)	       end;
1)	      get(fi);
1)	      end;
1)	     end
1)	    else
1)	     begin			(* for OMSI we can just use the following *)
1)	(*   if eoln(fi) then readln(fi);			*** *)
1)	(*   while not eoln(fi) and (maxchar < 129) do		*** *)
1)	      begin
1)	      maxchar := maxchar + 1;
1)	(*    read(fi,listing[maxchar]);			*** *)
1)	      if ord(listing[maxchar]) = TAB then	(* turn tabs into spaces *)
1)		begin
1)		i := 8*(((maxchar - 1) div 8) + 1);
1)		for j := maxchar to i do listing[j] := ' ';
1)		maxchar := i;
1)		end;
1)	      end;
1)	     end;
1)	   listing[maxchar+1] := ' ';	(* always can count on a final blank *)
1)	   end;
1)	 end;
1)	 begin
1)	  case filedepth of
1)	0: begin
1)	   if sParse then
1)	     begin
1)	     listing[1] := '*';		(* prompt for more input *)
1)	     readPPLine(0);
1)	     listing[1] := ' ';		(* so getToken ignores prompt char *)
1)	     end
1)	    else
1)	     begin
1)	     pp20('End of File encounte',20); pp20('red while reading in',20);
1)	     pp10(' program. ',9); ppLine;
1)	     endOfLine := true;
1)	     maxChar := 0;
1)	     curchar := 1;
1)	     end
1)	   end;
1)	1: rdline(file1);
1)	2: rdline(file2);
1)	3: rdline(file3);
1)	4: rdline(file4);
1)	5: rdline(file5);
1)	  end;
1)	 shownLine := false;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 21,18

1)	 end;
1)	procedure errprnt;
1)	 var i,j: integer; s: strngp;
1)	 begin
1)	 errcount := errcount + 1;  (* keep track of how many errors we've reported *)
1)	 ppLine;
1)	 if fparse then
1)	   begin
1)	   if (not (sParse or shownline)) and
1)	      ((filedepth > 0) or (macrodepth > 0)) then
1)	    begin					(* tell where error occured *)
1)	    ppChar('p'); ppInt(curPage); pp5(', l  ',3); ppInt(curFLine);
1)	    if macrodepth > 0 then
1)	     begin
1)	     pp20(' while expanding mac',20); pp5('ro:  ',4);
1)	     with curmacstack[macrodepth]↑.name↑ do
1)	      begin
1)	      s := name;
1)	      j := 1;
1)	      for i := 1 to length do
1)	       begin
1)	       ppChar(s↑.ch[j]);
1)	       if j < 10 then j := j + 1 else begin j := 1; s := s↑.next; end
1)	       end;
1)	      end;
1)	     end;
1)	    ppLine;
1)	    for i := 1 to maxchar do ppChar(listing[i]);	(* show line *)
1)	    ppLine;
1)	    shownline := true;
1)	    end;
1)	   for i := 1 to curchar-1 do ppChar(' ');	(* show where in line *)
1)	   ppChar('↑'); ppLine;
1)	   end;
1)	 end;
1)	(* getToken *)
1)	function copyToken: tokenp;	(* aux function used by getToken & elsewhere *)
1)	 var t: tokenp;
**** File 2) EDIT.PAS[EAL,HE]/18P/1L
2)	(* eGetToken *)
2)	function eCopyToken: tokenp;	(* aux function used by eGetToken & elsewhere *)
2)	 var t: tokenp;
***************


**** File 1) EDIT.PAS[AL,HE]/22P/14L
1)	     t↑.rtype := rtype;
1)	     t↑.len := len;		(* this should work ... *)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 22,18

1)	     t↑.str := str;
1)	     end;
1)	   end;
1)	 copyToken := t;
1)	 end;
1)	procedure getToken;
1)	 var b,bp: boolean; v,vp: varidefp; t,tp: tokenp; n: nodep;
**** File 2) EDIT.PAS[EAL,HE]/18P/14L
2)	     t↑.len := len;		(* this should work ... *)
2)	     t↑.str := str;
2)	     end;
2)	   end;
2)	 eCopyToken := t;
2)	 end;
2)	procedure eGetToken;
2)	 var b,bp: boolean; v,vp: varidefp; t,tp: tokenp; n: nodep;
***************


**** File 1) EDIT.PAS[AL,HE]/22P/44L
1)	      curToken.rtype := rtype;
1)	      curToken.len := len;		(* this should work ... *)
**** File 2) EDIT.PAS[EAL,HE]/18P/43L
2)	      curToken.len := len;		(* this should work ... *)
***************


**** File 1) EDIT.PAS[AL,HE]/22P/52L
1)	 if backup and flushcomments and (curToken.ttype = comnttype) then
1)	   begin		(* flush any comments we weren't ever supposed to see *)
1)	   backup := false;
1)	   freStrng(curToken.str);
1)	   end;
1)	 if backup then backup := false		(* use current token *)
**** File 2) EDIT.PAS[EAL,HE]/18P/50L
2)	 if backup then backup := false		(* use current token *)
***************


**** File 1) EDIT.PAS[AL,HE]/22P/74L
1)	     getToken;			(* try again *)
1)	     end
1)	    else upToken(curToken.next);	(* otherwise just copy the next token *)
1)	   end
1)	  else if (curChar > maxChar) and not fParse then
1)	   begin				(* that's it - end of line *)
1)	   with curToken do
1)	    begin
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 22,18

1)	    ttype := delimtype;
1)	    ch := chr(CR);
1)	    end;
1)	   endOfLine := true;
1)	   end
1)	  else
1)	   begin				(* scan line for next token *)
1)	   if curChar > maxChar then readline;
1)	   while not endOfLine and
1)		((listing[curchar] = ' ') or (listing[curchar] = chr(TAB))) do (* skip blanks *)
1)	    if curchar < maxchar then curchar := curchar + 1
1)	     else if fParse then readline else endOfLine := true;
1)	   ch := listing[curchar];		(* first char of next token *)
1)	   if (('A' <= ch) and (ch <= 'Z')) or (ch = chr(undline)) or	(* A..Z,_ *)
1)		((chr(smallA) <= ch) and (ch <= chr(smallZ))) then	(* a..z *)
1)	     begin			(* identifier or reserved word *)
**** File 2) EDIT.PAS[EAL,HE]/18P/67L
2)	     eGetToken;			(* try again *)
2)	     end
2)	    else upToken(curToken.next);	(* otherwise just copy the next token *)
2)	   end
2)	  else if curChar > maxChar then
2)	   begin				(* that's it - end of line *)
2)	   with curToken do
2)	    begin
2)	    ttype := delimtype;
2)	    ch := chr(15B);
2)	    end;
2)	   endOfLine := true;
2)	   end
2)	  else
2)	   begin				(* scan line for next token *)
2)	   while not endOfLine and
2)		((listing[curchar] = ' ') or (listing[curchar] = chr(11B))) do (* skip blanks *)
2)	    if curchar < maxchar then curchar := curchar + 1 else endOfLine := true;
2)	   ch := listing[curchar];		(* first char of next token *)
2)	   if (('A' <= ch) and (ch <= 'Z')) or (ch = chr(137B)) or	(* A..Z,_ *)
2)		((chr(141B) <= ch) and (ch <= chr(172B))) then		(* a..z *)
2)	     begin			(* identifier or reserved word *)
***************


**** File 1) EDIT.PAS[AL,HE]/22P/103L
1)		     or ((chr(smallA) <= ch) and (ch <= chr(smallZ))) or (ch = chr(undline)));
1)	     l := l - curchar;			(* length of string *)
1)	     res := resLookup(curchar,l);
1)	     if res <> nil then
**** File 2) EDIT.PAS[EAL,HE]/18P/94L
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 22,18

2)		     or ((chr(141B) <= ch) and (ch <= chr(172B))) or (ch = chr(137B)));
2)	     l := l - curchar;			(* length of string *)
2)	     res := eResLookup(curchar,l);
2)	     if res <> nil then
***************


**** File 1) EDIT.PAS[AL,HE]/22P/133L
1)		   else if fParse then
1)		    begin
1)		    readLine;
1)		    if not flushcomments then
1)		     begin
1)		     addChar(chr(CR),st,j);	    (* append a crlf *)
1)		     addChar(chr(LF),st,j);
1)		     l := l + 2;
1)		     end
1)		    end
1)		   else
**** File 2) EDIT.PAS[EAL,HE]/18P/124L
2)		   else
***************


**** File 1) EDIT.PAS[AL,HE]/22P/152L
1)		 until endOfLine or eofError or (ch = ';');
1)		 curToken.len := l;
1)		 if eofError then
1)		   begin
1)		   pp20L('***  while searching',20); pp20(' for end of comment ',19);
1)		   ppLine;
1)		   end
1)		  else if flushcomments then getToken;	(* return a real token *)
1)		 end
**** File 2) EDIT.PAS[EAL,HE]/18P/133L
2)		 until endOfLine or (ch = ';');
2)		 curToken.len := l;
2)		 if flushcomments then eGetToken;	(* return a real token *)
2)		 end
***************


**** File 1) EDIT.PAS[AL,HE]/22P/166L
1)	       id := idLookup(curchar,l);	(* see if it's already been defined *)
1)	       if id = nil then			(*  need to define it *)
**** File 2) EDIT.PAS[EAL,HE]/18P/142L
2)	       id := eIdLookup(curchar,l);	(* see if it's already been defined *)
2)	       if id = nil then			(*  need to define it *)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 22,18

***************


**** File 1) EDIT.PAS[AL,HE]/22P/177L
1)		  i := hash(listing[curchar]);	(* find proper bucket *)
1)		  next := idents[i];		(* link us onto list of identifiers *)
1)		  idents[i] := id;
1)		  end;
1)		 j := 0;		(* now make a copy of the identifier's name *)
1)		 for i := curchar to curchar + l - 1 do
1)		  addChar(uppercase(listing[i]),st,j);
1)		 for i := j + 1 to 10 do st↑.ch[i] := ' ';	(* for completeness... *)
1)		 end;
**** File 2) EDIT.PAS[EAL,HE]/18P/153L
2)		  end;
2)		 j := 0;		(* now make a copy of the identifier's name *)
2)		 for i := curchar to curchar + l - 1 do addChar(listing[i],st,j);
2)		 for i := j + 1 to 10 do st↑.ch[i] := ' ';	(* for completeness... *)
2)		 enterIdent(id);	(* because we can't access idents array - SAIL only *)
2)	(* *** for OMSI version use the following:	*** *)
2)	(*	 i := hash(listing[curchar]);	(* find proper bucket *)
2)	(*	 next := idents[i];		(* link us onto list of identifiers *)
2)	(*	 idents[i] := id;	*)
2)		 end;
***************


**** File 1) EDIT.PAS[AL,HE]/22P/192L
1)		 v := varLookup(id);
1)		 if v = nil then
1)		   begin				(* undeclared label - be nice *)
1)		   pp20L(' Undeclared identifi',20); pp20('er defined to be a l',20);
1)		   pp5('abel.',5); errprnt;
1)		   v := makeUVar(labeltype,id);
1)		   v↑.s := nil;
1)		   end
1)		  else if v↑.vtype <> labeltype then
1)		   begin					(* same name as existing variable *)
1)		   pp20L(' Previously defined ',20); pp20('variable used as a l',20);
1)		   pp10('abel name.',10); errprnt;
1)		   end
1)		  else if v↑.s <> nil then		(* multiply defined label *)
1)		   begin
1)		   pp20L(' Multiply defined la',20); pp5('bel. ',4); errprnt;
1)		   end;
**** File 2) EDIT.PAS[EAL,HE]/18P/169L
2)		 v := eVarLookup(id);
2)		 if v = nil then
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 22,18

2)		   begin					(* undeclared label - be nice *)
2)		   pp20L(' Undeclared identifi',20); pp20('er defined to be a l',20);
2)		   pp5('abel.',5); ppLine;
2)		   v := eMakeUVar(labeltype,id);
2)		   v↑.s := nil;
2)		   end
2)		  else if v↑.vtype <> labeltype then
2)		   begin					(* same name as existing variable *)
2)		   pp20L(' Previously defined ',20); pp20('variable used as a l',20);
2)		   pp10('abel name.',10); ppLine;
2)		   end
2)		  else if v↑.s <> nil then		(* multiply defined label *)
2)		   begin
2)		   pp20L(' Multiply defined la',20); pp5('bel. ',4); ppLine;
2)		   end;
***************


**** File 1) EDIT.PAS[AL,HE]/22P/214L
1)		  else getToken;		(* bad - ignore it & get a good token *)
1)		 end
**** File 2) EDIT.PAS[EAL,HE]/18P/191L
2)		  else eGetToken;		(* bad - ignore it & get a good token *)
2)		 end
***************


**** File 1) EDIT.PAS[AL,HE]/22P/263L
1)	       else if fParse then
1)		begin
1)		readLine;
1)		addChar(chr(CR),st,j);			(* append a crlf *)
1)		addChar(chr(LF),st,j);
1)		l := l + 2;
1)		end
1)	       else
**** File 2) EDIT.PAS[EAL,HE]/18P/240L
2)	       else
***************


**** File 1) EDIT.PAS[AL,HE]/22P/286L
1)	     until endOfLine or eofError or b;
1)	     if eofError then
1)	       begin
1)	       pp20L('***  while searching',20); pp20(' for end of string  ',18);
1)	       ppLine;
1)	       end;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 22,18

1)	     n↑.length := l;
1)	     curchar := curchar + 1;
1)	     end
1)	    else if (ch = chr(lbrace)) or		(* chr(173B) = '{' *)
1)		 (((ch = '(') or (ch = '/')) and (listing[curchar+1] = '*')) then
**** File 2) EDIT.PAS[EAL,HE]/18P/256L
2)	     until endOfLine or b;
2)	     n↑.length := l;
2)	     curchar := curchar + 1;
2)	     end
2)	    else if (ch = chr(173B)) or		(* chr(173B) = '{' *)
2)		 (((ch = '(') or (ch = '/')) and (listing[curchar+1] = '*')) then
***************


**** File 1) EDIT.PAS[AL,HE]/22P/304L
1)	      end;
1)	     j := 0;
1)	     l := 0;
**** File 2) EDIT.PAS[EAL,HE]/18P/269L
2)	      j := 0;
2)	      end;
2)	     l := 0;
***************


**** File 1) EDIT.PAS[AL,HE]/22P/314L
1)	      b := ch=chr(rbrace);
1)	      if ((ch=')') or (ch='/')) and (1 < curchar) then
1)		b := listing[curchar-1]='*';
1)	      if (curchar < maxchar) or b then curchar := curchar + 1
1)	       else if fParse then
1)		begin
1)		readLine;
1)		if not flushcomments then
1)		 begin
1)		 addChar(chr(CR),st,j);		(* append a crlf *)
1)		 addChar(chr(LF),st,j);
1)		 l := l + 2;
1)		 end;
1)		end
1)	       else
**** File 2) EDIT.PAS[EAL,HE]/18P/279L
2)	      b := ch=chr(176B);		(* for SAIL right brace = 176B *)
2)	      if ((ch=')') or (ch='/')) and (1 < curchar) then
2)		b := listing[curchar-1]='*';
2)	      if (curchar < maxchar) or b then curchar := curchar + 1
2)	       else
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 22,18

***************


**** File 1) EDIT.PAS[AL,HE]/22P/338L
1)	     until endOfLine or eofError or b;
1)	     curToken.len := l;
1)	     if eofError then
1)	       begin
1)	       pp20L('***  while searching',20); pp20(' for end of comment ',19);
1)	       ppLine;
1)	       end
1)	      else if flushcomments then getToken; (* return a real token *)
1)	     end
**** File 2) EDIT.PAS[EAL,HE]/18P/293L
2)	     until endOfLine or b;
2)	     curToken.len := l;
2)	     if flushcomments then eGetToken;		(* return a real token *)
2)	     end
***************


**** File 1) EDIT.PAS[AL,HE]/22P/356L
1)	     res := resLookup(curchar,l);
1)	     with curToken do
**** File 2) EDIT.PAS[EAL,HE]/18P/306L
2)	     res := eResLookup(curchar,l);
2)	     with curToken do
***************


**** File 1) EDIT.PAS[AL,HE]/22P/367L
1)		if endOfLine then ch := chr(CR) else ch := listing[curchar];
1)		end;
**** File 2) EDIT.PAS[EAL,HE]/18P/317L
2)		if endOfLine then ch := chr(15B) else ch := listing[curchar];
2)		end;
***************


**** File 1) EDIT.PAS[AL,HE]/22P/376L
1)	   if ttype = identtype then v := varLookup(id) else v := mpar;
1)	  if v = nil then b := false
**** File 2) EDIT.PAS[EAL,HE]/18P/326L
2)	   if ttype = identtype then v := eVarLookup(id) else v := mpar;
2)	  if v = nil then b := false
***************


  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 22,18

**** File 1) EDIT.PAS[AL,HE]/22P/390L
1)	     getToken;					(* look for opening '(' *)
1)	     if (curToken.ttype <> delimtype) or (curToken.ch <> '(') then
1)	       begin					(* didn't find opening '(' *)
1)	       backup := true;
1)	       pp20L(' *** Macro arguments',20); pp20(' missing opening "("',20);
1)	       pp20(' - good luck!       ',13); errprnt;
1)	       end;
1)	     while vp <> nil do
1)	      begin
1)	      getToken;			(* see if it's a simple or \...\ arg *)
1)	      if (curToken.ttype = delimtype) and (curToken.ch = '\') then
1)		begin
1)		t := nil;
1)		repeat
1)		 getToken;			(* scan the argument *)
1)		 bp := (curToken.ttype = delimtype) and (curToken.ch = '\');
1)		 if not bp then
1)		  if t = nil then begin t := copyToken; tp := t end
1)		   else begin tp↑.next := copyToken; tp := tp↑.next end;
1)		until bp;
1)		end
1)	       else t := copyToken;
1)	      vp↑.marg := t;
1)	      vp := vp↑.next;
1)	      getToken;		(* now get separating ',' or closing ')' *)
1)	      if vp <> nil then			(* look for separating comma *)
1)		if (curToken.ttype <> delimtype) or (curToken.ch <> ',') then
1)		 begin
1)		 backup := true;
1)		 pp20L(' *** Macro args not ',20); pp20('separated by "," - g',20);
1)		 pp10('ood luck! ',9); errprnt;
1)		 end;
**** File 2) EDIT.PAS[EAL,HE]/18P/340L
2)	     eGetToken;					(* look for opening '(' *)
2)	     if (curToken.ttype <> delimtype) or (curToken.ch <> '(') then
2)	       begin					(* didn't find opening '(' *)
2)	       backup := true;
2)	       pp20L(' *** Macro arguments',20); pp20(' missing opening "("',20);
2)	       pp20(' - good luck!       ',13); ppLine;
2)	       end;
2)	     while vp <> nil do
2)	      begin
2)	      eGetToken;			(* see if it's a simple or \...\ arg *)
2)	      if (curToken.ttype = delimtype) and (curToken.ch = '\') then
2)		begin
2)		t := nil;
2)		repeat
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 22,18

2)		 eGetToken;			(* scan the argument *)
2)		 bp := (curToken.ttype = delimtype) and (curToken.ch = '\');
2)		 if not bp then
2)		  if t = nil then begin t := eCopyToken; tp := t end
2)		   else begin tp↑.next := eCopyToken; tp := tp↑.next end;
2)		until bp;
2)		end
2)	       else t := eCopyToken;
2)	      vp↑.marg := t;
2)	      vp := vp↑.next;
2)	      eGetToken;		(* now get separating ',' or closing ')' *)
2)	      if vp <> nil then			(* look for separating comma *)
2)		if (curToken.ttype <> delimtype) or (curToken.ch <> ',') then
2)		 begin
2)		 backup := true;
2)		 pp20L(' *** Macro args not ',20); pp20('separated by "," - g',20);
2)		 pp10('ood luck! ',9); ppLine;
2)		 end;
***************


**** File 1) EDIT.PAS[AL,HE]/22P/427L
1)	       pp20(' - good luck!       ',13); errprnt;
1)	       end;
**** File 2) EDIT.PAS[EAL,HE]/18P/377L
2)	       pp20(' - good luck!       ',13); ppLine;
2)	       end;
***************


**** File 1) EDIT.PAS[AL,HE]/22P/437L
1)	 if fParse and eofError then endOfLine := true;
1)	 end;
**** File 2) EDIT.PAS[EAL,HE]/18P/387L
2)	 end;
***************


**** File 1) EDIT.PAS[AL,HE]/23P/27L
1)	 fParse := false;
1)	 sParse := false;
1)	 macrodepth := 0;
1)	 expandmacros := true;
1)	 filedepth := 0;
1)	 curline := 0;
1)	 curpage := 1;
1)	 eofError := false;
1)	 curToken.next := nil;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 23,19

1)	 flushcomments := true;
1)	 checkDims := false;		(* assume no dimension checking *)
1)	 sysVars := nil;		(* parser initialization *)
1)	 initReswords;
1)	 passConstants(xhat,yhat,zhat,nilvect,bpark,gpark,rpark,niltrans);
1)	 initIdents;
1)	 pnode := newNode;
1)	 with pnode↑ do
1)	  begin	  (* used to get print lists for print, prompt & abort statements *)
1)	  ntype := exprnode;
1)	  op := queryop;
1)	  end;
1)	 reInitScreen;
1)	 echo(false);				(* turn off echoing *)
1)	 pp20('AL test system      ',14); ppLine;
1)	 end;
1)	procedure initOuterBlock;
1)	 var i: integer; s: statementp; envhdr: envheaderp;
1)	 begin
1)	 flushOldEnvironments(0);
1)	 eCurInt := getCurInt;
**** File 2) EDIT.PAS[EAL,HE]/19P/27L
2)	 macrodepth := 0;
2)	 dimCheck := false;		(* assume no dimension checking *)
2)	 parpntrs(nodim,distancedim,timedim,angledim,forcedim,torquedim,veldim,
2)		  angveldim,fvstiffdim,mvstiffdim,pnode,niltrans,xhat,yhat,zhat);
2)					(* get needed pointers from PARSE *)
2)	 newVarOk := true;
2)	 end;
2)	procedure initOuterBlock;
2)	 var i: integer; s: statementp; envhdr: envheaderp;
2)	 begin
2)	 eCurInt := getCurInt;
***************


**** File 1) EDIT.PAS[AL,HE]/24P/6L
1)	 if ch = chr(CR) then
1)	   begin			(* write out the line *)
1)	   if lbufp > 160 then lbufp := 160;	(* in case there was an overflow *)
1)	   if outFilep then
1)	     begin			(* send line out to file *)
1)	     for i := 1 to lbufp do begin outFile↑ := lbuf[i]; put(outFile) end;
1)	     outFile↑ := chr(CR); put(outFile);		(* don't forget the crlf *)
1)	     outFile↑ := chr(LF); put(outFile);
1)	     end
1)	    else
1)	     if (firstLine <= curLine) and (curLine <= lastLine) then
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 24,20

1)	      if not (setup or dontPrint or fParse) then
1)	       begin
**** File 2) EDIT.PAS[EAL,HE]/20P/6L
2)	 if ch = chr(15B) then
2)	   begin			(* write out the line *)
2)	   if lbufp > 160 then lbufp := 160;	(* in case there was an overflow *)
2)	   if outFilep then
2)	     begin			(* send line out to file *)
2)	     for i := 1 to lbufp do begin outFile↑ := lbuf[i]; put(outFile) end;
2)	     outFile↑ := chr(15B); put(outFile);	(* don't forget the crlf *)
2)	     outFile↑ := chr(12B); put(outFile);
2)	     end
2)	    else
2)	     if (firstLine <= curLine) and (curLine <= lastLine) then
2)	      if not (setup or dontPrint) then
2)	       begin
***************


**** File 1) EDIT.PAS[AL,HE]/24P/40L
1)	  else if ch <> chr(LF) then	(* flush linefeeds *)
1)	   begin			(* add character to line buffer *)
**** File 2) EDIT.PAS[EAL,HE]/20P/40L
2)	  else if ch <> chr(12B) then	(* flush linefeeds *)
2)	   begin			(* add character to line buffer *)
***************


**** File 1) EDIT.PAS[AL,HE]/24P/48L
1)	    else if ch = '_' then lbuf[lbufp] := chr(sailundline) (* so prints right on SAIL *)
1)		  else lbuf[lbufp] := ch;
**** File 2) EDIT.PAS[EAL,HE]/20P/48L
2)	    else if ch = '_' then lbuf[lbufp] := chr(30B) (* so prints right on SAIL *)
2)		  else lbuf[lbufp] := ch;
***************


**** File 1) EDIT.PAS[AL,HE]/24P/67L
1)	 putChar(chr(CR));		(* cr *)
1)	 end;
**** File 2) EDIT.PAS[EAL,HE]/20P/67L
2)	 putChar(chr(15B));		(* cr *)
2)	 end;
***************


**** File 1) EDIT.PAS[AL,HE]/26P/156L
1)	tmagnop: begin parg1 := false; putchar(chr(vbar)); putexpr(arg1,0);
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 26,22

1)		  putchar(chr(vbar)) end;
1)	inscalarop: begin parg1 := false; put10('inscalar  ',8) end;
**** File 2) EDIT.PAS[EAL,HE]/22P/156L
2)	tmagnop: begin parg1 := false; putchar(chr(174B)); putexpr(arg1,0);
2)		  putchar(chr(174B)) end;
2)	inscalarop: begin parg1 := false; put10('inscalar  ',8) end;
***************


**** File 1) EDIT.PAS[AL,HE]/26P/168L
1)	jointop,
1)	macroop,
**** File 2) EDIT.PAS[EAL,HE]/22P/168L
2)	macroop,
***************


**** File 1) EDIT.PAS[AL,HE]/26P/177L
1)			if (op = arefop) or (op = jointop) then putchar('[')
1)			 else if arg2 <> nil then putchar('(')
**** File 2) EDIT.PAS[EAL,HE]/22P/176L
2)			if op = arefop then putchar('[')
2)			 else if arg2 <> nil then putchar('(')
***************


**** File 1) EDIT.PAS[AL,HE]/26P/187L
1)		if (op = arefop) or (op = jointop) then putchar(']')
1)		 else if arg2 <> nil then putchar(')');
**** File 2) EDIT.PAS[EAL,HE]/22P/186L
2)		if op = arefop then putchar(']')
2)		 else if arg2 <> nil then putchar(')');
***************


**** File 1) EDIT.PAS[AL,HE]/27P/30L
1)	 fieldNum := 1;
1)	 end;
1)	(* putStmnt: aux routines: newline, outExpr, putVars, putClause, codeLength *)
1)	procedure putstmnt(s: statementp; indent, plevel: integer);
1)	 var i,j,k,l,cnt: integer; n,nv: nodep; st: statementp; v: varidefp; t: tokenp;
1)	     b: boolean;
**** File 2) EDIT.PAS[EAL,HE]/23P/30L
2)	 if n↑.ntype = procdefnode then
2)	   begin
2)	   n↑.pname↑.dnext := curProc;			(* for PARSE *)
2)	   curProc := n↑.pname;
2)	   end;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 27,23

2)	 fieldNum := 1;
2)	 end;
2)	(* putStmnt: aux routines: newline, outExpr, putVars, putClause, codeLength *)
2)	procedure putstmnt(s: statementp; indent, plevel: integer);
2)	 var i,j,k,l,cnt: integer; n: nodep; st: statementp; v: varidefp; t: tokenp;
2)	     b: boolean;
***************


**** File 1) EDIT.PAS[AL,HE]/28P/29L
1)	  var vtbits,ovtbits,i: integer; n: nodep; vdt: datatypes; vdim: varidefp;
1)	  begin
1)	  vdt := nulltype;
1)	  ovtbits := 0;
**** File 2) EDIT.PAS[EAL,HE]/24P/29L
2)	  var vtbits,ovtbits,i: integer; n: nodep; vt: datatypes; vdim: varidefp;
2)	  begin
2)	  vt := nulltype;
2)	  ovtbits := 0;
***************


**** File 1) EDIT.PAS[AL,HE]/28P/40L
1)	     if (vtype <> vdt) or (tbits <> ovtbits) or (dtype <> vdim) then
1)	       begin
1)	       if (vdt <> nulltype) and (vdt <> proctype) then putchar(';');
1)	       if b then newline(indent)
**** File 2) EDIT.PAS[EAL,HE]/24P/40L
2)	     if (vtype <> vt) or (tbits <> ovtbits) or (dtype <> vdim) then
2)	       begin
2)	       if (vt <> nulltype) and (vt <> proctype) then putchar(';');
2)	       if b then newline(indent)
***************


**** File 1) EDIT.PAS[AL,HE]/28P/50L
1)	       vdt := vtype;
1)	       vtbits := tbits;
**** File 2) EDIT.PAS[EAL,HE]/24P/50L
2)	       vt := vtype;
2)	       vtbits := tbits;
***************


**** File 1) EDIT.PAS[AL,HE]/28P/62L
1)	       case vdt of
1)	svaltype:  put10('scalar    ',7);
**** File 2) EDIT.PAS[EAL,HE]/24P/62L
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 28,24

2)	       case vt of
2)	svaltype:  put10('scalar    ',7);
***************


**** File 1) EDIT.PAS[AL,HE]/28P/71L
1)	cmontype:  vdt := nulltype;
1)	undeftype: begin put10('(* undefin',10); put10('ed! *)    ',7); end;
**** File 2) EDIT.PAS[EAL,HE]/24P/71L
2)	cmontype:  vt := nulltype;
2)	undeftype: begin put10('(* undefin',10); put10('ed! *)    ',7); end;
***************


**** File 1) EDIT.PAS[AL,HE]/28P/114L
1)	       vdt := nulltype;
1)	       ovtbits := 0;
**** File 2) EDIT.PAS[EAL,HE]/24P/114L
2)	       vt := nulltype;
2)	       ovtbits := 0;
***************


**** File 1) EDIT.PAS[AL,HE]/28P/124L
1)	  if b and (vdt <> nulltype) then putchar(';');
1)	  end;
**** File 2) EDIT.PAS[EAL,HE]/24P/124L
2)	  if b and (vt <> nulltype) then putchar(';');
2)	  end;
***************


**** File 1) EDIT.PAS[AL,HE]/28P/139L
1)	velocitynode,
1)	wobblenode,
**** File 2) EDIT.PAS[EAL,HE]/24P/139L
2)	wobblenode,
***************


**** File 1) EDIT.PAS[AL,HE]/28P/147L
1)		  else if ntype = velocitynode then
1)		   begin put10('velocity =',10); putChar(' ') end
1)		  else begin put10('stop_wait_',10); put10('time =    ',7) end;
1)		 outExpr(clval);
1)		 end;
1)	loadnode:begin
1)		 put10('load =    ',7);
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 28,24

1)		 outExpr(loadval);
1)		 if loadvec <> nil then
1)		   begin
1)		   put5(' at  ',4);
1)		   outExpr(loadvec);
1)		   end;
1)		 if lcsys then put10(' in world ',9)
1)		  else put10(' in hand  ',8);
1)		 end;
1)	elbownode:
1)		 begin
1)		 put5('elbow',5);
1)		 if notp then put5(' up  ',3) else put5(' down',5);
1)		 end;
1)	shouldernode:
1)		 begin
1)		 if notp then put5('right',5) else put5('left ',4);
1)		 put10(' shoulder ',9);
1)		 end;
1)	linearnode:
1)		 begin
1)		 if notp then put10('linear    ',7)
1)		  else begin put10('joint_spac',10); put5('e    ',2) end;
1)		 put10('motion    ',6);
1)		 end;
1)	flipnode,
1)	nullingnode:
1)		 begin
1)		 if notp then put5('no   ',3);
1)		 if ntype = flipnode then put5('flip ',4) else put10('nulling   ',7);
1)		 end;
**** File 2) EDIT.PAS[EAL,HE]/24P/146L
2)		  else begin put10('stop_wait_',10); put10('time =    ',7) end;
2)		 outExpr(clval);
2)		 end;
2)	nullingnode:
2)		 begin
2)		 if notp then put5('no_  ',3);
2)		 put10('nulling   ',7);
2)		 end;
***************


**** File 1) EDIT.PAS[AL,HE]/28P/190L
1)	wrtnode: begin
1)		 put10('respect to',10); putChar(' ');
1)		 outExpr(loc);
1)		 end;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 28,24

1)	apprnode,
**** File 2) EDIT.PAS[EAL,HE]/24P/159L
2)	apprnode,
***************


**** File 1) EDIT.PAS[AL,HE]/28P/225L
1)	   absforce:  begin putchar(chr(vbar)); put5('force',5);
1)			    putchar(chr(vbar)) end;
1)	   torque:    put10('torque    ',6);
1)	(* abstorque: put10('|torque|  ',8);	*)
1)	   abstorque: begin putchar(chr(vbar)); put10('torque    ',6);
1)			    putchar(chr(vbar)) end;
1)	   angvelocity: begin put10('angular_ve',10); put10('locity    ',6) end;
**** File 2) EDIT.PAS[EAL,HE]/24P/190L
2)	   absforce:  begin putchar(chr(174B)); put5('force',5);
2)			    putchar(chr(174B)) end;
2)	   torque:    put10('torque    ',6);
2)	(* abstorque: put10('|torque|  ',8);	*)
2)	   abstorque: begin putchar(chr(174B)); put10('torque    ',6);
2)			    putchar(chr(174B)) end;
2)	   angvelocity: begin put10('angular_ve',10); put10('locity    ',6) end;
***************


**** File 1) EDIT.PAS[AL,HE]/28P/276L
1)		 if cocff <> nil then
1)		  begin
1)		  put10(' about    ',7);
1)		  outExpr(cocff↑.ff);
1)		  if cocff↑.csys then put10(' in world ',9)
1)		   else put10(' in hand  ',8);
1)		  end;
**** File 2) EDIT.PAS[EAL,HE]/24P/241L
2)		 if coc <> nil then
2)		  begin
2)		  put10(' about    ',7);
2)		  outExpr(coc);
2)		  end;
***************


**** File 1) EDIT.PAS[AL,HE]/29P/43L
1)	    if (sParse or (curLine > 0)) and (stype <> declaretype) then newLine(indent);
1)	    if bad then lbuf[1] := '!';			(* mark it as bad *)
1)	    case stype of
1)	progtype:	begin
1)			l := 1;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 29,25

1)			putChar(' ');
**** File 2) EDIT.PAS[EAL,HE]/25P/43L
2)	    if (curLine > 0) and (stype <> declaretype) then newLine(indent);
2)	    case stype of
2)	progtype:	begin
2)			l := 1;
2)			if setCursor then curProc := nil;
2)			putChar(' ');
***************


**** File 1) EDIT.PAS[AL,HE]/29P/58L
1)			put10('begin	 ',6);
1)			if blkid <> nil then
**** File 2) EDIT.PAS[EAL,HE]/25P/58L
2)			put10('begin     ',6);
2)			if blkid <> nil then
***************


**** File 1) EDIT.PAS[AL,HE]/29P/234L
1)	aborttype,
1)	saytype:	begin
1)			if stype = printtype then put5('print',5)
1)			 else if stype = prompttype then put10('prompt	  ',6)
1)			 else if stype = aborttype then put5('abort',5)
1)			 else put5('say  ',3);
1)			n := plist;
1)			if n <> nil then
1)			  begin
1)			  putchar('(');
1)			  if setup then
1)			    begin
1)			    outExpr(n↑.lval);		(* see how long first is *)
1)			    i := lbufp + 1;
1)			    n := n↑.next;
1)			    while n <> nil do
1)			     begin
1)			     lbufp := 1;	(* so we don't overflow line buffer *)
1)			     outExpr(n↑.lval);		(* see how long next is *)
1)			     if i + lbufp > 78 then	(* will it fit on same line? *)
1)			       begin		(* no - display it on next line *)
1)			       curline := curline + 1;
1)			       i := indent + 7 + getExprLength(n↑.lval);
1)			       end
1)			      else i := i + lbufp + 1;	(* length of line so far *)
1)			     n := n↑.next;
1)			     end;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 29,25

1)			    end
1)			   else
1)			    begin
1)			    i := 1;
1)			    outExpr(n↑.lval);
1)			    n := n↑.next;
1)			    while n <> nil do
1)			     begin
1)			     putchar(',');
1)			     i := i + 1;
1)			     if lbufp + getExprLength(n↑.lval) > 78 then
1)			       begin		    (* display it on next line *)
1)			       newline(indent+6);
1)			       if setCursor and (curLine = cursorLine) then
1)				 fieldNum := i;
1)			       end;
1)			     outExpr(n↑.lval);
1)			     n := n↑.next;
1)			     end;
1)			    putchar(')');
1)			    end;
1)			  end;
1)			end;
**** File 2) EDIT.PAS[EAL,HE]/25P/234L
2)	aborttype:	begin
2)			if stype = printtype then put5('print',5)
2)			 else if stype = prompttype then put10('prompt	  ',6)
2)			 else put5('abort',5);
2)			n := plist;
2)			i := 0;
2)			if n <> nil then putchar('(');
2)			while n <> nil do
2)			 begin
2)			 i := i + 1;
2)			 if (not setup) and (lbufp + getExprLength(n↑.lval) > 78) then
2)			   begin
2)			   newline(indent+6);
2)			   if setCursor and (curLine = cursorLine) then fieldNum := i;
2)			   end;
2)			 outExpr(n↑.lval);
2)			 if setup and (lbufp > 78) then 
2)			   begin
2)			   curline := curline + 1;
2)			   lbufp := indent + 6 + getExprLength(n↑.lval);
2)			   end;
2)			 n := n↑.next;
2)			 if n <> nil then putchar(',') else putchar(')');
2)			 end;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 29,25

2)			end;
***************


**** File 1) EDIT.PAS[AL,HE]/29P/328L
1)			if byvar <> nil then begin put5(' by  ',4); outExpr(byvar) end;
1)			if atexp <> nil then
1)			 begin
1)			 if (not setup) and (lbufp + getExprLength(atexp) > 75) then
1)			   begin
1)			   newline(indent+1);
**** File 2) EDIT.PAS[EAL,HE]/25P/303L
2)			if byvar <> nil then begin put5(' by  ',4);
2)						 outExpr(byvar) end;
2)			j := 1;
2)			if atexp <> nil then
2)			 begin
2)			 if (not setup) and (lbufp + getExprLength(atexp) > 75) then
2)			   begin
2)			   j := 2;			(* # lines used *)
2)			   newline(indent+1);
***************


**** File 1) EDIT.PAS[AL,HE]/29P/348L
1)	jtmovetype,
1)	operatetype,
1)	opentype,
1)	closetype,
1)	centertype,
1)	floattype:	begin
1)			if (stype = movetype) or (stype = jtmovetype) then put5('move ',5)
1)			 else if stype = operatetype then put10('operate   ',8)
1)			 else if stype = opentype then put5('open ',5)
1)			 else if stype = closetype then put10('close	 ',6)
1)			 else if stype = centertype then put10('center	  ',7)
1)			 else put10('float     ',6);
1)			outExpr(cf);
1)			n := clauses;
1)			if n <> nil then
1)			  with n↑ do
1)			   if (ntype = ffnode) and pdef then n := next;
1)			if n = nil then b := false
1)			 else b := n↑.ntype = destnode;	(* print it on same line *)
1)			if b then putchar(' ');
1)			while n <> nil do	(* print out the clauses *)
1)			 with n↑ do
1)			  begin
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 29,25

1)			  if not ((((ntype=viaptnode) or (ntype=byptnode)) and vlist)
1)				  or b) then
1)			    begin
1)			    if setCursor then
1)			      begin
1)			      if (ntype = viaptnode) or (ntype = byptnode) then
1)				begin
1)				i := 1;
1)				nv := vclauses;
1)				while nv <> nil do
1)				 begin i := i + 1; nv := nv↑.next end;
1)				if vcode <> nil then i := codeLength(vcode) + i + 1;
1)				end
1)			       else if ((ntype = deprnode) or (ntype = apprnode)) and
1)				       (code <> nil) then i := codeLength(code) + 2
1)			       else if ntype = cmonnode then i := cmon↑.nlines
**** File 2) EDIT.PAS[EAL,HE]/25P/326L
2)	operatetype,
2)	opentype,
2)	closetype,
2)	centertype:	begin
2)			if stype = movetype then put5('move ',5)
2)			 else if stype = operatetype then put10('operate   ',8)
2)			 else if stype = opentype then put5('open ',5)
2)			 else if stype = closetype then put10('close	 ',6)
2)			 else put10('center    ',7);
2)			outExpr(cf);
2)			n := clauses;
2)			if n = nil then b := false
2)			 else b := n↑.ntype = destnode;	(* print it on same line *)
2)			while n <> nil do	(* print out the clauses *)
2)			 with n↑ do
2)			  begin
2)			  if not (((ntype = viaptnode) and vlist) or b or
2)				  ((ntype = ffnode) and pdef)) then
2)			    begin
2)			    if setCursor then
2)			      begin
2)			      if (ntype = viaptnode) and (vcode <> nil) then
2)				i := codeLength(vcode) + 1
2)			       else if ((ntype = deprnode) or (ntype = apprnode)) and
2)				       (code <> nil) then i := codeLength(code) + 1
2)			       else if ntype = cmonnode then i := cmon↑.nlines
***************


**** File 1) EDIT.PAS[AL,HE]/29P/400L
1)			   put5('to   ',3);
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 29,25

1)			   outExpr(loc);
1)			   end
1)			  else if (ntype = viaptnode) or (ntype = byptnode) then
1)			   begin
1)			   if vlist then put5(',    ',2)
1)			    else if ntype = viaptnode then put5('via  ',4)
1)			    else put5('by   ',3);
1)			   outExpr(via);
1)			   nv := vclauses;
1)			   i := 2;
1)			   while nv <> nil do
1)			    begin
1)			    newline(indent+4);
1)			    if curLine = cursorLine then fieldNum := i;
1)			    put10('where     ',6);
1)			    putClause(nv);
1)			    i := i + 1;
1)			    nv := nv↑.next;
1)			    end;
1)			   if vcode <> nil then
1)			    begin
1)			    newline(indent+4);
1)			    if curLine = cursorLine then fieldNum := i;
1)			    put5('then ',4);
1)			    if vcode↑.stype = signaltype then
1)			      putstmnt(vcode,indent+6,plevel)
1)			     else putstmnt(vcode↑.conclusion,indent+6,plevel);
1)			    end;
**** File 2) EDIT.PAS[EAL,HE]/25P/365L
2)			   if n = clauses then putchar(' ');
2)			   put5('to   ',3);
2)			   outExpr(loc);
2)			   end
2)			  else if ntype = viaptnode then
2)			   begin
2)			   if vlist then put5(',    ',2) else put5('via  ',4);
2)			   outExpr(via);
2)			   if velocity <> duration then
2)			    begin
2)			    put10(' where    ',7);
2)			    if velocity <> nil then
2)			     begin
2)			     put10('velocity =',10); putchar(' ');
2)			     outExpr(velocity);
2)			     end;
2)			    if duration <> nil then
2)			     begin
2)			     if velocity <> nil then put5(',	',2);
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 29,25

2)			     putClause(duration);
2)			     end;
2)			    end;
2)			   if vcode <> nil then
2)			    begin
2)			    put5(' then',5);
2)			    if vcode↑.stype = signaltype then putstmnt(vcode,indent+4,plevel)
2)			     else putstmnt(vcode↑.conclusion,indent+4,plevel);
2)			    end;
***************


**** File 1) EDIT.PAS[AL,HE]/29P/487L
1)	setbasetype:	begin
1)			put10('setbase	 ',8);
1)			if cf <> nil then outExpr(cf);
1)			end;
1)	wristtype:	begin
**** File 2) EDIT.PAS[EAL,HE]/25P/451L
2)	setbasetype:	put10('setbase	 ',7);
2)	wristtype:	begin
***************


**** File 1) EDIT.PAS[AL,HE]/29P/497L
1)			if ff <> nil then
1)			  begin
1)			  put10(' about    ',7);
1)			  outExpr(ff);
1)			  end;
1)			if ff <> arm then	(* i.e. (arm <> nil) and (ff <> nil) *)
1)			 if csys then put10(' in world ',9)
1)			  else put10(' in hand  ',8);
1)			if arm <> nil then
1)			  begin
1)			  put5(' of  ',4);
1)			  outExpr(arm);
1)			  end;
1)			end;
1)	armmagictype:	begin
1)			put10('arm_magic ',10);
1)			outExpr(cmdnum);
1)			put5(',    ',2);
1)			outExpr(dev);
1)			n := iargs;
1)			for i := 1 to 2 do
1)			 begin			(* print out both arg lists *)
1)			 put5(', (  ',3);
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 29,25

1)			 while n <> nil do
1)			  begin
1)			  outExpr(n↑.lval);
1)			  n := n↑.next;
1)			  if n <> nil then putChar(',');
1)			  end;
1)			 putChar(')');
1)			 n := oargs;
1)			 end;
1)			end;
**** File 2) EDIT.PAS[EAL,HE]/25P/458L
2)			end;
***************


**** File 1) EDIT.PAS[AL,HE]/30P/60L
1)		 if (st↑.stype = declaretype) and (st↑.numvars = 1) then
1)		   with st↑.variables↑ do
1)		    if (tbits = 2) and (p <> nil) then
1)		      begin
1)		      curLine := cline;
1)		      pushNode(p);
1)		      cursorStack[cursor].cline := curLine;
1)		      end;
1)		 end
**** File 2) EDIT.PAS[EAL,HE]/26P/60L
2)		 end
***************


**** File 1) EDIT.PAS[AL,HE]/30P/78L
1)	      else if b and (s↑.stype = declaretype) then
1)	       begin			(* move down into procedure definition *)
1)	       curLine := cline;
1)	       pushStmnt(s↑.variables↑.p↑.body,2);
1)	       end
1)	      else if s↑.stype = iftype then
**** File 2) EDIT.PAS[EAL,HE]/26P/70L
2)	      else if s↑.stype = iftype then
***************


**** File 1) EDIT.PAS[AL,HE]/30P/121L
1)	     begin				(* coblock, case, clause *)
1)	     with cursorStack[cursor-1].nd↑ do
**** File 2) EDIT.PAS[EAL,HE]/26P/108L
2)	     begin				(* procdef, coblock, case, clause *)
2)	     with cursorStack[cursor-1].nd↑ do
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 30,26

***************


**** File 1) EDIT.PAS[AL,HE]/30P/215L
1)		     else
1)		      begin
1)		      cline := cline - st↑.nlines;
1)		      if (st↑.stype = declaretype) and (st↑.numvars = 1) then
1)			with st↑.variables↑ do
1)			 if (tbits = 2) and (p <> nil) then
1)			   begin
1)			   curLine := cline;
1)			   pushNode(p);
1)			   cursorStack[cursor].cline := curLine;
1)			   if godownp then pushStmnt(p↑.body,2);
1)			   end;
1)		      end
1)		    end;
**** File 2) EDIT.PAS[EAL,HE]/26P/202L
2)		     else cline := cline - st↑.nlines;
2)		    end;
***************


**** File 1) EDIT.PAS[AL,HE]/30P/287L
1)		    if s↑.stype = declaretype then j := j - 1;	(* proc def *)
1)		    end;
1)	      end
1)	     end
1)	    else
1)	     with cursorStack[cursor-1].nd↑ do		(* coblock, case, clause *)
1)	      if ntype = clistnode then
**** File 2) EDIT.PAS[EAL,HE]/26P/262L
2)		    end;
2)	      end
2)	     end
2)	    else
2)	     with cursorStack[cursor-1].nd↑ do	(* procdef, coblock, case, clause *)
2)	      if ntype = clistnode then
***************


**** File 1) EDIT.PAS[AL,HE]/31P/1L
1)	(* setUpStmnt,bannerLine,borderLines,redrawDisplay,adjustDisplay *)
1)	procedure setUpStmnt;
**** File 2) EDIT.PAS[EAL,HE]/27P/1L
2)	(* setUpStmnt, bannerLine, borderLines, redrawDisplay & adjustDisplay *)
2)	procedure setUpStmnt;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 31,27

***************


**** File 1) EDIT.PAS[AL,HE]/31P/19L
1)	 pcLine := 1;
**** File 2) EDIT.PAS[EAL,HE]/27P/19L
2)	 curProc := nil;
2)	 pcLine := 1;
***************


**** File 1) EDIT.PAS[AL,HE]/31P/77L
1)	 if not fParse then
1)	   begin
1)	   if topDline + firstDline = 2 then ch := '*' else ch := '.';
1)	   bannerLine(ch,0);
1)	   if topDline + firstDline + dispHeight - 2 >= dprog↑.nlines then ch := '*'
1)	    else ch := '.';
1)	   if botDline < dispHeight then bannerLine(ch,botDline+1)
1)	    else bannerLine(ch,dispHeight+1);
1)	   end;
1)	 end;
**** File 2) EDIT.PAS[EAL,HE]/27P/78L
2)	 if topDline + firstDline = 2 then ch := '*' else ch := '.';
2)	 bannerLine(ch,0);
2)	 if topDline + firstDline + dispHeight - 2 >= dprog↑.nlines then ch := '*'
2)	  else ch := '.';
2)	 if botDline < dispHeight then bannerLine(ch,botDline+1)
2)	  else bannerLine(ch,dispHeight+1);
2)	 end;
***************


**** File 1) EDIT.PAS[AL,HE]/31P/103L
1)	 end;
**** File 2) EDIT.PAS[EAL,HE]/27P/101L
2)	 showCursor(cursorLine-topDline-firstDline+2,1);
2)	 end;
***************


**** File 1) EDIT.PAS[AL,HE]/32P/3L
1)	procedure displayLines(var pfrom: integer);
**** File 2) EDIT.PAS[EAL,HE]/28P/3L
2)	procedure setECurInt; forward;
2)	procedure displayLines(var pfrom: integer);
***************

  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 32,28


**** File 1) EDIT.PAS[AL,HE]/32P/146L
1)	 end;
1)	(* routines to shift display: deleteLines, insertLines, reFormatStmnt *)
1)	procedure deleteLines(start,number,coff: integer);
1)	 var i,j,k,dHp,odHp: integer; p: pdbp;
1)	 begin
1)	 odHp := dprog↑.nlines;
1)	 if sParse then j := sCursor else j := 1;
1)	 for i := j to cursor - coff do			(* update cursor stack *)
1)	  with cursorStack[i] do
1)	   if stmntp then st↑.nlines := st↑.nlines - number;
1)	 if not sParse then
1)	   begin
1)	   if dispHeight < odHp then odHp := dispHeight;
1)	   i := 1;
1)	   while (i <= nmarks) and (marks[i] <= cursorLine) do i := i + 1;
1)	   while (i <= nmarks) and (marks[i] <= cursorLine + number) do
1)	    if i > 1 then
1)	      if marks[i-1] = cursorLine then
1)		begin					(* delete extra mark *)
1)		nmarks := nmarks - 1;
1)		for j := i to nmarks do marks[j] := marks[j+1];
1)		end
1)	       else begin marks[i] := cursorLine; i := i + 1 end
1)	     else begin marks[i] := cursorLine; i := i + 1 end;
1)	   for j := i to nmarks do marks[j] := marks[j] - number;
1)	   for i := 0 to debugLevel do
1)	    begin
1)	    if i = 0 then p := getAllPdbs else p := debugPdbs[i];
1)	    while p <> nil do
1)	     with p↑ do
1)	      begin
1)	      if linenum >= cursorLine then
1)		if linenum >= cursorLine + number then linenum := cursorLine
1)		 else linenum := linenum - number;
1)	      p := nextPdb;
1)	      end;
1)	    end;
1)	   if pcline >= cursorLine then
1)	     if pcline >= cursorLine + number then pcline := cursorLine
1)	      else pcline := pcline - number;
1)	   end;
1)	 if not fParse then
1)	   begin
1)	   if start < topDline then
1)	     begin
1)	     number := number - (topDline - start);
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 32,28

1)	     start := topDline;
1)	     end;
1)	   if start + number - 1 > botDline then
1)	     number := botDline - start + 1;
1)	   j := start - topDline + 1;
1)	   for i := j to j + number - 1 do  (* make sure deleted lines are released *)
1)	    relLine(lines[i]);
1)	   for i := j + number to botDline - topDLine + 1 do	 (* roll up *)
1)	    lines[i-number] := lines[i];
1)	   botDline := botDline - number;
1)	   for i := botDline - topDline + 2 to maxLines do lines[i] := nil;
1)	   dHp := dprog↑.nlines;
1)	   if dispHeight < dHp then dHp := dispHeight;
1)	   if start + number < topDline + firstDline then
1)	     firstDline := firstDline - number		(* screen ok as is *)
1)	    else if start <= topDline + firstDline + dHp - 2 then
1)	     begin			(* need to shift new lines onto screen *)
1)	     j := topDline + firstDline + dispHeight - 2 - dprog↑.nlines;
1)	     if j > 0 then		(* j = # lines to add at top *)
1)	       begin			(* at bottom - need to shift top down *)
1)	       if topDline + firstDline - 1 <= j then (* program length < display height *)
1)		 j := topDline + firstDline - 2;	(* max # lines can add at top *)
1)	       if j > 0 then
1)		 begin			(* first roll down *)
1)		 if j >= firstDline then
1)		   begin			(* need to make space at top of buffer *)
1)		   k := j - firstDline + 1;		(* number of new lines to add *)
1)		   for i := maxLines downto k+1 do lines[i] := lines[i-k];
1)		   for i := 1 to k do lines[i] := nil;
1)		   topDline := topDline - k;
1)		   firstDline := 1;
1)		   end
1)		  else
1)		   begin
1)		   firstDline := firstDline - j;
1)		   k := 0;
1)		   end;
1)		 number := number - j;
1)		 if smartTerminal then
1)		   begin
1)		   delLine(start-(topDline+k+firstDline-2),number+j); (* delete the lines *)
1)		   insLine(1,j);			(* & insert some more at top *)
1)		   insLine(dHp-number+1,number);	(* & at bottom too *)
1)		   end
1)		  else
1)		   for i := j + 1 to odHp - number do	(* redraw top lines *)
1)		    with lines[firstDline+i-1]↑ do
1)		     out1Line(i,start,length);
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 32,28

1)		 for i := k+1 to j do
1)		  with lines[firstDline+i-1]↑ do
1)		   out1Line(i,start,length);	(* redraw lines already in buffer *)
1)		 firstLine := topDline;
1)		 lastLine := topDline + k - 1;
1)		 curLine := 0;
1)		 if firstLine <= lastLine then
1)		  putStmnt(dProg,0,99);			(* write & display new lines *)
1)		 start := start + j;			(* correct for below *)
1)		 end;
1)	       end
1)	      else j := 0;
1)	     if number > 0 then
1)	       begin
1)	       if j <= 0 then  (* make sure roll up above didn't already shift display *)
1)		 begin
1)		 j := start - (topDline + firstDline - 2);
1)		 if smartTerminal then
1)		   begin
1)		   delLine(j,number);		(* delete some lines *)
1)		   insLine(dispHeight-number+1,number); (* & insert some more at bottom *)
1)		   end
1)		  else
1)		   for i := j to odHp - number do		(* redraw middle lines *)
1)		    with lines[firstDline+i-1]↑ do
1)		     out1Line(i,start,length);
1)		 end;
1)	       for i := odHp - number to dHp do
1)		if lines[firstDline+i-1] <> nil then	(* already in buffer *)
1)		 with lines[firstDline+i-1]↑ do
1)		  out1Line(i,start,length);			(* redraw it *)
1)	       firstLine := botDline + 1;
1)	       lastLine := topDline + firstDline + dHp - 2;
1)	       botDline := lastLine;
1)	       curLine := 0;
1)	       if firstLine <= lastLine then
1)		putStmnt(dProg,0,99);			(* write & display new lines *)
1)	       end;
1)	     if odHp < dispHeight then odHp := odHp + 1;
1)	     for i := dHp+1 to odHp do clearLine(i);	(* flush any unused lines *)
1)	     end;
1)	   borderLines;
1)	   end;
1)	 end;
1)	procedure insertLines(start,number,coff: integer);	(* this one's easy *)
1)	 var i,j: integer; p: pdbp;
1)	 begin
1)	 if sParse then j := sCursor else j := 1;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 32,28

1)	 if coff >= 0 then
1)	   for i := j to cursor - coff do		(* update cursor stack *)
1)	    with cursorStack[i] do
1)	     if stmntp then st↑.nlines := st↑.nlines + number;
1)	 if not sParse then
1)	   begin
1)	   for i := 1 to nmarks do			(* update mark table *)
1)	    if marks[i] >= cursorLine then marks[i] := marks[i] + number;
1)	   for i := 0 to debugLevel do
1)	    begin
1)	    if i = 0 then p := getAllPdbs else p := debugPdbs[i];
1)	    while p <> nil do
1)	     with p↑ do
1)	      begin
1)	      if linenum >= cursorLine then linenum := linenum + number;
1)	      p := nextPdb;
1)	      end;
1)	    end;
1)	   if pcline >= cursorLine then pcline := pcline + number;
1)	   end;
1)	 if not fParse then
1)	   begin
1)	   if start < topDline then
1)	     begin
1)	     number := number - (topDline - start);
1)	     start := topDline;
1)	     end;
1)	   if start + number > topDline + maxLines - 2 then
1)	     number := topDline + maxLines - start;
1)	   if firstDline + dispHeight - 1 + number > maxLines then
1)	     begin				(* need to roll lines array up some *)
1)	     for i := 1 to number do relLine(lines[i]);	(* flush top lines *)
1)	     for i := 1 to maxLines - number do lines[i] := lines[i+number]; (* roll up *)
1)	     for i := maxLines-number+1 to maxLines do lines[i] := nil;
1)	     topDline := topDline + number;
1)	     firstDline := firstDline - number;
1)	     botDline := botDline - number;
1)	     end;
1)	   for i := maxLines-number+1 to maxLines do relLine(lines[i]); (* flush buffer bottom *)
1)	   for i := maxLines - number downto start - topDline + 1 do
1)	    lines[i+number] := lines[i];			(* shift buffer down *)
1)	   for i := start - topDline + 1 to start - topDline + number do
1)	    lines[i] := nil;
1)	   botDline := botDline + number;
1)	   if botDline >= topDline + maxLines then botDline := topDline + maxLines - 1;
1)	   if start < topDline + firstDline - 1 then
1)	     firstDline := firstDline + number
1)	    else if start <= topDline + firstDline + dispHeight - 2 then
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 32,28

1)	     begin		(* some of the insert is on screen, so adjust it *)
1)	     if topDline + firstDline + dispHeight - 1 < start + number then
1)	       begin
1)	       number := topDline + firstDline + dispHeight - 2 - start;
1)	       end;
1)	     j := start - (topDline + firstDline - 2);	(* screen line to insert at *)
1)	     if smartTerminal then
1)	       begin
1)	       delLine(dispHeight-number+1,number);	(* delete some lines at bottom *)
1)	       insLine(j,number);				(* & insert more in middle *)
1)	       end
1)	      else
1)	       begin
1)	       for i := j to j + number - 1 do clearLine(i);  (* clear inserted lines *)
1)	       for i := j + number to dispHeight do	(* redraw bottom lines *)
1)		if lines[firstDline+i-1] <> nil then
1)		 with lines[firstDline+i-1]↑ do
1)		  out1Line(i,start,length);
1)	       end;
1)	     end;
1)	   borderLines;
1)	   end;
1)	 end;
1)	procedure reFormatStmnt(st: statementp; indent,ocur: integer);
1)	 var i,j: integer;
1)	 begin
1)	 with st↑ do
1)	  begin
1)	  curLine := 1;
1)	  setUp := true;
1)	  setCursor := false;
1)	  j := nlines;				(* how long were we *)
1)	  putStmnt(st,indent,99);		(* possibly reformat us *)
1)	  setUp := false;
1)	  if j <> nlines then
1)	    begin		(* if necessary correct for any change in nlines *)
1)	    if j < nlines then insertLines(ocur,nlines-j,1)	(* fix up screen *)
1)	     else if j > nlines then deleteLines(ocur,j-nlines,1);
1)	    end;
1)	  firstLine := cursorStack[cursor].cline;
1)	  lastLine := firstLine + nlines - 1;
1)	  end;
1)	 if firstline < topDLine then firstLine := topDline;
1)	 if botDline < lastLine then
1)	   if botDline > topDline + firstDline + dispHeight - 2 then
1)	     lastLine := botDline		(* it's definitely off screen *)
1)	    else botDline := lastLine;		(* should be ok.... *)
1)	 for i := firstLine - topDline + 1 to lastLine - topDline + 1 do
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 32,28

1)	  begin				(* flush old lines before redrawing stmnt *)
1)	  relLine(lines[i]);
1)	  lines[i] := nil;
1)	  end;
1)	 setCursor := true;			(* let putStmnt figure right fieldnum *)
1)	 curLine := 0;
1)	 putStmnt(dProg,0,99);			(* redraw statement *)
1)	 setCursor := false;
1)	 end;
1)	(* aux routines for parsing exprs: matchdim,getdim,dimCheck,getDelim,getDo,ppDtype *)
1)	function matchdim(d1,d2: nodep; exactp: boolean): boolean;
1)	 var b: boolean;
1)	 begin
1)	 with d1↑ do
1)	  b := (time = d2↑.time) and (distance = d2↑.distance) and
1)		(angle = d2↑.angle) and (dforce = d2↑.dforce);
1)	 if not (b or exactp) then
1)	   begin	(* see if we can coerce d1 or d2, i.e. one is dimensionless *)
1)	   with d1↑ do
1)	    if (time = 0) and (distance = 0) and (angle = 0) and (dforce = 0) then
1)	     b := true;
1)	   if not b then		(* see if d2 is dimensionless *)
1)	    with d2↑ do
1)	     if (time = 0) and (distance = 0) and (angle = 0) and (dforce = 0) then
1)	      b := true;
1)	   end;
1)	 matchdim := b;
1)	 end;
1)	function getdim(n: nodep; var d: nodep): nodep;
1)	 var vdim: varidefp; d1: nodep;
1)	 procedure dimCopy(dp: nodep);
1)	  begin
1)	  with d↑ do
1)	   begin
1)	   time := dp↑.time;
1)	   distance := dp↑.distance;
1)	   angle := dp↑.angle;
1)	   dforce := dp↑.dforce;
1)	   end
1)	  end;
1)	 procedure dimMod(d1,d2: nodep; i: real);
1)	  begin
1)	  with d↑ do
1)	   begin
1)	   time := d1↑.time + round(i * d2↑.time);
1)	   distance := d1↑.distance + round(i * d2↑.distance);
1)	   angle := d1↑.angle + round(i * d2↑.angle);
1)	   dforce := d1↑.dforce + round(i * d2↑.dforce);
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 32,28

1)	   end
1)	  end;
1)	 begin (* getdim *)
1)	 if d = nil then
1)	  begin
1)	  d := newNode;	(* need to make up a new dimension node to hold result *)
1)	  d↑.ntype := dimnode;
1)	  end;
1)	 if n = nil then dimCopy(nodim↑.dim)
1)	  else
1)	   with n↑ do
1)	    if (ntype = leafnode) or (ntype = procdefnode) then
1)	      begin
1)	      if ntype = procdefnode then vdim := pname
1)	       else if ltype = varitype then vdim := vari
1)	       else if ltype = pconstype then vdim := cname
1)	       else vdim := nil;
1)	      if vdim <> nil then	(* see if there's an associated dimension *)
1)	       with vdim↑ do
1)		if dtype <> nil then vdim := dtype	(* yes - use it *)
1)		 else
1)		  if (vtype = transtype) or (vtype = frametype) then vdim := distancedim
1)		   else if vtype = rottype then vdim := angledim else vdim := nil;
1)	      if vdim <> nil then dimCopy(vdim↑.dim) else dimCopy(nodim↑.dim)
1)	      end
1)	     else			(* see what type of expression it is *)
1)	      begin
1)	      d1 := nil;
1)	      if (op <= eqvop) or ((sinop <= op) and (op <= tanop)) or (op = sexpop) or
1)		 (op = logop) or (op = expop) or (op = unitvop) or (op = taxisop) or
1)		 (op = queryop) or (op = inscalarop) or (op = adcop) or (op = vmop) then
1)		  dimCopy(nodim↑.dim)
1)	       else if op = timeop then dimCopy(timedim↑.dim)
1)	       else if ((asinop <= op) and (op <= atan2op)) or (op = torientop) or
1)		 (op = vsaxwrop) then dimCopy(angledim↑.dim)
1)	       else if (op = constrop) or (op = fmakeop) or (op = deproachop) or
1)		 (op = grinchop) then dimCopy(distancedim↑.dim)
1)	       else if (op = tmakeop) or (op = tvmulop) or (op = ttmulop) then
1)		  d := getdim(arg2,d)
1)	       else if (op = smulop) or (op = svmulop) or (op = vsmulop) or
1)		 (op = vdotop) or (op = crossvop) then
1)		  dimMod(getdim(arg1,d),getdim(arg2,d1),1.0)
1)	       else if (op = sdivop) or (op = idivop) or (op = vsdivop) then
1)		  dimMod(getdim(arg1,d),getdim(arg2,d1),-1.0)
1)	       else if (op = sqrtop) then dimMod(nodim↑.dim,getdim(arg1,d),0.5)
1)	       else if (op = negop) then dimMod(nodim↑.dim,getdim(arg1,d),-1.0)
1)			   (* special - used by dimension statement *)
1)	       else if (op = jointop) then dimCopy(angledim↑.dim)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 32,28

1)			(* ** the above is only true for arms like the PUMA  ** *)
1)			(* **  with no prismatic joints			     ** *)
1)	       else d := getdim(arg1,d); (* sadd,ssub,sneg,sabs,max,min,int,mod,vmagn,
1)					    tmagn,vmake,vadd,vsub,vneg,tpos,tvadd,tvsub,
1)					    tinvrt,ftof,aref,call,bad *)
1)	    if d1 <> nil then relNode(d1);
1)	    end;
1)	 getdim := d;
1)	 end;
1)	procedure dimCheck(n,d: nodep);	(* expr n should be of dimension d *)
1)	 var dp: nodep;
1)	 begin
1)	 dp := nil;
1)	 if not matchdim(getdim(n,dp),d,checkDims) then	(* does dimension match ok? *)
1)	  begin
1)	  pp20L(' Dimensions don''t ma',20); pp5('tch  ',3);
1)	  errPrnt;
1)	  end;
1)	 relNode(dp);
1)	 end;
1)	 procedure getDelim(char: ascii);
1)	  begin
1)	  getToken;			(* look for the char *)
1)	  with curToken do
1)	   if (ttype <> delimtype) or (ch <> char) then
1)	    begin
1)	    backup := true;
1)	    pp10L(' Need a " ',9); ppChar(char); pp10('" here.   ',7);
1)	    errprnt;
1)	    end;
1)	  end;
1)	procedure getDo;
1)	 begin
1)	 getToken;
1)	 if not endOfLine then
1)	   with curToken do
1)	    if (ttype <> reswdtype) or (rtype <> filtype) or
1)	       (filler <> dotype) then
1)	      begin
1)	      pp20L(' Need a "DO" here   ',17); errprnt;
1)	      backUp := true
1)	      end;
1)	 end;
1)	procedure ppDtype(d: datatypes);
**** File 2) EDIT.PAS[EAL,HE]/28P/148L
2)	 showCursor(cursorLine - topDline - firstDline + 2,1);
2)	 end;
2)	(* routines to shift display: deleteLines, insertLines *)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 32,28

2)	procedure deleteLines(start,number,coff: integer);
2)	 var i,j,k,dHp,odHp: integer; p: pdbp;
2)	 begin
2)	 odHp := dprog↑.nlines;
2)	 if dispHeight < odHp then odHp := dispHeight;
2)	 for i := 1 to cursor - coff do			(* update cursor stack *)
2)	  with cursorStack[i] do
2)	   if stmntp then st↑.nlines := st↑.nlines - number;
2)	 i := 1;
2)	 while (i <= nmarks) and (marks[i] <= cursorLine) do i := i + 1;
2)	 while (i <= nmarks) and (marks[i] <= cursorLine + number) do
2)	  if i > 1 then
2)	    if marks[i-1] = cursorLine then
2)	      begin					(* delete extra mark *)
2)	      nmarks := nmarks - 1;
2)	      for j := i to nmarks do marks[j] := marks[j+1];
2)	      end
2)	     else begin marks[i] := cursorLine; i := i + 1 end
2)	   else begin marks[i] := cursorLine; i := i + 1 end;
2)	 for j := i to nmarks do marks[j] := marks[j] - number;
2)	 for i := 0 to debugLevel do
2)	  begin
2)	  if i = 0 then p := getAllPdbs else p := debugPdbs[i];
2)	  while p <> nil do
2)	   with p↑ do
2)	    begin
2)	    if linenum >= cursorLine then
2)	      if linenum >= cursorLine + number then linenum := cursorLine
2)	       else linenum := linenum - number;
2)	    p := nextPdb;
2)	    end;
2)	  end;
2)	 if pcline >= cursorLine then
2)	   if pcline >= cursorLine + number then pcline := cursorLine
2)	    else pcline := pcline - number;
2)	 if start < topDline then
2)	   begin
2)	   number := number - (topDline - start);
2)	   start := topDline;
2)	   end;
2)	 if start + number - 1 > botDline then
2)	   number := botDline - start + 1;
2)	 j := start - topDline + 1;
2)	 for i := j to j + number - 1 do  (* make sure deleted lines are released *)
2)	  relLine(lines[i]);
2)	 for i := j + number to botDline - topDLine + 1 do	 (* roll up *)
2)	  lines[i-number] := lines[i];
2)	 botDline := botDline - number;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 32,28

2)	 for i := botDline - topDline + 2 to maxLines do lines[i] := nil;
2)	 dHp := dprog↑.nlines;
2)	 if dispHeight < dHp then dHp := dispHeight;
2)	 if start + number < topDline + firstDline then
2)	   firstDline := firstDline - number		(* screen ok as is *)
2)	  else if start <= topDline + firstDline + dHp - 2 then
2)	   begin			(* need to shift new lines onto screen *)
2)	   j := topDline + firstDline + dispHeight - 2 - dprog↑.nlines;
2)	   if j > 0 then		(* j = # lines to add at top *)
2)	     begin			(* at bottom - need to shift top down *)
2)	     if topDline + firstDline - 1 <= j then (* program length < display height *)
2)	       j := topDline + firstDline - 2;	(* max # lines can add at top *)
2)	     if j > 0 then
2)	       begin			(* first roll down *)
2)	       if j >= firstDline then
2)		 begin			(* need to make space at top of buffer *)
2)		 k := j - firstDline + 1;		(* number of new lines to add *)
2)		 for i := maxLines downto k+1 do lines[i] := lines[i-k];
2)		 for i := 1 to k do lines[i] := nil;
2)		 topDline := topDline - k;
2)		 firstDline := 1;
2)		 end
2)		else
2)		 begin
2)		 firstDline := firstDline - j;
2)		 k := 0;
2)		 end;
2)	       number := number - j;
2)	       if smartTerminal then
2)		 begin
2)		 delLine(start-(topDline+k+firstDline-2),number+j); (* delete the lines *)
2)		 insLine(1,j);			(* & insert some more at top *)
2)		 insLine(dHp-number+1,number);	(* & at bottom too *)
2)		 end
2)		else
2)		 for i := j + 1 to odHp - number do	(* redraw top lines *)
2)		  with lines[firstDline+i-1]↑ do
2)		   out1Line(i,start,length);
2)	       for i := k+1 to j do
2)		with lines[firstDline+i-1]↑ do
2)		 out1Line(i,start,length);	(* redraw lines already in buffer *)
2)	       firstLine := topDline;
2)	       lastLine := topDline + k - 1;
2)	       curLine := 0;
2)	       if firstLine <= lastLine then
2)		putStmnt(dProg,0,99);			(* write & display new lines *)
2)	       start := start + j;			(* correct for below *)
2)	       end;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 32,28

2)	     end
2)	    else j := 0;
2)	   if number > 0 then
2)	     begin
2)	     if j <= 0 then  (* make sure roll up above didn't already shift display *)
2)	       begin
2)	       j := start - (topDline + firstDline - 2);
2)	       if smartTerminal then
2)		 begin
2)		 delLine(j,number);		(* delete some lines *)
2)		 insLine(dispHeight-number+1,number); (* & insert some more at bottom *)
2)		 end
2)		else
2)		 for i := j to odHp - number do		(* redraw middle lines *)
2)		  with lines[firstDline+i-1]↑ do
2)		   out1Line(i,start,length);
2)	       end;
2)	     for i := odHp - number to dHp do
2)	      if lines[firstDline+i-1] <> nil then	(* already in buffer *)
2)	       with lines[firstDline+i-1]↑ do
2)		out1Line(i,start,length);			(* redraw it *)
2)	     firstLine := botDline + 1;
2)	     lastLine := topDline + firstDline + dHp - 2;
2)	     botDline := lastLine;
2)	     curLine := 0;
2)	     if firstLine <= lastLine then
2)	      putStmnt(dProg,0,99);			(* write & display new lines *)
2)	     end;
2)	   if odHp < dispHeight then odHp := odHp + 1;
2)	   for i := dHp+1 to odHp do clearLine(i);	(* flush any unused lines *)
2)	   end;
2)	 borderLines;
2)	 end;
2)	procedure insertLines(start,number,coff: integer);	(* this one's easy *)
2)	 var i,j: integer; p: pdbp;
2)	 begin
2)	 if coff >= 0 then
2)	   for i := 1 to cursor - coff do		(* update cursor stack *)
2)	    with cursorStack[i] do
2)	     if stmntp then st↑.nlines := st↑.nlines + number;
2)	 for i := 1 to nmarks do			(* update mark table *)
2)	  if marks[i] >= cursorLine then marks[i] := marks[i] + number;
2)	 for i := 0 to debugLevel do
2)	  begin
2)	  if i = 0 then p := getAllPdbs else p := debugPdbs[i];
2)	  while p <> nil do
2)	   with p↑ do
2)	    begin
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 32,28

2)	    if linenum >= cursorLine then linenum := linenum + number;
2)	    p := nextPdb;
2)	    end;
2)	  end;
2)	 if pcline >= cursorLine then pcline := pcline + number;
2)	 if start < topDline then
2)	   begin
2)	   number := number - (topDline - start);
2)	   start := topDline;
2)	   end;
2)	 if start + number > topDline + maxLines - 2 then
2)	   number := topDline + maxLines - start;
2)	 if firstDline + dispHeight - 1 + number > maxLines then
2)	   begin				(* need to roll lines array up some *)
2)	   for i := 1 to number do relLine(lines[i]);	(* flush top lines *)
2)	   for i := 1 to maxLines - number do lines[i] := lines[i+number]; (* roll up *)
2)	   for i := maxLines-number+1 to maxLines do lines[i] := nil;
2)	   topDline := topDline + number;
2)	   firstDline := firstDline - number;
2)	   botDline := botDline - number;
2)	   end;
2)	 for i := maxLines-number+1 to maxLines do relLine(lines[i]); (* flush buffer bottom *)
2)	 for i := maxLines - number downto start - topDline + 1 do
2)	  lines[i+number] := lines[i];			(* shift buffer down *)
2)	 for i := start - topDline + 1 to start - topDline + number do
2)	  lines[i] := nil;
2)	 botDline := botDline + number;
2)	 if botDline >= topDline + maxLines then botDline := topDline + maxLines - 1;
2)	 if start < topDline + firstDline - 1 then
2)	   firstDline := firstDline + number
2)	  else if start <= topDline + firstDline + dispHeight - 2 then
2)	   begin		(* some of the insert is on screen, so adjust it *)
2)	   if topDline + firstDline + dispHeight - 1 < start + number then
2)	     begin
2)	     number := topDline + firstDline + dispHeight - 2 - start;
2)	     end;
2)	   j := start - (topDline + firstDline - 2);	(* screen line to insert at *)
2)	   if smartTerminal then
2)	     begin
2)	     delLine(dispHeight-number+1,number);	(* delete some lines at bottom *)
2)	     insLine(j,number);				(* & insert more in middle *)
2)	     end
2)	    else
2)	     begin
2)	     for i := j to j + number - 1 do clearLine(i);  (* clear inserted lines *)
2)	     for i := j + number to dispHeight do	(* redraw bottom lines *)
2)	      if lines[firstDline+i-1] <> nil then
2)	       with lines[firstDline+i-1]↑ do
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 32,28

2)		out1Line(i,start,length);
2)	     end;
2)	   end;
2)	 borderLines;
2)	 end;
2)	(* aux routines for parsing expressions: eDimCheck, eGetDelim, ppDtype *)
2)	procedure eDimCheck(n,d: nodep);	(* expr n should be of dimension d *)
2)	 var dp: nodep;
2)	 begin
2)	 dp := nil;
2)	 if not matchdim(getdim(n,dp),d,dimCheck) then	(* does dimension match ok? *)
2)	  begin
2)	  pp20L(' Dimensions don''t ma',20); pp5('tch  ',3);
2)	  ppLine;
2)	  end;
2)	 relNode(dp);
2)	 end;
2)	 procedure eGetDelim(char: ascii);
2)	  begin
2)	  eGetToken;			(* look for the char *)
2)	  with curToken do
2)	   if (ttype <> delimtype) or (ch <> char) then
2)	    begin
2)	    backup := true;
2)	    pp10L(' Need a " ',9); ppChar(char); pp10('" here.   ',7);
2)	    ppLine;
2)	    end;
2)	  end;
2)	procedure ppDtype(d: datatypes);
***************


**** File 1) EDIT.PAS[AL,HE]/35P/1L
1)	(* aux routines for parsing exprs: defNode,getDtype,checkarg,copyExpr *)
1)	 function defNode(d: datatypes): nodep;
1)	  var n: nodep;
1)	  begin
1)	  n := newNode;
1)	  with n↑ do
1)	   begin
1)	   ntype := leafnode;
1)	   ltype := d;
1)	   case d of
1)	svaltype: s := 0.0;
1)	vectype:  v := nilvect;
1)	rottype,
1)	transtype: t := niltrans;
1)	others:	v := nil;			(* this should never happen, but... *)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 35,31

1)	    end;
1)	   end;
1)	  defNode := n;
1)	  end;
1)	 function getDtype(n: nodep): datatypes;
1)	  var da: datatypes;
1)	  begin
1)	  if n = nil then da := nulltype
1)	   else
1)	    with n↑ do
1)	     if ntype = leafnode then
1)	       if ltype = varitype then da := vari↑.vtype
1)		else if ltype = pconstype then da := pcval↑.ltype
1)		else da := ltype
1)	      else			(* see what type of op we've got *)
1)	       if (svalop < op) and (op < vecop) or
1)		  (ioop < op) and (op < specop) then da := svaltype
1)	        else if (vecop < op) and (op < transop) then da := vectype
1)	        else if (transop < op) and (op < ioop) then da := transtype
1)	        else if (op = arefop) or (op = callop) then da := arg1↑.vari↑.vtype
1)	        else if (op = grinchop) then da := getDtype(arg1)
1)	        else if (op = vmop) or (op = adcop) or
1)			(op = jointop) then da := svaltype
1)	        else if (op = badop) then da := getDtype(arg2)
1)		else da := nulltype;
1)	  getDtype := da;
1)	  end;
1)	function checkArg(n: nodep; d: datatypes): nodep;
1)	 var bad: nodep; da: datatypes;
1)	 begin
1)	 if n = nil then checkArg := defNode(d)  (* use default value *)
1)	  else
1)	   begin
1)	   da := getdtype(n);
1)	   if (da <> d) and ((da = frametype) or (da = rottype)) then da := transtype;
1)	   if (d = da) or ((d = rottype) and (da = transtype)) then
1)	     checkArg := n			(* it's fine *)
1)	    else if da = undeftype then
1)	     begin				(* need to define the variable *)
1)	     if n↑.ntype = leafnode then n↑.vari↑.vtype := d
1)	      else n↑.arg1↑.vari↑.vtype := d;
1)	     checkArg := n;			(* but it's fine *)
1)	     end
1)	    else
1)	     begin				(* no good - need to fix things up *)
1)	     pp10L(' Found a  ',9); ppDtype(da);
1)	     pp10(' where a  ',9); ppDtype(d);
1)	     pp20(' should have been.  ',18);
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 35,31

1)	     errprnt;
1)	     bad := newNode;
1)	     with bad↑ do
1)	      begin
1)	      ntype := exprnode;
1)	      op := badop;
1)	      arg1 := n;
1)	      arg2 := defNode(d);
1)	      arg3 := nil;
1)	      end;
1)	     checkArg := bad;
1)	     end;
1)	   end;
1)	 end;
1)	function copyExpr (* (n: nodep; lcp: boolean): nodep; *);
1)	 var np: nodep;
1)	 begin
1)	 if n = nil then np := nil
1)	  else
1)	   with n↑ do
1)	    begin
1)	    if (ntype <> leafnode) or (ltype = varitype) or lcp then
1)	      begin					(* need to make a copy *)
1)	      np := newNode;
1)	      np↑.ntype := ntype;
1)	      case ntype of
1)	arraydefnode:
1)	       begin
1)	       np↑.numdims := numdims;
1)	       np↑.combnds := true;		(* indicate it's a copy *)
1)	       np↑.bounds := copyexpr(bounds,false);
1)	       end;
1)	bnddefnode:
1)	       begin
1)	       np↑.next := copyexpr(next,false);
1)	       np↑.lower := copyexpr(lower,false);
1)	       np↑.upper := copyexpr(upper,false);
1)	       end;
1)	exprnode:
1)	       begin
1)	       np↑.op := op;
1)	       if op = arefop then lcp := true;
1)	       np↑.arg1 := copyexpr(arg1,false);
1)	       np↑.arg2 := copyexpr(arg2,lcp);
1)	       np↑.arg3 := copyexpr(arg3,false);
1)	       end;
1)	leafnode:
1)	       begin
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 35,31

1)	       np↑.ltype := ltype;
1)	       np↑.length := length;		(* this should work for all leaftypes *)
1)	       np↑.str := str
1)	       end;
1)	listnode:
1)	       begin
1)	       np↑.lval := copyexpr(lval,lcp);
1)	       np↑.next := copyexpr(next,lcp);
1)	       end;
1)	      end
1)	     end
1)	    else np := n;
1)	   end;
1)	 copyExpr := np;
1)	 end;
1)	(* aux routines for parsing expressions(cont): getArgs *)
1)	procedure getArgs(opn: nodep);
1)	var arg,n,np,nhdr,d: nodep; nargs,i: integer; dch: ascii; dat: datatypes;
**** File 2) EDIT.PAS[EAL,HE]/31P/1L
2)	(* aux routines for parsing expressions(cont): eGetArgs *)
2)	function eExprParse: nodep; forward;
2)	procedure eGetArgs(opn: nodep);
2)	var arg,n,np,nhdr,d: nodep; nargs,i: integer; dch: ascii; dat: datatypes;
***************


**** File 1) EDIT.PAS[AL,HE]/36P/44L
1)	    if stmntp then b := (movetype <= st↑.stype) and (st↑.stype <= floattype);
1)	   i := i - 1;
**** File 2) EDIT.PAS[EAL,HE]/31P/46L
2)	    if stmntp then b := (movetype <= st↑.stype) and (st↑.stype <= centertype);
2)	   i := i - 1;
***************


**** File 1) EDIT.PAS[AL,HE]/36P/52L
1)	    pp5('ment.',5); errprnt;
1)	    opn↑.op := badop;
**** File 2) EDIT.PAS[EAL,HE]/31P/54L
2)	    pp5('ment.',5); ppLine;
2)	    opn↑.op := badop;
***************


**** File 1) EDIT.PAS[AL,HE]/36P/94L
1)		with opn↑.arg1↑.vari↑ do	(* check it's defined *)
1)		 if odd(tbits) then n := a else n := nil;
1)		if n = nil then nargs := 1 else nargs := n↑.numdims;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 36,31

1)		end;
1)	callop:	begin
1)		func := true;
1)		nargs := 0;
1)		with opn↑.arg1↑.vari↑ do	(* see if procedure is defined *)
1)		 if tbits = 2 then n := p else n := nil;
1)		if n <> nil then
**** File 2) EDIT.PAS[EAL,HE]/31P/96L
2)		n := opn↑.arg1↑.vari↑.a;	(* check it's defined *)
2)		if n = nil then nargs := 1 else nargs := n↑.numdims;
2)		end;
2)	callop:	begin
2)		func := true;
2)		nargs := 0;
2)		n := opn↑.arg1↑.vari↑.p;	(* see if procedure is defined *)
2)		if n <> nil then
***************


**** File 1) EDIT.PAS[AL,HE]/36P/109L
1)	others:	begin end;	(* nothing to do *)
1)	   end;
1)	  if not absp then
1)	    begin
1)	    getToken;			(* looking for opening '(' or '[' *)
1)	    if aref then dch := '[' else dch := '(';
1)	    with curToken do
1)	     if (ttype <> delimtype) or (ch <> dch) then  (* not there - complain *)
1)	       begin
1)	       backup := true;
1)	       b := false;		(* don't bother looking for args *)
1)	       if opn↑.op = timeop then
1)		 begin
1)		 opn↑.arg1 := defNode(svaltype);	(* use zero *)
1)		 i := 1;
1)		 end
1)		else if closep or not qp then  (* query doesn't need to take any args *)
1)		 begin
1)		 pp10L('Need a    ',7);
1)		 if aref then pp10('subscript ',10) else pp10('parameter ',10);
1)		 pp10('list here.',10);
1)		 errprnt;
1)		 end;
1)	       closep := false;	(* so we know not to expect a closing ')' or ']' *)
1)	       end
1)	      else closep := true;	(* make sure we look for matching ')' or ']' *)
1)	    end;
1)	  while b do
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 36,31

1)	   begin					(* get the next argument *)
1)	   if paramlist = nil then arg := exprParse	(* implies (not func) *)
1)	    else if paramlist↑.tbits <> 5 then arg := exprParse
1)	    else
1)	     with curToken do
1)	      begin			(* looking for array passed by reference *)
1)	      getToken;
1)	      bp := ttype = identtype;
1)	      if bp then
1)		begin			 (* is it a defined variable and an array? *)
1)		v := varLookup(id);
1)		if v <> nil then bp := (v↑.vtype <> pconstype) and odd(v↑.tbits)
**** File 2) EDIT.PAS[EAL,HE]/31P/109L
2)	   end;
2)	  if not absp then
2)	    begin
2)	    eGetToken;			(* looking for opening '(' or '[' *)
2)	    if aref then dch := '[' else dch := '(';
2)	    with curToken do
2)	     if (ttype <> delimtype) or (ch <> dch) then  (* not there - complain *)
2)	      begin
2)	      backup := true;
2)	      if opn↑.op = timeop then
2)		begin
2)		b := false;		(* don't bother looking for args *)
2)		closep := false;	(* so we know not to expect a closing ')' *)
2)		opn↑.arg1 := defNode(svaltype);	(* use zero *)
2)		i := 1;
2)		end
2)	       else if qp or not closep then  (* query doesn't need to take any args *)
2)		begin
2)		b := false;		(* don't bother looking for args *)
2)		closep := false;	(* so we know not to expect a closing ')' *)
2)		end
2)	       else
2)		begin
2)		pp10(' Need a " ',9); ppChar(dch); pp10('" here.   ',7); ppLine;
2)		end;
2)	      end;
2)	    end;
2)	  while b do
2)	   begin					(* get the next argument *)
2)	   if paramlist = nil then arg := eExprParse	(* implies (not func) *)
2)	    else if paramlist↑.tbits <> 5 then arg := eExprParse
2)	    else
2)	     with curToken do
2)	      begin			(* looking for array passed by reference *)
2)	      eGetToken;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 36,31

2)	      bp := ttype = identtype;
2)	      if bp then
2)		begin			 (* is it a defined variable and an array? *)
2)		v := eVarLookup(id);
2)		if v <> nil then bp := (v↑.vtype <> pconstype) and odd(v↑.tbits)
***************


**** File 1) EDIT.PAS[AL,HE]/36P/161L
1)		pp20L(' Need an array varia',20); pp10('ble here  ',8); errprnt;
1)		arg := nil;
**** File 2) EDIT.PAS[EAL,HE]/31P/161L
2)		pp20L(' Need an array varia',20); pp10('ble here  ',8); ppLine;
2)		arg := nil;
***************


**** File 1) EDIT.PAS[AL,HE]/36P/182L
1)		  dimCheck(arg,d);
1)		  d := nil;
**** File 2) EDIT.PAS[EAL,HE]/31P/182L
2)		  eDimCheck(arg,d);
2)		  d := nil;
***************


**** File 1) EDIT.PAS[AL,HE]/36P/190L
1)		 dimCheck(arg,nodim↑.dim);
1)		 end
**** File 2) EDIT.PAS[EAL,HE]/31P/190L
2)		 eDimCheck(arg,nodim↑.dim);
2)		 end
***************


**** File 1) EDIT.PAS[AL,HE]/36P/206L
1)	     getToken;				(* looking for separating ',' *)
1)	     with curToken do
**** File 2) EDIT.PAS[EAL,HE]/31P/206L
2)	     eGetToken;				(* looking for separating ',' *)
2)	     with curToken do
***************


**** File 1) EDIT.PAS[AL,HE]/36P/218L
1)	      pp10(' Need a " ',9); ppChar(chr(vbar)); pp10('" here.   ',7); errprnt;
1)	      end;
**** File 2) EDIT.PAS[EAL,HE]/31P/218L
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 36,31

2)	      pp10(' Need a " ',9); ppChar(chr(174B)); pp10('" here.   ',7); ppLine;
2)	      end;
***************


**** File 1) EDIT.PAS[AL,HE]/36P/230L
1)	    getDelim(dch);
1)	    end
**** File 2) EDIT.PAS[EAL,HE]/31P/230L
2)	    eGetDelim(dch);
2)	    end
***************


**** File 1) EDIT.PAS[AL,HE]/36P/264L
1)		  dimCheck(arg1,nodim↑.dim);
1)		  end;
1)	timeop:   begin
1)		  check1(svaltype);
1)		  dimCheck(arg1,timedim↑.dim);
1)		  end;
1)	sinop,
1)	cosop,
1)	tanop:	  begin
1)		  check1(svaltype);
1)		  dimCheck(arg1,angledim↑.dim);
1)		  end;
1)	dacop,
1)	atan2op:  begin
1)		  check2(svaltype,svaltype);
1)		  dimCheck(arg1,nodim↑.dim);
1)		  dimCheck(arg2,nodim↑.dim);
1)		  end;
1)	vmakeop:  begin
1)		  check3(svaltype,svaltype,svaltype);
1)		  dimCheck(arg2,getdim(arg1,d));
1)		  dimCheck(arg3,d);
1)		  end;
1)	unitvop:  check1(vectype);
1)	vsaxwrop: begin
1)		  check2(vectype,svaltype);
1)		  dimCheck(arg2,angledim↑.dim);
1)		  end;
**** File 2) EDIT.PAS[EAL,HE]/31P/264L
2)		  eDimCheck(arg1,nodim↑.dim);
2)		  end;
2)	timeop:   begin
2)		  check1(svaltype);
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 36,31

2)		  eDimCheck(arg1,timedim↑.dim);
2)		  end;
2)	sinop,
2)	cosop,
2)	tanop:	  begin
2)		  check1(svaltype);
2)		  eDimCheck(arg1,angledim↑.dim);
2)		  end;
2)	dacop,
2)	atan2op:  begin
2)		  check2(svaltype,svaltype);
2)		  eDimCheck(arg1,nodim↑.dim);
2)		  eDimCheck(arg2,nodim↑.dim);
2)		  end;
2)	vmakeop:  begin
2)		  check3(svaltype,svaltype,svaltype);
2)		  eDimCheck(arg2,getdim(arg1,d));
2)		  eDimCheck(arg3,d);
2)		  end;
2)	unitvop:  check1(vectype);
2)	vsaxwrop: begin
2)		  check2(vectype,svaltype);
2)		  eDimCheck(arg2,angledim↑.dim);
2)		  end;
***************


**** File 1) EDIT.PAS[AL,HE]/36P/299L
1)		  dimCheck(arg1,angledim↑.dim);
1)		  if op = fmakeop then dimCheck(arg2,distancedim↑.dim);
1)		  end;
1)	deproachop: begin
1)		  check1(frametype);
1)		  dimCheck(arg1,distancedim↑.dim);
1)		  end;
1)	constrop: begin
1)		  check3(vectype,vectype,vectype);
1)		  dimCheck(arg1,distancedim↑.dim);
1)		  dimCheck(arg2,distancedim↑.dim);
1)		  dimCheck(arg3,distancedim↑.dim);
1)		  end;
**** File 2) EDIT.PAS[EAL,HE]/31P/299L
2)		  eDimCheck(arg1,angledim↑.dim);
2)		  if op = fmakeop then eDimCheck(arg2,distancedim↑.dim);
2)		  end;
2)	deproachop: begin
2)		  check1(frametype);
2)		  eDimCheck(arg1,distancedim↑.dim);
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 36,31

2)		  end;
2)	constrop: begin
2)		  check3(vectype,vectype,vectype);
2)		  eDimCheck(arg1,distancedim↑.dim);
2)		  eDimCheck(arg2,distancedim↑.dim);
2)		  eDimCheck(arg3,distancedim↑.dim);
2)		  end;
***************


**** File 1) EDIT.PAS[AL,HE]/36P/317L
1)	   pp10L(' Need     ',6); ppInt(nargs); pp20(' arguments here.    ',16); errprnt;
1)	   end;
1)	  if d <> nil then relNode(d);		(* done with dimension node *)
1)	  end;
1)	end;
1)	(* function to parse expressions: exprParse *)
1)	function exprParse; (* : nodep *)
1)	 var expstack, opstack: nodep; precstack: array [0..10] of integer;
1)	     opsp,i,j: integer; n,np: nodep; vp: varidefp; b,opseen,done,badp: boolean;
1)	     st: statementp;
**** File 2) EDIT.PAS[EAL,HE]/31P/317L
2)	   pp10L(' Need     ',6); ppInt(nargs); pp20(' arguments here.    ',16); ppLine;
2)	   end;
2)	  if d <> nil then relNode(d);		(* done with dimension node *)
2)	  end;
2)	end;
2)	(* function to parse expressions: eExprParse *)
2)	function eExprParse; (* : nodep *)
2)	 var expstack, opstack: nodep; precstack: array [0..10] of integer;
2)	     opsp,i,j: integer; n,np: nodep; vp: varidefp; opseen,done,badp: boolean;
2)	     st: statementp;
***************


**** File 1) EDIT.PAS[AL,HE]/37P/19L
1)	   pp20L(' Bad expression     ',15); errprnt;
1)	   badp := true;
**** File 2) EDIT.PAS[EAL,HE]/32P/19L
2)	   pp20L(' Bad expression     ',15); ppLine;
2)	   badp := true;
***************


**** File 1) EDIT.PAS[AL,HE]/37P/32L
1)	 function getList(b: boolean): nodep;
1)	  var n: nodep;
1)	  begin			(* array reference or procedure call *)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 37,32

1)	  n := newNode;
1)	  with n↑ do
1)	    begin
1)	    ntype := exprnode;
1)	    if b then op := arefop else op := callop;
1)	    arg1 := newNode;
1)	    end;
1)	  with n↑.arg1↑ do
1)	    begin
1)	    ntype := leafnode;
1)	    ltype := varitype;
1)	    vari := vp;
1)	    vid := vp↑.name;
1)	    end;
1)	  getArgs(n);		(* get subscripts/parameters *)
1)	  getList := n;
1)	  end;
1)	 procedure pushexp(n: nodep);
**** File 2) EDIT.PAS[EAL,HE]/32P/32L
2)	 procedure pushexp(n: nodep);
***************


**** File 1) EDIT.PAS[AL,HE]/37P/64L
1)	    pp20L(' Bad expression - co',20); pp20('nsecutive operands  ',18); errprnt;
1)	    badp := true;
1)	    end;
**** File 2) EDIT.PAS[EAL,HE]/32P/43L
2)	    pp20L(' Bad expression - co',20); pp20('nsecutive operands  ',18); ppline;
2)	    end;
***************


**** File 1) EDIT.PAS[AL,HE]/37P/83L
1)	    pp10('underflow ',9); errprnt;
1)	    badp := true;
1)	    popexp := badexpr;
**** File 2) EDIT.PAS[EAL,HE]/32P/61L
2)	    pp10('underflow ',9); ppLine;
2)	    popexp := badexpr;
***************


**** File 1) EDIT.PAS[AL,HE]/37P/101L
1)	    pp10(' overflow ',9); errprnt;
1)	    badp := true;
1)	    end;
**** File 2) EDIT.PAS[EAL,HE]/32P/78L
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 37,32

2)	    pp10(' overflow ',9); ppLine;
2)	    end;
***************


**** File 1) EDIT.PAS[AL,HE]/37P/136L
1)		 dimCheck(arg2,getdim(arg1,d)); (* does arg2 match dimension of arg1 *)
1)	       end
1)	      else if op <= sexpop then			(* check dimensions too *)
1)	       begin					(* args better be dimensionless *)
1)	       dimCheck(arg1,nodim↑.dim);
1)	       if op <> notop then dimCheck(arg2,nodim↑.dim);
1)	       end
**** File 2) EDIT.PAS[EAL,HE]/32P/112L
2)		 eDimCheck(arg2,getdim(arg1,d)); (* does arg2 match dimension of arg1 *)
2)	       end
2)	      else if op <= sexpop then			(* check dimensions too *)
2)	       begin					(* args better be dimensionless *)
2)	       eDimCheck(arg1,nodim↑.dim);
2)	       if op <> notop then eDimCheck(arg2,nodim↑.dim);
2)	       end
***************


**** File 1) EDIT.PAS[AL,HE]/37P/158L
1)	     dimCheck(arg2,getdim(arg1,d)); (* does arg2 match dimension of arg1 *)
1)	     end
**** File 2) EDIT.PAS[EAL,HE]/32P/134L
2)	     eDimCheck(arg2,getdim(arg1,d)); (* does arg2 match dimension of arg1 *)
2)	     end
***************


**** File 1) EDIT.PAS[AL,HE]/37P/169L
1)		dimCheck(arg2,getdim(arg1,d)); (* does arg2 match dimension of arg1 *)
1)		d1 := gettype(arg1);
**** File 2) EDIT.PAS[EAL,HE]/32P/145L
2)		eDimCheck(arg2,getdim(arg1,d)); (* does arg2 match dimension of arg1 *)
2)		d1 := gettype(arg1);
***************


**** File 1) EDIT.PAS[AL,HE]/37P/184L
1)		dimCheck(arg2,getdim(arg1,d)); (* does arg2 match dimension of arg1 *)
1)		d1 := gettype(arg1);
**** File 2) EDIT.PAS[EAL,HE]/32P/160L
2)		eDimCheck(arg2,getdim(arg1,d)); (* does arg2 match dimension of arg1 *)
2)		d1 := gettype(arg1);
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 37,32

***************


**** File 1) EDIT.PAS[AL,HE]/37P/211L
1)		 dimCheck(arg2,getdim(arg1,d)); (* does arg2 match dimension of arg1 *)
1)		end;
**** File 2) EDIT.PAS[EAL,HE]/32P/187L
2)		 eDimCheck(arg2,getdim(arg1,d)); (* does arg2 match dimension of arg1 *)
2)		end;
***************


**** File 1) EDIT.PAS[AL,HE]/37P/233L
1)	    case op of
**** File 2) EDIT.PAS[EAL,HE]/32P/209L
2)	  i := 0;
2)	    case op of
***************


**** File 1) EDIT.PAS[AL,HE]/37P/258L
1)	others: i := 0;
1)	   end;
1)	  opprecedence := i;
1)	  end;
1)	 begin (* exprParse *)
1)	 expstack := nil;
**** File 2) EDIT.PAS[EAL,HE]/32P/235L
2)	   end;
2)	  opprecedence := i;
2)	  end;
2)	 begin (* eExprParse *)
2)	 expstack := nil;
***************


**** File 1) EDIT.PAS[AL,HE]/37P/273L
1)	 getToken;
1)	 with curToken do
**** File 2) EDIT.PAS[EAL,HE]/32P/249L
2)	 eGetToken;
2)	 with curToken do
***************


**** File 1) EDIT.PAS[AL,HE]/37P/282L
1)	      cpushexp(exprParse);		(* get the parenthesized expression *)
1)	      getDelim(')');			(* get the closing ')' *)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 37,32

1)	      end
**** File 2) EDIT.PAS[EAL,HE]/32P/258L
2)	      cpushexp(eExprParse);		(* get the parenthesized expression *)
2)	      eGetDelim(')');			(* get the closing ')' *)
2)	      end
***************


**** File 1) EDIT.PAS[AL,HE]/37P/299L
1)		getArgs(n);			(* get any arguments op needs *)
1)		cpushexp(n);			(* save operand for its operator *)
1)		end
1)	       else if opseen and ((op <> negop) and (op <> notop)) then
1)		begin			(* yow! - we just saw an operator - complain *)
1)		pp20L(' Bad expression - co',20); pp20('nsecutive operators ',19);
1)		errprnt;
1)		badp := true;
1)		end
**** File 2) EDIT.PAS[EAL,HE]/32P/275L
2)		eGetArgs(n);			(* get any arguments op needs *)
2)		cpushexp(n);			(* save operand for its operator *)
2)		end
2)	       else if opseen and ((op <> negop) and (op <> notop)) then
2)		begin			(* yow! - we just saw an operator - complain *)
2)		pp20L(' Bad expression - co',20); pp20('nsecutive operators ',19); ppLine;
2)		end
***************


**** File 1) EDIT.PAS[AL,HE]/37P/319L
1)	    vp := varLookup(id);
1)	    if vp = nil then
1)	      begin				(* undefined variable *)
1)	      vp := makeUVar(undeftype,id);	(* define it somewhat *)
1)	      getToken;	(* see if it's supposed to be a procedure or array *)
1)	      backup := true;		(* we're just peeking *)
1)	      pp10L(' Undeclare',10);
1)	      if (ttype = delimtype) and ((ch = '(') or (ch = '[')) then
1)		if ch = '[' then
1)		  begin
1)		  vp↑.tbits := 1;	(* array *)
1)		  vp↑.a := nil;
1)		  pp20('d array variable    ',16);
1)		  end
1)		 else
1)		  begin
1)		  vp↑.tbits := 2;	(* procedure *)
1)		  vp↑.p := nil;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 37,32

1)		  pp20('d procedure         ',11);
1)		  if newDeclarations <> nil then
1)		    if newDeclarations↑.variables = vp then
1)		      begin
1)		      newDeclarations↑.nlines := 3;
1)		      st := newDeclarations;		(* find block they're in *)
1)		      while st↑.stype <> blocktype do st := st↑.last;
1)		      vp↑.p := newNode;
1)		      with vp↑.p↑ do
1)		       begin
1)		       ntype := procdefnode;
1)		       ptype := undeftype;
1)		       level := st↑.level + 1;
1)		       pname := vp;
1)		       paramlist := nil;
1)		       body := newStatement;
1)		       appendEnd(body,body);
1)		       with body↑ do
1)			begin stype := blocktype; bparent := curBlock; blkid := nil;
1)			      nlines := 2; numvars := 0; level := st↑.level + 2;
1)			      bcode := next; variables := nil end;
1)		       body↑.next := newStatement;	(* append a return *)
1)		       with body↑.next↑ do
1)			begin
1)			stype := returntype; retval := nil; exprs := nil;
1)			last := vp↑.p↑.body; rproc := vp↑.p;
1)			end;
1)		       end;
1)		      end
1)		  end
1)	       else pp10('d variable',10);
1)	      pp20(' - will try to defin',20); pp5('e it.',5); errprnt;
1)	      badp := true;
1)	      end;
**** File 2) EDIT.PAS[EAL,HE]/32P/293L
2)	    vp := eVarLookup(id);
2)	    if vp = nil then
2)	      begin				(* undefined variable *)
2)	      vp := eMakeUVar(undeftype,id);	(* define it somewhat *)
2)	      eGetToken;	(* see if it's supposed to be a procedure or array *)
2)	      backup := true;		(* we're just peeking *)
2)	      if newVarOk then pp10L(' Undeclare',10);
2)	      if (ttype = delimtype) and ((ch = '(') or (ch = '[')) then
2)		if ch = '[' then
2)		  begin
2)		  vp↑.tbits := 1;	(* array *)
2)		  vp↑.a := nil;
2)		  if newVarOk then pp20('d array variable    ',16);
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 37,32

2)		  end
2)		 else
2)		  begin
2)		  vp↑.tbits := 2;	(* procedure *)
2)		  vp↑.p := nil;
2)		  if newVarOk then pp20('d procedure         ',11);
2)		  end
2)	       else if newVarOk then pp10('d variable',10);
2)	      if newVarOk then
2)		begin pp20(' - will try to defin',20); pp5('e it.',5); ppLine end;
2)	      end;
***************


**** File 1) EDIT.PAS[AL,HE]/37P/385L
1)	      n := getList(odd(vp↑.tbits));
1)	      cpushexp(n);
1)	      end
1)	     else				(* variable *)
1)	      begin
1)	      getToken;	(* see if there's a subscript or parameter list *)
1)	      backup := true;			(* we're just peeking *)
1)	      b := (ttype = delimtype) and ((ch = '(') or (ch = '['));
1)	      if b then
1)		begin
1)		if (vp↑.level = 0) and (vp↑.offset in [0,2,4,6,8,10,12,16]) then
1)		  begin (* device offsets: arms: 0,4,8 hands: 2,6,10 driver/vise: 12,16 *)
1)		  n := getList(true);
1)		  n↑.op := jointop;		(* joint reference *)
1)		  end
1)		 else
1)		  begin
1)		  pp20L('Not an array or proc',20); pp10('edure!    ',7); errprnt;
1)		  badp := true;
1)		  n := newNode;
1)		  with n↑ do
1)		   begin
1)		   ntype := exprnode;
1)		   op := badop;
1)		   arg1 := getList(ch = '[');
1)		   arg2 := defNode(vp↑.vtype);
1)		   arg3 := nil;
1)		   end;
1)		  end
1)		end
1)	       else
1)		begin
1)		n := newNode;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 37,32

1)		with n↑ do
1)		  begin
1)		  ntype := leafnode;
1)		  ltype := varitype;
1)		  vari := vp;
1)		  vid := vp↑.name;
1)		  end;
1)		end;
**** File 2) EDIT.PAS[EAL,HE]/32P/331L
2)	      n := newNode;
2)	      with n↑ do
2)		begin
2)		ntype := exprnode;
2)		if odd(vp↑.tbits) then op := arefop else op := callop;
2)		arg1 := newNode;
2)		end;
2)	      with n↑.arg1↑ do
2)		begin
2)		ntype := leafnode;
2)		ltype := varitype;
2)		vari := vp;
2)		vid := vp↑.name;
2)		end;
2)	      eGetArgs(n);		(* get subscripts/parameters *)
2)	      cpushexp(n);
2)	      end
2)	     else				(* variable *)
2)	      begin
2)	      n := newNode;
2)	      with n↑ do
2)		begin
2)		ntype := leafnode;
2)		ltype := varitype;
2)		vari := vp;
2)		vid := vp↑.name;
2)		end;
***************


**** File 1) EDIT.PAS[AL,HE]/37P/434L
1)	 if expstack <> nil then exprParse := popexp (* return what's left on stack *)
1)	  else exprParse := nil;
1)	 while expstack <> nil do relNode(popexp);  (* probably don't need, but... *)
1)	 end;
1)	(* auxiliary expression mungers: relExpr & evalOrder *)
1)	procedure relExpr (* n: nodep *);
1)	 var b: boolean; st,stp: strngp;
1)	 begin
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 37,32

1)	 b := true;
1)	 if n = nil then b := false
1)	  else
1)	   with n↑ do
1)	    case ntype of
1)	exprnode: begin
1)		  relExpr(arg1);
1)		  relExpr(arg2);
1)		  relExpr(arg3);
1)		  end;
1)	leafnode: case ltype of
1)	  vectype:   if v↑.refcnt <= 1 then relVector(v)
1)		      else v↑.refcnt := v↑.refcnt - 1;
1)	  transtype: if t↑.refcnt <= 1 then relTrans(t)
1)		      else t↑.refcnt := t↑.refcnt - 1;
1)	  strngtype: if (length <> 2) or (str↑.ch[1] <> chr(CR)) or
1)			(str↑.ch[2] <> chr(LF)) then
1)		       begin
1)		       st := str;
1)		       while st <> nil do
1)			begin stp := st↑.next; relStrng(st); st := stp end;
1)		       end
1)		      else b := false;
1)	  others:    begin end;		(* nothing to do *)
1)		   end;
1)	listnode: begin
1)		  relExpr(lval);
1)		  relExpr(next);
1)		  end;
1)	ffnode:	  begin
1)		  if pdef and ((ff↑.ntype <> exprnode) or (ff↑.op <> vmkfrcop)) then
1)		    relNode(ff)
1)		   else relExpr(ff);
1)		  end;
1)	forcenode:begin
1)		  relExpr(fval);
1)		  relExpr(fvec);
1)		  relExpr(fframe);
1)		  end;
1)	arraydefnode: relExpr(bounds);
1)	bnddefnode:begin
1)		  relExpr(lower);
1)		  relExpr(upper);
1)		  relExpr(next);
1)		  end;
1)	    end;
1)	 if b then relNode(n);
1)	 end;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 37,32

1)	function evalOrder(what,last: nodep; pcons: boolean): nodep;
1)	 var vp: varidefp; n,nv: nodep; tbits: integer;
1)	 begin
1)	 if what <> nil then
1)	   with what↑ do
1)	    case ntype of
1)	exprnode:
1)	     if (op < ioop) or (op = adcop) or (op = dacop) then
1)	       begin				(* regular ops are easy to handle *)
1)	       next := last;
1)	       last := evalOrder(arg1,what,false); (* all ops have at least one arg *)
1)	       if arg2 <> nil then last := evalOrder(arg2,last,false);
1)	       if arg3 <> nil then last := evalOrder(arg3,last,false);
1)	       end
1)	      else if (op = grinchop) then last := evalOrder(arg1,last,true)
1)	      else if op < specop then			(* query or inscalar *)
1)	       begin
1)	       what↑.next := last;
1)	       if op = inscalarop then last := what	(* inscalar has no args *)
1)		else if arg2 = nil then last := what	(* query has no print list *)
1)		else last := evalOrder(arg2,what,false); (* handle query's print list *)
1)	       end
1)	      else if op = arefop then
1)	       begin
1)	       arg1↑.next := last;
1)	       last := evalOrder(arg2,arg1,true);	(* need to push constants too *)
1)	       end
1)	      else if op = jointop then
1)	       begin
1)	       last := evalOrder(arg2↑.lval,last,false);  (* ** only one subscript for now ** *)
1)	       end
1)	      else if op = callop then
1)	       begin
1)	       what↑.next := last;
1)	       last := what;
1)	       if arg2 <> nil then
1)		 begin
1)		 with arg1↑.vari↑ do
1)		  if p <> nil then vp := p↑.paramlist else vp := nil;
1)		 n := arg2;
1)		 while n <> nil do
1)		  begin					(* evaluate parameters *)
1)		  if vp <> nil then
1)		    begin
1)		    tbits := vp↑.tbits;
1)		    vp := vp↑.next;
1)		    end
1)		   else tbits := 0;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 37,32

1)		  with n↑.lval↑ do
1)		   begin
1)		   if (tbits = 4) then				(* call by reference *)
1)		    if ((ntype = exprnode) and (op <> arefop)) or	(* expression *)
1)		       ((ntype = leafnode) and (ltype <> varitype))     (* constant *)
1)		     then tbits := 0;			(* change to call by value *)
1)		   if tbits = 0 then last := evalOrder(n↑.lval,last,false)
1)		    else if (tbits = 4) and (ntype = exprnode) then
1)		     last := evalOrder(arg2,last,true);		(* push subscripts *)
1)		   end;
1)		  n := n↑.next;
1)		  end
1)		 end
1)	       end
1)	      else if op = badop then  (* stick default value node so it goes on stack *)
1)	       begin
1)	       arg2↑.next := last;
1)	       last := arg2;
1)	       end;
1)	listnode:
1)	     begin
1)	     last := evalOrder(lval,last,pcons);  (* set up this list element's value *)
1)	     if next <> nil then
1)	       last := evalOrder(next,last,pcons);	(* now move down the list *)
1)	     end;
1)	bnddefnode:
1)	     begin
1)	     last := evalOrder(lower,last,false);  (* set up this subscript's values *)
1)	     last := evalOrder(upper,last,false);
1)	     if next <> nil then
1)	       last := evalOrder(next,last,false);	(* now move down the list *)
1)	     end;
1)	leafnode:
1)	     if pcons or (ltype = varitype) then
1)	       begin	(* get variable's value or if asked push constants *)
1)	       next := last;
1)	       last := what;
1)	       end;
1)	durnode:
1)	     last := evalOrder(durval,last,false);	(* evaluate duration value *)
1)	deprnode,
1)	apprnode,
1)	destnode:
1)	     begin
1)	     last := evalOrder(loc,last,false);		(* evaluate location *)
1)	     if code <> nil then
1)	      if code↑.stype = signaltype then
1)	       if code↑.event↑.ntype <> leafnode then
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 37,32

1)		last := evalOrder(code↑.event↑.arg2,last,true);
1)	     end;
1)	viaptnode,
1)	byptnode:
1)	     begin
1)	     last := evalOrder(via,last,false);		(* evaluate location *)
1)	     nv := vclauses;
1)	     while nv <> nil do			(* check for any specified duration *)
1)	      if nv↑.ntype = durnode then
1)		begin
1)		last := evalOrder(nv,last,false);	(* evaluate duration *)
1)		nv := nil;
1)		end
1)	       else nv := nv↑.next;
1)	     nv := vclauses;
1)	     while nv <> nil do		(* now check for any specified velocity *)
1)	      if nv↑.ntype = velocitynode then
1)		begin
1)		last := evalOrder(nv↑.clval,last,false); (* evaluate velocity vector *)
1)		nv := nil;
1)		end
1)	       else nv := nv↑.next;
1)	     if vcode <> nil then
1)	      if vcode↑.stype = signaltype then
1)	       if vcode↑.event↑.ntype <> leafnode then
1)		last := evalOrder(vcode↑.event↑.arg2,last,true);
1)	     end;
1)	forcenode:
1)	     begin
1)	     last := evalOrder(fval,last,false);	(* evaluate force value *)
1)	     end;
1)	    end;
1)	 evalOrder := last;
1)	 end;
1)	(* aux routine to set up evaluation order for motions: moveOrder *)
1)	procedure moveOrder(st: statementp);
1)	 var b,byp,movep,operatep,centerp,openp,floatp,arrp,gathering,notaxis,ffp: boolean;
1)	     cl, lexpr, dest, bydest, appr, depr, wobble, sfac, dur, vel, torquecl: nodep;
1)	     load, stiff, ffr, fn1: nodep; useForce, cmForce: integer;
1)	 procedure ffcompare(ff2: nodep);
**** File 2) EDIT.PAS[EAL,HE]/32P/366L
2)	 if expstack <> nil then eExprParse := popexp (* return what's left on stack *)
2)	  else eExprParse := nil;
2)	 while expstack <> nil do relNode(popexp);  (* probably don't need, but... *)
2)	 end;
2)	(* aux routine to set up evaluation order for motions: moveOrder *)
2)	procedure moveOrder(st: statementp);
2)	 var b, movep, operatep, centerp, openp, arrp, gathering, notaxis: boolean;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 37,32

2)	     cl, lexpr, dest, appr, depr, wobble, sfac, dur, vel, torquecl: nodep;
2)	     stiff, ffr, fn1: nodep; useForce, cmForce: integer;
2)	 procedure ffcompare(ff2: nodep);
***************


**** File 1) EDIT.PAS[AL,HE]/39P/33L
1)	       pp10('ce frames ',9); errprnt;
1)	       end;
**** File 2) EDIT.PAS[EAL,HE]/33P/33L
2)	       pp10('ce frames ',9); ppLine;
2)	       end;
***************


**** File 1) EDIT.PAS[AL,HE]/39P/45L
1)	   pp20(' assuming zhat      ',14); errprnt;
1)	   bad := newNode;
**** File 2) EDIT.PAS[EAL,HE]/33P/45L
2)	   pp20(' assuming zhat      ',14); ppLine;
2)	   bad := newNode;
***************


**** File 1) EDIT.PAS[AL,HE]/39P/63L
1)	    pp20L(' In previous force s',20); pp20('pecification:       ',13);
1)	    badvector(fn1);
**** File 2) EDIT.PAS[EAL,HE]/33P/63L
2)	    pp20L(' In previous force s',20); pp20('pecification:       ',13); ppLine;
2)	    badvector(fn1);
***************


**** File 1) EDIT.PAS[AL,HE]/39P/82L
1)	 byp := false;
1)	 dest := nil;
1)	 bydest := nil;
1)	 appr := nil;
1)	 depr := nil;
1)	 wobble := nil;
1)	 sfac := nil;
1)	 dur := nil;
1)	 load := nil;
1)	 useForce := 0;
1)	 cmForce := 0;
1)	 stiff := nil;
1)	 gathering := false;
1)	 ffp := false;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 39,33

1)	 ffr := nil;
**** File 2) EDIT.PAS[EAL,HE]/33P/82L
2)	 dest := nil;
2)	 appr := nil;
2)	 depr := nil;
2)	 wobble := nil;
2)	 sfac := nil;
2)	 dur := nil;
2)	 useForce := 0;
2)	 cmForce := 0;
2)	 stiff := nil;
2)	 gathering := false;
2)	 ffr := nil;
***************


**** File 1) EDIT.PAS[AL,HE]/39P/102L
1)	 floatp := false;
1)	 openp := false;
1)	 with st↑ do
1)	  if (stype = movetype) or (stype = jtmovetype) then movep := true
1)	   else if stype = operatetype then operatep := true
1)	   else if stype = centertype then centerp := true
1)	   else if stype = floattype then floatp := true else openp := true;
1)	 cl := st↑.clauses;
1)	 if cl <> nil then
1)	   with cl↑ do
1)	    if (ntype = ffnode) and pdef then
1)	      begin				(* flush any system created fframes *)
1)	      st↑.clauses := cl↑.next;		(* though we may recreate it below *)
1)	      relExpr(cl);
1)	      cl := st↑.clauses;
1)	      end;
1)	 while cl <> nil do			(* run through the clauses *)
**** File 2) EDIT.PAS[EAL,HE]/33P/98L
2)	 openp := false;
2)	 with st↑ do
2)	  if stype = movetype then movep := true
2)	   else if stype = operatetype then operatep := true
2)	   else if stype = centertype then centerp := true else openp := true;
2)	 cl := st↑.clauses;
2)	 while cl <> nil do			(* run through the clauses *)
***************


**** File 1) EDIT.PAS[AL,HE]/39P/126L
1)			 pp10('motion!   ',7); errprnt;
1)			 end;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 39,33

1)			dest := cl;
1)			end;
1)	apprnode:	if loc <> nil then begin appr := cl; byp := false end;
1)	deprnode:	if loc <> nil then depr := cl;
1)	viaptnode:	byp := false;
1)	byptnode:	begin byp := true; bydest := cl end;
1)	gathernode:	gathering := true;
1)	stiffnode:	begin stiff := cl; ffcompare(cocff) end;
1)	wobblenode:	wobble := cl;
1)	sfacnode:	sfac := cl;
1)	durnode:	dur := cl;
1)	loadnode:	load := cl;
1)	ffnode:		begin
1)			ffcompare(cl);
1)			if not ffp then begin ffr := cl; ffp := true end;
1)			end;
1)	forcenode:	begin
**** File 2) EDIT.PAS[EAL,HE]/33P/112L
2)			 pp10('motion!   ',7); ppLine;
2)			 end;
2)			dest := cl;
2)			end;
2)	gathernode:	gathering := true;
2)	stiffnode:	stiff := cl;
2)	wobblenode:	wobble := cl;
2)	sfacnode:	sfac := cl;
2)	durnode:	dur := cl;
2)	apprnode:	if loc <> nil then appr := cl;
2)	deprnode:	if loc <> nil then depr := cl;
2)	ffnode:		ffcompare(cl);
2)	forcenode:	begin
***************


**** File 1) EDIT.PAS[AL,HE]/39P/159L
1)			     pp20('r a motion!         ',11); errprnt;
1)			     end;
**** File 2) EDIT.PAS[EAL,HE]/33P/139L
2)			     pp20('r a motion!         ',11); ppLine;
2)			     end;
***************


**** File 1) EDIT.PAS[AL,HE]/39P/167L
1)	 if (dest = nil) and (not byp) and (appr = nil) then
1)	   begin
1)	   if movep then
1)	    begin
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 39,33

1)	    pp20L(' Need destination fo',20); pp20('r motion statement! ',19); errprnt;
1)	    end
**** File 2) EDIT.PAS[EAL,HE]/33P/147L
2)	 if dest = nil then
2)	   begin
2)	(*  if movep or (openp and (cf↑.vari↑.offset <= 6)) then *)
2)	   if movep then
2)	    begin
2)	    pp20L(' Need destination fo',20); pp20('r motion statement! ',19); ppLine;
2)	    end
***************


**** File 1) EDIT.PAS[AL,HE]/39P/182L
1)	     pp20('om force vector     ',15); errprnt;
1)	     b := true;
**** File 2) EDIT.PAS[EAL,HE]/33P/163L
2)	     pp20('om force vector     ',15); ppLine;
2)	     b := true;
***************


**** File 1) EDIT.PAS[AL,HE]/39P/197L
1)	       arg1 := copyExpr(fn1↑.fvec,true);
1)	       arg2 := nil;
**** File 2) EDIT.PAS[EAL,HE]/33P/178L
2)	       arg1 := fn1↑.fvec;
2)	       arg2 := nil;
***************


**** File 1) EDIT.PAS[AL,HE]/39P/206L
1)	   end
1)	  else if (ffr <> nil) and not ffp then
1)	   begin			(* need to add force frame specification *)
1)	   cl := ffr;			(* force frame from force or stiffness node *)
1)	   ffr := newNode;		(* make up a new force frame *)
1)	   with ffr↑ do
1)	    begin
1)	    next := st↑.clauses;
1)	    ntype := ffnode;
1)	    ff := copyExpr(cl↑.ff,true);
1)	    csys := true;		(* use world coords *)
1)	    pdef := true;
1)	    end;
1)	   st↑.clauses := ffr;
1)	   end;
**** File 2) EDIT.PAS[EAL,HE]/33P/187L
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 39,33

2)	   end;
***************


**** File 1) EDIT.PAS[AL,HE]/39P/228L
1)	     if cf↑.op = arefop then
1)	       lexpr := evalOrder(cf↑.arg2,nil,true)	(* push array subscripts *)
1)	      else lexpr := evalOrder(cf↑.arg2↑.lval,nil,true);	(* only 1 sub for jointop *)
1)	 if not floatp then
1)	   begin
1)	   if (sfac <> nil) and ((dest <> nil) or (bydest <> nil)) then	(* evaluate speed factor *)
1)	    lexpr := evalOrder(sfac↑.clval,lexpr,false);
1)	   if dur <> nil then			(* evaluate global time duration *)
1)	    lexpr := evalOrder(dur↑.durval,lexpr,false);
1)	   end;
1)	 if movep then
1)	   if wobble <> nil then			(* evaluate wobble *)
1)	    lexpr := evalOrder(wobble↑.clval,lexpr,false);
1)	 if (movep or floatp) and (load <> nil) then	(* evaluate load *)
1)	   begin
1)	   lexpr := evalOrder(load↑.loadval,lexpr,false);
1)	   lexpr := evalOrder(load↑.loadvec,lexpr,false);
1)	   end;
1)	 if movep then
1)	   begin				(* MOVE statement has extra clauses *)
1)	   if ffr <> nil then				(* evaluate force frame *)
**** File 2) EDIT.PAS[EAL,HE]/33P/195L
2)	     lexpr := evalOrder(cf↑.arg2,nil,true);	(* push array subscripts *)
2)	 if (sfac <> nil) and (dest <> nil) then	(* evaluate speed factor *)
2)	  lexpr := evalOrder(sfac↑.clval,lexpr,false);
2)	 if dur <> nil then			(* evaluate global time duration *)
2)	  lexpr := evalOrder(dur↑.durval,lexpr,false);
2)	 if movep then
2)	   begin				(* MOVE statement has extra clauses *)
2)	   if wobble <> nil then			(* evaluate wobble *)
2)	    lexpr := evalOrder(wobble↑.clval,lexpr,false);
2)	   if ffr <> nil then				(* evaluate force frame *)
***************


**** File 1) EDIT.PAS[AL,HE]/39P/258L
1)	    end;
**** File 2) EDIT.PAS[EAL,HE]/33P/212L
2)	    if stiff↑.coc <> nil then		(* evaluate center of compliance *)
2)	     lexpr := evalOrder(stiff↑.coc,lexpr,false);
2)	    end;
***************

  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 39,33


**** File 1) EDIT.PAS[AL,HE]/39P/271L
1)	    if (cl↑.ntype = viaptnode) or (cl↑.ntype = byptnode) then
1)	     lexpr := evalOrder(cl,lexpr,false);	(* evaluate via & by points *)
1)	    cl := cl↑.next;
**** File 2) EDIT.PAS[EAL,HE]/33P/227L
2)	    if cl↑.ntype = viaptnode then		(* evaluate via points *)
2)	     lexpr := evalOrder(cl,lexpr,false);
2)	    cl := cl↑.next;
***************


**** File 1) EDIT.PAS[AL,HE]/39P/308L
1)	   if (dest = nil) and (bydest <> nil) then	(* evaluate BY = dest *)
1)	     lexpr := evalOrder(bydest,lexpr,false);
1)	   end;
1)	 if (not (centerp or floatp)) and (dest <> nil) then (* evaluate destination *)
1)	  lexpr := evalOrder(dest,lexpr,false);
1)	 if not floatp then
1)	   begin
1)	   cl := st↑.clauses;
1)	   while cl <> nil do				(* run through clauses *)
1)	    with cl↑ do
1)	     begin
1)	     if (ntype = cmonnode) and errHandlerp then	(* evaluate error conds *)
1)	       lexpr := evalOrder(cmon↑.oncond↑.eexpr,lexpr,false);
1)	     cl := next;
1)	     end;
1)	   end;
1)	 st↑.exprs := lexpr;
1)	 end (* moveOrder *);
1)	(* assignParse *)
1)	procedure assignParse(st: statementp; np: nodep);
1)	 var n,dp: nodep; d1,d2: datatypes; b: boolean;
**** File 2) EDIT.PAS[EAL,HE]/33P/264L
2)	   end;
2)	 if dest <> nil then				(* evaluate destination *)
2)	  lexpr := evalOrder(dest,lexpr,false);
2)	 cl := st↑.clauses;
2)	 while cl <> nil do				(* run through clauses *)
2)	  with cl↑ do
2)	   begin
2)	   if (ntype = cmonnode) and errHandlerp then	(* evaluate error conds *)
2)	     lexpr := evalOrder(cmon↑.oncond↑.eexpr,lexpr,false);
2)	   cl := next;
2)	   end;
2)	 st↑.exprs := lexpr;
2)	 end (* moveOrder *);
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 39,33

2)	(* eAssignParse *)
2)	procedure eAssignParse(st: statementp);
2)	 var n,dp: nodep; d1,d2: datatypes; b: boolean;
***************


**** File 1) EDIT.PAS[AL,HE]/40P/10L
1)	  bad := false;				(* assume statement is ok *)
1)	  if np <> nil then what := np		(* use previously parsed node *)
1)	   else what := exprParse;		(* see what we're assigning to *)
1)	  if what <> nil then
**** File 2) EDIT.PAS[EAL,HE]/34P/10L
2)	  what := eExprParse;			(* see what we're assigning to *)
2)	  if what <> nil then
***************


**** File 1) EDIT.PAS[AL,HE]/40P/28L
1)	       b := n↑.vari↑.offset in [0,2,4,6,8,10,12,16];
1)	   (* offsets: arms: 0,4,8 hands: 2,6,10 driver/vise: 12,16 *)
1)	     if b then
1)	       begin			(* no good *)
1)	       if n = nil then
1)		 begin
1)		 pp20L(' Can only assign to ',20); pp10('a variable',10);
1)		 end
1)		else
1)		 begin
1)		 pp20L(' Can''t assign values',20); pp20(' to devices         ',11);
1)		 end;
1)	       errprnt;
1)	       bad := true;			(* mark statement as bad *)
1)	       end
**** File 2) EDIT.PAS[EAL,HE]/34P/26L
2)	       b := n↑.vari↑.offset in [0,2,4,6,8,10,12,14,16,20];
2)	   (* offsets: arms: 0,4,8,12 hands: 2,6,10,14 driver/vise: 16,20 *)
2)	     if b then
2)	       begin			(* no good *)
2)	       if n = nil then
2)		 begin
2)		 pp20L(' Can only assign to ',20);
2)		 pp10('a variable',10);
2)		 end
2)		else
2)		 begin
2)		 pp20L(' Can''t assign values',20);
2)		 pp20(' to devices         ',11);
2)		 end;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 40,34

2)	       ppLine;
2)	    (* *** mark statement as bad *** *)
2)	       end
***************


**** File 1) EDIT.PAS[AL,HE]/40P/52L
1)		 getToken;
1)		 backup := true;
**** File 2) EDIT.PAS[EAL,HE]/34P/52L
2)		 eGetToken;
2)		 backup := true;
***************


**** File 1) EDIT.PAS[AL,HE]/40P/74L
1)	       end;
1)	     end;
1)	  if stype = assigntype then
1)	    begin
1)	    getToken;				(* look for the ":=" *)
1)	    with curToken do
1)	     if (ttype <> reswdtype) or (rtype <> stmnttype) or
1)		(stmnt <> assigntype) then
1)	      begin
1)	      backup := true;
1)	      pp20L(' Expecting ":=" here',20); errprnt;
1)	      end;
1)	    aval := exprParse;
1)	    if (what <> nil) and (aval <> nil) then
**** File 2) EDIT.PAS[EAL,HE]/34P/74L
2)	       end
2)	      else
2)	       begin
2)	       pp20L('Need a variable to a',20); pp10('ssign to  ',8); ppLine;
2)	   (* *** mark statement as bad *** *)
2)	       end;
2)	     end;
2)	  if stype = assigntype then
2)	    begin
2)	    eGetToken;				(* look for the ":=" *)
2)	    with curToken do
2)	     if (ttype <> reswdtype) or (rtype <> stmnttype) or
2)		(stmnt <> assigntype) then
2)	      begin
2)	      backup := true;
2)	      (* ??? mark as no good ??? *)
2)	      pp20L(' Expecting ":=" here',20); ppLine;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 40,34

2)	      end;
2)	    aval := eExprParse;
2)	    if (what <> nil) and (aval <> nil) then
***************


**** File 1) EDIT.PAS[AL,HE]/40P/113L
1)		pp10(' to a     ',6); ppDtype(d1); errprnt;
1)		n := newNode;
1)		with n↑ do
1)		 begin
1)		 ntype := exprnode;
1)		 op := badop;
1)		 arg1 := aval;
1)		 arg2 := defNode(d1);
1)		 arg3 := nil;
1)		 end;
1)		aval := n;
1)		end
1)	       else
1)		begin
1)		dp := nil;
1)		dimCheck(aval,getDim(what,dp));
1)		relNode(dp);
**** File 2) EDIT.PAS[EAL,HE]/34P/119L
2)		pp10(' to a     ',6); ppDtype(d1); ppLine;
2)	    (* *** mark statement as bad *** *)
2)		end
2)	       else
2)		begin
2)		dp := nil;
2)		eDimCheck(aval,getDim(what,dp));
2)		relNode(dp);
***************


**** File 1) EDIT.PAS[AL,HE]/40P/143L
1)	      bad := true;			(* mark statement as bad *)
1)	      pp20L(' Expecting an expres',20); pp10('sion here ',9); errprnt;
1)	      end
1)	    end;
1)	  end;
1)	 end;
1)	(* forParse *)
1)	procedure forParse(st: statementp);
1)	 var lexp,dim: nodep; b: boolean;
1)	 begin
1)	 with st↑ do
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 40,34

1)	  begin
1)	  b := false;
1)	  forvar := checkArg(exprParse,svaltype);	(* get the for variable *)
1)	  initial := nil;
**** File 2) EDIT.PAS[EAL,HE]/34P/140L
2)	      (* *** mark statement as no good *** *)
2)	      pp20L(' Expecting an expres',20); pp10('sion here ',9); ppLine;
2)	      end
2)	    end;
2)	  end;
2)	 end;
2)	(* eForParse *)
2)	procedure eForParse(st: statementp);
2)	 var lexp,dim: nodep; b: boolean;
2)	 begin
2)	 with st↑ do
2)	  begin
2)	  b := false;
2)	  forvar := checkArg(eExprParse,svaltype);	(* get the for variable *)
2)	  initial := nil;
***************


**** File 1) EDIT.PAS[AL,HE]/41P/17L
1)	     begin					(* no good *)
1)	     bad := true;			(* mark statement as bad *)
1)	     pp20L(' Need a scalar varia',20); pp10('ble here. ',9); errprnt;
1)	     end
1)	    else
1)	     bad := false;				(* statement is ok *)
1)	  dim := getdim(forvar,dim);
1)	  getToken;				(* look for the ":=" *)
1)	  with curToken do
1)	   if (ttype <> reswdtype) or (rtype <> stmnttype) or (stmnt <> assigntype) then
1)	     begin
1)	     backup := true;
1)	     pp20L(' Expecting ":=" here',20); errprnt;
1)	     end;
1)	  initial := checkArg(exprParse,svaltype);	(* get the initial value *)
1)	  dimCheck(initial,dim);
1)	  getToken;					(* look for the "STEP" *)
1)	  with curToken do
1)	   if (ttype <> reswdtype) or (rtype <> filtype) or (filler <> steptype) then
1)	     begin
1)	     backup := true;
1)	     pp20L(' Expecting a "STEP" ',20); pp5('here.',5); errprnt;
1)	     end;
1)	  step := checkArg(exprParse,svaltype);	(* get the step value *)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 41,35

1)	  dimCheck(step,dim);
1)	  getToken;					(* look for the "TO" *)
1)	  with curToken do
1)	   if (ttype <> reswdtype) or (rtype <> filtype) or (filler <> untltype) then
1)	     begin
1)	     backup := true;
1)	     pp20L(' Expecting an "UNTIL',20); pp10('" here.   ',7); errprnt;
1)	     end;
1)	  final := checkArg(exprParse,svaltype);	(* get the final value *)
1)	  dimCheck(final,dim);
1)	  with forvar↑ do
**** File 2) EDIT.PAS[EAL,HE]/35P/17L
2)	    begin					(* no good *)
2)	   (* *** mark it as no good *** *)
2)	    pp20L(' Need a scalar varia',20); pp10('ble here. ',9); ppLine;
2)	    end;
2)	  dim := getdim(forvar,dim);
2)	  eGetToken;				(* look for the ":=" *)
2)	  with curToken do
2)	   if (ttype <> reswdtype) or (rtype <> stmnttype) or (stmnt <> assigntype) then
2)	     begin
2)	   (* *** mark it as no good *** *)
2)	     backup := true;
2)	     pp20L(' Expecting ":=" here',20); ppLine;
2)	     end;
2)	  initial := checkArg(eExprParse,svaltype);	(* get the initial value *)
2)	  eDimCheck(initial,dim);
2)	  eGetToken;					(* look for the "STEP" *)
2)	  with curToken do
2)	   if (ttype <> reswdtype) or (rtype <> filtype) or (filler <> steptype) then
2)	     begin
2)	   (* *** mark it as no good *** *)
2)	     backup := true;
2)	     pp20L(' Expecting a "STEP" ',20); pp5('here.',5); ppLine;
2)	     end;
2)	  step := checkArg(eExprParse,svaltype);	(* get the step value *)
2)	  eDimCheck(step,dim);
2)	  eGetToken;					(* look for the "TO" *)
2)	  with curToken do
2)	   if (ttype <> reswdtype) or (rtype <> filtype) or (filler <> untltype) then
2)	     begin
2)	   (* *** mark it as no good *** *)
2)	     backup := true;
2)	     pp20L(' Expecting an "UNTIL',20); pp10('" here.   ',7); ppLine;
2)	     end;
2)	  final := checkArg(eExprParse,svaltype);	(* get the final value *)
2)	  eDimCheck(final,dim);
2)	  with forvar↑ do
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 41,35

***************


**** File 1) EDIT.PAS[AL,HE]/42P/1L
1)	(* affixParse & unfixParse *)
1)	procedure affixParse(st: statementp);
1)	 var opt,b: boolean; lexp: nodep;
1)	 begin
1)	 with st↑, curToken do
1)	  begin
1)	  bad := false;					(* assume statement is ok *)
1)	  if fieldNum = 1 then
1)	    begin
1)	    frame1 := checkArg(exprParse,frametype);
1)	    with frame1↑ do		(* make sure it's a variable *)
1)	     if not (((ntype = leafnode) and (ltype = varitype)) or
1)		    ((ntype = exprnode) and (op = arefop))) then
1)	       begin				(* no good *)
1)	       pp20L(' Need a frame variab',20); pp10('le here.  ',8); errprnt;
1)	       bad := true;			(* mark statement as bad *)
1)	       end;
1)	    getToken;			(* look for the "TO" *)
1)	    if (ttype <> reswdtype) or (rtype <> filtype) or (filler <> totype) then
1)	      begin
1)	      backup := true;
1)	      pp20L(' Expecting "TO" here',20); errprnt;
1)	      end;
1)	    frame2 := checkArg(exprParse,frametype);
1)	    with frame2↑ do		(* make sure it's a variable *)
1)	     if not (((ntype = leafnode) and (ltype = varitype)) or
1)		    ((ntype = exprnode) and (op = arefop))) then
1)	       begin				(* no good *)
1)	       pp20L(' Need a frame variab',20); pp10('le here.  ',8); errprnt;
1)	       bad := true;			(* mark statement as bad *)
1)	       end;
**** File 2) EDIT.PAS[EAL,HE]/36P/1L
2)	(* eAffixParse & eUnfixParse *)
2)	procedure eAffixParse(st: statementp);
2)	 var opt,b: boolean; lexp: nodep;
2)	 begin
2)	 with st↑, curToken do
2)	  begin
2)	  if fieldNum = 1 then
2)	    begin
2)	    frame1 := checkArg(eExprParse,frametype);
2)	    with frame1↑ do		(* make sure it's a variable *)
2)	     if not (((ntype = leafnode) and (ltype = varitype)) or
2)		    ((ntype = exprnode) and (op = arefop))) then
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 42,36

2)	       begin				(* no good *)
2)	       pp20L(' Need a frame variab',20); pp10('le here.  ',8); ppLine;
2)	    (* *** mark it as no good *** *)
2)	       end;
2)	    eGetToken;			(* look for the "TO" *)
2)	    if (ttype <> reswdtype) or (rtype <> filtype) or (filler <> totype) then
2)	      begin
2)	    (* *** mark it as no good *** *)
2)	      backup := true;
2)	      pp20L(' Expecting "TO" here',20); ppLine;
2)	      end;
2)	    frame2 := checkArg(eExprParse,frametype);
2)	    with frame2↑ do		(* make sure it's a variable *)
2)	     if not (((ntype = leafnode) and (ltype = varitype)) or
2)		    ((ntype = exprnode) and (op = arefop))) then
2)	       begin				(* no good *)
2)	       pp20L(' Need a frame variab',20); pp10('le here.  ',8); ppLine;
2)	    (* *** mark it as no good *** *)
2)	       end;
***************


**** File 1) EDIT.PAS[AL,HE]/42P/39L
1)	     getToken;
1)	     if (ttype = reswdtype) and (rtype = filtype) and (filler = bytype) then
1)	       begin
1)	       byvar := checkArg(exprParse,transtype);	(* get the BY var *)
1)	       dimCheck(byvar,distancedim↑.dim);
1)	       with byvar↑ do			(* make sure it's a variable *)
**** File 2) EDIT.PAS[EAL,HE]/36P/39L
2)	     eGetToken;
2)	     if (ttype = reswdtype) and (rtype = filtype) and (filler = bytype) then
2)	       begin
2)	       byvar := checkArg(eExprParse,transtype);	(* get the BY var *)
2)	       eDimCheck(byvar,distancedim↑.dim);
2)	       with byvar↑ do			(* make sure it's a variable *)
***************


**** File 1) EDIT.PAS[AL,HE]/42P/51L
1)		 bad := true;			(* mark statement as bad *)
1)		 pp20L(' Need a trans variab',20); pp10('le here.  ',8); errprnt;
1)		 end
1)	       end
1)	      else if (ttype = reswdtype) and (rtype = filtype) and
1)		      (filler = attype) then
1)	       begin
1)	       atexp := checkArg(exprParse,transtype);	(* get the AT expression *)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 42,36

1)	       dimCheck(atexp,distancedim↑.dim);
1)	       end
**** File 2) EDIT.PAS[EAL,HE]/36P/51L
2)	      (* *** mark it as no good *** *)
2)		 pp20L(' Need a trans variab',20); pp10('le here.  ',8); ppLine;
2)		 end
2)	       end
2)	      else if (ttype = reswdtype) and (rtype = filtype) and
2)		      (filler = attype) then
2)	       begin
2)	       atexp := checkArg(eExprParse,transtype);	(* get the AT expression *)
2)	       eDimCheck(atexp,distancedim↑.dim);
2)	       end
***************


**** File 1) EDIT.PAS[AL,HE]/42P/70L
1)	    atexp := checkArg(exprParse,transtype);	(* get the AT expression *)
1)	    dimCheck(atexp,distancedim↑.dim);
1)	    end;
**** File 2) EDIT.PAS[EAL,HE]/36P/70L
2)	    atexp := checkArg(eExprParse,transtype);	(* get the AT expression *)
2)	    eDimCheck(atexp,distancedim↑.dim);
2)	    end;
***************


**** File 1) EDIT.PAS[AL,HE]/42P/86L
1)	procedure unfixParse(st: statementp);
1)	 var lexp: nodep;
1)	 begin
1)	 with st↑ do
1)	  begin
1)	  bad := false;					(* assume statement is ok *)
1)	  frame1 := checkArg(exprParse,frametype);
1)	  with frame1↑ do		(* make sure it's a variable *)
1)	   if not (((ntype = leafnode) and (ltype = varitype)) or
1)		  ((ntype = exprnode) and (op = arefop))) then
1)	     begin				(* no good *)
1)	     pp20L(' Need a frame variab',20); pp10('le here.  ',8); errprnt;
1)	     bad := true;			(* mark statement as bad *)
1)	     end;
1)	  getToken;			(* look for the "FROM" *)
1)	  with curToken do
1)	   if (ttype <> reswdtype) or (rtype <> filtype) or (filler <> fromtype) then
1)	     begin
1)	     backup := true;
1)	     pp20L(' Expecting a "FROM" ',20); pp5('here.',5); errprnt;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 42,36

1)	     end;
1)	  frame2 := checkArg(exprParse,frametype);
1)	  with frame2↑ do		(* make sure it's a variable *)
1)	   if not (((ntype = leafnode) and (ltype = varitype)) or
1)		  ((ntype = exprnode) and (op = arefop))) then
1)	     begin				(* no good *)
1)	     pp20L(' Need a frame variab',20); pp10('le here.  ',8); errprnt;
1)	     bad := true;			(* mark statement as bad *)
1)	     end;
**** File 2) EDIT.PAS[EAL,HE]/36P/86L
2)	procedure eUnfixParse(st: statementp);
2)	 var lexp: nodep;
2)	 begin
2)	 with st↑ do
2)	  begin
2)	  frame1 := checkArg(eExprParse,frametype);
2)	  with frame1↑ do		(* make sure it's a variable *)
2)	   if not (((ntype = leafnode) and (ltype = varitype)) or
2)		  ((ntype = exprnode) and (op = arefop))) then
2)	     begin				(* no good *)
2)	     pp20L(' Need a frame variab',20); pp10('le here.  ',8); ppLine;
2)	  (* *** mark it as no good *** *)
2)	     end;
2)	  eGetToken;			(* look for the "FROM" *)
2)	  with curToken do
2)	   if (ttype <> reswdtype) or (rtype <> filtype) or (filler <> fromtype) then
2)	     begin
2)	   (* *** mark it as no good *** *)
2)	     backup := true;
2)	     pp20L(' Expecting a "FROM" ',20); pp5('here.',5); ppLine;
2)	     end;
2)	  frame2 := checkArg(eExprParse,frametype);
2)	  with frame2↑ do		(* make sure it's a variable *)
2)	   if not (((ntype = leafnode) and (ltype = varitype)) or
2)		  ((ntype = exprnode) and (op = arefop))) then
2)	     begin				(* no good *)
2)	     pp20L(' Need a frame variab',20); pp10('le here.  ',8); ppLine;
2)	  (* *** mark it as no good *** *)
2)	     end;
***************


**** File 1) EDIT.PAS[AL,HE]/43P/1L
1)	(* enableParse *)
1)	procedure enableParse(st: statementp);
1)	 var v: varidefp; b: boolean; i: integer;
**** File 2) EDIT.PAS[EAL,HE]/37P/1L
2)	(* eEnableParse *)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 43,37

2)	procedure eEnableParse(st: statementp);
2)	 var v: varidefp; b: boolean; i: integer;
***************


**** File 1) EDIT.PAS[AL,HE]/43P/11L
1)	   getToken;	(* get the label of the cmon to enable/disable *)
1)	   if ttype = identtype then (* check that it's really a label *)
1)	     begin
1)	     v := varLookup(id);
1)	     if v = nil then
1)	       begin			(* need to define it *)
1)	       v := makeUVar(labeltype,id);
1)	  (* ??? where will we check that it gets used as a label ??? *)
1)	       cmonlab := v;
1)	       pp20L(' Undeclared identifi',20);
1)	       pp20('er defined to be a l',20); pp5('abel.',5); errprnt;
1)	       end
**** File 2) EDIT.PAS[EAL,HE]/37P/11L
2)	   eGetToken;	(* get the label of the cmon to enable/disable *)
2)	   if ttype = identtype then (* check that it's really a label *)
2)	     begin
2)	     v := eVarLookup(id);
2)	     if v = nil then
2)	       begin			(* need to define it *)
2)	       v := eMakeUVar(labeltype,id);
2)	  (* ??? where will we check that it gets used as a label ??? *)
2)	       cmonlab := v;
2)	       pp20L(' Undeclared identifi',20);
2)	       pp20('er defined to be a l',20); pp5('abel.',5); ppLine;
2)	       end
***************


**** File 1) EDIT.PAS[AL,HE]/43P/40L
1)	    pp20L(' Need a label here. ',19); errprnt;
1)	    bad := true;			(* mark statement as bad *)
1)	    end
1)	   else
1)	    bad := false;				(* statement is ok *)
1)	  end;
1)	 end;
1)	(* getBlkId, idGet & plistParse *)
1)	function getBlkId: identp;
1)	 var bid: identp;
1)	 begin
1)	 bid := nil;
1)	 if curchar + 2 < maxchar then
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 43,37

1)	   begin
1)	   getToken;		(* get the new block id *)
1)	   with curToken do
1)	    if ttype = constype then
1)	      begin
1)	      if cons↑.ltype = strngtype then
1)		begin		(* yup - grab the id string *)
1)		bid := newIdent;
1)		bid↑.length := cons↑.length;
1)		bid↑.name := cons↑.str;
1)		end
1)	       else
1)		begin
1)		pp20L(' Need a string here ',19); errprnt;
1)		end;
1)	      relNode(cons);
1)	      end
1)	     else backup := true;
1)	   end;
1)	 getBlkId := bid;
1)	 end;
1)	function idGet(st: statementp; indent,l: integer): ascii;
**** File 2) EDIT.PAS[EAL,HE]/37P/40L
2)	    pp20L(' Need a label here. ',19); ppLine;
2)	  (* *** mark statement as bad *** *);
2)	    end;
2)	  end;
2)	 end;
2)	(* idGet & ePlistParse *)
2)	function idGet(st: statementp; indent,l: integer): ascii;
***************


**** File 1) EDIT.PAS[AL,HE]/44P/61L
1)	    relIdent(id1);
1)	    id1 := nil;
1)	    end;
1)	  if elen > 0 then id1 := getBlkId;		(* get the new block id *)
1)	  if stype = coblocktype then
**** File 2) EDIT.PAS[EAL,HE]/38P/34L
2)	    id1↑.name := nil;	(* assume no block id *)
2)	    end;
2)	  if elen > 0 then
2)	    begin
2)	    eGetToken;		(* get the new block id *)
2)	    with curToken do
2)	     begin					(* yup - grab the id string *)
2)	     b := l > 0;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 44,38

2)	     if ttype = constype then 
2)	       begin
2)	       if cons↑.ltype = strngtype then
2)		 begin		(* yup - grab the id string *)
2)		 if id1 = nil then id1 := newIdent;
2)		 id1↑.length := cons↑.length;
2)		 id1↑.name := cons↑.str;
2)		 b := false;
2)		 end;
2)	       relNode(cons);
2)	       end
2)	      else if l = 0 then backup := true;
2)	     if b and (not endOfLine) and ((ttype <> delimtype) or (ch <> ';')) then
2)	       begin
2)	       pp20L(' Need a string here ',19); ppLine;
2)	       end;
2)	     end;
2)	    end;
2)	  if id1 <> nil then
2)	    if id1↑.name = nil then begin relIdent(id1); id1 := nil end;
2)	  if stype = coblocktype then
***************


**** File 1) EDIT.PAS[AL,HE]/44P/86L
1)	    if b then b := eqStrng(id2↑.name,i+1,id1↑.length);
1)	    if not b then
1)	      begin
1)	      pp20L(' Block ids do not ma',20); pp5('tch  ',3); errprnt;
1)	      end;
1)	    end;
1)	  end;
1)	 idGet := ch;
1)	 end;
1)	function plistParse(st: statementp; e0,indent,l,ocur: integer): ascii;
1)	 var i,j,elen: integer; n,no,np: nodep; b,bp: boolean; ch: ascii;
1)	 begin
**** File 2) EDIT.PAS[EAL,HE]/38P/83L
2)	    if b then b := eEqStrng(id2↑.name,i+1,id1↑.length);
2)	    if not b then
2)	      begin
2)	      pp20L(' Block ids do not ma',20); pp5('tch  ',3); ppLine;
2)	      end;
2)	    end;
2)	  end;
2)	 idGet := ch;
2)	 end;
2)	function ePlistParse(st: statementp; e0,indent,l,ocur: integer): ascii;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 44,38

2)	 var i,j,elen: integer; n,no,np: nodep; b: boolean; ch: ascii;
2)	 begin
***************


**** File 1) EDIT.PAS[AL,HE]/44P/112L
1)	 bp := false;
1)	 np := nil;
1)	 i := e0;
1)	 while b and (n <> nil) do
1)	  begin
1)	  j := i + getExprLength(n↑.lval);
1)	  if bp and (j > 78) then b := false
1)	   else
1)	    begin
1)	    bp := true;
1)	    np := n↑.next;
**** File 2) EDIT.PAS[EAL,HE]/38P/109L
2)	 np := nil;
2)	 i := e0;
2)	 while b and (n <> nil) do
2)	  begin
2)	  j := i + getExprLength(n↑.lval);
2)	  if j > 78 then b := false
2)	   else
2)	    begin
2)	    np := n↑.next;
***************


**** File 1) EDIT.PAS[AL,HE]/44P/135L
1)	  n↑.lval := exprParse;		(* parse the modified exprs *)
1)	  if n↑.lval <> nil then
**** File 2) EDIT.PAS[EAL,HE]/38P/130L
2)	  n↑.lval := eExprParse;		(* parse the modified exprs *)
2)	  if n↑.lval <> nil then
***************


**** File 1) EDIT.PAS[AL,HE]/44P/143L
1)	  getToken;			(* check for "," or ")" *)
1)	  with curToken do		(* *** should be smarter *** *)
**** File 2) EDIT.PAS[EAL,HE]/38P/138L
2)	  eGetToken;			(* check for "," or ")" *)
2)	  with curToken do		(* *** should be smarter *** *)
***************


  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 44,38

**** File 1) EDIT.PAS[AL,HE]/44P/150L
1)	     pp20L(' Inserting missing c',20); pp5('omma ',4); errprnt;
1)	     backup := true;
**** File 2) EDIT.PAS[EAL,HE]/38P/145L
2)	     pp20L(' Inserting missing c',20); pp5('omma ',4); ppLine;
2)	     backup := true;
***************


**** File 1) EDIT.PAS[AL,HE]/44P/158L
1)	  if plist = nil then exprs := nil else exprs := evalOrder(plist,nil,false);
1)	 reFormatStmnt(st,indent,ocur);		(* may have changed nlines *)
1)	 plistParse := ch;
1)	 end;
1)	(* labelParse & clabelParse *)
1)	procedure labelParse;
1)	 var i: integer;
1)	 begin
1)	 cursorStack[cursor].st↑.stlab↑.s := nil; (* old label no longer points here *)
1)	 getToken;				(* get new label *)
1)	 with curToken, cursorStack[cursor] do
1)	  if ttype = labeldeftype then
1)	    begin
1)	    st↑.stlab := lab;
1)	    lab↑.s := st;
1)	    end
1)	   else
1)	    begin				(* delete the old label *)
1)	    st↑.stlab := nil;
1)	    deleteLines(cursorLine,1,0);
1)	    if (ttype <> delimtype) or (ch <> chr(CR)) or not endOfLine then
1)	      begin pp20L(' Expecting a label h',20); pp5('ere  ',3); errprnt end;
1)	    end;
1)	 end;
1)	procedure clabelParse(n: nodep);
1)	 var np: nodep;
1)	 begin
1)	 getToken;
1)	 with n↑, curToken do
1)	  if (ttype = delimtype) and (ch = '[') then
1)	    begin
1)	    np := checkArg(exprParse,svaltype);	(* get constant value *)
1)	    if np↑.ntype <> leafnode then
1)	      begin
1)	      pp20L(' Must have constant ',20); pp5('here ',4); errprnt;
1)	      cval := -2;
**** File 2) EDIT.PAS[EAL,HE]/38P/153L
2)	  begin
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 44,38

2)	  if plist = nil then exprs := nil else exprs := evalOrder(plist,nil,false);
2)	  curLine := 1;
2)	  setUp := true;
2)	  setCursor := false;
2)	  j := nlines;				(* how long were we *)
2)	  putStmnt(st,indent,99);		(* possibly reformat us *)
2)	  setUp := false;
2)	  if j <> nlines then
2)	    begin		(* if necessary correct for any change in nlines *)
2)	    if j < nlines then insertLines(ocur,nlines-j,1)	(* fix up screen *)
2)	     else if j > nlines then deleteLines(ocur,j-nlines,1);
2)	    end;
2)	  curLine := cursorStack[cursor].cline - 1;
2)	  firstLine := curLine + 1;
2)	  lastLine := firstLine + nlines - 1;
2)	  end;
2)	 if firstline < topDLine then firstLine := topDline;
2)	 if botDline < lastLine then
2)	   if botDline > topDline + firstDline + dispHeight - 2 then
2)	     lastLine := botDline		(* it's definitely off screen *)
2)	    else botDline := lastLine;		(* should be ok.... *)
2)	 for i := firstLine - topDline + 1 to lastLine - topDline + 1 do
2)	  begin		(* flush old lines before redrawing stmnt *)
2)	  relLine(lines[i]);
2)	  lines[i] := nil;
2)	  end;
2)	 ePlistParse := ch;
2)	 end;
2)	(* labelParse & eClabelParse *)
2)	procedure labelParse;
2)	 var i: integer;
2)	 begin
2)	 eGetToken;			(* get new label *)
2)	 with curToken, cursorStack[cursor] do
2)	  if (ttype = delimtype) and (ch = chr(15B)) and endOfLine then
2)	    begin				(* delete the old label *)
2)	    st↑.stlab↑.s := nil;
2)	    st↑.stlab := nil;
2)	    deleteLines(cursorLine,1,0);
2)	    end
2)	   else if ttype = labeldeftype then
2)	    begin
2)	    st↑.stlab↑.s := nil;	(* old label no longer points here *)
2)	    st↑.stlab := lab;
2)	    lab↑.s := st;
2)	    end
2)	   else
2)	    begin pp20L(' Expecting a label h',20); pp5('ere  ',3); ppLine end;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 44,38

2)	 end;
2)	procedure eClabelParse(n: nodep);
2)	 var np: nodep;
2)	 begin
2)	 eGetToken;
2)	 with n↑, curToken do
2)	  if (ttype = delimtype) and (ch = '[') then
2)	    begin
2)	    np := checkArg(eExprParse,svaltype);	(* get constant value *)
2)	    if np↑.ntype <> leafnode then
2)	      begin
2)	      pp20L(' Must have constant ',20); pp5('here ',4); ppLine;
2)	      cval := -2;
***************


**** File 1) EDIT.PAS[AL,HE]/45P/40L
1)	    getDelim(']');
1)	    end
**** File 2) EDIT.PAS[EAL,HE]/39P/41L
2)	    eGetDelim(']');
2)	    end
***************


**** File 1) EDIT.PAS[AL,HE]/45P/47L
1)	    pp20L(' Need a case number ',20); pp5('here.',5); errprnt;
1)	    cval := -2;			(* use a garbage one *)
1)	    end
1)	 end;
1)	(* aux routines: declarationp, getDeclarations & addNewDeclarations *)
1)	function declarationp: boolean;
1)	 var b: boolean; v: varidefp;
1)	 begin
1)	 b := false;
1)	 getToken;
1)	 with curToken do
**** File 2) EDIT.PAS[EAL,HE]/39P/48L
2)	    pp20L(' Need a case number ',20); pp5('here.',5); ppLine;
2)	    cval := -2;			(* use a garbage one *)
2)	    end
2)	 end;
2)	(* aux routines: declarationp, getEDeclarations & addNewDeclarations *)
2)	function declarationp: boolean;
2)	 var b: boolean; v: varidefp;
2)	 begin
2)	 b := false;
2)	 eGetToken;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 45,39

2)	 with curToken do
***************


**** File 1) EDIT.PAS[AL,HE]/46P/35L
1)	    v := varLookup(id);
1)	    if v <> nil then b := v↑.vtype = dimensiontype else b := false;
1)	    end;
1)	 if not b then backup := true;
1)	 declarationp := b;
1)	 end;
1)	function dumDup(v: varidefp): boolean;
1)	 begin dumDup := false end;	(* used by routines calling getDeclarations *)
1)	function getDeclarations(pdef: boolean; lev: integer;
1)				 var vo: varidefp; var numvars: integer;
1)				 function dup(varidefp): boolean): varidefp;
1)	(* *** Note: each Pascal compiler is apt to have its own syntax for passing *** *)
1)	(* ***		procedures/functions as a parameter.			    *** *)
1)	 var vhdr,va,vp,vdim: varidefp; off,tb,i: integer; d: datatypes;
1)	     endlist,b: boolean; no,n: nodep; idname: identp;
1)	 function badVarId: boolean;
1)	  var v: varidefp; b: boolean;
1)	  begin
1)	  b := true;
1)	  getToken;				(* get the id name *)
1)	  if curToken.ttype <> identtype then
1)	    begin				(* garbage *)
1)	    pp20L(' Expecting an identi',20); pp10('fier here ',9); errprnt;
1)	    backup := true;
1)	    b := false;
1)	    end
1)	   else if pdef then b := true
1)	   else
1)	    begin
1)	    v := curBlock↑.variables;
1)	    while (v <> nil) and b do
1)	     begin
1)	     if v↑.name = curToken.id then b := dup(v);
1)	     v := v↑.next;
1)	     end;
1)	    if not b then
1)	      begin				(* it's already being used *)
1)	      pp20L(' Identifier previous',20); pp20('ly defined in curren',20);
1)	      pp10('t block.  ',8); errprnt;
1)	      end
1)	    end;
1)	  badVarId := not b;
1)	  end;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 46,40

1)	 procedure getSep;
1)	  begin
1)	  getToken;			(* looking for "," or ";" or ")" *)
1)	  with curToken do
1)	   if ttype = delimtype then
1)	     begin
1)	     if ch = ',' then endlist := false			(* more to get *)
1)	      else if pdef and (ch = ')') then backup := true
1)	      else if (ch <> ';') and (ch <> chr(CR)) then
1)	       begin
1)	       pp20L(' Expecting a "," or ',20); pp10('";" here  ',8); errprnt;
1)	       end
1)	     end
1)	    else
1)	     begin
1)	     backup := true;
1)	     pp20L(' Inserting missing "',20);
1)	     if ttype = identtype then		(* user defined dimension type? *)
1)	       begin
1)	       vp := varLookup(id);
1)	       if vp = nil then endlist := false
1)		 else if vp↑.vtype <> dimensiontype then endlist := false;
1)	       end;
1)	     if endlist then ppChar(';') else ppChar(',');
1)	     ppChar('"'); errprnt;
1)	     end
1)	  end;
1)	 begin
**** File 2) EDIT.PAS[EAL,HE]/40P/35L
2)	    v := eVarLookup(id);
2)	    if v <> nil then b := v↑.vtype = dimensiontype else b := false;
2)	    end;
2)	 if not b then backup := true;
2)	 declarationp := b;
2)	 end;
2)	function getEDeclarations(pdef: boolean; lev: integer;
2)				 var vo: varidefp; var numvars: integer): varidefp;
2)	 var vhdr,va,vp,vdim: varidefp; off,tb,i: integer; d: datatypes;
2)	     endlist,b: boolean; no,n: nodep; idname: identp;
2)	 begin
***************


**** File 1) EDIT.PAS[AL,HE]/46P/129L
1)	    vdim := varLookup(id);		(* save it for later *)
1)	    b := declarationp;			(* get base datatype *)
**** File 2) EDIT.PAS[EAL,HE]/40P/65L
2)	    vdim := eVarLookup(id);		(* save it for later *)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 46,40

2)	    b := declarationp;			(* get base datatype *)
***************


**** File 1) EDIT.PAS[AL,HE]/46P/136L
1)	    pp20L(' Need a basic dataty',20); pp10('pe here   ',7); errprnt;
1)	    while (not endOfLine) and ((ttype <> delimtype) or (ch <> ';')) do
1)	     getToken;						(* flush tokens *)
1)	    end
**** File 2) EDIT.PAS[EAL,HE]/40P/72L
2)	    pp20L(' Need a basic dataty',20); pp10('pe here   ',7); ppLine;
2)	    while (ttype <> delimtype) or (ch <> ';') do eGetToken; (* flush tokens *)
2)	    end
***************


**** File 1) EDIT.PAS[AL,HE]/46P/148L
1)	      pp20('ll try to define it ',20); pp5('later',5); errprnt;
1)	      end;
1)	    if d <> proctype then getToken; (* is this really an array or procedure? *)
1)	    if (ttype = reswdtype) and (rtype = decltype) and (decl = proctype) then
1)	      begin				(* new procedure definition *)
1)	      if badVarId then idname := nil	(* get proc's name & check it's ok *)
1)	       else idname := id;
**** File 2) EDIT.PAS[EAL,HE]/40P/83L
2)	      pp20('ll try to define it ',20); pp5('later',5); ppLine;
2)	      end;
2)	    if d <> proctype then eGetToken; (* is this really an array or procedure? *)
2)	    if (ttype = reswdtype) and (rtype = decltype) and (decl = proctype) then
2)	      begin				(* new procedure definition *)
2)	      eGetToken;			(* get the procedure's name *)
2)	      if ttype <> identtype then
2)		begin				(* garbage *)
2)		pp20L(' Expecting an identi',20); pp10('fier here ',9); ppLine;
2)		backup := true;
2)		idname := nil;
2)		end
2)	       else idname := id;
***************


**** File 1) EDIT.PAS[AL,HE]/46P/181L
1)	       getToken;		(* see if procedure has any parameters *)
1)	       if (ttype = delimtype) and (ch = '(') then	(* yup - get 'em *)
1)		 begin
1)		 va := nil;
1)		 while declarationp do			(* get parameters *)
1)		  begin
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 46,40

1)		  vdim := getDeclarations(true,level,va,i,dumDup);
1)		  if paramlist = nil then paramlist := vdim;
**** File 2) EDIT.PAS[EAL,HE]/40P/122L
2)	       eGetToken;		(* see if procedure has any parameters *)
2)	       if (ttype = delimtype) and (ch = '(') then	(* yup - get 'em *)
2)		 begin
2)		 va := nil;
2)		 while declarationp do			(* get parameters *)
2)		  begin
2)		  vdim := getEDeclarations(true,level,va,i);
2)		  if paramlist = nil then paramlist := vdim;
***************


**** File 1) EDIT.PAS[AL,HE]/46P/195L
1)		 getDelim(')');			(* look for closing ")" *)
1)		 getToken;			(* get separating ";" *)
1)		 end;
1)	       backup := (ttype <> delimtype) or (ch <> ';');
1)	       body := newStatement;
1)	       getToken;	(* sneak a look if there's a BEGIN block coming next *)
1)	       backup := true;
1)	       if (fParse and not sParse) or
1)		  ((ttype = reswdtype) and (rtype = stmnttype) and
1)		   (curToken.stmnt = blocktype)) then	(* make an empty stmnt now *)
1)		 begin
1)		 with body↑ do
1)		  begin stype := emptytype; blkid := nil; nlines := 1 end;
1)		 end
1)		else
1)		 begin			(* no body yet - make a Begin-End block *)
1)		 appendEnd(body,body);
1)		 with body↑ do
1)		  begin stype := blocktype; bparent := curBlock; blkid := nil;
1)			nlines := 2; level := lev + 2; numvars := 0; bcode := next;
1)			variables := nil end;
1)		 end;
1)	       body↑.next := newStatement;	(* append a return, just in case *)
**** File 2) EDIT.PAS[EAL,HE]/40P/136L
2)		 eGetDelim(')');			(* look for closing ")" *)
2)		 eGetToken;				(* get separating ";" *)
2)		 end;
2)	       body := newStatement;	(* no body yet - make a Begin-End block *)
2)	       appendEnd(body,body);
2)	       with body↑ do
2)		begin stype := blocktype; bparent := curBlock; blkid := nil; nlines := 2;
2)		 level := lev + 2; numvars := 0; bcode := next;	variables := nil end;
2)	       insertLines(cursorLine+1,2,0);			(* fix up display *)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 46,40

2)	       curLine := cursorLine;
2)	       firstLine := curLine + 1;
2)	       lastLine := curLine + 2;
2)	       putStmnt(body,cursorStack[cursor].ind + 2,99);
2)	       putchar(';');
2)	       putLine;				(* force last line to be written out *)
2)	       body↑.next := newStatement;	(* append a return, just in case *)
***************


**** File 1) EDIT.PAS[AL,HE]/46P/238L
1)		  pp10(' reference',10); errprnt;
1)		  end
**** File 2) EDIT.PAS[EAL,HE]/40P/172L
2)		  pp10(' reference',10); ppLine;
2)		  end
***************


**** File 1) EDIT.PAS[AL,HE]/46P/248L
1)		  pp10(' reference',10); errprnt;
1)		  end
**** File 2) EDIT.PAS[EAL,HE]/40P/182L
2)		  pp10(' reference',10); ppLine;
2)		  end
***************


**** File 1) EDIT.PAS[AL,HE]/46P/256L
1)		  errprnt;
1)		  end
**** File 2) EDIT.PAS[EAL,HE]/40P/190L
2)		  ppLine;
2)		  end
***************


**** File 1) EDIT.PAS[AL,HE]/46P/263L
1)		  errprnt;
1)		  end;
1)	      repeat
1)	       endlist := true;			(* assume this is last one *)
1)	       if badVarId then 
1)		 begin				(* proc will complain if error *)
1)		 if not backup then getSep;	(* skip over multiply defined idents *)
1)		 end
1)		else
1)		 begin				(* declare the new variable *)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 46,40

1)		 vp := newVaridef;
**** File 2) EDIT.PAS[EAL,HE]/40P/197L
2)		  ppLine;
2)		  end;
2)	      repeat
2)	       endlist := true;			(* assume this is last one *)
2)	       eGetToken;			(* declare the new variables *)
2)	       if ttype <> identtype then
2)		 begin				(* garbage *)
2)		 pp20L(' Expecting an identi',20); pp10('fier here ',9); ppLine;
2)		 backup := true;
2)		 end
2)		else
2)		 begin
2)		 vp := newVaridef;
***************


**** File 1) EDIT.PAS[AL,HE]/46P/282L
1)		   pp10('good idea ',9); errprnt;
1)		   end;
**** File 2) EDIT.PAS[EAL,HE]/40P/218L
2)		   pp10('good idea ',9); ppLine;
2)		   end;
***************


**** File 1) EDIT.PAS[AL,HE]/46P/300L
1)		   getToken;			(* looking for a "[" *)
1)		   if (ttype <> delimtype) or (ch <> '[') then
**** File 2) EDIT.PAS[EAL,HE]/40P/236L
2)		   eGetToken;			(* looking for a "[" *)
2)		   if (ttype <> delimtype) or (ch <> '[') then
***************


**** File 1) EDIT.PAS[AL,HE]/46P/312L
1)			errprnt;
1)			end
**** File 2) EDIT.PAS[EAL,HE]/40P/248L
2)			ppLine;
2)			end
***************


**** File 1) EDIT.PAS[AL,HE]/46P/330L
1)		       lower := exprParse;	(* get lower bound definition *)
1)		       getDelim(':');		(* looking for separating ":" *)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 46,40

1)		       upper := exprParse;	(* get upper bound definition *)
1)		       getToken;	(* looking for final "]" or separating "," *)
1)		       if (ttype <> delimtype) or ((ch <> ',') and (ch <> ']')) then
1)			 begin
1)			 pp20L(' Expecting a "," or ',20); pp10('"]" here  ',8); errprnt;
1)			 backup := true;
**** File 2) EDIT.PAS[EAL,HE]/40P/266L
2)		       lower := eExprParse;	(* get lower bound definition *)
2)		       eGetDelim(':');		(* looking for separating ":" *)
2)		       upper := eExprParse;	(* get upper bound definition *)
2)		       eGetToken;	(* looking for final "]" or separating "," *)
2)		       if (ttype <> delimtype) or ((ch <> ',') and (ch <> ']')) then
2)			 begin
2)			 pp20L(' Expecting a "," or ',20); pp10('"]" here  ',8); ppLine;
2)			 backup := true;
***************


**** File 1) EDIT.PAS[AL,HE]/46P/353L
1)		 getSep;
1)		 end
**** File 2) EDIT.PAS[EAL,HE]/40P/289L
2)		 eGetToken;			(* looking for "," or ";" or ")" *)
2)		 if ttype = delimtype then
2)		   begin
2)		   if ch = ',' then endlist := false	(* more to get *)
2)		    else if pdef and (ch = ')') then backup := true
2)		    else if (ch <> ';') and (ch <> chr(15B)) then
2)		     begin
2)		     pp20L(' Expecting a "," or ',20); pp10('";" here  ',8); ppLine;
2)		     end
2)		   end
2)		  else
2)		   begin
2)		   backup := true;
2)		   pp20L(' Inserting missing "',20);
2)		   if ttype = identtype then	(* user defined dimension type? *)
2)		     begin
2)		     vp := eVarLookup(id);
2)		     if vp = nil then endlist := false
2)		       else if vp↑.vtype <> dimensiontype then endlist := false;
2)		     end;
2)		   if endlist then ppChar(';') else ppChar(',');
2)		   ppChar('"'); ppLine;
2)		   end
2)		 end
***************

  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 46,40


**** File 1) EDIT.PAS[AL,HE]/46P/361L
1)	 getDeclarations := vhdr;
1)	 end;
**** File 2) EDIT.PAS[EAL,HE]/40P/319L
2)	 getEDeclarations := vhdr;
2)	 end;
***************


**** File 1) EDIT.PAS[AL,HE]/46P/372L
1)	    begin sp := s; s := s↑.last; l := l + sp↑.nlines end;
1)	   with s↑ do
**** File 2) EDIT.PAS[EAL,HE]/40P/330L
2)	    begin sp := s; s := s↑.last; l := l + 1 end;
2)	   with s↑ do
***************


**** File 1) EDIT.PAS[AL,HE]/46P/412L
1)	       makeNewVar(s↑.variables);	(* if active block make env entry for var *)
1)	       s := s↑.next;
**** File 2) EDIT.PAS[EAL,HE]/40P/370L
2)	       eMakeNewVar(s↑.variables);	(* if active block make env entry for var *)
2)	       s := s↑.next;
***************


**** File 1) EDIT.PAS[AL,HE]/46P/423L
1)	  addNewDeclarations := l;
1)	  end;
1)	(* aux routine: reParse *)
1)	procedure reParse(st: statementp);
1)	 var i: integer; v: varidefp; lexp: nodep;
1)	     oCurChar, oMaxChar: integer; oEndOfLine, oBackup, ofParse: boolean;
1)	     abuf: array [1..160] of ascii; oCurToken: token;
1)	 procedure reParseAux(st: statementp);
1)	  var s: statementp; n,np: nodep; d: datatypes; b: boolean;
1)	  function reExpr(n,dim: nodep; d: datatypes): nodep;
**** File 2) EDIT.PAS[EAL,HE]/40P/381L
2)	  showCursor(cursorLine-topDline-firstDline+2,1);
2)	  addNewDeclarations := l;
2)	  end;
2)	(* aux routine: reParse *)
2)	procedure reParse(st: statementp);
2)	 var i: integer; v: varidefp; lexp: nodep;
2)	 procedure reParseAux(st: statementp);
2)	  var s: statementp; n,np: nodep; d: datatypes;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 46,40

2)	  function reExpr(n,dim: nodep; d: datatypes): nodep;
***************


**** File 1) EDIT.PAS[AL,HE]/47P/23L
1)		if lbuf[i] = chr(sailundline) then listing[i] := '_'	(* for SAIL *)
1)		 else listing[i] := lbuf[i];
**** File 2) EDIT.PAS[EAL,HE]/41P/21L
2)		if lbuf[i] = chr(30B) then listing[i] := '_'	(* for SAIL *)
2)		 else listing[i] := lbuf[i];
***************


**** File 1) EDIT.PAS[AL,HE]/47P/31L
1)	       n := exprParse;			(* parse new expression *)
1)	       if n <> nil then
1)		 with n↑ do
1)		  if ntype = exprnode then elength := lbufp
1)		   else if (ntype = leafnode) and (ltype = svaltype) then wid := lbufp;
1)	       end;
1)	     if d <> nulltype then n := checkArg(n,d);	(* datatype still ok? *)
1)	     if dim <> nil then dimCheck(n,dim);	(* do dimensions still match? *)
1)	     end;
1)	   reExpr := n;
1)	   end (* reExpr *);
1)	  procedure reCmon(st: statementp); forward;
1)	  procedure reClause(n: nodep);
1)	   var d: datatypes; nv: nodep;
1)	   begin (* reClause *)
**** File 2) EDIT.PAS[EAL,HE]/41P/29L
2)	       n := eExprParse;			(* parse new expression *)
2)	       if n <> nil then
2)		 with n↑ do
2)		  if ntype = exprnode then elength := lbufp
2)		   else if (ntype = leafnode) and (ltype = svaltype) then wid := lbufp;
2)	       if d <> nulltype then n := checkArg(n,d);	(* datatype still ok? *)
2)	       if dim <> nil then eDimCheck(n,dim);	(* do dimensions still match? *)
2)	       end;
2)	     end;
2)	   reExpr := n;
2)	   end (* reExpr *);
2)	  procedure reCmon(st: statementp); forward;
2)	  procedure reClause(n: nodep);
2)	   var d: datatypes;
2)	   begin (* reClause *)
***************


  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 47,41

**** File 1) EDIT.PAS[AL,HE]/47P/59L
1)	viaptnode,
1)	byptnode:	begin
1)			if st↑.stype = jtmovetype then
1)			  via := reExpr(via,nil,svaltype)
1)			 else if ntype = viaptnode then
1)			  via := reExpr(via,distancedim↑.dim,transtype)
1)			 else
1)			  begin
1)			  if st↑.stype = movetype then
1)			    begin
1)			    via := reExpr(via,distancedim↑.dim,nulltype);
1)			    if getdtype(via) <> vectype then via := checkArg(via,transtype);
1)			    end
1)			   else via := reExpr(via,distancedim↑.dim,svaltype);
1)			  end;
1)			nv := vclauses;
1)			while nv <> nil do
1)			 begin reClause(nv); nv := nv↑.next end;
1)			reParseAux(code);
1)			end;
1)	durnode:	begin
1)			durval := reExpr(durval,timedim↑.dim,svaltype);
1)			end;
1)	velocitynode:	begin
1)			clval := reExpr(clval,nil,vectype);
1)			end;
**** File 2) EDIT.PAS[EAL,HE]/41P/57L
2)	viaptnode:	begin
2)			via := reExpr(via,distancedim↑.dim,transtype);
2)			duration := reExpr(duration,timedim↑.dim,svaltype);
2)			velocity := reExpr(velocity,veldim↑.dim,vectype);
2)			reParseAux(code);
2)			end;
2)	durnode:	begin
2)			durval := reExpr(durval,timedim↑.dim,svaltype);
2)			end;
***************


**** File 1) EDIT.PAS[AL,HE]/47P/101L
1)			if cocff <> nil then reClause(cocff);
1)			end;
1)	cmonnode:	begin
1)			reCmon(cmon);
1)			end;
1)	others:		begin end;		(* nothing to do *)
1)	     end;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 47,41

**** File 2) EDIT.PAS[EAL,HE]/41P/82L
2)			coc := reExpr(coc,nil,transtype);
2)			end;
2)	cmonnode:	begin
2)			reCmon(cmon);
2)			end;
2)	     end;
***************


**** File 1) EDIT.PAS[AL,HE]/47P/156L
1)			if bad and
1)			   (((forvar↑.ntype = leafnode) and (forvar↑.ltype = varitype)) or
1)			    ((forvar↑.ntype = exprnode) and (forvar↑.op = arefop))) then
1)			  bad := false;			(* ok now *)
1)			initial := reExpr(initial,n,svaltype);
**** File 2) EDIT.PAS[EAL,HE]/41P/136L
2)			initial := reExpr(initial,n,svaltype);
***************


**** File 1) EDIT.PAS[AL,HE]/47P/200L
1)	printtype,
1)	prompttype,
1)	aborttype,
1)	saytype:	begin
1)			n := plist;
**** File 2) EDIT.PAS[EAL,HE]/41P/177L
2)	prompttype,
2)	printtype,
2)	aborttype:	begin
2)			n := plist;
***************


**** File 1) EDIT.PAS[AL,HE]/47P/222L
1)	 (* *** should check that what is ok for assignment & set bad accordingly *** *)
1)			n := nil;
**** File 2) EDIT.PAS[EAL,HE]/41P/198L
2)			n := nil;
***************


**** File 1) EDIT.PAS[AL,HE]/47P/244L
1)			b := bad;	(* if bad see if we just corrected error *)
1)			if b and (((frame1↑.ntype = leafnode) and (frame1↑.ltype<>varitype))
1)			       or ((frame1↑.ntype = exprnode) and (frame1↑.op=badop))) then
1)			  b := false;			(* still bad *)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 47,41

1)			if b and (((frame2↑.ntype = leafnode) and (frame2↑.ltype<>varitype))
1)			       or ((frame2↑.ntype = exprnode) and (frame2↑.op=badop))) then
1)			  b := false;			(* still bad *)
1)			if b and (byvar <> nil) then
1)			  if ((byvar↑.ntype = leafnode) and (byvar↑.ltype <> varitype)) or
1)			     ((byvar↑.ntype = exprnode) and (byvar↑.op = badop)) then
1)			    b := false;			(* still bad *)
1)			if b then bad := false;		(* it's ok now *)
1)			with frame1↑ do
**** File 2) EDIT.PAS[EAL,HE]/41P/219L
2)			with frame1↑ do
***************


**** File 1) EDIT.PAS[AL,HE]/47P/274L
1)	jtmovetype,
1)	operatetype,
1)	opentype,
1)	closetype,
1)	centertype,
1)	floattype,
1)	setbasetype,
1)	stoptype:	begin
1)			pushStmnt(st,0);		(* so grinch can be parsed *)
1)			if bad and ((stype = movetype) or (stype = jtmovetype))
1)			       and (cf <> nil) then
1)			  if (((cf↑.ntype = leafnode) and (cf↑.ltype = varitype)) or
1)			      ((cf↑.ntype = exprnode) and (cf↑.op = arefop))) then
1)			    bad := false;		(* it's ok now *)
1)			cf := reExpr(cf,nil,nulltype);
**** File 2) EDIT.PAS[EAL,HE]/41P/237L
2)	operatetype,
2)	opentype,
2)	closetype,
2)	centertype,
2)	stoptype:	begin
2)			pushStmnt(st,0);		(* so grinch can be parsed *)
2)			cf := reExpr(cf,nil,nulltype);
***************


**** File 1) EDIT.PAS[AL,HE]/47P/301L
1)			ff := reExpr(ff,nil,frametype);
1)			arm := reExpr(arm,nil,frametype);
1)			if bad and
1)			   ((((fvec↑.ntype = leafnode) and (fvec↑.ltype = varitype)) or
1)			     ((fvec↑.ntype = exprnode) and (fvec↑.op = arefop))) and
1)			    (((tvec↑.ntype = leafnode) and (tvec↑.ltype = varitype)) or
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 47,41

1)			     ((tvec↑.ntype = exprnode) and (tvec↑.op = arefop)))) then
1)			  bad := false;		(* it's ok now *)
1)			n := nil;
1)			if arm <> nil then
1)			 with arm↑ do
1)			  if (ntype = exprnode) and (op = arefop) then
1)			    n := evalorder(arg2,n,true); (* deal with subscripts *)
1)			if ff <> nil then
1)			  n := evalorder(ff,n,true);	(* push wrist frame *)
1)			with fvec↑ do
**** File 2) EDIT.PAS[EAL,HE]/41P/256L
2)			n := nil;
2)			with fvec↑ do
***************


**** File 1) EDIT.PAS[AL,HE]/47P/324L
1)	armmagictype:	begin
1)			cmdnum := reExpr(cmdnum,nil,svaltype);
1)			dev := reExpr(dev,nil,nulltype);
1)			if dev = nil then b := true
1)			 else
1)			  with dev↑ do			(* make sure it's a variable *)
1)			   begin
1)			   b := (ntype <> leafnode) or (ltype <> varitype);
1)			   if b then b := (ntype <> exprnode) or (op <> arefop);
1)			   end;
1)			bad := b;			(* mark statement as bad *)
1)			n := iargs;
1)			while n <> nil do
1)			 begin
1)			 n↑.lval := reExpr(n↑.lval,nil,nulltype);
1)			 n := n↑.next;
1)			 end;
1)			n := oargs;
1)			while n <> nil do
1)			 begin	(* make sure each entry in result list is a variable *)
1)			 n↑.lval := reExpr(n↑.lval,nil,nulltype);
1)			 with n↑.lval↑ do
1)			  begin
1)			  b := (ntype <> leafnode) or (ltype <> varitype);
1)			  if b then b := (ntype <> exprnode) or (op <> arefop);
1)			  if b then bad := true;
1)			  end;
1)			 n := n↑.next;
1)			 end;
1)			if not bad then
1)			  begin				(* set up exprs field *)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 47,41

1)			  lexp := evalOrder(cmdnum,nil,true);
1)			  if dev <> nil then			(* evaluate device *)
1)			   if dev↑.ntype <> leafnode then	(* push array subscripts *)
1)			     lexp := evalOrder(dev↑.arg2,nil,true);
1)			  lexp := evalOrder(iargs,lexp,true);	(* push input arguments *)
1)			  n := oargs;
1)			  while n <> nil do
1)			   with n↑ do
1)			    begin		(* push any subscripts in result list *)
1)			    if lval↑.ntype = exprnode then
1)			      lexp := evalOrder(n↑.lval,lexp,true);
1)			    n := next;
1)			    end;
1)			  exprs := lexp;
1)			  end;
1)			end;
1)	others:		begin	(* nothing to do *) 
1)			end;
1)	      end;
1)	  end (* reParseAux *);
1)	 procedure copyTok(var a,b: token);
1)	  begin
1)	  with b do			(* copy a := b *)
1)	   begin
1)	   a.next := next;
1)	   a.ttype := ttype;
1)	   if ttype = constype then a.cons := cons
1)	    else
1)	     begin
1)	     a.rtype := rtype;
1)	     a.len := len;		(* this should work ... *)
1)	     a.str := str;
1)	     end;
1)	   end;
1)	  end;
1)	 begin (* reParse *)
1)	 for i := 1 to 160 do abuf[i] := listing[i];	(* save listing array *)
1)	 oCurChar := curChar;				(* also save other state info *)
1)	 oMaxChar := maxChar;
1)	 oEndOfLine := endOfLine;
1)	 oBackup := backup;
1)	 if backup then copyTok(oCurToken,curToken);
1)	 ofParse := fParse;
1)	 fParse := false;
1)	 if not ofParse then begin pp20L('Need to reparse...  ',18); ppLine end;
1)	 if st↑.stype = blocktype then
**** File 2) EDIT.PAS[EAL,HE]/41P/265L
2)	      end;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 47,41

2)	  end (* reParseAux *);
2)	 begin (* reParse *)
2)	 pp20L('Need to reparse...  ',18); ppLine;
2)	 if st↑.stype = blocktype then
***************


**** File 1) EDIT.PAS[AL,HE]/47P/415L
1)	 if not sParse then i := addNewDeclarations;
1)	 topDline := 0;					(* flush old display *)
1)	 botDline := 0;
1)	 if not ofParse then displayLines(lineNum);	(* & redraw it *)
1)	 for i := 1 to 160 do listing[i] := abuf[i];	(* restore listing array *)
1)	 curChar := oCurChar;			(* also restore other state info *)
1)	 maxChar := oMaxChar;
1)	 endOfLine := oEndOfLine;
1)	 backup := oBackup;
1)	 if backup then copyTok(curToken,oCurToken);
1)	 fParse := ofParse;
1)	 end (* reParse *);
1)	(* varParse & procParse *)
1)	function varParse(st: statementp; indent,l: integer): ascii;
1)	 var b,reparsep: boolean; i,j,elen,onumvars: integer; ch: ascii;
1)	     v,vhdr,vp,vo: varidefp;
1)	     oldvars,newvars: array [1..40] of varidefp; (* 40 should be more than enough... *)
1)	 function dupCheck(vo: varidefp): boolean;	(* used by getDeclarations *)
1)	  var i: integer; b: boolean;
1)	  begin
1)	  b := false;					(* assume no match *)
1)	  for i := 1 to onumvars do
1)	   if oldvars[i] <> nil then
1)	     if vo↑.name = oldvars[i]↑.name then b := true;	(* found it? *)
1)	  dupCheck := b;
1)	  end;
1)	 begin
**** File 2) EDIT.PAS[EAL,HE]/41P/283L
2)	 i := addNewDeclarations;
2)	 topDline := 0;					(* flush old display *)
2)	 botDline := 0;
2)	 displayLines(lineNum);				(* & redraw it *)
2)	 end (* reParse *);
2)	(* eVarParse & eProcParse *)
2)	function eVarParse(st: statementp; indent,l: integer): ascii;
2)	 var b,reparsep: boolean; i,j,elen,onumvars: integer; ch: ascii;
2)	     v,vhdr,vp,vo: varidefp;
2)	     oldvars,newvars: array [1..40] of varidefp; (* 40 should be more than enough... *)
2)	 begin
***************
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 47,41



**** File 1) EDIT.PAS[AL,HE]/48P/39L
1)	   pp20L(' Need a declaration ',20); pp5('here ',4); errprnt;
1)	   end
1)	  else
1)	   begin
1)	   vhdr := getDeclarations(false,curBlock↑.level,v,i,dupCheck);
1)	   st↑.numvars := i;			(* remember # of variables *)
**** File 2) EDIT.PAS[EAL,HE]/42P/28L
2)	   pp20L(' Need a declaration ',20); pp5('here ',4); ppLine;
2)	   end
2)	  else
2)	   begin
2)	   vhdr := getEDeclaration(false,curBlock↑.level,v,i);
2)	   st↑.numvars := i;			(* remember # of variables *)
***************


**** File 1) EDIT.PAS[AL,HE]/48P/89L
1)	      newvars[i] := makeNVar(v↑.vtype,v↑.name);
1)	      with newvars[i]↑ do
**** File 2) EDIT.PAS[EAL,HE]/42P/78L
2)	      newvars[i] := eMakeVar(v↑.vtype,v↑.name);
2)	      with newvars[i]↑ do
***************


**** File 1) EDIT.PAS[AL,HE]/48P/101L
1)	      makeNewVar(newvars[i]);	(* if active block need to make env entry for var *)
1)	      reparsep := true;
**** File 2) EDIT.PAS[EAL,HE]/42P/90L
2)	      eMakeNewVar(newvars[i]);	(* if active block need to make env entry for var *)
2)	      reparsep := true;
***************


**** File 1) EDIT.PAS[AL,HE]/48P/121L
1)	     deleteLines(cursorLine,1,1);
1)	     relStatement(st);
1)	     end;
1)	   for i := 1 to onumvars do
1)	    if oldvars[i] <> nil then
1)	      begin reparsep := true; flushVar(oldvars[i]) end;
1)	   if reparsep then
1)	     begin				(* need to reparse block *)
1)	     reParse(curBlock);
1)	     end;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 48,42

1)	   end;
1)	 varParse := ch;
1)	 end;
1)	function procParse(n: nodep; indent,l: integer): ascii;
1)	 var b,reparsep: boolean; i,j,elen,numvars,onumvars,off: integer; ch: ascii;
**** File 2) EDIT.PAS[EAL,HE]/42P/110L
2)	     deleteLine(cursorLine,1,1);
2)	     relStatement(st);
2)	     end;
2)	   for i := 1 to onumvars do
2)	    if oldvars[i] <> nil then flushVar(oldvars[i]);
2)	   if reparsep then
2)	     begin				(* need to reparse block *)
2)	     reParse(curBlock);
2)	     end;
2)	   end;
2)	 eVarParse := ch;
2)	 end;
2)	function eProcParse(n: nodep; indent,l: integer): ascii;
2)	 var b,reparsep: boolean; i,j,elen,numvars,onumvars,off: integer; ch: ascii;
***************


**** File 1) EDIT.PAS[AL,HE]/48P/167L
1)	    v := varLookup(id);			(* save it for later *)
1)	    b := declarationp;			(* get base datatype *)
**** File 2) EDIT.PAS[EAL,HE]/42P/154L
2)	    v := eVarLookup(id);		(* save it for later *)
2)	    b := declarationp;			(* get base datatype *)
***************


**** File 1) EDIT.PAS[AL,HE]/48P/175L
1)	    pp20L(' Need a basic dataty',20); pp10('pe here   ',7); errprnt;
1)	    end
**** File 2) EDIT.PAS[EAL,HE]/42P/162L
2)	    pp20L(' Need a basic dataty',20); pp10('pe here   ',7); ppLine;
2)	    end
***************


**** File 1) EDIT.PAS[AL,HE]/48P/183L
1)	  if d <> nulltype then getToken; (* get procedure token *)
1)	  if (ttype <> reswdtype) or (rtype <> decltype) or (decl <> proctype) then
1)	    begin
1)	    pp20L(' Expecting "procedur',20); pp20('e" here - good luck!',20); errprnt;
1)	    backup := true;	(* *** maybe should do something smart here??? *** *)
1)	    end;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 48,42

1)	  getToken;				(* get the procedure's name *)
1)	  if ttype <> identtype then
1)	    begin				(* garbage *)
1)	    pp20L(' Expecting an identi',20); pp10('fier here ',9); errprnt;
1)	    backup := true;
**** File 2) EDIT.PAS[EAL,HE]/42P/170L
2)	  if d <> nulltype then eGetToken; (* get procedure token *)
2)	  if (ttype <> reswdtype) or (rtype <> decltype) or (decl <> proctype) then
2)	    begin
2)	    pp20L(' Expecting "procedur',20); pp20('e" here - good luck!',20); ppLine;
2)	    backup := true;	(* *** maybe should do something smart here??? *** *)
2)	    end;
2)	  eGetToken;				(* get the procedure's name *)
2)	  if ttype <> identtype then
2)	    begin				(* garbage *)
2)	    pp20L(' Expecting an identi',20); pp10('fier here ',9); ppLine;
2)	    backup := true;
***************


**** File 1) EDIT.PAS[AL,HE]/48P/200L
1)	  getToken;				(* see if any parameters *)
1)	  numvars := 0;
**** File 2) EDIT.PAS[EAL,HE]/42P/187L
2)	  eGetToken;				(* see if any parameters *)
2)	  numvars := 0;
***************


**** File 1) EDIT.PAS[AL,HE]/48P/209L
1)	     vhdr := getDeclarations(true,j,v,i,dumDup);
1)	     numvars := numvars + i;			(* remember # of parameters *)
1)	     if n↑.paramlist = nil then n↑.paramlist := vhdr;
1)	     if (ttype = delimtype) and (ch = ';') then backup := false;
1)	     end;
1)	    flushcomments := true;		(* don't allow comments again *)
1)	    getDelim(')');			(* look for closing ")" *)
1)	    end;
**** File 2) EDIT.PAS[EAL,HE]/42P/196L
2)	     vhdr := getEDeclarations(true,j,v,i);
2)	     numvars := numvars + i;			(* remember # of parameters *)
2)	     if n↑.paramlist = nil then n↑.paramlist := vhdr;
2)	     if (ttype = delimtype) and (ch = ';') then backup := false;
2)	     end;
2)	    flushcomments := true;		(* don't allow comments again *)
2)	    eGetDelim(')');			(* look for closing ")" *)
2)	    end;
***************
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 48,42



**** File 1) EDIT.PAS[AL,HE]/48P/290L
1)	    reparsep := true;
1)	    end;
1)	 if reparsep then
1)	   begin				(* need to reparse procedure body *)
1)	   reParse(n↑.body);
1)	   end;
1)	 procParse := ch;
1)	 end;
1)	(* aux functions for motion clauses: thenCode, getcsys & clauseParse *)
1)	function thenCode(evp: boolean; s: statementp): statementp;
1)	 var st: statementp; n: nodep; v: varidefp;
**** File 2) EDIT.PAS[EAL,HE]/42P/277L
2)	    end;
2)	 if reparsep then
2)	   begin				(* need to reparse procedure body *)
2)	   reParse(n↑.body);
2)	   end;
2)	 eProcParse := ch;
2)	 end;
2)	(* aux functions for motion clauses: eThenCode & eClauseParse *)
2)	(* Never used *)
2)	function eThenCode(evp: boolean; s: statementp): statementp;
2)	 var st: statementp; n: nodep; v: varidefp;
***************


**** File 1) EDIT.PAS[AL,HE]/49P/20L
1)	   v := makeNVar(cmontype,nil);	(* make a variable for the cmon *)
1)	   v↑.s := st;
**** File 2) EDIT.PAS[EAL,HE]/43P/21L
2)	   v := eMakeVar(cmontype,nil);	(* make a variable for the cmon *)
2)	   v↑.s := st;
***************


**** File 1) EDIT.PAS[AL,HE]/49P/29L
1)	      vari := makeNVar(eventtype,nil);
1)	      makeNewVar(vari);	(* if active block deal with environment entry *)
1)	      vid := nil;
1)	      end;
1)	     end;
1)	   makeNewVar(v);	(* if active block deal with environment entry *)
1)	   end;
1)	 thenCode := st;
1)	 end;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 49,43

1)	function getcsys(defcsys: boolean): boolean;	(* aux routine *)
1)	 var b: boolean;
1)	 begin
1)	 b := defcsys;
1)	 with curToken do
1)	  if (ttype = reswdtype) and (rtype = filtype) and (filler = intype) then
1)	    begin                 (* see whether WORLD or HAND coord sys *)
1)	    getToken;
1)	    if (ttype = reswdtype) and (rtype = filtype) and 
1)	       ((filler = worldtype) or (filler = handtype)) then b := (filler=worldtype)
1)	     else
1)	      begin
1)	      backup := true;
1)	      pp20L(' Need HAND or WORLD ',20); pp5('here ',4); errprnt;
1)	      end
1)	    end
1)	   else backup := true;
1)	 getcsys := b;
1)	 end;
1)	function clauseParse(n: nodep; absSeen: boolean): nodep;
1)	 var cl,nv,vdim: nodep; b,bp,badcl: boolean; dummyrel: reltypes;
1)	     bits,i: integer; d: datatypes; fch: char;
1)	 function relParse: reltypes;
1)	  begin
1)	  getToken;		(* get the relation *)
1)	  with curToken do
1)	   if (ttype = reswdtype) and (rtype = optype) and (op <= sgtop) then
1)	     relParse := op
1)	    else
1)	     begin
1)	     pp20L(' Need a relational o',20); pp20('perator here        ',12); errprnt;
1)	     backup := true;
1)	     relParse := seqop;
1)	     end;
1)	  end;
1)	 begin
1)	 getToken;
1)	 if n = nil then cl := newNode else cl := n;
1)	 badcl := false;
1)	 with curToken, cl↑ do
1)	  begin
1)	  if ttype = identtype then
1)	    begin
1)	    if id↑.name↑.ch = 'SPEED_FACT' then
1)	      begin (* should also really check for final "OR" of speed_factor, but... *)
1)	      ntype := sfacnode;
1)	      dummyrel := relParse;		(* skip over the "=" *)
1)	      clval := checkArg(exprParse,svaltype);
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 49,43

1)	      dimCheck(clval,nodim↑.dim);
1)	      end
1)	     else badcl := true			(* any other identifier is an error *)
1)	    end
1)	   else if (ttype = reswdtype) and (rtype = filtype) then
1)	    begin
1)	    if filler = notype then
1)	      begin
1)	      getToken;				(* look for NULLING or FLIP *)
1)	      notp := true;
1)	      if (ttype <> reswdtype) or (rtype <> clsetype) or
1)		 ((clause <> nullingtype) and (clause <> fliptype)) then
1)		begin
1)		pp20L('Expecting "NULLING" ',20); pp20('or "FLIP" here      ',14);
1)		badcl := true;			(* no good *)
1)		end;
1)	      if clause = fliptype then ntype := flipnode else ntype := nullingnode;
1)	      end
1)	     else if (filler = righttype) or (filler = lefttype) then
1)	      begin
1)	      ntype := shouldernode;
1)	      notp := filler = righttype;
1)	      getToken;				(* look for SHOULDER *)
1)	      if (ttype <> reswdtype) or (rtype <> clsetype) or
1)		  (clause <> shouldertype) then
1)		 begin
1)		 pp20L('Expecting "SHOULDER"',20); pp5(' here',5);
1)		 badcl := true;			(* no good *)
1)		 end;
1)	       end
1)	     else badcl := true			(* any other filler is an error *)
1)	    end
1)	   else if (ttype <> reswdtype) or (rtype <> clsetype) then badcl := true
1)	   else
1)	    case clause of
1)	 durationtype:
1)		begin
1)		ntype := durnode;
1)		durrel := relParse;
1)		durval := checkArg(exprParse,svaltype);
1)		dimCheck(durval,timedim↑.dim);
1)		end;
1)	 velocitytype:
1)		begin
1)		ntype := velocitynode;
1)		dummyrel := relParse;
1)		clval := checkArg(exprParse,vectype);
1)		dimCheck(clval,veldim↑.dim);
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 49,43

1)		end;
**** File 2) EDIT.PAS[EAL,HE]/43P/30L
2)	      vari := eMakeVar(eventtype,nil);
2)	      vid := nil;
2)	      end;
2)	     end;
2)	   end;
2)	 eThenCode := st;
2)	 end;
2)	function eClauseParse(n: nodep; absSeen: boolean): nodep;
2)	 var cl,nv,vdim: nodep; b,bp: boolean; dummyrel: reltypes; bits,i: integer;
2)	     d: datatypes;
2)	 function relParse: reltypes;
2)	  begin
2)	  eGetToken;		(* get the relation *)
2)	  with curToken do
2)	   if (ttype = reswdtype) and (rtype = optype) and (op <= sgtop) then
2)	     relParse := op
2)	    else
2)	     begin
2)	     pp20L(' Need a relational o',20); pp20('perator here        ',12); ppLine;
2)	     backup := true;
2)	     relParse := seqop;
2)	     end;
2)	  end;
2)	 begin
2)	 eGetToken;
2)	 if n = nil then cl := newNode else cl := n;
2)	 with curToken do
2)	  begin
2)	  if (ttype = identtype) then b := id↑.name↑.ch = 'SPEED_FACT' else b := false;
2)	  if b then
2)	    begin
2)	    with cl↑ do
2)	     begin
2)	     ntype := sfacnode;
2)	     dummyrel := relParse;		(* skip over the "=" *)
2)	     clval := checkArg(eExprParse,svaltype);
2)	     eDimCheck(clval,nodim↑.dim);
2)	     end;
2)	    end
2)	  else if (ttype <> reswdtype) or (rtype <> clsetype) then
2)	    begin
2)	    if n = nil then begin relNode(cl); cl := nil; end;
2)	    backup := true;
2)	    pp20L(' Not a valid clause ',19); ppLine;
2)	    end
2)	   else
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 49,43

2)	    begin
2)	    with cl↑ do
2)	     case clause of
2)	 durationtype:
2)		begin
2)		ntype := durnode;
2)		durrel := relParse;
2)		durval := checkArg(eExprParse,svaltype);
2)		eDimCheck(durval,timedim↑.dim);
2)		end;
***************


**** File 1) EDIT.PAS[AL,HE]/49P/153L
1)		clval := checkArg(exprParse,svaltype);
1)		dimCheck(clval,vdim);
1)		end;
1)	 fliptype,
1)	 nullingtype:
1)		begin
1)		if clause = fliptype then ntype := flipnode else ntype := nullingnode;
1)		notp := false;
1)		end;
1)	elbowtype:
1)		begin
1)		ntype := elbownode;
1)		getToken;				(* see if it's UP or DOWN *)
1)		if (ttype <> reswdtype) or (rtype <> filtype) or
1)		   ((filler <> uptype) and (filler <> downtype)) then
1)		  begin
1)		  pp20L('Expecting "UP" or "D',20); pp10('OWN" here ',9); errprnt;
1)		  backup := true;
1)		  end;
1)		notp := filler = uptype;
1)		end;
1)	 lineartype,
1)	 jointspacetype:
1)		begin
1)		ntype := linearnode;
1)		if clause = lineartype then notp := true else notp := false;
1)		getToken;				(* get MOTION token *)
1)		if (ttype <> reswdtype) or (rtype <> filtype) or
1)		   (filler <> motiontype) then
1)		  begin
1)		  pp20L('Expecting "MOTION" h',20); pp5('ere  ',3); errprnt;
1)		  backup := true;
1)		  end;
1)		end;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 49,43

**** File 2) EDIT.PAS[EAL,HE]/43P/103L
2)		clval := checkArg(eExprParse,svaltype);
2)		eDimCheck(clval,vdim);
2)		end;
2)	 nullingtype,
2)	 nonullingtype:
2)		begin
2)		ntype := nullingnode;
2)		if clause = nonullingtype then notp := true else notp := false;
2)		end;
***************


**** File 1) EDIT.PAS[AL,HE]/49P/198L
1)		getToken;			(* check for NILDEPROACH *)
1)		if (ttype = reswdtype) and
1)		   (rtype = clsetype) and (clause = nildeproachtype) then loc := nil
1)		 else
1)		  begin				(* need to get deproach value *)
1)		  backup := true;
1)		  loc := exprParse;		(* can be scalar, vector or trans *)
1)		  dimCheck(loc,distancedim↑.dim);
1)		  end;
**** File 2) EDIT.PAS[EAL,HE]/43P/123L
2)		eGetToken;			(* check for NILDEPROACH *)
2)		if (ttype = reswdtype) and
2)		   (rtype = clsetype) and (clause = nildeproachtype) then loc := nil
2)		 else
2)		  begin				(* need to get deproach value *)
2)		  backup := true;
2)		  loc := eExprParse;		(* can be scalar, vector or trans *)
2)		  eDimCheck(loc,distancedim↑.dim);
2)		  end;
***************


**** File 1) EDIT.PAS[AL,HE]/49P/213L
1)		getToken;
1)		if (ttype = reswdtype) and (rtype = optype) and
1)		   (curToken.op = notop) then
1)		  begin
1)		  notp := true;
1)		  getToken;
1)		  end
**** File 2) EDIT.PAS[EAL,HE]/43P/138L
2)		eGetToken;
2)		if (ttype = reswdtype) and (rtype = optype) and
2)		   (curToken.op = notop) then
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 49,43

2)		  begin
2)		  notp := true;
2)		  eGetToken;
2)		  end
***************


**** File 1) EDIT.PAS[AL,HE]/49P/225L
1)		  pp20L(' Garbage clause     ',15); errprnt;
1)		  end
**** File 2) EDIT.PAS[EAL,HE]/43P/150L
2)		  pp20L(' Garbage clause     ',15); ppLine;
2)		  end
***************


**** File 1) EDIT.PAS[AL,HE]/49P/232L
1)		ff := checkArg(exprParse,transtype);
1)		dimCheck(ff,distancedim↑.dim);
1)		getToken;
1)		csys := getcsys(true);		(* use WORLD as default coord sys *)
1)		end;
**** File 2) EDIT.PAS[EAL,HE]/43P/157L
2)		ff := checkArg(eExprParse,transtype);
2)		eDimCheck(ff,distancedim↑.dim);
2)		csys := true;		(* assume WORLD if not specified *)
2)		eGetToken;
2)		if (ttype = reswdtype) and (rtype = filtype) and (filler = intype) then
2)		  begin			(* see whether WORLD or HAND coord sys *)
2)		  eGetToken;
2)		  if (ttype = reswdtype) and (rtype = filtype) and
2)		     (filler = handtype) then csys := false	(* use HAND coords *)
2)		  else if (ttype <> reswdtype) or (rtype <> filtype) or
2)			  (filler <> worldtype) then	(* better be WORLD coords *)
2)		   begin
2)		   backup := true;
2)		   pp20L(' Need HAND or WORLD ',20); pp5('here ',4); ppLine;
2)		   end
2)		  end
2)		 else backup := true;
2)		end;
***************


**** File 1) EDIT.PAS[AL,HE]/49P/248L
1)		getToken;
1)		if (ttype = delimtype) and (ch = '(') then	(* short form *)
1)		  begin
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 49,43

1)		  b := true;
1)		  fvec := checkArg(exprParse,vectype);
1)		  getDelim(')');				(* get closing ")" *)
1)		  getToken;
1)		  end
**** File 2) EDIT.PAS[EAL,HE]/43P/186L
2)		eGetToken;
2)		if (ttype = delimtype) and (ch = '(') then	(* short form *)
2)		  begin
2)		  b := true;
2)		  fvec := checkArg(eExprParse,vectype);
2)		  eGetDelim(')');				(* get closing ")" *)
2)		  eGetToken;
2)		  end
***************


**** File 1) EDIT.PAS[AL,HE]/49P/263L
1)		    pp20L(' Need closing "|" he',20); pp5('re   ',2); errprnt;
1)		    end;
1)		  end
1)		 else backup := true;
1)		frel := relparse;
1)		fval := checkArg(exprParse,svaltype);
1)		dimCheck(fval,vdim);
1)		i := cursor;
1)		bp := true;
1)		while (i > 2) and bp do
1)		 with cursorStack[i] do
1)		  if stmntp and (movetype <= st↑.stype) and (st↑.stype <= floattype)
1)		   then bp := false else i := i - 1;
**** File 2) EDIT.PAS[EAL,HE]/43P/201L
2)		    pp20L(' Need closing "|" he',20); pp5('re   ',2); ppLine;
2)		    end;
2)		  end
2)		 else backup := true;
2)		frel := relparse;
2)		fval := checkArg(eExprParse,svaltype);
2)		eDimCheck(fval,vdim);
2)		i := cursor;
2)		bp := true;
2)		while (i > 2) and bp do
2)		 with cursorStack[i] do
2)		  if stmntp and (movetype <= st↑.stype) and (st↑.stype <= centertype)
2)		   then bp := false else i := i - 1;
***************


  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 49,43

**** File 1) EDIT.PAS[AL,HE]/49P/284L
1)		  getToken;
1)		  if (ttype <> reswdtype) or (rtype <> filtype) or
**** File 2) EDIT.PAS[EAL,HE]/43P/222L
2)		  eGetToken;
2)		  if (ttype <> reswdtype) or (rtype <> filtype) or
***************


**** File 1) EDIT.PAS[AL,HE]/49P/291L
1)		  fvec := checkArg(exprParse,vectype);
1)		  end;
1)		getToken;				(* check for force frame *)
1)		backup := true;
1)		if (ttype = reswdtype) and (rtype = filtype) and (filler = oftype) then
1)		  begin
1)		  rtype := clsetype;	(* make curToken look like forceframe clause *)
1)		  clause := forceframetype;
1)		  fframe := clauseParse(nil,true);
1)		  end
**** File 2) EDIT.PAS[EAL,HE]/43P/229L
2)		  fvec := checkArg(eExprParse,vectype);
2)		  end;
2)		eGetToken;				(* check for force frame *)
2)		backup := true;
2)		if (ttype = reswdtype) and (rtype = filtype) and (filler = oftype) then
2)		  begin
2)		  rtype := clsetype;	(* make curToken look like forceframe clause *)
2)		  clause := forceframetype;
2)		  fframe := eClauseParse(nil,true);
2)		  end
***************


**** File 1) EDIT.PAS[AL,HE]/49P/307L
1)		getDelim('(');			(* now look for the "(" *)
1)		fv := exprParse;		(* get the first stiffness component *)
1)		if getDtype(fv) = svaltype then (* see if it's 6 scalars or 2 vectors *)
**** File 2) EDIT.PAS[EAL,HE]/43P/245L
2)		eGetDelim('(');			(* now look for the "(" *)
2)		fv := eExprParse;		(* get the first stiffness component *)
2)		if getDtype(fv) = svaltype then (* see if it's 6 scalars or 2 vectors *)
***************


**** File 1) EDIT.PAS[AL,HE]/49P/317L
1)		    if i = 2 then arg1 := checkArg(exprParse,svaltype)
1)		     else arg1 := cl↑.fv;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 49,43

1)		    getDelim(',');
1)		    arg2 := checkArg(exprParse,svaltype);
1)		    getDelim(',');
1)		    arg3 := checkArg(exprParse,svaltype);
1)		    end;
1)		   if i = 1 then begin fv := nv; getDelim(',') end else mv := nv;
1)		   end
1)		 else
1)		  begin				(* two vectors *)
1)		  fv := checkArg(fv,vectype);
1)		  getDelim(',');		(* now look for the separating "," *)
1)		  mv := checkArg(exprParse,vectype);
1)		  end;
1)		dimCheck(fv,fvstiffdim);
1)		dimCheck(mv,mvstiffdim);
1)		getDelim(')');			(* now look for the ")" *)
1)		getToken;			(* is a center of compliance given? *)
1)		backup := true;
1)		if (ttype = reswdtype) and (rtype = filtype) and (filler = abouttype) then
1)		  begin
1)		  rtype := clsetype;	(* make curToken look like forceframe clause *)
1)		  clause := forceframetype;
1)		  cocff := clauseParse(nil,true);
1)		  end
1)		 else cocff := nil;
1)		end;
1)	 gathertype:
1)		begin
1)		ntype := gathernode;
1)		dummyrel := relParse;		(* skip over the "=" *)
1)		getDelim('(');			(* now look for the "(" *)
1)		gbits := 0;
1)		repeat
1)		 bits := 0;
1)		 getToken;				(* get component to gather *)
1)		 if ttype = identtype then
1)		   if id↑.length = 2 then
1)		     with id↑.name↑ do
1)		      begin
1)		      if (ch[1] = 'F') or (ch[1] = 'M') then
1)			begin
1)			if ('X' <= ch[2]) and (ch[2] <= 'Z') then
1)		          begin
1)			  case ch[2] of
1)		      'X': bits := 1;		(* fx = 1B   mx = 10B *)
1)		      'Y': bits := 2;		(* fy = 2B   my = 20B *)
1)		      'Z': bits := 4;		(* fz = 4B   mz = 40B *)
1)			   end;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 49,43

1)			  if ch[1] = 'M' then bits := bits * 8;
1)			  end
1)			end
1)		       else if (ch[1] = 'T') and ('1' <= ch[2]) and (ch[2] <= '6') then
1)		 	case ch[2] of
1)		    '1': bits := (*100B *) 64;
1)		    '2': bits := (*200B *) 128;
1)		    '3': bits := (*400B *) 256;
1)		    '4': bits := (*1000B*) 512;
1)		    '5': bits := (*2000B*) 1024;
1)		    '6': bits := (*4000B*) 2048;
1)			 end;
1)		      end
1)		    else if id↑.name↑.ch = 'TBL       ' then bits := (*10000B*) 4096;
1)		 b := bits = 0;			(* bad clause *)
1)		 gbits := gbits + bits;		(* really need to logically OR these *)
1)		 if b then
1)		   begin
1)		   pp20L(' Expecting a force c',20); pp20('omponent here       ',13);
1)		   errprnt;
1)		   if ttype = identtype then getToken;	(* skip past bad identifier *)
1)		   end
1)		  else getToken;			(* pick up the "," or ")" *)
1)		 until (ttype <> identtype) and ((ttype <> delimtype) or (ch <> ','));
1)		backup := true;
1)		getDelim(')');			(* now look for the ")" *)
1)		end;
1)	 loadtype:
1)		begin
1)		ntype := loadnode;
1)		dummyrel := relParse;		(* skip over the "=" *)
1)		loadval := checkArg(exprParse,svaltype);
1)		dimCheck(loadval,forcedim↑.dim);
1)		getToken;
1)		if (ttype = reswdtype) and (rtype = filtype) and (filler = attype) then
1)		  begin
1)		  loadvec := checkArg(exprParse,vectype);
1)		  getToken;
1)		  end;
1)		lcsys := getcsys(false);		(* default is HAND *)
1)		end;
1)	      end;
1)	  end;
1)	 if badcl then
1)	   begin
1)	   if n = nil then begin relNode(cl); cl := nil; end;
1)	   backup := true;
1)	   pp20L(' Not a valid clause ',19); errprnt;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 49,43

1)	   end;
1)	 clauseParse := cl;
1)	 end;
1)	(* cmonParse *)
1)	procedure cmonParse(st: statementp; getStart: boolean);
1)	 var inMove: boolean; i: integer; t: tokenp;
**** File 2) EDIT.PAS[EAL,HE]/43P/255L
2)		    if i = 2 then arg1 := checkArg(eExprParse,svaltype)
2)		     else arg1 := cl↑.fv;
2)		    eGetDelim(',');
2)		    arg2 := checkArg(eExprParse,svaltype);
2)		    eGetDelim(',');
2)		    arg3 := checkArg(eExprParse,svaltype);
2)		    end;
2)		   if i = 1 then begin fv := nv; eGetDelim(',') end else mv := nv;
2)		   end
2)		 else
2)		  begin				(* two vectors *)
2)		  fv := checkArg(fv,vectype);
2)		  eGetDelim(',');		(* now look for the separating "," *)
2)		  mv := checkArg(eExprParse,vectype);
2)		  end;
2)		eDimCheck(fv,fvstiffdim);
2)		eDimCheck(mv,mvstiffdim);
2)		eGetDelim(')');			(* now look for the ")" *)
2)		eGetToken;			(* is a center of compliance given? *)
2)		if (ttype = reswdtype) and (rtype = filtype) and (filler = abouttype) then
2)		  coc := checkArg(eExprParse,transtype)
2)		  else begin coc := nil; backup := true; end;
2)		end;
2)	 gathertype:
2)		begin
2)		ntype := gathernode;
2)		dummyrel := relParse;		(* skip over the "=" *)
2)		eGetDelim('(');			(* now look for the "(" *)
2)		b := false;
2)		gbits := 0;
2)		repeat
2)		 bits := 0;
2)		 eGetToken;				(* get component to gather *)
2)		 if (ttype <> reswdtype) or (rtype <> clsetype) then b := true
2)		  else
2)		   case clause of
2)	    fxtype:  bits := 1B;
2)	    fytype:  bits := 2B;
2)	    fztype:  bits := 4B;
2)	    mxtype:  bits := 10B;
2)	    mytype:  bits := 20B;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 49,43

2)	    mztype:  bits := 40B;
2)	    t1type:  bits := 100B;
2)	    t2type:  bits := 200B;
2)	    t3type:  bits := 400B;
2)	    t4type:  bits := 1000B;
2)	    t5type:  bits := 2000B;
2)	    t6type:  bits := 4000B;
2)	    tbltype: bits := 10000B;
2)		  end;
2)		 if bits = 0 then b := true;	(* bad clause *)
2)		 gbits := gbits + bits;		(* really need to logically OR these *)
2)		 if b then
2)		   begin
2)		   pp20L(' Expecting a force c',20); pp20('omponent here       ',13);
2)		   ppLine;
2)		   end
2)		  else eGetToken;			(* pick up the "," or ")" *)
2)		 until (ttype <> delimtype) or (ch <> ',') or b;
2)		backup := true;
2)		eGetDelim(')');			(* now look for the ")" *)
2)		end;
2)	      end;
2)	    end;
2)	  end;
2)	 eClauseParse := cl;
2)	 end;
2)	(* eCmonParse *)
2)	procedure eCmonParse(st: statementp; getStart: boolean);
2)	 var inMove: boolean; i: integer; t: tokenp;
***************


**** File 1) EDIT.PAS[AL,HE]/50P/24L
1)	  getToken;				(* see what sort of cmon we are now *)
1)	  if getStart then
**** File 2) EDIT.PAS[EAL,HE]/44P/24L
2)	  eGetToken;				(* see what sort of cmon we are now *)
2)	  if getStart then
***************


**** File 1) EDIT.PAS[AL,HE]/50P/31L
1)	      getToken;
1)	      end;
1)	    if (ttype <> reswdtype) or (rtype <> stmnttype) or (stmnt <> cmtype) then
1)	      begin
1)	      pp20L(' Expecting an "ON" h',20); pp5('ere  ',3); errprnt;
1)	      end
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 50,44

1)	     else getToken;
1)	    end;
**** File 2) EDIT.PAS[EAL,HE]/44P/31L
2)	      eGetToken;
2)	      end;
2)	    if (ttype <> reswdtype) or (rtype <> stmnttype) or (stmnt <> cmtype) then
2)	      begin
2)	      pp20L(' Expecting an "ON" h',20); pp5('ere  ',3); ppLine;
2)	      end
2)	     else eGetToken;
2)	    end;
***************


**** File 1) EDIT.PAS[AL,HE]/50P/44L
1)	      oncond := clauseParse(nil,false);
1)	      end
**** File 2) EDIT.PAS[EAL,HE]/44P/44L
2)	      oncond := eClauseParse(nil,false);
2)	      end
***************


**** File 1) EDIT.PAS[AL,HE]/50P/55L
1)		   evar := makeNVar(eventtype,nil);
1)		   makeNewVar(evar);  (* if active block deal with environment entry *)
1)		   end
**** File 2) EDIT.PAS[EAL,HE]/44P/55L
2)		   evar := eMakeVar(eventtype,nil);
2)		   end
***************


**** File 1) EDIT.PAS[AL,HE]/50P/63L
1)		pp20L('Must be part of MOVE',20); pp10(' statement',10); errprnt;
1)		end;
**** File 2) EDIT.PAS[EAL,HE]/44P/62L
2)		pp20L('Must be part of MOVE',20); pp10(' statement',10); ppLine;
2)		end;
***************


**** File 1) EDIT.PAS[AL,HE]/50P/72L
1)	       getToken;			(* skip over the "=" *)
1)	       eexpr := exprParse;		(* get desired error bits *)
1)	       dimCheck(eexpr,nodim↑.dim);
1)	       end;
1)	      if not inMove then
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 50,44

1)		begin				(* no good *)
1)		pp20L('Must be part of MOVE',20); pp10(' statement',10); errprnt;
1)		end
**** File 2) EDIT.PAS[EAL,HE]/44P/71L
2)	       eGetToken;			(* skip over the "=" *)
2)	       eexpr := eExprParse;		(* get desired error bits *)
2)	       eDimCheck(eexpr,nodim↑.dim);
2)	       end;
2)	      if not inMove then
2)		begin				(* no good *)
2)		pp20L('Must be part of MOVE',20); pp10(' statement',10); ppLine;
2)		end
***************


**** File 1) EDIT.PAS[AL,HE]/50P/87L
1)	      begin pp20L('Unknown ON condition',20); errprnt end
1)	    end
1)	   else if (ttype = reswdtype) and (rtype = optype) and (op = absop) then
1)	    begin				(* is it |Force...| or |Torque...|? *)
1)	    getToken;				(* see what next token is *)
1)	    backup := true;
1)	    if (ttype = reswdtype) and (rtype = clsetype) and
1)	       ((clause = forcetype) or (clause = torquetype)) then
1)	      oncond := clauseParse(nil,true)	(* yes - |Force/Torque...| cmon *)
1)	     else
1)	      begin					(* no - expression cmon *)
1)	      exprCm := true;
1)	      t := copyToken;		(* make a copy of token we just peeked at *)
1)	      next := t;		(* fix things up so the peeked at token is next *)
**** File 2) EDIT.PAS[EAL,HE]/44P/86L
2)	      begin pp20L('Unknown ON condition',20); ppLine end
2)	    end
2)	   else if (ttype = reswdtype) and (rtype = optype) and (op = absop) then
2)	    begin				(* is it |Force...| or |Torque...|? *)
2)	    eGetToken;				(* see what next token is *)
2)	    backup := true;
2)	    if (ttype = reswdtype) and (rtype = clsetype) and
2)	       ((clause = forcetype) or (clause = torquetype)) then
2)	      oncond := eClauseParse(nil,true)	(* yes - |Force/Torque...| cmon *)
2)	     else
2)	      begin					(* no - expression cmon *)
2)	      exprCm := true;
2)	      t := eCopyToken;		(* make a copy of token we just peeked at *)
2)	      next := t;		(* fix things up so the peeked at token is next *)
***************


  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 50,44

**** File 1) EDIT.PAS[AL,HE]/50P/110L
1)	      oncond := exprParse;		(* get expression for cmon *)
1)	      relToken(t);			(* done with peeked at token now *)
**** File 2) EDIT.PAS[EAL,HE]/44P/109L
2)	      oncond := eExprParse;		(* get expression for cmon *)
2)	      relToken(t);			(* done with peeked at token now *)
***************


**** File 1) EDIT.PAS[AL,HE]/50P/117L
1)	    oncond := exprParse;		(* get the cmon condition *)
1)	    if getDtype(oncond) <> eventtype then exprCm := true;
**** File 2) EDIT.PAS[EAL,HE]/44P/116L
2)	    oncond := eExprParse;		(* get the cmon condition *)
2)	    if getDtype(oncond) <> eventtype then exprCm := true;
***************


**** File 1) EDIT.PAS[AL,HE]/50P/125L
1)		pp10('tement    ',6); errprnt;
1)	      relExpr(oncond);
**** File 2) EDIT.PAS[EAL,HE]/44P/124L
2)		pp10('tement    ',6); ppLine;
2)	      relExpr(oncond);
***************


**** File 1) EDIT.PAS[AL,HE]/51P/1L
1)	(* moveParse *)
1)	procedure moveParse(st: statementp; bp: boolean);
1)	 var b,movep,jointp,operatep,centerp,openp,floatp: boolean; dest: nodep;
1)	 begin
1)	 with st↑ do
1)	  begin
1)	  movep := stype = movetype;
1)	  jointp := stype = jtmovetype;
1)	  operatep := stype = operatetype;
1)	  centerp := stype = centertype;
1)	  floatp := stype = floattype;
1)	  openp := (stype = opentype) or (stype = closetype);
1)	  cf := exprParse;			(* what are we moving *)
1)	  if movep and (cf <> nil) then
1)	    if (cf↑.ntype = exprnode) and (cf↑.op = jointop) then
1)	      begin movep := false; jointp := true; stype := jtmovetype end;
1)	  if movep or centerp or floatp then 
1)	    cf := checkArg(cf,frametype)
1)	   else cf := checkArg(cf,svaltype);
1)	  with cf↑ do					(* make sure it's a variable *)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 51,45

1)	   begin
1)	   if jointp and ((ntype <> exprnode) or (op <> jointop)) then
1)	     begin movep := true; jointp := false; stype := movetype end;
1)	   b := (ntype <> leafnode) or (ltype <> varitype);
1)	   if b then b := (ntype <> exprnode) or ((op <> arefop) and (op <> jointop));
1)	   if not b then			(* ok so far, check some more *)
1)	    if centerp then
1)	     begin					(* check for arms *)
1)	     if ntype <> leafnode then b := true
1)	      else b := (vari↑.level <> 0) or not (vari↑.offset in [0,4,8]);
1)		(* offsets: 0=barm, 4=garm, 8=rarm *)
1)	     end
1)	    else if operatep then
1)	     begin					(* check for driver *)
1)	     if ntype <> leafnode then b := true
1)	      else b := (vari↑.level <> 0) or (vari↑.offset <> 12);
1)		(* offset: 12=driver *)
1)	     end
1)	    else if openp then
1)	     begin					(* check for scalar devices *)
1)	     if ntype <> leafnode then b := true
1)	      else b := (vari↑.level <> 0) or not (vari↑.offset in [2,6,10,16]);
1)		(* offsets: 2=bhand, 6=ghand, 10=rhand, 16=vise *)
1)	     end;
1)	   end;
1)	  if b then
1)	    begin
1)	    pp20L(' Need a device varia',20); pp10('ble here  ',8); errprnt;
1)	    bad := true;			(* mark statement as bad *)
1)	    end
1)	   else
1)	    bad := false;				(* statement is ok *)
1)	  getToken;					(* see if there's a TO clause *)
1)	  if movep or jointp or openp then
1)	    begin					(* deal with possible dest *)
1)	    dest := clauses;
1)	    if dest <> nil then
1)	      begin
1)	      with dest↑ do
1)	       if (ntype = ffnode) and pdef then dest := next;
1)	      if dest↑.ntype <> destnode then dest := nil
1)	       else relExpr(dest↑.loc);
1)	      end;
1)	    with curToken do
1)	     begin
1)	     if (ttype = reswdtype) and (rtype = filtype) and (filler = totype) then
1)	       begin					(* get destination *)
1)	       if dest = nil then
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 51,45

1)		 begin				(* make a new destination node *)
1)		 dest := newNode;
1)		 with dest↑ do
1)		  begin
1)		  ntype := destnode;
1)		  code := nil;
1)		  next := clauses;			(* splice us into clause list *)
1)		  clauses := dest;
1)		  end;
1)		 end;
1)	       with dest↑ do
1)		begin
1)		if movep then loc := checkArg(exprParse,transtype)
1)		 else loc := checkArg(exprParse,svaltype);
1)		if not jointp then dimCheck(loc,distancedim↑.dim)
1)		 else dimCheck(loc,angledim↑.dim);
1)		getToken;			(* see if anything else on line *)
1)		end
1)	       end
1)	      else
1)	       if dest <> nil then		(* delete old destination clause *)
1)		 begin 
1)		 if clauses = dest then clauses := dest↑.next
1)		  else clauses↑.next := dest↑.next;	(* system created ffnode *)
1)		 relNode(dest);
1)		 end;
1)	     end;
1)	    end;
1)	  backup := true;
1)	  with curToken do
1)	   if not (bp or endOfLine or ((ttype = delimtype) and (ch = ';'))) then
1)	     begin
1)	     pp20L('Sorry, can''t deal wi',20); pp20('th last part of line',20); errprnt;
1)	     (* *** maybe instead should call addstmnt here??? *** *)
1)	     end;
1)	  end;
1)	 moveOrder(st);
1)	 end;
1)	(* mClauseParse *)
1)	procedure mClauseParse(n: nodep);
1)	 var np,no,oldVClauses: nodep; strp: strngp; b,movep,jointp: boolean;
1)	     oldVcode: statementp; pttype: nodetypes;
1)	 begin				(* dest, via, with *)
1)	 with cursorStack[cursor-1].st↑ do
1)	  begin
1)	  movep := stype = movetype;
1)	  jointp := stype = jtmovetype;
1)	  end;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 51,45

1)	 with n↑ do
1)	  if ntype = destnode then
1)	    begin
1)	    relExpr(loc);
1)	    if movep then loc := checkArg(exprParse,transtype)
1)	     else loc := checkArg(exprParse,svaltype);
1)	    if jointp then dimCheck(loc,angledim↑.dim)
1)	     else dimCheck(loc,distancedim↑.dim);
1)	    end
1)	   else if (ntype = viaptnode) or (ntype = byptnode) then
1)	    begin	(* ** maybe should check that this is a MOVE stmnt ?? ** *)
1)	    pttype := n↑.ntype;			(* remember if it's a VIA or BY *)
1)	    np := n;
1)	    oldVClauses := nil;
1)	    oldVcode := nil;
**** File 2) EDIT.PAS[EAL,HE]/45P/1L
2)	(* eMoveParse *)
2)	procedure eMoveParse(st: statementp; bp: boolean);
2)	 var b,movep,operatep,centerp,openp: boolean; dest: nodep;
2)	 begin
2)	 with st↑ do
2)	  begin
2)	  movep := false;
2)	  operatep := false;
2)	  centerp := false;
2)	  openp := false;
2)	  if stype = movetype then movep := true
2)	   else if stype = operatetype then operatep := true
2)	   else if stype = centertype then centerp := true
2)	   else openp := true;
2)	  if movep or centerp then 			(* what are we moving *)
2)	    cf := checkArg(eExprParse,frametype)
2)	   else cf := checkArg(eExprParse,svaltype);
2)	  with cf↑ do					(* make sure it's a variable *)
2)	   begin
2)	   b := (ntype <> leafnode) or (ltype <> varitype);
2)	   if b then b := (ntype <> exprnode) or (op <> arefop);
2)	   if not b then			(* ok so far, check some more *)
2)	    if centerp then
2)	     begin					(* check for arms *)
2)	     if ntype <> leafnode then b := true
2)	      else b := (vari↑.level <> 0) or not (vari↑.offset in [0,4,8,12]);
2)		(* offsets: 0=barm, 4=yarm, 8=garm, 12=rarm *)
2)	     end
2)	    else if operatep then
2)	     begin					(* check for driver *)
2)	     if ntype <> leafnode then b := true
2)	      else b := (vari↑.level <> 0) or (vari↑.offset <> 16);
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 51,45

2)		(* offset: 16=driver *)
2)	     end
2)	    else if openp then
2)	     begin					(* check for scalar devices *)
2)	     if ntype <> leafnode then b := true
2)	      else b := (vari↑.level <> 0) or not (vari↑.offset in [2,6,10,14,20]);
2)		(* offsets: 2=bhand, 6=yhand, 10=ghand, 14=rhand, 20=vise *)
2)	     end;
2)	   end;
2)	  if b then
2)	    begin
2)	    pp20L(' Need a device varia',20); pp10('ble here  ',8); ppLine;
2)	(* *** mark motion statement bad ??? *** *)
2)	    end;
2)	  if clauses = nil then dest := nil
2)	   else if clauses↑.ntype <> destnode then dest := nil
2)	   else begin dest := clauses; relExpr(dest↑.loc) end;
2)	  eGetToken;				(* see if there's a TO clause *)
2)	  with curToken do
2)	   begin
2)	   if (ttype = reswdtype) and (rtype = filtype) and (filler = totype) then
2)	     begin					(* get destination *)
2)	     if dest = nil then
2)	       begin				(* make a new destination node *)
2)	       dest := newNode;
2)	       with dest↑ do
2)		begin
2)		ntype := destnode;
2)		code := nil;
2)		next := clauses;			(* splice us into clause list *)
2)		clauses := dest;
2)		end;
2)	       end;
2)	     with dest↑ do
2)	      begin
2)	      if movep then loc := checkArg(eExprParse,transtype)
2)	       else loc := checkArg(eExprParse,svaltype);
2)	      eDimCheck(loc,distancedim↑.dim);
2)	      eGetToken;			(* see if anything else on line *)
2)	      end
2)	     end
2)	    else
2)	     if dest <> nil then		(* delete old destination clause *)
2)	       begin 
2)	       clauses := dest↑.next;
2)	       relNode(dest);
2)	       end;
2)	   backup := true;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 51,45

2)	   if not (bp or endOfLine or ((ttype = delimtype) and (ch = ';'))) then
2)	     begin
2)	     pp20L('Sorry, can''t deal wi',20); pp20('th last part of line',20); ppLine;
2)	     (* *** maybe instead should call addstmnt here??? *** *)
2)	     end;
2)	   end;
2)	  end;
2)	 moveOrder(st);
2)	 end;
2)	(* eMClauseParse *)
2)	procedure eMClauseParse(n: nodep);
2)	 var np,no: nodep; strp: strngp; b: boolean; oldVcode: statementp;
2)	 begin				(* dest, via, with *)
2)	 with n↑ do
2)	  if ntype = destnode then
2)	    begin
2)	    relExpr(loc);
2)	    if cursorStack[cursor-1].st↑.stype = movetype then
2)	      loc := checkArg(eExprParse,transtype)
2)	     else loc := checkArg(eExprParse,svaltype);
2)	    eDimCheck(loc,distancedim↑.dim);
2)	    end
2)	   else if ntype = viaptnode then
2)	    begin	(* ** maybe should check that this is a MOVE stmnt ?? ** *)
2)	    np := n;
2)	    oldVcode := nil;
***************


**** File 1) EDIT.PAS[AL,HE]/52P/32L
1)	      if vclauses <> nil then oldVClauses := vclauses;	(* remember WHERE's *)
1)	      if vcode <> nil then oldVcode := vcode;	(* also remember old code *)
1)	      np := next;
1)	      end;
1)	     if np <> nil then
1)	       if (np↑.ntype <> pttype) or (not np↑.vlist) then np := nil;
1)	     end;
1)	    with curToken do
1)	     repeat
1)	      with n↑ do
1)	       begin
1)	       if jointp then via := checkArg(exprParse,svaltype)
1)	        else if ntype = viaptnode then via := checkArg(exprParse,transtype)
1)		else if movep then
1)		 begin
1)		 via := exprParse;
1)		 if getdtype(via) <> vectype then via := checkArg(via,transtype);
1)		 end
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 52,46

1)		else via := checkArg(exprParse,svaltype);
1)	       if jointp then dimCheck(via,angledim↑.dim)
1)		else dimCheck(via,distancedim↑.dim);
1)	       vclauses := nil;
1)	       vcode := nil;
1)	       getToken;
1)	       end;
1)	      if (ttype = delimtype) and (ch = ',') then
1)		begin			(* need to add a new via point *)
1)		if n↑.next = nil then b := true
1)		 else b := (n↑.next↑.ntype <> pttype) or (not n↑.next↑.vlist);
1)	        if b then
1)		  begin			(* make up a new node *)
1)		  np := newNode;
1)		  with np↑ do
1)		   begin
1)		   ntype := pttype;		(* VIA or BY point *)
1)		   next := n↑.next;
**** File 2) EDIT.PAS[EAL,HE]/46P/24L
2)	      relExpr(duration);
2)	      relExpr(velocity);
2)	      if vcode <> nil then oldVcode := vcode;	(* need to remember old code *)
2)	      np := next;
2)	      end;
2)	     if np <> nil then
2)	       if (np↑.ntype <> viaptnode) or (not np↑.vlist) then np := nil;
2)	     end;
2)	    with curToken do
2)	     repeat
2)	      with n↑ do
2)	       begin
2)	       via := checkArg(eExprParse,transtype);
2)	       eDimCheck(via,distancedim↑.dim);
2)	       velocity := nil;
2)	       duration := nil;
2)	       vcode := nil;
2)	       eGetToken;
2)	       if (ttype = reswdtype) and
2)		  (rtype = filtype) and (filler = wheretype) then
2)		 begin
2)		 b := true;
2)		 while b do
2)		  begin				(* look for velocity & duration specs *)
2)		  eGetToken;
2)		  if (ttype = reswdtype) and
2)		     (rtype = clsetype) and (clause = velocitytype) then
2)		    begin
2)		    eGetToken;			(* skip over the '=' *)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 52,46

2)		    velocity := checkArg(eExprParse,vectype);
2)		    eDimCheck(velocity,veldim↑.dim);
2)		    end
2)		  else if (ttype = reswdtype) and
2)			  (rtype = clsetype) and (clause = durationtype) then
2)		    begin
2)		    backup := true;
2)		    duration := eClauseParse(nil,false); (* go get the duration spec *)
2)		    end
2)		  else if (ttype <> delimtype) or (ch <> ',') then
2)		    begin backup := true; b := false; end;
2)		  end;
2)		 end;
2)	       end;
2)	      if (ttype = delimtype) and (ch = ',') then
2)		begin			(* need to add a new via point *)
2)		if n↑.next = nil then b := true
2)		 else b := (n↑.next↑.ntype <> viaptnode) or (not n↑.next↑.vlist);
2)	        if b then
2)		  begin			(* make up a new node *)
2)		  np := newNode;
2)		  with np↑ do
2)		   begin
2)		   ntype := viaptnode;
2)		   next := n↑.next;
***************


**** File 1) EDIT.PAS[AL,HE]/52P/73L
1)		 else n := n↑.next;	(* just re-use next VIA/BY list node *)
1)		b := false;
1)	        end
1)	       else b := true;
1)	     until b;
1)	    n↑.vclauses := oldVClauses;	(* keep tabs on associated WHERE clauses *)
1)	    n↑.vcode := oldVcode;	(*  and also on any associated code *)
1)	    np := n↑.next;
1)	    while np <> nil do		(* flush any extra VIA/BY list nodes *)
1)	     with np↑ do
1)	      if (ntype = pttype) and vlist then
1)	        begin no := np; np := next; relNode(no); n↑.next := np end
1)	       else np := nil;
1)	    backup := true;
1)	    end
**** File 2) EDIT.PAS[EAL,HE]/46P/83L
2)		 else n := n↑.next;	(* just re-use next via list node *)
2)		b := false;
2)	        end
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 52,46

2)	       else b := true;
2)	     until b;
2)	    n↑.vcode := oldVcode;	(* keep tabs on associated code *)
2)	    np := n↑.next;
2)	    while np <> nil do		(* flush any extra via list nodes *)
2)	     with np↑ do
2)	      if (ntype = viaptnode) and vlist then
2)	        begin no := np; np := next; relNode(no); n↑.next := np end
2)	       else np := nil;
2)	    end
***************


**** File 1) EDIT.PAS[AL,HE]/52P/95L
1)	    getToken;			(* get the comment *)
1)	    flushComments := true;
**** File 2) EDIT.PAS[EAL,HE]/46P/103L
2)	    eGetToken;			(* get the comment *)
2)	    flushComments := true;
***************


**** File 1) EDIT.PAS[AL,HE]/52P/106L
1)	velocitynode,
1)	sfacnode,
1)	wobblenode,
1)	swtnode:	relExpr(clval);
1)	ffnode:		relExpr(ff);
1)	forcenode:	begin relExpr(fval); relExpr(fvec); relExpr(fframe); end;
1)	stiffnode:	begin relExpr(fv); relExpr(mv); relExpr(cocff); end;
1)	others:		begin end;		(* nothing to do *)
1)	     end;
1)	    np := clauseParse(n,false);
1)	    end;
1)	 moveOrder(cursorStack[cursor-1].st);
1)	 end;
1)	(* stopParse *)
1)	procedure stopParse(st: statementp);
1)	 var d: datatypes; b: boolean; i: integer;
1)	 procedure complain;
1)	  begin					(* no good *)
1)	  pp20L(' Need a device varia',20); pp10('ble here  ',8); errprnt;
1)	  end;
1)	 begin					(* stop & setbase statements *)
1)	 with st↑ do
1)	  begin
1)	  b := true;
1)	  clauses := nil;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 52,46

1)	  cf := exprParse;			(* what are we stopping? *)
1)	  if cf = nil then	(* use default = cf of current motion (if any) *)
1)	    if stype = setbasetype then complain
1)	     else
1)	      begin
1)	      i := cursor;
1)	      while (i > 1) and b do
1)	       with cursorStack[i] do
1)		if stmntp and (movetype <= st↑.stype) and (st↑.stype <= floattype) then
1)		  b := false else i := i - 1;
1)	      if b then
1)		begin
1)		pp20L(' Need to specify wha',20); pp10('t to Stop ',9); errprnt;
1)		end
1)	      end
1)	   else
**** File 2) EDIT.PAS[EAL,HE]/46P/114L
2)	sfacnode,
2)	wobblenode,
2)	swtnode:	relExpr(clval);
2)	ffnode:		relExpr(ff);
2)	forcenode:	begin relExpr(fval); relExpr(fvec); relExpr(fframe); end;
2)	stiffnode:	begin relExpr(fv); relExpr(mv); relExpr(coc); end;
2)	     end;
2)	    np := eClauseParse(n,false);
2)	    end;
2)	 moveOrder(cursorStack[cursor-1].st);
2)	 end;
2)	(* eStopParse *)
2)	procedure eStopParse(st: statementp);
2)	 var d: datatypes; b: boolean; i: integer;
2)	 begin					(* stop statement *)
2)	 with st↑ do
2)	  begin
2)	  b := true;
2)	  clauses := nil;
2)	  cf := eExprParse;			(* what are we stopping? *)
2)	  if cf = nil then	(* use default = cf of current motion (if any) *)
2)	    begin
2)	    i := cursor;
2)	    while (i > 1) and b do
2)	     with cursorStack[i] do
2)	      if stmntp and (movetype <= st↑.stype) and (st↑.stype <= centertype) then
2)		b := false else i := i - 1;
2)	    if b then
2)	      begin
2)	      pp20L(' Need to specify wha',20); pp10('t to Stop ',9); ppLine;
2)	      end
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 52,46

2)	    end
2)	   else
***************


**** File 1) EDIT.PAS[AL,HE]/53P/38L
1)		else if stype = setbasetype then b := true (* scalar devs no good for setbase *)
1)		else if (d = svaltype) and (ntype = leafnode) then
1)		 if (vari↑.level = 0) and	(* check for scalar devices *)
1)		    (vari↑.offset in [2,6,10,12,16]) then b := false;
1)		(* offsets: 2=bhand, 6=ghand, 10=rhand, 12=driver, 16=vise *)
1)	    if b then complain;
1)	    end
1)	  end;
1)	 end;
1)	(* returnParse *)
1)	procedure returnParse(st: statementp);
1)	 var n,np: nodep;
1)	 begin
1)	 relExpr(st↑.retval);			(* flush the old expression *)
1)	 st↑.retval := exprParse;		(* parse the modified expression *)
1)	 n := st↑.rproc;			(* find def of procedure we're in *)
1)	 if n = nil then
1)	   begin		(* yow - shouldn't allow a return here *)
1)	   pp20L(' Can''t have a return',20); pp5('here ',4); errprnt;
1)	   end
1)	  else if n↑.pname↑.vtype = nulltype then
1)	   begin			(* procedure doesn't return a result *)
1)	   pp20L(' Procedure doesn''t r',20); pp20('eturn result        ',12); errprnt;
1)	   end
1)	  else if st↑.retval <> nil then
1)	   begin
1)	   st↑.retval := checkArg(st↑.retval,n↑.pname↑.vtype);
1)	   np := nil;
1)	   dimCheck(st↑.retval,getdim(n,np));
1)	   relNode(np);
1)	   end
1)	  else
1)	   begin pp20L(' Need a value to ret',20); pp10('urn with  ',8); errprnt end;
1)	 with st↑ do
1)	  if retval <> nil then exprs := evalOrder(retval,nil,true)
1)	   else exprs := nil;
1)	 end;
1)	(* waitParse & wristParse *)
1)	procedure waitParse(sp: statementp);
1)	 begin
1)	 with sp↑ do
1)	  begin
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 53,47

1)	  event := checkArg(exprParse,eventtype);
1)	  exprs := nil;
1)	  with event↑ do			(* make sure it's a variable *)
1)	   if not (((ntype = leafnode) and (ltype = varitype)) or
1)		   ((ntype = exprnode) and (op = arefop))) then
1)	     begin		(* no good *)
1)	     pp20L(' Need an event varia',20); pp10('ble here  ',8); errprnt;
1)	     relExpr(event);
1)	     event := nil;
1)	     end
1)	    else
1)	     if ntype <> leafnode then exprs := evalOrder(arg2,nil,true);
1)	  end;
1)	 end;
1)	procedure wristParse(st: statementp);
1)	 var b: boolean; n: nodep;
1)	 procedure complain;
1)	   begin
1)	   st↑.bad := true;			(* mark statement as bad *)
1)	   pp20L(' Need variable here ',19); errprnt;
1)	   end;
1)	 begin
1)	 with st↑ do
1)	  begin
1)	  bad := false;				(* assume statement is ok *)
1)	  getDelim('(');
1)	  fvec := checkArg(exprParse,vectype);
1)	  dimCheck(fvec,forcedim↑.dim);
1)	  with fvec↑ do			(* make sure it's a variable *)
1)	   if not (((ntype = exprnode) and (op = arefop)) or
1)		   ((ntype = leafnode) and (ltype = varitype))) then complain;
1)	  getDelim(',');
1)	  tvec := checkArg(exprParse,vectype);
1)	  dimCheck(tvec,torquedim↑.dim);
1)	  with tvec↑ do			(* make sure it's a variable *)
1)	   if not (((ntype = exprnode) and (op = arefop)) or
1)		   ((ntype = leafnode) and (ltype = varitype))) then complain;
1)	  getDelim(')');
1)	  b := false;
1)	  arm := nil;
1)	  ff := nil;
1)	  csys := false;		(* assume hand coords *)
1)	  repeat
1)	   getToken;			(* look for ABOUT, IN or OF spec *)
1)	   with curToken do
1)	    if (ttype = reswdtype) and (rtype = filtype) and
1)	       ((filler = abouttype) or (filler = intype) or (filler = oftype)) then
1)	      case filler of
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 53,47

1)	abouttype: begin
1)		   ff := checkArg(exprParse,transtype);
1)		   dimCheck(ff,distancedim↑.dim);
1)		   end;
1)	intype:	   csys := getcsys(false);	(* get coord sys, hand = default *)
1)	oftype:	   begin
1)		   arm := checkArg(exprParse,frametype);
1)		   with arm↑ do
1)		    if not (((ntype = leafnode) and (ltype = varitype)) or
1)			    ((ntype = exprnode) and (op = arefop))) then
1)		      begin				(* not a variable - no good *)
1)		      pp20L(' Need a device varia',20); pp10('ble here  ',8); errprnt;
1)		      end;
1)		   end;
1)	      end
1)	     else begin backup := true; b := true end;	(* all done *)
1)	  until b;
1)	  n := nil;
1)	  if arm <> nil then
1)	   with arm↑ do
1)	    if (ntype = exprnode) and (op = arefop) then
1)	      n := evalorder(arg2,n,true); (* deal with subscripts *)
1)	  if ff <> nil then
1)	    n := evalorder(ff,n,true);	(* push wrist frame *)
1)	  with fvec↑ do
1)	   if (ntype = exprnode) and (op = arefop) then
1)	     n := evalorder(arg2,n,true);	(* deal with subscripts *)
1)	  with tvec↑ do
1)	   if (ntype = exprnode) and (op = arefop) then
1)	     n := evalorder(arg2,n,true);	(* deal with subscripts *)
1)	  exprs := n;
1)	  end
1)	 end;
1)	(* armMagicParse *)
1)	procedure armMagicParse(sp: statementp);
1)	 var n,lexpr: nodep; b: boolean;
1)	 begin
1)	 with sp↑ do
1)	  begin
1)	  cmdnum := checkArg(exprParse,svaltype);
1)	  getDelim(',');
1)	  dev := exprParse;
1)	  if dev = nil then b := true
1)	   else
1)	    with dev↑ do			(* make sure it's a variable *)
1)	     begin
1)	     b := (ntype <> leafnode) or (ltype <> varitype);
1)	     if b then b := (ntype <> exprnode) or (op <> arefop);
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 53,47

1)	     end;
1)	  if b then
1)	    begin
1)	    pp20L(' Need a device varia',20); pp10('ble here  ',8); errprnt;
1)	    bad := true;			(* mark statement as bad *)
1)	    end
1)	   else
1)	    bad := false;			(* statement is ok *)
1)	  getToken;
1)	  backup := true;
1)	  if (not endOfLine) or
1)	     (curToken.ttype <> delimtype) or (curToken.ch <> ';') then getDelim(',');
1)	  pnode↑.arg2 := nil;
1)	  getArgs(pnode);			(* pretend we just saw a queryop *)
1)	  iargs := pnode↑.arg2;			(* store away pointer to argument list *)
1)	  getToken;
1)	  backup := true;
1)	  if (not endOfLine) or
1)	     (curToken.ttype <> delimtype) or (curToken.ch <> ';') then getDelim(',');
1)	  pnode↑.arg2 := nil;
1)	  getArgs(pnode);			(* do it all again for results list *)
1)	  oargs := pnode↑.arg2;
1)	  n := oargs;
1)	  b := false;
1)	  while (n <> nil) and not b do
1)	   begin		(* make sure each entry in result list is a variable *)
1)	   with n↑.lval↑ do
1)	    begin
1)	    b := (ntype <> leafnode) or (ltype <> varitype);
1)	    if b then b := (ntype <> exprnode) or (op <> arefop);
1)	    end;
1)	   n := n↑.next;
1)	   end;
1)	  if b then
1)	    begin
1)	    pp20L(' Can only have varia',20); pp10('bles here ',9); errprnt;
1)	    bad := true;				(* mark statement as bad *)
1)	    end;
1)	  if not bad then
1)	    begin					(* set up exprs field *)
1)	    lexpr := evalOrder(cmdnum,nil,true);
1)	    if dev <> nil then				(* evaluate device *)
1)	     if dev↑.ntype <> leafnode then
1)	       lexpr := evalOrder(dev↑.arg2,nil,true);	(* push array subscripts *)
1)	    lexpr := evalOrder(iargs,lexpr,true);	(* push input arguments *)
1)	    n := oargs;
1)	    while n <> nil do
1)	     with n↑ do
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 53,47

1)	      begin				(* push any subscripts in result list *)
1)	      if lval↑.ntype = exprnode then lexpr := evalOrder(n↑.lval,lexpr,true);
1)	      n := next;
1)	      end;
1)	    exprs := lexpr;
1)	    end;
1)	  end;
1)	 end;
1)	(* editStmnt: aux routines: echarDo, goEd, editExpr, downLine *)
1)	procedure editStmnt;
1)	 var i,j,l,ocur,indent,e0,elen: integer;
1)	     n,nv: nodep; s,sp: statementp; ch,echar: ascii; strp: strngp;
1)	     b,again: boolean;
1)	 procedure echarDo;
1)	  begin
1)	  if echar >= 'P' then cursorLine := cursorLine - 1 	(* U or P *)
1)	   else cursorLine := cursorLine + 1;			(* cr or N *)
1)	  again := not odd(ord(echar));			(* keep going if N or P *)
1)	  end;
1)	 procedure goEd;
1)	  begin
1)	  with lines[l]↑ do			(* go edit it *)
1)	   echar := exprEditor(l-firstDline+1,start,length,e0,elen,0);
1)	  end;
1)	 function editExpr(n: nodep): nodep;
1)	  begin
1)	  elen := getExprLength(n);
1)	  relExpr(n);				(* flush the old expression *)
1)	  goEd;
1)	  n := exprParse;			(* parse the modified expression *)
1)	  echarDo;
**** File 2) EDIT.PAS[EAL,HE]/47P/30L
2)		else if (d = svaltype) and (ntype = leafnode) then
2)		 if (vari↑.level = 0) and	(* check for scalar devices *)
2)		    (vari↑.offset in [2,6,10,14,16,20]) then b := false;
2)		(* offsets: 2=bhand, 6=yhand, 10=ghand, 14=rhand, 16=driver, 20=vise *)
2)	    if b then
2)	      begin					(* no good *)
2)	      pp20L(' Need a device varia',20); pp10('ble here  ',8); ppLine;
2)	      end
2)	    end
2)	  end;
2)	 end;
2)	(* eReturnParse *)
2)	procedure eReturnParse(st: statementp);
2)	 var n,np: nodep;
2)	 begin
2)	 relExpr(st↑.retval);			(* flush the old expression *)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 53,47

2)	 st↑.retval := eExprParse;		(* parse the modified expression *)
2)	 n := st↑.rproc;			(* find def of procedure we're in *)
2)	 if n = nil then
2)	   begin		(* yow - shouldn't allow a return here *)
2)	   pp20L(' Can''t have a return',20); pp5('here ',4); ppLine;
2)	   end
2)	  else if n↑.pname↑.vtype = nulltype then
2)	   begin			(* procedure doesn't return a result *)
2)	   pp20L(' Procedure doesn''t r',20); pp20('eturn result        ',12); ppLine;
2)	   end
2)	  else if st↑.retval <> nil then
2)	   begin
2)	   st↑.retval := checkArg(st↑.retval,n↑.pname↑.vtype);
2)	   np := nil;
2)	   eDimCheck(st↑.retval,getdim(n,np));
2)	   relNode(np);
2)	   end
2)	  else
2)	   begin pp20L(' Need a value to ret',20); pp10('urn with  ',8); ppLine end;
2)	 with st↑ do
2)	  if retval <> nil then exprs := evalOrder(retval,nil,true);
2)	 end;
2)	(* eWristParse *)
2)	procedure eWristParse(st: statementp);
2)	 var b: boolean; n: nodep;
2)	 begin
2)	 with st↑ do
2)	  begin
2)	  n := nil;
2)	  b := false;
2)	  fvec := checkArg(eExprParse,vectype);
2)	  eDimCheck(fvec,forcedim↑.dim);
2)	  with fvec↑ do			(* make sure it's a variable *)
2)	   if (ntype = exprnode) and (op = arefop) then
2)	     n := evalorder(arg2,n,true)	(* deal with subscripts *)
2)	    else b := not ((ntype = leafnode) and (ltype = varitype));
2)	  eGetDelim(',');
2)	  tvec := checkArg(eExprParse,vectype);
2)	  eDimCheck(tvec,torquedim↑.dim);
2)	  with tvec↑ do			(* make sure it's a variable *)
2)	   if (ntype = exprnode) and (op = arefop) then
2)	     n := evalorder(arg2,n,true)	(* deal with subscripts *)
2)	    else if not ((ntype = leafnode) and (ltype = varitype)) then
2)	     b := true;			(* no good *)
2)	  exprs := n;
2)	  if b then
2)	    begin
2)	  (* *** mark us as bad *** *)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 53,47

2)	    pp20L(' Need variable here ',19); ppLine;
2)	    end;
2)	  end
2)	 end;
2)	(* editStmnt: aux routines: echarDo, editExpr, downLine *)
2)	procedure editStmnt;
2)	 var i,j,l,ocur,indent,e0,elen: integer;
2)	     n,np: nodep; s,sp: statementp; ch,echar: ascii; strp: strngp;
2)	     b,again: boolean;
2)	 procedure echarDo;
2)	  begin
2)	  if ord(echar) >= 120B then cursorLine := cursorLine - 1 (* U or P *)
2)	   else cursorLine := cursorLine + 1;			(* cr or N *)
2)	  again := not odd(ord(echar));			(* keep going if N or P *)
2)	  end;
2)	 function editExpr(n: nodep): nodep;
2)	  begin
2)	  elen := getExprLength(n);
2)	  relExpr(n);				(* flush the old expression *)
2)	  with lines[l]↑ do
2)	   echar := exprEditor(l-firstDline+1,start,length,e0,elen,0);
2)	  n := eExprParse;			(* parse the modified expression *)
2)	  echarDo;
***************


**** File 1) EDIT.PAS[AL,HE]/58P/18L
1)	      elen := lines[l]↑.length;
1)	      goEd;
1)	      labelParse;
**** File 2) EDIT.PAS[EAL,HE]/51P/18L
2)	      with lines[l]↑ do			(* go edit it *)
2)	       begin
2)	       elen := length;
2)	       echar := exprEditor(l-firstDline+1,start,length,1,elen,0);
2)	       end;
2)	      labelParse;
***************


**** File 1) EDIT.PAS[AL,HE]/58P/37L
1)			echar := varParse(s,indent,l);
1)			echarDo;
1)			reFormatStmnt(s,indent,ocur);	(* may have changed nlines *)
1)			ocur := 0;
1)			end;
**** File 2) EDIT.PAS[EAL,HE]/51P/40L
2)			echar := eVarParse(s,indent,l);
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 58,51

2)			echarDo;
2)			end;
***************


**** File 1) EDIT.PAS[AL,HE]/58P/50L
1)			goEd;
1)			assignParse(s,nil);
1)			echarDo;
**** File 2) EDIT.PAS[EAL,HE]/51P/51L
2)			with lines[l]↑ do			(* go edit it *)
2)			 echar := exprEditor(l-firstDline+1,start,length,e0,elen,0);
2)			eAssignParse(s);
2)			echarDo;
***************


**** File 1) EDIT.PAS[AL,HE]/58P/58L
1)			goEd;
1)			returnParse(s);
1)			echarDo;
**** File 2) EDIT.PAS[EAL,HE]/51P/60L
2)			with lines[l]↑ do			(* go edit it *)
2)			 echar := exprEditor(l-firstDline+1,start,length,e0,elen,0);
2)			eReturnParse(s);
2)			echarDo;
***************


**** File 1) EDIT.PAS[AL,HE]/58P/92L
1)			 end;
1)			goEd;
1)			relExpr(forvar);
1)			relExpr(initial);
1)			relExpr(step);
1)			relExpr(final);
1)			forParse(s);
1)			echarDo;
**** File 2) EDIT.PAS[EAL,HE]/51P/95L
2)			 echar := exprEditor(l-firstDline+1,start,length,e0,elen,0);
2)			 end;
2)			relExpr(forvar);
2)			relExpr(initial);
2)			relExpr(step);
2)			relExpr(final);
2)			eForParse(s);
2)			echarDo;
***************
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 58,51



**** File 1) EDIT.PAS[AL,HE]/58P/129L
1)			goEd;
1)			affixParse(s);
1)			echarDo;
1)			reFormatStmnt(s,indent,ocur);	(* may have changed nlines *)
1)			ocur := 0;
1)			end;
**** File 2) EDIT.PAS[EAL,HE]/51P/132L
2)			with lines[l]↑ do
2)			 echar := exprEditor(l-firstDline+1,start,length,e0,elen,0);
2)			eAffixParse(s);
2)			echarDo;
2)			end;
***************


**** File 1) EDIT.PAS[AL,HE]/58P/140L
1)			goEd;
1)			unfixParse(s);
1)			echarDo;
1)			end;
1)	printtype,
1)	prompttype,
1)	aborttype,
1)	saytype:	begin
1)			if (fieldNum = 1) and (stype = prompttype) then e0 := indent + 7
1)			 else if stype = saytype then e0 := indent + 4
1)			 else e0 := indent + 6;
1)			echar := plistParse(s,e0,indent,l,ocur);
1)			echarDo;
1)			ocur := 0;
1)			end;
1)	pausetype:	begin
1)			e0 := indent + 6;
1)			ptime := checkArg(editExpr(ptime),svaltype);
1)			dimCheck(ptime,timedim↑.dim);	(* right dimension? *)
1)			exprs := evalOrder(ptime,nil,true);
1)			end;
1)	movetype,
1)	jtmovetype,
1)	operatetype,
1)	opentype,
1)	closetype,
1)	centertype,
1)	floattype,
1)	setbasetype,
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 58,51

1)	stoptype:	begin
1)			if (stype = operatetype) or (stype = setbasetype) then e0 := 8
1)			 else if stype = centertype then e0 := 7
1)			 else if (stype = closetype) or (stype = floattype) then e0 := 6
1)			 else e0 := 5;
**** File 2) EDIT.PAS[EAL,HE]/51P/142L
2)			with lines[l]↑ do
2)			 echar := exprEditor(l-firstDline+1,start,length,e0,elen,0);
2)			eUnfixParse(s);
2)			echarDo;
2)			end;
2)	printtype,
2)	aborttype,
2)	prompttype:	begin
2)			if (fieldNum = 1) and (stype = prompttype) then e0 := indent + 7
2)			 else e0 := indent + 6;
2)			echar := ePlistParse(s,e0,indent,l,ocur);
2)			echarDo;
2)			setCursor := true;	(* let putStmnt figure right fieldnum *)
2)			curLine := 0;
2)			putStmnt(dprog,0,99);			(* redraw statement *)
2)			setCursor := false;
2)			ocur := 0;
2)			end;
2)	pausetype:	begin
2)			e0 := indent + 6;
2)			ptime := checkArg(editExpr(ptime),svaltype);
2)			eDimCheck(ptime,timedim↑.dim);	(* right dimension? *)
2)			exprs := evalOrder(ptime,nil,true);
2)			end;
2)	movetype,
2)	operatetype,
2)	opentype,
2)	closetype,
2)	centertype,
2)	stoptype:	begin
2)			if stype = operatetype then e0 := 8
2)			 else if stype = centertype then e0 := 7
2)			 else if stype = closetype then e0 := 6
2)			 else e0 := 5;
***************


**** File 1) EDIT.PAS[AL,HE]/58P/179L
1)			 end;
1)			goEd;
1)			relExpr(cf);
1)			if (stype = stoptype) or (stype = setbasetype) then stopParse(s)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 58,51

1)			 else moveParse(s,false);
1)			echarDo;
**** File 2) EDIT.PAS[EAL,HE]/51P/181L
2)			 echar := exprEditor(l-firstDline+1,start,length,e0,elen,0);
2)			 end;
2)			relExpr(cf);
2)			if stype = stoptype then eStopParse(s) else eMoveParse(s,false);
2)			echarDo;
***************


**** File 1) EDIT.PAS[AL,HE]/58P/196L
1)			   pp20L(' Need an event varia',20); pp10('ble here  ',8); errprnt;
1)			   relExpr(event);
**** File 2) EDIT.PAS[EAL,HE]/51P/197L
2)			   pp20L(' Need an event varia',20); pp10('ble here  ',8); ppLine;
2)			   relExpr(event);
***************


**** File 1) EDIT.PAS[AL,HE]/58P/210L
1)			 end;
1)			goEd;
1)			cmonParse(s,true);
1)			echarDo;
**** File 2) EDIT.PAS[EAL,HE]/51P/211L
2)			 echar := exprEditor(l-firstDline+1,start,length,e0,elen,0);
2)			 end;
2)			eCmonParse(s,true);
2)			echarDo;
***************


**** File 1) EDIT.PAS[AL,HE]/58P/221L
1)			goEd;
1)			enableParse(s);
1)			echarDo;
1)			end;
1)	commenttype:	begin		(* *** only good for single line comments *** *)
1)			ch := str↑.ch[1];
1)			if (ch = 'C') or (ch = chr(smallC)) then
1)			  begin			(* comment ... ; *)
**** File 2) EDIT.PAS[EAL,HE]/51P/222L
2)			with lines[l]↑ do
2)			 echar := exprEditor(l-firstDline+1,start,length,e0,elen,0);
2)			eEnableParse(s);
2)			echarDo;
2)			end;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 58,51

2)	commenttype:	begin		(* *** only good for single line comments *** *)
2)			ch := str↑.ch[1];
2)			if (ch = 'C') or (ch = chr(143B)) then	(* dumb SAIL compiler *)
2)			  begin			(* comment ... ; *)
***************


**** File 1) EDIT.PAS[AL,HE]/58P/234L
1)			  if ch = chr(lbrace) then e0 := indent + 1
1)			   else e0 := indent + 2;
1)			  elen := len + indent - e0 - 2;
1)			  j := (len-1) MOD 10 + 1;	(* Index of last char in comment *)
1)			  strp := str;
1)			  for i := 1 to (len-1) DIV 10 do strp := strp↑.next;
1)			  if strp↑.ch[j] = chr(rbrace) then elen := elen + 1;
1)			  end;
1)			while str <> nil do		(* release old comment string *)
1)			 begin strp := str↑.next; relStrng(str); str := strp end;
1)			goEd;				(* edit new one *)
1)			curChar := indent;
1)			maxChar := indent + elen + 9;
1)			flushComments := false;
1)			getToken;			(* get the comment *)
1)			flushComments := true;
**** File 2) EDIT.PAS[EAL,HE]/51P/236L
2)			  if ch = chr(173B) then e0 := indent + 1	(* '{' = 173B *)
2)			   else e0 := indent + 2;
2)			  elen := len + indent - e0 - 2;
2)			  j := (len-1) MOD 10 + 1;	(* Index of last char in comment *)
2)			  strp := str;
2)			  for i := 1 to (len-1) DIV 10 do strp := strp↑.next;
2)	(* SAIL *)	  if strp↑.ch[j] = chr(176B) then elen := elen + 1; (* rt brace *)
2)			  end;
2)			while str <> nil do		(* release old comment string *)
2)			 begin strp := str↑.next; relStrng(str); str := strp end;
2)			with lines[l]↑ do		(* edit new one *)
2)			 echar := exprEditor(l-firstDline+1,start,length,e0,elen,0);
2)			curChar := indent;
2)			maxChar := indent + elen + 9;
2)			flushComments := false;
2)			eGetToken;			(* get the comment *)
2)			flushComments := true;
***************


**** File 1) EDIT.PAS[AL,HE]/58P/255L
1)			e0 := indent + 5;
1)			relExpr(fvec);
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 58,51

1)			relExpr(tvec);
1)			relExpr(ff);
1)			relExpr(arm);
1)			with lines[l]↑ do
1)			 begin					(* go edit it *)
1)			 elen := length - e0 + 1;
1)			 if listing[start+length-1] = ';' then elen := elen - 1;
1)			 end;
1)			goEd;
1)			wristParse(s);
1)			echarDo;
1)			end;
1)	retrytype:	downLine;	(* nothing to edit here *)
1)	armmagictype:	begin
1)			e0 := indent + 10;
1)			with lines[l]↑ do
1)			 begin					(* go edit it *)
1)			 elen := length - e0 + 1;
1)			 if listing[start+length-1] = ';' then elen := elen - 1;
1)			 end;
1)			goEd;
1)			relExpr(cmdnum);
1)			relExpr(dev);
1)			relExpr(iargs);
1)			relExpr(oargs);
1)			armmagicParse(s);
1)			echarDo;
1)			end;
1)	others:		begin
**** File 2) EDIT.PAS[EAL,HE]/51P/258L
2)			e0 := indent + 6;
2)			elen := getExprLength(fvec) + getExprLength(tvec) + 1;
2)			relExpr(fvec);
2)			relExpr(tvec);
2)			with lines[l]↑ do
2)			 echar := exprEditor(l-firstDline+1,start,length,e0,elen,0);
2)			eWristParse(s);
2)			echarDo;
2)			end;
2)	setbasetype,
2)	retrytype:	downLine;	(* nothing to edit here *)
2)	others:		begin
***************


**** File 1) EDIT.PAS[AL,HE]/58P/298L
1)	       echar := procParse(n,indent,l);
1)	       end
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 58,51

**** File 2) EDIT.PAS[EAL,HE]/51P/282L
2)	       echar := eProcParse(n,indent,l);
2)	       end
***************


**** File 1) EDIT.PAS[AL,HE]/58P/306L
1)		end;
1)	       goEd;
1)	       clabelParse(n);
1)	       end
1)	      else if ((ntype = viaptnode) or (ntype = byptnode)) and
1)		      (fieldNum > 1) then
1)	       begin					(* WHERE clause in VIA/BY *)
1)	       e0 := 8 + indent;
1)	       with lines[l]↑ do
1)		begin					(* go edit it *)
1)		elen := length - e0 + 1;
1)		if listing[start+length-1] = ';' then elen := elen - 1;
1)		end;
1)	       goEd;
1)	       nv := n;
1)	       b := true;
1)	       while b and (nv↑.next <> nil) do		(* find last VIA/BY in list *)
1)		with nv↑.next↑ do
1)		 if (ntype = nv↑.ntype) and vlist then nv := nv↑.next else b := false;
1)	       nv := nv↑.vclauses;
1)	       for i := 3 to fieldNum do nv := nv↑.next;	(* find WHERE clause *)
1)	       mClauseParse(nv);
1)	       end
1)	      else if (cursorStack[cursor].cline < cursorLine) and
1)		      (fieldNum = 1) then echar := chr(cr)  (* just skip past THEN *)
1)	      else
1)	       begin					(* a motion clause *)
1)	       case ntype of
1)	destnode,
1)	byptnode:	e0 := 3;
1)	viaptnode:	e0 := 4;
1)	cwnode:		e0 := 0;
1)	commentnode:	e0 := 0;	(* *** should be a little smarter here *** *)
1)	others:		e0 := 5;			(* a WITH clause *)
1)		end;
1)	       e0 := e0 + indent;
1)	       with lines[l]↑ do
1)		begin					(* go edit it *)
1)		elen := length - e0 + 1;
1)		if listing[start+length-1] = ';' then elen := elen - 1;
1)		end;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 58,51

1)	       goEd;
1)	       mClauseParse(n);
1)	       end;
**** File 2) EDIT.PAS[EAL,HE]/51P/290L
2)		echar := exprEditor(l-firstDline+1,start,length,e0,elen,0);
2)		end;
2)	       eClabelParse(n);
2)	       end
2)	      else
2)	       begin					(* a motion clause *)
2)	       if ntype = destnode then e0 := 3
2)		else if ntype = viaptnode then e0 := 4
2)		else if ntype = cwnode then e0 := 0
2)		else if ntype = commentnode then e0 := 0 (* *** should be a little smarter here *** *)
2)		else e0 := 5;				(* a WITH clause *)
2)	       e0 := e0 + indent;
2)	       with lines[l]↑ do
2)		begin					(* go edit it *)
2)		elen := length - e0 + 1;
2)		if listing[start+length-1] = ';' then elen := elen - 1;
2)		(* ** should also check for THEN at end if VIA ** *)
2)		echar := exprEditor(l-firstDline+1,start,length,e0,elen,0);
2)		end;
2)	       eMClauseParse(n);
2)	       end;
***************


**** File 1) EDIT.PAS[AL,HE]/59P/1L
1)	(* addStmnt: aux routines: getEmptyStmnt,flushSemi,descend,elseTest,restoreCursor,setUpNewStmnt,viaOk *)
1)	procedure addStmnt(firstTime: boolean);
1)	 var i,j,l,indent,e0,elen,ocur,lcur: integer; nextLine: cursorp;
1)	     n,np,viaCl: nodep; s,sp: statementp; echar: ascii; slabel: varidefp;
1)	     b,emptyp,stOk,clOk,nogood,again,labp,flushp: boolean;
1)	 function getEmptyStmnt: statementp;
**** File 2) EDIT.PAS[EAL,HE]/52P/1L
2)	(* addStmnt: aux routines: getEmptyStmnt, getBlkId & flushSemi *)
2)	procedure addStmnt(firstTime: boolean);
2)	 var i,j,l,indent,e0,elen,ocur,lcur: integer; nextLine: cursorp;
2)	     n,np: nodep; s,sp: statementp; echar: ascii; slabel: varidefp;
2)	     b,emptyp,stOk,clOk,nogood,again,labp: boolean;
2)	 function getEmptyStmnt: statementp;
***************


**** File 1) EDIT.PAS[AL,HE]/59P/24L
1)	 procedure flushSemi;
**** File 2) EDIT.PAS[EAL,HE]/52P/24L
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 59,52

2)	 function getBlkId: identp;
2)	  var bid: identp;
2)	  begin
2)	  bid := nil;
2)	  eGetToken;		(* get the new block id *)
2)	  with curToken do
2)	   if ttype = constype then
2)	     begin
2)	     if cons↑.ltype = strngtype then
2)	       begin		(* yup - grab the id string *)
2)	       bid := newIdent;
2)	       bid↑.length := cons↑.length;
2)	       bid↑.name := cons↑.str;
2)	       end
2)	      else
2)	       begin
2)	       pp20L(' Need a string here ',19); ppLine;
2)	       end;
2)	     relNode(cons);
2)	     end
2)	    else backup := true;
2)	  getBlkId := bid;
2)	  end;
2)	 procedure flushSemi;
***************


**** File 1) EDIT.PAS[AL,HE]/59P/47L
1)	 procedure descend(st: statementp);
1)	  var sp: statementp;
1)	  begin
1)	  sp := nil;
1)	  with st↑ do
1)	   case stype of
1)	fortype:   sp := fbody;
1)	whiletype: sp := body;
1)	iftype:    if els <> nil then sp := els else sp := thn;
1)	cmtype:    sp := conclusion;
1)	others:    begin end;		(* nothing to do *)
1)	    end;
1)	  curLine := curline + 1;			(* better than nothing(?) *)
1)	  if sp <> nil then
1)	    begin pushStmnt(sp,0); descend(sp) end;	(* don't worry about cline *)
1)	  end;
1)	 function elseTest: boolean;
1)	  var j,l: integer; b: boolean; n: nodep;
1)	  begin
1)	  b := not emptyp;	(* if pointing at empty stmnt then no ELSE possible *)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 59,53

1)	  if b then
1)	    begin
1)	    l := cursorLine;
1)	    if sParse and (cursor <= sCursor) then
1)	      begin
1)	      cursor := sCursor;
1)	      curLine := 0;
1)	      descend(cursorStack[sCursor].st);
1)	      end
1)	     else lastStmnt(1,true);		(* back up to previous statement *)
1)	    cursorLine := l;
1)	    with cursorStack[cursor], st↑ do
1)	     if (movetype <= stype) and (stype <= floattype) and (clauses <> nil) then
1)	       begin
1)	       n := clauses;
1)	       while n↑.next <> nil do n := n↑.next;	(* find last clause *)
1)	       if n↑.ntype = cmonnode then
1)		 begin
1)		 curLine := cline;
1)		 pushNode(n);	(* don't worry that .cline fields will be wrong *)
1)		 pushStmnt(n↑.cmon,2);
1)		 descend(n↑.cmon);
1)		 end;
1)	       end;
1)	    b := true;
1)	    i := cursor;
1)	    if sParse then j := sCursor else j := 1;
1)	    while (i >= j) and b do	(* look for an IF with no ELSE *)
1)	     begin
1)	     with cursorStack[i] do
1)	      if stmntp then
1)		if l < cline + st↑.nlines then i := 0		(* inside stmnt *)
1)		 else if st↑.stype = iftype then b := st↑.els <> nil;
1)	     if b then i := i - 1 else cursor := i;
1)	     end;
1)	    end;
1)	  elseTest := b;
1)	  end;
1)	 procedure restoreCursor;
1)	  begin
1)	  setCursor := true;
1)	  curLine := 0;
1)	  firstLine := 0;
1)	  lastLine := -1;
1)	  if not sParse then putStmnt(dprog,0,99)	(* write & display new line *)
1)	   else
1)	    begin
1)	    cursor := sCursor - 1;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 59,53

1)	    putStmnt(cursorStack[sCursor].st,0,99);
1)	    if cursor < sCursor then cursor := sCursor
1)	    end;
1)	  setCursor := false;
1)	  with cursorStack[cursor] do		(* don't point at a proc def node *)
1)	   if (not stmntp) and (nd↑.ntype = procdefnode) then cursor := cursor - 1;
1)	  end;
1)	 procedure setUpNewStmnt;
1)	  var b: boolean;
1)	  begin
1)	  setUp := true;
1)	  setCursor := false;
1)	  curLine := 1;
1)	  putStmnt(sp,nextLine.ind,99); (* see how long we are *)
1)	  if sp↑.stype = declaretype then
1)	    b := sp↑.variables↑.tbits <> 2	(* don't advance cursor for procedure *)
1)	   else b := true;
1)	  if b then cursorline := cursorline + sp↑.nlines - 1;
1)	  setUp := false;
1)	  end;
1)	 procedure viaOk(i: integer);
1)	  var n: nodep;
1)	  begin
1)	  if clOk then
1)	    with cursorStack[cursor-i].st↑ do
1)	     if (stype = movetype) or (stype = jtmovetype) then
1)	       begin
1)	       n := clauses;
1)	       if i = 1 then
1)		 begin
1)		 if n <> nextLine.nd then
1)		  while n↑.next <> nextLine.nd do n := n↑.next;
1)		 end
1)		else
1)		 if n <> nil then
1)		   while n↑.next <> nil do n := n↑.next;
1)	       if n <> nil then
1)		 if (n↑.ntype = viaptnode) or (n↑.ntype = byptnode) then viaCl := n;
1)	       end;
1)	  end;
1)	(* addStmnt: aux routines: addNewSt,addNode,addNewEnv,addCmon & addDeclSt *)
1)	 procedure addNewSt(sty: stmntypes);
**** File 2) EDIT.PAS[EAL,HE]/53P/1L
2)	(* addStmnt: aux routines: addNewSt, addNode, addCmon & addDeclSt *)
2)	 procedure addNewSt(sty: stmntypes);
***************


  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 60,53

**** File 1) EDIT.PAS[AL,HE]/60P/80L
1)		with cursorStack[cursor-1] do
1)		 begin				(* add us to case list *)
1)	    (* *** later for this case *** *)
1)		 end
1)	      end;
**** File 2) EDIT.PAS[EAL,HE]/53P/80L
2)		begin
2)		with cursorStack[cursor-1] do
2)		 begin
2)		 if st↑.stype = declaretype then	(* i.e. procedure declaration *)
2)		   begin			(* add us to statement list *)
2)		   sp↑.next := st;
2)		   sp↑.last := st↑.last;
2)		   st↑.last := sp;
2)		   with sp↑.last↑ do		(* check for start of block *)
2)		    if next = st then next := sp else bcode := sp;
2)		   st := sp;			(* have cursor point to us *)
2)		   cursor := cursor - 1;
2)		   end
2)		  else
2)		   begin			(* add us to case list *)
2)	    (* *** later for this case *** *)
2)		   end
2)		 end
2)		end
2)	      end;
***************


**** File 1) EDIT.PAS[AL,HE]/60P/99L
1)	    pp20L(' Can''t have a statem',20); pp10('ent here  ',8); errprnt;
1)	    sp := nil;
1)	    nogood := true;
1)	    flushp := true;
1)	    end;
1)	  end;
1)	 function addNode: nodep;
1)	  var n,np,no: nodep; i,l: integer;
1)	  begin
1)	  np := newNode;
1)	  np↑.next := nil;
1)	  if nextLine.stmntp and (cursorStack[cursor-1].stmntp or
1)				  (sParse and (cursor <= sCursor))) then
1)	    begin				(* need to append a new clause *)
1)	    l := cursorLine;		(* since calling lastStmnt will change it *)
1)	    i := cursor;
1)	    if sParse and (cursor <= sCursor) then
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 60,53

1)	      begin
1)	      cursor := sCursor;
1)	      descend(cursorStack[sCursor].st);
1)	      end
1)	     else lastStmnt(1,true);		(* backup to motion stmnt *)
1)	    cursorLine := l;
1)	    for l := i to cursor do	(* update part of cursor stack that was just *)
1)	     with cursorStack[l] do	(* added to the stack by lastStmnt *)
1)	      if stmntp then st↑.nlines := st↑.nlines + 1;
1)	    with cursorStack[cursor].st↑ do
1)	     begin
1)	     n := clauses;
1)	     if n = nil then clauses := np
1)	      else				(* find last clause *)
1)	       begin while n↑.next <> nil do n := n↑.next; n↑.next := np end;
1)	     end;
1)	    if not fparse then flushSemi;
1)	    curLine := cursorLine - 1;
**** File 2) EDIT.PAS[EAL,HE]/53P/114L
2)	    pp20L(' Can''t have a statem',20); pp10('ent here  ',8); ppLine;
2)	    sp := nil;
2)	    nogood := true;
2)	    end;
2)	  end;
2)	 function addNode: nodep;
2)	  var n,np,no: nodep; l,i: integer;
2)	  begin
2)	  np := newNode;
2)	  np↑.next := nil;
2)	  if nextLine.stmntp and cursorStack[cursor-1].stmntp then
2)	    begin				(* need to append a new clause *)
2)	    l := cursorLine;		(* since calling lastStmnt will change it *)
2)	    lastStmnt(1,true);			(* backup to motion stmnt *)
2)	    cursorLine := l;
2)	    with cursorStack[cursor].st↑ do
2)	     begin
2)	     nlines := nlines + 1;
2)	     n := clauses;
2)	     if n = nil then clauses := np
2)	      else				(* find last clause *)
2)	       begin while n↑.next <> nil do n := n↑.next; n↑.next := np end;
2)	     end;
2)	    flushSemi;
2)	    curLine := cursorLine - 1;
***************


**** File 1) EDIT.PAS[AL,HE]/60P/218L
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 60,53

1)	  v := makeNVar(cmontype,nil);
1)	  v↑.s := sp;
**** File 2) EDIT.PAS[EAL,HE]/53P/223L
2)	  v := eMakeVar(cmontype,nil);
2)	  v↑.s := sp;
***************


**** File 1) EDIT.PAS[AL,HE]/60P/228L
1)	  cmonParse(sp,false);
1)	  getDo;
1)	  addNewEnv;			(* make up a new environment if needed *)
1)	  makeNewVar(v);		(* if active block make env entry for var *)
1)	  end;
**** File 2) EDIT.PAS[EAL,HE]/53P/233L
2)	  eCmonParse(sp,false);
2)	  eGetToken;
2)	  if not endOfLine then
2)	    with curToken do
2)	     if (ttype <> reswdtype) or (rtype <> filtype) or 
2)		(filler <> dotype) then
2)	       begin
2)	       pp20L(' Need a "DO" here   ',17); ppLine;
2)	       backUp := true
2)	       end;
2)	  addNewEnv;			(* make up a new environment if needed *)
2)	  eMakeNewVar(v);		(* if active block make env entry for var *)
2)	  end;
***************


**** File 1) EDIT.PAS[AL,HE]/60P/244L
1)	    v := getDeclarations(false,curBlock↑.level,v,i,dumDup);
1)	    sp↑.numvars := i;			(* remember # of variables *)
1)	    if v = nil then
1)	      begin
1)	      nogood := true;
1)	      sp↑.next↑.last := sp↑.last;	(* splice out bad decl stmnt *)
1)	      if sp↑.last↑.next = sp then sp↑.last↑.next := sp↑.next
1)	       else sp↑.last↑.bcode := sp↑.next;
1)	      relStatement(sp);
1)	      sp := nil;
1)	      end
1)	     else
1)	      begin
1)	      vo := nil;
1)	      while v <> nil do
1)	       begin
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 60,53

1)	       vp := makeNVar(v↑.vtype,v↑.name);
1)	       if vo = nil then sp↑.variables := vp else vo↑.dnext := vp;
1)	       vo := vp;
1)	       with vp↑ do
1)		begin				(* copy relevant fields *)
1)		dtype := v↑.dtype;
1)		tbits := v↑.tbits;
1)		if odd(tbits) then a := v↑.a	(* copy array bounds *)
1)		 else if tbits = 2 then
1)		  begin		(* need to do special stuff for procedure??? *)
1)		  p := v↑.p;				(* copy proc def *)
1)		  p↑.pname := vp;
1)		  if p↑.body↑.stype = blocktype then cursorLine := cursorLine + 1;
1)		  end;
1)		end;
1)	       makeNewVar(vp);		(* if active block make env entry for var *)
1)	       vp := v↑.dnext;
1)	       relVaridef(v);		(* all done with the duplicate varidef now *)
1)	       v := vp;
1)	       end;
1)	      if cursorstack[2].st <> curBlock then
1)		begin
1)		reParse(curBlock);
1)		lcur := 0;		(* since reParse will update display *)
1)		end
1)	       else setUpNewStmnt;
1)	      end;
1)	    end
1)	   else
1)	    begin
1)	    pp20L(' Can''t have a declar',20); pp10('ation here',10); errprnt;
1)	    nogood := true;
1)	    flushp := true;
1)	    end
1)	  end;
1)	(* addStmnt: main body *)
1)	 begin
1)	 setExpr := true;
1)	 repeat
1)	  echar := chr(CR);
1)	  repeat
1)	   if not sParse then newDeclarations := nil;
1)	   sp := nil;
1)	   nogood := false;
1)	   flushp := false;
1)	   labp := false;
1)	   ocur := cursorLine;
1)	   lcur := ocur;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 60,53

1)	   with cursorStack[cursor] do		(* don't point at a proc def node *)
1)	    if (not stmntp) and (nd↑.ntype = procdefnode) then cursor := cursor - 1;
1)	   with cursorStack[cursor] do
**** File 2) EDIT.PAS[EAL,HE]/53P/257L
2)	    v := getEDeclaration(false,curBlock↑.level,v,i);
2)	    sp↑.numvars := i;			(* remember # of variables *)
2)	    if v = nil then
2)	      begin nogood := true; relStatement(sp); end;
2)	    vo := nil;
2)	    while v <> nil do
2)	     begin
2)	     vp := eMakeVar(v↑.vtype,v↑.name);
2)	     if vo = nil then sp↑.variables := vp else vo↑.dnext := vp;
2)	     vo := vp;
2)	     with vp↑ do
2)	      begin				(* copy relevant fields *)
2)	      dtype := v↑.dtype;
2)	      tbits := v↑.tbits;
2)	      if odd(tbits) then a := v↑.a	(* copy array bounds *)
2)	       else if tbits = 2 then
2)		begin		(* need to do special stuff for procedure??? *)
2)		p := v↑.p;				(* copy proc def *)
2)		p↑.pname := vp;
2)		cursorLine := cursorLine + 1;
2)		end;
2)	      end;
2)	     eMakeNewVar(vp);		(* if active block make env entry for var *)
2)	     vp := v↑.dnext;
2)	     relVaridef(v);		(* all done with the duplicate varidef now *)
2)	     v := vp;
2)	     end;
2)	    reParse(curBlock);
2)	    end
2)	   else
2)	    begin
2)	    pp20L(' Can''t have a declar',20); pp10('ation here',10); ppLine;
2)	    nogood := true;
2)	    end
2)	  end;
2)	(* addStmnt: main body *)
2)	 begin
2)	 setExpr := true;
2)	 echar := chr(15B);
2)	 repeat
2)	  repeat
2)	   newDeclarations := nil;
2)	   sp := nil;
2)	   nogood := false;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 60,53

2)	   labp := false;
2)	   ocur := cursorLine;
2)	   lcur := ocur;
2)	   with cursorStack[cursor] do
***************


**** File 1) EDIT.PAS[AL,HE]/61P/25L
1)	   viaCl := nil;
1)	   if emptyp then
1)	     begin
1)	     if not fParse then
1)	       begin
1)	       l := cursorLine - topDline + 1;	(* offset into line array *)
1)	       relLine(lines[l]);		(* release old empty line *)
1)	       lines[l] := nil;
1)	       clearLine(l-firstDline+1);	(* clear line *)
1)	       end;
1)	     clOk := false;			(* only accept a statement *)
**** File 2) EDIT.PAS[EAL,HE]/54P/22L
2)	   if emptyp then
2)	     begin
2)	     l := cursorLine - topDline + 1;	(* offset into line array *)
2)	     relLine(lines[l]);			(* release old empty line *)
2)	     lines[l] := nil;
2)	     clearLine(l-firstDline+1);		(* clear line *)
2)	     clOk := false;			(* only accept a statement *)
***************


**** File 1) EDIT.PAS[AL,HE]/61P/43L
1)	       stOk := nextLine.nd↑.ntype = clistnode;	(* unless it's a case label *)
1)	       clOk := not stOk;
1)	       with nextLine.nd↑ do
1)		if ((ntype = viaptnode) or (ntype = byptnode)) and (fieldNum > 1) then
1)		  viaCl := nextLine.nd
1)		 else viaOk(1);
1)	       end
1)	      else if sParse and (cursor <= sCursor) then
1)	       begin		(* if last is a motion statement then clause is ok *)
1)	       descend(cursorStack[sCursor].st);
1)	       with cursorStack[cursor].st↑ do
1)		clOk := (movetype <= stype) and (stype <= floattype);
1)	       stOk := false;			(* statements are no good here *)
1)	       viaOk(0);
1)	       cursor := sCursor;		(* pop back *)
1)	       end
**** File 2) EDIT.PAS[EAL,HE]/54P/36L
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 61,54

2)	       with nextLine do
2)		stOk := (nd↑.ntype = procdefnode)	(* unless it's a procedure definition *)
2)		     or (nd↑.ntype = clistnode);	(* or a case label *)
2)	       clOk := not stOk;
2)	       end
***************


**** File 1) EDIT.PAS[AL,HE]/61P/69L
1)		clOk := (movetype <= stype) and (stype <= floattype);
1)	       viaOk(0);
1)	       cursorLine := l;
1)	       restoreCursor;
1)	       end
1)	     end;
1)	   if viaCl <> nil then
1)	     begin
1)	     b := true;
1)	     while b and (viaCl↑.next <> nil) do	(* find correct VIA/BY node *)
1)	      with viaCl↑.next↑ do
1)	       if (ntype = viaCl↑.ntype) and vlist then viaCl := viaCl↑.next
1)		else b := false;
1)	     end;
**** File 2) EDIT.PAS[EAL,HE]/54P/51L
2)		clOk := (movetype <= stype) and (stype <= centertype);
2)	       cursorLine := l;
2)	       setCursor := true;
2)	       curLine := 0;
2)	       firstLine := 0;
2)	       lastLine := -1;
2)	       putStmnt(dprog,0,99);		(* restore cursor stack *)
2)	       setCursor := false;
2)	       end
2)	     end;
***************


**** File 1) EDIT.PAS[AL,HE]/61P/92L
1)	    if not fParse then flushcomments := false	(* comments are ok here *)
1)	     else if clOk then flushcomments := true	(* so don't loose any clauses *)
1)	     else if stOk then
1)	      begin
1)	      flushcomments := true;		(* assume comments are no good here *)
1)	      with cursorStack[cursor-1] do
1)	       if stmntp then
1)		 if st↑.stype = blocktype then	(* comments have to be in block *)
1)		   if nextLine.stmntp then
1)		     begin
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 61,54

1)		     flushcomments := not elseTest;
1)		     restoreCursor;
1)		     end;
1)	      end;
1)	    (* figure out what we're inserting: statement, label, clause *)
1)	    repeat getToken until (ttype <> delimtype) or (ch <> ';'); (* skip semi's *)
1)	    flushcomments := true;		(* don't allow comments anywhere else *)
1)	    if ttype = labeldeftype then
1)	      begin			(* a label *)
1)	      slabel := lab;		(* copy pointer to label *)
1)	      cursorLine := cursorLine + 1;
1)	      getToken;			(* move on to start of new statement? *)
1)	      if not endOfLine then lcur := lcur + 1;
1)	      if not (stOk or nextLine.stmntp or (clOk and (ttype = reswdtype) and
1)		      (((rtype = filtype) and (filler = defertype)) or
1)		       ((rtype = stmnttype) and (stmnt = cmtype))) )) then
1)		begin
1)		pp20L(' Can''t have a label ',20); pp5('here ',4); errprnt;
1)		if endOfLine then nogood := true;   (* maybe there's something else? *)
1)		end
**** File 2) EDIT.PAS[EAL,HE]/54P/70L
2)	    flushcomments := false;		(* comments are ok here *)
2)	    eGetToken;	(* figure out what we're inserting: statement, label, clause *)
2)	    flushcomments := true;		(* don't allow comments anywhere else *)
2)	    if ttype = labeldeftype then
2)	      begin			(* a label *)
2)	      slabel := lab;		(* copy pointer to label *)
2)	      cursorLine := cursorLine + 1;
2)	      eGetToken;			(* move on to start of new statement? *)
2)	      if not endOfLine then lcur := lcur + 1;
2)	      if not (stOk or nextLine.stmntp or (clOk and (ttype = reswdtype) and
2)		      (((rtype = filtype) and (filler = defertype)) or
2)		       ((rtype = stmnttype) and (stmnt = cmtype))) )) then
2)		begin
2)		pp20L(' Can''t have a label ',20); pp5('here ',4); ppLine;
2)		if endOfLine then nogood := true;	(* maybe there's something else? *)
2)		end
***************


**** File 1) EDIT.PAS[AL,HE]/61P/131L
1)		j := cursor;
1)		b := elseTest;
1)		if not b then
1)		  begin			(* add an empty statement *)
1)		  if not fparse then flushSemi;
1)		  for i := j to cursor do  (* update part of cursor stack that was *)
1)		   with cursorStack[i] do  (* just added to the stack by elseTest *)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 61,54

1)		    if stmntp then st↑.nlines := st↑.nlines + 1;
1)		  sp := cursorStack[cursor].st;
1)		  sp↑.els := getEmptyStmnt;
1)		  sp := sp↑.els;
1)		  curline := cursorLine;	(* & update cursor stack *)
**** File 2) EDIT.PAS[EAL,HE]/54P/95L
2)		l := cursorLine;
2)		lastStmnt(1,true);		(* back up to previous statement *)
2)		cursorLine := l;
2)		b := true;
2)		i := cursor;
2)		while (i > 1) and b do	(* look for an IF with no ELSE *)
2)		 begin
2)		 with cursorStack[i] do
2)		  if stmntp then
2)		    if l < cline + st↑.nlines then i := 0		(* inside stmnt *)
2)		     else if st↑.stype = iftype then b := st↑.els <> nil;
2)		 if b then i := i - 1;
2)		 end;
2)		if not b then
2)		  begin			(* add an empty statement *)
2)		  flushSemi;
2)		  sp := cursorStack[i].st;
2)		  sp↑.nlines := sp↑.nlines + 1;
2)		  sp↑.els := getEmptyStmnt;
2)		  sp := sp↑.els;
2)		  cursor := i;
2)		  curline := cursorLine;	(* & update cursor stack *)
***************


**** File 1) EDIT.PAS[AL,HE]/61P/157L
1)		  pp20L(' Can''t have an "ELSE',20); pp10('" here    ',6); errprnt;
1)		  nogood := true;
1)		  end
1)		 else
1)		  begin
1)		  getToken;
1)		  if endOfLine then cursorLine := cursorLine - 1;
1)		  end
1)		end;
**** File 2) EDIT.PAS[EAL,HE]/54P/131L
2)		  pp20L(' Can''t have an "ELSE',20); pp10('" here    ',6); ppLine;
2)		  nogood := true;
2)		  end
2)		 else eGetToken;
2)		end
2)	       else if filler = thentype then
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 61,54

2)		begin
2)	    (* *** must be after a deproach or via clause *** *)
2)		end;
***************


**** File 1) EDIT.PAS[AL,HE]/61P/178L
1)		  deleteLines(ocur,1,1);		(* flush the extra line *)
1)		  if not fparse then
1)		    begin
1)		    l := cursorLine - topDline + 1;	(* offset into line array *)
1)		    relLine(lines[l]);			(* release old line *)
1)		    lines[l] := nil;
1)		    end
1)		   else if cursor = 3 then endOfLine := true;
1)		  end
1)		 else
1)		  begin
1)		  pp20L('Can''t have an END/CO',20); pp10('END here  ',8); errprnt;
1)		  flushp := true;
1)		  nogood := true;
1)		  end;
1)		end
1)	       else if (stmnt = definetype) or (stmnt = requiretype) then
1)		begin
1)		pp20L('Can''t handle DEFINE ',20); pp20('or REQUIRE yet...   ',17);
1)		errprnt;
1)		flushp := true;
1)		nogood := true;
1)		end
**** File 2) EDIT.PAS[EAL,HE]/54P/152L
2)		  if not emptyp then
2)		    deleteLines(ocur,1,1);		(* flush the extra line *)
2)		  l := cursorLine - topDline + 1;	(* offset into line array *)
2)		  relLine(lines[l]);			(* release old line *)
2)		  lines[l] := nil;
2)		  end
2)		 else
2)		  begin
2)		  pp20L('Can''t have an END/CO',20); pp10('END here  ',8); ppLine;
2)		  nogood := true;
2)		  end;
2)		end
***************


**** File 1) EDIT.PAS[AL,HE]/61P/214L
1)			with cursorStack[cursor-1] do
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 61,54

1)			 if (not stmntp) and (nd↑.ntype = procdefnode) then
1)			   level := nd↑.level + 1
1)			  else level := curBlock↑.level + 1;
1)			numvars := 0;
**** File 2) EDIT.PAS[EAL,HE]/54P/177L
2)			level := curBlock↑.level + 1;
2)			numvars := 0;
***************


**** File 1) EDIT.PAS[AL,HE]/61P/238L
1)			icond := checkArg(exprParse,svaltype);
1)			exprs := evalOrder(icond,nil,true);
1)			els := nil;
1)			thn := getEmptyStmnt;
1)			nlines := nlines + 1;
1)			getToken;
1)			if not endOfLine then
1)			  if (ttype <> reswdtype) or (rtype <> filtype) or
1)			     (filler <> thentype) then
1)			    begin
1)			    pp20L(' Need a "THEN" here ',19); errprnt;
1)			    backUp := true
**** File 2) EDIT.PAS[EAL,HE]/54P/198L
2)			icond := checkArg(eExprParse,svaltype);
2)			exprs := evalOrder(icond,nil,true);
2)			els := nil;
2)			thn := getEmptyStmnt;
2)			nlines := nlines + 1;
2)			eGetToken;
2)			if not endOfLine then
2)			  if (ttype <> reswdtype) or (rtype <> filtype) or 
2)			     (filler <> thentype) then
2)			    begin
2)			    pp20L(' Need a "THEN" here ',19); ppLine;
2)			    backUp := true
***************


**** File 1) EDIT.PAS[AL,HE]/61P/258L
1)			  forParse(sp);
1)			  end
1)			 else
1)			  begin
1)			  body := getEmptyStmnt;
1)			  cond := checkArg(exprParse,svaltype);
1)			  exprs := evalOrder(cond,nil,true);
1)			  end;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 61,54

1)			getDo;
1)			end;
**** File 2) EDIT.PAS[EAL,HE]/54P/218L
2)			  eForParse(sp);
2)			  end
2)			 else
2)			  begin
2)			  body := getEmptyStmnt;
2)			  cond := checkArg(eExprParse,svaltype);
2)			  exprs := evalOrder(cond,nil,true);
2)			  end;
2)			eGetToken;
2)			if not endOfLine then
2)			  if (ttype <> reswdtype) or (rtype <> filtype) or 
2)			     (filler <> dotype) then
2)			    begin
2)			    pp20L(' Need a "DO" here   ',17); ppLine;
2)			    backUp := true
2)			    end;
2)			end;
***************


**** File 1) EDIT.PAS[AL,HE]/61P/282L
1)			returnParse(sp);
1)			end;
1)	pausetype:	begin
1)			ptime := checkArg(exprParse,svaltype);
1)			dimCheck(ptime,timedim↑.dim);	(* right dimension? *)
1)			exprs := evalOrder(ptime,nil,true);
1)			end;
1)	printtype,
1)	prompttype,
1)	aborttype,
1)	saytype:	begin
1)			pnode↑.arg2 := nil;
1)			getArgs(pnode);	(* pretend we just saw a queryop *)
1)			plist := pnode↑.arg2;	(* store away pointer to print list *)
1)			if plist <> nil then
1)			  begin
1)			  exprs := evalOrder(plist,nil,false);
1)			  setUpNewStmnt;
1)			  end;
1)			debugLev := 0;		(* for abort *)
1)			end;
1)	affixtype:	begin
1)			fieldNum := 1;
1)			affixParse(sp);
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 61,54

1)			setUpNewStmnt;	(* check if it'll take two lines to print *)
1)			end;
1)	unfixtype:	begin
1)			unfixParse(sp);
1)			end;
1)	signaltype,
1)	waittype:	waitParse(sp);
1)	movetype,
1)	opentype,
1)	closetype,
1)	centertype,
1)	floattype,
1)	operatetype:	begin
1)			clauses := nil;
1)			moveParse(sp,true);
1)			end;
1)	setbasetype,
1)	stoptype:	begin
1)			stopParse(sp);
1)			end;
**** File 2) EDIT.PAS[EAL,HE]/54P/249L
2)			eReturnParse(sp);
2)			end;
2)	pausetype:	begin
2)			ptime := checkArg(eExprParse,svaltype);
2)			eDimCheck(ptime,timedim↑.dim);	(* right dimension? *)
2)			exprs := evalOrder(ptime,nil,true);
2)			end;
2)	printtype,
2)	prompttype,
2)	aborttype:	begin
2)			pnode↑.arg2 := nil;
2)			eGetArgs(pnode);	(* pretend we just saw a queryop *)
2)			plist := pnode↑.arg2;	(* store away pointer to print list *)
2)			if plist <> nil then
2)			  begin
2)			  exprs := evalOrder(plist,nil,false);
2)			  setUp := true;
2)			  setCursor := false;
2)			  curLine := 1;
2)			  putStmnt(sp,nextLine.ind,99);	(* see how long we are *)
2)			  setUp := false;
2)			  end;
2)			debugLev := 0;		(* for abort *)
2)			end;
2)	affixtype:	begin
2)			fieldNum := 1;
2)			eAffixParse(sp);
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 61,54

2)			setUp := true;	(* check if it'll takes two lines to print *)
2)			putStmnt(sp,cursorStack[cursor].ind,99);
2)			setUp := false;
2)			end;
2)	unfixtype:	begin
2)			eUnfixParse(sp);
2)			end;
2)	signaltype,
2)	waittype:	begin
2)			event := checkArg(eExprParse,eventtype);
2)			exprs := nil;
2)			with event↑ do			(* make sure it's a variable *)
2)			 if not (((ntype = leafnode) and (ltype = varitype)) or
2)				 ((ntype = exprnode) and (op = arefop))) then
2)			   begin		(* no good *)
2)			   pp20L(' Need an event varia',20); pp10('ble here  ',8); ppLine;
2)			   relExpr(event);
2)			   event := nil;
2)			   end
2)			  else
2)			   if ntype <> leafnode then exprs := evalOrder(arg2,nil,true);
2)			end;
2)	movetype,
2)	opentype,
2)	closetype,
2)	centertype,
2)	operatetype:	begin
2)			clauses := nil;
2)			eMoveParse(sp,true);
2)			end;
2)	stoptype:	begin
2)			eStopParse(sp);
2)			end;
***************


**** File 1) EDIT.PAS[AL,HE]/61P/332L
1)			enableParse(sp);
1)			end;
1)	wristtype:	begin
1)			wristParse(sp);
1)			end;
1)	armmagictype:	begin
1)			armmagicParse(sp);
1)			end;
1)	assigntype:	begin				(* shouldn't get here *)
1)			backup := true;
1)			assignParse(sp,nil);
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 61,54

1)			end;
**** File 2) EDIT.PAS[EAL,HE]/54P/315L
2)			eEnableParse(sp);
2)			end;
2)	wristtype:	begin (* wristParse(sp); *) end;
2)	(* nothing to do for: setbasetype *)
2)	assigntype:	begin				(* shouldn't get here *)
2)			backup := true;
2)			eAssignParse(sp);
2)			end;
***************


**** File 1) EDIT.PAS[AL,HE]/61P/354L
1)		 cond := checkArg(exprParse,svaltype);
1)		 exprs := evalOrder(cond,nil,true);
1)		 if not emptyp then
1)		   deleteLines(ocur,1,1);		(* flush the extra line *)
1)		 if not fParse then
1)		   begin
1)		   l := cursorLine - topDline + 1;	(* offset into line array *)
1)		   relLine(lines[l]);			(* release old line *)
1)		   lines[l] := nil;
1)		   end;
1)		 end
**** File 2) EDIT.PAS[EAL,HE]/54P/333L
2)		 cond := checkArg(eExprParse,svaltype);
2)		 exprs := evalOrder(cond,nil,true);
2)		 if not emptyp then
2)		   deleteLines(ocur,1,1);		(* flush the extra line *)
2)		 l := cursorLine - topDline + 1;	(* offset into line array *)
2)		 relLine(lines[l]);			(* release old line *)
2)		 lines[l] := nil;
2)		 end
***************


**** File 1) EDIT.PAS[AL,HE]/61P/373L
1)		     cond := checkArg(exprParse,svaltype);
1)		     exprs := evalOrder(cond,nil,true);
**** File 2) EDIT.PAS[EAL,HE]/54P/349L
2)		     cond := checkArg(eExprParse,svaltype);
2)		     exprs := evalOrder(cond,nil,true);
***************


**** File 1) EDIT.PAS[AL,HE]/61P/382L
1)	       else if (filler = totype) or (filler = viatype) or (filler = bytype) or
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 61,54

1)		       (filler = withtype) then
1)		begin
**** File 2) EDIT.PAS[EAL,HE]/54P/358L
2)	       else if (filler = totype) or (filler = viatype) or (filler = withtype) then
2)		begin
***************


**** File 1) EDIT.PAS[AL,HE]/61P/391L
1)		    else if (filler = viatype) or (filler = bytype) then
1)		     begin
1)		     if filler = viatype then ntype := viaptnode else ntype := byptnode;
1)		     vlist := false; via := nil; vclauses := nil; vcode := nil
1)		     end
1)		    else ntype := nullingnode;	(* random choice *)
1)		  mClauseParse(np);
1)		  with cursorStack[cursor-1] do
1)		   if (filler = totype) and (st↑.clauses = np) then
1)		     begin			(* clause should go on previous line *)
1)		     l := cline - topDline + 1;
1)		     if (l > 0) and not fParse then		(* if any *)
1)		       begin
**** File 2) EDIT.PAS[EAL,HE]/54P/366L
2)		    else if filler = viatype then
2)		     begin ntype := viaptnode; vlist := false; via := nil; duration := nil;
2)			   velocity := nil; vcode := nil end
2)		    else ntype := nullingnode;	(* random choice *)
2)		  eMClauseParse(np);
2)		  with cursorStack[cursor-1] do
2)		   if (filler = totype) and (st↑.clauses = np) then
2)		     begin			(* clause should go on previous line *)
2)		     l := cline - topDline + 1;
2)		     if l > 0 then 			(* if any *)
2)		       begin
***************


**** File 1) EDIT.PAS[AL,HE]/61P/419L
1)		  pp20L(' Can''t have a clause',20); pp5(' here',5); errprnt;
1)		  nogood := true;
1)		  flushp := true;
1)		  end;
1)		end
1)	       else if filler = thentype then
1)		begin
1)	    (* *** must be after a deproach or via clause *** *)
1)		if (fieldNum >= 1) and (viaCl <> nil) and (viaCl↑.vcode = nil) then
1)		  begin
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 61,54

1)		  if nextLine.stmntp then
1)		    begin
1)		    np := addNode;		(* easiest way to back up cursorStack *)
1)		    viaCl↑.next := np↑.next;
1)		    relNode(np);		(* now get rid of the unneeded node *)
1)		    end;
1)		  viaCl↑.vcode := thenCode(true,getEmptyStmnt);
1)		  lcur := lcur + 1;
1)		  insertLines(cursorLine,1,1);
1)		  end
1)		 else
1)		  begin
1)		  pp20L('THEN code must be af',20); pp20('ter VIA or BY clause',20);
1)		  errprnt;
1)		  nogood := true;
1)		  flushp := true;
1)		  end;
1)		end
1)	       else if filler = wheretype then
1)		begin
1)		if (fieldNum = 1) and (viaCl↑.vcode <> nil) then viaCl := nil;
1)	        if viaCl <> nil then
1)		  begin
1)		  n := clauseParse(nil,false);		(* get new WHERE clause *)
1)		  if n <> nil then
1)		    begin				(* add it to list *)
1)		    np := viaCl↑.vclauses;
1)		    if fieldNum = 2 then		(* new head of list *)
1)		      begin n↑.next := np; viaCl↑.vclauses := n end
1)		     else if fieldNum > 2 then
1)		      begin				(* add after Ith clause *)
1)		      for i := 4 to fieldNum do np := np↑.next;
1)		      n↑.next := np↑.next;
1)		      np↑.next := n;
1)		      end
1)		     else
1)		      begin				(* add after last clause *)
1)		      np := addNode;		(* easiest way to back up cursorStack *)
1)		      relNode(np);		(* now get rid of the unneeded node *)
1)		      viaCl↑.next := nil;
1)		      np := viaCl↑.vclauses;
1)		      if np = nil then viaCl↑.vclauses := n
1)		       else
1)			begin
1)			while np↑.next <> nil do np := np↑.next; (* find last clause *)
1)			np↑.next := n;
1)			end;
1)		      n↑.next := nil;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 61,54

1)		      end;
1)		    moveOrder(cursorStack[cursor-1].st);
1)		    end;
1)		  end
1)		 else
1)		  begin
1)		  pp20L('WHERE must be after ',20); pp20('a VIA or BY clause  ',18);
1)		  errprnt;
1)		  nogood := true;
1)		  flushp := true;
1)		  end;
1)		end
1)	       else if filler = defertype then
1)		begin
1)		getToken;
1)		if (ttype = reswdtype) and (rtype = stmnttype) and (stmnt = cmtype) then
1)		  begin
1)		  addCmon(true);
1)		  end
1)		 else if endOfLine and (not fParse) and
1)			 nextLine.stmntp and (nextLine.st↑.stype = cmtype) then
**** File 2) EDIT.PAS[EAL,HE]/54P/392L
2)		  pp20L(' Can''t have a clause',20); pp5(' here',5); ppLine;
2)		  nogood := true;
2)		  end;
2)		end
2)	       else if filler = defertype then
2)		begin
2)		eGetToken;
2)		if (ttype = reswdtype) and (rtype = stmnttype) and (stmnt = cmtype) then
2)		  begin
2)		  addCmon(true);
2)		  end
2)		 else if endOfLine and
2)			 nextLine.stmntp and (nextLine.st↑.stype = cmtype) then
***************


**** File 1) EDIT.PAS[AL,HE]/61P/510L
1)		  nogood := (slabel = nil) and not labp;  (* flush line if no label *)
1)		  if nogood then ocur := ocur + 1;
1)		  end
1)		 else
1)		  begin
1)		  pp20L(' Expecting an ON her',20); ppChar('e'); errprnt;
1)		  nogood := true;
1)		  flushp := true;
1)		  end
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 61,54

**** File 2) EDIT.PAS[EAL,HE]/54P/417L
2)		  nogood := (slabel = nil) and not labp;	(* flush line if no label *)
2)		  if nogood then ocur := ocur + 1;
2)		  end
2)		 else
2)		  begin
2)		  pp20L(' Expecting an ON her',20); ppChar('e'); ppLine;
2)		  nogood := true;
2)		  end
***************


**** File 1) EDIT.PAS[AL,HE]/61P/530L
1)		setUpNewStmnt;
1)		end
**** File 2) EDIT.PAS[EAL,HE]/54P/436L
2)		end
***************


**** File 1) EDIT.PAS[AL,HE]/61P/543L
1)		end
1)	       else if (ttype = identtype) or
1)		       ((ttype = reswdtype) and (rtype = optype)) then
1)		begin
1)		addNewSt(assigntype);
1)		if stOk then assignParse(sp,nil);
1)		end
1)	       else
1)		begin			(* no good - complain *)
1)		pp20L(' Can''t make sense of',20); pp20(' inserted text      ',14); errprnt;
1)		nogood := true;
1)		backup := false;
1)		flushp := true;
1)		end;
**** File 2) EDIT.PAS[EAL,HE]/54P/448L
2)		lcur := 0;		(* reParse will update display *)
2)		end
2)	       else if (ttype = identtype) or
2)		       ((ttype = reswdtype) and (rtype = optype)) then
2)		begin
2)		addNewSt(assigntype);
2)		if stOk then eAssignParse(sp);
2)		end
2)	       else
2)		begin			(* no good - complain *)
2)		pp20L(' Can''t make sense of',20); pp20(' inserted text      ',14); ppLine;
2)		nogood := true;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 61,54

2)		backup := false;	(* ??? *)
2)		end;
***************


**** File 1) EDIT.PAS[AL,HE]/61P/576L
1)		begin pp20L(' Label has nothing t',20); pp10('o label	',7); errprnt end;
1)	    if sParse then j := 0 else j := addNewDeclarations;
1)	    if nogood and (not emptyp) and (ocur = cursorLine) then
**** File 2) EDIT.PAS[EAL,HE]/54P/481L
2)		begin pp20L(' Label has nothing t',20); pp10('o label   ',7); ppLine end;
2)	    j := addNewDeclarations;
2)	    if nogood and (not emptyp) and (ocur = cursorLine) then
***************


**** File 1) EDIT.PAS[AL,HE]/61P/593L
1)	      if not sParse then putStmnt(dprog,0,99)	(* write & display new line *)
1)	       else
1)		begin
1)		cursor := sCursor - 1;
1)		putStmnt(cursorStack[sCursor].st,0,99)
1)		end;
1)	      if fParse then setCursor := false
1)	       else
1)		begin
1)		adjustDisplay;			(* make sure cursor is on screen *)
1)		displayLines(lineNum);
1)		end;
1)	      end;
1)	    firstTime := false;
1)	    flushcomments := false;		(* comments are ok here *)
1)	    if flushp then getToken;
1)	    while flushp and not endOfLine do	(* in case of errors *)
1)	     begin				(* leave things in a "clean" state *)
1)	     if ttype = reswdtype then
1)	       if (stOk and (rtype = stmnttype) and (stmnt <> assigntype)) or
1)		  (clOk and (rtype = filtype) and
1)			    (filler in [totype,viatype,withtype])) then
1)		 begin flushp := false; backup := true end
1)		else getToken			(* try next token *)
1)	      else if (ttype = delimtype) and (ch = ';') then flushp := false
1)	      else getToken;			(* if still bad try next token *)
1)	     end;
1)	    if not sParse then			(* skip semi's *)
1)	      begin
1)	      repeat getToken until (ttype <> delimtype) or (ch <> ';');
1)	      backup := true;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 61,54

1)	      end
1)	     else if cursor < sCursor then
1)	      begin
1)	      cursor := sCursor;
1)	      emptyp := false;
1)	      b := not elseTest;		(* ELSE ok here? *)
1)	      if not b then
1)		begin
1)		cursor := sCursor;
1)		descend(cursorStack[sCursor].st);	(* how about a motion clause? *)
1)		with cursorStack[cursor].st↑ do
1)		 b := (movetype <= stype) and (stype <= floattype);
1)		end;
1)	      if b then
1)		begin
1)		getToken;			(* check for ELSE or clause *)
1)		backup := true;
1)		endOfLine := (ttype = delimtype) and (ch = ';');
1)		end
1)	       else endOfLine := true;
1)	      cursor := sCursor;
1)	      end;
1)	    end;
**** File 2) EDIT.PAS[EAL,HE]/54P/498L
2)	      putStmnt(dProg,0,99);		(* write & display new line *)
2)	      adjustDisplay;			(* make sure cursor is on screen *)
2)	      displayLines(lineNum);
2)	      end;
2)	    firstTime := false;
2)	    flushcomments := false;		(* comments are ok here *)
2)	    eGetToken;				(* move on to next stmnt *)
2)	    while (ttype = delimtype) and (ch = ';') do eGetToken;  (* skip semi's *)
2)	    backup := true;
2)	    end;
***************


**** File 1) EDIT.PAS[AL,HE]/61P/653L
1)	  if not sParse then
1)	    begin
1)	    firstTime := true;
1)	    firstLine := 0;
1)	    lastLine := -1;
1)	    setCursor := true;
1)	    curLine := 0;
1)	    putStmnt(dProg,0,99);
1)	    setCursor := false;
1)	    end;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 61,54

1)	 until not again;
**** File 2) EDIT.PAS[EAL,HE]/54P/514L
2)	  firstLine := 0;
2)	  lastLine := -1;
2)	  setCursor := true;
2)	  curLine := 0;
2)	  putStmnt(dProg,0,99);
2)	  setCursor := false;
2)	 until not again;
***************


**** File 1) EDIT.PAS[AL,HE]/62P/5L
1)	     ocur,i,j,dlines: integer; b,bv,reparsep: boolean; pttype: nodetypes;
1)	 procedure resetPC(i,f:integer; st: statementp);
**** File 2) EDIT.PAS[EAL,HE]/55P/5L
2)	     ocur,i,j,dlines: integer; b,bv,reparsep: boolean;
2)	 procedure resetPC(i,f:integer; st: statementp);
***************


**** File 1) EDIT.PAS[AL,HE]/62P/66L
1)	     else if (cline < cursorLine) and (fieldNum = 1) then
1)	      begin				(* delete THEN code *)
1)	(* ** only VIA code for now ** *)
1)	      b := true;
1)	      while b and (nd↑.next <> nil) do	(* find correct VIA/BY node *)
1)	       with nd↑.next↑ do
1)	        if (ntype = nd↑.ntype) and vlist then nd := nd↑.next else b := false;
1)	      if nd↑.vcode↑.stype = signaltype then dlines := 2
1)		else dlines := nd↑.vcode↑.conclusion↑.nlines + 1;
1)	      resetPC(cursorLine+1,cursorLine + dlines - 1,nil);
1)	      freeStatement(nd↑.vcode);
1)	      nd↑.vcode := nil;
1)	      end
1)	     else if (nd↑.ntype = viaptnode) and (fieldNum > 1) then
1)	      begin				(* WHERE clause(s) in VIA *)
1)	      b := true;
1)	      while b and (nd↑.next <> nil) do	(* find correct VIA/BY node *)
1)	       with nd↑.next↑ do
1)	        if (ntype = nd↑.ntype) and vlist then nd := nd↑.next else b := false;
1)	      b := fieldNum = 2;		(* deleting first clause? *)
1)	      n := nd↑.vclauses;		(* find clause in list *)
1)	      if b then np := n
1)	       else begin for i := 4 to fieldNum do n := n↑.next; np := n↑.next end;
1)	      j := 1;
1)	      while (j <= arg) and (np <> nil) do
1)	       begin				(* delete them *)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 62,55

1)	       with np↑ do
1)		begin
1)		dlines := dlines + 1;		(* how many lines are we deleting *)
1)		no := next;
1)		next := nil;	(* so freeNode doesn't clobber remaining clauses *)
1)		end;
1)	       freeNode(np);
1)	       np := no;
1)	       j := j + 1;
1)	       end;
1)	      if b then nd↑.vclauses := np	(* splice in last clauses *)
1)	       else n↑.next := np;
1)	      moveOrder(cursorStack[cursor-1].st);
1)	      end
1)	     else
**** File 2) EDIT.PAS[EAL,HE]/55P/66L
2)	     else
***************


**** File 1) EDIT.PAS[AL,HE]/62P/117L
1)	       if (np↑.ntype = viaptnode) or (np↑.ntype = byptnode) then
1)		 begin				(* check if VIA/BY list *)
1)		 pttype := np↑.ntype;
1)		 bv := np↑.next <> nil;
1)		 while bv do
1)		  with np↑.next↑ do
1)		   if (ntype = pttype) and vlist then
1)		     begin
1)		     no := np↑.next;
1)		     bv := next <> nil;
1)		     np↑.next := nil;
1)		     freeNode(np);		(* flush front part of VIA/BY list *)
1)		     np := no;
**** File 2) EDIT.PAS[EAL,HE]/55P/77L
2)	       if np↑.ntype = viaptnode then
2)		 begin				(* check if via list *)
2)		 bv := np↑.next <> nil;
2)		 while bv do
2)		  with np↑.next↑ do
2)		   if (ntype = viaptnode) and vlist then
2)		     begin
2)		     no := np↑.next;
2)		     bv := next <> nil;
2)		     np↑.next := nil;
2)		     freeNode(np);		(* flush front part of via list *)
2)		     np := no;
***************
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 62,55



**** File 1) EDIT.PAS[AL,HE]/62P/135L
1)		if ((ntype = viaptnode) or (ntype = byptnode)) and (vcode <> nil) then
1)		  if vcode↑.stype = signaltype then i := 1
**** File 2) EDIT.PAS[EAL,HE]/55P/94L
2)		if (ntype = viaptnode) and (vcode <> nil) then
2)		  if vcode↑.stype = signaltype then i := 1
***************


**** File 1) EDIT.PAS[AL,HE]/62P/151L
1)		  i := cmon↑.nlines - 1;
1)		  flushVar(cmon↑.cdef);		(* flush the cmon variable *)
**** File 2) EDIT.PAS[EAL,HE]/55P/110L
2)		  i := cmon↑.nlines;
2)		  flushVar(cmon↑.cdef);		(* flush the cmon variable *)
***************


**** File 1) EDIT.PAS[AL,HE]/62P/178L
1)	 (* *** need to add ";" to end of last line *** *)
1)	      end
**** File 2) EDIT.PAS[EAL,HE]/55P/137L
2)	      end
***************


**** File 1) EDIT.PAS[AL,HE]/62P/185L
1)	 (* *** need to add ";" to end of last line *** *)
1)	      end
**** File 2) EDIT.PAS[EAL,HE]/55P/143L
2)	      end
***************


**** File 1) EDIT.PAS[AL,HE]/62P/291L
1)	 borderLines;
**** File 2) EDIT.PAS[EAL,HE]/55P/248L
2)	 showCursor(cursorLine-topDline-firstDline+2,1);
2)	 borderLines;
***************


**** File 1) EDIT.PAS[AL,HE]/63P/85L
1)	    borderLines;
**** File 2) EDIT.PAS[EAL,HE]/56P/85L
2)	    showCursor(cursorLine-topDline-firstDline+2,1);
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 63,56

2)	    borderLines;
***************


**** File 1) EDIT.PAS[AL,HE]/65P/44L
1)	procedure flushOldEnvironments (* dLev: integer *);
1)	 var i: integer; p: pdbp;
**** File 2) EDIT.PAS[EAL,HE]/58P/44L
2)	procedure flushOldEnvironments(dLev: integer);
2)	 var i: integer; p: pdbp;
***************


**** File 1) EDIT.PAS[AL,HE]/66P/14L
1)	  if i <= maxChar then nextchar := upperCase(listing[i])
1)	   else nextchar := ' ';
**** File 2) EDIT.PAS[EAL,HE]/59P/14L
2)	  if i <= maxChar then nextchar := eUpperCase(listing[i])
2)	   else nextchar := ' ';
***************


**** File 1) EDIT.PAS[AL,HE]/66P/29L
1)	  if ip <= 6 then begin fname[ip] := ch; ip := ip + 1 end
1)	   else begin pp20L('Bad file name       ',13); ppLine; end;
**** File 2) EDIT.PAS[EAL,HE]/59P/29L
2)	  if ip < 6 then begin fname[ip] := ch; ip := ip + 1 end
2)	   else begin pp20L('Bad file name       ',13); ppLine; end;
***************


**** File 1) EDIT.PAS[AL,HE]/66P/67L
1)	 var i,j,ppn: integer; filnam: cstring; fname: packed array [1..9] of char;
1)	     b: boolean; ch: ascii;
1)	 begin
1)	 fileParse(filnam,ppn);
1)	 if filnam[1] <> ' ' then
1)	   begin
1)	   for i := 1 to 9 do fname[i] := filnam[i];
1)	   reset(outFile,fname,0,ppn);			(* see if file already exists *)
1)	   b := eof(outFile);
1)	   if not b then
1)	     begin					(* yes - it does *)
1)	     pp20('File already exists ',20); pp20('- type "Y" to overwr',20);
1)	     pp10('ite it:   ',9); ppOutNow;
1)	     i := 1;
1)	     ch := exprEditor(dispHeight+ppOffset+1,1,ppBufp,ppBufp,i,0);
1)	     if smartTerminal then			(* deboldify it *)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 66,59

1)	       outLine(dispHeight+ppOffset+1,ppBufp,ppBufp,i);
1)	     for j := ppBufp to ppBufp+i-1 do ppBuf[j] := listing[j];
1)	     j := ppBufp;
1)	     ppBufp := ppBufp + i - 1;
1)	     while (listing[j] = ' ') and (j < ppBufp + i - 1) do j := j + 1;
1)	     b := (listing[j] = 'Y') or (listing[j] = chr(171B));	(* 'Y' or 'y' *)
1)	     if not b then pp10(' - Aborted',10);
1)	     ppLine;
1)	     end;
1)	   if b then
1)	     begin
1)	     rewrite(outFile,fname,0,ppn);		(* open file *)
1)	     outFilep := true;
1)	     firstLine := 0;
1)	     lastLine := dprog↑.nlines + 1;
1)	     curLine := 0;
1)	     putStmnt(dprog,0,99);			(* write program out *)
1)	     outFilep := false;
1)	     break(outFile);
1)	     reset(outFile);				(* close file *)
1)	     end;
1)	   end
**** File 2) EDIT.PAS[EAL,HE]/59P/67L
2)	 var i,ppn: integer; filnam: cstring; fname: packed array [1..9] of char;
2)	 begin
2)	 fileParse(filnam,ppn);
2)	 if filnam[1] <> ' ' then
2)	   begin
2)	   for i := 1 to 9 do fname[i] := filnam[i];
2)	   rewrite(outFile,fname,0,ppn);		(* open file *)
2)	   outFilep := true;
2)	   firstLine := 0;
2)	   lastLine := dprog↑.nlines + 1;
2)	   curLine := 0;
2)	   putStmnt(dprog,0,99);			(* write program out *)
2)	   outFilep := false;
2)	   reset(outFile);				(* close file *)
2)	   end
***************


**** File 1) EDIT.PAS[AL,HE]/66P/116L
1)	   reset(file1,fname,0,ppn);		(* see if file exists *)
1)	   b := eof(file1);			(* does it? *)
1)	   if b and (fname[7] = ' ') and (fname[8] = ' ') and (fname[9] = ' ') then
**** File 2) EDIT.PAS[EAL,HE]/59P/93L
2)	   reset(outFile,fname,0,ppn);		(* see if file exists *)
2)	   b := eof(outFile);			(* does it? *)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 66,59

2)	   if b and (fname[7] = ' ') and (fname[8] = ' ') and (fname[9] = ' ') then
***************


**** File 1) EDIT.PAS[AL,HE]/66P/124L
1)	     reset(file1,fname,0,ppn);	(* see if file exists *)
1)	     b := eof(file1);			(* does it? *)
1)	     end;
1)	   if b then
1)	     begin pp20L('File not found      ',15); ppLine end
1)	    else
1)	     begin
1)	     freeStatement(dprog);			(* release old program *)
1)	     flushOldEnvironments(0);
1)	     makeOuterBlock;				(* & make new one *)
1)	     curLine := 0;
1)	     cursor := 0;
1)	     pushStmnt(dprog,1);			(* set up cursor stack *)
1)	     pushStmnt(dprog↑.pcode,0);
1)	     curPage := 1;
1)	     curFLine := 1;
1)	     pushStmnt(dprog↑.pcode↑.bcode,0);		(* now push the block's END *)
1)	     cursorLine := 2;
1)	     i := ppSize;
1)	     setPPSize(55);				(* use max pp size *)
1)	     clearLine(4);
1)	     fParse := true;
1)	     filedepth := 1;
1)	     errCount := 0;
1)	     readLine;					(* get first line of program *)
1)	     flushcomments := true;			(* don't want any comments yet *)
1)	     getToken;					(* check for outer block *)
1)	     with curToken do
1)	      if (ttype = reswdtype) and (rtype = stmnttype) and 
1)	         (stmnt = blocktype) then dprog↑.pcode↑.blkid := getBlkId
1)	       else backup := true;
1)	     addStmnt(false);				(* read in new program *)
1)	     fParse := false;
1)	     filedepth := 0;
1)	     if errcount = 0 then pp20L('No errors detected  ',18)
1)	      else begin pp20L('Errors detected:    ',17); ppInt(errcount) end;
1)	     ppLine;
1)	     setUpStmnt;
**** File 2) EDIT.PAS[EAL,HE]/59P/101L
2)	     reset(outFile,fname,0,ppn);	(* see if file exists *)
2)	     b := eof(outFile);			(* does it? *)
2)	     end;
2)	   reset(outFile);			(* that's all we needed it for *)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 66,59

2)	   if b then
2)	     begin pp20L('File not found      ',15); ppLine end
2)	    else
2)	     begin
2)	     flushOldEnvironments(0);
2)	     freeStatement(dprog);			(* release old program *)
2)	     i := ppSize;
2)	     setPPSize(55);				(* use max pp size *)
2)	     dprog := Parse(filename,ppn);		(* read in new program *)
2)	     setUpStmnt;
***************


**** File 1) EDIT.PAS[AL,HE]/66P/169L
1)	     end;
1)	   reset(file1);				(* all done with file now *)
1)	   end
**** File 2) EDIT.PAS[EAL,HE]/59P/122L
2)	     end
2)	   end
***************


**** File 1) EDIT.PAS[AL,HE]/67P/5L
1)	 begin
**** File 2) EDIT.PAS[EAL,HE]/60P/5L
2)	     pold: pdbp;
2)	 begin
***************


**** File 1) EDIT.PAS[AL,HE]/67P/12L
1)	     getToken;
1)	     with curToken do
1)	      while ttype = identtype do
1)	       begin
1)	       vp := varLookup(id);		(* look up the variable *)
1)	       if vp <> nil then
1)		 if vp↑.tbits <> 2 then		(* make sure its not a procedure *)
1)		   begin
1)		   backup := true;
1)		   np := exprParse;		(* now go turn it into a node *)
1)		   s := newStatement;
1)		   with s↑ do			(* make up a new assignment stmnt *)
1)		    begin
1)		    stype := evaltype;
1)		    what := np;
1)		    next := s;			(* so dFreePdb doesn't flush us *)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 67,60

1)		    last := s;
1)		    exprs := evalorder(np,nil,true);	(* we want its current value *)
1)		    executeStmnt(s);		(* aval will be set by INTERP *)
1)		    stype := assigntype;
1)		  (* *** if vector then should append dimension info, but... *** *)
1)		    with aval↑ do
1)		     if (ltype = vectype) or (ltype = transtype) then
1)		       v↑.refcnt := v↑.refcnt + 1;	(* so it doesn't disappear *)
1)		    with what↑ do
1)		     if ntype = leafnode then np := nil
1)		      else if op = arefop then np := arg2
1)		      else if arg1↑.ntype = leafnode then np := nil
1)		      else np := arg1↑.arg2;
1)		    if np <> nil then
1)		      np := evalorder(np,nil,true);  (* deal with subscripts *)
1)		    exprs := evalorder(aval,np,true);
1)		    end;
1)		   with cursorStack[cursor] do
1)		    begin
1)		    s↑.next := st;		(* splice in the assignment statement *)
1)		    s↑.last := st↑.last;
1)		    st↑.last := s;
1)		    with s↑.last↑ do
1)		     if next = st then next := s else bcode := s;
1)		    i := cline;
1)		    cline := cline + 1;		(* update where cursor now is *)
1)		    cursorLine := cline;
1)		    end;
1)		   insertLines(i,1,1);		(* make space in display for it *)
1)		   firstLine := i;
1)		   lastLine := i;
1)		   setCursor := false;
1)		   curLine := 0;
1)		   putStmnt(dProg,0,99);		(* write & display new line *)
1)		   adjustDisplay;			(* make sure cursor is on screen *)
1)		   displayLines(lineNum);
1)		   end
1)		  else
1)		   begin
1)		   pp20L('Can''t assign to proc',20); pp10('edure:    ',7);
1)		   prntStrng(id↑.length,id↑.name);
1)		   pp20(' -- will ignore it. ',19); ppLine;
1)		   end
1)		else
1)		 begin
1)		 pp20L('Undefined variable: ',20);
1)		 prntStrng(id↑.length,id↑.name);
1)		 pp20(' -- will ignore it. ',19); ppLine;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 67,60

1)		 end;
1)	       getToken;
1)	       if not endOfLine then
1)		 begin backup := true; getDelim(',') end;
1)	       getToken;		(* get next variable name *)
1)	       end;
1)	     end;
**** File 2) EDIT.PAS[EAL,HE]/60P/13L
2)	     eGetToken;
2)	     with curToken do
2)	      while ttype = identtype do
2)	       begin
2)	       vp := eVarLookup(id);		(* look up the variable *)
2)	       if vp <> nil then
2)		 begin
2)		 np := newNode;
2)		 with np↑ do
2)		  begin
2)		  ntype := leafnode;
2)		  ltype := varitype;
2)		  vari := vp;
2)		  vid := id;
2)		  end;
2)		 pold := getCurInt;
2)		 setCurInt(eCurInt);	(* so we use right process to access var *)
2)		 if vp↑.tbits = 1 then 
2)		   begin			(* it's an array variable *)
2)	  (* ***   read in subscripts *** *)
2)	  (* ***   push subscripts onto stack *** *)
2)	  (* ***   change np node to an arefop *** *)
2)		   pp20L('Can''t handle arrays ',20); pp5('yet  ',3); ppLine;
2)		   end;
2)		 getVal(vp↑.level,vp↑.offset);	(* get its current value *)
2)		 n := pop;
2)		 setCurInt(pold);			(* restore current process *)
2)		 s := newStatement;
2)		 with s↑ do			(* make up a new assignment stmnt *)
2)		  begin
2)		  stype := assigntype;
2)		  what := np;
2)		  aval := n;
2)		(*** * if vector then should append dimension info, but... *** *)
2)		  with n↑ do
2)		   if (ltype = vectype) or (ltype = transtype) then
2)		     v↑.refcnt := v↑.refcnt + 1;	(* so it doesn't disappear *)
2)		  exprs := aval;
2)		  aval↑.next := nil;
2)		  end;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 67,60

2)		 with cursorStack[cursor] do
2)		  begin
2)		  s↑.next := st;		(* splice in the assignment statement *)
2)		  s↑.last := st↑.last;
2)		  st↑.last := s;
2)		  with s↑.last↑ do
2)		   if next = st then next := s else bcode := s;
2)		  i := cline;
2)		  cline := cline + 1;		(* update where cursor now is *)
2)		  cursorLine := cline;
2)		  end;
2)		 insertLines(i,1,1);		(* make space in display for it *)
2)		 firstLine := i;
2)		 lastLine := i;
2)		 setCursor := false;
2)		 curLine := 0;
2)		 putStmnt(dProg,0,99);		(* write & display new line *)
2)		 adjustDisplay;			(* make sure cursor is on screen *)
2)		 displayLines(lineNum);
2)		 end
2)		else
2)		 begin
2)		 pp20L('Undefined variable: ',20);
2)		 prntStrng(id↑.length,id↑.name);
2)		 pp20(' will ignore it.    ',16); ppLine;
2)		 end;
2)	       eGetToken;
2)	       if not endOfLine then
2)		 begin backup := true; eGetDelim(',') end;
2)	       eGetToken;		(* get next variable name *)
2)	       end;
2)	     showCursor(cursorLine-topDline-firstDline+2,1);
2)	     end;
***************


**** File 1) EDIT.PAS[AL,HE]/68P/134L
1)	others:	    begin end;			(* nothing to do *)
1)	(* *** what about cmon's & then code in motion statements ??? *** *)
**** File 2) EDIT.PAS[EAL,HE]/61P/134L
2)	(* *** what about cmon's & then code in motion statements ??? *** *)
***************


**** File 1) EDIT.PAS[AL,HE]/69P/133L
1)	    end
1)	   else if st↑.bad then
1)	    begin pp20('Attempt to execute B',20); pp20('AD statement!       ',13);
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 69,62

1)		  ppLine end;					(* complain *)
1)	  clrTBpts;				(* clear any temporary bpts *)
**** File 2) EDIT.PAS[EAL,HE]/62P/133L
2)	    end;
2)	  clrTBpts;				(* clear any temporary bpts *)
***************


**** File 1) EDIT.PAS[AL,HE]/69P/163L
1)	procedure executeStmnt (* st: statementp *);
1)	 var p: pdbp; sp: statementp;
**** File 2) EDIT.PAS[EAL,HE]/62P/160L
2)	procedure executeStmnt(st: statementp);
2)	 var p: pdbp; sp: statementp;
***************


**** File 1) EDIT.PAS[AL,HE]/69P/186L
1)	 var peval: statementp; b: boolean; np,no: nodep; i: integer;
1)	 begin
**** File 2) EDIT.PAS[EAL,HE]/62P/183L
2)	 var peval: statementp; b: boolean;
2)	 begin
***************


**** File 1) EDIT.PAS[AL,HE]/69P/200L
1)	     else if (n↑.ntype = exprnode) and (n↑.op = dacop) then
1)	      begin
1)	      stype := assigntype;
1)	      what := n;
1)	      end
1)	     else
**** File 2) EDIT.PAS[EAL,HE]/62P/197L
2)	     else
***************


**** File 1) EDIT.PAS[AL,HE]/69P/211L
1)	      n := plist;
1)	      no := n;
1)	      with curToken do
1)	       while (ttype = delimtype) and (ch = ',') do
1)		begin
1)		np := newNode;
1)		with np↑ do
1)		 begin ntype := listnode; next := nil; lval := exprParse end;
1)		if np↑.lval = nil then freeNode(np)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 69,62

1)		 else
1)		  begin
1)		  no↑.next := np;	(* add a new expression to the list *)
1)		  no := np;
1)		  end;	
1)		getToken;		(* look for "," *)
1)		end;
1)	      end;
1)	    exprs := evalOrder(n,nil,false);
1)	    i := addNewDeclarations;
1)	    executeStmnt(peval);	(* have interpreter eval & print it out *)
**** File 2) EDIT.PAS[EAL,HE]/62P/203L
2)	      end;
2)	    exprs := evalOrder(n,nil,false);
2)	    executeStmnt(peval);	(* have interpreter eval & print it out *)
***************


**** File 1) EDIT.PAS[AL,HE]/71P/1L
1)	(* edit: aux routines: getCChar,getEcmd,doSetCmd,collectStmnt,atStmnt,doAtCmd *)
1)	procedure edit;
**** File 2) EDIT.PAS[EAL,HE]/64P/1L
2)	(* edit: aux routines: getCChar, getEcmd, doSetCmd, collectStmnt, atStmnt *)
2)	procedure edit;
***************


**** File 1) EDIT.PAS[AL,HE]/71P/10L
1)	  repeat ch := getChar until ord(ch) <> LF;	(* read in next char *)
1)	  if (ord(ch) = deletekey) or (ord(ch) = (deletekey+128)) then
1)	    ch := chr(ctlH)		(* convert SAIL <bs> to ASCII <bs> *)
1)	   else if ord(ch) = sailundline then ch := chr(undline);  (* SAIL underbar *)
1)	  iCh := ord(ch);
1)	  if (version = 10) and (iCh >= 128) then
1)	    begin				(* SAIL cntl char *)
1)	    if ((ord('A')+128) <= iCh) and (iCh <= (ord('Z')+128)) then
1)		iCh := iCh - (ord('@')+128)		(* make into cntl-char *)
1)	     else if ((smallA+128) <= iCh) and (iCh <= (smallZ+128)) then
1)		iCh := iCh - (127+smallA)
1)	     else if chr(iCh-128) in [' ','↑','<','>','[','?','@','!'] then
1)		iCh := iCh - 128
1)	     else if iCh = (ord('\')+128) then iCh := ctlBslash
1)	     else if iCh = (VT+128) then iCh := ctlU	(* make ↑vt into ↑U *)
1)	     else if iCh = (FF+128) then iCh := ctlW;	(* make ↑ff into ↑W *)
1)	    ch := chr(iCh);
1)	    end;
1)	  if (iCh < ord(' ')) and (iCh <> CR) then
1)	    begin				(* ASCII cntl char *)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 71,64

1)	    ppChar('↑');
1)	    iCh := iCh + ord('@');		(* Convert to normal char *)
1)	    end;
**** File 2) EDIT.PAS[EAL,HE]/64P/10L
2)	  repeat ch := getChar until ord(ch) <> 12B;	(* read in next char *)
2)	  if (ord(ch) = 177B) or (ord(ch) = 377B) then
2)	    ch := chr(10B)		(* convert SAIL <bs> to ASCII <bs> *)
2)	   else if ord(ch) = 30B then ch := chr(137B);	(* SAIL underbar *)
2)	  iCh := ord(ch);
2)	  if iCh >= 200B then
2)	    begin				(* SAIL cntl char *)
2)	    if (300B < iCh) and (iCh <= 332B) then iCh := iCh - 300B (* make into cntl-char *)
2)	     else if (340B < iCh) and (iCh < 373B) then iCh := iCh - 340B
2)	     else if chr(iCh-200B) in [' ','↑','<','>','[','?','@','!'] then
2)		iCh := iCh - 200B
2)	     else if iCh = 334B then iCh := 34B		(* make ↑\ into ↑\ *)
2)	     else if iCh = 213B then iCh := 25B		(* make ↑vt into ↑U *)
2)	     else if iCh = 214B then iCh := 27B;	(* make ↑ff into ↑W *)
2)	    ch := chr(iCh);
2)	    end;
2)	   if (iCh < 40B) and (iCh <> 15B) then
2)	    begin				(* ASCII cntl char *)
2)	    ppChar('↑');
2)	    iCh := iCh + 100B;
2)	    end;
***************


**** File 1) EDIT.PAS[AL,HE]/71P/40L
1)	  getToken;			(* see what user wants us to do *)
1)	  with curToken do
**** File 2) EDIT.PAS[EAL,HE]/64P/38L
2)	  eGetToken;			(* see what user wants us to do *)
2)	  with curToken do
***************


**** File 1) EDIT.PAS[AL,HE]/71P/47L
1)		else if stmnt = cmtype then
1)		 begin rtype := filtype; filler := ontype end
1)	       end
1)	      else if rtype = filtype then
1)	       if filler = steptype then
1)		 begin rtype := edittype; ed := stepcmd end
1)		else if filler = attype then
1)		 begin rtype := edittype; ed := atcmd end
1)	  end;
**** File 2) EDIT.PAS[EAL,HE]/64P/45L
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 71,64

2)	        else if stmnt = cmtype then
2)		 begin rtype := filtype; filler := ontype end
2)	       end
2)	      else if (rtype = filtype) and (filler = steptype) then
2)	       begin rtype := edittype; ed := stepcmd end
2)	  end;
***************


**** File 1) EDIT.PAS[AL,HE]/71P/68L
1)	     else if endOfLine then
1)	      begin arg := default; b := true end	(* use default value *)
**** File 2) EDIT.PAS[EAL,HE]/64P/63L
2)	     else if endOfLine then 
2)	      begin arg := default; b := true end	(* use default value *)
***************


**** File 1) EDIT.PAS[AL,HE]/71P/96L
1)	    else if (ttype = reswdtype) and (rtype = stmnttype) and
1)		    (stmnt = waittype) then begin svar := nowaittype; arg := -1 end
**** File 2) EDIT.PAS[EAL,HE]/64P/91L
2)	    else if (ttype = reswdtype) and (rtype = stmnttype) and 
2)		    (stmnt = waittype) then begin svar := nowaittype; arg := -1 end
***************


**** File 1) EDIT.PAS[AL,HE]/71P/111L
1)		      if b then
1)			begin (* *** ??? what do we do ??? *** *) end;
**** File 2) EDIT.PAS[EAL,HE]/64P/106L
2)		      if b then 
2)			begin (* *** ??? what do we do ??? *** *) end;
***************


**** File 1) EDIT.PAS[AL,HE]/71P/135L
1)	     if stmntp and cursorStack[cursor-1].stmntp and
1)		(cursorStack[cursor-1].st↑.stype = blocktype) then
**** File 2) EDIT.PAS[EAL,HE]/64P/130L
2)	     if stmntp and cursorStack[cursor-1].stmntp and 
2)		(cursorStack[cursor-1].st↑.stype = blocktype) then
***************


**** File 1) EDIT.PAS[AL,HE]/71P/177L
1)	 procedure doAtCmd;
1)	  var np: nodep; b: boolean; s: statementp;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 71,65

1)	  begin
1)	  b := false;
1)	  with cursorStack[cursor] do		(* check pointing at AFFIX statement *)
1)	   begin
1)	   if stmntp then b := st↑.stype = affixtype;
1)	   if b then
1)	     begin
1)	     np := newNode;
1)	     with np↑ do
1)	      begin
1)	      ntype := exprnode;
1)	      op := ttmulop;
1)	      arg1 := st↑.frame1;
1)	      arg2 := newNode;
1)	      arg3 := nil;
1)	      end;
1)	     with np↑.arg2↑ do
1)	      begin
1)	      ntype := exprnode;
1)	      op := tinvrtop;
1)	      arg1 := st↑.frame2;
1)	      arg2 := nil;
1)	      arg3 := nil;
1)	      end;
1)	     s := newStatement;
1)	     with s↑ do			(* make up a new assignment stmnt *)
1)	      begin
1)	      stype := evaltype;
1)	      what := np;
1)	      exprs := evalOrder(np,nil,true);	(* we want its current value *)
1)	      next := s;			(* so dFreePdb doesn't flush us *)
1)	      last := s;
1)	      executeStmnt(s);			(* aval will be set by INTERP *)
1)	      relNode(np↑.arg2);
1)	      relNode(np);
1)	      np := aval;
1)	      aval↑.t↑.refcnt := 1;		(* so it doesn't disappear *)
1)	      end;
1)	     relStatement(s);			(* done with it now *)
1)	     with st↑ do
1)	      begin
1)	      if atexp <> nil then freeNode(atexp);	(* release any old AT expr *)
1)	      atexp := np;
1)	      with frame1↑ do
1)	       if ntype = leafnode then np := nil
1)		else np := evalOrder(arg2,nil,true);	(* push array subscripts *)
1)	      with frame2↑ do
1)	       if ntype <> leafnode then np := evalOrder(arg2,np,true);
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 71,65

1)	      if byvar <> nil then
1)	      with byvar↑ do
1)	       if ntype <> leafnode then np := evalOrder(arg2,np,true);
1)	      exprs := evalOrder(atexp,np,true);
1)	      end;
1)	     reFormatStmnt(st,ind,cursorLine);		(* may have changed nlines *)
1)	     end
1)	    else
1)	     begin pp20L('Must be pointing at ',20); pp20('an AFFIX statement  ',18);
1)		   ppLine end;
1)	   end;
1)	  end;
1)	(* main editing routine: edit *)
1)	 begin
1)	 makeOuterBlock;			(* Make initial BEGIN-END block *)
1)	 setCursor := true;
1)	 cursorLine := 2;
1)	 oc := 1;
1)	 lineNum := 1;
1)	 oldcline := 1;
1)	 oldline := 1;
1)	 topDline := 0;
1)	 botDline := 0;
1)	 displayLines(lineNum);			(* show first window *)
1)	 done := false;
1)	 repeat
1)	  showCursor(cursorLine-topDline-firstDline+2,1);	(* shift cursor *)
1)	  if cursorLine <> oc then
1)	    begin
1)	    if smartTerminal then
1)	      begin
1)	      outChar(cursorLine-topDline-firstDline+2,1,'>',false); (* other cursor *)
1)	      if (topDline+firstDline-1 <= oc) and
1)		 (oc <= topDline+firstDline+dispHeight-2) then
1)		with lines[oc-topDline+1]↑ do	(* for bad stmnts redisplay the "!" *)
1)		 outChar(oc-topDline-firstDline+2,1,listing[start],false);
1)	      end
1)	     else
1)	      begin
1)	      with lines[cursorLine-topDline+1]↑ do		(* show ">" cursor *)
1)	       begin
1)	       ch := listing[start];			(* remember first char of line *)
1)	       listing[start] := '>';			(* display cursor *)
1)	       out1Line(cursorLine-topDline-firstDline+2,start,length);
1)	       listing[start] := ch;			(* restore things *)
1)	       end;
1)	      if (topDline+firstDline-1 <= oc) and
1)		 (oc <= topDline+firstDline+dispHeight-2) then
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 71,65

1)		with lines[oc-topDline+1]↑ do	(* for bad stmnts redisplay the "!" *)
1)		 out1Line(oc-topDline-firstDline+2,start,length);
1)	      end
1)	    end;
1)	  okp := true;
**** File 2) EDIT.PAS[EAL,HE]/65P/1L
2)	(* main editing routine: edit *)
2)	 begin
2)	 dprog := newStatement;			(* Make initial BEGIN-END block *)
2)	 with dprog↑ do
2)	  begin
2)	  stype := progtype;
2)	  pcode := newStatement;
2)	  with pcode↑ do
2)	   begin
2)	   stype := blocktype;
2)	   blkid := nil;
2)	   level := 1;
2)	   numvars := 0;
2)	   variables := nil;
2)	   bparent := nil;
2)	   end;
2)	  appendEnd(pcode,pcode);
2)	  with pcode↑ do bcode := next;
2)	  errors := 0;
2)	  appendEnd(dprog,pcode);
2)	  end;
2)	 setUpStmnt;
2)	 reInitScreen;
2)	 echo(false);				(* turn off echoing *)
2)	 ppBufp := 0;
2)	 oppBufp := 0;
2)	 ppOffset := 1;
2)	 ppSize := 3;
2)	 dispHeight := screenHeight - 5;
2)	 for i := 1 to maxPPLines do 
2)	  begin					(* re-initialize page printer *)
2)	  relLine(ppLines[i]);
2)	  ppLines[i] := nil;
2)	  end;
2)	 pp20('AL test system      ',14); ppLine;
2)	 setCursor := true;
2)	 cursorLine := 2;
2)	 lineNum := 1;
2)	 oldcline := 1;
2)	 oldline := 1;
2)	 topDline := 0;
2)	 botDline := 0;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 71,65

2)	 displayLines(lineNum);		(* show first window *)
2)	 done := false;
2)	 repeat
2)	  okp := true;
***************


**** File 1) EDIT.PAS[AL,HE]/72P/49L
1)	  if (version = 10) and ((iCh = (ord('+')+128)) or (iCh = (ord('-')+128))) then
1)	    begin				(* for SAIL <ctrl>+ or <ctrl>- *)
1)	    minus := iCh = (ord('-')+128);
1)	    ch := getCChar;
1)	    iCh := ord(ch);
1)	    end;
1)	  if iCh = ctlBslash then		(* ↑\ *)
1)	    begin				(* get repeat count *)
**** File 2) EDIT.PAS[EAL,HE]/65P/54L
2)	  if (iCh = 253B) or (iCh = 255B) then	(* for SAIL <ctrl>+ or <ctrl>- *)
2)	    begin
2)	    minus := iCh = 255B;
2)	    ch := getCChar;
2)	    iCh := ord(ch);
2)	    end;
2)	  if iCh = 34B then			(* ↑\ *)
2)	    begin				(* get repeat count *)
***************


**** File 1) EDIT.PAS[AL,HE]/72P/71L
1)	   else if (version = 10) and
1)		   (((ord('0')+128) <= iCh) and (iCh <= (ord('9')+128))) then
1)	    begin			(* get repeat count -- for SAIL <cntl><digit> *)
1)	    arg := 0;
1)	    repeat
1)	     arg := 10*arg + iCh-260B;		(* get next digit *)
1)	     ch := getCChar;
1)	     iCh := ord(ch);
1)	    until ((ord('0')+128) > iCh) or (iCh > (ord('9')+128));
1)	    end
1)	   else arg := 1;
1)	  if minus then arg := -arg;
1)	  if (iCh <= ord(' ')) or (ch in ['↑','<','>','[','?','@','!']) then
1)	    begin (* Handle single-character commands here.. Mostly editor commands *)
1)	    if iCh < ord(' ') then ch := chr(iCh + 64);	(* Convert control to normal *)
1)	    case ch of
1)	'E':	done := true;
1)	'V':	begin
1)		redrawDisplay;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 72,65

1)		oc := 0;			(* so we'll redisplay ">" cursor *)
1)		end;
1)	'L':	begin
**** File 2) EDIT.PAS[EAL,HE]/65P/76L
2)	   else if (260B <= iCh) and (iCh <= 272B) then	(* for SAIL <cntl><digit> *)
2)	    begin				(* get repeat count *)
2)	    arg := 0;
2)	    repeat
2)	     arg := 10*arg + iCh-260B;		(* get next digit *)
2)	     ch := getCChar;
2)	     iCh := ord(ch);
2)	    until (260B > iCh) or (iCh > 272B);
2)	    end
2)	   else arg := 1;
2)	  if minus then arg := -arg;
2)	  if (iCh <= 40B) or (ch in ['↑','<','>','[','?','@','!']) then
2)	    begin (* Handle single-character commands here.. Mostly editor commands *)
2)	    if iCh < 40B then ch := chr(iCh + 100B);
2)	    case ch of
2)	'E':	done := true;
2)	'V':	redrawDisplay;
2)	'L':	begin
***************


**** File 1) EDIT.PAS[AL,HE]/72P/167L
1)		oc := 0;				(* so we'll redisplay ">" cursor *)
1)		end;
**** File 2) EDIT.PAS[EAL,HE]/65P/168L
2)		end;
***************


**** File 1) EDIT.PAS[AL,HE]/72P/196L
1)		with lines[oc-topDline+1]↑ do	(* for bad stmnts redisplay the "!" *)
1)		 if smartTerminal then
1)		   outChar(oc-topDline-firstDline+2,1,listing[start],false)
1)		  else
1)		   out1Line(oc-topDline-firstDline+2,start,length);
1)		b := (ch = ' ');
**** File 2) EDIT.PAS[EAL,HE]/65P/196L
2)		b := (ch = ' ');
***************


**** File 1) EDIT.PAS[AL,HE]/72P/222L
1)		oc := 0;				(* so we'll redisplay ">" cursor *)
1)		end;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 72,65

**** File 2) EDIT.PAS[EAL,HE]/65P/217L
2)		showCursor(cursorLine-topDline-firstDline+2,1);
2)		end;
***************


**** File 1) EDIT.PAS[AL,HE]/72P/240L
1)		ch := upperCase (ch); 	(* To upper case *)
1)		ppChar(ch); ppLine;		(* echo it *)
**** File 2) EDIT.PAS[EAL,HE]/65P/235L
2)		if (140B < iCh) and (iCh < 173B) then ch := chr(iCh - 40B);
2)		ppChar(ch); ppLine;		(* echo it *)
***************


**** File 1) EDIT.PAS[AL,HE]/72P/297L
1)	    readPPline(1);
1)	    getEcmd;				(* see what we're being asked to do *)
**** File 2) EDIT.PAS[EAL,HE]/65P/292L
2)	    if not smartTerminal then outline(dispHeight+ppOffset+1,1,1,1);
2)	    i := 1;
2)	    ch := exprEditor(dispHeight+ppOffset+1,1,1,1,i,1);
2)	    if smartTerminal then			(* deboldify it *)
2)	      out1Line(dispHeight+ppOffset+1,1,maxchar);
2)	    for i := 1 to maxChar do ppBuf[i] := listing[i];
2)	    ppBufp := maxChar;
2)	    oppBufp := maxChar;
2)	    ppLine;
2)	    listing[1] := ppBuf[1];		(* fix things up for getToken *)
2)	    listing[maxChar+1] := ' ';
2)	    showCursor(cursorLine-topDline-firstDline+2,1);
2)	    getEcmd;				(* see what we're being asked to do *)
***************


**** File 1) EDIT.PAS[AL,HE]/72P/304L
1)	getcmd:     begin
1)		    readProg;		(* Read in new program from file *)
1)		    oc := 0;
1)		    end;
1)	definecmd:  varDefine;		(* write Definitions for the specified vars *)
1)	(* insertcmd,renamecmd.... *)
1)	setcmd:	    doSetcmd;		(* change appropriate system var *)
**** File 2) EDIT.PAS[EAL,HE]/65P/310L
2)	getcmd:     readProg;		(* Read in new program from file *)
2)	definecmd:  varDefine;		(* write Definitions for the specified vars *)
2)	(* insertcmd,renamecmd,executecmd... *)
2)	setcmd:	    doSetcmd;		(* change appropriate system var *)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 72,65

***************


**** File 1) EDIT.PAS[AL,HE]/72P/380L
1)	atcmd:	    doAtCmd;
1)	calibratecmd:
1)		    calibrate;
1)	others:     begin			(* ??? *)
**** File 2) EDIT.PAS[EAL,HE]/65P/383L
2)	others:     begin			(* ??? *)
***************


**** File 1) EDIT.PAS[AL,HE]/72P/398L
1)		   sParse := true;
1)		   fParse := true;
1)		   backup := true;
1)		   s := newStatement;
1)		   s↑.stype := emptytype;
1)		   curLine := 0;
1)		   pushStmnt(s,0);		(* so addStmnt will work right *)
1)		   sCursor := cursor;
1)		   i := cursorLine;
1)		   cursorLine := 1;
1)		   newDeclarations := nil;
1)		   addStmnt(false);
1)		   cursor := sCursor - 1;	(* restore cursor *)
1)		   cursorLine := i;
1)		   sParse := false;
1)		   fParse := false;
1)		   i := addNewDeclarations;
**** File 2) EDIT.PAS[EAL,HE]/65P/398L
2)		   i := cursor;
2)		   s := eStmntParse(curBlock,newDeclarations,curProc);
2)		   showCursor(cursorLine-topDline-firstDline+2,1);
2)		   i := addNewDeclarations;
***************


**** File 1) EDIT.PAS[AL,HE]/72P/426L
1)	       n := exprParse;		(* see what we're to evaluate *)
1)	       getToken;		(* & check if it's followed by an ":=" *)
1)	       if (ttype = reswdtype) and (rtype = stmnttype) and
1)		  (stmnt = assigntype) then	(* Is it an assignment? *)
1)		 begin				(* Yes - need to parse it *)
1)		 s := newStatement;
1)		 s↑.stype := assigntype;
1)		 sParse := true;
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 72,65

1)		 fParse := true;
1)		 backup := true;
1)		 assignParse(s,n);
1)		 sParse := false;
1)		 fParse := false;
1)		 i := addNewDeclarations;
1)		 collectStmnt(s);		(* if collecting add stmnt to prog *)
1)		 executeStmnt(s);		(* go do it *)
1)		 end
1)		else pevalExpr(n);		(* eval & print out expr *)
1)	       end
1)	    end;
1)	  if (oc <> 0) and (abs(cursorLine-oc) > 4) then
1)	    begin
1)	    oldcline := oc;			(* remember for "O" command *)
1)	    oldline := ol;
**** File 2) EDIT.PAS[EAL,HE]/65P/413L
2)	       newVarOk := false;	(* don't accept undefined variables *)
2)	       n := eExprParse;		(* see what we're to evaluate *)
2)	       eGetToken;		(* & check if it's followed by an ":=" *)
2)	       newVarOk := true;
2)	       if newDeclarations <> nil then
2)		 begin
2)		 b := false;
2)		 s := newDeclarations;
2)		 newDeclarations := nil;
2)		 repeat
2)		  s↑.variables↑.vtype := freevartype;
2)		  s↑.variables↑.name := nil;
2)		  sp := s;
2)		  s := s↑.last;
2)		  relStatement(sp);
2)		 until s↑.stype = blocktype;
2)		 end
2)		else b := true;
2)	       if (ttype = reswdtype) and (rtype = stmnttype) and	(* If it's an asst *)
2)		  (stmnt = assigntype) then
2)		 begin				(* have parser parse it *)
2)		 relExpr(n);			(* don't need this any more *)
2)		 i := cursor;
2)		 s := eStmntParse(curBlock,newDeclarations,curProc);
2)		 showCursor(cursorLine-topDline-firstDline+2,1);
2)		 i := addNewDeclarations;
2)		 if s↑.stype = emptytype then relStatement(s)
2)		  else
2)		   begin
2)		   collectStmnt(s);		(* if collecting add stmnt to prog *)
2)		   executeStmnt(s);		(* go do it *)
  1) EDIT.PAS[AL,HE] and 2) EDIT.PAS[EAL,HE]	3-22-83 14:12	pages 72,65

2)		   end;
2)		 end
2)		else if b then pevalExpr(n)	(* eval & print out expr *)
2)		else
2)		 begin
2)		 relExpr(n);				(* flush bad expr *)
2)		 pp20('Undefined variable(s',20); pp20(') - bad expression  ',18); ppLine;
2)		 end;
2)	       end
2)	    end;
2)	  if abs(cursorLine-oc) > 4 then
2)	    begin
2)	    oldcline := oc;		(* remember for "O" command *)
2)	    oldline := ol;
***************