00040023C				FILE= RAT2.RAT0073C EDITED TO PUT SUBPROGRAM DECLARATIONS IN FRONT OF COMMENTS FOR THAT0075C SUBPROGRAM.  THIS ALLOWS F4 V2.2 TO KEEP COMMENTS IN THE RIGHT PLACE.0015C BOB DENNY0015C 25-MAR-800005C0076CFILE=DEFIN.RAT  ===== GENERAL CHARACTER SET DEFINITIONS ===============0048C PCN #73, DEC 79, ADD CARET,TILDE FOR .NOT.0005C0045C                      ******************0043C                        FILE=RATDEF.RT0045C                      ******************0005C^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^0075C==============DEFINITIONS FOR RT-11 RATFOR PREPROCESSOR===============0005C0044CLINK LIBRARY FOR COMPILE/LINK/GO OPTION0005C0080C===========================================================================0005C0059      SUBROUTINE GETDEF ( TOKEN, TOKSIZ, DEFN, DEFSIZ )0054C GETDEF  - GET SYMBOLIC CONSTANTS AND DEFINITIONS0080C SYKES, DEC76, ALLOW SINGLE ARGUMENT MACRO DEFINITIONS.  STORE "MAXTYPE" AS0081C  FIRST CHAR OF MACRO DEFINITIONS, SO 'DEFMAC' CAN TELL MACROS FROM SYMBOLS.^^^^^^^^^^^^^^^^^^^^^^^^0070C PCN 94, 17 FEB 80, STOP PASSING CURRENT INPUT FILE LUN ALL OVER.0044C   BLANKS ARE PRESERVED IN A DEFINITION0005C0005C0046      LOGICAL * 1 GTOK, NGETCH, TEMP ( 5 )0062      INTEGER DEFSIZ, I, NLPAR, TOKSIZ, INDEX, JUNK, SCOPY0058      LOGICAL * 1 C, DEFN ( DEFSIZ ), TOKEN ( TOKSIZ )0005C0024      DEFN ( 1 ) = 00065      IF (.NOT.( GTOK ( TOKEN, TOKSIZ ) .NE. 40 )) GOTO 200000044      CALL SYNERR ( 15HNO ( IN DEFINE. )0016      RETURN001820000 CONTINUE^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^0068      IF (.NOT.( GTOK ( TOKEN, TOKSIZ ) .NE. - 100 )) GOTO 200020051      CALL SYNERR ( 22HNON-ALPHANUMERIC NAME. )0016      RETURN001820002 CONTINUE0074      IF (.NOT.( GTOK ( TEMP, 5 ) .NE. 44 .AND. TEMP ( 1 ) .NE. 61 )) 0020     $GOTO 200040049      CALL SYNERR ( 20HNO , OR = IN DEFINE. )0016      RETURN0049C ELSE GOT '(NAME,'	NOW GET THE DEFINITION...001820004 CONTINUE001820003 CONTINUE0019      NLPAR = 10016       I = 2004620006 IF (.NOT.( NLPAR .GT. 0)) GOTO 20008^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^0048      IF (.NOT.( I .GT. DEFSIZ )) GOTO 200090049      CALL SYNERR ( 20HDEFINITION TOO LONG. )0016      RETURN001820009 CONTINUE0065      IF (.NOT.( NGETCH ( DEFN ( I ) ) .EQ. - 3 )) GOTO 200110044      CALL SYNERR ( 15HNO ) IN DEFINE. )0016      RETURN001820011 CONTINUE0053      IF (.NOT.( DEFN ( I ) .EQ. 60 )) GOTO 200130019      CALL MATH0019      I = I - 10020      GOTO 20014001820013 CONTINUE0042      CALL LRPAR ( DEFN ( I ), NLPAR )001820014 CONTINUE001820012 CONTINUE002020007 I = I + 1 ^^^^^^^^^^^0020      GOTO 20006001820008 CONTINUE0028      DEFN ( I - 1 ) = 00026      DEFN ( 1 ) = - 90060      IF (.NOT.( INDEX ( DEFN, 36 ) .EQ. 0 )) GOTO 200150059      JUNK = SCOPY ( DEFN ( 2 ), DEFN ( 1 ), 80, JUNK )0005C001820015 CONTINUE0016      RETURN0013      END0005 00040027      SUBROUTINE GTFUNC0005C0069C GTFUNC - GET AND SAVE THE FUNCTION NAME FOR RETURN(EXPRESSION).0023CPCN #92, 20 FEB 800005C0005C0035      LOGICAL * 1 GTOK, T, TYPE0005C0035C				FILE=CFUNC.RAT  FOR RATFOR^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^0046      COMMON / CFUNC / INFUNC, FNAM ( 12 )0024      INTEGER INFUNC0026      LOGICAL * 1 FNAM0005C0031      T = GTOK ( FNAM, 12 )0029      CALL PBSTR ( FNAM )0075      IF (.NOT.( INFUNC .EQ. 1 .OR. T .NE. - 100 .OR. TYPE ( FNAM ( 1 )0036     $ ) .NE. - 30 )) GOTO 200170054      CALL SYNERR ( 25HILLEGAL FUNCTION KEYWORD. )0020      GOTO 20018001820017 CONTINUE0020      INFUNC = 10005C001820018 CONTINUE0016      RETURN0013      END0005 00040053      LOGICAL FUNCTION GTOK * 1 ( TOKEN, TOKSIZ )0005C^^^^^^^^^0066C GTOK - GET TOKEN; INTERPRET SPECIAL CHAR, DELETE BLANKS,TABS0048C PCN #73, DEC 79, ADD TILDE,CARET FOR .NOT.0064C PCN #87, 12 FEB 80, PASS '...' STRINGS WITHOUT PROCESSING.0070C PCN 94, 17 FEB 80, STOP PASSING CURRENT INPUT FILE LUN ALL OVER.0005C0005C0027      INTEGER I, TOKSIZ0055      LOGICAL * 1 C, TOKEN ( TOKSIZ ), NGETCH, TYPE0005C005620019 IF (.NOT.( NGETCH ( C ) .NE. - 3 )) GOTO 200200059      IF (.NOT.( C .NE. 32 .AND. C .NE. 9 )) GOTO 200210020      GOTO 20020001820021 CONTINUE^^^^^^^^^^^^^^0020      GOTO 20019001820020 CONTINUE0027      CALL PUTBAK ( C )0005C0016       I = 1005120023 IF (.NOT.( I .LT. TOKSIZ - 1)) GOTO 200250048      GTOK = TYPE ( NGETCH ( TOKEN ( I ) ) )0070      IF (.NOT.( GTOK .NE. - 30 .AND. GTOK .NE. - 20 )) GOTO 200260020      GOTO 20025001820026 CONTINUE0005C002020024 I = I + 1 0020      GOTO 20023001820025 CONTINUE0052      IF (.NOT.( I .GE. TOKSIZ - 1 )) GOTO 200280044      CALL SYNERR ( 15HTOKEN TOO LONG. )001820028 CONTINUE^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^0043      IF (.NOT.( I .GT. 1 )) GOTO 200300037      CALL PUTBAK ( TOKEN ( I ) )0025      TOKEN ( I ) = 00022      GTOK = - 1000005C0063C DO SOME CHARACTER CONVERSIONS TO MAKE THINGS EASIER LATER0020      GOTO 20031001820030 CONTINUE0054      IF (.NOT.( TOKEN ( 1 ) .EQ. 92 )) GOTO 200320027      TOKEN ( 1 ) = 1240020      GTOK = 1240020      GOTO 20033001820032 CONTINUE0054      IF (.NOT.( TOKEN ( 1 ) .EQ. 91 )) GOTO 200340027      TOKEN ( 1 ) = 1230020      GTOK = 1230020      GOTO 20035001820034 CONTINUE^0054      IF (.NOT.( TOKEN ( 1 ) .EQ. 93 )) GOTO 200360027      TOKEN ( 1 ) = 1250020      GTOK = 1250020      GOTO 20037001820036 CONTINUE0075      IF (.NOT.( TOKEN ( 1 ) .EQ. 126 .OR. TOKEN ( 1 ) .EQ. 94 )) GOTO 0015     $200380026      TOKEN ( 1 ) = 330019      GTOK = 330069C# ELSE IF (TOKEN(1) == DOLLAR) [  		# ALLOW $( AND $) FOR BRACES0043C#    IF (NGETCH(TOKEN(2)) == LPAREN) [0030C#       TOKEN(1) = LBRACE0026C#       GTOK = LBRACE0014C#       ]0040C#    ELSE IF (TOKEN(2) == RPAREN) [^^^^^^^^^^^^^^^^0030C#       TOKEN(1) = RBRACE0044C#       GTOK = RBRACE		##SYKES, 22NOV760014C#       ]0014C#    ELSE0034C#       CALL PUTBAK(TOKEN(2))0011C#    ]0020      GOTO 20039001820038 CONTINUE0074      IF (.NOT.( TOKEN ( 1 ) .EQ. 34 .OR. TOKEN ( 1 ) .EQ. 39 )) GOTO 0015     $200400065C COLLECT QUOTED STRINGS AS SINGLE TOKENS WITHOUT PROCESSING.0018      CONTINUE0016       I = 2007320042 IF (.NOT.( NGETCH ( TOKEN ( I ) ) .NE. TOKEN ( 1 ))) GOTO 20044^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^0072      IF (.NOT.( TOKEN ( I ) .EQ. 10 .OR. I .GE. TOKSIZ - 1 )) GOTO 0015     $200450043      CALL SYNERR ( 14HMISSING QUOTE. )0035      TOKEN ( I ) = TOKEN ( 1 )0028      CALL PUTBAK ( 10 )0020      GOTO 20044001820045 CONTINUE002020043 I = I + 1 0020      GOTO 20042001820044 CONTINUE0069      IF (.NOT.( TOKEN ( 1 ) .EQ. 39 .AND. I .EQ. 2 )) GOTO 200470015      I = 1001820047 CONTINUE0020      GOTO 20041001820040 CONTINUE0054      IF (.NOT.( TOKEN ( 1 ) .EQ. 35 )) GOTO 200490018      CONTINUE^^^^^^^^^^^006520051 IF (.NOT.( NGETCH ( TOKEN ( 1 ) ) .NE. 10 )) GOTO 200520020      GOTO 20051001820052 CONTINUE0019      GTOK = 10001820049 CONTINUE001820041 CONTINUE001820039 CONTINUE001820037 CONTINUE001820035 CONTINUE001820033 CONTINUE001820031 CONTINUE0071      IF (.NOT.( TOKEN ( 1 ) .EQ. 62 .OR. TOKEN ( 1 ) .EQ. 60 .OR. 0073     $TOKEN ( 1 ) .EQ. 33  .OR. TOKEN ( 1 ) .EQ. 61 .OR. TOKEN ( 1 ) 0057     $.EQ. 38 .OR. TOKEN ( 1 ) .EQ. 124 )) GOTO 200530034      CALL RELATE ( TOKEN, I )001820053 CONTINUE^^^^^^^^^^^0029      TOKEN ( I + 1 ) = 00005C0016      RETURN0013      END0005 00040035      SUBROUTINE IFCODE ( LAB )0005C0056C IFCODE - GENERATE INITIAL CODE FOR 'IF' STATEMENTS0005C0005C0029      INTEGER LAB, LABGEN0005C0028      LAB = LABGEN ( 2 )0027      CALL IFGO ( LAB )0005C0016      RETURN0013      END0005 00040036      SUBROUTINE IFDEFC ( CTRL )0005C0054C IFDEFC - PROCESS IFDEF AND IFNOTDEF CONDITIONALS0024CSYKES, FEB77,APR77,0069C PCN 77, 5 JAN 80, ADD UNFOLD, SO 'IFDEF' ETC CAN BE LOWER CASE.^^^^^^^^^^^^^^0044CCTRL='YES' FOR IFDEF; 'NO' FOR IFNOTDEF0041CIFDEF (SYMBOL)		OR IFNOTDEF (SYMBOL)0019C   <STATEMENT>0013CENDIFDEF0005C0005C0043      INTEGER LOOKFR, SEQL, LAYER, CTRL0059      LOGICAL * 1 TOKEN ( 70 ), JUNK ( 80 ), GTOK, TYPE0005C0041C				FILE = CLINE.RAT  FOR RATFOR.RAT0065C PCN #75, DEC 79, ADD FORTRAN LINE NUMBERS TO RATFOR LISTING0067      COMMON / CLINE / LEVEL, INFILE ( 3 ), LINECT, INIF, FTNLN0023      INTEGER LEVEL0024      INTEGER INFILE0024      INTEGER LINECT0022      INTEGER INIF^^^^^^^^^^^^0023      INTEGER FTNLN0005C0031      LOGICAL * 1 ENDIF (9)0032      LOGICAL * 1 IFDEFS (6)0031      LOGICAL * 1 IFNOT (9)0005C0055      DATA ENDIF/1HE,1HN,1HD,1HI,1HF,1HD,1HE,1HF,0/0044      DATA IFDEFS/1HI,1HF,1HD,1HE,1HF,0/0055      DATA IFNOT/1HI,1HF,1HN,1HO,1HT,1HD,1HE,1HF,0/0061      IF (.NOT.( GTOK ( TOKEN, 70 ) .NE. 40 )) GOTO 200550048      CALL SYNERR ( 19HMISSING ( IN IFDEF. )0030      CALL PBSTR ( TOKEN )0016      RETURN001820055 CONTINUE^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^0075      IF (.NOT.( GTOK ( TOKEN, 70 ) .NE. - 100 .OR.  TYPE ( TOKEN ( 1 )0036     $ ) .NE. - 30 )) GOTO 200570055      CALL SYNERR ( 26HILLEGAL SYMBOLIC IN IFDEF. )0030      CALL PBSTR ( TOKEN )0016      RETURN0005C001820057 CONTINUE0067      IF (.NOT.( LOOKFR ( TOKEN, JUNK ) .EQ. CTRL )) GOTO 200590061      IF (.NOT.( GTOK ( TOKEN, 70 ) .NE. 41 )) GOTO 200610048      CALL SYNERR ( 19HMISSING ) IN IFDEF. )0030      CALL PBSTR ( TOKEN )0016      RETURN001820061 CONTINUE0016      RETURN0005C^^^^^^^^^^^^^^^^001820059 CONTINUE0018      INIF = 10019      LAYER = 10018      CONTINUE001820063 CONTINUE0062      IF (.NOT.( GTOK ( TOKEN, 70 ) .NE. - 3 )) GOTO 200660031      CALL UNFOLD ( TOKEN )0063      IF (.NOT.( SEQL ( TOKEN, ENDIF ) .EQ. 1 )) GOTO 200680047      IF (.NOT.( LAYER .EQ. 1 )) GOTO 200700020      GOTO 20065001820070 CONTINUE0027      LAYER = LAYER - 1001820071 CONTINUE0020      GOTO 20069001820068 CONTINUE0075      IF (.NOT.( SEQL ( TOKEN, IFDEFS ) .EQ. 1 .OR. SEQL ( TOKEN, IFNOT^^^^^^^^^^^^^^^^^^^^^^0033     $ ) .EQ. 1 )) GOTO 200720027      LAYER = LAYER + 1001820072 CONTINUE001820069 CONTINUE0020      GOTO 20067001820066 CONTINUE0048      CALL SYNERR ( 19HUNTERMINATED IFDEF. )0031      CALL PUTBAK ( TOKEN )0020      GOTO 20065001820067 CONTINUE002020064 GOTO 20063001820065 CONTINUE0018      INIF = 00016      RETURN0005C001820060 CONTINUE0013      END0005 00040033      SUBROUTINE IFGO ( LAB )0005C0046C IFGO - GENERATE "IF(.NOT.(...))GOTO LAB"0017C ***PCN # 210005C0005C0021      INTEGER LAB0005C^^^^^^^0036C				FILE= CUCLC.RAT  FOR RATFOR0037      COMMON / CUCLC / LC, COMPRS0020      INTEGER LC0024      INTEGER COMPRS0005C0020      CALL OUTIF0021      CALL BALPAR0027      CALL OUTCH ( 41 )0048      IF (.NOT.( COMPRS .EQ. 0 )) GOTO 200740027      CALL OUTCH ( 32 )001820074 CONTINUE0028      CALL OUTGO ( LAB )0005C0016      RETURN0013      END0005 00040070      INTEGER FUNCTION INSTAL ( NAME, DEFN, LASTP, LASTT, NAMPTR, 0033     $MAXTAB, MAXPOI, TABLE )0005C0047C INSTAL - ADD NAME AND DEFINITION TO TABLE^^^0066C PCN # 62, 3 SEP 79, FIX BUG ON STORAGE OF STRING DEFINITIONS0005C0005C0059      LOGICAL * 1 DEFN ( 80 ), NAME ( 70 ), TABLE ( 1 )0050      INTEGER SLEN, LASTP, LASTT, NAMPTR ( 1 )0057      INTEGER DLEN, NLEN, SCOPY, JUNK, MAXTAB, MAXPOI0005C0034      NLEN = SLEN ( NAME ) + 10034      DLEN = SLEN ( DEFN ) + 10074      IF (.NOT.( ( LASTT + NLEN + DLEN .LT. MAXTAB ) .AND. LASTP .LT. 0030     $MAXPOI )) GOTO 200760027      LASTP = LASTP + 10038      NAMPTR ( LASTP ) = LASTT + 1^^^^^^^^^^^^^^^^^^^^^^^^^^^^0062      JUNK = SCOPY ( NAME, TABLE ( LASTT + 1 ), 70, JUNK )0069      JUNK = SCOPY ( DEFN, TABLE ( LASTT + NLEN + 1 ), 80, JUNK )0037      LASTT = LASTT + NLEN + DLEN0024      INSTAL = ( 1 )0016      RETURN001820076 CONTINUE0026      INSTAL = ( - 1 )0016      RETURN0005C001820077 CONTINUE0013      END0005 00040038      SUBROUTINE LABELC ( LEXSTR )0005C0075C LABELC -  OUTPUT FORTRAN STATEMENT NUMBERS THAT WERE IN RATFOR SOURCE0069C PCN #75, ADD FTN LINE NUMBERS TO LISTING. REPLACE CALL TO OUTTA0005C^^^^^^^0034      LOGICAL * 1 LEXSTR ( 1 )0022      INTEGER SLEN0005C0041C				FILE= COUTLN.RAT  FOR RATFOR.RAT0047      COMMON / COUTLN / OUTP, OUTBUF ( 91 )0022      INTEGER OUTP0028      LOGICAL * 1 OUTBUF0005C0057      IF (.NOT.( SLEN ( LEXSTR ) .EQ. 5 )) GOTO 200780072      IF (.NOT.( LEXSTR ( 1 ) .EQ. 50 .AND. LEXSTR ( 2 ) .EQ. 48 )) 0020     $GOTO 200800064      CALL SYNERR ( 35HPOSSIBLE STATEMENT NUMBER CONFLICT. )001820080 CONTINUE001820078 CONTINUE0032      CALL OUTSTR ( LEXSTR )^^^^^^^^^^^^^^^^^^^^^^^^^^^004620082 IF (.NOT.( OUTP .LT. 6 )) GOTO 200830027      CALL OUTCH ( 32 )0020      GOTO 20082001820083 CONTINUE0016      RETURN0013      END0005 00040039      INTEGER FUNCTION LABGEN ( N )0005C0064C LABGEN - GENERATE  N  CONSECUTIVE LABELS, RETURN FIRST ONE0005C0005C0026      INTEGER LABEL, N0030      DATA LABEL / 20000 /0005C0024      LABGEN = LABEL0027      LABEL = LABEL + N0005C0016      RETURN0013      END0005 00040041      SUBROUTINE LRPAR ( TOK, NLPAR )0005C0044C LRPAR - COUNT LEFT & RIGHT PARENTHESES0019C SYKES,18FEB770005C0005C0023      INTEGER NLPAR0025      LOGICAL * 1 TOK0005C0046      IF (.NOT.( TOK .EQ. 40 )) GOTO 200840027      NLPAR = NLPAR + 10020      GOTO 20085001820084 CONTINUE0046      IF (.NOT.( TOK .EQ. 41 )) GOTO 200860027      NLPAR = NLPAR - 10005C001820086 CONTINUE001820085 CONTINUE0016      RETURN0013      END0005 00040040      INTEGER FUNCTION LEX ( TOKEN )0005C0062C LEX - RETURN LEXICAL TYPE OF NEXT VALID TOKEN TO 'PARSE'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^0069C PCN 93, 16 FEB 80, DELETE CKEYWD, USE STRINGS IN 'LEX' INSTEAD.0048C			ALSO DO PROCESSOR FEATURE KEYWORDS HERE.0005C0005C0042      LOGICAL * 1 TOKEN ( 70 ), DEFTOK0030      INTEGER ALLDIG, SEQL0005C0032      LOGICAL * 1 SBREAK (6)0031      LOGICAL * 1 SINCL (8)0032      LOGICAL * 1 SDEFIN (7)0032      LOGICAL * 1 SMACRO (6)0029      LOGICAL * 1 SDO (3)0031      LOGICAL * 1 SNEXT (5)0031      LOGICAL * 1 SELSE (5)0031      LOGICAL * 1 SREPT (7)0030      LOGICAL * 1 SEND (4)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^0032      LOGICAL * 1 SRETRN (7)0032      LOGICAL * 1 SENDIF (9)0031      LOGICAL * 1 SSTOP (5)0030      LOGICAL * 1 SFOR (4)0032      LOGICAL * 1 SSTRNG (7)0029      LOGICAL * 1 SIF (3)0032      LOGICAL * 1 SUNTIL (6)0032      LOGICAL * 1 SIFDEF (6)0032      LOGICAL * 1 SWHILE (6)0032      LOGICAL * 1 SIFNOT (9)0005C0044      DATA SBREAK/1HB,1HR,1HE,1HA,1HK,0/0051      DATA SINCL/1HI,1HN,1HC,1HL,1HU,1HD,1HE,0/0048      DATA SDEFIN/1HD,1HE,1HF,1HI,1HN,1HE,0/0044      DATA SMACRO/1HM,1HA,1HC,1HR,1HO,0/^^^^^^0029      DATA SDO/1HD,1HO,0/0039      DATA SNEXT/1HN,1HE,1HX,1HT,0/0039      DATA SELSE/1HE,1HL,1HS,1HE,0/0047      DATA SREPT/1HR,1HE,1HP,1HE,1HA,1HT,0/0034      DATA SEND/1HE,1HN,1HD,0/0048      DATA SRETRN/1HR,1HE,1HT,1HU,1HR,1HN,0/0056      DATA SENDIF/1HE,1HN,1HD,1HI,1HF,1HD,1HE,1HF,0/0039      DATA SSTOP/1HS,1HT,1HO,1HP,0/0034      DATA SFOR/1HF,1HO,1HR,0/0048      DATA SSTRNG/1HS,1HT,1HR,1HI,1HN,1HG,0/0029      DATA SIF/1HI,1HF,0/0044      DATA SUNTIL/1HU,1HN,1HT,1HI,1HL,0/^^^^^^^^^^^^^^^^^^^^^^^^^^0044      DATA SIFDEF/1HI,1HF,1HD,1HE,1HF,0/0044      DATA SWHILE/1HW,1HH,1HI,1HL,1HE,0/0056      DATA SIFNOT/1HI,1HF,1HN,1HO,1HT,1HD,1HE,1HF,0/006320088 IF (.NOT.( DEFTOK ( TOKEN, 70 ) .EQ. 10 )) GOTO 200890020      GOTO 20088001820089 CONTINUE0027      LEX = TOKEN ( 1 )0074      IF (.NOT.( LEX .EQ. - 3 .OR. LEX .EQ. 59 .OR. LEX .EQ. 123 .OR. 0036     $LEX .EQ. 125 )) GOTO 200900016      RETURN001820090 CONTINUE0058      IF (.NOT.( ALLDIG ( TOKEN ) .EQ. 1 )) GOTO 200920021      LEX = - 111^^^^^^^^^^^^^^^^^0020      GOTO 20093001820092 CONTINUE0064      IF (.NOT.( SEQL ( TOKEN, SBREAK ) .EQ. 1 )) GOTO 200940021      LEX = - 1100020      GOTO 20095001820094 CONTINUE0061      IF (.NOT.( SEQL ( TOKEN, SDO ) .EQ. 1 )) GOTO 200960021      LEX = - 1120020      GOTO 20097001820096 CONTINUE0064      IF (.NOT.( SEQL ( TOKEN, SDEFIN ) .EQ. 1 )) GOTO 200980021      LEX = - 1240020      GOTO 20099001820098 CONTINUE0063      IF (.NOT.( SEQL ( TOKEN, SELSE ) .EQ. 1 )) GOTO 201000021      LEX = - 1130020      GOTO 20101^^^^001820100 CONTINUE0062      IF (.NOT.( SEQL ( TOKEN, SEND ) .EQ. 1 )) GOTO 201020021      LEX = - 1140020      GOTO 20103001820102 CONTINUE0064      IF (.NOT.( SEQL ( TOKEN, SENDIF ) .EQ. 1 )) GOTO 201040021      LEX = - 1280020      GOTO 20105001820104 CONTINUE0062      IF (.NOT.( SEQL ( TOKEN, SFOR ) .EQ. 1 )) GOTO 201060021      LEX = - 1150020      GOTO 20107001820106 CONTINUE0064      IF (.NOT.( SEQL ( TOKEN, SIFDEF ) .EQ. 1 )) GOTO 201080021      LEX = - 1260020      GOTO 20109001820108 CONTINUE^^^^^^0064      IF (.NOT.( SEQL ( TOKEN, SIFNOT ) .EQ. 1 )) GOTO 201100021      LEX = - 1270020      GOTO 20111001820110 CONTINUE0061      IF (.NOT.( SEQL ( TOKEN, SIF ) .EQ. 1 )) GOTO 201120021      LEX = - 1160020      GOTO 20113001820112 CONTINUE0063      IF (.NOT.( SEQL ( TOKEN, SINCL ) .EQ. 1 )) GOTO 201140021      LEX = - 1290020      GOTO 20115001820114 CONTINUE0064      IF (.NOT.( SEQL ( TOKEN, SMACRO ) .EQ. 1 )) GOTO 201160021      LEX = - 1250020      GOTO 20117001820116 CONTINUE^^^^^^^^^^^^^^^^^^^^^^^^0063      IF (.NOT.( SEQL ( TOKEN, SNEXT ) .EQ. 1 )) GOTO 201180021      LEX = - 1170020      GOTO 20119001820118 CONTINUE0063      IF (.NOT.( SEQL ( TOKEN, SREPT ) .EQ. 1 )) GOTO 201200021      LEX = - 1190020      GOTO 20121001820120 CONTINUE0064      IF (.NOT.( SEQL ( TOKEN, SRETRN ) .EQ. 1 )) GOTO 201220021      LEX = - 1220020      GOTO 20123001820122 CONTINUE0063      IF (.NOT.( SEQL ( TOKEN, SSTOP ) .EQ. 1 )) GOTO 201240021      LEX = - 1230020      GOTO 20125001820124 CONTINUE^^^^^^^^^^^^^^^^^^^^^^^0064      IF (.NOT.( SEQL ( TOKEN, SSTRNG ) .EQ. 1 )) GOTO 201260021      LEX = - 1300020      GOTO 20127001820126 CONTINUE0064      IF (.NOT.( SEQL ( TOKEN, SUNTIL ) .EQ. 1 )) GOTO 201280021      LEX = - 1200020      GOTO 20129001820128 CONTINUE0064      IF (.NOT.( SEQL ( TOKEN, SWHILE ) .EQ. 1 )) GOTO 201300021      LEX = - 1210020      GOTO 20131001820130 CONTINUE0021      LEX = - 1180005C001820131 CONTINUE001820129 CONTINUE001820127 CONTINUE001820125 CONTINUE001820123 CONTINUE001820121 CONTINUE^^^^^^^^^001820119 CONTINUE001820117 CONTINUE001820115 CONTINUE001820113 CONTINUE001820111 CONTINUE001820109 CONTINUE001820107 CONTINUE001820105 CONTINUE001820103 CONTINUE001820101 CONTINUE001820099 CONTINUE001820097 CONTINUE001820095 CONTINUE001820093 CONTINUE0016      RETURN0013      END0005 00040048      INTEGER FUNCTION LOOKFR ( NAME, DEFN )0005C0065C LOOKFR - BINARY SEARCH TO LOCATE DEFINED SYMBOLIC CONSTANTS0018C SYKES,NOV76;0072C PCN # 67, 6 OCT 79, PREVENT 0 SUBSCRIPTING IF LASTP=0 [NAMPTR(IT)]0005C0005C^^^^0046      LOGICAL * 1 NAME ( 70 ), DEFN ( 80 )0050      INTEGER I, J, INDX, IT, INC, JUNK, SCOPY0005C0042C					FILE = CLOOK.RAT  FOR RATFOR.RAT0075      COMMON / CLOOK / LASTP, TWOS, LASTT, NAMPTR ( 200 ), TABLE ( 22000012     $ )0023      INTEGER LASTP0022      INTEGER TWOS0023      INTEGER LASTT0024      INTEGER NAMPTR0027      LOGICAL * 1 TABLE0005C0018      INDX = 00020      INC = TWOS0047      IF (.NOT.( LASTP .GT. 0 )) GOTO 201320018      CONTINUE001820134 CONTINUE0025      IT = INC + INDX^^^^^^^^^^^^0048      IF (.NOT.( IT .GT. LASTP )) GOTO 201370020      IT = LASTP001820137 CONTINUE0015      I = 10027      J = NAMPTR ( IT )0018      CONTINUE006220139 IF (.NOT.( NAME ( I ) .EQ. TABLE ( J ) )) GOTO 201400052      IF (.NOT.( NAME ( I ) .EQ. 0 )) GOTO 201410058      JUNK = SCOPY ( TABLE ( J + 1 ), DEFN, 80, JUNK )0024      LOOKFR = ( 1 )0016      RETURN001820141 CONTINUE0019      I = I + 10019      J = J + 1001820142 CONTINUE0020      GOTO 20139001820140 CONTINUE^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^0062      IF (.NOT.( NAME ( I ) .GT. TABLE ( J ) )) GOTO 201430048      IF (.NOT.( IT .EQ. LASTP )) GOTO 201450020      GOTO 20136001820145 CONTINUE0019      INDX = IT001820146 CONTINUE001820143 CONTINUE0023      INC = INC / 2004520135 IF (.NOT.( INC .LE. 0 )) GOTO 20134001820136 CONTINUE001820132 CONTINUE0024      LOOKFR = ( 0 )0016      RETURN0005C0013      END0005 00040025      SUBROUTINE MATH0005C0055C MATH - SUBROUTINE TO DO MATH IN MACRO DEFINITIONS0018C SYKES APR 77^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^0070C PCN 94, 17 FEB 80, STOP PASSING CURRENT INPUT FILE LUN ALL OVER.0057C + AND - INTEGER NUMBERS AND DEFINITIONS ARE ALLOWED0005C0005C0048      INTEGER SCTOI, SITOC, NUM1, NUM2, JUNK0055      LOGICAL * 1 TOKDEF, OPR, NGETCH, TOKEN ( 70 )0005C0064      IF (.NOT.( TOKDEF ( TOKEN, 70 ) .NE. - 1 )) GOTO 201470018      JUNK = 10038      NUM1 = SCTOI ( TOKEN, JUNK )0018      CONTINUE005720149 IF (.NOT.( NGETCH ( OPR ) .NE. 62 )) GOTO 201500037      JUNK = TOKDEF ( TOKEN, 70 )0018      JUNK = 1^^^^^^^^^^^^^^^^^0038      NUM2 = SCTOI ( TOKEN, JUNK )0046      IF (.NOT.( OPR .EQ. 43 )) GOTO 201510028      NUM1 = NUM1 + NUM20020      GOTO 20152001820151 CONTINUE0046      IF (.NOT.( OPR .EQ. 45 )) GOTO 201530028      NUM1 = NUM1 - NUM20020      GOTO 20154001820153 CONTINUE0046      IF (.NOT.( OPR .EQ. 42 )) GOTO 201550028      NUM1 = NUM1 * NUM20020      GOTO 20156001820155 CONTINUE0064      IF (.NOT.( OPR .EQ. 47 .AND. NUM2 .NE. 0 )) GOTO 201570028      NUM1 = NUM1 / NUM20020      GOTO 20158001820157 CONTINUE^^^^^^^^0052      CALL SYNERR ( 23HILLEGAL MATH OPERATION. )0030      CALL PBSTR ( TOKEN )0016      RETURN001820158 CONTINUE001820156 CONTINUE001820154 CONTINUE001820152 CONTINUE0020      GOTO 20149001820150 CONTINUE0042      JUNK = SITOC ( NUM1, TOKEN, 70 )0030      CALL PBSTR ( TOKEN )0005C001820147 CONTINUE0016      RETURN0013      END0005 00040043      LOGICAL FUNCTION NGETCH * 1 ( C )0005C0053C NGETCH - GET A (POSSIBLY PUSHED BACK) CHARACTER0070C PCN 94, 17 FEB 80, STOP PASSING CURRENT INPUT FILE LUN ALL OVER.0005C0005C0036      LOGICAL * 1 BUFR ( 91 ), C0031      INTEGER LASTC, GETLIN0005C0043C					FILE = CDEFIO.RAT  FOR RATFOR.RAT0043      COMMON / CDEFIO / BP, BUF ( 160 )0020      INTEGER BP0025      LOGICAL * 1 BUF0005C0047      DATA LASTC / 91 /, BUFR ( 91 ) / 10 /0005C0044      IF (.NOT.( BP .GT. 0 )) GOTO 201590024      C = BUF ( BP )0020      GOTO 20160001820159 CONTINUE0016      BP = 10071      IF (.NOT.( BUFR ( LASTC ) .EQ. 10 .OR. LASTC .GE. 91 )) GOTO 0015     $201610019      LASTC = 0^^^^^^^^^^^^^^^0059      IF (.NOT.( GETLIN ( BUFR ) .EQ. - 3 )) GOTO 201630017      C = - 30020      LASTC = 910016      BP = 00026      NGETCH = ( - 3 )0016      RETURN001820163 CONTINUE001820161 CONTINUE0027      LASTC = LASTC + 10056      IF (.NOT.( BUFR ( LASTC ) .EQ. 0 )) GOTO 201650029      BUFR ( LASTC ) = 10001820165 CONTINUE0028      C = BUFR ( LASTC )001820160 CONTINUE0021      BP = BP - 10024      NGETCH = ( C )0016      RETURN0005C0013      END0005 00040038      SUBROUTINE OTHERC ( LEXSTR )0005C^^^^^^^^^^^^^^^0048C OTHERC - OUTPUT ORDINARY FORTRAN STATEMENT0005C0005C0034      LOGICAL * 1 LEXSTR ( 1 )0005C0021      CALL OUTTAB0032      CALL OUTSTR ( LEXSTR )0020      CALL EATUP0021      CALL OUTDON0005C0016      RETURN0013      END0005 00040032      SUBROUTINE OUTCH ( C )0005C0077C OUTCH - PUT ONE CHARACTER INTO OUTPUT BUFFER, CREATE CONTINUATION LINES0005C0005C0023      LOGICAL * 1 C0005C0041C				FILE= COUTLN.RAT  FOR RATFOR.RAT0047      COMMON / COUTLN / OUTP, OUTBUF ( 91 )0022      INTEGER OUTP^^^^^^^^^^^^^^^^0028      LOGICAL * 1 OUTBUF0005C0064      IF (.NOT.( OUTP .GT. 70 .OR. OUTP .LT. 0 )) GOTO 201670021      CALL OUTDON0018      CONTINUE0019       OUTP = 1004520169 IF (.NOT.( OUTP .LT. 6)) GOTO 201710030      OUTBUF ( OUTP ) = 32002620170 OUTP = OUTP + 1 0020      GOTO 20169001820171 CONTINUE0030      OUTBUF ( OUTP ) = 36001820167 CONTINUE0025      OUTP = OUTP + 10029      OUTBUF ( OUTP ) = C0005C0016      RETURN0013      END0005 0004^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^