[Indigo]<Rosemary>®>Rosemary.DF=>RoseExtrasImpl.Mesa
Last Edited by: Barth, July 1, 1985 5:47:49 pm PDT
DIRECTORY IO, Rope, RoseCreate, RoseExtras, RoseTypes, SwitchTypes;
RoseExtrasImpl: CEDAR PROGRAM
IMPORTS IO, Rope, RoseCreate, SwitchTypes
EXPORTS RoseExtras =
BEGIN OPEN RoseTypes;
Flatten: PUBLIC PROC [thisCell: Cell, to: ExpansionReceiver, name: RoseTypes.ROPE, count: CARDINAL] = {
subNodes: UnnamedConsNE ← NEW[NodeExpressionRep.unnamedCons ← [unnamedCons [elts: NIL]]];
FOR sub: CARDINAL DECREASING IN [0..count) DO
subNodes.elts ← CONS[NEW[ NodeExpressionRep.primary ← [primary[ node: to.class.NodeInstance[erInstance: to.instance, name: IO.PutFR[Rope.Cat[name, "%g"], IO.int[sub]], type: SwitchTypes.bitType], selector: [whole [ ]]]]], subNodes.elts];
ENDLOOP;
to.class.Equivalence[erInstance: to.instance, a: NEW[NodeExpressionRep.primary ← [primary [node: RoseCreate.LookupNode[from: thisCell, path: LIST[name]], selector: [whole [ ]]]]], b: subNodes];
};
END.