
    <<CompilerUtil.Mesa>>
        <<Copyright © 1985 by Xerox Corporation.  All rights reserved.>>
        <<Satterthwaite, June 10, 1986 11:56:34 am PDT>>
        <<Maxwell, July 28, 1983 7:55 am>>
        <<Paul Rovner, September 7, 1983 3:55 pm>>
        <<Russ Atkinson (RRA) March 6, 1985 10:10:42 pm PST>>

    DIRECTORY
        Alloc: TYPE USING [Handle],
        CompilerOps: TYPE USING [StreamId],
        IO: TYPE USING [STREAM],
        Tree: TYPE USING [Link, Map, Scan];

    CompilerUtil: DEFINITIONS = {

    <<stream management>>

        StreamId: TYPE = CompilerOps.StreamId;

        AcquireStream: PROC[StreamId] RETURNS[IO.STREAM];
        ReleaseStream: PROC[StreamId];

    <<binary table management>>

        TableId: TYPE = MACHINE DEPENDENT {error, debug, (255)};

        AcquireTable: PROC[TableId] RETURNS[LONG POINTER];
        ReleaseTable: PROC[TableId];

    <<compiler passes>>

        InstallParseTables: PROC[LONG POINTER];
        PrefillSymbols: PROC;

        P1Unit: PROC RETURNS[BOOL];
        P2Unit: Tree.Map;
        P3Unit: Tree.Map;
        P3Postlude: PROC[expand: BOOL];
        P4Unit: Tree.Scan;
        P5module: PROC;

    <<object output>>

        Address: TYPE = LONG POINTER;
        FileByteIndex: TYPE = INT;

        StartObjectFile: PROC[IO.STREAM];
        EndObjectFile: PROC[update: BOOL];
        TableOut: PROC[Alloc.Handle];
        RTTableOut: PROC[Alloc.Handle];

        NextFilePage: PROC RETURNS[CARDINAL];
        StartBCD: PROC;
        ReadBCDOffset: PROC RETURNS[CARD];
        ReadBCDIndex: PROC RETURNS[FileByteIndex];
        AppendBCDWord: PROC[word: UNSPECIFIED];
        AppendBCDWords: PROC[addr: Address, n: CARD];
        AppendBCDString: PROC[s: LONG STRING];
        FillBCDPage: PROC;
        UpdateBCDWords: PROC[offset: CARD, addr: Address, n: CARD];
        EndBCD: PROC;

    <<debugging>>

        PrintTree: PROC[table: Alloc.Handle, root: Tree.Link];
        PrintBodies: PROC[table: Alloc.Handle];
        PrintSymbols: PROC[table: Alloc.Handle, definitions: BOOL];

        }.

