      SUBROUTINE MAIN
      INTEGER ANDPAT
      INTEGER COUNT
      INTEGER EXCEPT
      INTEGER ELEVEL
      INTEGER CASIND
      INTEGER PAT
      INTEGER ATEND
      INTEGER ATBEG
      INTEGER SEPS
      INTEGER NBRSEP
      INTEGER SEPLOC
      INTEGER MCOUNT
      INTEGER SKPING
      LOGICAL*1 LOCATD
      INTEGER BKLTH
      INTEGER LCOUNT
      LOGICAL*1 ST001Z(59)
      COMMON /FBCOM/ ANDPAT, COUNT, EXCEPT, ELEVEL, CASIND, PAT(132, 10)
     *, ATEND, ATBEG, SEPS(132,2), NBRSEP, SKPING, PRTING, MCOUNT, SEPLO
     *C, BKLTH, LCOUNT, LOCATD(10)
      DATA ST001Z(1)/117/,ST001Z(2)/115/,ST001Z(3)/97/,ST001Z(4)/103/,ST
     *001Z(5)/101/,ST001Z(6)/58/,ST001Z(7)/32/,ST001Z(8)/32/,ST001Z(9)/1
     *02/,ST001Z(10)/98/,ST001Z(11)/32/,ST001Z(12)/91/,ST001Z(13)/45/,ST
     *001Z(14)/97/,ST001Z(15)/99/,ST001Z(16)/105/,ST001Z(17)/120/,ST001Z
     *(18)/93/,ST001Z(19)/32/,ST001Z(20)/91/,ST001Z(21)/45/,ST001Z(22)/1
     *08/,ST001Z(23)/110/,ST001Z(24)/93/,ST001Z(25)/32/,ST001Z(26)/91/,S
     *T001Z(27)/45/,ST001Z(28)/115/,ST001Z(29)/101/,ST001Z(30)/120/,ST00
     *1Z(31)/112/,ST001Z(32)/114/,ST001Z(33)/32/,ST001Z(34)/91/,ST001Z(3
     *5)/45/,ST001Z(36)/115/,ST001Z(37)/101/,ST001Z(38)/120/,ST001Z(39)/
     *112/,ST001Z(40)/114/,ST001Z(41)/93/,ST001Z(42)/93/,ST001Z(43)/32/,
     *ST001Z(44)/101/,ST001Z(45)/120/,ST001Z(46)/112/,ST001Z(47)/114/,ST
     *001Z(48)/32/,ST001Z(49)/91/,ST001Z(50)/101/,ST001Z(51)/120/,ST001Z
     *(52)/112/,ST001Z(53)/114/,ST001Z(54)/93/,ST001Z(55)/32/,ST001Z(56)
     */46/,ST001Z(57)/46/,ST001Z(58)/46/,ST001Z(59)/0/
      CALL QUERY(ST001Z)
      CALL FBARGS
      CALL DOBK (1)
      IF (.NOT.(COUNT .EQ. 1))GOTO 23000
      CALL PUTINT(MCOUNT, 1,2)
      CALL PUTCH(10,2)
23000 CONTINUE
      RETURN
      END
      SUBROUTINE BMATCH (LINE)
      LOGICAL*1 LINE(100)
      INTEGER MATCH
      INTEGER ANDPAT
      INTEGER COUNT
      INTEGER EXCEPT
      INTEGER ELEVEL
      INTEGER CASIND
      INTEGER PAT
      INTEGER ATEND
      INTEGER ATBEG
      INTEGER SEPS
      INTEGER NBRSEP
      INTEGER SEPLOC
      INTEGER MCOUNT
      INTEGER SKPING
      LOGICAL*1 LOCATD
      INTEGER BKLTH
      INTEGER LCOUNT
      LOGICAL*1 TMPBUF
      COMMON /FBCOM/ ANDPAT, COUNT, EXCEPT, ELEVEL, CASIND, PAT(132, 10)
     *, ATEND, ATBEG, SEPS(132,2), NBRSEP, SKPING, PRTING, MCOUNT, SEPLO
     *C, BKLTH, LCOUNT, LOCATD(10)
      COMMON / FBTEMP / TMPBUF(402)
      CALL STRCPY(LINE, TMPBUF)
      IF (.NOT.(CASIND .EQ. 1))GOTO 23002
      CALL FOLD(TMPBUF)
23002 CONTINUE
      I=1
23004 IF (.NOT.(I.LE.ELEVEL))GOTO 23006
      IF (.NOT.(MATCH(TMPBUF, PAT(1,I)) .EQ. 1))GOTO 23007
      LOCATD(I) = 1
23007 CONTINUE
23005 I=I+1
      GOTO 23004
