MCrossRefDefs.mesa
wsh&kap 16-Mar-80 13:13
pdr October 11, 1983 11:51 pm
DIRECTORY
Rope USING[ROPE],
IO USING[STREAM];
MCrossRefDefs: DEFINITIONS =
BEGIN
TokenType: TYPE = {reserved, identifier, none};
TokenHandle: TYPE = REF Token;
Token: TYPE =
RECORD[next: TokenHandle ← NIL, -- for sorting
name: ATOMNIL,
type: TokenType ← none,
fileNHead: fileNHandle ← NIL,
fileNTail: fileNHandle ← NIL
];
fileNHandle: TYPE = REF fileN;
fileN: TYPE =
RECORD[next: fileNHandle ← NIL,
name: ATOMNIL,
xrefHead: XRefHandle ← NIL,
xrefTail: XRefHandle ← NIL
];
LineNumberRange: TYPE = [0..77777B];
Coord: TYPE = MACHINE DEPENDENT RECORD
[ defn: BOOLEAN,
ln: LineNumberRange
];
XRefHandle: TYPE = REF XRef;
XRef: TYPE =
RECORD[next: XRefHandle ← NIL,
nRefs: CARDINAL ← 0,
coords: ARRAY [1..maxNRefs] OF Coord ← ALL[[defn: FALSE, ln: 0]]
];
----------------------------------------------------------
constants
maxNRefs: CARDINAL = 5;
Gacha8linesPerPage: CARDINAL = 74;
Gacha8charsPerLine: CARDINAL = 88;
tabPosition: CARDINAL;
procedures
SetMCrossOutputStream: PROC[fileName: Rope.ROPE];
DestroyMCrossOutputStream: PROC;
OutputLine: PROC [s: Rope.ROPE];
OutputString: PROC [s: Rope.ROPE];
OutputChar: PROC [ch: CHARACTER];
OutputRefCoord: PROC [coord: Coord];
PrintXREF: PROC[tsStream: IO.STREAM];
END.