SaffronDriver.Mesa
Copyright Ó 1987 by Xerox Corporation. All rights reserved.
Sturgis, July 21, 1987 2:24:49 pm PDT
Bill Jackson (bj) April 28, 1987 1:04:42 am PDT
DIRECTORY
Commander USING [CommandProc, Register],
IO USING [PutF],
OneCasabaParser USING [GetReportStream],
SaffronATDef USING [TopNode],
SaffronCentralDef USING [ParseOneStream],
SaffronContext USING[ErrorSignal],
ThreeC4Support USING [GetReportStream];
SaffronDriver:
CEDAR
MONITOR
IMPORTS SaffronCentralDef, Commander, IO, OneCasabaParser, SaffronContext, ThreeC4Support ~ {
debugFlags: CARDINAL ← 0;
SaffronCompiler: Commander.CommandProc ~ {
ENABLE {
ThreeC4Support.GetReportStream => RESUME[cmd.out];
OneCasabaParser.GetReportStream => { result ← $Failure; RESUME[cmd.out] };
};
root: SaffronATDef.TopNode;
result ← $Success; -- bad assumption?
root ← NARROW[SaffronCentralDef.ParseOneStream[cmd.in, debugFlags, cmd.out]];
IF ( result = $Failure )
THEN {
IO.PutF[cmd.out, "Syntax Errors Detected.\n"];
}
ELSE {
IO.PutF[cmd.out, "No Syntax Errors Detected.\n"];
[] ← root.procs.DoTop[root
! SaffronContext.ErrorSignal => { CONTINUE };
];
};
};
Commander.Register["Saffron", SaffronCompiler];
}...