23006 CONTINUE
      RETURN
      END
      SUBROUTINE CHECKL (LINE)
      LOGICAL*1 LINE(100)
      INTEGER MATCH
      INTEGER ANDPAT
      INTEGER COUNT
      INTEGER EXCEPT
      INTEGER ELEVEL
      INTEGER CASIND
      INTEGER PAT
      INTEGER ATEND
      INTEGER ATBEG
      INTEGER SEPS
      INTEGER NBRSEP
      INTEGER SEPLOC
      INTEGER MCOUNT
      INTEGER SKPING
      LOGICAL*1 LOCATD
      INTEGER BKLTH
      INTEGER LCOUNT
      LOGICAL*1 TMPBUF
      COMMON /FBCOM/ ANDPAT, COUNT, EXCEPT, ELEVEL, CASIND, PAT(132, 10)
     *, ATEND, ATBEG, SEPS(132,2), NBRSEP, SKPING, PRTING, MCOUNT, SEPLO
     *C, BKLTH, LCOUNT, LOCATD(10)
      COMMON / FBTEMP / TMPBUF(402)
      CALL STRCPY(LINE, TMPBUF)
      IF (.NOT.(CASIND .EQ. 1))GOTO 23009
      CALL FOLD(TMPBUF)
23009 CONTINUE
      ATBEG = MATCH(TMPBUF, SEPS(1,1))
      IF (.NOT.(NBRSEP .EQ. 1))GOTO 23011
      ATEND = ATBEG
      GOTO 23012
23011 CONTINUE
      ATEND = MATCH(TMPBUF, SEPS(1,2))
23012 CONTINUE
      RETURN
      END
      SUBROUTINE DOBEG (LINE)
      LOGICAL*1 LINE(100)
      INTEGER STACKL
      INTEGER ANDPAT
      INTEGER COUNT
      INTEGER EXCEPT
      INTEGER ELEVEL
      INTEGER CASIND
      INTEGER PAT
      INTEGER ATEND
      INTEGER ATBEG
      INTEGER SEPS
      INTEGER NBRSEP
      INTEGER SEPLOC
      INTEGER MCOUNT
      INTEGER SKPING
      LOGICAL*1 LOCATD
      INTEGER BKLTH
      INTEGER LCOUNT
      LOGICAL*1 ST002Z(22)
      COMMON /FBCOM/ ANDPAT, COUNT, EXCEPT, ELEVEL, CASIND, PAT(132, 10)
     *, ATEND, ATBEG, SEPS(132,2), NBRSEP, SKPING, PRTING, MCOUNT, SEPLO
     *C, BKLTH, LCOUNT, LOCATD(10)
      DATA ST002Z(1)/66/,ST002Z(2)/108/,ST002Z(3)/111/,ST002Z(4)/99/,ST0
     *02Z(5)/107/,ST002Z(6)/32/,ST002Z(7)/98/,ST002Z(8)/117/,ST002Z(9)/1
     *02/,ST002Z(10)/102/,ST002Z(11)/101/,ST002Z(12)/114/,ST002Z(13)/32/
     *,ST002Z(14)/111/,ST002Z(15)/118/,ST002Z(16)/101/,ST002Z(17)/114/,S
     *T002Z(18)/102/,ST002Z(19)/108/,ST002Z(20)/111/,ST002Z(21)/119/,ST0
     *02Z(22)/0/
      CALL INITBK
      LCOUNT = 0
      IF (.NOT.(NBRSEP .GT. 1 .OR. SEPLOC .EQ. 1))GOTO 23013
      CALL BMATCH(LINE)
      IF (.NOT.(STACKL(LINE) .EQ. -3))GOTO 23015
      CALL ERROR (ST002Z)
23015 CONTINUE
23013 CONTINUE
      SKPING = 0
      PRTING = 0
      RETURN
      END
      SUBROUTINE DOBK (FD)
      INTEGER GETLIN, REMOVE
      INTEGER FD, PRT, FIRST, JUNK
      LOGICAL*1 LINE(402)
      INTEGER ANDPAT
      INTEGER COUNT
      INTEGER EXCEPT
      INTEGER ELEVEL
      INTEGER CASIND
      INTEGER PAT
      INTEGER ATEND
      INTEGER ATBEG
      INTEGER SEPS
      INTEGER NBRSEP
      INTEGER SEPLOC
      INTEGER MCOUNT
      INTEGER SKPING
      LOGICAL*1 LOCATD
      INTEGER BKLTH
      INTEGER LCOUNT
      LOGICAL*1 FBBUF
      INTEGER ENDSTK
      LOGICAL*1 FNAME
      INTEGER FB
      COMMON /FBCOM/ ANDPAT, COUNT, EXCEPT, ELEVEL, CASIND, PAT(132, 10)
     *, ATEND, ATBEG, SEPS(132,2), NBRSEP, SKPING, PRTING, MCOUNT, SEPLO
     *C, BKLTH, LCOUNT, LOCATD(10)
      COMMON /FBBUF/ FBBUF(5000), ENDSTK, FNAME(36), FB
      CALL INITBK
      FIRST = 1
23017 IF (.NOT.(GETLIN(LINE, FD) .NE. -1))GOTO 23018
      CALL CHECKL (LINE)
      IF (.NOT.(FIRST .EQ. 1 .AND. ATEND .EQ. 1 .AND. NBRSEP .EQ. 1))GOT
     *O 23019
      SEPLOC = 1
23019 CONTINUE
      FIRST = 0
      IF (.NOT.(ATEND .EQ. 1))GOTO 23021
      CALL DOEND(LINE)
23021 CONTINUE
      IF (.NOT.(ATBEG .EQ. 1))GOTO 23023
      CALL DOBEG(LINE)
      GOTO 23017
23023 CONTINUE
      IF (.NOT.(SKPING .EQ. 1))GOTO 23025
      GOTO 23017
23025 CONTINUE
      CALL DOLIN (LINE)
