C									     171
C RATFOR - MAIN PROGRAM FOR RATFOR					     172
C									     173
       CALL PARSE							     174
       STOP								     175
       END								     176
C									       1
C BLOCK DATA - INITIALIZE GLOBAL VARIABLES				       2
C									       3
       BLOCK DATA							       4
       INTEGER EXTDIG							       5
       INTEGER INTDIG							       6
       INTEGER EXTLET							       7
       INTEGER INTLET							       8
       INTEGER EXTBIG							       9
       INTEGER INTBIG							      10
       INTEGER EXTCHR							      11
       INTEGER INTCHR							      12
       INTEGER EXTBLK							      13
       INTEGER INTBLK							      14
       INTEGER BP							      15
       INTEGER BUF							      16
       INTEGER FORDEP							      17
       INTEGER FORSTK							      18
       INTEGER SDO(3), SIF(3), SELSE(5), SWHILE(6), SBREAK(6), SNEXT(5)       19
       INTEGER SFOR(4), SREPT(7), SUNTIL(6)				      20
       INTEGER VDO(2), VIF(2), VELSE(2), VWHILE(2), VBREAK(2), VNEXT(2)       21
       INTEGER VFOR(2), VREPT(2), VUNTIL(2)				      22
       INTEGER LEVEL							      23
       INTEGER LINECT							      24
       INTEGER INFILE							      25
       INTEGER LASTP							      26
       INTEGER LASTT							      27
       INTEGER NAMPTR							      28
       INTEGER TABLE							      29
       INTEGER OUTP							      30
       INTEGER OUTBUF							      31
       COMMON /CCHAR/ EXTDIG(10), INTDIG(10), EXTLET(26), INTLET(26),  E      32
     *XTBIG(26), INTBIG(26), EXTCHR(33), INTCHR(33),  EXTBLK, INTBLK	      33
       COMMON /CDEFIO/ BP, BUF(300)					      34
       COMMON /CFOR/ FORDEP, FORSTK(200)				      35
       COMMON /CKEYWD/ SDO, SIF, SELSE, SWHILE, SBREAK, SNEXT, SFOR, SRE      36
     *PT, SUNTIL, VDO, VIF, VELSE, VWHILE, VBREAK, VNEXT, VFOR, VREPT, V      37
     *UNTIL								      38
       COMMON /CLINE/ LEVEL, LINECT(5), INFILE(5)			      39
       COMMON /CLOOK/ LASTP, LASTT, NAMPTR(200), TABLE(1500)		      40
       COMMON /COUTLN/ OUTP, OUTBUF(81) 				      41
       DATA OUTP /0/							      42
       DATA LEVEL /1/							      43
       DATA LINECT(1) /1/						      44
       DATA INFILE(1) /5/						      45
       DATA BP /0/							      46
       DATA FORDEP /0/							      47
       DATA LASTP /0/							      48
       DATA LASTT /0/							      49
       DATA SDO(1), SDO(2), SDO(3) /100, 111, 10002/			      50
       DATA VDO(1), VDO(2) /10266, 10002/				      51
       DATA SIF(1), SIF(2), SIF(3) /105, 102, 10002/			      52
       DATA VIF(1), VIF(2) /10261, 10002/				      53
       DATA SELSE(1), SELSE(2), SELSE(3), SELSE(4), SELSE(5) /101,  108,      54
     * 115, 101, 10002/ 						      55
       DATA VELSE(1), VELSE(2) /10262, 10002/				      56
       DATA SWHILE(1), SWHILE(2), SWHILE(3), SWHILE(4), SWHILE(5), SWHIL      57
     *E(6) /119, 104, 105, 108, 101, 10002/				      58
       DATA VWHILE(1), VWHILE(2) /10263, 10002/ 			      59
       DATA SBREAK(1), SBREAK(2), SBREAK(3), SBREAK(4), SBREAK(5), SBREA      60
     *K(6) /98, 114, 101, 97, 107, 10002/				      61
       DATA VBREAK(1), VBREAK(2) /10264, 10002/ 			      62
       DATA SNEXT(1), SNEXT(2), SNEXT(3), SNEXT(4), SNEXT(5) /110,  101,      63
     * 120, 116, 10002/ 						      64
       DATA VNEXT(1), VNEXT(2) /10265, 10002/				      65
       DATA SFOR(1), SFOR(2), SFOR(3), SFOR(4) /102,  111, 114, 10002/	      66
       DATA VFOR(1), VFOR(2) /10268, 10002/				      67
       DATA SREPT(1), SREPT(2), SREPT(3), SREPT(4), SREPT(5), SREPT(6),       68
     * SREPT(7) /114, 101, 112, 101, 97, 116, 10002/			      69
       DATA VREPT(1), VREPT(2) /10269, 10002/				      70
       DATA SUNTIL(1), SUNTIL(2), SUNTIL(3), SUNTIL(4), SUNTIL(5), SUNTI      71
     *L(6) /117, 110, 116, 105, 108, 10002/				      72
       DATA VUNTIL(1), VUNTIL(2) /10270, 10002/ 			      73
       DATA EXTBLK /1H /, INTBLK /32/					      74
       DATA EXTDIG(1) /1H0/, INTDIG(1) /48/				      75
       DATA EXTDIG(2) /1H1/, INTDIG(2) /49/				      76
       DATA EXTDIG(3) /1H2/, INTDIG(3) /50/				      77
       DATA EXTDIG(4) /1H3/, INTDIG(4) /51/				      78
       DATA EXTDIG(5) /1H4/, INTDIG(5) /52/				      79
       DATA EXTDIG(6) /1H5/, INTDIG(6) /53/				      80
       DATA EXTDIG(7) /1H6/, INTDIG(7) /54/				      81
       DATA EXTDIG(8) /1H7/, INTDIG(8) /55/				      82
       DATA EXTDIG(9) /1H8/, INTDIG(9) /56/				      83
       DATA EXTDIG(10) /1H9/, INTDIG(10) /57/				      84
       DATA EXTLET(1) /1Ha/, INTLET(1) /97/
       DATA EXTLET(2) /1Hb/, INTLET(2) /98/
       DATA EXTLET(3) /1Hc/, INTLET(3) /99/
       DATA EXTLET(4) /1Hd/, INTLET(4) /100/
       DATA EXTLET(5) /1He/, INTLET(5) /101/
       DATA EXTLET(6) /1Hf/, INTLET(6) /102/
       DATA EXTLET(7) /1Hg/, INTLET(7) /103/
       DATA EXTLET(8) /1Hh/, INTLET(8) /104/
       DATA EXTLET(9) /1Hi/, INTLET(9) /105/
       DATA EXTLET(10) /1Hj/, INTLET(10) /106/
       DATA EXTLET(11) /1Hk/, INTLET(11) /107/
       DATA EXTLET(12) /1Hl/, INTLET(12) /108/
       DATA EXTLET(13) /1Hm/, INTLET(13) /109/
       DATA EXTLET(14) /1Hn/, INTLET(14) /110/
       DATA EXTLET(15) /1Ho/, INTLET(15) /111/
       DATA EXTLET(16) /1Hp/, INTLET(16) /112/
       DATA EXTLET(17) /1Hq/, INTLET(17) /113/
       DATA EXTLET(18) /1Hr/, INTLET(18) /114/
       DATA EXTLET(19) /1Hs/, INTLET(19) /115/
       DATA EXTLET(20) /1Ht/, INTLET(20) /116/
       DATA EXTLET(21) /1Hu/, INTLET(21) /117/
       DATA EXTLET(22) /1Hv/, INTLET(22) /118/
       DATA EXTLET(23) /1Hw/, INTLET(23) /119/
       DATA EXTLET(24) /1Hx/, INTLET(24) /120/
       DATA EXTLET(25) /1Hy/, INTLET(25) /121/
       DATA EXTLET(26) /1Hz/, INTLET(26) /122/
       DATA EXTBIG(1) /1HA/, INTBIG(1) /65/				     111
       DATA EXTBIG(2) /1HB/, INTBIG(2) /66/				     112
       DATA EXTBIG(3) /1HC/, INTBIG(3) /67/	     113
       DATA EXTBIG(4) /1HD/, INTBIG(4) /68/				     114
       DATA EXTBIG(5) /1HE/, INTBIG(5) /69/				     115
       DATA EXTBIG(6) /1HF/, INTBIG(6) /70/				     116
       DATA EXTBIG(7) /1HG/, INTBIG(7) /71/				     117
       DATA EXTBIG(8) /1HH/, INTBIG(8) /72/				     118
       DATA EXTBIG(9) /1HI/, INTBIG(9) /73/				     119
       DATA EXTBIG(10) /1HJ/, INTBIG(10) /74/				     120
       DATA EXTBIG(11) /1HK/, INTBIG(11) /75/				     121
       DATA EXTBIG(12) /1HL/, INTBIG(12) /76/				     122
       DATA EXTBIG(13) /1HM/, INTBIG(13) /77/				     123
       DATA EXTBIG(14) /1HN/, INTBIG(14) /78/				     124
       DATA EXTBIG(15) /1HO/, INTBIG(15) /79/				     125
       DATA EXTBIG(16) /1HP/, INTBIG(16) /80/				     126
       DATA EXTBIG(17) /1HQ/, INTBIG(17) /81/				     127
       DATA EXTBIG(18) /1HR/, INTBIG(18) /82/				     128
       DATA EXTBIG(19) /1HS/, INTBIG(19) /83/				     129
       DATA EXTBIG(20) /1HT/, INTBIG(20) /84/				     130
       DATA EXTBIG(21) /1HU/, INTBIG(21) /85/				     131
       DATA EXTBIG(22) /1HV/, INTBIG(22) /86/				     132
       DATA EXTBIG(23) /1HW/, INTBIG(23) /87/				     133
       DATA EXTBIG(24) /1HX/, INTBIG(24) /88/				     134
       DATA EXTBIG(25) /1HY/, INTBIG(25) /89/				     135
       DATA EXTBIG(26) /1HZ/, INTBIG(26) /90/				     136
       DATA EXTCHR(1) /1H!/, INTCHR(1) /33/				     137
       DATA EXTCHR(2) /1H"/, INTCHR(2) /34/				     138
       DATA EXTCHR(3) /1H#/, INTCHR(3) /35/				     139
       DATA EXTCHR(4) /1H$/, INTCHR(4) /36/				     140
       DATA EXTCHR(5) /1H%/, INTCHR(5) /37/				     141
       DATA EXTCHR(6) /1H&/, INTCHR(6) /38/				     142
       DATA EXTCHR(7) /1H'/, INTCHR(7) /39/				     143
       DATA EXTCHR(8) /1H(/, INTCHR(8) /40/				     144
       DATA EXTCHR(9) /1H)/, INTCHR(9) /41/				     145
       DATA EXTCHR(10) /1H*/, INTCHR(10) /42/				     146
       DATA EXTCHR(11) /1H+/, INTCHR(11) /43/				     147
       DATA EXTCHR(12) /1H,/, INTCHR(12) /44/				     148
       DATA EXTCHR(13) /1H-/, INTCHR(13) /45/				     149
       DATA EXTCHR(14) /1H./, INTCHR(14) /46/				     150
       DATA EXTCHR(15) /1H//, INTCHR(15) /47/				     151
       DATA EXTCHR(16) /1H:/, INTCHR(16) /58/				     152
       DATA EXTCHR(17) /1H;/, INTCHR(17) /59/				     153
       DATA EXTCHR(18) /1H</, INTCHR(18) /60/				     154
       DATA EXTCHR(19) /1H=/, INTCHR(19) /61/				     155
       DATA EXTCHR(20) /1H>/, INTCHR(20) /62/				     156
       DATA EXTCHR(21) /1H?/, INTCHR(21) /63/				     157
       DATA EXTCHR(22) /1H@/, INTCHR(22) /64/				     158
       DATA EXTCHR(23) /1H[/, INTCHR(23) /91/				     159
       DATA EXTCHR(24) /1H\/, INTCHR(24) /92/				     160
       DATA EXTCHR(25) /1H	   /, INTCHR(25) /93/
       DATA EXTCHR(26) /1H_/, INTCHR(26) /95/				     162
       DATA EXTCHR(27) /1H{/, INTCHR(27) /123/				     163
       DATA EXTCHR(28) /1H|/, INTCHR(28) /124/				     164
       DATA EXTCHR(29) /1H}/, INTCHR(29) /125/				     165
       DATA EXTCHR(30) /1H/, INTCHR(30) /8/				     166
       DATA EXTCHR(31) /1H	   /, INTCHR(31) /9/			     167
       DATA EXTCHR(32) /1H^/, INTCHR(32) /33/				     168
       DATA EXTCHR(33) /1H~/, INTCHR(33) /33/				     169
       END								     170
C									     177
C ALLDIG - RETURN YES IF STR IS ALL DIGITS				     178
C									     179
       INTEGER FUNCTION ALLDIG(STR)					     180
       INTEGER TYPE							     181
       INTEGER STR(100) 						     182
       INTEGER I							     183
       ALLDIG = 0							     184
       IF(.NOT.(STR(1) .EQ. 10002))  GOTO 23000 			     185
       RETURN								     186
23000  CONTINUE 							     187
       CONTINUE 							     188
       I = 1								     189
23002  IF(.NOT.( STR(I) .NE. 10002)) GOTO 23004 			     190
       IF(.NOT.(TYPE(STR(I)) .NE. 2))	GOTO 23005			     191
       RETURN								     192
23005  CONTINUE 							     193
23003	I = I + 1							     194
       GOTO 23002							     195
23004  CONTINUE 							     196
       ALLDIG = 1							     197
       RETURN								     198
       END								     199
C									     200
C BALPAR - COPY BALANCED PAREN STRING					     201
C									     202
       SUBROUTINE BALPAR						     203
       INTEGER GETTOK							     204
       INTEGER T, TOKEN(200)						     205
       INTEGER NLPAR							     206
       IF(.NOT.(GETTOK(TOKEN, 200) .NE. 40))  GOTO 23007		     207
       CALL SYNERR(19HMISSING LEFT PAREN.)				     208
       RETURN								     209
23007  CONTINUE 							     210
       CALL OUTSTR(TOKEN)						     211
       NLPAR = 1							     212
       CONTINUE 							     213
23009  CONTINUE 							     214
       T = GETTOK(TOKEN, 200)						     215
       IF(.NOT.(T.EQ.59 .OR. T.EQ.123 .OR. T.EQ.125 .OR. T.EQ.10003))	     216
     *GOTO 23012							     217
       CALL PBSTR(TOKEN)						     218
       GOTO 23011							     219
23012  CONTINUE 							     220
       IF(.NOT.(T .EQ. 10)) GOTO 23014					     221
       TOKEN(1) = 10002 						     222
       GOTO 23015							     223
23014  CONTINUE 							     224
       IF(.NOT.(T .EQ. 40)) GOTO 23016					     225
       NLPAR = NLPAR + 1						     226
       GOTO 23017							     227
23016  CONTINUE 							     228
       IF(.NOT.(T .EQ. 41)) GOTO 23018					     229
       NLPAR = NLPAR - 1						     230
23018  CONTINUE 							     231
23017  CONTINUE 							     232
23015  CONTINUE 							     233
       CALL OUTSTR(TOKEN)						     234
23010  IF(.NOT.(NLPAR .LE. 0)) GOTO 23009				     235
23011  CONTINUE 							     236
       IF(.NOT.(NLPAR .NE. 0)) GOTO 23020				     237
       CALL SYNERR(33HMISSING PARENTHESIS IN CONDITION.)		     238
23020  CONTINUE 							     239
       RETURN								     240
       END								     241
C									     242
C BRKNXT - GENERATE CODE FOR BREAK AND NEXT				     243
C									     244
       SUBROUTINE BRKNXT(SP, LEXTYP, LABVAL, TOKEN)			     245
       INTEGER I, LABVAL(100), LEXTYP(100), SP, TOKEN			     246
       CONTINUE 							     247
       I = SP								     248
23022  IF(.NOT.( I .GT. 0)) GOTO 23024					     249
       IF(.NOT.(LEXTYP(I) .EQ. 10263 .OR. LEXTYP(I) .EQ. 10266	     .OR     250
     *. LEXTYP(I) .EQ. 10268 .OR. LEXTYP(I) .EQ. 10269))  GOTO 23025	     251
       IF(.NOT.(TOKEN .EQ. 10264))   GOTO 23027 			     252
       CALL OUTGO(LABVAL(I)+1)						     253
       GOTO 23028							     254
23027  CONTINUE 							     255
       CALL OUTGO(LABVAL(I))						     256
23028  CONTINUE 							     257
       RETURN								     258
23025  CONTINUE 							     259
23023	I = I - 1							     260
       GOTO 23022							     261
23024  CONTINUE 							     262
       IF(.NOT.(TOKEN .EQ. 10264))   GOTO 23029 			     263
       CALL SYNERR(14HILLEGAL BREAK.)					     264
       GOTO 23030							     265
23029  CONTINUE 							     266
       CALL SYNERR(13HILLEGAL NEXT.)					     267
23030  CONTINUE 							     268
       RETURN								     269
       END								     270
C									     271
C CLOSE - EXCEEDINGLY TEMPORARY VERSION FOR GETTOK			     272
C									     273
       SUBROUTINE CLOSE(FD)						     274
       INTEGER FD							     275
       REWIND FD							     276
       RETURN								     277
       END								     278
C									     279
C CTOI - CONVERT STRING AT IN(I) TO INTEGER, INCREMENT I		     280
C									     281
       INTEGER FUNCTION CTOI(IN, I)					     282
	EXTERNAL INDEX	     	
       INTEGER IN(100)							     283
       INTEGER INDEX							     284
       INTEGER D, I							     285
       INTEGER DIGITS(11)						     286
       DATA DIGITS(1) /48/						     287
       DATA DIGITS(2) /49/						     288
       DATA DIGITS(3) /50/						     289
       DATA DIGITS(4) /51/						     290
       DATA DIGITS(5) /52/						     291
       DATA DIGITS(6) /53/						     292
       DATA DIGITS(7) /54/						     293
       DATA DIGITS(8) /55/						     294
       DATA DIGITS(9) /56/						     295
       DATA DIGITS(10) /57/						     296
       DATA DIGITS(11) /10002/						     297
       CONTINUE 							     298
23031  IF(.NOT.(IN(I) .EQ. 32 .OR. IN(I) .EQ. 9))   GOTO 23032		     299
       I = I + 1							     300
       GOTO 23031							     301
23032  CONTINUE 							     302
       CONTINUE 							     303
       CTOI = 0 							     304
23033  IF(.NOT.( IN(I) .NE. 10002))  GOTO 23035 			     305
       D = INDEX(DIGITS, IN(I)) 					     306
       IF(.NOT.(D .EQ. 0))  GOTO 23036					     307
       GOTO 23035							     308
23036  CONTINUE 							     309
       CTOI = 10 * CTOI + D - 1 					     310
23034	I = I + 1							     311
       GOTO 23033							     312
23035  CONTINUE 							     313
       RETURN								     314
       END								     315
C									     316
C DEFTOK - GET TOKEN; PROCESS MACRO CALLS AND INVOCATIONS		     317
C									     318
       INTEGER FUNCTION DEFTOK(TOKEN, TOKSIZ, FD)			     319
       INTEGER GTOK							     320
       INTEGER FD, TOKSIZ						     321
       INTEGER DEFN(200), T, TOKEN(TOKSIZ)				     322
       INTEGER LOOKUP							     323
       CONTINUE 							     324
       T=GTOK(TOKEN, TOKSIZ, FD)					     325
23038  IF(.NOT.( T.NE.10003))  GOTO 23040				     326
       IF(.NOT.(T .NE. 10100)) GOTO 23041				     327
       GOTO 23040							     328
23041  CONTINUE 							     329
       IF(.NOT.(LOOKUP(TOKEN, DEFN) .EQ. 0))  GOTO 23043		     330
       GOTO 23040							     331
23043  CONTINUE 							     332
       IF(.NOT.(DEFN(1) .EQ. 10010)) GOTO 23045 			     333
       CALL GETDEF(TOKEN, TOKSIZ, DEFN, 200, FD)			     334
       CALL INSTAL(TOKEN, DEFN) 					     335
       GOTO 23046							     336
23045  CONTINUE 							     337
       CALL PBSTR(DEFN) 						     338
23046  CONTINUE 							     339
23039	T=GTOK(TOKEN, TOKSIZ, FD)					     340
       GOTO 23038							     341
23040  CONTINUE 							     342
       DEFTOK = T							     343
       IF(.NOT.(DEFTOK .EQ. 10100))  GOTO 23047 			     344
       CALL FOLD(TOKEN) 						     345
23047  CONTINUE 							     346
       RETURN								     347
       END								     348
C									     349
C FOLD - CONVERT ALPHABETIC TOKEN TO SINGLE CASE			     350
C									     351
       SUBROUTINE FOLD(TOKEN)						     352
       INTEGER TOKEN(100)						     353
       INTEGER I							     354
       CONTINUE 							     355
       I = 1								     356
23049  IF(.NOT.( TOKEN(I) .NE. 10002))	GOTO 23051			     357
       IF(.NOT.(TOKEN(I) .GE. 65 .AND. TOKEN(I) .LE. 90)) GOTO 23052	     358
       TOKEN(I) = TOKEN(I) - 65 + 97					     359
23052  CONTINUE 							     360
23050	I = I + 1							     361
       GOTO 23049							     362
23051  CONTINUE 							     363
       RETURN								     364
       END								     365
C									     366
C DOCODE - GENERATE CODE FOR BEGINNING OF DO				     367
C									     368
       SUBROUTINE DOCODE(LAB)						     369
       INTEGER LABGEN							     370
       INTEGER LAB							     371
       INTEGER DOSTR(4) 						     372
       DATA DOSTR(1), DOSTR(2), DOSTR(3), DOSTR(4)/100, 111, 32, 10002/      373
       CALL OUTTAB							     374
       CALL OUTSTR(DOSTR)						     375
       LAB = LABGEN(2)							     376
       CALL OUTNUM(LAB) 						     377
       CALL EATUP							     378
       CALL OUTDON							     379
       RETURN								     380
       END								     381
C									     382
C DOSTAT - GENERATE CODE FOR END OF DO STATEMENT			     383
C									     384
       SUBROUTINE DOSTAT(LAB)						     385
       INTEGER LAB							     386
       CALL OUTCON(LAB) 						     387
       CALL OUTCON(LAB+1)						     388
       RETURN								     389
       END								     390
C									     391
C EATUP - PROCESS REST OF STATEMENT; INTERPRET CONTINUATIONS		     392
C									     393
       SUBROUTINE EATUP 						     394
       INTEGER GETTOK							     395
       INTEGER PTOKEN(200), T, TOKEN(200)				     396
       INTEGER NLPAR							     397
       NLPAR = 0							     398
       CONTINUE 							     399
23054  CONTINUE 							     400
       T = GETTOK(TOKEN, 200)						     401
       IF(.NOT.(T .EQ. 59 .OR. T .EQ. 10)) GOTO 23057			     402
       GOTO 23056							     403
23057  CONTINUE 							     404
       IF(.NOT.(T .EQ. 125))   GOTO 23059				     405
       CALL PBSTR(TOKEN)						     406
       GOTO 23056							     407
23059  CONTINUE 							     408
       IF(.NOT.(T .EQ. 123 .OR. T .EQ. 10003))	 GOTO 23061		     409
       CALL SYNERR(24HUNEXPECTED BRACE OR EOF.) 			     410
       CALL PBSTR(TOKEN)						     411
       GOTO 23056							     412
23061  CONTINUE 							     413
       IF(.NOT.(T .EQ. 44 .OR. T .EQ. 95)) GOTO 23063			     414
       IF(.NOT.(GETTOK(PTOKEN, 200) .NE. 10)) GOTO 23065		     415
       CALL PBSTR(PTOKEN)						     416
23065  CONTINUE 							     417
       IF(.NOT.(T .EQ. 95)) GOTO 23067					     418
       TOKEN(1) = 10002 						     419
23067  CONTINUE 							     420
       GOTO 23064							     421
23063  CONTINUE 							     422
       IF(.NOT.(T .EQ. 40)) GOTO 23069					     423
       NLPAR = NLPAR + 1						     424
       GOTO 23070							     425
23069  CONTINUE 							     426
       IF(.NOT.(T .EQ. 41)) GOTO 23071					     427
       NLPAR = NLPAR - 1						     428
23071  CONTINUE 							     429
23070  CONTINUE 							     430
23064  CONTINUE 							     431
       CALL OUTSTR(TOKEN)						     432
23055  IF(.NOT.(NLPAR .LT. 0)) GOTO 23054				     433
23056  CONTINUE 							     434
       IF(.NOT.(NLPAR .NE. 0)) GOTO 23073				     435
       CALL SYNERR(23HUNBALANCED PARENTHESES.)				     436
23073  CONTINUE 							     437
       RETURN								     438
       END								     439
C									     440
C ELSEIF - GENERATE CODE FOR END OF IF BEFORE ELSE			     441
C									     442
       SUBROUTINE ELSEIF(LAB)						     443
       INTEGER LAB							     444
       CALL OUTGO(LAB+1)						     445
       CALL OUTCON(LAB) 						     446
       RETURN								     447
       END								     448
C									     449
C EQUAL - COMPARE STR1 TO STR2; RETURN YES IF EQUAL, NO IF NOT		     450
C									     451
       INTEGER FUNCTION EQUAL(STR1, STR2)				     452
       INTEGER STR1(100), STR2(100)					     453
       INTEGER I							     454
       CONTINUE 							     455
       I = 1								     456
23075  IF(.NOT.( STR1(I) .EQ. STR2(I))) GOTO 23077			     457
       IF(.NOT.(STR1(I) .EQ. 10002)) GOTO 23078 			     458
       EQUAL = 1							     459
       RETURN								     460
23078  CONTINUE 							     461
23076	I = I + 1							     462
       GOTO 23075							     463
23077  CONTINUE 							     464
       EQUAL = 0							     465
       RETURN								     466
       END								     467
C									     468
C ERROR - PRINT FATAL ERROR MESSAGE, THEN DIE				     469
C									     470
       SUBROUTINE ERROR(BUF)						     471
       INTEGER BUF(100) 						     472
       CALL REMARK(BUF) 						     473
       IF(0.EQ.0)STOP							     474
       RETURN								      47
       END								     476
C									     477
C FORCOD - BEGINNING OF FOR STATEMENT					     478
C									     479
       SUBROUTINE FORCOD(LAB)						     480
       INTEGER GETTOK							     481
       INTEGER T, TOKEN(200)						     482
       INTEGER LENGTH, LABGEN						     483
       INTEGER I, J, LAB, NLPAR 					     484
       INTEGER EXTDIG							     485
       INTEGER INTDIG							     486
       INTEGER EXTLET							     487
       INTEGER INTLET							     488
       INTEGER EXTBIG							     489
       INTEGER INTBIG							     490
       INTEGER EXTCHR							     491
       INTEGER INTCHR							     492
       INTEGER EXTBLK							     493
       INTEGER INTBLK							     494
       INTEGER BP							     495
       INTEGER BUF							     496
       INTEGER FORDEP							     497
       INTEGER FORSTK							     498
       INTEGER SDO(3), SIF(3), SELSE(5), SWHILE(6), SBREAK(6), SNEXT(5)      499
       INTEGER SFOR(4), SREPT(7), SUNTIL(6)				     500
       INTEGER VDO(2), VIF(2), VELSE(2), VWHILE(2), VBREAK(2), VNEXT(2)      501
       INTEGER VFOR(2), VREPT(2), VUNTIL(2)				     502
       INTEGER LEVEL							     503
       INTEGER LINECT							     504
       INTEGER INFILE							     505
       INTEGER LASTP							     506
       INTEGER LASTT							     507
       INTEGER NAMPTR							     508
       INTEGER TABLE							     509
       INTEGER OUTP							     510
       INTEGER OUTBUF							     511
       INTEGER IFNOT(9) 						     512
       COMMON /CCHAR/ EXTDIG(10), INTDIG(10), EXTLET(26), INTLET(26),  E     513
     *XTBIG(26), INTBIG(26), EXTCHR(33), INTCHR(33),  EXTBLK, INTBLK	     514
       COMMON /CDEFIO/ BP, BUF(300)					     515
       COMMON /CFOR/ FORDEP, FORSTK(200)				     516
       COMMON /CKEYWD/ SDO, SIF, SELSE, SWHILE, SBREAK, SNEXT, SFOR, SRE     517
     *PT, SUNTIL, VDO, VIF, VELSE, VWHILE, VBREAK, VNEXT, VFOR, VREPT, V     518
     *UNTIL								     519
       COMMON /CLINE/ LEVEL, LINECT(5), INFILE(5)			     520
       COMMON /CLOOK/ LASTP, LASTT, NAMPTR(200), TABLE(1500)		     521
       COMMON /COUTLN/ OUTP, OUTBUF(81) 				     522
       DATA IFNOT(1) /105/						     523
       DATA IFNOT(2) /102/						     524
       DATA IFNOT(3) /40/						     525
       DATA IFNOT(4) /46/						     526
       DATA IFNOT(5) /110/						     527
       DATA IFNOT(6) /111/						     528
       DATA IFNOT(7) /116/						     529
       DATA IFNOT(8) /46/						     530
       DATA IFNOT(9) /10002/						     531
       LAB = LABGEN(3)							     532
       CALL OUTCON(0)							     533
       IF(.NOT.(GETTOK(TOKEN, 200) .NE. 40))  GOTO 23080		     534
       CALL SYNERR(19HMISSING LEFT PAREN.)				     535
       RETURN								     536
23080  CONTINUE 							     537
       IF(.NOT.(GETTOK(TOKEN, 200) .NE. 59))  GOTO 23082		     538
       CALL PBSTR(TOKEN)						     539
       CALL OUTTAB							     540
       CALL EATUP							     541
       CALL OUTDON							     542
23082  CONTINUE 							     543
       IF(.NOT.(GETTOK(TOKEN, 200) .EQ. 59))  GOTO 23084		     544
       CALL OUTCON(LAB) 						     545
       GOTO 23085							     546
23084  CONTINUE 							     547
       CALL PBSTR(TOKEN)						     548
       CALL OUTNUM(LAB) 						     549
       CALL OUTTAB							     550
       CALL OUTSTR(IFNOT)						     551
       CALL OUTCH(40)							     552
       NLPAR = 0							     553
       CONTINUE 							     554
23086  IF(.NOT.(NLPAR .GE. 0)) GOTO 23087				     555
       T = GETTOK(TOKEN, 200)						     556
       IF(.NOT.(T .EQ. 59)) GOTO 23088					     557
       GOTO 23087							     558
23088  CONTINUE 							     559
       IF(.NOT.(T .EQ. 40)) GOTO 23090					     560
       NLPAR = NLPAR + 1						     561
       GOTO 23091							     562
23090  CONTINUE 							     563
       IF(.NOT.(T .EQ. 41)) GOTO 23092					     564
       NLPAR = NLPAR - 1						     565
23092  CONTINUE 							     566
23091  CONTINUE 							     567
       IF(.NOT.(T .NE. 10 .AND. T .NE. 95))   GOTO 23094		     568
       CALL OUTSTR(TOKEN)						     569
23094  CONTINUE 							     570
       GOTO 23086							     571
23087  CONTINUE 							     572
       CALL OUTCH(41)							     573
       CALL OUTCH(41)							     574
       CALL OUTGO(LAB+2)						     575
       IF(.NOT.(NLPAR .LT. 0)) GOTO 23096				     576
       CALL SYNERR(19HINVALID FOR CLAUSE.)				     577
23096  CONTINUE 							     578
23085  CONTINUE 							     579
       FORDEP = FORDEP + 1						     580
       J = 1								     581
       CONTINUE 							     582
       I = 1								     583
23098  IF(.NOT.( I .LT. FORDEP))  GOTO 23100				     584
       J = J + LENGTH(FORSTK(J)) + 1					     585
23099	I = I + 1							     586
       GOTO 23098							     587
23100  CONTINUE 							     588
       FORSTK(J) = 10002						     589
       NLPAR = 0							     590
       CONTINUE 							     591
23101  IF(.NOT.(NLPAR .GE. 0)) GOTO 23102				     592
       T = GETTOK(TOKEN, 200)						     593
       IF(.NOT.(T .EQ. 40)) GOTO 23103					     594
       NLPAR = NLPAR + 1						     595
       GOTO 23104							     596
23103  CONTINUE 							     597
       IF(.NOT.(T .EQ. 41)) GOTO 23105					     598
       NLPAR = NLPAR - 1						     599
23105  CONTINUE 							     600
23104  CONTINUE 							     601
       IF(.NOT.(NLPAR .GE. 0 .AND. T .NE. 10 .AND. T .NE. 95))	GOTO 231     602
     *07								     603
       CALL SCOPY(TOKEN, 1, FORSTK, J)					     604
       J = J + LENGTH(TOKEN)						     605
23107  CONTINUE 							     606
       GOTO 23101							     607
23102  CONTINUE 							     608
       LAB = LAB + 1							     609
       RETURN								     610
       END								     611
C									     612
C FORS - PROCESS END OF FOR STATEMENT					     613
C									     614
       SUBROUTINE FORS(LAB)						     615
       INTEGER LENGTH							     616
       INTEGER I, J, LAB						     617
       INTEGER EXTDIG							     618
       INTEGER INTDIG							     619
       INTEGER EXTLET							     620
       INTEGER INTLET							     621
       INTEGER EXTBIG							     622
       INTEGER INTBIG							     623
       INTEGER EXTCHR						       624
       INTEGER INTCHR							     625
       INTEGER EXTBLK							     626
       INTEGER INTBLK							     627
       INTEGER BP							     628
       INTEGER BUF							     629
       INTEGER FORDEP							     630
       INTEGER FORSTK							     631
       INTEGER SDO(3), SIF(3), SELSE(5), SWHILE(6), SBREAK(6), SNEXT(5)      632
       INTEGER SFOR(4), SREPT(7), SUNTIL(6)				     633
       INTEGER VDO(2), VIF(2), VELSE(2), VWHILE(2), VBREAK(2), VNEXT(2)      634
       INTEGER VFOR(2), VREPT(2), VUNTIL(2)				     635
       INTEGER LEVEL							     636
       INTEGER LINECT							     637
       INTEGER INFILE							     638
       INTEGER LASTP							     639
       INTEGER LASTT							     640
       INTEGER NAMPTR							     641
       INTEGER TABLE							     642
       INTEGER OUTP							     643
       INTEGER OUTBUF							     644
       COMMON /CCHAR/ EXTDIG(10), INTDIG(10), EXTLET(26), INTLET(26),  E     645
     *XTBIG(26), INTBIG(26), EXTCHR(33), INTCHR(33),  EXTBLK, INTBLK	     646
       COMMON /CDEFIO/ BP, BUF(300)					     647
       COMMON /CFOR/ FORDEP, FORSTK(200)				     648
       COMMON /CKEYWD/ SDO, SIF, SELSE, SWHILE, SBREAK, SNEXT, SFOR, SRE     649
     *PT, SUNTIL, VDO, VIF, VELSE, VWHILE, VBREAK, VNEXT, VFOR, VREPT, V     650
     *UNTIL								     651
       COMMON /CLINE/ LEVEL, LINECT(5), INFILE(5)			     652
       COMMON /CLOOK/ LASTP, LASTT, NAMPTR(200), TABLE(1500)		     653
       COMMON /COUTLN/ OUTP, OUTBUF(81) 				     654
       CALL OUTNUM(LAB) 						     655
       J = 1								     656
       CONTINUE 							     657
       I = 1								     658
23109  IF(.NOT.( I .LT. FORDEP))  GOTO 23111				     659
       J = J + LENGTH(FORSTK(J)) + 1					     660
23110	I = I + 1							     661
       GOTO 23109							     662
23111  CONTINUE 							     663
       IF(.NOT.(LENGTH(FORSTK(J)) .GT. 0)) GOTO 23112			     664
       CALL OUTTAB							     665
       CALL OUTSTR(FORSTK(J))						     666
       CALL OUTDON							     667
23112  CONTINUE 							     668
       CALL OUTGO(LAB-1)						     669
       CALL OUTCON(LAB+1)						     670
       FORDEP = FORDEP - 1						     671
       RETURN								     672
       END								     673
C									     674
C GETCH - GET CHARACTERS FROM FILE					     675
C									     676
       INTEGER FUNCTION GETCH(C, F)					     677
       INTEGER INMAP							     678
       INTEGER BUF(81), C						     679
       INTEGER F, I, LASTC						     680
       DATA LASTC /81/, BUF(81) /10/					     681
       IF(.NOT.(BUF(LASTC) .EQ. 10 .OR. LASTC .GE. 81))   GOTO 23114	     682
       READ(F, 1, END=10) (BUF(I), I = 1, 80)				     683
1	  FORMAT(80 A1) 						     684
       CONTINUE 							     685
       I = 1								     686
23116  IF(.NOT.( I .LE. 80))   GOTO 23118				     687
       BUF(I) = INMAP(BUF(I))						     688
23117	I = I + 1							     689
       GOTO 23116							     690
23118  CONTINUE 							     691
       CONTINUE 							     692
       I = 80								     693
23119  IF(.NOT.( I .GT. 0)) GOTO 23121					     694
       IF(.NOT.(BUF(I) .NE. 32))  GOTO 23122				     695
       GOTO 23121							     696
23122  CONTINUE 							     697
23120	I = I - 1							     698
       GOTO 23119							     699
23121  CONTINUE 							     700
       BUF(I+1) = 10							     701
       LASTC = 0							     702
23114  CONTINUE 							     703
       LASTC = LASTC + 1						     704
       C = BUF(LASTC)							     705
       GETCH = C							     706
       RETURN								     707
10	  C = 10003							     708
       GETCH = 10003							     709
       RETURN								     710
       END								     711
C									     712
C GETDEF (FOR NO ARGUMENTS) - GET NAME AND DEFINITION			     713
C									     714
       SUBROUTINE GETDEF(TOKEN, TOKSIZ, DEFN, DEFSIZ, FD)		     715
       INTEGER GTOK, NGETCH						     716
       INTEGER DEFSIZ, FD, I, NLPAR, TOKSIZ				     717
       INTEGER C, DEFN(DEFSIZ), TOKEN(TOKSIZ)				     718
       IF(.NOT.(NGETCH(C, FD) .NE. 40)) GOTO 23124			     719
       CALL REMARK(19HMISSING LEFT PAREN.)				     720
23124  CONTINUE 							     721
       IF(.NOT.(GTOK(TOKEN, TOKSIZ, FD) .NE. 10100))   GOTO 23126	     722
       CALL REMARK(22HNON-ALPHANUMERIC NAME.)				     723
       GOTO 23127							     724
23126  CONTINUE 							     725
       IF(.NOT.(NGETCH(C, FD) .NE. 44)) GOTO 23128			     726
       CALL REMARK(24HMISSING COMMA IN DEFINE.) 			     727
23128  CONTINUE 							     728
23127  CONTINUE 							     729
       NLPAR = 0							     730
       CONTINUE 							     731
       I = 1								     732
23130  IF(.NOT.( NLPAR .GE. 0))   GOTO 23132				     733
       IF(.NOT.(I .GT. DEFSIZ))   GOTO 23133				     734
       CALL ERROR(20HDEFINITION TOO LONG.)				     735
       GOTO 23134							     736
23133  CONTINUE 							     737
       IF(.NOT.(NGETCH(DEFN(I), FD) .EQ. 10003)) GOTO 23135		     738
       CALL ERROR(20HMISSING RIGHT PAREN.)				     739
       GOTO 23136							     740
23135  CONTINUE 							     741
       IF(.NOT.(DEFN(I) .EQ. 40)) GOTO 23137				     742
       NLPAR = NLPAR + 1						     743
       GOTO 23138							     744
23137  CONTINUE 							     745
       IF(.NOT.(DEFN(I) .EQ. 41)) GOTO 23139				     746
       NLPAR = NLPAR - 1						     747
23139  CONTINUE 							     748
23138  CONTINUE 							     749
23136  CONTINUE 							     750
23134  CONTINUE 							     751
23131	I = I + 1							     752
       GOTO 23130							     753
23132  CONTINUE 							     754
       DEFN(I-1) = 10002						     755
       RETURN								     756
       END								     757
C									     758
C GETTOK - GET TOKEN. HANDLES FILE INCLUSION AND LINE NUMBERS		     759
C									     760
       INTEGER FUNCTION GETTOK(TOKEN, TOKSIZ)				     761
       INTEGER EQUAL, OPEN						     762
       INTEGER JUNK, TOKSIZ						     763
       INTEGER DEFTOK							     764
       INTEGER NAME(30), TOKEN(TOKSIZ)					     765
       INTEGER EXTDIG							     766
       INTEGER INTDIG							     767
       INTEGER EXTLET							     768
       INTEGER INTLET							     769
       INTEGER EXTBIG							     770
       INTEGER INTBIG							     771
       INTEGER EXTCHR							     772
       INTEGER INTCHR							     773
       INTEGER EXTBLK							     774
       INTEGER INTBLK							     775
       INTEGER BP							     776
       INTEGER BUF							     777
       INTEGER FORDEP							     778
       INTEGER FORSTK							     779
       INTEGER SDO(3), SIF(3), SELSE(5), SWHILE(6), SBREAK(6), SNEXT(5)      780
       INTEGER SFOR(4), SREPT(7), SUNTIL(6)				     781
       INTEGER VDO(2), VIF(2), VELSE(2), VWHILE(2), VBREAK(2), VNEXT(2)      782
       INTEGER VFOR(2), VREPT(2), VUNTIL(2)				     783
       INTEGER LEVEL							     784
       INTEGER LINECT							     785
       INTEGER INFILE							     786
       INTEGER LASTP							     787
       INTEGER LASTT							     788
       INTEGER NAMPTR							     789
       INTEGER TABLE							     790
       INTEGER OUTP							     791
       INTEGER OUTBUF							     792
       INTEGER INCL(8)							     793
       COMMON /CCHAR/ EXTDIG(10), INTDIG(10), EXTLET(26), INTLET(26),  E     794
     *XTBIG(26), INTBIG(26), EXTCHR(33), INTCHR(33),  EXTBLK, INTBLK	     795
       COMMON /CDEFIO/ BP, BUF(300)					     796
       COMMON /CFOR/ FORDEP, FORSTK(200)				     797
       COMMON /CKEYWD/ SDO, SIF, SELSE, SWHILE, SBREAK, SNEXT, SFOR, SRE     798
     *PT, SUNTIL, VDO, VIF, VELSE, VWHILE, VBREAK, VNEXT, VFOR, VREPT, V     799
     *UNTIL								     800
       COMMON /CLINE/ LEVEL, LINECT(5), INFILE(5)			     801
       COMMON /CLOOK/ LASTP, LASTT, NAMPTR(200), TABLE(1500)		     802
       COMMON /COUTLN/ OUTP, OUTBUF(81) 				     803
       DATA INCL(1) /105/						     804
       DATA INCL(2) /110/						     805
       DATA INCL(3) /99/						     806
       DATA INCL(4) /108/						     807
       DATA INCL(5) /117/						     808
       DATA INCL(6) /100/						     809
       DATA INCL(7) /101/						     810
       DATA INCL(8) /10002/						     811
       CONTINUE 							     812
23141  IF(.NOT.( LEVEL .GT. 0))   GOTO 23143				     813
       CONTINUE 							     814
       GETTOK = DEFTOK(TOKEN, TOKSIZ, INFILE(LEVEL))			     815
23144  IF(.NOT.( GETTOK .NE. 10003)) GOTO 23146 			     816
       IF(.NOT.(EQUAL(TOKEN, INCL) .EQ. 0))   GOTO 23147		     817
       RETURN								     818
23147  CONTINUE 							     819
       JUNK = DEFTOK(NAME, 30, INFILE(LEVEL))				     820
       IF(.NOT.(LEVEL .GE. 5)) GOTO 23149				     821
       CALL SYNERR(27HINCLUDES NESTED TOO DEEPLY.)			     822
       GOTO 23150							     823
23149  CONTINUE 							     824
       INFILE(LEVEL+1) = OPEN(NAME, 0)					     825
       LINECT(LEVEL+1) = 1						     826
       IF(.NOT.(INFILE(LEVEL+1) .EQ. 10001))  GOTO 23151		     827
       CALL SYNERR(19HCAN'T OPEN INCLUDE.)				     828
       GOTO 23152							     829
23151  CONTINUE 							     830
       LEVEL = LEVEL + 1						     831
23152  CONTINUE 							     832
23150  CONTINUE 							     833
23145		GETTOK = DEFTOK(TOKEN, TOKSIZ, INFILE(LEVEL))		     834
       GOTO 23144							     835
23146  CONTINUE 							     836
       IF(.NOT.(LEVEL .GT. 1)) GOTO 23153				     837
       CALL CLOSE(INFILE(LEVEL))					     838
23153  CONTINUE 							     839
23142	LEVEL = LEVEL - 1						     840
       GOTO 23141							     841
23143  CONTINUE 							     842
       GETTOK = 10003							     843
       RETURN								     844
       END								     845
C									     846
C GTOK - GET TOKEN FOR RATFOR						     847
C									     848
       INTEGER FUNCTION GTOK(LEXSTR, TOKSIZ, FD)			     849
       INTEGER NGETCH, TYPE						     850
       INTEGER FD, I, TOKSIZ						     851
       INTEGER C, LEXSTR(TOKSIZ)					     852
       INTEGER EXTDIG							     853
       INTEGER INTDIG							     854
       INTEGER EXTLET							     855
       INTEGER INTLET							     856
       INTEGER EXTBIG							     857
       INTEGER INTBIG							     858
       INTEGER EXTCHR							     859
       INTEGER INTCHR							     860
       INTEGER EXTBLK							     861
       INTEGER INTBLK							     862
       INTEGER BP							     863
       INTEGER BUF							     864
       INTEGER FORDEP							   1 865
       INTEGER FORSTK							   1 866
       INTEGER SDO(3), SIF(3), SELSE(5), SWHILE(6), SBREAK(6), SNEXT(5)    1 867
       INTEGER SFOR(4), SREPT(7), SUNTIL(6)				   1 868
       INTEGER VDO(2), VIF(2), VELSE(2), VWHILE(2), VBREAK(2), VNEXT(2)    1 869
       INTEGER VFOR(2), VREPT(2), VUNTIL(2)				   1 870
       INTEGER LEVEL							   1 871
       INTEGER LINECT							   1 872
       INTEGER INFILE							   1 873
       INTEGER LASTP							   1 874
       INTEGER LASTT							   1 875
       INTEGER NAMPTR							   1 876
       INTEGER TABLE							   1 877
       INTEGER OUTP							   1 878
       INTEGER OUTBUF							   1 879
       COMMON /CCHAR/ EXTDIG(10), INTDIG(10), EXTLET(26), INTLET(26),  E     880
     *XTBIG(26), INTBIG(26), EXTCHR(33), INTCHR(33),  EXTBLK, INTBLK	     881
       COMMON /CDEFIO/ BP, BUF(300)					     882
       COMMON /CFOR/ FORDEP, FORSTK(200)				     883
       COMMON /CKEYWD/ SDO, SIF, SELSE, SWHILE, SBREAK, SNEXT, SFOR, SRE   1 884
     *PT, SUNTIL, VDO, VIF, VELSE, VWHILE, VBREAK, VNEXT, VFOR, VREPT, V   1 885
     *UNTIL								   1 886
       COMMON /CLINE/ LEVEL, LINECT(5), INFILE(5)			   1 887
       COMMON /CLOOK/ LASTP, LASTT, NAMPTR(200), TABLE(1500)		   1 888
       COMMON /COUTLN/ OUTP, OUTBUF(81) 				   1 889
       CONTINUE 							   1 890
23155  IF(.NOT.(NGETCH(C, FD) .NE. 10003)) GOTO 23156			   1 891
       IF(.NOT.(C .NE. 32 .AND. C .NE. 9)) GOTO 23157			   1 892
       GOTO 23156							   1 893
23157  CONTINUE 							   1 894
       GOTO 23155							   1 895
23156  CONTINUE 							   1 896
       CALL PUTBAK(C)							   1 897
       CONTINUE 							   1 898
       I = 1								   1 899
23159  IF(.NOT.( I .LT. TOKSIZ-1))   GOTO 23161 			   1 900
       GTOK = TYPE(NGETCH(LEXSTR(I), FD))				   1 901
       IF(.NOT.(GTOK .NE. 1 .AND. GTOK .NE. 2))  GOTO 23162		   1 902
       GOTO 23161							   1 903
23162  CONTINUE 							   1 904
23160	I = I + 1							   1 905
       GOTO 23159							   1 906
23161  CONTINUE 							   1 907
       IF(.NOT.(I .GE. TOKSIZ-1)) GOTO 23164				   1 908
       CALL SYNERR(15HTOKEN TOO LONG.)					   1 909
23164  CONTINUE 							   1 910
       IF(.NOT.(I .GT. 1))  GOTO 23166					   1 911
       CALL PUTBAK(LEXSTR(I))						   1 912
       LEXSTR(I) = 10002						   1 913
       GTOK = 10100							   1 914
       GOTO 23167							   1 915
23166  CONTINUE 							   1 916
       IF(.NOT.(LEXSTR(1) .EQ. 36))  GOTO 23168 			   1 917
       IF(.NOT.(NGETCH(LEXSTR(2), FD) .EQ. 40))  GOTO 23170		   1 918
       LEXSTR(1) = 123							   1 919
       GTOK = 123							   1 920
       GOTO 23171							   1 921
23170  CONTINUE 							   1 922
       IF(.NOT.(LEXSTR(2) .EQ. 41))  GOTO 23172 			   1 923
       LEXSTR(1) = 125							   1 924
       GTOK = 125							   1 925
       GOTO 23173							   1 926
23172  CONTINUE 							   1 927
       CALL PUTBAK(LEXSTR(2))						   1 928
23173  CONTINUE 							   1 929
23171  CONTINUE 							   1 930
       GOTO 23169							   1 931
23168  CONTINUE 							   1 932
       IF(.NOT.(LEXSTR(1) .EQ. 39 .OR. LEXSTR(1) .EQ. 34))   GOTO 23174    1 933
       CONTINUE 							   1 934
       I = 2								   1 935
23176  IF(.NOT.( NGETCH(LEXSTR(I), FD) .NE. LEXSTR(1)))   GOTO 23178	   1 936
       IF(.NOT.(LEXSTR(I) .EQ. 10 .OR. I .GE. TOKSIZ-1))  GOTO 23179	   1 937
       CALL SYNERR(14HMISSING QUOTE.)					   1 938
       LEXSTR(I) = LEXSTR(1)						   1 939
       CALL PUTBAK(10)							   1 940
       GOTO 23178							   1 941
23179  CONTINUE 							   1 942
23177	I = I + 1							   1 943
       GOTO 23176							   1 944
23178  CONTINUE 							   1 945
       GOTO 23175							   1 946
23174  CONTINUE 							   1 947
       IF(.NOT.(LEXSTR(1) .EQ. 35))  GOTO 23181 			   1 948
       CONTINUE 							   1 949
23183  IF(.NOT.(NGETCH(LEXSTR(1), FD) .NE. 10))  GOTO 23184		   1 950
       GOTO 23183							   1 951
23184  CONTINUE 							   1 952
       GTOK = 10							   1 953
       GOTO 23182							   1 954
23181  CONTINUE 							   1 955
       IF(.NOT.(LEXSTR(1) .EQ. 62 .OR. LEXSTR(1) .EQ. 60 .OR. LEXSTR(1)    1 956
     *.EQ. 33	   .OR. LEXSTR(1) .EQ. 61 .OR. LEXSTR(1) .EQ. 38 .OR. LE   1 957
     *XSTR(1) .EQ. 124)) GOTO 23185					   1 958
       CALL RELATE(LEXSTR, I, FD)					   1 959
23185  CONTINUE 							   1 960
23182  CONTINUE 							   1 961
23175  CONTINUE 							   1 962
23169  CONTINUE 							   1 963
23167  CONTINUE 							   1 964
       LEXSTR(I+1) = 10002						   1 965
       IF(.NOT.(LEXSTR(1) .EQ. 10))  GOTO 23187 			   1 966
       LINECT(LEVEL) = LINECT(LEVEL) + 1				   1 967
23187  CONTINUE 							   1 968
       RETURN								   1 969
       END								   1 970
C									   1 971
C IFCODE - GENERATE INITIAL CODE FOR IF 				   1 972
C									   1 973
       SUBROUTINE IFCODE(LAB)						   1 974
       INTEGER LABGEN							   1 975
       INTEGER LAB							   1 976
       LAB = LABGEN(2)							   1 977
       CALL IFGO(LAB)							   1 978
       RETURN								   1 979
       END								   1 980
C									   1 981
C IFGO - GENERATE "IF(.NOT.(...))GOTO LAB"				   1 982
C									   1 983
       SUBROUTINE IFGO(LAB)						   1 984
       INTEGER LAB							   1 985
       INTEGER IFNOT(9) 						   1 986
       DATA IFNOT(1) /105/						   1 987
       DATA IFNOT(2) /102/						   1 988
       DATA IFNOT(3) /40/						   1 989
       DATA IFNOT(4) /46/						   1 990
       DATA IFNOT(5) /110/						   1 991
       DATA IFNOT(6) /111/						   1 992
       DATA IFNOT(7) /116/						   1 993
       DATA IFNOT(8) /46/						   1 994
       DATA IFNOT(9) /10002/						   1 995
       CALL OUTTAB							   1 996
       CALL OUTSTR(IFNOT)						   1 997
       CALL BALPAR							   1 998
       CALL OUTCH(41)							   1 999
       CALL OUTGO(LAB)							   11000
       RETURN								   11001
       END								   11002
C									   11003
C INDEX - FIND CHARACTER  C  IN STRING	STR				   11004
C									   11005
       INTEGER FUNCTION INDEX(STR, C)					   11006
       INTEGER C, STR(100)						   11007
       CONTINUE 							   11008
       INDEX = 1							   11009
23189  IF(.NOT.( STR(INDEX) .NE. 10002))   GOTO 23191			   11010
       IF(.NOT.(STR(INDEX) .EQ. C))  GOTO 23192 			   11011
       RETURN								   11012
23192  CONTINUE 							   11013
23190	INDEX = INDEX + 1						   11014
       GOTO 23189							   11015
23191  CONTINUE 							   11016
       INDEX = 0							   11017
       RETURN								   11018
       END								   11019
C									   11020
C INITKW - INSTALL KEYWORD "DEFINE" IN TABLE				   11021
C									   11022
       SUBROUTINE INITKW						   11023
       INTEGER DEFNAM(7), DEFTYP(2)					   11024
       DATA DEFNAM(1) /68/, DEFNAM(2) /69/, DEFNAM(3) /70/
       DATA DEFNAM(4) /73/, DEFNAM(5) /78/, DEFNAM(6) /69/
       DATA DEFNAM(7) /10002/						   11027
       DATA DEFTYP(1), DEFTYP(2) /10010, 10002/ 			   11028
       CALL INSTAL(DEFNAM, DEFTYP)					   11029
       RETURN								   11030
       END								   11031
C									   11032
C INMAP - CONVERT LEFT ADJUSTED EXTERNAL REP TO RIGHT ADJ ASCII 	   11033
C									   11034
       INTEGER FUNCTION INMAP(INCHAR)					   11035
       INTEGER I, INCHAR						   11036
       INTEGER EXTDIG							   11037
       INTEGER INTDIG							   11038
       INTEGER EXTLET							   11039
       INTEGER INTLET							   11040
       INTEGER EXTBIG							   11041
       INTEGER INTBIG							   11042
       INTEGER EXTCHR							   11043
       INTEGER INTCHR							   11044
       INTEGER EXTBLK							   11045
       INTEGER INTBLK							   11046
       INTEGER BP							   11047
       INTEGER BUF							   11048
       INTEGER FORDEP							   11049
       INTEGER FORSTK							   11050
       INTEGER SDO(3), SIF(3), SELSE(5), SWHILE(6), SBREAK(6), SNEXT(5)    11051
       INTEGER SFOR(4), SREPT(7), SUNTIL(6)				   11052
       INTEGER VDO(2), VIF(2), VELSE(2), VWHILE(2), VBREAK(2), VNEXT(2)    11053
       INTEGER VFOR(2), VREPT(2), VUNTIL(2)				   11054
       INTEGER LEVEL							   11055
       INTEGER LINECT							   11056
       INTEGER INFILE							   11057
       INTEGER LASTP							   11058
       INTEGER LASTT							   11059
       INTEGER NAMPTR							   11060
       INTEGER TABLE							   11061
       INTEGER OUTP							   11062
       INTEGER OUTBUF							   11063
       COMMON /CCHAR/ EXTDIG(10), INTDIG(10), EXTLET(26), INTLET(26),  E   11064
     *XTBIG(26), INTBIG(26), EXTCHR(33), INTCHR(33),  EXTBLK, INTBLK	   11065
       COMMON /CDEFIO/ BP, BUF(300)					   11066
       COMMON /CFOR/ FORDEP, FORSTK(200)				   11067
       COMMON /CKEYWD/ SDO, SIF, SELSE, SWHILE, SBREAK, SNEXT, SFOR, SRE   11068
     *PT, SUNTIL, VDO, VIF, VELSE, VWHILE, VBREAK, VNEXT, VFOR, VREPT, V   11069
     *UNTIL								   11070
       COMMON /CLINE/ LEVEL, LINECT(5), INFILE(5)			   11071
       COMMON /CLOOK/ LASTP, LASTT, NAMPTR(200), TABLE(1500)		   11072
       COMMON /COUTLN/ OUTP, OUTBUF(81) 				   11073
       IF(.NOT.(INCHAR .EQ. EXTBLK)) GOTO 23194 			   11074
       INMAP = INTBLK							   11075
       RETURN								   11076
23194  CONTINUE 							   11077
       DO23196I = 1, 10 						   11078
       IF(.NOT.(INCHAR .EQ. EXTDIG(I))) GOTO 23198			   11079
       INMAP = INTDIG(I)						   11080
       RETURN								   11081
23198  CONTINUE 							   11082
23196  CONTINUE 							   11083
23197  CONTINUE 							   11084
       DO23200I = 1, 26 						   11085
       IF(.NOT.(INCHAR .EQ. EXTLET(I))) GOTO 23202			   11086
       INMAP = INTLET(I)						   11087
       RETURN								   11088
23202  CONTINUE 							   11089
23200  CONTINUE 							   11090
23201  CONTINUE 							   11091
       DO23204I = 1, 26 						   11092
       IF(.NOT.(INCHAR .EQ. EXTBIG(I))) GOTO 23206			   11093
       INMAP = INTBIG(I)						   11094
       RETURN								   11095
23206  CONTINUE 							   11096
23204  CONTINUE 							   11097
23205  CONTINUE 							   11098
       DO23208I = 1, 33 						   11099
       IF(.NOT.(INCHAR .EQ. EXTCHR(I))) GOTO 23210			   11100
       INMAP = INTCHR(I)						   11101
       RETURN								   11102
23210  CONTINUE 							   11103
23208  CONTINUE 							   11104
23209  CONTINUE 							   11105
       INMAP = 0
       RETURN								   11107
       END								   11108
C									   11109
C INSTAL - ADD NAME AND DEFINITION TO TABLE				   11110
C									   11111
       SUBROUTINE INSTAL(NAME, DEFN)					   11112
       INTEGER DEFN(200), NAME(200)					   11113
       INTEGER LENGTH							   11114
       INTEGER DLEN, NLEN						   11115
       INTEGER EXTDIG							   11116
       INTEGER INTDIG							   11117
       INTEGER EXTLET							   11118
       INTEGER INTLET							   11119
       INTEGER EXTBIG							   11120
       INTEGER INTBIG							   11121
       INTEGER EXTCHR							   11122
       INTEGER INTCHR							   11123
       INTEGER EXTBLK							   11124
       INTEGER INTBLK							   11125
       INTEGER BP							   11126
       INTEGER BUF							   11127
       INTEGER FORDEP							   11128
       INTEGER FORSTK							   11129
       INTEGER SDO(3), SIF(3), SELSE(5), SWHILE(6), SBREAK(6), SNEXT(5)    11130
       INTEGER SFOR(4), SREPT(7), SUNTIL(6)				   11131
       INTEGER VDO(2), VIF(2), VELSE(2), VWHILE(2), VBREAK(2), VNEXT(2)    11132
       INTEGER VFOR(2), VREPT(2), VUNTIL(2)				   11133
       INTEGER LEVEL							   11134
       INTEGER LINECT							   11135
       INTEGER INFILE							   11136
       INTEGER LASTP							   11137
       INTEGER LASTT							   11138
       INTEGER NAMPTR							   11139
       INTEGER TABLE							   11140
       INTEGER OUTP							   11141
       INTEGER OUTBUF							   11142
       COMMON /CCHAR/ EXTDIG(10), INTDIG(10), EXTLET(26), INTLET(26),  E   11143
     *XTBIG(26), INTBIG(26), EXTCHR(33), INTCHR(33),  EXTBLK, INTBLK	   11144
       COMMON /CDEFIO/ BP, BUF(300)					   11145
       COMMON /CFOR/ FORDEP, FORSTK(200)				   11146
       COMMON /CKEYWD/ SDO, SIF, SELSE, SWHILE, SBREAK, SNEXT, SFOR, SRE   11147
     *PT, SUNTIL, VDO, VIF, VELSE, VWHILE, VBREAK, VNEXT, VFOR, VREPT, V   11148
     *UNTIL								   11149
       COMMON /CLINE/ LEVEL, LINECT(5), INFILE(5)			   11150
       COMMON /CLOOK/ LASTP, LASTT, NAMPTR(200), TABLE(1500)		   11151
       COMMON /COUTLN/ OUTP, OUTBUF(81) 				   11152
       NLEN = LENGTH(NAME) + 1						   11153
       DLEN = LENGTH(DEFN) + 1						   11154
       IF(.NOT.(LASTT + NLEN + DLEN .GT. 1500 .OR. LASTP .GE. 200))	   11155
     *GOTO 23212							    1156
       CALL PUTLIN(NAME, 6)						   11157
       CALL REMARK(23H: TOO MANY DEFINITIONS.)				   11158
23212  CONTINUE 							   11159
       LASTP = LASTP + 1						   11160
       NAMPTR(LASTP) = LASTT + 1					   11161
       CALL SCOPY(NAME, 1, TABLE, LASTT + 1)				   11162
       CALL SCOPY(DEFN, 1, TABLE, LASTT + NLEN + 1)			   11163
       LASTT = LASTT + NLEN + DLEN					   11164
       RETURN								   11165
       END								   11166
C									   11167
C ITOC - CONVERT INTEGER  INT  TO CHAR STRING IN  STR			   11168
C									   11169
       INTEGER FUNCTION ITOC(INT, STR, SIZE)				   11170
       INTEGER IABS, MOD						   11171
       INTEGER D, I, INT, INTVAL, J, K, SIZE				   11172
       INTEGER STR(SIZE)						   11173
       INTEGER DIGITS(11)						   11174
       DATA DIGITS(1) /48/						   11175
       DATA DIGITS(2) /49/						   11176
       DATA DIGITS(3) /50/						   11177
       DATA DIGITS(4) /51/						   11178
       DATA DIGITS(5) /52/						   11179
       DATA DIGITS(6) /53/						   11180
       DATA DIGITS(7) /54/						   11181
       DATA DIGITS(8) /55/						   11182
       DATA DIGITS(9) /56/						   11183
       DATA DIGITS(10) /57/						   11184
       DATA DIGITS(11) /10002/						   11185
       INTVAL = IABS(INT)						   11186
       STR(1) = 10002							   11187
       I = 1								   11188
       CONTINUE 							   11189
23214  CONTINUE 							   11190
       I = I + 1							   11191
       D = MOD(INTVAL, 10)						   11192
       STR(I) = DIGITS(D+1)						   11193
       INTVAL = INTVAL / 10						   11194
23215  IF(.NOT.(INTVAL .EQ. 0 .OR. I .GE. SIZE)) GOTO 23214		   11195
23216  CONTINUE 							   11196
       IF(.NOT.(INT .LT. 0 .AND. I .LT. SIZE))	 GOTO 23217		   11197
       I = I + 1							   11198
       STR(I) = 45							   11199
23217  CONTINUE 							   11200
       ITOC = I - 1							   11201
       CONTINUE 							   11202
       J = 1								   11203
23219  IF(.NOT.( J .LT. I)) GOTO 23221					   11204
       K = STR(I)							   11205
       STR(I) = STR(J)							   11206
       STR(J) = K							   11207
       I = I - 1							   11208
23220	J = J + 1							   11209
       GOTO 23219							   11210
23221  CONTINUE 							   11211
       RETURN								   11212
       END								   11213
C									   11214
C LABELC - OUTPUT STATEMENT NUMBER					   11215
C									   11216
       SUBROUTINE LABELC(LEXSTR)					   11217
       INTEGER LEXSTR(100)						   11218
       INTEGER LENGTH							   11219
       IF(.NOT.(LENGTH(LEXSTR) .EQ. 5)) GOTO 23222			   11220
       IF(.NOT.(LEXSTR(1) .EQ. 50 .AND. LEXSTR(2) .EQ. 51))  GOTO 23224    11221
       CALL SYNERR(33HWARNING: POSSIBLE LABEL CONFLICT.)		   11222
23224  CONTINUE 							   11223
23222  CONTINUE 							   11224
       CALL OUTSTR(LEXSTR)						   11225
       CALL OUTTAB							   11226
       RETURN								   11227
       END								   11228
C									   11229
C LABGEN - GENERATE  N	CONSECUTIVE LABELS, RETURN FIRST ONE		   11230
C									   11231
       INTEGER FUNCTION LABGEN(N)					   11232
       INTEGER LABEL, N 						   11233
       DATA LABEL /23000/						   11234
       LABGEN = LABEL							   11235
       LABEL = LABEL + N						   11236
       RETURN							     11237
       END								   11238
C									   11239
C LENGTH - COMPUTE LENGTH OF STRING					   11240
C									   11241
       INTEGER FUNCTION LENGTH(STR)					   11242
       INTEGER STR(100) 						   11243
       CONTINUE 							   11244
       LENGTH = 0							   11245
23226  IF(.NOT.( STR(LENGTH+1) .NE. 10002))   GOTO 23228		   11246
23227	LENGTH = LENGTH + 1						   11247
       GOTO 23226							   11248
23228  CONTINUE 							   11249
       RETURN								   11250
       END								   11251
C									   11252
C LEX - RETURN LEXICAL TYPE OF TOKEN					   11253
C									   11254
       INTEGER FUNCTION LEX(LEXSTR)					   11255
       INTEGER GETTOK							   11256
       INTEGER LEXSTR(200)						   11257
       INTEGER ALLDIG, EQUAL						   11258
       INTEGER EXTDIG							   11259
       INTEGER INTDIG							   11260
       INTEGER EXTLET							   11261
       INTEGER INTLET							   11262
       INTEGER EXTBIG							   11263
       INTEGER INTBIG							   11264
       INTEGER EXTCHR							   11265
       INTEGER INTCHR							   11266
       INTEGER EXTBLK							   11267
       INTEGER INTBLK							   11268
       INTEGER BP							   11269
       INTEGER BUF							   11270
       INTEGER FORDEP							   11271
       INTEGER FORSTK							   11272
       INTEGER SDO(3), SIF(3), SELSE(5), SWHILE(6), SBREAK(6), SNEXT(5)    11273
       INTEGER SFOR(4), SREPT(7), SUNTIL(6)				   11274
       INTEGER VDO(2), VIF(2), VELSE(2), VWHILE(2), VBREAK(2), VNEXT(2)    11275
       INTEGER VFOR(2), VREPT(2), VUNTIL(2)				   11276
       INTEGER LEVEL							   11277
       INTEGER LINECT							   11278
       INTEGER INFILE							   11279
       INTEGER LASTP							   11280
       INTEGER LASTT							   11281
       INTEGER NAMPTR							   11282
       INTEGER TABLE							   11283
       INTEGER OUTP							   11284
       INTEGER OUTBUF							   11285
       COMMON /CCHAR/ EXTDIG(10), INTDIG(10), EXTLET(26), INTLET(26),  E   11286
     *XTBIG(26), INTBIG(26), EXTCHR(33), INTCHR(33),  EXTBLK, INTBLK	   11287
       COMMON /CDEFIO/ BP, BUF(300)					   11288
       COMMON /CFOR/ FORDEP, FORSTK(200)				   11289
       COMMON /CKEYWD/ SDO, SIF, SELSE, SWHILE, SBREAK, SNEXT, SFOR, SRE   11290
     *PT, SUNTIL, VDO, VIF, VELSE, VWHILE, VBREAK, VNEXT, VFOR, VREPT, V   11291
     *UNTIL								   11292
       COMMON /CLINE/ LEVEL, LINECT(5), INFILE(5)			   11293
       COMMON /CLOOK/ LASTP, LASTT, NAMPTR(200), TABLE(1500)		   11294
       COMMON /COUTLN/ OUTP, OUTBUF(81) 				   11295
       CONTINUE 							   11296
23229  IF(.NOT.(GETTOK(LEXSTR, 200) .EQ. 10)) GOTO 23230		   11297
       GOTO 23229							   11298
23230  CONTINUE 							   11299
       LEX = LEXSTR(1)							   11300
       IF(.NOT.(LEX.EQ.10003 .OR. LEX.EQ.59 .OR. LEX.EQ.123 .OR. LEX.EQ.   11301
     *125))  GOTO 23231 						   11302
       RETURN								   11303
23231  CONTINUE 							   11304
       IF(.NOT.(ALLDIG(LEXSTR) .EQ. 1)) GOTO 23233			   11305
       LEX = 10260							   11306
       GOTO 23234							   11307
23233  CONTINUE 							   11308
       IF(.NOT.(EQUAL(LEXSTR, SIF) .EQ. 1))   GOTO 23235		   11309
       LEX = VIF(1)							   11310
       GOTO 23236							   11311
23235  CONTINUE 							   11312
       IF(.NOT.(EQUAL(LEXSTR, SELSE) .EQ. 1)) GOTO 23237		   11313
       LEX = VELSE(1)							   11314
       GOTO 23238							   11315
23237  CONTINUE 							   11316
       IF(.NOT.(EQUAL(LEXSTR, SWHILE) .EQ. 1))	 GOTO 23239		   11317
       LEX = VWHILE(1)							   11318
       GOTO 23240							   11319
23239  CONTINUE 							   11320
       IF(.NOT.(EQUAL(LEXSTR, SDO) .EQ. 1))   GOTO 23241		   11321
       LEX = VDO(1)							   11322
       GOTO 23242							   11323
23241  CONTINUE 							   11324
       IF(.NOT.(EQUAL(LEXSTR, SBREAK) .EQ. 1))	 GOTO 23243		   11325
       LEX = VBREAK(1)							   11326
       GOTO 23244							   11327
23243  CONTINUE 							   11328
       IF(.NOT.(EQUAL(LEXSTR, SNEXT) .EQ. 1)) GOTO 23245		   11329
       LEX = VNEXT(1)							   11330
       GOTO 23246							   11331
23245  CONTINUE 							   11332
       IF(.NOT.(EQUAL(LEXSTR, SFOR) .EQ. 1))  GOTO 23247		   11333
       LEX = VFOR(1)							   11334
       GOTO 23248							   11335
23247  CONTINUE 							   11336
       IF(.NOT.(EQUAL(LEXSTR, SREPT) .EQ. 1)) GOTO 23249		   11337
       LEX = VREPT(1)							   11338
       GOTO 23250							   11339
23249  CONTINUE 							   11340
       IF(.NOT.(EQUAL(LEXSTR, SUNTIL) .EQ. 1))	 GOTO 23251		   11341
       LEX = VUNTIL(1)							   11342
       GOTO 23252							   11343
23251  CONTINUE 							   11344
       LEX = 10267							   11345
23252  CONTINUE 							   11346
23250  CONTINUE 							   11347
23248  CONTINUE 							   11348
23246  CONTINUE 							   11349
23244  CONTINUE 							   11350
23242  CONTINUE 							   11351
23240  CONTINUE 							   11352
23238  CONTINUE 							   11353
23236  CONTINUE 							   11354
23234  CONTINUE 							   11355
       RETURN								   11356
       END								   11357
C									   11358
C LOOKUP - LOCATE NAME, EXTRACT DEFINITION FROM TABLE			   11359
C									   11360
       INTEGER FUNCTION LOOKUP(NAME, DEFN)				   11361
       INTEGER DEFN(200), NAME(200)					   11362
       INTEGER I, J, K							   11363
       INTEGER EXTDIG							   11364
       INTEGER INTDIG							   11365
       INTEGER EXTLET							   11366
       INTEGER INTLET							   11367
       INTEGER EXTBIG							   11368
       INTEGER INTBIG							   11369
       INTEGER EXTCHR							   11370
       INTEGER INTCHR							   11371
       INTEGER EXTBLK							   11372
       INTEGER INTBLK							   11373
       INTEGER BP							   11374
       INTEGER BUF							   11375
       INTEGER FORDEP							   11376
       INTEGER FORSTK							   11377
       INTEGER SDO(3), SIF(3), SELSE(5), SWHILE(6), SBREAK(6), SNEXT(5)    11378
       INTEGER SFOR(4), SREPT(7), SUNTIL(6)				   11379
       INTEGER VDO(2), VIF(2), VELSE(2), VWHILE(2), VBREAK(2), VNEXT(2)    11380
       INTEGER VFOR(2), VREPT(2), VUNTIL(2)				   11381
       INTEGER LEVEL							   11382
       INTEGER LINECT							   11383
       INTEGER INFILE							   11384
       INTEGER LASTP							   11385
       INTEGER LASTT							   11386
       INTEGER NAMPTR							   11387
       INTEGER TABLE							   11388
       INTEGER OUTP							   11389
       INTEGER OUTBUF							   11390
       COMMON /CCHAR/ EXTDIG(10), INTDIG(10), EXTLET(26), INTLET(26),  E   11391
     *XTBIG(26), INTBIG(26), EXTCHR(33), INTCHR(33),  EXTBLK, INTBLK	   11392
       COMMON /CDEFIO/ BP, BUF(300)					   11393
       COMMON /CFOR/ FORDEP, FORSTK(200)				   11394
       COMMON /CKEYWD/ SDO, SIF, SELSE, SWHILE, SBREAK, SNEXT, SFOR, SRE   11395
     *PT, SUNTIL, VDO, VIF, VELSE, VWHILE, VBREAK, VNEXT, VFOR, VREPT, V   11396
     *UNTIL								   11397
       COMMON /CLINE/ LEVEL, LINECT(5), INFILE(5)			   11398
       COMMON /CLOOK/ LASTP, LASTT, NAMPTR(200), TABLE(1500)		   11399
       COMMON /COUTLN/ OUTP, OUTBUF(81) 				   11400
       CONTINUE 							   11401
       I = LASTP							   11402
23253  IF(.NOT.( I .GT. 0)) GOTO 23255					   11403
       J = NAMPTR(I)							   11404
       CONTINUE 							   11405
       K = 1								   11406
23256  IF(.NOT.( NAME(K) .EQ. TABLE(J) .AND. NAME(K) .NE. 10002))  GOTO    11407
     *23258								   11408
       J = J + 1							   11409
23257	K = K + 1							   11410
       GOTO 23256							   11411
23258  CONTINUE 							   11412
       IF(.NOT.(NAME(K) .EQ. TABLE(J))) GOTO 23259			   11413
       CALL SCOPY(TABLE, J+1, DEFN, 1)					   11414
       LOOKUP = 1							   11415
       RETURN								   11416
23259  CONTINUE 							   11417
23254	I = I - 1							   11418
       GOTO 23253							   11419
23255  CONTINUE 							   11420
       LOOKUP = 0							   11421
       RETURN								   11422
       END								   11423
C									   11424
C NGETCH - GET A (POSSIBLY PUSHED BACK) CHARACTER			   11425
C									   11426
       INTEGER FUNCTION NGETCH(C, FD)					   11427
       INTEGER GETCH							   11428
       INTEGER C							   11429
       INTEGER FD							   11430
       INTEGER EXTDIG							   11431
       INTEGER INTDIG							   11432
       INTEGER EXTLET							   11433
       INTEGER INTLET							   11434
       INTEGER EXTBIG							   11435
       INTEGER INTBIG							   11436
       INTEGER EXTCHR							   11437
       INTEGER INTCHR							   11438
       INTEGER EXTBLK							   11439
       INTEGER INTBLK							   11440
       INTEGER BP							   11441
       INTEGER BUF							   11442
       INTEGER FORDEP							   11443
       INTEGER FORSTK							   11444
       INTEGER SDO(3), SIF(3), SELSE(5), SWHILE(6), SBREAK(6), SNEXT(5)    11445
       INTEGER SFOR(4), SREPT(7), SUNTIL(6)				   11446
       INTEGER VDO(2), VIF(2), VELSE(2), VWHILE(2), VBREAK(2), VNEXT(2)    11447
       INTEGER VFOR(2), VREPT(2), VUNTIL(2)				   11448
       INTEGER LEVEL							   11449
       INTEGER LINECT							   11450
       INTEGER INFILE							   11451
       INTEGER LASTP							   11452
       INTEGER LASTT							   11453
       INTEGER NAMPTR							   11454
       INTEGER TABLE							   11455
       INTEGER OUTP							   11456
       INTEGER OUTBUF							   11457
       COMMON /CCHAR/ EXTDIG(10), INTDIG(10), EXTLET(26), INTLET(26),  E   11458
     *XTBIG(26), INTBIG(26), EXTCHR(33), INTCHR(33),  EXTBLK, INTBLK	   11459
       COMMON /CDEFIO/ BP, BUF(300)					   11460
       COMMON /CFOR/ FORDEP, FORSTK(200)				   11461
       COMMON /CKEYWD/ SDO, SIF, SELSE, SWHILE, SBREAK, SNEXT, SFOR, SRE   11462
     *PT, SUNTIL, VDO, VIF, VELSE, VWHILE, VBREAK, VNEXT, VFOR, VREPT, V   11463
     *UNTIL								   11464
       COMMON /CLINE/ LEVEL, LINECT(5), INFILE(5)			   11465
       COMMON /CLOOK/ LASTP, LASTT, NAMPTR(200), TABLE(1500)		   11466
       COMMON /COUTLN/ OUTP, OUTBUF(81) 				   11467
       IF(.NOT.(BP .GT. 0)) GOTO 23261					   11468
       C = BUF(BP)							   11469
       GOTO 23262							   11470
23261  CONTINUE 							   11471
       BP = 1								   11472
       BUF(BP) = GETCH(C, FD)						   11473
23262  CONTINUE 							   11474
       BP = BP - 1							   11475
       NGETCH = C							   11476
       RETURN								   11477
       END								   11478
C									   11479
C OPEN - EXCEEDINGLY TEMPORARY VERSION FOR GETTOK			   11480
C									   11481
       INTEGER FUNCTION OPEN(NAME, MODE)				   11482
       INTEGER NAME(30) 						   11483
       INTEGER CTOI							   11484
       INTEGER I, MODE							   11485
       I = 1								   11486
       OPEN = CTOI(NAME, I)						   11487
       RETURN								   11488
       END								   11489
C									   11490
C OTHERC - OUTPUT ORDINARY FORTRAN STATEMENT				   11491
C									   11492
       SUBROUTINE OTHERC(LEXSTR)					   11493
       INTEGER LEXSTR(100)						   11494
       CALL OUTTAB							   11495
       CALL OUTSTR(LEXSTR)						   11496
       CALL EATUP							   11497
       CALL OUTDON							   11498
       RETURN								   11499
       END								   11500
C									   11501
C OUTCH - PUT ONE CHARACTER INTO OUTPUT BUFFER				   11502
C									   11503
       SUBROUTINE OUTCH(C)						   11504
       INTEGER C							   11505
       INTEGER I							   11506
       INTEGER EXTDIG							   11507
       INTEGER INTDIG							   11508
       INTEGER EXTLET							   11509
       INTEGER INTLET							   11510
       INTEGER EXTBIG							   11511
       INTEGER INTBIG							   11512
       INTEGER EXTCHR							   11513
       INTEGER INTCHR							   11514
       INTEGER EXTBLK							   11515
       INTEGER INTBLK							   11516
       INTEGER BP							   11517
       INTEGER BUF							   11518
       INTEGER FORDEP							   11519
       INTEGER FORSTK							   11520
       INTEGER SDO(3), SIF(3), SELSE(5), SWHILE(6), SBREAK(6), SNEXT(5)    11521
       INTEGER SFOR(4), SREPT(7), SUNTIL(6)				   11522
       INTEGER VDO(2), VIF(2), VELSE(2), VWHILE(2), VBREAK(2), VNEXT(2)    11523
       INTEGER VFOR(2), VREPT(2), VUNTIL(2)				   11524
       INTEGER LEVEL							   11525
       INTEGER LINECT							   11526
       INTEGER INFILE							   11527
       INTEGER LASTP							   11528
       INTEGER LASTT							   11529
       INTEGER NAMPTR							   11530
       INTEGER TABLE							   11531
       INTEGER OUTP							   11532
       INTEGER OUTBUF							   11533
       COMMON /CCHAR/ EXTDIG(10), INTDIG(10), EXTLET(26), INTLET(26),  E   11534
     *XTBIG(26), INTBIG(26), EXTCHR(33), INTCHR(33),  EXTBLK, INTBLK	   11535
       COMMON /CDEFIO/ BP, BUF(300)					   11536
       COMMON /CFOR/ FORDEP, FORSTK(200)				   11537
       COMMON /CKEYWD/ SDO, SIF, SELSE, SWHILE, SBREAK, SNEXT, SFOR, SRE   11538
     *PT, SUNTIL, VDO, VIF, VELSE, VWHILE, VBREAK, VNEXT, VFOR, VREPT, V   11539
     *UNTIL								   11540
       COMMON /CLINE/ LEVEL, LINECT(5), INFILE(5)			   11541
       COMMON /CLOOK/ LASTP, LASTT, NAMPTR(200), TABLE(1500)		   11542
       COMMON /COUTLN/ OUTP, OUTBUF(81) 				   11543
       IF(.NOT.(OUTP .GE. 72)) GOTO 23263				   11544
       CALL OUTDON							   11545
       CONTINUE 							   11546
       I = 1								   11547
23265  IF(.NOT.( I .LT. 6)) GOTO 23267					   11548
       OUTBUF(I) = 32							   11549
23266	I = I + 1							   11550
       GOTO 23265							   11551
23267  CONTINUE 							   11552
       OUTBUF(6) = 42							   11553
       OUTP = 6 							   11554
23263  CONTINUE 							   11555
       OUTP = OUTP + 1							   11556
       OUTBUF(OUTP) = C 						   11557
       RETURN								   11558
       END								   11559
C									   11560
C OUTCON - OUTPUT "N   CONTINUE"					   11561
C									   11562
       SUBROUTINE OUTCON(N)						   11563
       INTEGER N							   11564
       INTEGER CONTIN(9)						   11565
       DATA CONTIN(1) /99/						   11566
       DATA CONTIN(2) /111/						   11567
       DATA CONTIN(3) /110/						   11568
       DATA CONTIN(4) /116/						   11569
       DATA CONTIN(5) /105/						   11570
       DATA CONTIN(6) /110/						   11571
       DATA CONTIN(7) /117/						   11572
       DATA CONTIN(8) /101/						   11573
       DATA CONTIN(9) /10002/						   11574
       IF(.NOT.(N .GT. 0))  GOTO 23268					   11575
       CALL OUTNUM(N)							   11576
23268  CONTINUE 							   11577
       CALL OUTTAB							   11578
       CALL OUTSTR(CONTIN)						   11579
       CALL OUTDON							   11580
       RETURN								   11581
       END								   11582
C									   11583
C OUTDON - FINISH OFF AN OUTPUT LINE					   11584
C									   11585
       SUBROUTINE OUTDON						   11586
       INTEGER EXTDIG							   11587
       INTEGER INTDIG							   11588
       INTEGER EXTLET							   11589
       INTEGER INTLET							   11590
       INTEGER EXTBIG							   11591
       INTEGER INTBIG							   11592
       INTEGER EXTCHR							   11593
       INTEGER INTCHR							   11594
       INTEGER EXTBLK							   11595
       INTEGER INTBLK							   11596
       INTEGER BP							   11597
       INTEGER BUF							   11598
       INTEGER FORDEP							   11599
       INTEGER FORSTK							   11600
       INTEGER SDO(3), SIF(3), SELSE(5), SWHILE(6), SBREAK(6), SNEXT(5)    11601
       INTEGER SFOR(4), SREPT(7), SUNTIL(6)				   11602
       INTEGER VDO(2), VIF(2), VELSE(2), VWHILE(2), VBREAK(2), VNEXT(2)    11603
       INTEGER VFOR(2), VREPT(2), VUNTIL(2)				   11604
       INTEGER LEVEL							   11605
       INTEGER LINECT							   11606
       INTEGER INFILE							   11607
       INTEGER LASTP							   11608
       INTEGER LASTT							   11609
       INTEGER NAMPTR							   11610
       INTEGER TABLE							   11611
       INTEGER OUTP							   11612
       INTEGER OUTBUF							   11613
       COMMON /CCHAR/ EXTDIG(10), INTDIG(10), EXTLET(26), INTLET(26),  E   11614
     *XTBIG(26), INTBIG(26), EXTCHR(33), INTCHR(33),  EXTBLK, INTBLK	   11615
       COMMON /CDEFIO/ BP, BUF(300)					   11616
       COMMON /CFOR/ FORDEP, FORSTK(200)				   11617
       COMMON /CKEYWD/ SDO, SIF, SELSE, SWHILE, SBREAK, SNEXT, SFOR, SRE   11618
     *PT, SUNTIL, VDO, VIF, VELSE, VWHILE, VBREAK, VNEXT, VFOR, VREPT, V   11619
     *UNTIL								   11620
       COMMON /CLINE/ LEVEL, LINECT(5), INFILE(5)			   11621
       COMMON /CLOOK/ LASTP, LASTT, NAMPTR(200), TABLE(1500)		   11622
       COMMON /COUTLN/ OUTP, OUTBUF(81) 				   11623
       OUTBUF(OUTP+1) = 10						   11624
       OUTBUF(OUTP+2) = 10002						   11625
       CALL PUTLIN(OUTBUF, 6)						   11626
       OUTP = 0 							   11627
       RETURN								   11628
       END								   11629
C									   11630
C OUTGO - OUTPUT "GOTO	N"						   11631
C									   11632
       SUBROUTINE OUTGO(N)						   11633
       INTEGER N							   11634
       INTEGER GOTO(6)							   11635
       DATA GOTO(1) /103/						   11636
       DATA GOTO(2) /111/						   11637
       DATA GOTO(3) /116/						   11638
       DATA GOTO(4) /111/						   11639
       DATA GOTO(5) /32/						   11640
       DATA GOTO(6) /10002/						   11641
       CALL OUTTAB							   11642
       CALL OUTSTR(GOTO)						   11643
       CALL OUTNUM(N)							   11644
       CALL OUTDON							   11645
       RETURN								   11646
       END								   11647
C									   11648
C OUTMAP - CONVERT RIGHT ADJ ASCII TO LEFT ADJUSTED EXTERNAL REP	   11649
C									   11650
       INTEGER FUNCTION OUTMAP(INCHAR)					   11651
       INTEGER I, INCHAR						   11652
       INTEGER EXTDIG							   11653
       INTEGER INTDIG							   11654
       INTEGER EXTLET							   11655
       INTEGER INTLET							   11656
       INTEGER EXTBIG							   11657
       INTEGER INTBIG							   11658
       INTEGER EXTCHR							   11659
       INTEGER INTCHR							   11660
       INTEGER EXTBLK							   11661
       INTEGER INTBLK							   11662
       INTEGER BP							   11663
       INTEGER BUF							   11664
       INTEGER FORDEP							   11665
       INTEGER FORSTK							   11666
       INTEGER SDO(3), SIF(3), SELSE(5), SWHILE(6), SBREAK(6), SNEXT(5)    11667
       INTEGER SFOR(4), SREPT(7), SUNTIL(6)				   11668
       INTEGER VDO(2), VIF(2), VELSE(2), VWHILE(2), VBREAK(2), VNEXT(2)    11669
       INTEGER VFOR(2), VREPT(2), VUNTIL(2)				   11670
       INTEGER LEVEL							   11671
       INTEGER LINECT							   11672
       INTEGER INFILE							   11673
       INTEGER LASTP							   11674
       INTEGER LASTT							   11675
       INTEGER NAMPTR							   11676
       INTEGER TABLE							   11677
       INTEGER OUTP							   11678
       INTEGER OUTBUF							   11679
       COMMON /CCHAR/ EXTDIG(10), INTDIG(10), EXTLET(26), INTLET(26),  E   11680
     *XTBIG(26), INTBIG(26), EXTCHR(33), INTCHR(33),  EXTBLK, INTBLK	   11681
       COMMON /CDEFIO/ BP, BUF(300)					   11682
       COMMON /CFOR/ FORDEP, FORSTK(200)				   11683
       COMMON /CKEYWD/ SDO, SIF, SELSE, SWHILE, SBREAK, SNEXT, SFOR, SRE   11684
     *PT, SUNTIL, VDO, VIF, VELSE, VWHILE, VBREAK, VNEXT, VFOR, VREPT, V   11685
     *UNTIL								   11686
       COMMON /CLINE/ LEVEL, LINECT(5), INFILE(5)			   11687
       COMMON /CLOOK/ LASTP, LASTT, NAMPTR(200), TABLE(1500)		   11688
       COMMON /COUTLN/ OUTP, OUTBUF(81) 				   11689
       IF(.NOT.(INCHAR .EQ. INTBLK)) GOTO 23270 			   11690
       OUTMAP = EXTBLK							   11691
       RETURN								   11692
23270  CONTINUE 							   11693
       DO23272I = 1, 10 						   11694
       IF(.NOT.(INCHAR .EQ. INTDIG(I))) GOTO 23274			   11695
       OUTMAP = EXTDIG(I)						   11696
       RETURN								   11697
23274  CONTINUE 							   11698
23272  CONTINUE 							   11699
23273  CONTINUE 							   11700
       DO23276I = 1, 26 						   11701
       IF(.NOT.(INCHAR .EQ. INTLET(I))) GOTO 23278			   11702
       OUTMAP = EXTBIG(I)
       RETURN								   11704
23278  CONTINUE 							   11705
23276  CONTINUE 							   11706
23277  CONTINUE 							   11707
       DO23280I = 1, 26 						   11708
       IF(.NOT.(INCHAR .EQ. INTBIG(I))) GOTO 23282			   11709
       OUTMAP = EXTBIG(I)						   11710
       RETURN								   11711
23282  CONTINUE 							   11712
23280  CONTINUE 							   11713
23281  CONTINUE 							   11714
       DO23284I = 1, 33 						   11715
       IF(.NOT.(INCHAR .EQ. INTCHR(I))) GOTO 23286			   11716
       OUTMAP = EXTCHR(I)						   11717
       RETURN								   11718
23286  CONTINUE 							   11719
23284  CONTINUE 							   11720
23285  CONTINUE 							   11721
       OUTMAP = 0
       RETURN								   11723
       END								   11724
C									   11725
C OUTNUM - OUTPUT DECIMAL NUMBER					   11726
C									   11727
       SUBROUTINE OUTNUM(N)						   11728
       INTEGER CHARS(10)						   11729
       INTEGER ITOC							   11730
       INTEGER I, LEN, N						   11731
       LEN = ITOC(N, CHARS, 10) 					   11732
       CONTINUE 							   11733
       I = 1								   11734
23288  IF(.NOT.( I .LE. LEN))  GOTO 23290				   11735
       CALL OUTCH(CHARS(I))						   11736
23289	I = I + 1							   11737
       GOTO 23288							   11738
23290  CONTINUE 							   11739
       RETURN								   11740
       END								   11741
C									   11742
C OUTSTR - OUTPUT STRING						   11743
C									   11744
       SUBROUTINE OUTSTR(STR)						   11745
       INTEGER C, STR(100)						   11746
       INTEGER I, J							   11747
       CONTINUE 							   11748
       I = 1								   11749
23291  IF(.NOT.( STR(I) .NE. 10002)) GOTO 23293 			   11750
       C = STR(I)							   11751
       IF(.NOT.(C .NE. 39 .AND. C .NE. 34))   GOTO 23294		   11752
       CALL OUTCH(C)							   11753
       GOTO 23295							   11754
23294  CONTINUE 							   11755
       I = I + 1							   11756
       CONTINUE 							   11757
       J = I								   11758
23296  IF(.NOT.( STR(J) .NE. C))  GOTO 23298				   11759
23297	J = J + 1							   11760
       GOTO 23296							   11761
23298  CONTINUE 							   11762
       CALL OUTNUM(J-I) 						   11763
       CALL OUTCH(104)							   11764
       CONTINUE 							   11765
23299  IF(.NOT.( I .LT. J)) GOTO 23301					   11766
       CALL OUTCH(STR(I))						   11767
23300	I = I + 1							   11768
       GOTO 23299							   11769
23301  CONTINUE 							   11770
23295  CONTINUE 							   11771
23292	I = I + 1							   11772
       GOTO 23291							   11773
23293  CONTINUE 							   11774
       RETURN								   11775
       END								   11776
C									   11777
C OUTTAB - GET PAST COLUMN 6						   11778
C									   11779
       SUBROUTINE OUTTAB						   11780
       INTEGER EXTDIG							   11781
       INTEGER INTDIG							   11782
       INTEGER EXTLET							   11783
       INTEGER INTLET							   11784
       INTEGER EXTBIG							   11785
       INTEGER INTBIG							   11786
       INTEGER EXTCHR							   11787
       INTEGER INTCHR							   11788
       INTEGER EXTBLK							   11789
       INTEGER INTBLK							   11790
       INTEGER BP							   11791
       INTEGER BUF							   11792
       INTEGER FORDEP							   11793
       INTEGER FORSTK							   11794
       INTEGER SDO(3), SIF(3), SELSE(5), SWHILE(6), SBREAK(6), SNEXT(5)    11795
       INTEGER SFOR(4), SREPT(7), SUNTIL(6)				   11796
       INTEGER VDO(2), VIF(2), VELSE(2), VWHILE(2), VBREAK(2), VNEXT(2)    11797
       INTEGER VFOR(2), VREPT(2), VUNTIL(2)				   11798
       INTEGER LEVEL							   11799
       INTEGER LINECT							   11800
       INTEGER INFILE							   11801
       INTEGER LASTP							   11802
       INTEGER LASTT							   11803
       INTEGER NAMPTR							   11804
       INTEGER TABLE							   11805
       INTEGER OUTP							   11806
       INTEGER OUTBUF							   11807
       COMMON /CCHAR/ EXTDIG(10), INTDIG(10), EXTLET(26), INTLET(26),  E   11808
     *XTBIG(26), INTBIG(26), EXTCHR(33), INTCHR(33),  EXTBLK, INTBLK	   11809
       COMMON /CDEFIO/ BP, BUF(300)					   11810
       COMMON /CFOR/ FORDEP, FORSTK(200)				   11811
       COMMON /CKEYWD/ SDO, SIF, SELSE, SWHILE, SBREAK, SNEXT, SFOR, SRE   11812
     *PT, SUNTIL, VDO, VIF, VELSE, VWHILE, VBREAK, VNEXT, VFOR, VREPT, V   11813
     *UNTIL								   11814
       COMMON /CLINE/ LEVEL, LINECT(5), INFILE(5)			   11815
       COMMON /CLOOK/ LASTP, LASTT, NAMPTR(200), TABLE(1500)		   11816
       COMMON /COUTLN/ OUTP, OUTBUF(81) 				   11817
       CONTINUE 							   11818
23302  IF(.NOT.(OUTP .LT. 6))  GOTO 23303				   11819
       CALL OUTCH(32)							   11820
       GOTO 23302							   11821
23303  CONTINUE 							   11822
       RETURN								   11823
       END								   11824
C									   11825
C PARSE - PARSE RATFOR SOURCE PROGRAM					   11826
C									   11827
       SUBROUTINE PARSE 						   11828
       INTEGER LEXSTR(200)						   11829
       INTEGER LEX							   11830
       INTEGER LAB, LABVAL(100), LEXTYP(100), SP, TOKEN 		   11831
       CALL INITKW							   11832
       SP = 1								   11833
       LEXTYP(1) = 10003						   11834
       CONTINUE 							   11835
       TOKEN = LEX(LEXSTR)						   11836
23304  IF(.NOT.( TOKEN .NE. 10003))  GOTO 23306 			   11837
       IF(.NOT.(TOKEN .EQ. 10261))   GOTO 23307 			   11838
       CALL IFCODE(LAB) 						   11839
       GOTO 23308							   11840
23307  CONTINUE 							   11841
       IF(.NOT.(TOKEN .EQ. 10266))   GOTO 23309 			   11842
       CALL DOCODE(LAB) 						   11843
       GOTO 23310							   11844
23309  CONTINUE 							   11845
       IF(.NOT.(TOKEN .EQ. 10263))   GOTO 23311 			   11846
       CALL WHILEC(LAB) 						   11847
       GOTO 23312							   11848
23311  CONTINUE 							   11849
       IF(.NOT.(TOKEN .EQ. 10268))   GOTO 23313 			   1185    CALL FORCOD(LAB)						       11851
       GOTO 23314							   11852
23313  CONTINUE 							   11853
       IF(.NOT.(TOKEN .EQ. 10269))   GOTO 23315 			   11854
       CALL REPCOD(LAB) 						   11855
       GOTO 23316							   11856
23315  CONTINUE 							   11857
       IF(.NOT.(TOKEN .EQ. 10260))   GOTO 23317 			   11858
       CALL LABELC(LEXSTR)						   11859
       GOTO 23318							   11860
23317  CONTINUE 							   11861
       IF(.NOT.(TOKEN .EQ. 10262))   GOTO 23319 			   11862
       IF(.NOT.(LEXTYP(SP) .EQ. 10261)) GOTO 23321			   11863
       CALL ELSEIF(LABVAL(SP))						   11864
       GOTO 23322							   11865
23321  CONTINUE 							   11866
       CALL SYNERR(13HILLEGAL ELSE.)					   11867
23322  CONTINUE 							   11868
23319  CONTINUE 							   21869
23318  CONTINUE 							   21870
23316  CONTINUE 							   21871
23314  CONTINUE 							   21872
23312  CONTINUE 							   21873
23310  CONTINUE 							   21874
23308  CONTINUE 							   21875
       IF(.NOT.(TOKEN.EQ.10261 .OR. TOKEN.EQ.10262 .OR. TOKEN.EQ.10263	   21876
     *	    .OR. TOKEN.EQ.10268 .OR. TOKEN.EQ.10269	    .OR. TOKEN.E   21877
     *Q.10266 .OR. TOKEN.EQ.10260 .OR. TOKEN.EQ.123))  GOTO 23323	   21878
       SP = SP + 1							   21879
       IF(.NOT.(SP .GT. 100))  GOTO 23325				   21880
       CALL ERROR(25HSTACK OVERFLOW IN PARSER.) 			   21881
23325  CONTINUE 							   21882
       LEXTYP(SP) = TOKEN						   21883
       LABVAL(SP) = LAB 						   21884
       GOTO 23324							   21885
23323  CONTINUE 							   21886
       IF(.NOT.(TOKEN .EQ. 125))  GOTO 23327				   21887
       IF(.NOT.(LEXTYP(SP) .EQ. 123))	GOTO 23329			   21888
       SP = SP - 1							   21889
       GOTO 23330							   21890
23329  CONTINUE 							   21891
       CALL SYNERR(20HILLEGAL RIGHT BRACE.)				   21892
23330  CONTINUE 							   21893
       GOTO 23328							   21894
23327  CONTINUE 							   21895
       IF(.NOT.(TOKEN .EQ. 10267))   GOTO 23331 			   21896
       CALL OTHERC(LEXSTR)						   21897
       GOTO 23332							   21898
23331  CONTINUE 							   21899
       IF(.NOT.(TOKEN .EQ. 10264 .OR. TOKEN .EQ. 10265))  GOTO 23333	   21900
       CALL BRKNXT(SP, LEXTYP, LABVAL, TOKEN)				   21901
23333  CONTINUE 							   21902
23332  CONTINUE 							   21903
23328  CONTINUE 							   21904
       TOKEN = LEX(LEXSTR)						   21905
       CALL PBSTR(LEXSTR)						   21906
       CALL UNSTAK(SP, LEXTYP, LABVAL, TOKEN)				   21907
23324  CONTINUE 							   21908
23305	TOKEN = LEX(LEXSTR)						   21909
       GOTO 23304							   21910
23306  CONTINUE 							   21911
       IF(.NOT.(SP .NE. 1)) GOTO 23335					   21912
       CALL SYNERR(15HUNEXPECTED EOF.)					   21913
23335  CONTINUE 							   21914
       RETURN								   21915
       END								   21916
C									   21917
C PBSTR - PUSH STRING BACK ONTO INPUT					   21918
C									   21919
       SUBROUTINE PBSTR(IN)						   21920
       INTEGER IN(100)							   21921
       INTEGER LENGTH							   21922
       INTEGER I							   21923
       CONTINUE 							   21924
       I = LENGTH(IN)							   21925
23337  IF(.NOT.( I .GT. 0)) GOTO 23339					   21926
       CALL PUTBAK(IN(I))						   21927
23338	I = I - 1							   21928
       GOTO 23337							   21929
23339  CONTINUE 							   21930
       RETURN								   21931
       END								   21932
C									   21933
C PUTBAK - PUSH CHARACTER BACK ONTO INPUT				   21934
C									   21935
       SUBROUTINE PUTBAK(C)						   21936
       INTEGER C							   21937
       INTEGER EXTDIG							   21938
       INTEGER INTDIG							   21939
       INTEGER EXTLET							   21940
       INTEGER INTLET							   21941
       INTEGER EXTBIG							   21942
       INTEGER INTBIG							   21943
       INTEGER EXTCHR							   21944
       INTEGER INTCHR							   21945
       INTEGER EXTBLK							   21946
       INTEGER INTBLK							   21947
       INTEGER BP							   21948
       INTEGER BUF							   21949
       INTEGER FORDEP							   21950
       INTEGER FORSTK							   21951
       INTEGER SDO(3), SIF(3), SELSE(5), SWHILE(6), SBREAK(6), SNEXT(5)    21952
       INTEGER SFOR(4), SREPT(7), SUNTIL(6)				   21953
       INTEGER VDO(2), VIF(2), VELSE(2), VWHILE(2), VBREAK(2), VNEXT(2)    21954
       INTEGER VFOR(2), VREPT(2), VUNTIL(2)				   21955
       INTEGER LEVEL							   21956
       INTEGER LINECT							   21957
       INTEGER INFILE							   21958
       INTEGER LASTP							   21959
       INTEGER LASTT							   21960
       INTEGER NAMPTR							   21961
       INTEGER TABLE							   21962
       INTEGER OUTP							   21963
       INTEGER OUTBUF							   21964
       COMMON /CCHAR/ EXTDIG(10), INTDIG(10), EXTLET(26), INTLET(26),  E   21965
     *XTBIG(26), INTBIG(26), EXTCHR(33), INTCHR(33),  EXTBLK, INTBLK	   21966
       COMMON /CDEFIO/ BP, BUF(300)					   21967
       COMMON /CFOR/ FORDEP, FORSTK(200)				   21968
       COMMON /CKEYWD/ SDO, SIF, SELSE, SWHILE, SBREAK, SNEXT, SFOR, SRE   21969
     *PT, SUNTIL, VDO, VIF, VELSE, VWHILE, VBREAK, VNEXT, VFOR, VREPT, V   21970
     *UNTIL								   21971
       COMMON /CLINE/ LEVEL, LINECT(5), INFILE(5)			   21972
       COMMON /CLOOK/ LASTP, LASTT, NAMPTR(200), TABLE(1500)		   21973
       COMMON /COUTLN/ OUTP, OUTBUF(81) 				   21974
       BP = BP + 1							   21975
       IF(.NOT.(BP .GT. 300))  GOTO 23340				   21976
       CALL ERROR(32HTOO MANY CHARACTERS PUSHED BACK.)			   21977
23340  CONTINUE 							   21978
       BUF(BP) = C							   21979
       RETURN								   21980
       END								   21981
C									   21982
C PUTCH (INTERIM VERSION)  PUT CHARACTERS				   21983
C									   21984
       SUBROUTINE PUTCH(C, F)						   21985
       INTEGER BUF(81), C						   21986
       INTEGER OUTMAP							   21987
       INTEGER F, I, LASTC						   21988
       DATA LASTC /0/							   21989
       IF(.NOT.(LASTC .GE. 81 .OR. C .EQ. 10))	 GOTO 23342		   21990
       IF(.NOT.( LASTC .LE. 0 ))  GOTO 23344				   21991
       WRITE(F,2)							   21992
2	  FORMAT(/)							   21993
       GOTO 23345							   21994
23344  CONTINUE 							   21995
       WRITE(F, 1) (BUF(I), I = 1, LASTC)				   21996
1	  FORMAT(80 A1) 						   21997
23345  CONTINUE 							   21998
       LASTC = 0							   21999
23342  CONTINUE 							   22000
       IF(.NOT.(C .NE. 10)) GOTO 23346					   22001
       LASTC = LASTC + 1						   22002
       BUF(LASTC) = OUTMAP(C)						   22003
23346  CONTINUE 							   22004
       RETURN								   22005
       END								   22006
C									   22007
C PUTLIN - PUT OUT LINE BY REPEATED CALLS TO PUTCH			   22008
C									   22009
       SUBROUTINE PUTLIN(B, F)						   22010
       INTEGER B(100)							   22011
       INTEGER F, I							   22012
       CONTINUE 							   22013
       I = 1								   22014
23348  IF(.NOT.( B(I) .NE. 10002))   GOTO 23350 			   22015
       CALL PUTCH(B(I), F)						   22016
23349	I = I + 1							   22017
       GOTO 23348							   22018
23350  CONTINUE 							   22019
       RETURN								   22020
       END								   22021
C									   22022
C RELATE - CONVERT RELATIONAL SHORTHANDS INTO LONG FORM 		   22023
C									   22024
       SUBROUTINE RELATE(TOKEN, LAST, FD)				   22025
       INTEGER NGETCH							   22026
       INTEGER TOKEN(100)						   22027
       INTEGER LENGTH							   22028
       INTEGER FD, LAST 						   22029
       INTEGER DOTGE(5), DOTGT(5), DOTLT(5), DOTLE(5)			   22030
       INTEGER DOTNE(5), DOTNOT(6), DOTEQ(5), DOTAND(6), DOTOR(5)	   22031
       DATA DOTGE(1), DOTGE(2), DOTGE(3), DOTGE(4), DOTGE(5)/ 46, 103, 1   22032
     *01, 46, 10002/							   22033
       DATA DOTGT(1), DOTGT(2), DOTGT(3), DOTGT(4), DOTGT(5)/ 46, 103, 1   22034
     *16, 46, 10002/							   22035
       DATA DOTLE(1), DOTLE(2), DOTLE(3), DOTLE(4), DOTLE(5)/ 46, 108, 1   22036
     *01, 46, 10002/							   22037
       DATA DOTLT(1), DOTLT(2), DOTLT(3), DOTLT(4), DOTLT(5)/ 46, 108, 1   22038
     *16, 46, 10002/							   22039
       DATA DOTNE(1), DOTNE(2), DOTNE(3), DOTNE(4), DOTNE(5)/ 46, 110, 1   22040
     *01, 46, 10002/							   22041
       DATA DOTEQ(1), DOTEQ(2), DOTEQ(3), DOTEQ(4), DOTEQ(5)/ 46, 101, 1   22042
     *13, 46, 10002/							   22043
       DATA DOTOR(1), DOTOR(2), DOTOR(3), DOTOR(4), DOTOR(5)/ 46, 111, 1   22044
     *14, 46, 10002/							   22045
       DATA DOTAND(1), DOTAND(2), DOTAND(3), DOTAND(4), DOTAND(5), DOTAN   22046
     *D(6) /46, 97, 110, 100, 46, 10002/				   22047
       DATA DOTNOT(1), DOTNOT(2), DOTNOT(3), DOTNOT(4), DOTNOT(5), DOTNO   22048
     *T(6) /46, 110, 111, 116, 46, 10002/				   22049
       IF(.NOT.(NGETCH(TOKEN(2), FD) .NE. 61))	 GOTO 23351		   22050
       CALL PUTBAK(TOKEN(2))						   22051
23351  CONTINUE 							   22052
       IF(.NOT.(TOKEN(1) .EQ. 62))   GOTO 23353 			   22053
       IF(.NOT.(TOKEN(2) .EQ. 61))   GOTO 23355 			   22054
       CALL SCOPY(DOTGE, 1, TOKEN, 1)					   22055
       GOTO 23356							   22056
23355  CONTINUE 							   22057
       CALL SCOPY(DOTGT, 1, TOKEN, 1)					   22058
23356  CONTINUE 							   22059
       GOTO 23354							   22060
23353  CONTINUE 							   22061
       IF(.NOT.(TOKEN(1) .EQ. 60))   GOTO 23357 			   22062
       IF(.NOT.(TOKEN(2) .EQ. 61))   GOTO 23359 			   22063
       CALL SCOPY(DOTLE, 1, TOKEN, 1)					   22064
       GOTO 23360							   22065
23359  CONTINUE 							   22066
       CALL SCOPY(DOTLT, 1, TOKEN, 1)					   22067
23360  CONTINUE 							   22068
       GOTO 23358							   22069
23357  CONTINUE 							   22070
       IF(.NOT.(TOKEN(1) .EQ. 33))   GOTO 23361 			   22071
       IF(.NOT.(TOKEN(2) .EQ. 61))   GOTO 23363 			   22072
       CALL SCOPY(DOTNE, 1, TOKEN, 1)					   22073
       GOTO 23364							   22074
23363  CONTINUE 							   22075
       CALL SCOPY(DOTNOT, 1, TOKEN, 1)					   22076
23364  CONTINUE 							   22077
       GOTO 23362							   22078
23361  CONTINUE 							   22079
       IF(.NOT.(TOKEN(1) .EQ. 61))   GOTO 23365 			   22080
       IF(.NOT.(TOKEN(2) .EQ. 61))   GOTO 23367 			   22081
       CALL SCOPY(DOTEQ, 1, TOKEN, 1)					   22082
       GOTO 23368							   22083
23367  CONTINUE 							   22084
       TOKEN(2) = 10002 						   22085
23368  CONTINUE 							   22086
       GOTO 23366							   22087
23365  CONTINUE 							   22088
       IF(.NOT.(TOKEN(1) .EQ. 38))   GOTO 23369 			   22089
       CALL SCOPY(DOTAND, 1, TOKEN, 1)					   22090
       GOTO 23370							   22091
23369  CONTINUE 							   22092
       IF(.NOT.(TOKEN(1) .EQ. 124))  GOTO 23371 			   22093
       CALL SCOPY(DOTOR, 1, TOKEN, 1)					   22094
       GOTO 23372							   22095
23371  CONTINUE 							   22096
       TOKEN(2) = 10002 						   22097
23372  CONTINUE 							   22098
23370  CONTINUE 							   22099
23366  CONTINUE 							   22100
23362  CONTINUE 							   22101
23358  CONTINUE 							   22102
23354  CONTINUE 							   22103
       LAST = LENGTH(TOKEN)						   22104
       RETURN								   22105
       END								   22106
C									   22107
C REMARK - PRINT WARNING MESSAGE					   22108
C									   22109
       SUBROUTINE REMARK(BUF)						   22110
       INTEGER BUF(100), I						   22111
       WRITE(3, 10) (BUF(I), I = 1, 10) 				    2112
10	  FORMAT(10A2)							    2113
       RETURN								   22114
       END								   22115
C									   22116
C REPCOD - GENERATE CODE FOR BEGINNING OF REPEAT			   22117
C									   22118
       SUBROUTINE REPCOD(LAB)						   22119
       INTEGER LABGEN							   22120
       INTEGER LAB							   22121
       CALL OUTCON(0)							   22122
       LAB = LABGEN(3)							   22123
       CALL OUTCON(LAB) 						   22124
       LAB = LAB + 1							   22125
       RETURN								   22126
       END								   22127
C									   22128
C SCOPY - COPY STRING AT FROM(I) TO TO(J)				   22129
C									   22130
       SUBROUTINE SCOPY(FROM, I, TO, J) 				   22131
       INTEGER FROM(100), TO(100)					   22132
       INTEGER I, J, K1, K2						   22133
       K2 = J								   22134
       CONTINUE 							   22135
       K1 = I								   22136
23373  IF(.NOT.( FROM(K1) .NE. 10002))	GOTO 23375			   22137
       TO(K2) = FROM(K1)						   22138
       K2 = K2 + 1							   22139
23374	K1 = K1 + 1							   22140
       GOTO 23373							   22141
23375  CONTINUE 							   22142
       TO(K2) = 10002							   22143
       RETURN								   22144
       END								   22145
C									   22146
C SYNERR - REPORT RATFOR SYNTAX ERROR					   22147
C									   22148
       SUBROUTINE SYNERR(MSG)						   22149
       INTEGER LC(81), MSG(81)						   22150
       INTEGER ITOC							   22151
       INTEGER I, JUNK							   22152
       INTEGER EXTDIG							   22153
       INTEGER INTDIG							   22154
       INTEGER EXTLET							   22155
       INTEGER INTLET							   22156
       INTEGER EXTBIG							   22157
       INTEGER INTBIG							   22158
       INTEGER EXTCHR							   22159
       INTEGER INTCHR							   22160
       INTEGER EXTBLK							   22161
       INTEGER INTBLK							   22162
       INTEGER BP							   22163
       INTEGER BUF							   22164
       INTEGER FORDEP							   22165
       INTEGER FORSTK							   22166
       INTEGER SDO(3), SIF(3), SELSE(5), SWHILE(6), SBREAK(6), SNEXT(5)    22167
       INTEGER SFOR(4), SREPT(7), SUNTIL(6)				   22168
       INTEGER VDO(2), VIF(2), VELSE(2), VWHILE(2), VBREAK(2), VNEXT(2)    22169
       INTEGER VFOR(2), VREPT(2), VUNTIL(2)				   22170
       INTEGER LEVEL							   22171
       INTEGER LINECT							   22172
       INTEGER INFILE							   22173
       INTEGER LASTP							   22174
       INTEGER LASTT							   22175
       INTEGER NAMPTR							   22176
       INTEGER TABLE							   22177
       INTEGER OUTP							   22178
       INTEGER OUTBUF							   22179
       COMMON /CCHAR/ EXTDIG(10), INTDIG(10), EXTLET(26), INTLET(26),  E   22180
     *XTBIG(26), INTBIG(26), EXTCHR(33), INTCHR(33),  EXTBLK, INTBLK	   22181
       COMMON /CDEFIO/ BP, BUF(300)					   22182
       COMMON /CFOR/ FORDEP, FORSTK(200)				   22183
       COMMON /CKEYWD/ SDO, SIF, SELSE, SWHILE, SBREAK, SNEXT, SFOR, SRE   22184
     *PT, SUNTIL, VDO, VIF, VELSE, VWHILE, VBREAK, VNEXT, VFOR, VREPT, V   22185
     *UNTIL								   22186
       COMMON /CLINE/ LEVEL, LINECT(5), INFILE(5)			   22187
       COMMON /CLOOK/ LASTP, LASTT, NAMPTR(200), TABLE(1500)		   22188
       COMMON /COUTLN/ OUTP, OUTBUF(81) 				   22189
       CALL REMARK(14HERROR AT LINE.)					   22190
       CONTINUE 							   22191
       I = 1								   22192
23376  IF(.NOT.( I .LE. LEVEL))   GOTO 23378				   22193
       CALL PUTCH(32, 6)						   22194
       JUNK = ITOC(LINECT(I), LC, 81)					   22195
       CALL PUTLIN(LC, 6)						   22196
23377	I = I + 1							   22197
       GOTO 23376							   22198
23378  CONTINUE 							   22199
       CALL PUTCH(58, 6)						   22200
       CALL PUTCH(10, 6)						   22201
       CALL REMARK(MSG) 						   22202
       RETURN								   22203
       END								   22204
C									   22205
C TYPE - RETURN LETTER, DIGIT OR CHARACTER				   22206
C									   22207
       INTEGER FUNCTION TYPE(C) 					   22208
       INTEGER C							   22209
       IF(.NOT.( C .GE. 48 .AND. C .LE. 57 )) GOTO 23379		   22210
       TYPE = 2 							   22211
       GOTO 23380							   22212
23379  CONTINUE 							   22213
       IF(.NOT.( C .GE. 97 .AND. C .LE. 122 ))	 GOTO 23381		   22214
       TYPE = 1 							   22215
       GOTO 23382							   22216
23381  CONTINUE 							   22217
       IF(.NOT.( C .GE. 65 .AND. C .LE. 90 )) GOTO 23383		   22218
       TYPE = 1 							   22219
       GOTO 23384							   22220
23383  CONTINUE 							   22221
       TYPE = C 							   22222
23384  CONTINUE 							   22223
23382  CONTINUE 							   22224
23380  CONTINUE 							   22225
       RETURN								   22226
       END								   22227
C									   22228
C UNSTAK - UNSTACK AT END OF STATEMENT					   22229
C									   22230
       SUBROUTINE UNSTAK(SP, LEXTYP, LABVAL, TOKEN)			   22231
       INTEGER LABVAL(100), LEXTYP(100), SP, TOKEN			   22232
       CONTINUE 							   22233
23385  IF(.NOT.( SP .GT. 1))   GOTO 23387				   22234
       IF(.NOT.(LEXTYP(SP) .EQ. 123))	GOTO 23388			   22235
       GOTO 23387							   22236
23388  CONTINUE 							   22237
       IF(.NOT.(LEXTYP(SP) .EQ. 10261 .AND. TOKEN .EQ. 10262))	GOTO 233   22238
     *90								   22239
       GOTO 23387							   22240
23390  CONTINUE 							   22241
       IF(.NOT.(LEXTYP(SP) .EQ. 10261)) GOTO 23392			   22242
       CALL OUTCON(LABVAL(SP))						   22243
       GOTO 23393							   22244
23392  CONTINUE 							   22245
       IF(.NOT.(LEXTYP(SP) .EQ. 10262)) GOTO 23394			   22246
       IF(.NOT.(SP .GT. 2)) GOTO 23396					   22247
       SP = SP - 1							   22248
23396  CONTINUE 							   22249
       CALL OUTCON(LABVAL(SP)+1)					   22250
       GOTO 23395							   22251
23394  CONTINUE 							   22252
       IF(.NOT.(LEXTYP(SP) .EQ. 10266)) GOTO 23398			   22253
       CALL DOSTAT(LABVAL(SP))						   22254
       GOTO 23399							   22255
23398  CONTINUE 							   22256
       IF(.NOT.(LEXTYP(SP) .EQ. 10263)) GOTO 23400			   22257
       CALL WHILES(LABVAL(SP))						   22258
       GOTO 23401							   22259
23400  CONTINUE 							   22260
       IF(.NOT.(LEXTYP(SP) .EQ. 10268)) GOTO 23402			   22261
       CALL FORS(LABVAL(SP))						   22262
       GOTO 23403							   22263
23402  CONTINUE 							   22264
       IF(.NOT.(LEXTYP(SP) .EQ. 10269)) GOTO 23404			   22265
       CALL UNTILS(LABVAL(SP), TOKEN)					   22266
23404  CONTINUE 							   22267
23403  CONTINUE 							   22268
23401  CONTINUE 							   22269
23399  CONTINUE 							   22270
23395  CONTINUE 							   22271
23393  CONTINUE 							   22272
23386	SP = SP - 1							   22273
       GOTO 23385							   22274
23387  CONTINUE 							   22275
       RETURN								   22276
       END								   22277
C									   22278
C UNTILS - GENERATE CODE FOR UNTIL OR END OF REPEAT			   22279
C									   22280
       SUBROUTINE UNTILS(LAB, TOKEN)					   22281
       INTEGER PTOKEN(200)						   22282
       INTEGER LEX							   22283
       INTEGER JUNK, LAB, TOKEN 					   22284
       CALL OUTNUM(LAB) 						   22285
       IF(.NOT.(TOKEN .EQ. 10270))   GOTO 23406 			   22286
       JUNK = LEX(PTOKEN)						   22287
       CALL IFGO(LAB-1) 						   22288
       GOTO 23407							   22289
23406  CONTINUE 							   22290
       CALL OUTGO(LAB-1)						   22291
23407  CONTINUE 							   22292
       CALL OUTCON(LAB+1)						   22293
       RETURN								   22294
       END								   22295
C									   22296
C WHILEC - GENERATE CODE FOR BEGINNING OF WHILE 			   22297
C									   22298
       SUBROUTINE WHILEC(LAB)						   22299
       INTEGER LABGEN							   22300
       INTEGER LAB							   22301
       CALL OUTCON(0)							   22302
       LAB = LABGEN(2)							   22303
       CALL OUTNUM(LAB) 						   22304
       CALL IFGO(LAB+1) 						   22305
       RETURN								   22306
       END								   22307
C									   22308
C WHILES - GENERATE CODE FOR END OF WHILE				   22309
C									   22310
       SUBROUTINE WHILES(LAB)						   22311
       INTEGER LAB							   22312
       CALL OUTGO(LAB)							   22313
       CALL OUTCON(LAB+1)						   22314
       RETURN								   22315
       END								   22316
