DFDWIM>DFUTest.Mesa
Last Edited by: Spreitzer, October 2, 1985 8:59:35 pm PDT
DIRECTORY AMBridge, AMTypes, DFUtilities, FS, IO, PrintTV, Rope, --StructuredStreams,-- ViewerIO;
DFUTest: CEDAR PROGRAM
IMPORTS AMBridge, DFU: DFUtilities, FS, IO, PrintTV, --StructuredStreams,-- ViewerIO =
BEGIN
ROPE: TYPE = Rope.ROPE;
log: IO.STREAM--StructuredStreams.Create[--ViewerIO.CreateViewerStreams["DFU Test"].out--]--;
Doit: PROC [fileName: ROPE] =
BEGIN
from: IO.STREAMFS.StreamOpen[fileName];
log.PutRope["\n"];
DFU.ParseFromStream[in: from, proc: PerItem];
from.Close[];
END;
PerItem: DFU.ProcessItemProc --PROC [item: REF ANY] RETURNS [stop: BOOL ← FALSE]-- =
BEGIN
i: AMTypes.TV;
TRUSTED {i ← AMBridge.TVForReferent[item]};
PrintTV.Print[tv: i, put: log, depth: 6];
log.PutRope["\n"];
END;
END.