Cucumber.Mesa
Last Edited by: Spreitzer, July 8, 1985 2:29:28 pm PDT
DIRECTORY AMTypes, IO, Rope;
Cucumber: DEFINITIONS =
BEGIN
Error: ERROR [msg: Rope.ROPE];
Transfer: PROC [what: REF ANY, where: IO.STREAM, direction: Direction];
Register: SAFE PROC [handler: Handler, type: AMTypes.Type];
Handler: TYPE = REF HandlerRep;
HandlerRep: TYPE = RECORD [
PartTransfer: PartTransferProc,
PrepareWhole, FinishWhole: Bracket ← NIL,
data: REF ANYNIL];
PartTransferProc: TYPE = PROC [whole: REF ANY, part: Path, where: IO.STREAM, direction: Direction, data: REF ANY];
Bracket: TYPE = PROC [whole: REF ANY, where: IO.STREAM, direction: Direction, data: REF ANY] RETURNS [leaveTheseToMe: SelectorList ← NIL];
all: SelectorList;
SelectorList: TYPE = LIST OF Selector;
Path: TYPE = LIST OF Selector; --outermost first
Selector: TYPE = REF ANY;
actually UNION [
ATOM --selects fields of records
REF INT --selects anonymous fields of records
REF INT --indices of ARRAYs indexed by numbers
REF <et> --indices of ARRAYs indexed by an enumerated type <et>
]
Direction: TYPE = {in, out};
END.