23026 CONTINUE
      GOTO 23017
23018 CONTINUE
      IF (.NOT.(SKPING .EQ. 0))GOTO 23027
      CALL DOEND(LINE)
23027 CONTINUE
      IF (.NOT.(FB .NE. -3))GOTO 23029
      CALL CLOSE(FB)
      JUNK = REMOVE(FNAME)
      FB = -3
23029 CONTINUE
      RETURN
      END
      SUBROUTINE DOEND (LINE)
      LOGICAL*1 LINE(100)
      INTEGER STACKL
      INTEGER PRT
      INTEGER ANDPAT
      INTEGER COUNT
      INTEGER EXCEPT
      INTEGER ELEVEL
      INTEGER CASIND
      INTEGER PAT
      INTEGER ATEND
      INTEGER ATBEG
      INTEGER SEPS
      INTEGER NBRSEP
      INTEGER SEPLOC
      INTEGER MCOUNT
      INTEGER SKPING
      LOGICAL*1 LOCATD
      INTEGER BKLTH
      INTEGER LCOUNT
      LOGICAL*1 ST003Z(22)
      COMMON /FBCOM/ ANDPAT, COUNT, EXCEPT, ELEVEL, CASIND, PAT(132, 10)
     *, ATEND, ATBEG, SEPS(132,2), NBRSEP, SKPING, PRTING, MCOUNT, SEPLO
     *C, BKLTH, LCOUNT, LOCATD(10)
      DATA ST003Z(1)/66/,ST003Z(2)/108/,ST003Z(3)/111/,ST003Z(4)/99/,ST0
     *03Z(5)/107/,ST003Z(6)/32/,ST003Z(7)/98/,ST003Z(8)/117/,ST003Z(9)/1
     *02/,ST003Z(10)/102/,ST003Z(11)/101/,ST003Z(12)/114/,ST003Z(13)/32/
     *,ST003Z(14)/111/,ST003Z(15)/118/,ST003Z(16)/101/,ST003Z(17)/114/,S
     *T003Z(18)/102/,ST003Z(19)/108/,ST003Z(20)/111/,ST003Z(21)/119/,ST0
     *03Z(22)/0/
      IF (.NOT.(PRTING .EQ. 1))GOTO 23031
      IF (.NOT.( (NBRSEP .GT. 1 .OR. SEPLOC .EQ. 0) .AND. COUNT .EQ. 0))
     *GOTO 23033
      CALL OUTLIN(LINE)
23033 CONTINUE
      IF (.NOT.(BKLTH .NE. 30000))GOTO 23035
      LCOUNT=LCOUNT+1
23037 IF (.NOT.(LCOUNT.LE.BKLTH))GOTO 23039
      CALL PUTCH(10, 2)
23038 LCOUNT=LCOUNT+1
      GOTO 23037
23039 CONTINUE
23035 CONTINUE
      GOTO 23032
23031 CONTINUE
      IF (.NOT.(SKPING .EQ. 0))GOTO 23040
      IF (.NOT.(NBRSEP .GT. 1 .OR. SEPLOC .EQ. 0))GOTO 23042
      CALL BMATCH (LINE)
      IF (.NOT.(STACKL(LINE) .EQ.-3))GOTO 23044
      CALL ERROR (ST003Z)
23044 CONTINUE
23042 CONTINUE
      CALL TALLY (PRT)
      IF (.NOT.(PRT .EQ. 1))GOTO 23046
      CALL PRINTB
      IF (.NOT.(BKLTH .NE. 30000))GOTO 23048
      LCOUNT=LCOUNT+1
23050 IF (.NOT.(LCOUNT.LE.BKLTH))GOTO 23052
      CALL PUTCH(10,2)
23051 LCOUNT=LCOUNT+1
      GOTO 23050
23052 CONTINUE
23048 CONTINUE
23046 CONTINUE
23040 CONTINUE
23032 CONTINUE
      SKPING = 1
      PRTING = 0
      RETURN
      END
      SUBROUTINE DOLIN (LINE)
      LOGICAL*1 LINE(100)
      INTEGER PRT
      INTEGER STACKL
      INTEGER ANDPAT
      INTEGER COUNT
      INTEGER EXCEPT
      INTEGER ELEVEL
      INTEGER CASIND
      INTEGER PAT
      INTEGER ATEND
      INTEGER ATBEG
      INTEGER SEPS
      INTEGER NBRSEP
      INTEGER SEPLOC
      INTEGER MCOUNT
      INTEGER SKPING
      LOGICAL*1 LOCATD
      INTEGER BKLTH
      INTEGER LCOUNT
      LOGICAL*1 ST004Z(22)
      COMMON /FBCOM/ ANDPAT, COUNT, EXCEPT, ELEVEL, CASIND, PAT(132, 10)
     *, ATEND, ATBEG, SEPS(132,2), NBRSEP, SKPING, PRTING, MCOUNT, SEPLO
     *C, BKLTH, LCOUNT, LOCATD(10)
      DATA ST004Z(1)/66/,ST004Z(2)/108/,ST004Z(3)/111/,ST004Z(4)/99/,ST0
     *04Z(5)/107/,ST004Z(6)/32/,ST004Z(7)/98/,ST004Z(8)/117/,ST004Z(9)/1
     *02/,ST004Z(10)/102/,ST004Z(11)/101/,ST004Z(12)/114/,ST004Z(13)/32/
     *,ST004Z(14)/111/,ST004Z(15)/118/,ST004Z(16)/101/,ST004Z(17)/114/,S
     *T004Z(18)/102/,ST004Z(19)/108/,ST004Z(20)/111/,ST004Z(21)/119/,ST0
     *04Z(22)/0/
      IF (.NOT.(SKPING .EQ. 1))GOTO 23053
      RETURN
