-- file CompilerOps.Mesa
-- last modified by Satterthwaite,  2-Nov-81 12:31:39
-- last modified by Russ Atkinson, 28-Aug-81 12:26:43

DIRECTORY
  File: TYPE USING [Capability],
  FileParms: TYPE USING [ActualId, Ops],
  Stream: TYPE USING [Handle],
  Strings: TYPE USING [String],
  TimeStamp: TYPE USING [Stamp];

CompilerOps: DEFINITIONS = {

 -- transaction definitions

  LetterSwitches: TYPE = PACKED ARRAY CHARACTER ['a..'z] OF BOOLEAN;
  
  Transaction: TYPE = RECORD [
   -- action
    op: {compile, replace} ← compile,
   -- input
    source: FileParms.ActualId,
    sourceStream: Stream.Handle,
    fileParms: FileParms.Ops,
    switches: LetterSwitches,
    pattern: FileParms.ActualId,
    objectName: Strings.String,
    objectFile: File.Capability,
    debugPass: CARDINAL ← LAST[CARDINAL],
   -- output
    objectVersion: TimeStamp.Stamp,
    matched: BOOLEAN,
    sourceTokens: CARDINAL,
    nErrors, nWarnings: CARDINAL,
    objectBytes, objectFrameSize, linkCount: CARDINAL,
   -- interaction
    getStream: PROC [StreamId] RETURNS [Stream.Handle],
    startPass: PROC [CARDINAL] RETURNS [goOn: BOOLEAN]];

  StreamId: TYPE = MACHINE DEPENDENT {source, object, log, (255)};

 -- inquiries
 
  DefaultSwitches: PROC RETURNS [LetterSwitches];
  CompilerVersion: PROC RETURNS [TimeStamp.Stamp];
  AppendHerald: PROC [Strings.String];
   
 -- operations
 
  Start: PROC [scratchZone: UNCOUNTED ZONE];
  DoTransaction: PROC [POINTER TO Transaction];		-- really a VAR
  Stop: PROC;
   
  Punt: ERROR;

  }.