-- file: TexSymbolsImpl.mesa
-- Pascal-to-Mesa translator output, translated at September 27, 1985 10:21:37 am PDT


DIRECTORY
  PascalBasic,
  TexTypes,
  TexInteraction,
  TexMemory,
  TexSymbols,
  TexOps,
  TexSysdep,
  TexSysdepInline;

TexSymbolsImpl: PROGRAM IMPORTS PascalBasic, TexTypes, TexInteraction, TexMemory, TexSymbols, TexOps, TexSysdep, TexSysdepInline EXPORTS TexSymbols = PUBLIC
BEGIN OPEN PascalBasic, TexTypes, TexInteraction, TexMemory, TexSymbols, TexOps, TexSysdep, TexSysdepInline;
 PrintCs: PROCEDURE[P: PascalInteger]
 = 
BEGIN IF P<258  THEN IF P>=129  THEN IF P=257  THEN BEGIN PrintEsc[366];
PrintEsc[367]; END  ELSE BEGIN PrintEsc[P-129];
IF Eqtb↑[4127+P-129].Hh.Rh=11  THEN PrintChar[32];
 END  ELSE IF P<1  THEN PrintEsc[368] ELSE Print[P-1] ELSE IF P>=3025  THEN
PrintEsc[368] ELSE IF( INT[Hash↑[P].Rh]<0)OR ( INT[Hash↑[P].Rh]>=StrPtr) THEN PrintEsc
[369] ELSE BEGIN PrintEsc[210];SlowPrint[Hash↑[P].Rh];PrintChar[32];
 END; END;--:262----263:-- SprintCs: PROCEDURE[P: Halfword]
 = 
BEGIN IF  INT[P]<258  THEN IF  INT[P]<129  THEN Print[ INT[P]-1] ELSE IF  INT[P]<257  THEN PrintEsc
[ INT[P]-129] ELSE BEGIN PrintEsc[366];PrintEsc[367];
 END  ELSE BEGIN PrintEsc[210];SlowPrint[Hash↑[P].Rh]; END; END;--:263
--119:----292:-- ShowTokenList: PROCEDURE[P,Q: PascalInteger,L: PascalInteger] = 
BEGIN 
 M, C:PascalInteger;MatchChr:AsciiCode;N:AsciiCode; MatchChr←35;