23053 CONTINUE
      IF (.NOT.(PRTING .EQ. 1))GOTO 23055
      IF (.NOT.(COUNT .EQ. 0))GOTO 23057
      CALL OUTLIN(LINE)
23057 CONTINUE
      GOTO 23056
23055 CONTINUE
      CALL BMATCH (LINE)
      IF (.NOT.(STACKL(LINE) .EQ. -3))GOTO 23059
      CALL ERROR (ST004Z)
23059 CONTINUE
      CALL TALLY(PRT)
      IF (.NOT.(PRT .EQ. 1 .AND. EXCEPT .EQ. 0))GOTO 23061
      CALL PRINTB
      PRTING = 1
      GOTO 23062
23061 CONTINUE
      IF (.NOT.(PRT .EQ. 0 .AND. EXCEPT .EQ. 1))GOTO 23063
      SKPING = 1
23063 CONTINUE
23062 CONTINUE
23056 CONTINUE
      RETURN
      END
      SUBROUTINE FBARGS
      LOGICAL*1 ARG(402)
      INTEGER GETARG, ITOC, GETPAT, STATUS, INDEXC, CTOI
      INTEGER I, J
      LOGICAL*1 FBBUF
      INTEGER ENDSTK
      LOGICAL*1 FNAME
      INTEGER FB
      INTEGER ANDPAT
      INTEGER COUNT
      INTEGER EXCEPT
      INTEGER ELEVEL
      INTEGER CASIND
      INTEGER PAT
      INTEGER ATEND
      INTEGER ATBEG
      INTEGER SEPS
      INTEGER NBRSEP
      INTEGER SEPLOC
      INTEGER MCOUNT
      INTEGER SKPING
      LOGICAL*1 LOCATD
      INTEGER BKLTH
      INTEGER LCOUNT
      LOGICAL*1 ILPAT(18)
      LOGICAL*1 MAXEXP(30)
      LOGICAL*1 DSEP(5)
      LOGICAL*1 ST005Z(41)
      LOGICAL*1 ST006Z(59)
      LOGICAL*1 ST007Z(59)
      LOGICAL*1 ST008Z(26)
      COMMON /FBBUF/ FBBUF(5000), ENDSTK, FNAME(36), FB
      COMMON /FBCOM/ ANDPAT, COUNT, EXCEPT, ELEVEL, CASIND, PAT(132, 10)
     *, ATEND, ATBEG, SEPS(132,2), NBRSEP, SKPING, PRTING, MCOUNT, SEPLO
     *C, BKLTH, LCOUNT, LOCATD(10)
      DATA ILPAT(1)/105/,ILPAT(2)/108/,ILPAT(3)/108/,ILPAT(4)/101/,ILPAT
     *(5)/103/,ILPAT(6)/97/,ILPAT(7)/108/,ILPAT(8)/32/,ILPAT(9)/112/,ILP
     *AT(10)/97/,ILPAT(11)/116/,ILPAT(12)/116/,ILPAT(13)/101/,ILPAT(14)/
     *114/,ILPAT(15)/110/,ILPAT(16)/58/,ILPAT(17)/32/,ILPAT(18)/0/
      DATA MAXEXP(1)/109/,MAXEXP(2)/97/,MAXEXP(3)/120/,MAXEXP(4)/32/,MAX
     *EXP(5)/110/,MAXEXP(6)/98/,MAXEXP(7)/114/,MAXEXP(8)/32/,MAXEXP(9)/1
     *01/,MAXEXP(10)/120/,MAXEXP(11)/112/,MAXEXP(12)/114/,MAXEXP(13)/101
     */,MAXEXP(14)/115/,MAXEXP(15)/115/,MAXEXP(16)/105/,MAXEXP(17)/111/,
     *MAXEXP(18)/110/,MAXEXP(19)/115/,MAXEXP(20)/32/,MAXEXP(21)/97/,MAXE
     *XP(22)/108/,MAXEXP(23)/108/,MAXEXP(24)/111/,MAXEXP(25)/119/,MAXEXP
     *(26)/101/,MAXEXP(27)/100/,MAXEXP(28)/58/,MAXEXP(29)/32/,MAXEXP(30)
     */0/
      DATA DSEP(1)/37/,DSEP(2)/32/,DSEP(3)/42/,DSEP(4)/36/,DSEP(5)/0/
      DATA EXCEPT/0/
      DATA ANDPAT/0/
      DATA COUNT /0/
      DATA MCOUNT /0/
      DATA ELEVEL/0/
      DATA CASIND/0/
      DATA SKPING /0/
      DATA NBRSEP /0/
      DATA SEPLOC /0/
      DATA ENDSTK /0/
      DATA FB /-3/
      DATA BKLTH /30000/
      DATA LCOUNT /0/
      DATA ST005Z(1)/111/,ST005Z(2)/110/,ST005Z(3)/108/,ST005Z(4)/121/,S
     *T005Z(5)/32/,ST005Z(6)/115/,ST005Z(7)/116/,ST005Z(8)/97/,ST005Z(9)
     */114/,ST005Z(10)/116/,ST005Z(11)/32/,ST005Z(12)/97/,ST005Z(13)/110
     */,ST005Z(14)/100/,ST005Z(15)/32/,ST005Z(16)/101/,ST005Z(17)/110/,S
     *T005Z(18)/100/,ST005Z(19)/105/,ST005Z(20)/110/,ST005Z(21)/103/,ST0
     *05Z(22)/32/,ST005Z(23)/115/,ST005Z(24)/101/,ST005Z(25)/112/,ST005Z
     *(26)/97/,ST005Z(27)/114/,ST005Z(28)/97/,ST005Z(29)/116/,ST005Z(30)
     */111/,ST005Z(31)/114/,ST005Z(32)/115/,ST005Z(33)/32/,ST005Z(34)/97
     */,ST005Z(35)/108/,ST005Z(36)/108/,ST005Z(37)/111/,ST005Z(38)/119/,
     *ST005Z(39)/101/,ST005Z(40)/100/,ST005Z(41)/0/
      DATA ST006Z(1)/117/,ST006Z(2)/115/,ST006Z(3)/97/,ST006Z(4)/103/,ST
     *006Z(5)/101/,ST006Z(6)/58/,ST006Z(7)/32/,ST006Z(8)/32/,ST006Z(9)/1
     *02/,ST006Z(10)/98/,ST006Z(11)/32/,ST006Z(12)/91/,ST006Z(13)/45/,ST
     *006Z(14)/97/,ST006Z(15)/99/,ST006Z(16)/105/,ST006Z(17)/120/,ST006Z
     *(18)/93/,ST006Z(19)/32/,ST006Z(20)/91/,ST006Z(21)/45/,ST006Z(22)/1
     *08/,ST006Z(23)/110/,ST006Z(24)/93/,ST006Z(25)/32/,ST006Z(26)/91/,S
     *T006Z(27)/45/,ST006Z(28)/115/,ST006Z(29)/101/,ST006Z(30)/120/,ST00
     *6Z(31)/112/,ST006Z(32)/114/,ST006Z(33)/32/,ST006Z(34)/91/,ST006Z(3
     *5)/45/,ST006Z(36)/115/,ST006Z(37)/101/,ST006Z(38)/120/,ST006Z(39)/
     *112/,ST006Z(40)/114/,ST006Z(41)/93/,ST006Z(42)/93/,ST006Z(43)/32/,
     *ST006Z(44)/101/,ST006Z(45)/120/,ST006Z(46)/112/,ST006Z(47)/114/,ST
     *006Z(48)/32/,ST006Z(49)/91/,ST006Z(50)/101/,ST006Z(51)/120/,ST006Z
     *(52)/112/,ST006Z(53)/114/,ST006Z(54)/93/,ST006Z(55)/32/,ST006Z(56)
     */46/,ST006Z(57)/46/,ST006Z(58)/46/,ST006Z(59)/0/
      DATA ST007Z(1)/117/,ST007Z(2)/115/,ST007Z(3)/97/,ST007Z(4)/103/,ST
     *007Z(5)/101/,ST007Z(6)/58/,ST007Z(7)/32/,ST007Z(8)/32/,ST007Z(9)/1
     *02/,ST007Z(10)/98/,ST007Z(11)/32/,ST007Z(12)/91/,ST007Z(13)/45/,ST
     *007Z(14)/97/,ST007Z(15)/99/,ST007Z(16)/105/,ST007Z(17)/120/,ST007Z
     *(18)/93/,ST007Z(19)/32/,ST007Z(20)/91/,ST007Z(21)/45/,ST007Z(22)/1
     *08/,ST007Z(23)/110/,ST007Z(24)/93/,ST007Z(25)/32/,ST007Z(26)/91/,S
     *T007Z(27)/45/,ST007Z(28)/115/,ST007Z(29)/101/,ST007Z(30)/120/,ST00
     *7Z(31)/112/,ST007Z(32)/114/,ST007Z(33)/32/,ST007Z(34)/91/,ST007Z(3
     *5)/45/,ST007Z(36)/115/,ST007Z(37)/101/,ST007Z(38)/120/,ST007Z(39)/
     *112/,ST007Z(40)/114/,ST007Z(41)/93/,ST007Z(42)/93/,ST007Z(43)/32/,
     *ST007Z(44)/101/,ST007Z(45)/120/,ST007Z(46)/112/,ST007Z(47)/114/,ST
     *007Z(48)/32/,ST007Z(49)/91/,ST007Z(50)/101/,ST007Z(51)/120/,ST007Z
     *(52)/112/,ST007Z(53)/114/,ST007Z(54)/93/,ST007Z(55)/32/,ST007Z(56)
     */46/,ST007Z(57)/46/,ST007Z(58)/46/,ST007Z(59)/0/
      DATA ST008Z(1)/105/,ST008Z(2)/108/,ST008Z(3)/108/,ST008Z(4)/101/,S
     *T008Z(5)/103/,ST008Z(6)/97/,ST008Z(7)/108/,ST008Z(8)/32/,ST008Z(9)
     */100/,ST008Z(10)/101/,ST008Z(11)/102/,ST008Z(12)/97/,ST008Z(13)/11
     *7/,ST008Z(14)/108/,ST008Z(15)/116/,ST008Z(16)/32/,ST008Z(17)/115/,
     *ST008Z(18)/101/,ST008Z(19)/112/,ST008Z(20)/97/,ST008Z(21)/114/,ST0
     *08Z(22)/97/,ST008Z(23)/116/,ST008Z(24)/111/,ST008Z(25)/114/,ST008Z
     *(26)/0/
      I=1
