MimosaPackagedImpl.mesa
Copyright Ó 1990, 1992 by Xerox Corporation. All rights reserved.
Foote, October 23, 1990 2:57 pm PDT
Mna, June 18, 1992 11:28 am PDT
Willie-s, December 9, 1992 3:50 pm PST
DIRECTORY
SSUDefs,
Commander,
IO,
MimosaInterface,
Rope;
MimosaPackagedImpl: CEDAR PROGRAM IMPORTS Commander, IO, MimosaInterface, Rope = {
ROPE: TYPE = Rope.ROPE;
STREAM: TYPE = IO.STREAM;
XRExitWorld: PROC [status: INT] =
TRUSTED MACHINE CODE { "<xr/Threads.h>.XR𡤎xitWorld" };
MimosaPackaged: SAFE PROC [cmd: Commander.Handle]
RETURNS [result: REF ¬ NIL, msg: ROPE ¬ NIL] ~ {
in: STREAM ¬ IO.RIS[cmd.commandLine];
out: STREAM ¬ cmd.out;
data: REF ¬ cmd.procData.clientData;
retval: SSUDefs.JobStatus;
[result, msg] ¬ MimosaInterface.DoCompile[in, out, data];
SELECT result FROM
$Failure => {
IF Rope.Equal[msg, "W (Interface)"] THEN retval ¬ successfulDefWithWarnings;
IF Rope.Equal[msg, "W (Implementation)"] THEN retval ¬ successfulImplWithWarnings
ELSE retval ¬ mimosaCompileFailed};
$Definition => retval ¬ successfulDef;
$Implementation => retval ¬ successfulImpl;
ENDCASE => retval ¬ unknown;
XRExitWorld[ORD[retval]];
};
mimDoc: ROPE = "Mimosa compiler (Cedar to C)";
Commander.Register["MimosaPackaged", MimosaPackaged, mimDoc, $MimosaServer];
}...