ack/lang/a68s/aem/syntax
1988-10-04 10:56:50 +00:00

649 lines
38 KiB
Plaintext

00100 .PR NOLIST .PR
00110 .PR POINT .PR
00120 # COPYRIGHT 1982 C.H.LINDSEY, UNIVERSITY OF MANCHESTER #
00140 .COMMENT
00160 ##
00180 FLOYD PRODUCTIONS FOR ALGOL68S.
00200 ##
00220 ##
00240 PRODUCTION SYNTAX.
00260 ##
00280 LABEL: STACK!INPUT => X-ROUTN ,N->NOTION ! (M) SCAN SUCCESS,FAIL;
00300 ##
00320 LABEL: - PRODUCTION LABEL (DEFAULT: NONE)
00340 STACK - STACK CONFIQUATION TO LOOK FOR (ANY)
00360 INPUT - INPUT LEXEME TO LOOK FOR (ANY)
00380 X- - TYPE OF ROUTN
00400 ROUTN - SEMANTIC ROUTINE TO CALL (NONE)
00420 N-> - NUMBER OF LEXEMES TO POP FROM THE STACK (0)
00440 NOTION - LEXEME TO PUSH ON THE STACK (NONE)
00460 (M) - NUMBER OF INPUT LEXEMES TO SKIP (0)
00480 SCAN - NUMBER OF INPUT LEXEMES TO PUSH ON STACK (NONE)
00500 SUCCESS - SUCCESS LABEL
00520 ,FAIL - FAILURE LABEL (FOLLOWING PRODUCTION)
00540 ##
00560 PRODUCTION SEMANTICS.
00580 ##
00600 IF STACK AND INPUT MATCH THE CURRENT STACK AND INPUT STATES THEN
00620 THE ACTIONS SPECIFIED TO THE RIGHT OF THE "=>" ARE OBEYED;
00640 OTHERWISE CONTROL PASSES TO THE PRODUCTION SPECIFIED BY FAIL.
00660 ##
00680 THE RIGHT SIDE IS INTERPRETED AS FOLLOWS.
00700 IF THE X OF X-ROUTN IS AN 'S' THEN ROUTN SPECIFIES THE SEMANTIC ROUTINE
00720 TO BE CALLED (ONLY IF NO SYNTACTIC ERRORS HAVE OCCURRED).
00740 IF X IS AN 'A' THEN AN ACTION ROUTINE IS INDICATED.
00760 AN 'E' INDICATES AN ERROR MESSAGE TO BE OUTPUT.
00780 ACTION ROUTINES ARE INVOKED REGARDLESS OF
00800 PREVIOUS ERRORS AND HELP MAKE PARSING DECISIONS BY RETURNING A
00820 BOOLEAN VALUE. IF THE VALUE IS FALSE, THE PRODUCTION FAILS AND
00840 THE FAIL EXIT IS TAKEN IMMEDIATELY.
00860 ##
00880 NEXT, N LEXEMES ARE POPPED FROM THE STACK. IF NOTION IS NOT
00900 BLANK THEN A LEXEME FOR THE NOTION IS PUSHED ON THE STACK. (NOTE
00920 THAT IF NOTION IS NON-BLANK, N-> MUST BE NON-BLANK ALSO.) M INPUT
00940 LEXEMES ARE THEN SKIPPED. THE FIRST ONE SKIPPED IS THE CURRENT
00960 INPUT LEXEME. THE NUMBER OF PLUSSES IN SCAN INDICATES THE
00980 NUMBER OF INPUT LEXEMES TO BE PUSHED ON THE STACK. WHEN AN INPUT
01000 LEXEME IS DISCARDED OR PUSHED, A NEW LEXEME IS READ IN TO REPLACE
01020 IT. FINALLY, CONTROL IS TRANSFERED TO THE PRODUCTION INDICATED
01040 BY SUCCESS.
01060 ##
01080 CONVENTIONS USED IN CONSTRUCTION OF PRODUCTION LABELS.
01100 ##
01120 NOTIONH - HEAD SECTION FOR NOTION
01140 NOTIONT - TAIL SECTION FOR NOTION
01160 NOTIONHN - MULTIPLE HEAD SECTIONS FOR NOTION
01180 NOTIONTN - MULTIPLE TAIL SECTIONS FOR NOTION
01200 LN - LOCAL LABEL USED ONLY AS DESTINATION OF PRECEDING PRODUCTION
01220 (NECESSARY ONLY BECAUSE EVERY PRODUCTION MUST SPECIFY A SUCCESS LABEL)
01240 TMN - TERMINAL SECTION
01260 CMX - COMBINED SECTION
01280 OTHERS - OTHER SELF-EXPLANATORY(?) LABELS
01300 ##
01320 SYLLABLES USED IN NOTION ABBREVIATIONS.
01340 ##
01360 PREFIX POSTFIX
01380 ACT - ACTUAL CL - CLAUSE
01400 BR - BRIEF DR - DECLARER
01420 FOR - FORMAL L - LIST
01440 PL - PARAMETER LIST
01460 SOME OTHERS PT - PART
01480 RL - ROWER LIST SR - SERIES
01500 DEF - DEFINITION SQ - SEQUENCE
01520 ##
01540 SYMBOL CLASSES.
01560 ##
01580 CL00 # ALL THE THINGS THAT CAN START A UNIT OR A DECLARATION #
01600 BEGIN@, BOOLDEN@, BY@, CASE@, DO@, EQUAL@, FOR@, FROM@,
01620 GO@, GOTO@, HEAP@, IF@, LOC@, LONG@, MDIND@, MODE@, NIL@,
01640 OP@, OPEN@, OPR@, OTHDR@, PRDEN@, PRDR@, PRIO@, PROC@, REF@, SHORT@,
01660 SKIP@, START@, STRGDEN@, STRUCT@, SUB@, TAB@, TAG@, TO@, VOID@, WHILE@
01680 ##
01700 CL01 # ALL THE THINGS THAT CANNOT START A UNIT OR DECLARATION #
01720 AGAIN@, AT@, BUS@, CLOSE@, COLON@, COMMA@, ELIF@, ELSE@, END@, ESAC@, EXIT@,
01740 FI@, IDTY@, IN@, OD@, OUSE@, OUT@, SEMIC@, STICK@, STOP@, THEN@
01760 ##
01780 CL11 AT@, BUS@, CLOSE@, COMMA@
01800 CL12 LONG@, MDIND@, OTHDR@, PRDR@,
01820 PROC@, REF@, SHORT@, STRUCT@,
01840 SUB@
01860 CL13 UNITSR@, AGAIN@, BEGIN@, CASE@,
01880 DO@, ELIF@, ELSE@, IF@, IN@,
01900 OPEN@, OUSE@, OUT@, STICK@, CSTICK@,
01920 THEN@, WHILE@
01940 CL14 EQUAL@, OPR@, TAB@
01960 ##
01980 CL21 FOR@, BY@, FROM@, TO@, WHILE@, DO@
02000 CL22 BEGIN@, CASE@, IF@, BRTHPT@, BRINPT@
02020 CL23 OUSE@, OUT@
02040 CL24 ELIF@, ELSE@
02060 CL25 AT@, COLON@
02080 CL26 OPEN@, SUB@
02100 CL27 FLDSPL@, STRUCT@
02120 CL28 OTHDR@, PRDR@
02140 CL29 CSTICK@, AGAIN@, STICK@
02160 CL2A BOOLDEN@, PRDEN@, STRGDEN@
02180 CL2B MDIND@, TAB@
02200 CL2C OP@, PROC@
02220 CL2D COMMA@, SEMIC@
02240 CL2E HEAP@ LOC@
02260 CL2F CLOSE@, END@, ESAC@, F1@, OD@.
02280 ##
02300 .COMMENT
02320 ##
02340 #INITIAL STACK CONFIGURATION STOP@,STOP@!START@#
02360 ##
02380 INIT: ! => S-120 , ! ++ PROGH;
02400 PROGH: TAG@!COLON@ => S-74 ,1-> ! (1) + PROGH,ENCLCLH;
02420 ##
02440 SERCLH: TAG@!COLON@ => S-74 , ! (1) LABT;
02460 TAG@! => , ! SECDH;
02480 CL2A! => S-65 ,1->PRIM ! PRIMT;
02500 PROC@!TAG@ => S-31 , ! + CM3;
02520 SUB@!CL00 => S-24 ,0->ACTRL ! + UNITH;
02540 LOC@! => , ! + CM1;
02560 OP@! => , ! + CM2;
02580 PRIO@! => , ! + PDEFH;
02600 MODE@! => S-32 , ! + MDEFH,UNITH1;
02620 ##
02640 UNITH: TAG@! => , ! SECDH;
02660 CL2A! => S-65 ,1->PRIM ! PRIMT;
02680 UNITH1: SKIP@! => S-67 , ! UNITT;
02700 GOTO@! => S-67 , ! + TM2;
02720 GO@!TO@ => S-67 , ! (1) + TM2;
02740 GO@! => , ! ERROR01;
02760 OPEN@!CL12 => A-2+ , ! RTEXTH;
02770 OPEN@!OPEN@ => A-2+ , ! RTEXTH;
02780 ##
02800 TERTH: NIL@! => S-67 ,1->TERT ! TERTT;
02820 ##
02840 OPRANDH: CL14! => , ! + OPRANDH;
02860 ##
02880 SECDH: TAG@!OF@ => , ! ++ SECDH;
02900 TAG@! => S-64 ,1->PRIM ! PRIMT;
02920 CL2A! => S-65 ,1->PRIM ! PRIMT;
02940 CL2E! => , ! + ACTDRH1;
02960 VOID@! => S-10 ,1->MOIDDR ! MOIDDRT;
02980 SUB@! => S-12 ,0->FORRLB ! FORRLT;
03000 CL28! => S-10 , ! NONRDRT;
03020 LONG@! => S-12 , ! LONGST2;
03040 SHORT@! => S-13 , ! SHORTST2;
03060 REF@! => , ! + FORDRH;
03080 STRUCT@! => , ! + TM3;
03100 CL2B! => , ! MDINDDRT;
03120 PROC@! => , ! + PROCPH;
03140 ##
03160 ENCLCLH: FOR@! => , ! TM1;
03180 WHILE@! => S-55 , ! + SERCLH;
03200 DO@! => S-59 , ! + SERCLH;
03220 CL21! => S-48 , ! FROMPTH;
03222 OPEN@!CL01 => , ! FORDRH;
03240 CL22! => S-34 , ! + SERCLH;
03250 OPEN@! => S-34 , ! + SERCLH;
03260 CL00! => E-33 , ! UNITH,ERROR01;
03280 ##
03300 PROCPH: ! => S-22 , ! L1;
03320 L1: OPEN@! => , ! + FORDRH;
03340 ##
03360 MOIDDRH: VOID@! => S-10 ,1->MOIDDR ! MOIDDRT;
03380 ##
03400 FORDRH: CL26! => S-12 ,0->FORRLB ! FORRLT;
03420 ##
03440 NONRDRH: CL26!CL00 => E-35 , ! + UNITH;
03460 CL26! => E-35 ,0->FORRLB ! FORRLT;
03480 CL28! => S-10 , ! NONRDRT;
03500 LONG@! => S-12 , ! LONGST1;
03520 SHORT@! => S-13 , ! SHORTST1;
03540 REF@! => , ! + FORDRH;
03560 STRUCT@! => , ! + TM3;
03580 CL2B! => , ! MDINDDRT;
03600 PROC@! => , ! + PROCPH,ERROR02;
03620 #ACTUAL-DECLARER IN GENERATOR#
03640 ACTDRH1: CL26!CL00 => S-40 ,0->ACTRL ! + UNITH,ACTDRH3;
03660 #ACTUAL-DECLARER IN MODE-DEFINITION#
03680 ACTDRH2: VOID@! => S-10 ,1->MOIDDR ! MOIDDRT;
03700 CL26!CL00 => S-69 ,0->ACTRL ! + UNITH;
03720 ACTDRH3: CL26! => E-39 ,0->ACTRL ! FORRLT,NONRDRH;
03740 ##
03760 DCLH: PROC@!TAG@ => S-31 , ! + CM3;
03780 SUB@!CL00 => S-24 , ! + UNITH;
03800 LOC@! => , ! + CM1;
03820 OP@! => , ! + CM2;
03840 PRIO@! => , ! + PDEFH;
03860 MODE@! => S-32 , ! + MDEFH,FORDRH;
03880 ##
03882 TRMSCH: CL26! => ,0->TRMSCL ! SECTL;
03884 SECTL: !CL00 => , ! + UNITH;
03886 !CL25 => , ! + SECTM,TRMSCLT;
03893 ##
03900 SECTM: COLON@!AT@ => ,1->BOUNDS ! ++ UNITH;
03920 COLON@!CL11 => S-91 , ! TRMSCT;
03940 ! => , ! + UNITH;
04120 ##
04130 #ACTUAL-DECLARER IN VARIABLE-DECLARATION WITH .LOC#
04140 CM1: PROC@!TAG@ => S-31 ,1-> ! + RVDEFH;
04160 CL26!CL00 => S-24 ,0->ACTRL ! + UNITH,ACTDRH3;
04180 ##
04200 FROMPTH: FROM@! => , ! + UNITH;
04220 ! => S-50 , ! BYPTH;
04240 BYPTH: BY@! => , ! + UNITH;
04260 ! => S-53 , ! TOPTH;
04280 TOPTH: TO@! => , ! + UNITH;
04300 ! => S-52 , ! WHILEPTH;
04320 WHILEPTH: WHILE@! => S-54 , ! + SERCLH;
04340 DO@! => S-58 , ! + SERCLH,ERROR04;
04360 ##
04380 RTEXTH: OPEN@! => S-99 ,0->FORDCL ! + FORDRH,MOIDDRH;
04400 ##
04420 FLDSELLH: TAG@! => S-18 , ! FLDSELLT,ERROR05;
04440 ##
04460 FORPLH: TAG@! => S-20 , ! FORPLT,ERROR18;
04480 ##
04500 ACTPLH: ! => ,0->ACTPL ! + UNITH;
04520 ##
04540 BRALTH: ! => A-5+ , ! BRTHENPTH;
04560 ##
04580 BRINPTH: ! => S-38 ,1->CSTICK ! + UNITH;
04600 ##
04620 BRTHENPTH: ! => S-37 , ! + SERCLH;
04640 ##
04660 LABH: TAG@!COLON@ => S-74 , ! (1) LABT,ERROR09;
04680 ##
04700 IDEFH2: ! => S-29 , ! IDEFH1;
04720 IDEFH1: !EQUAL@ => S-108 ,1->IDEFL ! (1) + UNITH,ERROR10;
04740 ##
04760 VDEFH2: ! => S-30 , ! VDEFH1;
04780 VDEFH1: !BECOM@ => S-108 ,1->VDEFL ! (1) + UNITH;
04800 !CL2D => S-107 , ! VDEFT,ERROR11;
04820 ##
04840 ODEFH2: ! => S-29 , ! ODEFH1;
04860 ODEFH1: CL14!EQUAL@ => S-109 ,1->ODEFL ! (1) + UNITH,ERROR38;
04880 ##
04900 CM2: CL14! => S-31 , ! RODEFH,PROCPH;
04920 RODEFH: !EQUAL@ => S-104 ,1->RODEFL ! (1) + RTEXTH,ERROR38;
04940 ##
04960 PDEFH: CL14!EQUAL@ => , ! (1) + TM4,ERROR40;
04980 ##
05000 MDEFH: CL2B!EQUAL@ => S-68 , ! (1) + ACTDRH2,ERROR12;
05020 ##
05040 CM3: !BECOM@ => S-33 , ! RVDEFH;
05060 RIDEFH: !EQUAL@ => S-102 ,1->RIDEFL ! (1) + RTEXTH,ERROR41;
05080 ##
05100 RVDEFH: !BECOM@ => S-103 ,1->RVDEFL ! (1) + RTEXTH,ERROR11;
05120 #TERMINAL SECTIONS#
05140 TM1: !TAG@ => S-47 , ! (1) + FROMPTH,ERROR36;
05160 ##
05180 TM2: TAG@! => S-63 ,1-> ! UNITT,ERROR13;
05200 ##
05220 TM3: OPEN@! => S-22 ,1-> ! + NONRDRH,ERROR14;
05240 ##
05260 TM4: PRIMDEN@! => S-117 ,1-> ! PDEFT,ERROR43;
05280 #TAIL SECTIONS#
05300 SHORTST1: !SHORT@ => S-15 , ! (1) SHORTST1,LSCM1;
05320 LONGST1: !LONG@ => S-14 , ! (1) LONGST1,LSCM1;
05340 ##
05360 SHORTST2: !SHORT@ => S-15 , ! (1) SHORTST2,LSCM2;
05380 LONGST2: !LONG@ => S-14 , ! (1) LONGST2;
05400 LSCM2: !PRIMDEN@ => S-66 ,1->PRIM ! (1) PRIMT;
05420 LSCM1: !PRIMDR@ => S-11 , ! (1) NONRDRT,ERROR16;
05440 ##
05460 FORRLT: !COLON@ => , ! (1) FORROWT;
05480 FORROWT: !COMMA@ => S-14 , ! (1) FORRLT;
05500 SUB@,ANY!BUS@ => , ! (1) + NONRDRH;
05510 OPEN@,ANY!CLOSE@ => , ! (1) + NONRDRH;
05520 !CL00 => E-17 ,1->FORRLB ! + UNITH,MISMATCH;
05540 ##
05560 FLDSELLT: !COMMA@ => , ! (1) CM4;
05580 !CLOSE@ => ,1-> ! FLDSPT,ERROR05;
05600 ##
05620 CM4: !TAG@ => S-19 , ! (1) FLDSELLT;
05640 !CL12 => ,1-> ! FLDSPT;
05650 !OPEN@ => ,1-> ! FLDSPT,ERROR05;
05660 ##
05680 FLDSPT: FLDSPL,ANY! => ,1-> ! FLDSPLT;
05700 ! => ,1->FLDSPL ! FLDSPLT;
05720 ##
05740 FLDSPLT: STRUCT@,ANY!CLOSE@ => S-23 ,1-> ! (1) NONRDRT;
05760 ! => , ! + NONRDRH;
05780 ##
05800 FORPLT: !COMMA@ => , ! (1) CM5;
05820 !CLOSE@ => ,1-> ! FORDCT,ERROR18;
05840 ##
05860 CM5: !TAG@ => S-21 , ! (1) FORPLT;
05880 !CL12 => ,1-> ! FORDCT;
05890 !OPEN@ => ,1-> ! FORDCT,ERROR18;
05900 ##
05920 FORDCT: FORDCL,ANY! => ,1-> ! FORDCLT;
05940 ! => ,1->FORDCL ! FORDCLT;
05960 ##
05980 FORDCLT: OPEN@,ANY!CLOSE@ => , ! ++ MOIDDRH;
06000 ! => , ! + FORDRH;
06020 ##
06040 PRMDRLT: !COMMA@ => , ! (1) + FORDRH;
06060 !CLOSE@ => , ! ++ MOIDDRH,ERROR19;
06080 ##
06100 MOIDDRT: CL2C,ANY! => , ! PROCPT;
06120 MODE@,CL2B,ANY! => S-73 ,1-> ! MDEFT;
06140 PRMDRL,ANY,ANY! => ,3-> ! PROCPT;
06160 FORDCL,ANY,ANY! => ,4->RSPEC ! RSPECT1,CM7;
06180 ##
06200 NONRDRT: CL2E,ANY! => , ! ACTDRT;
06220 CL27,ANY! => , ! + FLDSELLH;
06240 REF@,ANY! => S-16 ,1-> ! NONRDRT;
06260 ACTRL,ANY! => S-27 ,2-> ! NONRDRT;
06280 CL26! => , ! ACTDRT;
06300 FORRLB,ANY! => S-25 ,2-> ! FORDRT;
06320 MODE@,CL2B,ANY! => S-73 ,1-> ! MDEFT;
06340 CL2C,ANY! => , ! PROCPT;
06360 CLOSE@,ANY! => ,1->MOIDDR ! MOIDDRT;
06380 FORDCL,ANY! => , ! + FORPLH;
06400 CL13,ANY!TAG@ => , ! + CM6,FORDRT;
06420 ##
06440 CM6: !EQUAL@ => , ! IDEFH2,CM8A;
06460 ##
06480 FORDRT: REF@,ANY! => S-16 ,1-> ! NONRDRT;
06500 PRMDRL,ANY! => ,1-> ! PRMDRLT;
06520 FORDCL,ANY! => , ! + FORPLH;
06540 CL2C,ANY! => , ! PROCPT;
06560 PRMDRL,ANY,ANY! => ,3-> ! PROCPT;
06580 FORDCL,ANY,ANY! => ,4->RSPEC ! RSPECT1;
06600 CL2C,OPEN@,ANY! => ,1->PRMDRL ! PRMDRLT;
06620 CL13,ANY!TAG@ => , ! + IDEFH2;
06640 ##
06660 CM7: !TAG@ => , ! ERROR31,CM7A;
06680 ##
06700 CM7A: !COLON@ => S-17 ,1->RSPEC ! (1) RSPECT2;
06720 ! => S-116 ,1->MOIDDR ! + ENCLCLH; #CAST#
06740 ##
06760 MDINDDRT: ! => A-3+ , ! NONRDRT;
06780 ! => A-4+ ,1->MOIDDR ! MOIDDRT;
06800 FORRLB,ANY! => E-35 , ! NONRDRT;
06820 ACTRL,ANY! => E-35 , ! NONRDRT;
06840 CL27,ANY! => E-35 , ! NONRDRT;
06860 REF@,ANY! => S-16 ,1-> ! NONRDRT;
06880 PRMDRL,ANY! => ,1-> ! PRMDRLT;
06900 FORDCL,ANY! => , ! + FORPLH;
06920 CL2C,ANY! => , ! PROCPT;
06940 LOC@,ANY!TAG@ => S-71 ,1-> ! VDEFH3;
06960 CL2E,ANY! => S-70 , ! ACTDRT;
06980 MODE@,CL2B,ANY! => S-72 ,1-> ! MDEFT;
07000 PRMDRL,ANY,ANY! => ,3-> ! PROCPT;
07020 FORDCL,ANY,ANY! => ,4->RSPEC ! RSPECT1;
07040 CL2C,ANY,ANY! => ,1->PRMDRL ! PRMDRLT;
07060 CL13,ANY!TAG@ => , ! + CM8,CM7;
07080 ##
07100 CM8: !EQUAL@ => , ! IDEFH2;
07120 ! => S-71 , ! CM8A;
07140 CM8A: ! => S-33 , ! VDEFH2;
07160 ##
07180 ACTDRT: LOC@,ANY!TAG@ => ,1-> ! VDEFH3;
07200 CL2E,ANY! => S-98 ,1-> ! SECDT;
07220 MODE@,CL2B,ANY! => S-73 ,1-> ! MDEFT;
07240 CL13,ANY!TAG@ => S-33 , ! VDEFH3;
07260 ##
07280 VDEFH3: CL13,ANY!TAG@ => , ! + VDEFH2,ERROR31;
07300 ##
07320 RSPECT1: !COLON@ => S-28 , ! (1) RSPECT2,ERROR23;
07340 RSPECT2: RIDEFL,ANY! => S-105 , ! + UNITH;
07360 RVDEFL,ANY! => S-105 , ! + UNITH;
07380 RODEFL,ANY! => S-106 , ! + UNITH;
07400 ! => S-100 , ! + UNITH;
07420 ##
07440 RTEXTT: RIDEFL,ANY! => S-111 ,1-> ! RIDEFT;
07460 RVDEFL,ANY! => S-111 ,1-> ! RVDEFT;
07480 RODEFL,ANY! => S-111 ,1-> ! RODEFT;
07500 ! => , ! UNITT;
07520 ##
07540 PROCPT: PROC@,ANY! => S-28 ,2->NONRDR ! NONRDRT;
07560 OP@,ANY! => S-28 ,1-> ! + ODEFH2,ERROR15;
07580 ##
07600 PRIMT: !SUB@ => S-85 , ! + TRMSCH;
07620 !OPEN@ => A-9+ , ! + ACTPLH;
07630 !OPEN@ => S-85 , ! + TRMSCH;
07640 ##
07660 SECDT: OF@,ANY! => S-75 ,2-> ! SECDT;
07680 CL14,ANY! => ,1->OPRAND ! MONOPDT;
07700 !CL14 => S-77 ,1->OPRAND ! CM9A,TERTT;
07720 ##
07740 MONOPDT: OPRAND,ANY,ANY! => , ! DYOPDT;
07760 OP@,ANY,ANY! => , ! DYOPDT;
07780 CL14,ANY! => S-78 ,2->OPRAND ! MONOPDT;
07800 ##
07820 DYOPDT: !CL14 => S-77 , ! CM9;
07840 OPRAND,CL14,ANY! => S-79 ,2-> ! DYOPDT,TERTT;
07860 ##
07880 CM9: OPRAND,CL14,ANY! => A-1+ ,2-> ! DYOPDT;
07900 CM9A: ! => S-80 , ! ++ UNITH;
07920 ##
07940 TERTT: IDTY@,ANY! => S-82 ,2-> ! TERTT; #RATHER THAN UNITT#
07960 !BECOM@ => S-83 ,1->TERT ! ++ UNITH;
07980 !IDTY@ => S-81 ,1->TERT ! ++ TERTH;
08000 ##
08020 UNITT: UNITSR,ANY! => ,1-> ! UNITSRT;
08040 CL13,ANY! => , ! UNITCOM;
08060 TERT,BECOM@,ANY! => S-84 ,2-> ! UNITT;
08080 VDEFL,ANY! => S-110 ,1-> ! VDEFT;
08100 IDEFL,ANY! => S-110 ,1-> ! IDEFT;
08120 ACTPL,ANY! => ,1-> ! ACTPLT;
08140 FROM@,ANY! => S-49 ,1-> ! + BYPTH;
08160 BY@,ANY! => S-49 ,1-> ! + TOPTH;
08180 TO@,ANY! => S-49 ,1-> ! + WHILEPTH;
08200 UNITLC,ANY! => ,1-> ! UNITLCT;
08220 UNITLP,ANY! => ,1-> ! UNITLPT;
08240 RSPEC,ANY! => S-101 ,1-> ! RTEXTT;
08260 LABSQ,ANY! => ,1-> ! LABUNITT;
08280 ODEFL,ANY! => S-111 ,1-> ! ODEFT;
08300 COLON@,ANY! => S-95 ,2-> ! CMB;
08320 AT@,ANY! => S-90 ,1-> ! REVLBT;
08340 !COLON@ => S-94 ,1->TERT ! LOWBNDT;
08380 TRMSCL,ANY! => S-92 ,1-> ! TRMSCLT;
08400 UNITCOM: !COMMA@ => ,1->TERT ! UNITLT;
08420 ! => , ! UNITSRT;
08440 ##
08460 UNITLT: OPEN@,ANY! => S-113 ,1->UNITLC ! (1) + UNITH;
08480 BEGIN@,ANY! => S-113 ,1->UNITLC ! (1) + UNITH;
08500 ! => S-41 ,1->UNITLP ! (1) + UNITH;
08520 ##
08540 LOWBNDT: ACTRL,ANY! => , ! ++ UNITH;
08600 ! => S-87 , ! + CMA;
08620 # LOWER-BOUND IN TRIMMER#
08640 CMA: !CL11 => ,2->BOUNDS ! BOUNDST;
08660 ! => , ! + UNITH;
08680 #COMBINED ACTRLT AND BOUNDST, AFTER COLON#
08700 CMB: ACTRL,ANY! => ,1-> ! ACTRLT;
08720 TRMSCL,ANY! => S-88 ,1->BOUNDS ! BOUNDST;
08760 FORRLB,ANY! => ,1-> ! ACTRLT; #ERROR PATH FROM E-17#
08770 ! => S-88 ,0->BOUNDS ! BOUNDST; #NO UNIT BEFORE THE COLON#
08820 ##
08840 ACTRLT: !COMMA@ => , ! (1) + UNITH;
08860 SUB@,ANY!BUS@ => S-26 , ! ACTRLT2;
08862 OPEN@,ANY!CLOSE@ => S-26 , ! ACTRLT2;
08866 !CL00 => , ! ERROR20,MISMATCH;
08873 ##
08880 ACTRLT2: CL2B,ANY,ANY! => S-101 , ! (1) + NONRDRH; #MODE-DECLARATION#
08900 ! => , ! (1) + NONRDRH;
08920 ##
08940 BOUNDST: !AT@ => S-89 , ! ++ UNITH,TRMSCT;
08960 ##
08980 REVLBT: BOUNDS,ANY! => ,1-> ! TRMSCT;
09000 TRMSCT: TRMSCL,ANY! => ,1-> ! TRMSCLT;
09020 ! => ,1->TRMSCL ! TRMSCLT;
09040 ##
09060 TRMSCLT: !COMMA@ => S-86 , ! (1) TRMSCH;
09070 SUB@,ANY!BUS@ => S-93 ,2-> ! (1) PRIMT;
09072 OPEN@,ANY!CLOSE@ => S-93 ,2-> ! (1) PRIMT;
09080 !CL00 => , ! ERROR03,MISMATCH;
09090 ##
09120 UNITLCT: !COMMA@ => S-114 , ! (1) + UNITH;
09140 OPEN@,ANY!CLOSE@ => S-115 ,1-> ! (1) UNITLCT1;
09160 BEGIN@,ANY!END@ => S-115 ,1-> ! (1) UNITLCT1,ERROR37;
09180 ##
09200 UNITLCT1: OPEN@,ANY! => ,1->PRIM ! UNITLCT2;
09220 BEGIN@,ANY! => ,1->PRIM ! UNITLCT2,ENCLCLT;
09240 ##
09260 UNITLCT2: !COMMA@ => , ! ENCLCLT,ERROR34;
09280 ##
09300 UNITLPT: ! => S-41 , ! UNITLPT1;
09320 UNITLPT1: !COMMA@ => , ! (1) + UNITH;
09340 CSTICK@,ANY! => S-34 ,2->BRINPT ! BRINPTT;
09360 STICK@,ANY! => A-7+ ,2->BRINPT ! BRINPTT;
09380 IN@,ANY! => S-34 ,2-> ! INPTT,ERROR25;
09400 ##
09420 ACTPLT: !COMMA@ => S-96 , ! (1) + UNITH;
09440 OPEN@,ANY!CLOSE@ => S-97 ,2-> ! (1) PRIMT,ERROR22;
09460 ##
09480 LABUNITT: UNITSR,ANY! => ,1-> ! UNITSRT;
09500 ##
09520 UNITSRT: CL13,ANY!SEMIC@ => S-62 ,1->UNITSR ! (1) + SERCLH;
09540 CL13,ANY!EXIT@ => S-46 ,1->UNITSR ! ++ LABH;
09560 ##
09580 SERCLT: CL13,ANY! => S-43 ,1->UNITSR ! L2,ERROR33;
09600 L2: OPEN@,ANY!CLOSE@ => ,1-> ! (1) ENCLCLT;
09620 BEGIN@,ANY!END@ => ,1-> ! (1) ENCLCLT;
09640 IF@,ANY!THEN@ => S-37 ,1-> ! ++ SERCLH;
09660 THEN@,ANY! => S-39 ,2-> ! THENPTT;
09680 ELSE@,ANY! => ,2-> ! CONDALTT;
09700 ELIF@,ANY!THEN@ => S-37 ,1-> ! ++ SERCLH;
09720 OPEN@,ANY!STICK@ => ,1-> ! + BRALTH;
09740 CASE@,ANY!IN@ => S-38 ,1-> ! ++ SERCLH;
09760 OUT@,ANY! => ,2-> ! CASEALTT;
09780 OUSE@,ANY!IN@ => S-38 ,1-> ! ++ SERCLH;
09800 DO@,ANY!OD@ => S-60 ,1-> ! (1) DOPTT;
09820 WHILE@,ANY!DO@ => S-57 ,1-> ! ++ SERCLH;
09840 BRTHPT,STICK@,ANY! => ,2-> ! BRCONDALTT;
09860 BRINPT,STICK@,ANY! => ,2-> ! BRCASEALTT;
09880 CSTICK@,ANY! => E-42 ,1->UNITLP ! UNITLPT;
09900 IN@,ANY! => E-42 ,1->UNITLP ! UNITLPT;
09920 STICK@,ANY! => S-39 ,2->BRTHPT ! BRTHENPTT;
09940 BRTHPT,AGAIN@,ANY! => ,1-> ! + BRTHENPTH;
09960 BRINPT,AGAIN@,ANY! => ,1-> ! + BRINPTH,ERROR24;
09980 ##
10000 BRCONDALTT:OPEN@,ANY!CLOSE@ => S-35 ,1-> ! (1) ENCLCLT;
10020 AGAIN@,ANY! => S-35 ,2-> ! BRCONDALTT,ERROR24;
10040 ##
10060 CONDALTT: IF@!FI@ => S-35 , ! (1) ENCLCLT;
10080 ELIF@! => S-35 ,1-> ! CONDALTT,ERROR24;
10100 ##
10120 BRCASEALTT:OPEN@,ANY!CLOSE@ => S-42 ,1-> ! (1) ENCLCLT;
10140 AGAIN@,ANY! => S-42 ,2-> ! BRCASEALTT,ERROR24;
10160 ##
10180 CASEALTT: CASE@!ESAC@ => S-42 , ! (1) ENCLCLT;
10200 OUSE@! => S-42 ,1-> ! CASEALTT,ERROR24;
10220 ##
10240 BRTHENPTT: !CL29 => , ! ++ SERCLH;
10260 ! => S-36 , ! BRCONDALTT;
10280 ##
10300 THENPTT: !CL24 => , ! ++ SERCLH;
10320 ! => S-36 , ! CONDALTT;
10340 ##
10360 BRINPTT: !CL29 => , ! ++ SERCLH;
10380 ! => S-36 , ! BRCASEALTT;
10400 ##
10420 INPTT: !CL23 => , ! ++ SERCLH;
10440 ! => S-36 , ! CASEALTT;
10460 ##
10480 DOPTT: WHILE@,ANY! => S-56 ,1-> ! WHILEPTT;
10500 WHILEPTT: TO@,ANY! => ,1-> ! TOPTT;
10520 TOPTT: BY@,ANY! => ,1-> ! BYPTT;
10540 BYPTT: FROM@,ANY! => ,1-> ! FROMPTT;
10560 FROMPTT: FOR@,ANY! => ,1-> ! LOOPCLT;
10580 LOOPCLT: ! => S-61 , ! ENCLCLT;
10600 ##
10620 ENCLCLT: START@,ANY! => S-44 , ! CMC;
10640 MOIDDR,ANY! => S-45 ,2->PRIM ! PRIMT;
10660 ! => S-44 ,1->PRIM ! PRIMT;
10680 ##
10700 CMC: !STOP@ => S-118 , ! QUIT,ERROR21;
10720 ##
10740 QUIT: ! => S-121 , ! QUIT;
10760 #DCL WAS FOLLOWED BY COMMAS#
10780 DCLT1: ! => ,2-> ! + DCLH;
10800 #DCL WAS FOLLOWED BY NON-COMMAS#
10820 DCLT2: ! => S-112 ,2-> ! DCLPT;
10840 ##
10860 DCLPT: UNITSR!SEMIC@ => , ! (1) + SERCLH;
10880 !SEMIC@ => ,0->UNITSR ! (1) + SERCLH,ERROR30;
10900 ##
10920 LABT: LABSQ,ANY! => ,1-> ! LABSQT;
10940 EXIT@,ANY! => ,2-> ! + SERCLH;
10960 ! => ,1->LABSQ ! LABSQT;
10980 ##
11000 LABSQT: !TAG@ => , ! + CMD;
11020 ! => , ! + UNITH;
11040 ##
11060 CMD: !COLON@ => S-74 , ! (1) LABT,UNITH;
11080 ##
11100 IDEFT: !COMMA@ => , ! (1) CME,DCLT2;
11120 ##
11140 CME: !TAG@ => ,1-> ! + IDEFH1,DCLT1;
11160 ##
11180 RIDEFT: !COMMA@ => , ! (1) CMF,DCLT2;
11200 ##
11220 CMF: !TAG@ => ,1-> ! + RIDEFH,DCLT1;
11240 ##
11260 VDEFT: PROC@,ANY! => , ! ERROR32;
11280 # CAN THIS REALLY HAPPEN? #
11300 !COMMA@ => , ! (1) CMG,DCLT2;
11320 ##
11340 CMG: !TAG@ => ,1-> ! + VDEFH1,DCLT1;
11360 ##
11380 RVDEFT: !COMMA@ => , ! (1) CMH,DCLT2;
11400 ##
11420 CMH: !TAG@ => ,1-> ! + RVDEFH,DCLT1;
11440 ##
11460 ODEFT: !COMMA@ => , ! (1) CMI,DCLT2;
11480 ##
11500 CMI: !CL14 => ,1-> ! + ODEFH1,DCLT1;
11520 ##
11540 RODEFT: !COMMA@ => , ! (1) CMJ,DCLT2;
11560 ##
11580 CMJ: !CL14 => ,1-> ! + RODEFH,DCLT1;
11600 ##
11620 PDEFT: !COMMA@ => , ! (1) CMK,DCLT2;
11640 ##
11660 CMK: !CL14 => ,1-> ! + PDEFH,DCLT1;
11680 ##
11700 MDEFT: !COMMA@ => , ! (1) CML,DCLT2;
11720 ##
11740 CML: !CL2B => A-6+ ,1-> ! + MDEFH,DCLT1;
11760 #SYNTAX ERROR PROCESSING; ACTIVATED AFTER BRANCH TO ERRORNN #
11780 PERROR: CL13! => S-119 , ! PEA1;
11800 START@! => S-119 , ! PEA2;
11820 ! => ,1-> ! PERROR;
11840 ##
11860 PEA1: !SEMIC@ => A-8+ , ! (1) + SERCLH;
11880 !CL23 => A-8+ , ! INPTT;
11900 !CL24 => A-8+ , ! THENPTT;
11920 !CL29 => A-8+ , ! BRTHENPTT;
11940 !CL2F => A-8+ , ! (1) ENCLCLT;
11960 !STOP@ => E-08 , ! QUIT;
11980 !CL21 => , ! + PEA1;
12000 !CL22 => , ! + PEA1;
12010 !CL26 => , ! + PEA1;
12020 ! => , ! (1) PEA1;
12040 ##
12060 PEA2: !STOP@ => E-08 , ! QUIT;
12080 ! => , ! (1) PEA2;
12100 ##
12120 ERROR01: ! => E-01 , ! PERROR;
12140 ERROR02: ! => E-02 , ! PERROR;
12160 ERROR03: ! => E-03 , ! PERROR;
12180 ERROR04: ! => E-04 , ! PERROR;
12200 ERROR05: ! => E-05 , ! PERROR;
12220 ERROR09: ! => E-09 , ! PERROR;
12240 ERROR10: ! => E-10 , ! PERROR;
12260 ERROR11: ! => E-11 , ! PERROR;
12280 ERROR12: ! => E-12 , ! PERROR;
12300 ERROR13: ! => E-13 , ! PERROR;
12320 ERROR14: ! => E-14 , ! PERROR;
12340 ERROR15: ! => E-15 , ! PERROR;
12360 ERROR16: ! => E-16 , ! PERROR;
12380 ERROR18: ! => E-18 , ! PERROR;
12400 ERROR19: ! => E-19 , ! PERROR;
12420 ERROR20: ! => E-20 , ! PERROR;
12440 ERROR21: ! => E-21 , ! PERROR;
12460 ERROR22: ! => E-22 , ! PERROR;
12480 ERROR23: ! => E-23 , ! PERROR;
12500 ERROR24: !CL00 => E-24 , ! PERROR;
12520 MISMATCH: CL21! => E-26 , ! PEA3;
12540 BEGIN@! => E-27 , ! PEA3;
12560 CASE@! => E-28 , ! PEA3;
12580 IF@! => E-29 , ! PEA3;
12600 CL22! => E-7 , ! PEA3;
12606 OPEN@! => E-7 , ! PEA3;
12613 SUB@! => E-6 , ! PEA3;
12620 ! => ,1-> ! MISMATCH;
12640 PEA3: ! => S-119 , ! PEA1;
12660 ERROR25: ! => E-25 , ! PERROR;
12680 ERROR30: ! => E-30 , ! PERROR;
12700 ERROR31: ! => E-31 , ! PERROR;
12720 ERROR32: ! => E-32 , ! PERROR;
12740 ERROR33: ! => E-33 , ! PERROR;
12760 ERROR34: ! => E-34 , ! PERROR;
12780 ERROR36: ! => E-36 , ! PERROR;
12800 ERROR37: ! => E-37 , ! PERROR;
12820 ERROR38: ! => E-38 , ! PERROR;
12840 ERROR40: ! => E-40 , ! PERROR;
12860 ERROR41: ! => E-41 , ! PERROR;
12880 ERROR43: ! => E-43 , ! PERROR,PERROR;