23065 IF (.NOT.(GETARG(I, ARG, 128) .NE. -1))GOTO 23067
      IF (.NOT.(ARG(1) .EQ. 45 .AND. (ARG(2) .EQ. 115 .OR. ARG(2) .EQ. 8
     *3)))GOTO 23068
      NBRSEP = NBRSEP + 1
      IF (.NOT.(NBRSEP .GT. 2))GOTO 23070
      CALL ERROR (ST005Z)
23070 CONTINUE
      IF (.NOT.(CASIND .EQ. 1))GOTO 23072
      CALL FOLD(ARG)
23072 CONTINUE
      IF (.NOT.(GETPAT(ARG(3), SEPS(1, NBRSEP)) .EQ. -3))GOTO 23074
      CALL PUTLIN(ILPAT, 3)
      CALL ERROR (ARG(3))
23074 CONTINUE
      GOTO 23069
23068 CONTINUE
      IF (.NOT.(ARG(1) .EQ. 45))GOTO 23076
      CALL FOLD(ARG)
      IF (.NOT.(INDEXC(ARG, 97) .GT. 0))GOTO 23078
      ANDPAT = 1
23078 CONTINUE
      IF (.NOT.(INDEXC(ARG, 99) .GT. 0))GOTO 23080
      COUNT = 1
