ack/lang/a68s/aem/a68sdec.p

1263 lines
52 KiB
OpenEdge ABL
Raw Permalink Normal View History

1988-10-04 10:56:50 +00:00
00100 (*+01() (*$L-*) ()+01*)
00110 (*+02() (*$I32*)(*$T-*)(*$W-*)(*$G-*)(*$D+*)(*$R-*)(*$L+*)(*$E+*) ()+02*)
00120 (*LIST OF TAILORING OPTIONS*)
00130 (***************************)
00140 (**)
00150 (* 1..9 DIFFERENT MACHINES
00160 01 = CDC
00170 02 = EM SYSTEM
00180 03 = NORD 100
00190 04 = POS PERQ
00200 05 = PNX PERQ
00210 11..19 DIFFERENT WORD LENGTHS
00220 11 = 60 BITS
00230 12 = 16 BITS
00240 13 = 32 BITS
00245 19 = 16 BITS WITH SZADDR=32 BITS (EG VAX2)
00250 21..29 DEBUGGING AIDS
00260 21 = MONITORING OF SEMANTIC ROUTINES
00270 22 = TIMING CHECK
00280 23 = TEMPORARY CODE EMITTER
00290 24 = EM CODE EMITTER
00300 25 = EM MACHINE ON CYBER
00310 31..39 PRAGMATS
00320 31 = CHECKS (RUN TIME) ON
00330 32 = ASSERTIONS (COMPILE TIME) CHECKED
00332 33 = GENERATE CODE FOR SYMBOLIC DEBUGGER
00340 41..49 DIFFERENT STACK STRATEGIES
00350 41 = STACK GROWS IN NEGATIVE DIRECTION
00360 42 = SEPARATE SPACES FOR CODE AND DATA
00370 43 = INTEGER LENGTH > MANTISSA LENGTH (E.G. CYBER OR NO FLOATING POINT)
00372 44 = FLOATING POINT NOT AVAILABLE
00380 50..59 SPECIAL OPTIONS
00390 50 = CDC CHARACTER CODE
00400 51 = UMRCC SPECIAL 7600 CODE
00410 52 = CDC 7600 (AS OPPOSED TO CYBER)
00420 53 = VERY LONG PROCEDURES SPLIT IN TWO TO HELP PASCAL COMPILER
00430 54 = EXPERIMENTAL ON ERROR FACILITY
00440 55 = REDUCED LISTING AND ERROR MESSAGES
00450 61..69 DIFFERENT LENGTH FEATURES
00460 61 = LONG WORDS
00470 (70..89 ARE ONLY RELEVANT FOR SEPARATE COMPILATION )
00480 70 = ALL DECLARATIONS
00490 71..79 UNIT INTERFACES
00500 71 = PROGRAM HEADING
00510 72 = A68 PARSER (PRODTABLE)
00520 73 = A68 LEXICAL (LXIO'S)
00530 75 = P-OPS FOR OPERATORS
00540 76 = OTHER P-OPS
00550 77 = A68 CODE EMITTER (RUN-TIME OBJECTS)
00560 78 = CODETABLE
00570 80 = GLOBAL UNIT
00580 81..89 UNIT IMPLEMENTATIONS
00590 81 = A68 LEXICAL *
00600 82 = A68 PARSER *
00610 83 = A68 LEXEME INITIALISATION *
00620 84 = A68 MODE INITIALATION *
00630 85 = A68 SEMANTICS *
00640 86 = A68 CODE GENERATOR *
00650 87 = A68 CODE EMITTER
00660 *)
00670 (*+01() (*$G-+) ()+01*)
00680 (*+01() (*$W5750+) ()+01*)
00690 (*+01() (*$T-,P-+) ()+01*)
00700 (*+25() (*$G-+) ()+25*)
00710 (*+25() (*$W5750+) ()+25*)
00720 (*+25() (*$T-,P-+) ()+25*)
00730 (* COPYRIGHT 1983 C.H.LINDSEY, UNIVERSITY OF MANCHESTER *)
00740 (**)
00750 (*-03()
00760 (*+01() PROGRAM A68SCOM(SOURCDECS, OUTPUT+, LGO, LSTFILE, A68INIT ); ()+01*)
00770 (*-01() (*-05() (*+71()
00780 PROGRAM A68SCOM(SOURCDECS, LGO, LSTFILE, A68INIT, DUMPF, OUTPUT);
00790 ()+71*) ()-05*) ()-01*)
00800 (*+25() PROGRAM A68SCOM(SOURCDECS, OUTPUT, LGO, LSTFILE, A68INIT ); ()+25*)
00810 ()-03*)
00820 (*+04()
00830 EXPORTS
00840 IMPORTS HACKS FROM HACKS;
00850 IMPORTS A68SIN FROM A68SIN;
00860 IMPORTS A68S1 FROM A68S1;
00870 ()+04*)
00880 (**)
00890 (*+70()
00900 CONST (* CONST CONST CONST CONST CONST CONST CONST CONST CONST CONST CONST CONST CONST CONST CONST CONST*)
00910 (**)
00920 (*ENVIRONMENT*)
00930 (*************)
00940 (**)
00950 VERSIONNUM='(VERSION 2.2)';
00960 (*+01()
00970 ALG68NUM='ALG68S 2.2';
00980 NOSNUM='NOS 2.2';
00990 ()+01*)
01000 (*+11()
01010 MAXINT=7777777777777777B;
01040 MAXABSCHAR=63;
01070 MAXSIZE=110B; (*MAX SIZE OF NONSTOWED OBJECT*)
01080 TRUEVALUE=40000000000000000000B;
01090 ()+11*)
01100 (*+12()
01110 MAXINT=32767;
01120 (*+02() TRUEVALUE=1; ()+02*) (*SHOULD MATCH WITH RUN-TIME SYSTEM*)
01130 (*-02() TRUEVALUE=-32768; ()-02*)
01140 MAXSIZE=127;
01200 MAXABSCHAR=127;
01210 ()+12*)
01220 (*+13()
01230 MAXINT=2147483647;
01270 MAXABSCHAR=127;
01290 MAXSIZE=127;
01300 (*+02() TRUEVALUE=1; ()+02*)
01302 (*-02() TRUEVALUE=(*-2147483648*) -1; ()-02*)
01310 ()+13*)
01320 (*+01() RTNLENGTH=7; ()+01*) (*LENGTH OF PROCEDURE NAMES*)
01330 (*+02() RTNLENGTH=8; ()+02*) (*SHOULD MATCH WHAT YOUR PASCAL*)
01340 (*+03() RTNLENGTH=5; ()+03*) (*COMPILER PRODUCES*)
01350 (*+05() RTNLENGTH=7; ()+05*)
01370 (**)
01380 (*LISTING*)
01390 (*********)
01400 (**)
01410 CBUFSIZE=120; (*SIZE OF OUTPUT BUFFERS*)
01420 HTSIZE=163; (*HASH TABLE SIZE*)
01430 (*+01() LEX1SIZE=1; ()+01*)
01440 (*+02() (*+12() (*-19() LEX1SIZE=10; ()-19*)
01445 (*+19() LEX1SIZE=14; ()+19*) ()+12*)
01446 (*+13() LEX1SIZE=16; ()+13*)
01447 ()+02*)
01450 (*+03() LEX1SIZE=4; ()+03*)
01460 (*+04() LEX1SIZE=8; (*SIZE OF STATIC PART OF LEXEME*) ()+04*)
01470 (*+05() LEX1SIZE=8; ()+05*)
01480 (*+03() LINESPERPAGE=54; ()+03*)
01490 (*-03() LINESPERPAGE=58; ()-03*)
01500 (**)
01510 (**)
01520 (*MODE HANDLING*)
01530 (***************)
01540 (**)
01550 (*+01() MODE1SIZE=1; ()+01*)
01560 (*+02() MODE1SIZE=(*+12() (*-19() 14 ()-19*) (*+19() 18 ()+19*) ()+12*) (*+13() 20 ()+13*); ()+02*)
01570 (*+03() MODE1SIZE=4; ()+03*)
01580 (*+04() MODE1SIZE=8; ()+04*)
01590 (*+05() MODE1SIZE=10; ()+05*)
01600 (**)
01610 (**)
01620 (*LEXICAL ANALYSIS*)
01630 (******************)
01640 (*+11() TAXLEN=640; TAXLENWD=64; TAXLENWD2=128; CHARPERWORD=10; WORDSPERREAL=1; ()+11*)
01650 (*+12() TAXLEN=510; TAXLENWD=255; CHARPERWORD=2; WORDSPERREAL=(*+03()3()+03*)(*-03()4()-03*); ()+12*)
01660 (*+13() TAXLEN=508; TAXLENWD=127; CHARPERWORD=4; WORDSPERREAL=2; ()+13*)
01670 (*-73() LXIODUMMY=0; LXIOVDEFL=28; ()-73*)
01680 (**)
01690 (*ERROR HANDLING*)
01700 (****************)
01710 ELX=0; ESY=10; ESE=60; DUMMY=0; FINISH=9;
01720 ESY01=130; SR01=11;
01730 (**)
01740 (**)
01750 (*CODE EMITTER*)
01760 (**************)
01761 (*+02() OUTPUTEFET=38;
01762 (*+12() (*-19() FIRSTIBOFFSET=30; ()-19*) (*+19() FIRSTIBOFFSET=50; ()+19*) ()+12*)
01763 (*+13() FIRSTIBOFFSET=52; ()+13*)
01765 (*PARAMS SZREAL+SZWORD+(2*SZADDR)+LINKS (8*SZADDR) *)
01767 (* IF YOU CHANGE THIS YOU HAVE TO CHANGE FIRSTIBOFFSET IN E.H *)
01768 A68STAMP=13476; (* A HIGHLY IMPROBABLE NUMBER *)
01769 ()+02*)
01770 (*+77()
01780 (*+01()
01790 OUTPUTEFET=23B; (*OFFSET OF 'OUTPUT'*)
01800 FIRSTVAR=510B; (*OFFSET OF FIRST PASCAL VAR; KNOWN TO A68SCOD*)
01810 FIRSTIBOFFSET=531B; (*IF YOU ALTER THIS, THERE ARE SOME CORRESPONDING CHANGES TO THE CODETABLE*)
01820 ()+01*)
01840 (*+03() OUTPUTEFET=9999; FIRSTIBOFFSET=9999; (*NEED FIXING*) ()+03*)
01850 (*+04() OUTPUTEFET=9999; FIRSTIBOFFSET=83; ()+04*)
01860 (*+05() OUTPUTEFET=9999; FIRSTIBOFFSET=0; ()+05*)
01870 ()+77*)
01880 (*+02()
01890 (**)
01891 (* CONSTANTS FOR PRODUCING COMPACT EM-1 CODE *)
01892 (*+24()
01893 ADF= 2; ADI= 3; ADP= 4; CAND=7; ASP= 8; BEQ=10; BGE=11; BGT=12; BLE=13; BLT=16; BNE=17; BRA=18;
01894 CAI=19; CAL=20; CFF=21; CIF=24; CIU=26; CMF=27; CMI=28; CMU=31; COM=32; CSA=33;
01895 DUP=42; DVF=44; DVI=45; EXG=47; GTO=51; INC=52; INL=54; IOR=56;
01896 LAE=57; LAL=58; LAR=59; LDC=60; LDE=61; LDF=62; LDL=63; LFR=64; LIL=65; LIN=67; LOC=69;
01897 LOE=70; LOF=71; LOI=72; LOL=73; LOR=74; LOS=75; LPB=76; LPI=77; LXA=78; LXL=79;
01899 MLF=80; MLI=81; NGF=84; NGI=85; NOP=86; RET=88; ROL=91;
01900 SBF=95; SBI=96; SDE=99; SDF=100; SDL=101; CSET=102; SIL=104; STE=110; STF=111; STI=112; STL=113; STR=114;
01901 TEQ=116; TGE=117; TGT=118; TLE=119; TLT=120; TNE=121;
01902 XOR=123;
01903 ZEQ=124; ZER=125; ZGE=126; ZGT=127; ZNE=130; ZRF=132; ZRL=133;
01904 (*+78() BSS=150; CON=151; EEND=152; EXC=154; EXP=155; HOL=156; MES=159; PRO=160; ROM=161; ()+78*)
01907 EOOPNDS=255;
01908 ()+24*)
01909 (*-24()
01910 ADF='ADF';ADI='ADI';ADP='ADP';CAND='AND';ASP='ASP';BEQ='BEQ';BGE='BGE';BGT='BGT';BLE='BLE';BLT='BLT';BNE='BNE';BRA='BRA';
01911 CAI='CAI';CAL='CAL';CFF='CFF';CIF='CIF';CIU='CIU';CMF='CMF';CMI='CMI';CMU='CMU';COM='COM';CSA='CSA';
01912 DUP='DUP';DVF='DVF';DVI='DVI';EXG='EXG';GTO='GTO';INC='INC';INL='INL';IOR='IOR';
01913 LAE='LAE';LAL='LAL';LAR='LAR';LDC='LDC';LDE='LDE';LDF='LDF';LDL='LDL';LFR='LFR';LIL='LIL';LIN='LIN';LOC='LOC';
01914 LOE='LOE';LOF='LOF';LOI='LOI';LOL='LOL';LOR='LOR';LOS='LOS';LPB='LPB';LPI='LPI';LXA='LXA';LXL='LXL';
01915 MLF='MLF';MLI='MLI';NGF='NGF';NGI='NGI';NOP='NOP';RET='RET';ROL='ROL';
01916 SBF='SBF';SBI='SBI';SDE='SDE';SDF='SDF';SDL='SDL';CSET='SET';SIL='SIL';STE='STE';STR='STR';STF='STF';STI='STI';STL='STL';
01917 TEQ='TEQ';TGE='TGE';TGT='TGT';TLE='TLE';TLT='TLT';TNE='TNE';
01918 XOR='XOR';
01919 ZEQ='ZEQ';ZER='ZER';ZGE='ZGE';ZGT='ZGT';ZNE='ZNE';ZRF='ZRF';ZRL='ZRL';
01920 BSS='BSS';CON='CON';EEND='END';EXC='EXC';EXP='EXP';HOL='HOL';MES='MES';PRO='PRO';ROM='ROM';
01922 EOOPNDS=' ';
01923 ()-24*)
01924 (**)
01925 CPACTLCL=241; CPACTGBL=242; CPACTCONS=245; CPACTLBL=248; CPACTPNAM=249; CPACTSTRNG=250; CPACTINT=251; CPACTUNS=252; CPACTFLOAT=253;
01931 (*-19()
01932 LFC=LOC; LFL=LOL; LFE=LOE; LFF=LOF; SFL=STL; SFE=STE; SFF=STF;
01933 ()-19*)
01934 (*+19()
01935 LFC=LDC; LFL=LDL; LFE=LDE; LFF=LDF; SFL=SDL; SFE=SDE; SFF=SDF;
01936 ()+19*)
01990 ()+02*)
02000 PNOOP=0(*6*);
02010 (*+75()
02020 PADD(*6*)=-6; PSUB(*6*)=-12; PMUL(*6*)=-18; PDIV(*6*)=-24; POVER(*2*)=-30; PMOD(*2*)=-32;
02030 PEXP(*6*)=-34; PEQ(*6*)=-40; PEQCS(*2*)=-46; PEQB(*3*)=-48; PNE(*6*)=-51; PNECS(*2*)=-57; PNEB(*3*)=-59;
02040 PLT(*4*)=-62; PLTCS(*2*)=-66; PLTBY=-68; PLE(*4*)=-69; PLECS(*2*)=-73; PLEBT(*2*)=-75;
02050 PGT(*4*)=-77; PGTCS(*2*)=-81; PGTBY=-83; PGE(*4*)=-84; PGECS(*2*)=-88; PGEBT(*2*)=-90;
02060 PCAT(*2*)=-92; (*SEE LATER(2)=-94;*) PPLSAB(*6*)=-96; PPLSABS(*2*)=-102; PPLSTOCS(*2*)=-104;
02070 PMINUSAB(*6*)=-106; PTIMSAB(*6*)=-112; PTIMSABS=-118; PDIVAB(*4*)=-119; POVERAB(*2*)=-123;
02080 PMODAB(*2*)=-125; PANDB(*2*)=-127; PORB(*2*)=-129; PUPB=-131; PUPBM=-132; PUPBMSTR=-133;
02090 PLWB=-134; PLWBM=-135; PLWBMSTR=-136; PSHL=-137; PSHR=-138;
02100 PELMBT=-139; PELMBY=-140; PMULCI(*2*)=-141; PMULIC(*2*)=-143; PPLITM(*2*)=-145;
02110 PNEGI(*6*)=-147; PABSI(*6*)=-153; (*SPARE=-159;*) PABSB(*2*)=-160; PABSCH=-162;
02120 PNOTB(*2*)=-163; PARG(*2*)=-165; PCONJ(*2*)=-167; PENTI(*2*)=-169;
02130 PROUN(*2*)=-171; PODD(*2*)=-173; PLENGI=-175; PLENGR=-176; PLENGC=-177;
02140 PSHRTI=-178; PSHRTR=-179; PSHRTC=-180; PSGNI(*4*)=-181; PREPR=-185; PBIN=-186;
02150 PRE=-187; PIM=-188;
02160 ()+75*)
02170 PNONE=-189;
02180 (*+76()
02182 PDUP1PILE=-94; PDUP2PILE=-95; (* THESE SHOULD BE MOVED AT NEXT OPPORTUNITY*)
02190 PSELECT(*3*)=1; PSTRNGSLICE(*2*)=4; PSTARTSLICE=6; PSLICE1=7;
02200 PSLICE2=8; PSLICEN=9; PCASE=10; PJMPF=11; PLPINIT(*4*)=12;
02210 PRANGENT=16; PRANGEXT(*3*)=17;
02220 PSCOPEEXT=20; PACTDRMULT=21; PACTDRSTRUCT=22;
02230 PDCLINIT(*4*)=23; PCREATEREF(*4*)=27; PPARM=31; PCHECKDESC=32; PDCLSP(*4*)=33; PLOADRT=37;
02240 PBOUNDS=38; PENVCHAIN(*2*)=39; PVARLISTEND(*2*)=41; PCASJMP(*2*)=43; PSCOPETT(*5, BUT 1ST 2 NOT USED*)=43;
02250 PASSIGTT(*5*)=48; PSCOPETN=53; PASSIGTN=54; POUTJUMP=55; PSCOPENT(*5, BUT 1ST 2 NOT USED*)=55;
02260 PASSIGNT(*4*)=60; PRECGEN=64; PSCOPENN=65; PASSIGNN=66; PSCOPEVAR(*3*)=67; PLOADVAR(*3*)=70;
02270 PDUP1ST(*2*)=73; PDUP2ND(*4*)=75; PGETTOTAL(*5*)=79;
02280 ()+76*)
02290 PIDTYREL(*2*)=84; PDEREF(*5*)=86;
02300 PVOIDNAKED=91; PSKIP(*3*)=92; PSKIPSTRUCT=95; PNIL=96;
02310 PPUSH(*3*)=97; PVOIDNORMAL=100; PDATALIST=101; PWIDEN(*8*)=102;
02320 PROWNONMULT=110; PROWMULT=111;
02330 (*+76()
02340 PCALL=112; PRETURN=113;
02350 PRNSTART=114; PLPINCR(*2*)=115; PLPTEST=117; PGBSTK=118; PLEAPGEN(*6*)=119;
02360 PGETTOTCMN(*3*)=125; PSELECTROW=128; PHOIST=129; PPREPSTRDISP=130; PPREPROWDISP(*2*)=131;
02370 PCOLLTOTAL(*5*)=133; PCOLLNAKED=138; PCOLLCHECK=139; PPEND=140;
02380 PLINE=141; PENDSLICE=142; PTRIM(*10*)=143; PJMP=153; PGETOUT=154;
02390 PGETMULT(*2*)=155; PNAKEDPTR=157; PPBEGIN(*2*)=158; PCASCOUNT=160; PLOADRTP=161;
02400 PASGVART(*9*)=162; PPASC(*4*)=171;
02410 PPUSHIM(*4*)=175; PSETIB=179; PGETPROC(*2*)=180; PASP=182;
02420 PFIXRG(*2*)=183;PDECM(*2*)=185;PCALLA(*3*)=187;
02430 (*+02() PSWAP(*4*)=190; ()+02*)
02440 (*+05() PSWAP=190; PHEAVE=191; PSTKTOE(*3*)=192; PALIGN=195; PDISCARD=196; ()+05*)
02450 (*+01() PSWAP=190; PLOADX0IM(*2*)=191;PLOADX1IM(*2*)=193;PLOADX2IM(*2*)=195;PLOADX3IM(*2*)=197;PLOADX4IM(*2*)=199;
02460 PSTATICLINK=201; PPOP=202;
02470 ()+01*)
02480 ()+76*)
02490 (*+01() (*-61() PLAST=363; ()-61*) (*+61() PLAST=419; ()+61*) ()+01*)
02500 (*+02() (*-61() PLAST=350; ()-61*) (*+61() PLAST=365; ()+61*) ()+02*)
02504 (*+05() PLAST=400; ()+05*)
02510 (**)
02520 (*-76() PENVCHAIN=39; PSWAP=129; PPEND=140; PJMP=153; PPUSHIM=175; ()-76*)
02530 (**)
02540 (*+01()
02550 LOADMARGIN=8; (*ALLOW ROOM ABOVE FIELDLENGTH NEEDED BY LOADER*)
02560 ABSMARGIN=500B; (*ADDITIONAL FL NEEDED BY ABSOLUTE LOAD OVER & ABOVE FL NEEDED BY RELOCATEABLE
02570 LOAD OF THE SAME PROGRAM. 500B IS NEEDED BECAUSE OF APPARENT BUG IN NOS1.4-531*)
02580 ()+01*)
02590 (*+25()
02600 LOADMARGIN=8; (*ALLOW ROOM ABOVE FIELDLENGTH NEEDED BY LOADER*)
02610 ABSMARGIN=320; (*ADDITIONAL FL NEEDED BY ABSOLUTE LOAD OVER & ABOVE FL NEEDED BY RELOCATEABLE
02620 LOAD OF THE SAME PROGRAM. 500B IS NEEDED BECAUSE OF APPARENT BUG IN NOS1.4-531*)
02630 ()+25*)
02640 (*+05() LASTRNLEVEL=9; ()+05*)
02650 (**)
02660 (*SEMANTIC ROUTINES*)
02670 (*******************)
02680 (**)
02690 SRSTKSIZE=40; (*SIZE OF SEMANTIC STACK*)
02700 (*+01()
02710 SZWORD=1; SZADDR=1; SZINT=1; SZREAL=1; SZLONG=2; SZNAKED=1; SZDL=1; SZPROC=1; SZTERM=2;
02720 (*SIZES OF OBJECTS IN ADDRESSING UNITS*)
02730 SIZIBTOP=0; (*SHOULD PROBABLY BE ABOLISHED*)
02740 SIZIBBASE=10; (*SIZE OF INVBL BASE*)
02750 SIZLEBBASE=4; (*SIZE OF LOCAL ENVIRONMENT BASE*)
02760 PARAMOFFSET=0;
02770 LOOPOFFSET=0; (*OFFSET OF LOOPCOUNT WITHIN CURRENT RGBLOCK*)
02780 RGOFFSET=3; (*OFFSET OF RGLASTUSED WITHIN CURRENT RGBLOCK*)
02790 ()+01*)
02800 (*+03()
02810 SZWORD=1; SZADDR=1; SZINT=1; SZREAL=3; (*SZLONG*) SZNAKED=3; SZDL=2; SZPROC=1; SZTERM=8;
02820 (*SIZE OF OBJECTS IN ADDRESSING UNITS*)
02830 SIZIBTOP=0;
02840 SIZIBBASE=20;
02850 SIZLEBBASE=6;
02860 ()+03*)
02870 (*+02() (*+12() (*-19()
02880 SZWORD=2; SZADDR=2; SZINT=2; SZREAL=8; SZLONG=4; SZNAKED=4; SZDL=2; SZPROC=4; SZTERM=16;
02890 (*SIZE OF OBJECTS IN ADDRESSING UNITS*)
02900 SIZIBTOP=0;
02910 SIZIBBASE=999;
02920 SIZLEBBASE=888;
02930 ()-19*)
02931 (*+19()
02932 SZWORD=2; SZADDR=4; SZINT=2; SZREAL=8; SZLONG=4; SZNAKED=8; SZDL=2; SZPROC=8; SZTERM=16;
02933 SIZIBTOP=0;
02934 SIZIBBASE=12; (* SAME AS RUN TIME IBCONST *)
02935 SIZLEBBASE=20; (* SIZE OF A RANGEBLOCK, SAME AS RUN TIME RGCONST *)
02936 RGOFFSET=4; (* OFFSET TO RG(LASTUSED/NEXTFREE) FROM CURLEB *)
02937 LOOPOFFSET=20; (* OFFSET TO LOOPCOUNT FROM CURLEB *)
02938 PARAMOFFSET=14; (* AMOUNT TO ADD TO GET AT ACTUAL PARAMS, AFTER BITPATTERN *)
02939 ()+19*) ()+12*)
02940 (*+13()
02941 SZWORD=4; SZADDR=4; SZINT=4; SZREAL=8; SZLONG=4; SZNAKED=8; SZDL=4; SZPROC=8; SZTERM=16;
02942 SIZIBTOP=0;
02943 SIZIBBASE=20;
02944 SIZLEBBASE=24;
02945 RGOFFSET=4;
02946 LOOPOFFSET=24;
02947 PARAMOFFSET=16;
02948 ()+13*) ()+02*)
02949 (*+04()
02950 SZWORD=1; SZADDR=2; SZINT=2; SZREAL=4; SZLONG=2; SZNAKED=4; SZDL=3; SZPROC=1; SZTERM=8;
02960 (*SIZE OF OBJECTS IN ADDRESSING UNITS*)
02970 SIZIBTOP=0;
02980 SIZIBBASE=999;
02990 SIZLEBBASE=888;
03000 ()+04*)
03010 (*+05()
03020 SZWORD=2; SZADDR=2; SZINT=2; SZREAL=4; SZLONG=4; SZNAKED=4; SZDL=4; SZPROC=4; SZTERM=16;
03030 SIZIBTOP=0;
03040 SIZIBBASE=12;
03050 PARAMOFFSET=12;
03060 SIZLEBBASE=12;
03062 LOOPOFFSET=12;
03064 RGOFFSET=2;
03070 ()+05*)
03080 (*+76() DLACTION=4; DLUNITS=8; ()+76*) (*+74() DLVAREMPTY=1; DLSTRUCT=4; DLMULT=6; ()+74*)
03090 DLASCR=12; (* DLBNDS=10; DLDESC=11; *)
03100 (*STATES*)
03110 (*+74()
03120 XINT=0; XLINT=1; XREAL=2; XLREAL=3; XCOMPL=4; XLCOMPL=5;
03130 XCHAR=6; XSTRNG=7;
03140 XBOOL=8; XBITS=9; XBYTES=10;
03150 ()+74*)
03160 (**)
03170 (**)
03180 (*PARSING*)
03190 (*********)
03200 (**)
03210 SRPLSTKSIZE=80; (*SIZE OF PARSER STACK*)
03220 PRODLEN=407;
03230 (**)
03240 (**)
03250 TYPE (*TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE*)
03260 (**)
03270 (*MISCELLANEOUS*)
03280 (***************)
03290 (**)
03300 (*+01() A68INT=INTEGER; A68LONG = RECORD V1: INTEGER; V2: INTEGER END; ADDRINT=INTEGER; ()+01*)
03310 (*+02() (*+12()
03320 (*-19() A68INT=INTEGER; A68LONG=LONG; ADDRINT=INTEGER; ()-19*)
03325 (*+19() A68INT=INTEGER; A68LONG=LONG; ADDRINT=LONG; ()+19*) ()+12*)
03326 (*+13() A68INT=INTEGER; A68LONG=INTEGER; ADDRINT=INTEGER; ()+13*)
03330 ()+02*)
03340 (*+03() A68INT=INTEGER; A68LONG=REAL; ADDRINT=INTEGER; ()+03*)
03350 (*+04() A68INT=LONG; A68LONG=LONG; ADDRINT=LONG; ()+04*)
03360 (*+05() A68INT=INTEGER; A68LONG=REAL; ADDRINT=INTEGER; ()+05*)
03370 (*+01() DUMPOBJ=RECORD INT,MASK: INTEGER END; (*FOR A68INIT FILE*) ()+01*)
03380 (*+25() DUMPOBJ=RECORD INT,MASK: INTEGER END; (*FOR A68INIT FILE*) ()+25*)
03390 PINTEGER=^INTEGER;
03400 (*-03()
03410 LOADFILE=(*+01() SEGMENTED ()+01*) (*+25() SEGMENTED ()+25*)FILE OF ADDRINT;
03420 (*+01() FYL = SEGMENTED FILE OF CHAR; ()+01*)
03430 (*-01() FYL = (*+25() SEGMENTED FILE OF CHAR ()+25*) (*-25() TEXT ()-25*); ()-01*)
03440 ()-03*)
03450 (*+03()
03460 LOADFILE=BYTES;
03470 ()+03*)
03480 (**)
03490 SEVERAL=1..10;
03500 (*+11() BYTE=0..63; ()+11*)
03510 (*-11() BYTE=0..255; ()-11*)
03520 (**)
03530 (*LISTING*)
03540 (*********)
03550 (**)
03560 BUFFER=ARRAY[0..CBUFSIZE] OF CHAR;
03570 (*+01()
03580 W66=PACKED RECORD
03590 FILL1: PACKED ARRAY [1..4] OF CHAR;
03600 JOPR: 0..7777B;
03610 FILL2: PACKED ARRAY [1..4] OF CHAR;
03620 END;
03630 PW66=^W66;
03640 ()+01*)
03650 (*+05() ARGSTRING=PACKED ARRAY [1..50] OF CHAR;
03652 TIMSTRING=PACKED ARRAY [1..26] OF CHAR;
03654 ()+05*)
03660 (*MODE HANDLING*)
03670 (***************)
03680 (**)
03690 (*+11() LABL=-177777B..177777B; ()+11*)
03700 (*+12() LABL=-32767..32767; ()+12*)
03710 (*+13() LABL=-32767..32767; ()+13*)
03720 MDIDTYPE=(MDIDINT, MDIDLINT, MDIDREAL, MDIDLREAL, MDIDCHAR, MDIDBITS, MDIDBYTES, MDIDSTRNG,
03730 (*ALL THE ABOVE ARE WIDENABLE*)
03740 MDIDBOOL, MDIDCHAN, MDIDCOVER, MDIDVOID, MDIDSKIP, MDIDJUMP, MDIDNIL,
03750 MDIDOUT, MDIDIN, MDIDOUTB, MDIDINB, MDIDNUMBER, MDIDROWS,
03760 (*ALL THE ABOVE ARE UNITED*)
03770 MDIDBNDS,
03780 MDIDABSENT, MDIDERROR, MDIDPROC, MDIDREF, MDIDSTRUCT, MDIDROW, MDIDPASC);
03790 CNTR=0..63; (*POSSIBLE NUMBER OF FIELDS OR PARAMETERS*)
03800 MDM=PACKED RECORD
03810 MDID: MDIDTYPE;
03820 MDLEN: 0..127; (*THE LENGTH OCCUPIED BY THE MODE WHEN IT IS A FIELD OF A STRUCTURE
03830 - IE ITS UNDRESSED LENGTH*)
03840 MDDEPROC, MDRECUR, MDDRESSED, MDIO, MDPILE, MDSCOPE: BOOLEAN;
03850 MDCNT: CNTR;
03860 END;
03870 MODE=^MD;
03880 PLEX=^LEXEME;
03890 PSB=^SEMBLK;
03900 PSTB=^STBLOCK;
03910 (**)
03920 MD=PACKED RECORD (*MODE TABLE ENTRY*)
03930 CASE SEVERAL OF
03940 1:(MDLINK: MODE; (*CHAIN OF MODES OF SAME TYPE*)
03950 MDV: MDM;
03960 CASE SEVERAL OF
03970 1,2,3,6,7,8,9,10: ();
03980 4: (MDPRRMD: MODE; (*FOR RESULT, REFED TO, OR ROWED MODE*)
03990 (*+11() (*SHOULD FIT INTO ONE WORD UP TO HERE*) ()+11*)
04000 MDPRCPRMS: ARRAY[CNTR] OF MODE);
04010 5: (MDSTRSDB: LABL; (*PTR TO DBLOCK*)
04020 (*+11() (*SHOULD FIT INTO ONE WORD UP TO HERE*) ()+11*)
04030 MDSTRFLDS: ARRAY[CNTR] OF PACKED RECORD
04040 MDSTRFMD: MODE;
04050 MDSTRFLEX: PLEX;
04060 END) );
04070 2:(MDWORDS: ARRAY[1..1] OF INTEGER);
04080 (*FOR GETTING AT MDPRCPRMS AND MDSTRFLDS.
04090 IT IS INTENDED THAT ONLY SUFFICIENT WORDS FOR THE PARTICULAR
04100 MODE WILL BE ALLOCATED*)
04110 3,4,5,6,7,8,9,10: ()
04120 END;
04130 (**)
04140 STRTYP=(STRNONE, STREMPTY, STRSOFT, STRWEAK,STRMEEK,STRFIRM, STRSTRONG);
04150 (*COERCION STRENGTHS*)
04160 CODEPROC=(PROC, PASC); (*FOR PASCAL PROCEDURES OR OTHERWISE*)
04170 (**)
04180 (**)
04190 (*CODES FOR SEMANTIC ROUTINES*)
04200 (*****************************)
04210 (**)
04220 RTNTYPE = 0..245;
04230 (* SEMANTICROUTINES 10..120,
04240 ERRORTYPES
04250 ELX 121..129,
04260 ESY 130..172,
04270 ESE 173..245 *)
04280 (**)
04290 (**)
04300 (*LEXICAL ANALYSIS*)
04310 (******************)
04320 (**)
04330 (*-01() ALFA=PACKED ARRAY [1..10] OF CHAR;()-01*)
04331 BIGALFA = PACKED RECORD
04332 (*+01() CASE SEVERAL OF 1: ( ()+01*)
04335 ALF: ALFA; (*+01() ); 2: ( DUMMY: PACKED ARRAY[1..8] OF CHAR; ()+01*)
04336 IDSIZE:BYTE;
04337 XMODE:BYTE;
04338 (*+01() ) ; 3,4,5,6,7,8,9,10 : (); ()+01*)
04339 END;
04340 CL0TYPE=0..1; CL1TYPE=0..4; CL2TYPE=0..15;
04350 (*LEXEME CLASSES*)
04360 (*+73()
04370 LXIOTYPE=(LXIODUMMY,
04380 (*NONTERMINALS*)
04390 LXIOACTPL, LXIOACTRL,
04400 LXIOBOUNDS, LXIOBRINPT, LXIOBRTHPT,
04410 LXIOCSTICK,
04420 LXIODCLL,
04430 LXIOFLDSPL, LXIOFORDCL, LXIOFORRLB,
04440 LXIOIDEFL,
04450 LXIOLABSQ,
04460 LXIOMOIDDR,
04470 LXIONONRDR,
04480 LXIOODEFL, LXIOOPRAND,
04490 LXIOPRIM, LXIOPRMDRL,
04500 LXIORIDEFL, LXIORODEFL, LXIORSPEC, LXIORVDEFL,
04510 LXIOTERT, LXIOTRMSCL,
04520 LXIOUNLC, LXIOUNLP, LXIOUNSR,
04530 LXIOVDEFL,
04540 (*TERMINALS*)
04550 LXIOAGAIN, LXIOAT,
04560 LXIOBECOM, LXIOBEGIN, LXIOBOOLDEN, LXIOBY,
04570 LXIOCASE, LXIOCMMENT,
04580 LXIODO,
04590 LXIOELIF, LXIOELSE, LXIOEND, LXIOEQUAL, LXIOERROR, LXIOESAC, LXIOEXIT,
04600 LXIOFI, LXIOFOR, LXIOFROM,
04610 LXIOGO, LXIOGOTO,
04620 LXIOHEAP,
04630 LXIOIDTY, LXIOIF, LXIOIN,
04640 LXIOLOC,
04650 LXIOMODE,
04660 LXIONIL,
04670 LXIOOD, LXIOOF, LXIOOP, LXIOOPR, LXIOOUSE, LXIOOUT,
04680 LXIOPRAGMAT, LXIOPRDEN, LXIOPRIO,
04690 LXIOSEMIC, LXIOSKIP, LXIOSTART, LXIOSTOP, LXIOSTICK, LXIOSTRGDEN,
04700 LXIOTHEN, LXIOTO,
04710 LXIOWHILE,
04720 LXIOBUS, LXIOCLOSE, LXIOCOLON, LXIOCOMMA, LXIOLONG, LXIOMDIND, LXIOOPEN, LXIOOTHDR, LXIOPRDR,
04730 LXIOPROC, LXIOREF, LXIOSHORT, LXIOSTRUCT, LXIOSUB, LXIOTAB, LXIOTAG, LXIOVOID);
04740 (*THOSE IN THE LAST TWO LINES ARE SPECIALLY SEGREGATED FOR AR2*)
04750 ()+73*)
04760 (*-73() LXIOTYPE=0..127; ()-73*)
04770 LXM=PACKED RECORD (*SHOULD OCCUPY 1 WORD*)
04780 LXIO: LXIOTYPE; (*LEXEME VALUE*)
04790 LXCLASS0: CL0TYPE; LXCLASS1: CL1TYPE; LXCLASS2: CL2TYPE;
04800 CASE SEVERAL OF
04810 (*+11() 1:(LXP: 0..777777B); ()+11*)
04820 (*+12() 1:(LXP: 0..32767); ()+12*)
04830 (*+13() 1:(LXP: 0..32767); ()+13*)
04840 2:(LXPSTB: PSTB);
04850 3:(LXPSB: PSB);
04860 4:(LXPMD: MODE);
04870 5:(LXPYPTR: LABL);
04880 6:(LXPRTN: RTNTYPE); (*FOR PARSER GENERATOR ONLY*)
04890 7:(LXPIO: LXIOTYPE); (*FOR PARSER GENERATOR ONLY*)
04900 8,9,10:();
04910 END;
04920 (**)
04930 LEXEME=PACKED RECORD
04940 CASE SEVERAL OF
04950 1:(LXV: LXM; (*THE ONLY FIELD FOR SIMPLE LEXEMES*)
04960 LXTOKEN: (TKTAG, TKBOLD, TKDENOT, TKSYMBOL);
04970 (*MEANING OF STRING*)
04980 LXCOUNT: 0..TAXLENWD; (*WORDS IN STRING*)
04990 LINK: PLEX; (*HASH TABLE CHAINING*)
05000 CASE SEVERAL OF
05010 1:(WORD1: A68INT );
05020 2:( S10,S20: ALFA );
05030 4:(INTEGERS: ARRAY [1..TAXLENWD] OF A68INT);
05040 (*+11() 6:(FUDGE1, FUDGE2: 0..1073741823);
05050 7:(FUDGE: PACKED ARRAY [1..TAXLENWD2] OF 0..1073741823);
05060 (*HALF WORDS FOR HASHING*)
05070 ()+11*)
05080 (*-11() 6,7: (); ()-11*)
05090 8:(STRNG: PACKED ARRAY [1..TAXLEN] OF CHAR);
05100 (*AS SINGLE CHARS*)
05110 9:(LXDENMD: MODE; LXDENRP: A68INT);
05120 (*ANOTHER VIEW OF S1, FOR DENOTATIONS*)
05130 10:( INSTEADLXDENMD: MODE ; LXDENRPREAL: REAL) ;
05140 3,5:() );
05150 2:(LEXWORDS: ARRAY [1..1] OF A68INT); (*FOR COPYING WHOLE LEXEMES*)
05160 3,4,5,6,7,8,9,10:()
05170 END;
05180 HASHTAB=ARRAY [0..HTSIZE] OF PLEX;
05190 OPCHTABBOUND=0..46; (*BOUNDS OF OPCHTABLE*)
05200 (*+72() INDEXTYPE=(CONTROL, EOL, SPACE, ERRCH, DIGIT, POINT, QUOTE,
05210 PUNCT, PLSMIN, LETTER, STROP, EOFF, PRAG); ()+72*)
05220 (*-72() INDEXTYPE=0..12; ()-72*)
05230 TYPETYPE=SET OF (HEX, LOWC, UPC, DIG);
05240 (**)
05250 (**)
05260 (*CODE EMITTER*)
05270 (**************)
05280 (**)
05290 PMARKCHAIN=^MARKCHAIN;
05300 STATE=0..32; (*USED AS OPCOD OFFSETS*)
05310 (*+76()
05320 MARKCHAIN=PACKED RECORD
05330 MKXPTR: LABL;
05340 LINK: PMARKCHAIN
05350 END;
05360 ()+76*)
05370 (*-76() (*-02() MARKCHAIN = INTEGER; ()-02*)
05375 (*+02() MARKCHAIN = PACKED RECORD A:INTEGER;B:ADDRINT END; ()+02*) ()-76*)
05380 OLSTTYP=ARRAY[0..5] OF PACKED RECORD DP: BOOLEAN; OVAL: STATE END;
05390 POP=PNONE..PLAST;
05400 (**)
05410 (*+01()
05420 RELOCBASE=0..777B;
05430 CBUFPTRS=0..127;
05440 CODEBUF=RECORD
05450 BUFFER: ARRAY [CBUFPTRS] OF RECORD CASE SEVERAL OF
05460 1:(CODEWORD: INTEGER); 2:(ALFWORD: ALFA); 3,4,5,6,7,8,9,10:() END;
05470 FIRST, LAST: CBUFPTRS;
05480 RELOCATION: INTEGER;
05490 SEGLOC: LABL;
05500 FOUR: 1..5; FIFTEEN: 1..15;
05510 HEADERWORD: PACKED RECORD
05520 CASE INTEGER OF
05530 1: (TN, WC: 0..7777B;
05540 FILLER: 0..777B;
05550 R: RELOCBASE;
05560 S: 0..777777B);
05570 2: (WORD: INTEGER)
05580 END
05590 END;
05600 (**)
05610 PFILLCHAIN=^FILLCHAIN;
05620 FILLCHAIN=PACKED RECORD
05630 FSEGLOC: LABL;
05640 FFOUR: 1..4;
05650 COUNT: 0..31;
05660 LINK: PFILLCHAIN
05670 END;
05680 PFCHAIN=^FCHAIN;
05690 FCHAIN=PACKED RECORD
05700 FLAST: CBUFPTRS;
05710 FFOUR: 1..4; FFIFTEEN: 1..15;
05720 FSEGLOC, FLABL: LABL;
05730 LINK: PFCHAIN
05740 END;
05750 (**)
05760 SBTTYP=(SBTVOID,SBTID,SBTIDV,SBTLIT,SBTVAR,SBTDEN,SBTPROC,SBTRPROC,SBTSTK,(*+61()SBTSTK2,()+61*)SBTSTKN,SBTDL,
05770 (*+61() SBTX12, SBTX45, ()+61*)
05780 SBTX5,SBTX6,SBTX0,SBTX1,SBTXN);
05790 (*SBTSTKN IS AN ARBITRARY STACK ITEM; STBXN IS AN ARBITRARY REGISTER(?) ITEM*)
05800 (*SBTDL IS FOR DATA LISTS, WHICH ARE REALLY ON THE STACK BUT MAY START IN A REGISTER*)
05810 SUBSBTTYP=SBTX5..SBTX1;
05820 REGUSETYP=SET OF SUBSBTTYP;
05830 ()+01*)
05840 (*+02()
05850 SBTTYP=(SBTVOID,SBTID,SBTIDV,SBTVAR,SBTLIT,SBTDEN,SBTPROC,SBTRPROC,SBTSTK,SBTSTK2,SBTSTK2A,SBTSTK4,SBTSTKN,SBTDL,
05860 SBTPR1,SBTPR2,SBTPRR,SBTXN);
05870 ()+02*)
05880 (*+03()
05890 SBTTYP=(SBTVOID,SBTID,SBTIDV,SBTVAR,SBTLIT,SBTDEN,SBTPROC,SBTRPROC,SBTSTK,SBTSTKN,SBTDL,SBTX0,SBTX1,SBTXN);
05900 SUBSBTTYP=SBTX0..SBTX1;
05910 REGUSETYP=SET OF SUBSBTTYP;
05920 ()+03*)
05930 (*+04()
05940 SBTTYP=(SBTVOID,SBTID,SBTIDV,SBTVAR,SBTLIT,SBTDEN,SBTPROC,SBTRPROC,SBTSTK,SBTSTKN,SBTDL,SBTXN);
05950 ()+04*)
05960 (*+05()
05970 SBTTYP=(SBTVOID,SBTID,SBTIDV,SBTVAR,SBTLIT,SBTDEN,SBTPROC,SBTRPROC,SBTSTK,SBTSTK4,SBTSTKR0,SBTSTKN,SBTDL,
05980 SBTPR1,SBTPR2,SBTE,SBTER0,SBTFPR0,SBTFPR1,SBTFPR2,SBTFPR3,SBTXN);
05990 SUBSBTTYP=SBTE..SBTFPR3;
06000 REGUSETYP=PACKED RECORD
06010 ECOUNT: 0..8;
06020 EEXTRA: 0..8;
06030 FPR: SET OF SUBSBTTYP
06040 END;
06050 ()+05*)
06060 (*-23()
06070 (*+01()
06080 CODETYP=PACKED RECORD
06090 P1, P2, PR : SBTTYP;
06100 CASE INLINE: BOOLEAN OF
06110 TRUE: (
06120 LEN: (F0, F15, F30, F30K);
06130 FMIJK: 0..7777777777B;
06140 REL: -177777B..177777B; (*FOR RELATIVE JUMPS*)
06150 NEXT: POP);
06160 FALSE: (
06170 ROUTINE: PACKED ARRAY [1..RTNLENGTH] OF CHAR;
06180 LINKINS: PFILLCHAIN)
06190 END;
06200 ()+01*)
06210 (*+02()
06220 (*+24() COMPACT = 0..161; ()+24*)
06230 (*-24() COMPACT = PACKED ARRAY [1..3] OF CHAR; ()-24*)
06240 (*+78()PARAMTYPES = (OPX,ONX,OPL,ONL,LCX,GBX,WOP,WNP,WLB,NON,JMP,MOR,ACP,ANP,ACB,ACX,ANX,ACL,ANL);
06250 CODETYP = PACKED RECORD
06260 P1,P2,PR:SBTTYP;
06270 CASE INLINE:BOOLEAN OF
06280 TRUE : (EMCOD : COMPACT;
06290 PARTYP:PARAMTYPES;
06300 NEXT : POP;
06310 PARM : -32767..32767 );
06320 FALSE: (ROUTINE : PACKED ARRAY [1..RTNLENGTH] OF CHAR);
06330 END; ()+78*)
06340 (*-78() (*-24() CODETYP=PACKED ARRAY [1..14] OF CHAR ; ()-24*)
06342 (*+24() CODETYP=PACKED ARRAY [1..12] OF CHAR ; ()+24*) ()-78*)
06350 ()+02*)
06360 (*+03()
06370 ROUTNAME=PACKED ARRAY [1..RTNLENGTH] OF CHAR;
06380 CODETYP=PACKED RECORD
06390 P1, P2, PR: SBTTYP;
06400 CASE INLINE: BOOLEAN OF
06410 TRUE:(NEXT: POP;
06420 CASE SEVERAL OF
06430 1: (FUN:INTEGER);
06440 2: (FDISP: 0..127;
06450 FSIGN: 0..1;
06460 FMODE: 0..7;
06470 FCODE: 0..31);
06480 3: (FILL1: 0..63;
06490 FBITS: 0..3;
06500 FILL2: 0..255);
06510 4,5,6,7,8,9,10: ());
06520 FALSE:(ROUTINE: ROUTNAME)
06530 END;
06540 ()+03*)
06550 (*+05()
06560 (*-24() MNEMONICS = PACKED ARRAY[1..8] OF CHAR; ()-24*)
06570 (*+78() PARAMTYPES = (OPX,ONX,LCX,GBX,WOP,WNP,NON,JMP,MOR,ANP,ACP,ACX,ANX);
06580 CODETYP = PACKED RECORD
06590 P1,P2,PR:SBTTYP;
06600 CASE INLINE:BOOLEAN OF
06610 TRUE : (PERQCOD : MNEMONICS;
06620 PARTYP:PARAMTYPES;
06630 PARM : BYTE;
06640 NEXT : POP; );
06650 FALSE: (ROUTINE : PACKED ARRAY [1..RTNLENGTH] OF CHAR);
06660 END; ()+78*)
06670 (*-78() CODETYP = ARRAY[1..4] OF INTEGER; ()-78*)
06680 ()+05*)
06690 ()-23*)
06700 (*+23()
06710 CODETYP=PACKED RECORD
06720 ROUTINE:ALFA;
06730 PR:SBTTYP
06740 END;
06750 ()+23*)
06760 SBTTYPSET=SET OF SBTTYP;
06770 (**)
06780 (**)
06790 (*CODE GENERATOR*)
06800 (****************)
06810 (**)
06820 (**)
06830 OPDTYP=(OCVNONE, OCVIMMED, OCVIMMLONG, OCVIMMPTR, OCVLCLGBL,
06835 OCVMEM, OCVEXT, OCVFREF, OCVLIT, OCVFIM, OCVRES, OCVSB, OCVSBP, OCVSBS);
06840 (**)
06850 (**)
06860 (*SEMANTIC ROUTINES*)
06870 (*******************)
06880 (**)
06890 (*+11()
06900 DEPTHR=0..4095; (*DEPTH TO WHICH RANGES ETC. ARE NESTED*)
06910 OFFSETR=-4095..4096; (*FOR OFFSETS WITHIN INVOCATION BLOCKS*)
06920 ()+11*)
06930 (*+12()
06940 (*-02()
06950 DEPTHR=0..127;
06960 OFFSETR=-256..255;
06970 ()-02*)
06980 (*+02()
06990 DEPTHR=0..255;
07000 OFFSETR=INTEGER;
07010 ()+02*)
07020 ()+12*)
07030 (*+13()
07040 DEPTHR=0..255;
07050 OFFSETR=-256..250;
07060 ()+13*)
07070 (*-61() STDOPTYP=0..70; ()-61*) (*FOR OPTABL*)
07080 (*+61() STDOPTYP=0..76; ()+61*)
07090 DEFTYP= (*PROPERTIES OF STBLOCK*)
07100 SET OF (STINIT, STVAR, STCONST, STRCONST, STRECUR, STUSED (*+05(),DUM6,DUM7,DUM8()+05*) );
07110 BLKTYP= (*TYPES OF STBLOCK*)
07120 (STBDEFID, STBDEFLAB, STBDEFMI, STBDEFPRIO, STBDEFOP,
07130 STBNONE,
07140 STBAPPID, STBAPPLAB, STBAPPMI, STBAPPOP);
07150 (**)
07160 PROUTN=^ROUTN;
07170 ROUTN=(*-04()PACKED()-04*) RECORD (*PROPERTIES OF CURRENT ROUTINE*)
07180 RNLINK: PROUTN; (*TO PREVIOUS ROUTN*)
07190 RNLOCRG, (*CURRENT DEPTH OF LOCAL RANGES WITHIN THIS ROUTINE*)
07200 RNLEVEL: DEPTHR; (*DEPTH OF THIS ROUTINE*)
07210 RNNECLOCRG: DEPTHR; (*LOCAL RANGE DEPTH WITHIN RNNECLEV OF NECESSARY ENVIRON*)
07220 RNNECLEV: DEPTHR; (*ROUTINE DEPTH OF NECESSARY ENVIRON*)
07230 RNSTKDEPTH: OFFSETR;
07240 RNRTSTACK: PSB; (*RTSTACK ON ROUTINE ENTRY*)
07250 RNCURID: OFFSETR; (*FOR PREVIOUS ROUTN*)
07260 RNNONIC: DEPTHR; (*NO. OF ROUTNCHAINS REFERRING TO THIS ROUTN*)
07270 RNLENSTK: OFFSETR; (*MAXIMUM STACK DEPTH*)
07280 RNLENIDS: OFFSETR; (*MAXIMUM SPACE FOR LOCALS*)
07290 RNMODE: MODE; (*RESULT MODE*)
07300 RNPARAMS: OFFSETR; (*SPACE OCCUPIED BY PARAMETERS*)
07302 RNIDBLK: LABL; (*IDBLOCK FOR PARAMETERS RANGE*)
07304 RNLEX: PLEX; (*IDENTIFIER OF ROUTINE (NIL IF ANONYMOUS)*)
07310 RNADDRESS: LABL; (*ENTRY POINT*)
07320 RNPROCBLK: LABL; (*ADDRESS OF PROCBLOCK*)
07330 (*-02()(*-04() RNREGSINUSE: REGUSETYP (*RESERVE STATE OF REGS BEFORE ROUTINE-TEXT*) ()-04*)()-02*)
07340 END;
07350 (**)
07360 PROUTNCHAIN=^ROUTNCHAIN;
07370 ROUTNCHAIN=PACKED(*PACKED*) RECORD (*CHAIN OF ROUTNS STARTING FROM STROUTN OF AN STBLOCK*)
07380 DATA: PROUTN;
07390 LINK: PROUTNCHAIN
07400 END;
07410 (**)
07420 STBLOCK=(*-04()PACKED()-04*) RECORD (*SYMBOL TABLE BLOCK*)
07430 STLINK: PSTB; (*TO PREVIOUS INCARNATION OF INDICATOR*)
07440 STTHREAD: PSTB; (*CHAIN OF STBLOCKS IN SAME RANGE*)
07450 STLEX: PLEX; (*LEXEME FOR INDICATOR*)
07460 STDEFTYP: DEFTYP;
07470 STRANGE: DEPTHR; (*DEPTH OF RANGE*)
07480 STLEVEL: DEPTHR; (*DEPTH OF ROUTINE CONTAINING RANGE*)
07490 STLOCRG: DEPTHR; (*DEPTH OF LOCAL RANGE WITHIN ROUTINE*)
07500 CASE STBLKTYP: BLKTYP OF
07510 STBNONE: ();
07520 STBDEFID, STBDEFMI, STBDEFOP:
07530 (STMODE: MODE;
07540 CASE SEVERAL OF
07550 1:(STPTR:LABL);
07560 2:(STOFFSET: OFFSETR); (*OFFSET WITHIN INVBL*)
07570 3:(STVALUE: PLEX); (*FOR CODE PROCS*)
07580 4,5,6,7,8,9,10:() );
07590 STBAPPID, STBAPPMI, STBAPPOP:
07600 (STDEFPTR: PSTB); (*PTR TO DEFINING OCCURRENCE*)
07610 STBDEFLAB, STBAPPLAB:
07620 (STROUTN: PROUTNCHAIN;
07630 STCURID: OFFSETR; (*FOR PREVENTING JUMPS OVER DECLARATIONS*)
07640 STXPTR: PACKED ARRAY[0..1]OF LABL); (*0 FOR LABEL, 1 FOR JUMPS OUT OF ROUTINES TO IT*)
07650 STBDEFPRIO:
07660 (STDYPRIO: 1..11; (*PRIORITY - 10 IS FOR MONADICS, 11 FOR UNDECLARED OPS*)
07670 STUSERLEX: PLEX;
07680 STSTDOP: STDOPTYP ) (*POINTER INTO OPTABL, FOR STD OPERATORS*)
07690 END;
07700 (**)
07710 DCLTYP= (*ATTRIBUTES OF RANGES*)
07720 (DCLCOLL, DCLLOCRNG, DCLPARM, DCLLABEL, DCLPILEDECS,
07730 DCLLOCGEN, DCLLOOP, DCLDELAY, DCLSAVEDESC, DCLACTDR, DCLPILE, DCLMODEDEF);
07740 (**)
07750 PRANGE=^RANGE;
07760 RANGE=(*-04()PACKED()-04*) RECORD (*PRESERVES PROPERTIES OF PREVIOUS RANGE*)
07770 RGLINK: PRANGE; (*TO PREVIOUS RANGE*)
07780 RGINF: SET OF DCLTYP;
07790 RGSTAT: STATE;
07800 RGDCIL: PSTB; (*THREAD OF PREVIOUS RANGE*)
07810 RGLEB: OFFSETR; (*LOCAL ENVIRONMENT BASE OF PREVIOUS LOCAL RANGE*)
07820 RGDEFN: DEFTYP; (*FROM PREVIOUS LOCAL RANGE*)
07830 RGMODE, RGPRVMODE: MODE;(*DITTO*)
07840 RGTODOCOUNT, RGPSCOUNT: DEPTHR; (*DITTO*)
07850 RGPSLABL: LABL; (*DITTO*)
07860 RGRTSTACK: PSB; (*RTSTACK ON RANGE ENTRY*)
07870 RGIDBLK: LABL;
07880 END;
07890 (**)
07900 PTRIMCHAIN=^TRIMCHAIN;
07910 TRIMCHAIN=PACKED(*PACKED*) RECORD
07920 TRTYPE: 0..9;
07930 LINK: PTRIMCHAIN
07940 END;
07950 SEMBLK=PACKED(*PACKED*) RECORD (*SEMANTIC BLOCK*)
07960 SBTYP: SBTTYP;
07970 SBLEN: DEPTHR; (*TO ACCOMODATE A REASONABLE DATA-LIST*)
07980 SBMODE: MODE;
07990 SBINF: SET OF (SBMORF, SBVOIDWARN, SBEMPTYBY, SBEMPTYTO, SBLEFTCOLL, SBPILEDECS,
08000 SBWEAKREF, SBNOREF, SBSTKDELAY, SBNAKED, SBNAKROW, SBCOLL, SBUNION, SBSLN, SBLOCGEN);
08010 SBDELAYS: DEPTHR;
08020 SBRTSTK: PSB;
08030 CASE SEVERAL OF
08040 1:(SBXPTR: LABL;
08050 SBCNT: CNTR; (*TO COUNT ACTUAL-PARAMETERS OF PROC*)
08060 CASE SEVERAL OF
08070 1:(SBLEX: PLEX);
08080 2:(SBVALUE: (*+01()LABL()+01*) (*+02()LONG()+02*)
08082 (*-01()(*-02()A68INT()-02*)()-01*));
08090 3:(SBOFFSET: OFFSETR;
08100 SBLOCRG: DEPTHR;
08110 SBLEVEL: DEPTHR);
08120 4:(SBBALSTR: STRTYP);
08130 5,6,7,8,9,10:() );
08140 2: (SBTRIMS: PTRIMCHAIN;
08150 SBTRIMCNT,
08160 SBSLICEDIM: -63..63;
08170 SBPRIMDIM: 0..63;
08180 SBUNITS: 0..189);
08190 3,4,5,6,7,8,9,10:()
08200 END;
08210 (**)
08220 PMODECHAIN=^MODECHAIN;
08230 MODECHAIN=PACKED(*PACKED*) RECORD (*CHAIN OF MODES STARTING AT SCL*)
08240 SCMODE: MODE;
08250 LINK: PMODECHAIN
08260 END;
08270 (**)
08280 XTYPE=-1..14;
08290 (*+74()
08300 OPIDNDXTYP=
08310 (IDIBRM,IDMON,IDMONL, (*MONADIC OPERATORS*)
08320 IDAA, (*BOTH OPERANDS IN SAME GROUP (EG ARITHMETIC*)
08330 IDAAL, (*AS IDAA, BUT RESULTMODE MAY BE LENGTHENED*)
08340 IDBB, (*BOTH OPERANDS TO BE THE SAME*)
08350 IDBI,IDIB,(*ONE OPERAND IS .INT*)
08360 IDIBR, (*.UPB AND .LWB*)
08370 IDSI, (* *:= ON STRINGS*)
08380 IDSC,IDCS,(* +:= AND +=: ON STRINGS*)
08390 IDRA (*ASSIGNING OPERATORS*) );
08400 OPIDBLK=PACKED RECORD
08410 OPIDNDX: OPIDNDXTYP;
08420 OPMORE: BOOLEAN; (*IF THERE ARE MORE DEFINITIONS OF THE SAME OPERATOR*)
08430 OPOPCOD: POP;
08440 OPMIN,OPMAX: XTYPE; (*RANGE OF ACCEPTABLE MODES*)
08450 OPMODE: MODE; (*RESULT MODE (MDABSENT IMPLIES RESULT MODE DEDUCED FROM OPERANDS)*)
08460 END;
08470 ()+74*)
08480 (*-74() (*+02() (*+12() (*-19() OPIDBLK=RECORD A,B:REAL (* FOUR WORDS *) END; ()-19*)
08485 (*+19() OPIDBLK=PACKED RECORD A,B,C,D,E:INTEGER (*5 WORDS?*) END; ()+19*) ()+12*)
08486 (*+13() OPIDBLK=PACKED RECORD A,B,C:INTEGER; (*THREE WORDS*) END; ()+13*) ()+02*)
08490 (*+05() OPIDBLK=RECORD A,B,C: INTEGER (*THREE WORDS*) END; ()+05*) ()-74*)
08500 (**)
08510 (**)
08520 (*RUNTIME OBJECTS*)
08530 (*****************)
08540 (**)
08550 BITMAP = PACKED RECORD CASE SEVERAL OF
08560 1: (
08570 (*+11()
08580 FILL: 0..77777777777777B;
08590 MASK: 0..37777B;
08600 COUNT: 0..15; );
08610 ()+11*)
08620 (*+12()
08630 (*+03() MASK: 0..7777B; (*DIFFICULTIES ON NORD*)
08640 COUNT: 0..15; ); ()+03*)
08641 (*+02() MASK :INTEGER;
08642 COUNT :INTEGER; ); ()+02*)
08643 (*-03() (*-02() MASK: -127..127;
08644 COUNT: 0..255; ); ()-02*) ()-03*)
08650 ()+12*)
08660 (*+13() MASK: -32768..32767;
08670 COUNT: -32768..32767; );
08680 ()+13*)
08690 2: (INT: (*-02()A68INT()-02*)(*+02()LONG()+02*); );
08700 3,4,5,6,7,8,9,10: ()
08710 END;
08720 (**)
08730 (*+77()
08731 (*+13() CCOUNTRANGE=0..32767; ()+13*)
08740 OBJECTP=^OBJECT;
08750 OBJECT=PACKED RECORD
08760 CASE SEVERAL OF
08770 1:(FIRSTWORD: INTEGER);
08780 (*+11()
08790 2:(PCOUNT: -1..4095;
08800 SORT: 0..31;
08820 OSCOPE: DEPTHR;
08830 LENGTH: 0..4095;
08832 FILLER: 0..1;
08835 DBLOCK: OBJECTP);
08840 ()+11*)
08850 (*+12()
08860 2:(PCOUNT: 0..2047;
08870 SORT: 0..31;
08880 OSCOPE: DEPTHR;
08890 LENGTH: 0..511;
08900 DBLOCK: OBJECTP);
08910 ()+12*)
08920 (*+13()
08930 2:(PCOUNT: 0..32767;
08940 SORT: 0..31;
08950 OSCOPE: DEPTHR;
08960 DBLOCK: OBJECTP
08961 ANCESTOR: OBJECTP;
08962 IHEAD: OBJECTP;
08963 DUMMY: CCOUNTRANGE;
08964 LENGTH: CCOUNTRANGE);
08990 ()+13*)
09000 3,4,5,6,7,8,9,10: ()
09010 END;
09020 (**)
09030 ()+77*)
09040 (**)
09050 (*PARSING*)
09060 (*********)
09070 (*+72()
09080 CONFIG=(S, C0, C1, C2, A, SSA);
09090 (*METHODS OF MATCHING LXVS.
09100 SSA IS A SPECIAL FRIG FOR MATCHING TWO STACK ITEMS*)
09110 SYLXVTYP = PACKED RECORD
09120 CASE BOOLEAN OF
09130 TRUE: (CASE SEVERAL OF
09140 1: (LX1IO: LXIOTYPE);
09150 2: (LX1CL0: CL0TYPE);
09160 3: (LX1CL1: CL1TYPE);
09170 4: (LX1CL2: CL2TYPE);
09180 5,6,7,8,9,10: () );
09190 FALSE:(FILLER: 0..127;
09200 CASE SEVERAL OF
09210 1: (LX2IO: LXIOTYPE);
09220 2: (LX2CL0: CL0TYPE);
09230 3: (LX2CL1: CL1TYPE);
09240 4: (LX2CL2: CL2TYPE);
09250 5,6,7,8,9,10: () )
09260 END;
09270 PROD= PACKED RECORD
09280 PRSTKA: 0..3;
09290 PRSTKC: S..C2;
09300 PRINPC: CONFIG;
09310 RTN: RTNTYPE;
09320 SYLXV: SYLXVTYP;
09330 SEXIT: 0..PRODLEN;
09340 PRPUSH: LXIODUMMY..LXIOVDEFL; (*A SUBRANGE OF LXIOTYPE*)
09350 PRSKIP: BOOLEAN;
09360 FEXIT: 0..PRODLEN;
09370 PRPOP: 0..5;
09380 PRSCAN: 0..2;
09390 END;
09400 PLEXQ=^LEXQ;
09410 LEXQ=PACKED RECORD (*CHAIN OF LEXEMES STARTING AT PLINPQ*)
09420 DATA1: PLEX;
09430 LINK: PLEXQ
09440 END;
09450 ()+72*)
09460 (**)
09470 (*-72() (*+02() (*+12() PROD=RECORD A,B,C,D,E,F,G: INTEGER (*SEVEN WORDS*) END; ()+12*)
09471 (*+13() PROD=RECORD A,B,C,D:INTEGER (*FOUR WORDS*) END; ()+13*) ()+02*)
09480 (*+05() PROD=RECORD A,B,C,D: INTEGER (*FOUR WORDS*) END; ()+05*) ()-72*)
09490 (*-72() PLEXQ=^INTEGER; ()-72*)
09500 (**)
09510 (*ERROR HANDLING*)
09520 (****************)
09530 (**)
09540 ERRLEV=(ERRORR, WARNING);
09550 (**)
09560 (**)
09570 (*+01() MESS=PACKED ARRAY [1..50] OF CHAR; (*FOR PASCPMD*) ()+01*)
09580 (*+02() MESS=PACKED ARRAY [1..50] OF CHAR; (*FOR PASCPMD*) ()+02*)
09590 VAR (*VAR VAR VAR VAR VAR VAR VAR VAR VAR VAR VAR VAR VAR VAR VAR VAR VAR VAR VAR VAR VAR VAR VAR VAR VAR VAR VAR*)
09600 (**)
09610 (*FILES*)
09620 (*******)
09630 (**)
09640 (*+01() (*THE FILES MUST BE THE FIRST THINGS DECLARED ON THE STACK,FOR THE BENEFIT OF DUMP*) ()+01*)
09650 SOURCDECS: TEXT;
09660 LSTFILE: FYL; (*FILE FOR PROGRAM LISTING, IF ANY*)
09670 LGO: (*-05() (*-02()LOADFILE; ()-02*) ()-05*)
09680 (*+02() (*+24() FILE OF BYTE; ()+24*)
09681 (*-24() TEXT; ()-24*) ()+02*)
09690 (*+05() ARRAY[0..LASTRNLEVEL] OF TEXT; ()+05*)
09700 (*+01()
09710 (*REMARKS: TEXT;*) (*FILE FOR TEMPORARY MONITORING*)
09720 A68INIT: LOADFILE; (*FOR INITIALIZATION*)
09730 ()+01*)
09740 (*+02() A68INIT:LOADFILE ;
09745 DUMPF : LOADFILE ; ()+02*)
09750 (*+03()
09760 OUTPUT: TEXT;
09770 CPUCLK: INTEGER;
09780 ()+03*)
09790 (*+04() OUTPUT: TEXT; ()+04*)
09800 (*+05() A68INIT: LOADFILE; ()+05*)
09810 (**)
09820 (**)
09830 (*+01()
09840 CPUCLK: INTEGER;
09850 (*+22()
09860 PARSCLK, LXCLOCK, SEMCLK, EMITCLK: INTEGER;
09870 CPUCLKS, PARSCLKS, LXCLOCKS, SEMCLKS, EMITCLKS: INTEGER;
09880 ()+22*)
09890 DUMPED, HEAPSTART, FIELDLENGTH: INTEGER; (*USED BY INITINIT AND RESTORE*)
09900 FIRSTSTACK: INTEGER; (*TO MARK THE START OF THE DUMPABLE STACK*)
09910 (**)
09920 (**)
09930 ()+01*)
09940 (*+25()
09950 DUMPED, HEAPSTART, FIELDLENGTH: INTEGER; (*USED BY INITINIT AND RESTORE*)
09960 FIRSTSTACK: INTEGER; (*TO MARK THE START OF THE DUMPABLE STACK*)
09970 ()+25*)
09980 (*+02() (*-25() FIRSTSTACK:INTEGER; ()-25*) ()+02*)
09990 (*+05() (*-25() FIRSTSTACK:INTEGER; ()-25*) ()+05*)
10000 (*LISTING*)
10010 (*********)
10020 (**)
10030 LSTLINE, LEXLINE, PREVLINE: INTEGER; (*SOURCE LINE NUMBER*)
10040 SRCBUF, ERRBUF: BUFFER;
10050 (*BUFFERS FOR SOURCE LINE AND ERROR MARKER LINE*)
10060 SRCPTR, ERRPTR: -1..CBUFSIZE;
10070 (*POINTERS INTO SRCBUF AND ERRBUF*)
10080 ONLINE: BOOLEAN;
10090 LSTCNT: 0..101; (*LISTING LINE NUMBER*)
10100 LSTPAGE: INTEGER; (*LISTING PAGE NUMBER*)
10110 (*+01() DAT, TIM: ALFA; (*DATE AND TIME*) ()+01*)
10112 (*+03() DAT, TIM: ALFA; (*DATE AND TIME*) ()+03*)
10114 (*+05() TIM: TIMSTRING; (*DATE AND TIME*) ()+05*)
10120 (*+23() NUMPARAMS:0..5; ()+23*)
10130 (**)
10140 (**)
10150 (*MODE HANDLING*)
10160 (***************)
10170 (**)
10180 REFL, ROWL, PROCL, PASCL, STRUCTL: MODE;
10190 (*START OF CHAINS OF MODES OF EACH TYPE*)
10200 MDVREF, MDVROW, MDVPROC, MDVPASC, MDVSTRUCT: MDM;
10210 (*FOR OTHER MDVS SEE INITIALIZE*)
10220 MDINT, MDLINT, MDBITS, MDBYTES, MDREAL, MDLREAL, MDBOOL, MDCHAN, MDCHAR,
10230 MDSTRNG, MDFILE, MDVOID, MDSKIP, MDJUMP, MDNIL, MDCOMPL, MDLCOMPL, MDCOVER,
10240 MDOUT, MDIN, MDOUTB, MDINB, MDNUMBER, MDROUT, MDROWS, MDBNDS, MDABSENT ,MDERROR, MDREFERROR: MODE;
10250 (*+54() MDEXC: MODE; ()+54*)
10260 MODEID: ARRAY[MDIDTYPE] OF -1..14;
10270 PRCBNDS, PRCVF, PASCVF, PRCERROR: MODE;
10280 (*PROC RETURNING BOUNDS, PROC(REF FILE) VOID, CODE(REF FILE) VOID, PROC MDERROR*)
10290 LASTPREF, LASTPROC: MODE;
10300 LHMODE, RHMODE, LHFIRM, RHFIRM: MODE; (*USED IN OPERATOR IDENTIFICATION*)
10310 REFSTRNG, ROWBOOL, ROWCHAR, ROWIN, ROWINB: MODE;
10320 COERCLEN: INTEGER;
10330 BALSTR, M1COERC, M2COERC: STRTYP; (*USED IN BALANCING*)
10340 (**)
10350 (**)
10360 (*LEXICAL ANALYSIS*)
10370 (******************)
10380 (**)
10390 PRAGFLGS: SET OF (PRGPOINT, PRGUPPER, PRGLIST, PRGWARN,
10400 PRGMACH, PRGGO, LINENUMBERS);
10410 (*FLAGS SET BY PRAGMATS*)
10420 CHA: CHAR; (*CURRENT INPUT CHARACTER*)
10430 INDEX: INDEXTYPE; (*INDEX TYPE OF CHA*)
10440 TYP, TTYPE: TYPETYPE; (*TYPE TYPE OF CHA*)
10450 CHAC: LOWC..UPC; (*UPPER/LOWER CASE INDICATOR*)
10460 SRCSTCH: CHAR; (*INDICATES WHETHER IN MIDDLE OF
10470 PRAGMENT, STRING-DENOTATION, ETC*)
10480 SRCSTAT: CHAR; (*VALUE OF SRCSTCH AT START OF LINE*)
10490 HT: HASHTAB;
10500 (*HASH TABLE*)
10510 CURRENTLEX: LEXEME;
10520 INPRAGMENT: BOOLEAN;
10530 OPCHTABLE: ARRAY [OPCHTABBOUND] OF PACKED RECORD
10540 OTCHAR: CHAR; OTNEXT, OTALT: OPCHTABBOUND; OTLEX: PLEX END;
10550 (*TBALE USED BY GETOPR IN LX*)
10560 LONGSCNT: INTEGER; (*NO OF SUCCESIVE LONGS OR SHORTS*)
10570 LEXTRUE, LEXFALSE: PLEX;
10580 LEXBEGIN, LEXOPEN, LEXIF, LEXCASE, LEXWHILE, LEXBRTHPT: PLEX;
10590 LEXERROR, LEXSTART, LEXLSTOP, LEXSTOP: PLEX;
10600 (*GLOBAL LEXEMES. FOR OTHER LEXEMES SEE INITIALIZE*)
10610 LEXALEPH, LEXONE: PLEX;
10620 LXVTAG, LXVTAB, LXVOPR, LXVMDIND, LXVPRDEN, LXVSTRGDEN: LXM;
10630 (*GLOBAL LXVS. FOR OTHER LXVS SEE INITIALIZE*)
10640 PUSHTBL: ARRAY [LXIODUMMY..LXIOVDEFL] OF PLEX;
10650 (*TABLE OF LEXEMES STACKABLE BY PARSER*)
10660 (**)
10670 (**)
10680 (*ERROR HANDLING*)
10690 (****************)
10700 (**)
10710 ERRS, SEMERRS, WARNS: INTEGER; (*NUMBER OF ERRORS, ETC DETECTED*)
10720 ERRCHAR: CHAR; (*CHAR TO BE WRITTEN TO ERRBUF,
10730 USUALLY BLANK*)
10740 ERRNONBLANK: BOOLEAN; (*TRUE IF ERRBUF CONTAINS ANY
10750 NON-BLANKS*)
10760 ERRDEV: BOOLEAN; (*TRUE IF LINE TO BE OUTPUT TO ERROR
10770 DEVICE*)
10780 ERRLXPTR: 0..CBUFSIZE; (* ??? *)
10790 (**)
10800 (**)
10810 (*CODE EMITTER*)
10820 (**************)
10830 (**)
10860 OPRAND: ADDRINT;
10870 OCV: OPDTYP;
10872 LCLGBL: INTEGER;
10874 (*+01()
10876 XSEG: CODEBUF;
10880 TPFCHAIN: PFCHAIN;
10890 TPFILLCHAIN: PFILLCHAIN;
10900 ()+01*)
10910 MARKPTR: PMARKCHAIN;
10920 NEXTLABEL: LABL;
10930 GENDPOCV: OPDTYP; GENDPVAL: INTEGER; (*GLOBAL OUTPUTS OF GENDP*)
10940 NEEDDP: BOOLEAN;
10950 OLIST1, OLIST2, OLIST3, OLIST4, OLIST5, OLIST6: OLSTTYP;
10960 CODETABLE: ARRAY[POP] OF CODETYP;
10970 LENARRAY : ARRAY [SBTTYP] OF 0..MAXSIZE;
10980 (*WORDS: 0..777777B;*) (*STACK/HEAP SPACE FOR OBJECT PROGRAM*)
10990 (*+01()
11000 REGSINUSE : SET OF SUBSBTTYP;
11010 REGISTERS:ARRAY [SBTTYP] OF SET OF SUBSBTTYP;
11020 POPARRAY : ARRAY [SBTSTK..SBTX1,SBTVOID..SBTX1] OF POP;
11030 ()+01*)
11040 NEXTREG : INTEGER;
11050 ADJUSTSP: INTEGER;
11060 (*+02()
11070 POPARRAY : ARRAY [SBTSTK..SBTDL,SBTVOID..SBTPRR] OF POP;
11080 NUMBYTES : 0..31;
11110 DATASTATE: (STARTDATA,INDATA,ENDDATA,OUTDATA);
11111 HOLTOP,HOLBOTTOM: LABL;
11120 ()+02*)
11130 (*+03()
11140 REGSINUSE: SET OF SUBSBTTYP;
11150 REGISTERS: ARRAY [SBTTYP] OF SET OF SUBSBTTYP;
11160 ()+03*)
11170 (*+05()
11180 POPARRAY : ARRAY [SBTSTK..SBTFPR3,SBTVOID..SBTFPR3] OF POP;
11190 APARAMS: INTEGER;
11220 DATASTATE : (STARTDATA,INDATA,ENDDATA,OUTDATA);
11230 REGSINUSE: REGUSETYP;
11240 ()+05*)
11250 (**)
11260 (**)
11270 (*CODE GENERATOR*)
11280 (****************)
11290 (**)
11300 RTSTACK: PSB;
11310 RTSTKDEPTH: DEPTHR;
11320 (**)
11330 (*SEMANTIC ROUTINES*)
11340 (*******************)
11350 (**)
11360 SRSTK: ARRAY [0..SRSTKSIZE] OF RECORD
11370 CASE SEVERAL OF
11380 1:(SB: PSB);
11390 2:(STB: PSTB);
11400 3:(MD: MODE);
11410 4:(LEX: PLEX);
11420 5:(SUBP: -1..SRSTKSIZE);
11430 6,7,8,9,10: ()
11440 END; (*SEMANTIC STACK*)
11450 (**)
11460 SRSEMP: -1..SRSTKSIZE; (*POINTS TO TOP ITEM OF SRSTK*)
11470 SRSUBP: 0..SRSTKSIZE;
11480 OPCOD: PSTB; (*USED IN OPIDUSER*)
11490 (*CURRENT ROUTINE*)
11500 ROUTNL: PROUTN;
11510 (*PROPERTIES OF CURRENT RANGE*)
11520 RANGEL: PRANGE;
11530 RGINFO: SET OF DCLTYP;
11540 RGSTATE: STATE;
11550 DCIL: PSTB; (*START OF THREAD*)
11560 RGLEV: DEPTHR; (*DEPTH OF RANGE*)
11570 (*PROPERTIES OF CURRENT LOCAL RANGE*)
11580 CURLEB: OFFSETR; (*BASE OF CURRENT LOCAL ENVIRONMENT*)
11590 DCLDEFN: DEFTYP;
11600 DCLMODE: MODE;
11610 DCLPRVMODE: MODE;
11620 TODOCOUNT, PSCOUNT: DEPTHR;
11640 (**)
11650 CURID: OFFSETR; (*CURRENT IDENTIFIER OFFSET*)
11660 SCL: PMODECHAIN;
11670 BALFLAG: BOOLEAN; (*INDICATES WHETHER THE SUBSTACK CONTAINS A SINGLE UNIT OR A BALANCE*)
11680 (**)
11690 OPTABL: ARRAY[STDOPTYP] OF OPIDBLK;
11700 XMODES: ARRAY[XTYPE] OF MODE; (*TO CONVERT XTYPES INTP GENUINE MODES*)
11710 COMMX: XTYPE; (*FOR COMMUNICATION BETWEEN OPIDSTD AND OPDOSTD*)
11720 OPBLK: -1..70; (*LIKEWISE*)
11730 (**)
11740 MONADUMMY, DYADUMMY: PSTB; (*FOR UNDEFINED OPERATORS*)
11750 BALANLEN: 0..MAXSIZE; (*COMMUNICATION BETWEEN UNITEDBALAND CGBALB*)
11760 (**)
11770 (*PARSING*)
11780 (*********)
11790 (**)
11800 SRPLSTK: ARRAY [0..SRPLSTKSIZE] OF PLEX;
11810 (*PARSER STACK*)
11820 PLSTKP: 0..SRPLSTKSIZE; (*POINTS TO TOP ITEM OF PLSTK*)
11830 PLINPQ: PLEXQ; (*START OF LOOKED-AHEAD LEXEME CHAIN*)
11840 PRODTBL: ARRAY [1..PRODLEN] OF PROD;
11850 (*TABLE OF PRODUCTION RULES*)
11860 PLPTR: 1..PRODLEN; (*POINTER INTO PRODTBL*)
11870 INP: PLEX; (*CURRENT LEXEME*)
11880 ENDOFPROG: BOOLEAN;
11890 (*+02() (*-25() LASTSTACK: INTEGER; ()-25*) ()+02*)
11900 (*+05() LASTSTACK: INTEGER; ()+05*)
11910 ()+70*)
11920 (**)
11930 (**)