N←48;Tally←0;{WHILE(P#0)AND (Tally<L)DO BEGIN IF P=Q  THEN--320:
BEGIN FirstCount←Tally;
TrickCount←Tally+1+ErrorLine-HalfErrorLine;
IF TrickCount<ErrorLine  THEN TrickCount←ErrorLine; END--:320--;--293:
IF(P<HiMemMin)OR (P>MemEnd) THEN BEGIN PrintEsc[181]; GOTO Label10; END;
IF  INT[Mem[P]↑.Hh.Lh]>=4096  THEN PrintCs[ INT[Mem[P]↑.Hh.Lh]-4096] ELSE BEGIN M← PascalDIVPower2[Mem[
P]↑.Hh.Lh ,8];C← PascalMODPower2Mask[Mem[P]↑.Hh.Lh ,255];
IF( INT[Mem[P]↑.Hh.Lh]<0)OR (C>127) THEN PrintEsc[417] ELSE--294:
SELECT M FROM 1,2,3,4,7,8,10,11,12 =>Print[C];6 =>BEGIN Print[C];Print[C]; END;
5 =>BEGIN Print[MatchChr];
IF C<=9  THEN PrintChar[C+48] ELSE BEGIN PrintChar[33]; GOTO Label10; END; END;
13 =>BEGIN MatchChr←C;Print[C];N←N+1;PrintChar[N];
IF  INT[N]>57  THEN  GOTO Label10; END;14 =>Print[418]; ENDCASE =>PrintEsc[417]--:294--;
 END--:293--;P←Mem[P]↑.Hh.Rh; END ENDLOOP ;IF P#0  THEN PrintEsc[416];EXITS Label10 => NULL}; END;--:292
 PrintLengthParam: PROCEDURE[N: PascalInteger]
 = 
BEGIN SELECT N FROM 0 =>PrintEsc[341];1 =>PrintEsc[342];2 =>PrintEsc[343];
3 =>PrintEsc[344];4 =>PrintEsc[345];5 =>PrintEsc[346];6 =>PrintEsc[347];
7 =>PrintEsc[348];8 =>PrintEsc[349];9 =>PrintEsc[350];10 =>PrintEsc[351];
11 =>PrintEsc[352];12 =>PrintEsc[353];13 =>PrintEsc[354];14 =>PrintEsc[355];
15 =>PrintEsc[356];16 =>PrintEsc[357];17 =>PrintEsc[358];18 =>PrintEsc[359];
19 =>PrintEsc[360]; ENDCASE =>Print[361]; END;--:247----252:----298:
 PrintCmdChr: PROCEDURE[Cmd: Quarterword,ChrCode: Halfword]
 = 
BEGIN SELECT Cmd FROM 1 =>BEGIN Print[419];PrintAscii[ChrCode]; END;
2 =>BEGIN Print[420];PrintAscii[ChrCode]; END;3 =>BEGIN Print[421];
PrintAscii[ChrCode]; END;6 =>BEGIN Print[422];PrintAscii[ChrCode]; END;
7 =>BEGIN Print[423];PrintAscii[ChrCode]; END;8 =>BEGIN Print[424];
PrintAscii[ChrCode]; END;9 =>Print[425];10 =>BEGIN Print[426];
PrintAscii[ChrCode]; END;11 =>BEGIN Print[427];PrintAscii[ChrCode]; END;
12 =>BEGIN Print[428];PrintAscii[ChrCode]; END;--227:
74,75 =>IF  INT[ChrCode]<3044  THEN PrintSkipParam[ INT[ChrCode]-3026] ELSE IF
 INT[ChrCode]<3300  THEN BEGIN PrintEsc[263];PrintInt[ INT[ChrCode]-3044];
 END  ELSE BEGIN PrintEsc[264];PrintInt[ INT[ChrCode]-3300]; END;--:227----231:
71 =>IF  INT[ChrCode]>=3566  THEN BEGIN PrintEsc[275];PrintInt[ INT[ChrCode]-3566];
 END  ELSE SELECT ChrCode FROM 3557 =>PrintEsc[266];3558 =>PrintEsc[267];
3559 =>PrintEsc[268];3560 =>PrintEsc[269];3561 =>PrintEsc[270];
3562 =>PrintEsc[271];3563 =>PrintEsc[272];3564 =>PrintEsc[273];
 ENDCASE =>PrintEsc[274];--:231----239:
72 =>IF  INT[ChrCode]<4817  THEN PrintParam[ INT[ChrCode]-4767] ELSE BEGIN PrintEsc[
339];PrintInt[ INT[ChrCode]-4817]; END;--:239----249:
73 =>IF  INT[ChrCode]<5221  THEN PrintLengthParam[ INT[ChrCode]-5201] ELSE BEGIN
PrintEsc[362];PrintInt[ INT[ChrCode]-5221]; END;--:249----266:
45 =>PrintEsc[370];89 =>PrintEsc[371];40 =>PrintEsc[372];41 =>PrintEsc[373];
76 =>PrintEsc[381];61 =>PrintEsc[374];42 =>PrintEsc[392];16 =>PrintEsc[375];
106 =>PrintEsc[366];87 =>PrintEsc[380];15 =>PrintEsc[376];
91 =>PrintEsc[377];66 =>PrintEsc[367];62 =>PrintEsc[378];64 =>PrintEsc[32];
101 =>PrintEsc[379];32 =>PrintEsc[382];36 =>PrintEsc[383];
39 =>PrintEsc[384];37 =>PrintEsc[202];44 =>PrintEsc[47];18 =>PrintEsc[222];
46 =>PrintEsc[385];17 =>PrintEsc[386];54 =>PrintEsc[387];90 =>PrintEsc[388];
34 =>PrintEsc[389];102 =>PrintEsc[390];55 =>PrintEsc[207];
63 =>PrintEsc[391];65 =>PrintEsc[394];95 =>PrintEsc[395];0 =>PrintEsc[396];
97 =>PrintEsc[397];79 =>PrintEsc[393];83 =>PrintEsc[276];
108 =>PrintEsc[398];70 =>PrintEsc[275];38 =>PrintEsc[223];
33 =>PrintEsc[399];56 =>PrintEsc[400];35 =>PrintEsc[401];--:266----335:
13 =>PrintEsc[458];--:335----377:
103 =>IF ChrCode=0  THEN PrintEsc[490] ELSE PrintEsc[491];--:377----385:
109 =>SELECT ChrCode FROM 1 =>PrintEsc[493];2 =>PrintEsc[494];3 =>PrintEsc[495];
4 =>PrintEsc[496]; ENDCASE =>PrintEsc[492];--:385----412:
88 =>IF ChrCode=0  THEN PrintEsc[339] ELSE IF ChrCode=1  THEN PrintEsc[
362] ELSE IF ChrCode=2  THEN PrintEsc[263] ELSE PrintEsc[264];--:412
--417:--78 =>IF ChrCode=1  THEN PrintEsc[530] ELSE PrintEsc[529];
81 =>IF ChrCode=0  THEN PrintEsc[531] ELSE PrintEsc[532];
82 =>IF ChrCode=1  THEN PrintEsc[533] ELSE IF ChrCode=3  THEN PrintEsc[
534] ELSE PrintEsc[535];
69 =>IF ChrCode=0  THEN PrintEsc[536] ELSE IF ChrCode=1  THEN PrintEsc[
537] ELSE PrintEsc[538];--:417----469:
107 =>SELECT ChrCode FROM 0 =>PrintEsc[595];1 =>PrintEsc[596];2 =>PrintEsc[597];
3 =>PrintEsc[598];4 =>PrintEsc[599]; ENDCASE =>PrintEsc[600];--:469----488:
104 =>SELECT ChrCode FROM 1 =>PrintEsc[617];2 =>PrintEsc[618];3 =>PrintEsc[619];
4 =>PrintEsc[620];5 =>PrintEsc[621];6 =>PrintEsc[622];7 =>PrintEsc[623];
8 =>PrintEsc[624];9 =>PrintEsc[625];10 =>PrintEsc[626];11 =>PrintEsc[627];
12 =>PrintEsc[628];13 =>PrintEsc[629];14 =>PrintEsc[630];15 =>PrintEsc[631];
16 =>PrintEsc[632]; ENDCASE =>PrintEsc[616];--:488----492:
105 =>IF ChrCode=2  THEN PrintEsc[633] ELSE IF ChrCode=4  THEN PrintEsc[
634] ELSE PrintEsc[635];--:492----781:
4 =>IF ChrCode=128  THEN PrintEsc[756] ELSE BEGIN Print[760];
PrintAscii[ChrCode]; END;
5 =>IF ChrCode=129  THEN PrintEsc[757] ELSE PrintEsc[758];--:781----984:
80 =>SELECT ChrCode FROM 0 =>PrintEsc[823];1 =>PrintEsc[824];2 =>PrintEsc[825];
3 =>PrintEsc[826];4 =>PrintEsc[827];5 =>PrintEsc[828];6 =>PrintEsc[829];
 ENDCASE =>PrintEsc[830];--:984----1053:
14 =>IF ChrCode=1  THEN PrintEsc[879] ELSE PrintEsc[878];--:1053----1059:
26 =>SELECT ChrCode FROM 4 =>PrintEsc[880];0 =>PrintEsc[881];1 =>PrintEsc[882];
2 =>PrintEsc[883]; ENDCASE =>PrintEsc[884];
27 =>SELECT ChrCode FROM 4 =>PrintEsc[885];0 =>PrintEsc[886];1 =>PrintEsc[887];
2 =>PrintEsc[888]; ENDCASE =>PrintEsc[889];28 =>PrintEsc[208];
29 =>PrintEsc[212];30 =>PrintEsc[213];--:1059----1072:
21 =>IF ChrCode=1  THEN PrintEsc[907] ELSE PrintEsc[908];
22 =>IF ChrCode=1  THEN PrintEsc[909] ELSE PrintEsc[910];
20 =>SELECT ChrCode FROM 0 =>PrintEsc[277];1 =>PrintEsc[911];2 =>PrintEsc[912];
3 =>PrintEsc[818];4 =>PrintEsc[913];5 =>PrintEsc[820];
 ENDCASE =>PrintEsc[914];
31 =>IF ChrCode=100  THEN PrintEsc[916] ELSE IF ChrCode=101  THEN
PrintEsc[917] ELSE IF ChrCode=102  THEN PrintEsc[918] ELSE PrintEsc[915
];--:1072----1089:--43 =>IF ChrCode=0  THEN PrintEsc[934] ELSE PrintEsc[933];
--:1089----1108:
25 =>IF ChrCode=10  THEN PrintEsc[945] ELSE IF ChrCode=11  THEN PrintEsc[
944] ELSE PrintEsc[943];
23 =>IF ChrCode=1  THEN PrintEsc[947] ELSE PrintEsc[946];
24 =>IF ChrCode=1  THEN PrintEsc[949] ELSE PrintEsc[948];--:1108----1115:
47 =>IF ChrCode=1  THEN PrintEsc[45] ELSE PrintEsc[220];--:1115----1143:
48 =>IF ChrCode=1  THEN PrintEsc[981] ELSE PrintEsc[980];--:1143----1157:
50 =>SELECT ChrCode FROM 16 =>PrintEsc[724];17 =>PrintEsc[725];
18 =>PrintEsc[726];19 =>PrintEsc[727];20 =>PrintEsc[728];21 =>PrintEsc[729];
22 =>PrintEsc[730];23 =>PrintEsc[731];26 =>PrintEsc[733];
 ENDCASE =>PrintEsc[732];
51 =>IF ChrCode=1  THEN PrintEsc[736] ELSE IF ChrCode=2  THEN PrintEsc[
737] ELSE PrintEsc[982];--:1157----1170:--53 =>PrintStyle[ChrCode];--:1170
--1179:--52 =>SELECT ChrCode FROM 1 =>PrintEsc[1001];2 =>PrintEsc[1002];
3 =>PrintEsc[1003];4 =>PrintEsc[1004];5 =>PrintEsc[1005];
 ENDCASE =>PrintEsc[1000];--:1179----1189:
49 =>IF ChrCode=30  THEN PrintEsc[734] ELSE PrintEsc[735];--:1189----1209:
92 =>IF ChrCode=1  THEN PrintEsc[1024] ELSE IF ChrCode=2  THEN PrintEsc[
1025] ELSE PrintEsc[1026];
96 =>IF ChrCode=0  THEN PrintEsc[1027] ELSE IF ChrCode=1  THEN PrintEsc[
1028] ELSE IF ChrCode=2  THEN PrintEsc[1029] ELSE PrintEsc[1030];--:1209
--1220:--93 =>IF ChrCode#0  THEN PrintEsc[1045] ELSE PrintEsc[1044];
--:1220----1223:--94 =>SELECT ChrCode FROM 0 =>PrintEsc[1046];1 =>PrintEsc[1047];
2 =>PrintEsc[1048];3 =>PrintEsc[1049];4 =>PrintEsc[1050];5 =>PrintEsc[1051];
 ENDCASE =>PrintEsc[1052];67 =>BEGIN PrintEsc[375];PrintHex[ChrCode];
 END;68 =>BEGIN PrintEsc[386];PrintHex[ChrCode]; END;--:1223----1231:
84 =>IF ChrCode=4127  THEN PrintEsc[283] ELSE IF ChrCode=4639  THEN
PrintEsc[287] ELSE IF ChrCode=4255  THEN PrintEsc[284] ELSE IF 
ChrCode=4383  THEN PrintEsc[285] ELSE IF ChrCode=4511  THEN PrintEsc[286] ELSE
PrintEsc[340];85 =>PrintSize[ INT[ChrCode]-4079];--:1231----1251:
98 =>IF ChrCode=1  THEN PrintEsc[808] ELSE PrintEsc[798];--:1251----1255:
77 =>IF ChrCode=0  THEN PrintEsc[1068] ELSE PrintEsc[1069];--:1255----1261:
86 =>BEGIN Print[1077];Print[FontName↑[ChrCode]];
IF FontSize↑[ChrCode]#FontDsize↑[ChrCode] THEN BEGIN Print[601];
PrintScaled[FontSize↑[ChrCode]];Print[265]; END; END;--:1261----1263:
99 =>SELECT ChrCode FROM 0 =>PrintEsc[146];1 =>PrintEsc[147];2 =>PrintEsc[148];
 ENDCASE =>PrintEsc[1078];--:1263----1273:
60 =>IF ChrCode=0  THEN PrintEsc[1080] ELSE PrintEsc[1079];--:1273----1278:
58 =>IF ChrCode=0  THEN PrintEsc[1081] ELSE PrintEsc[1082];--:1278----1287:
57 =>IF ChrCode=4255  THEN PrintEsc[1088] ELSE PrintEsc[1089];--:1287
--1292:--19 =>SELECT ChrCode FROM 1 =>PrintEsc[1091];2 =>PrintEsc[1092];
3 =>PrintEsc[1093]; ENDCASE =>PrintEsc[1090];--:1292----1295:
100 =>Print[1100];110 =>Print[1101];111 =>PrintEsc[1102];112 =>PrintEsc[1103];
113 =>BEGIN PrintEsc[1024];PrintEsc[1103]; END;114 =>PrintEsc[1104];
--:1295----1346:--59 =>SELECT ChrCode FROM 0 =>PrintEsc[1134];1 =>PrintEsc[456];
2 =>PrintEsc[1135];3 =>PrintEsc[1136];4 =>PrintEsc[1137];
 ENDCASE =>Print[1138];--:1346-- ENDCASE =>Print[429]; END;--:298
 ShowEqtb: PROCEDURE[N: Halfword]
 = 
BEGIN IF  INT[N]<1  THEN PrintChar[63] ELSE IF  INT[N]<3026  THEN--223:
BEGIN SprintCs[N];PrintChar[61];
PrintCmdChr[Eqtb↑[N].Hh.B0,Eqtb↑[N].Hh.Rh];
IF  INT[Eqtb↑[N].Hh.B0]>=110  THEN BEGIN PrintChar[58];
ShowTokenList[Mem[Eqtb↑[N].Hh.Rh]↑.Hh.Rh,0,32]; END; END--:223
 ELSE IF  INT[N]<3556  THEN--229:--IF  INT[N]<3044  THEN BEGIN PrintSkipParam[ INT[N]-3026];
PrintChar[61];
IF  INT[N]<3041  THEN PrintSpec[Eqtb↑[N].Hh.Rh,265] ELSE PrintSpec[Eqtb↑[N].Hh.
Rh,209]; END  ELSE IF  INT[N]<3300  THEN BEGIN PrintEsc[263];PrintInt[ INT[N]-3044];
PrintChar[61];PrintSpec[Eqtb↑[N].Hh.Rh,265];
 END  ELSE BEGIN PrintEsc[264];PrintInt[ INT[N]-3300];PrintChar[61];
PrintSpec[Eqtb↑[N].Hh.Rh,209]; END--:229-- ELSE IF  INT[N]<4767  THEN--233:
IF N=3556  THEN BEGIN PrintEsc[276];PrintChar[61];
IF Eqtb↑[3556].Hh.Rh=0  THEN PrintChar[48] ELSE PrintInt[Mem[Eqtb↑[3556].
Hh.Rh]↑.Hh.Lh]; END  ELSE IF  INT[N]<3566  THEN BEGIN PrintCmdChr[71,N];
PrintChar[61];
IF Eqtb↑[N].Hh.Rh#0  THEN ShowTokenList[Mem[Eqtb↑[N].Hh.Rh]↑.Hh.Rh,0,32];
 END  ELSE IF  INT[N]<3822  THEN BEGIN PrintEsc[275];PrintInt[ INT[N]-3566];
PrintChar[61];
IF Eqtb↑[N].Hh.Rh#0  THEN ShowTokenList[Mem[Eqtb↑[N].Hh.Rh]↑.Hh.Rh,0,32];
 END  ELSE IF  INT[N]<4078  THEN BEGIN PrintEsc[277];PrintInt[ INT[N]-3822];
PrintChar[61];
IF Eqtb↑[N].Hh.Rh=0  THEN Print[278] ELSE BEGIN DepthThreshold←0;
BreadthMax←1;ShowNodeList[Eqtb↑[N].Hh.Rh]; END;
 END  ELSE IF  INT[N]<4127  THEN--234:
BEGIN IF N=4078  THEN Print[279] ELSE IF  INT[N]<4095  THEN BEGIN PrintEsc[280];
PrintInt[ INT[N]-4079]; END  ELSE IF  INT[N]<4111  THEN BEGIN PrintEsc[281];
PrintInt[ INT[N]-4095]; END  ELSE BEGIN PrintEsc[282];PrintInt[ INT[N]-4111]; END;
PrintChar[61];PrintEsc[Hash↑[ INT[2768]+Eqtb↑[N].Hh.Rh].Rh]; END--:234
 ELSE--235:--IF  INT[N]<4639  THEN BEGIN IF  INT[N]<4255  THEN BEGIN PrintEsc[283];
PrintInt[ INT[N]-4127]; END  ELSE IF  INT[N]<4383  THEN BEGIN PrintEsc[284];
PrintInt[ INT[N]-4255]; END  ELSE IF  INT[N]<4511  THEN BEGIN PrintEsc[285];
PrintInt[ INT[N]-4383]; END  ELSE BEGIN PrintEsc[286];PrintInt[ INT[N]-4511]; END;
PrintChar[61];PrintInt[Eqtb↑[N].Hh.Rh]; END  ELSE BEGIN PrintEsc[287];
PrintInt[ INT[N]-4639];PrintChar[61];PrintInt[Eqtb↑[N].Hh.Rh]; END--:235
--:233-- ELSE IF  INT[N]<5201  THEN--242:
BEGIN IF  INT[N]<4817  THEN PrintParam[ INT[N]-4767] ELSE IF  INT[N]<5073  THEN BEGIN
PrintEsc[339];PrintInt[ INT[N]-4817]; END  ELSE BEGIN PrintEsc[340];
PrintInt[ INT[N]-5073]; END;PrintChar[61];PrintInt[Eqtb↑[N].Int]; END--:242
 ELSE IF  INT[N]<=5476  THEN--251:
BEGIN IF  INT[N]<5221  THEN PrintLengthParam[ INT[N]-5201] ELSE BEGIN PrintEsc[362]
;PrintInt[ INT[N]-5221]; END;PrintChar[61];PrintScaled[Eqtb↑[N].Int];
Print[265]; END--:251-- ELSE PrintChar[63]; END;--:252----259:
 IdLookup: PROCEDURE[J,L: PascalInteger] RETURNS[IdLookupResult: Halfword] = 
BEGIN  H:PascalInteger;
P:Halfword;K:Halfword;--261:--H←Buffer↑[J];
FOR i:INT    IN [ INT[J+1 ].. INT[J+L-1 ]] DO  K ← i;  H←H+H+Buffer↑[K];
WHILE H>=2129 DO H←H-2129 ENDLOOP ;--:261-- ENDLOOP;P←H+258;
{WHILE TRUE DO BEGIN IF  INT[Hash↑[P].Rh]>0  THEN IF(
 INT[StrStart↑[Hash↑[P].Rh+1]]-StrStart↑[Hash↑[P].Rh])=L  THEN IF StrEqBuf[Hash↑[P].Rh,J] THEN  GOTO Label40;
IF Hash↑[P].Lh=0  THEN BEGIN IF NoNewControlSequence  THEN P←3025  ELSE--
-- 260:
BEGIN IF  INT[Hash↑[P].Rh]>0  THEN BEGIN DO IF(HashUsed=258) THEN Overflow[
365,2500];HashUsed← INT[HashUsed]-1; IF Hash↑[HashUsed].Rh=0 THEN EXIT; ENDLOOP;
Hash↑[P].Lh←HashUsed;P←HashUsed; END;
BEGIN IF PoolPtr+L>PoolSize  THEN Overflow[129,PoolSize-InitPoolPtr]
; END;FOR i:INT    IN [ INT[J ].. INT[J+L-1 ]] DO  K ← i;  StrPool↑[PoolPtr]←Buffer↑[K];
PoolPtr←PoolPtr+1; ENDLOOP;Hash↑[P].Rh←MakeString[];CsCount←CsCount+1;
 END--:260--; GOTO Label40; END;P←Hash↑[P].Lh; END ENDLOOP ;EXITS Label40 => NULL};IdLookupResult←P; END;--:259----264:
 Primitive: PROCEDURE[S: StrNumber,C: Quarterword,O: Halfword]
 = 
BEGIN K:PoolPointer;J:SmallNumber;L:SmallNumber;
 IF  INT[S]<128  THEN CurVal←S+129  ELSE BEGIN K←StrStart↑[S];
L← INT[StrStart↑[S+1]]-K;FOR i:INT    IN [ INT[0 ].. INT[L-1 ]] DO  J ← i; Buffer↑[J]←StrPool↑[K+J] ENDLOOP;
CurVal←IdLookup[0,L];BEGIN StrPtr←StrPtr-1;
PoolPtr←StrStart↑[StrPtr]; END;Hash↑[CurVal].Rh←S; END;
Eqtb↑[CurVal].Hh.B1←1;Eqtb↑[CurVal].Hh.B0←C;Eqtb↑[CurVal].Hh.Rh←O;
 END;--:264----274:-- NewSaveLevel: PROCEDURE[C: GroupCode]
 = 
BEGIN IF  INT[SavePtr]>MaxSaveStack  THEN BEGIN MaxSaveStack←SavePtr;
IF  INT[MaxSaveStack]>SaveSize-6  THEN Overflow[402,SaveSize]; END;
SaveStack↑[SavePtr].Hh.B0←3;SaveStack↑[SavePtr].Hh.B1←CurGroup;
SaveStack↑[SavePtr].Hh.Rh←CurBoundary;
IF CurLevel=255  THEN Overflow[403,255];CurBoundary←SavePtr;
CurLevel←CurLevel+1;SavePtr←SavePtr+1;CurGroup←C; END;--:274
--275:-- EqDestroy: PROCEDURE[W: MemoryWord] = 
BEGIN Q:Halfword;
 SELECT W.Hh.B0 FROM 110,111,112,113 =>DeleteTokenRef[W.Hh.Rh];
116 =>DeleteGlueRef[W.Hh.Rh];117 =>BEGIN Q←W.Hh.Rh;
IF Q#0  THEN FreeNode[Q, INT[Mem[Q]↑.Hh.Lh]+Mem[Q]↑.Hh.Lh+1]; END;
118 =>FlushNodeList[W.Hh.Rh]; ENDCASE => NULL; END;--:275----276:
 EqSave: PROCEDURE[P: Halfword,L: Quarterword]
 = 
BEGIN IF  INT[SavePtr]>MaxSaveStack  THEN BEGIN MaxSaveStack←SavePtr;
IF  INT[MaxSaveStack]>SaveSize-6  THEN Overflow[402,SaveSize]; END;
IF L=0  THEN SaveStack↑[SavePtr].Hh.B0←1  ELSE BEGIN SaveStack↑[SavePtr
]←Eqtb↑[P];SavePtr←SavePtr+1;SaveStack↑[SavePtr].Hh.B0←0; END;
SaveStack↑[SavePtr].Hh.B1←L;SaveStack↑[SavePtr].Hh.Rh←P;
SavePtr←SavePtr+1; END;--:276----277:-- EqDefine: PROCEDURE[P: Halfword,
T: Quarterword,E: Halfword]
 = 
BEGIN IF Eqtb↑[P].Hh.B1=CurLevel  THEN EqDestroy[Eqtb↑[P]] ELSE IF
 INT[CurLevel]>1  THEN EqSave[P,Eqtb↑[P].Hh.B1];Eqtb↑[P].Hh.B1←CurLevel;
Eqtb↑[P].Hh.B0←T;Eqtb↑[P].Hh.Rh←E; END;--:277----278:
 EqWordDefine: PROCEDURE[P: Halfword,W: PascalInteger]
 = 
BEGIN IF XeqLevel↑[P]#CurLevel  THEN BEGIN EqSave[P,XeqLevel↑[P]];
XeqLevel↑[P]←CurLevel; END;Eqtb↑[P].Int←W; END;--:278----279:
 GeqDefine: PROCEDURE[P: Halfword,T: Quarterword,E: Halfword]
 = 
BEGIN EqDestroy[Eqtb↑[P]];Eqtb↑[P].Hh.B1←1;Eqtb↑[P].Hh.B0←T;
Eqtb↑[P].Hh.Rh←E; END; GeqWordDefine: PROCEDURE[P: Halfword,W: PascalInteger]
 = 
BEGIN Eqtb↑[P].Int←W;XeqLevel↑[P]←1; END;--:279----280:
 SaveForAfter: PROCEDURE[T: Halfword]
 = 
BEGIN IF  INT[SavePtr]>MaxSaveStack  THEN BEGIN MaxSaveStack←SavePtr;
IF  INT[MaxSaveStack]>SaveSize-6  THEN Overflow[402,SaveSize]; END;
SaveStack↑[SavePtr].Hh.B0←2;SaveStack↑[SavePtr].Hh.B1←0;
SaveStack↑[SavePtr].Hh.Rh←T;SavePtr←SavePtr+1; END;--:280----281:
--284:-- RestoreTrace: PROCEDURE[P: Halfword,S: StrNumber]
 = 
BEGIN BeginDiagnostic[];PrintChar[123];Print[S];PrintChar[32];
ShowEqtb[P];PrintChar[125];EndDiagnostic[FALSE]; END;--:284
 Unsave: PROCEDURE = 
BEGIN  P:Halfword;
L:Quarterword;T:Halfword;
 IF  INT[CurLevel]>1  THEN BEGIN CurLevel←CurLevel-1;--282:
{WHILE TRUE DO BEGIN SavePtr←SavePtr-1;
IF SaveStack↑[SavePtr].Hh.B0=3  THEN  GOTO Label30;
P←SaveStack↑[SavePtr].Hh.Rh;IF SaveStack↑[SavePtr].Hh.B0=2  THEN--326:
BEGIN T←CurTok;CurTok←P;BackInput[];CurTok←T; END--:326
 ELSE BEGIN IF SaveStack↑[SavePtr].Hh.B0=0  THEN BEGIN L←SaveStack↑
[SavePtr].Hh.B1;SavePtr←SavePtr-1;
 END  ELSE SaveStack↑[SavePtr]←Eqtb↑[3025];--283:
IF  INT[P]<4767  THEN IF Eqtb↑[P].Hh.B1=1  THEN BEGIN EqDestroy[SaveStack↑
[SavePtr]];IF Eqtb↑[4804].Int>0  THEN RestoreTrace[P,405];
 END  ELSE BEGIN EqDestroy[Eqtb↑[P]];Eqtb↑[P]←SaveStack↑[SavePtr];
IF Eqtb↑[4804].Int>0  THEN RestoreTrace[P,406];
 END  ELSE IF XeqLevel↑[P]#1  THEN BEGIN Eqtb↑[P]←SaveStack↑[SavePtr];
XeqLevel↑[P]←L;IF Eqtb↑[4804].Int>0  THEN RestoreTrace[P,406];
 END  ELSE BEGIN IF Eqtb↑[4804].Int>0  THEN RestoreTrace[P,405]; END--:283--;
 END; END ENDLOOP ;EXITS Label30 => NULL};CurGroup←SaveStack↑[SavePtr].Hh.B1;
CurBoundary←SaveStack↑[SavePtr].Hh.Rh--:282--; END  ELSE Confusion[404];
 END;--:281----288:-- PrepareMag: PROCEDURE = 
BEGIN UserWantsPress:PascalBoolean;
 UserWantsPress←ProfileAsksForPress[];
IF(MagSet>0)AND (Eqtb↑[4784].Int#MagSet) THEN BEGIN BEGIN IF Interaction
=3  THEN NULL;PrintNl[134];Print[408]; END;PrintInt[Eqtb↑[4784].Int];
Print[409];PrintNl[410];BEGIN HelpPtr←2;HelpLine↑[1]←411;
HelpLine↑[0]←412; END;IntError[MagSet];GeqWordDefine[4784,MagSet];
 END;
IF(MagSet>0)AND (UsePressFormat#UserWantsPress) THEN BEGIN BEGIN IF
Interaction=3  THEN NULL;PrintNl[134];Print[413]; END;Error[];
UserWantsPress←UsePressFormat; END;
IF(Eqtb↑[4784].Int<=0)OR (Eqtb↑[4784].Int>32768) THEN BEGIN BEGIN IF
Interaction=3  THEN NULL;PrintNl[134];Print[414]; END;BEGIN HelpPtr←1;
HelpLine↑[0]←415; END;IntError[Eqtb↑[4784].Int];
GeqWordDefine[4784,1000]; END;MagSet←Eqtb↑[4784].Int;
UsePressFormat←UserWantsPress; END;--:288----295:
 TokenShow: PROCEDURE[P: Halfword]
 = 
BEGIN IF P#0  THEN ShowTokenList[Mem[P]↑.Hh.Rh,0,1000]; END;--:295----296:
 PrintMeaning: PROCEDURE = 
BEGIN PrintCmdChr[CurCmd,CurChr];
IF  INT[CurCmd]>=110  THEN BEGIN PrintChar[58];PrintLn[];TokenShow[CurChr];
 END  ELSE IF CurCmd=109  THEN BEGIN PrintChar[58];PrintLn[];
TokenShow[CurMark↑[CurChr]]; END; END;--:296----299:
 ShowCurCmdChr: PROCEDURE = 
BEGIN BeginDiagnostic[];PrintNl[123];
IF CurList.ModeField#ShownMode  THEN BEGIN PrintMode[CurList.
ModeField];Print[430];ShownMode←CurList.ModeField; END;
PrintCmdChr[CurCmd,CurChr];PrintChar[125];EndDiagnostic[FALSE];
 END;--:299----311:--
END.