23080 CONTINUE
      IF (.NOT.(INDEXC(ARG, 105) .GT. 0))GOTO 23082
      CASIND = 1
23082 CONTINUE
      IF (.NOT.(INDEXC(ARG, 120) .GT. 0))GOTO 23084
      EXCEPT = 1
23084 CONTINUE
      J = INDEXC(ARG, 108)
      IF (.NOT.(J .GT. 0))GOTO 23086
      J = J + 1
      BKLTH = CTOI(ARG, J)
      IF (.NOT.(BKLTH .LE. 0))GOTO 23088
      CALL ERROR(ST006Z)
23088 CONTINUE
23086 CONTINUE
      GOTO 23077
23076 CONTINUE
      IF (.NOT.(ELEVEL .LT. 10))GOTO 23090
      ELEVEL = ELEVEL + 1
      IF (.NOT.(CASIND .EQ. 1))GOTO 23092
      CALL FOLD(ARG)
23092 CONTINUE
      IF (.NOT.(GETPAT(ARG(1), PAT(1,ELEVEL)) .EQ. -3))GOTO 23094
      CALL PUTLIN(ILPAT, 3)
      CALL ERROR (ARG)
23094 CONTINUE
      GOTO 23091
23090 CONTINUE
      CALL PUTLIN(MAXEXP, 3)
      STATUS = ITOC(10, ARG, 128)
      CALL ERROR(ARG)
23091 CONTINUE
23077 CONTINUE
23069 CONTINUE
23066 I=I+1
      GOTO 23065
23067 CONTINUE
      IF (.NOT.(ELEVEL .EQ. 0))GOTO 23096
      CALL ERROR(ST007Z)
23096 CONTINUE
      IF (.NOT.(NBRSEP .EQ. 0))GOTO 23098
      IF (.NOT.(GETPAT(DSEP, SEPS(1,1)) .EQ. -3))GOTO 23100
      CALL ERROR (ST008Z)
23100 CONTINUE
      NBRSEP = 1
23098 CONTINUE
      IF (.NOT.(NBRSEP .GT. 1))GOTO 23102
      SKPING = 1
23102 CONTINUE
      RETURN
      END
      SUBROUTINE INITBK
      INTEGER JUNK
      INTEGER REMOVE
      INTEGER ANDPAT
      INTEGER COUNT
      INTEGER EXCEPT
      INTEGER ELEVEL
      INTEGER CASIND
      INTEGER PAT
      INTEGER ATEND
      INTEGER ATBEG
      INTEGER SEPS
      INTEGER NBRSEP
      INTEGER SEPLOC
      INTEGER MCOUNT
      INTEGER SKPING
      LOGICAL*1 LOCATD
      INTEGER BKLTH
      INTEGER LCOUNT
      LOGICAL*1 FBBUF
      INTEGER ENDSTK
      LOGICAL*1 FNAME
      INTEGER FB
      COMMON /FBCOM/ ANDPAT, COUNT, EXCEPT, ELEVEL, CASIND, PAT(132, 10)
     *, ATEND, ATBEG, SEPS(132,2), NBRSEP, SKPING, PRTING, MCOUNT, SEPLO
     *C, BKLTH, LCOUNT, LOCATD(10)
      COMMON /FBBUF/ FBBUF(5000), ENDSTK, FNAME(36), FB
      I=1
23104 IF (.NOT.(I.LE.ELEVEL))GOTO 23106
      LOCATD(I) = 0
