SaffronDriver.Mesa
Copyright Ó 1987 by Xerox Corporation. All rights reserved.
Sturgis, May 20, 1986 2:53:54 pm PDT
Bill Jackson (bj) April 28, 1987 1:04:42 am PDT
DIRECTORY
CedarSupport USING [ErrorSignal],
Commander USING [CommandProc, Register],
IO USING [PutF],
OneCasabaParser USING [GetReportStream],
SaffronATDef USING [TopNode],
SaffronCentralDef USING [ParseOneStream],
ThreeC4Support USING [GetReportStream];
SaffronDriver:
CEDAR
MONITOR
IMPORTS SaffronCentralDef, CedarSupport, Commander, IO, OneCasabaParser, 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
! CedarSupport.ErrorSignal => { CONTINUE };
];
};
};
Commander.Register["Saffron", SaffronCompiler];
}...