Text preview for : ListSymbols.mesa_Sep78.pdf part of xerox ListSymbols.mesa Sep78 xerox mesa 4.0_1978 listing Mesa_4_Lister ListSymbols.mesa_Sep78.pdf
Back to : ListSymbols.mesa_Sep78.pd | Home
ListSymbols.mesa 2-Sep-78 18:18:51 Page 1
-- ListSymbols.mesa; modified by Johnsson, July 20, 1978 1:42 PM
DIRECTORY
AltoDefs: FROM "altodefs",
BedDefs: FROM "beddefs",
CommanderDefs: FROM "eommanderdefs",
10Defs: FROM "iodefs",
ListerDefs: FROM "listerdefs",
LitDefs: FROM "litdefs",
OutputDefs: FROM "outputdefs",
SegmentDefs: FROM "segmentdefs",
StringDefs: FROM "stringdefs",
SymbolTableDefs: FROM "symboltabledefs",
SymDefs: FROM "symdefs",
SymSegDefs: FROM "symsegdefs",
SymTabDefs: FROM "symtabdefs",
TableDefs: FROM "tabledefs",
TreeDefs: FROM "treedefs";
DEFINITIONS FROM ListerDefs, OutputDefs, SymDefs;
ListSymbols: PROGRAM IMPORTS CommanderDefs, IODefs, ListerDefs, LitDefs, OutputDefs, SegmentDefs, Strin
**gDefs, SymbolTableDefs, SymSegDefs, TableDefs, TreeDefs
EXPORTS ListerDefs =
BEGIN
FileSegmentHandle: TYPE = SegmentDefs.FileSegmentHandle;
CR: CHARACTER = IODefs.CR;
symbols: SymbolTableDefs.SymbolTableBase;
-- uti 1 ities
seb, etxb, htb, ltb, tb: TableDefs.TableBase;
ListSymbolsNotify: TableDefs.TableNotifier =
BEGIN
tb ~ base[TreeDefs.treetype];
ltb ~ base[LitDefs.lttype]:
seb ~ base[SymDefs.setype]:
etxb ~ base[SymDefs.etxtype]:
htb ~ base[SymDefs.httype];
END;
-- tree printing
PrintLiteral: PROCEDURE[t: literal TreeDefs.TreeLink] ..
BEGIN OPEN LitDefs;
dese: Li toeser i ptor;
i: CARDINAL;
v: WORD;
WITH t.info SELECT FROM
string =)
BEGIN PutChar['"];
PutString[StringLiteralValue[index]];
PutChar['"];
IF index # MasterString[index] THEN PutChar['L]:
END;
word =)
BEGIN
dese ~ LitDeseriptorValue[index];
IF dese.length # 1 THEN PutChar['[]:
FOR i IN [0 .. dese. length)
DO
IF (v ~ (ltb+dese.offset)[i]) < 1000
THEN PutDecimal[v]
ELSE PutOctal[v];
IF i+1 # dese.length THEN PutChar[',]:
ENDLOOP:
IF dese.length # 1 THEN PutChar[']];
END;
ENDCA5E;
END;
PrintSubTree: PROCEDURE [t: TreeDefs.TreeLink, nBlanks: CARDINAL] ..
BEGIN OPEN TreeDefs:
ListSymbols.mesa 2-Sep-78 18:18:51 Page 2
Printer: TreeMap -
BEGIN
node: TreeIndex:
Indent[nBlanks]:
WITH s: t SELECT FROM
hash -> PrintHti[s.index]:
symbol -> PrintSei[s.index]:
literal