23105 I=I+1
      GOTO 23104
23106 CONTINUE
      ENDSTK = 0
      IF (.NOT.(FB .NE. -3))GOTO 23107
      CALL CLOSE(FB)
      JUNK = REMOVE(FNAME)
      FB = -3
23107 CONTINUE
      RETURN
      END
      SUBROUTINE OUTLIN(LINE)
      LOGICAL*1 LINE(100)
      INTEGER ANDPAT
      INTEGER COUNT
      INTEGER EXCEPT
      INTEGER ELEVEL
      INTEGER CASIND
      INTEGER PAT
      INTEGER ATEND
      INTEGER ATBEG
      INTEGER SEPS
      INTEGER NBRSEP
      INTEGER SEPLOC
      INTEGER MCOUNT
      INTEGER SKPING
      LOGICAL*1 LOCATD
      INTEGER BKLTH
      INTEGER LCOUNT
      COMMON /FBCOM/ ANDPAT, COUNT, EXCEPT, ELEVEL, CASIND, PAT(132, 10)
     *, ATEND, ATBEG, SEPS(132,2), NBRSEP, SKPING, PRTING, MCOUNT, SEPLO
     *C, BKLTH, LCOUNT, LOCATD(10)
      LCOUNT = LCOUNT + 1
      IF (.NOT.(LCOUNT .LE. BKLTH))GOTO 23109
      CALL PUTLIN(LINE, 2)
23109 CONTINUE
      RETURN
      END
      SUBROUTINE PRINTB
      INTEGER I, JUNK
      LOGICAL*1 C
      LOGICAL*1 GETCH
      INTEGER OPEN, REMOVE
      LOGICAL*1 FBBUF
      INTEGER ENDSTK
      LOGICAL*1 FNAME
      INTEGER FB
      INTEGER ANDPAT
      INTEGER COUNT
      INTEGER EXCEPT
      INTEGER ELEVEL
      INTEGER CASIND
      INTEGER PAT
      INTEGER ATEND
      INTEGER ATBEG
      INTEGER SEPS
      INTEGER NBRSEP
      INTEGER SEPLOC
      INTEGER MCOUNT
      INTEGER SKPING
      LOGICAL*1 LOCATD
      INTEGER BKLTH
      INTEGER LCOUNT
      LOGICAL*1 ST009Z(32)
      COMMON /FBBUF/ FBBUF(5000), ENDSTK, FNAME(36), FB
      COMMON /FBCOM/ ANDPAT, COUNT, EXCEPT, ELEVEL, CASIND, PAT(132, 10)
     *, ATEND, ATBEG, SEPS(132,2), NBRSEP, SKPING, PRTING, MCOUNT, SEPLO
     *C, BKLTH, LCOUNT, LOCATD(10)
      DATA ST009Z(1)/112/,ST009Z(2)/114/,ST009Z(3)/111/,ST009Z(4)/98/,ST
     *009Z(5)/108/,ST009Z(6)/101/,ST009Z(7)/109/,ST009Z(8)/115/,ST009Z(9
     *)/32/,ST009Z(10)/114/,ST009Z(11)/101/,ST009Z(12)/111/,ST009Z(13)/1
     *12/,ST009Z(14)/101/,ST009Z(15)/110/,ST009Z(16)/105/,ST009Z(17)/110
     */,ST009Z(18)/103/,ST009Z(19)/32/,ST009Z(20)/115/,ST009Z(21)/99/,ST
     *009Z(22)/114/,ST009Z(23)/97/,ST009Z(24)/116/,ST009Z(25)/99/,ST009Z
     *(26)/104/,ST009Z(27)/32/,ST009Z(28)/102/,ST009Z(29)/105/,ST009Z(30
     *)/108/,ST009Z(31)/101/,ST009Z(32)/0/
      IF (.NOT.(COUNT .EQ. 1))GOTO 23111
      MCOUNT = MCOUNT + 1
      RETURN
23111 CONTINUE
      IF (.NOT.(ENDSTK .EQ. 0 .AND. FB .EQ. -3))GOTO 23113
      RETURN
23113 CONTINUE
      IF (.NOT.(FB .NE. -3))GOTO 23115
      CALL CLOSE(FB)
      FB = OPEN(FNAME, 1)
      IF (.NOT.(FB .EQ. -3))GOTO 23117
      CALL ERROR (ST009Z)
23117 CONTINUE
23119 IF (.NOT.(GETCH(C, FB) .NE. -1))GOTO 23120
      CALL PUTCH(C, 2)
      GOTO 23119
23120 CONTINUE
      CALL CLOSE(FB)
      JUNK = REMOVE (FNAME)
      FB = -3
23115 CONTINUE
      I=1
23121 IF (.NOT.(I.LE.ENDSTK))GOTO 23123
      CALL PUTCH(FBBUF(I), 2)
23122 I=I+1
      GOTO 23121
23123 CONTINUE
      RETURN
      END
      INTEGER FUNCTION STACKL (LINE)
      LOGICAL*1 LINE(402)
      INTEGER LENGTH, CREATE
      INTEGER LEN
      LOGICAL*1 FBBUF
      INTEGER ENDSTK
      LOGICAL*1 FNAME
      INTEGER FB
      INTEGER ANDPAT
      INTEGER COUNT
      INTEGER EXCEPT
      INTEGER ELEVEL
      INTEGER CASIND
      INTEGER PAT
      INTEGER ATEND
      INTEGER ATBEG
      INTEGER SEPS
      INTEGER NBRSEP
      INTEGER SEPLOC
      INTEGER MCOUNT
      INTEGER SKPING
      LOGICAL*1 LOCATD
      INTEGER BKLTH
      INTEGER LCOUNT
      LOGICAL*1 FBTEMP(4)
      LOGICAL*1 ST00AZ(30)
      COMMON /FBBUF/ FBBUF(5000), ENDSTK, FNAME(36), FB
      COMMON /FBCOM/ ANDPAT, COUNT, EXCEPT, ELEVEL, CASIND, PAT(132, 10)
     *, ATEND, ATBEG, SEPS(132,2), NBRSEP, SKPING, PRTING, MCOUNT, SEPLO
     *C, BKLTH, LCOUNT, LOCATD(10)
      DATA FBTEMP(1)/102/,FBTEMP(2)/98/,FBTEMP(3)/116/,FBTEMP(4)/0/
      DATA ST00AZ(1)/112/,ST00AZ(2)/114/,ST00AZ(3)/111/,ST00AZ(4)/98/,ST
     *00AZ(5)/108/,ST00AZ(6)/101/,ST00AZ(7)/109/,ST00AZ(8)/115/,ST00AZ(9
     *)/32/,ST00AZ(10)/111/,ST00AZ(11)/112/,ST00AZ(12)/101/,ST00AZ(13)/1
     *10/,ST00AZ(14)/105/,ST00AZ(15)/110/,ST00AZ(16)/103/,ST00AZ(17)/32/
     *,ST00AZ(18)/115/,ST00AZ(19)/99/,ST00AZ(20)/114/,ST00AZ(21)/97/,ST0
     *0AZ(22)/116/,ST00AZ(23)/99/,ST00AZ(24)/104/,ST00AZ(25)/32/,ST00AZ(
     *26)/102/,ST00AZ(27)/105/,ST00AZ(28)/108/,ST00AZ(29)/101/,ST00AZ(30
     *)/0/
      STACKL = 0
      IF (.NOT.(COUNT .EQ. 1))GOTO 23124
      RETURN
23124 CONTINUE
      LCOUNT = LCOUNT + 1
      IF (.NOT.(LCOUNT .GT. BKLTH))GOTO 23126
      RETURN
23126 CONTINUE
      LEN = LENGTH(LINE)
      IF (.NOT.( (LEN+ENDSTK+1) .GT. 5000))GOTO 23128
      IF (.NOT.(FB .EQ. -3))GOTO 23130
      CALL SCRATF(FBTEMP, FNAME)
      FB = CREATE(FNAME, 2)
      IF (.NOT.(FB .EQ. -3))GOTO 23132
      CALL REMARK (ST00AZ)
      CALL CANT (FNAME)
23132 CONTINUE
23130 CONTINUE
      I=1
23134 IF (.NOT.(I.LE.ENDSTK))GOTO 23136
      CALL PUTCH(FBBUF(I), FB)
23135 I=I+1
      GOTO 23134
23136 CONTINUE
      CALL PUTLIN(LINE, FB)
      ENDSTK = 0
      RETURN
23128 CONTINUE
      CALL SCOPY(LINE, 1, FBBUF, ENDSTK+1)
      ENDSTK = ENDSTK + LEN
      RETURN
      END
      SUBROUTINE TALLY (PRT)
      INTEGER PRT
      INTEGER ANDPAT
      INTEGER COUNT
      INTEGER EXCEPT
      INTEGER ELEVEL
      INTEGER CASIND
      INTEGER PAT
      INTEGER ATEND
      INTEGER ATBEG
      INTEGER SEPS
      INTEGER NBRSEP
      INTEGER SEPLOC
      INTEGER MCOUNT
      INTEGER SKPING
      LOGICAL*1 LOCATD
      INTEGER BKLTH
      INTEGER LCOUNT
      COMMON /FBCOM/ ANDPAT, COUNT, EXCEPT, ELEVEL, CASIND, PAT(132, 10)
     *, ATEND, ATBEG, SEPS(132,2), NBRSEP, SKPING, PRTING, MCOUNT, SEPLO
     *C, BKLTH, LCOUNT, LOCATD(10)
      PRT = ANDPAT
      I=1
23137 IF (.NOT.(I.LE.ELEVEL))GOTO 23139
      IF (.NOT.(ANDPAT .EQ. 0 .AND. LOCATD(I) .EQ. 1))GOTO 23140
      PRT = 1
      GOTO 23139
23140 CONTINUE
      IF (.NOT.(ANDPAT .EQ. 1 .AND. LOCATD(I) .EQ. 0))GOTO 23142
      PRT = 0
      GOTO 23139
23142 CONTINUE
23141 CONTINUE
23138 I=I+1
      GOTO 23137
23139 CONTINUE
      IF (.NOT.(EXCEPT .EQ. 1))GOTO 23144
      IF (.NOT.(PRT .EQ. 0))GOTO 23146
      PRT = 1
      GOTO 23147
23146 CONTINUE
      PRT = 0
23147 CONTINUE
23144 CONTINUE
      RETURN
      END
