DIRECTORY IO, IOUtils, Rope, StructuredStreams; StructuredStreamsTest: CEDAR PROGRAM IMPORTS IO, SS:StructuredStreams = BEGIN Parse: PROC [from, to: IO.STREAM] RETURNS [level: INTEGER] = { level _ 0; WHILE NOT from.EndOf[] DO c: CHAR _ from.GetChar[]; SELECT c FROM '{ => {SS.Begin[to]; level _ level + 1}; '} => {SS.End[to]; level _ level - 1}; '< => { cond: SS.BreakCondition = SELECT from.GetChar[] FROM 'w => width, 'l => lookLeft, 'u => united, 'a => always, ENDCASE => ERROR; offset: INTEGER = from.GetInt[]; sep: Rope.ROPE = from.GetRopeLiteral[]; SS.Bp[to, cond, offset, sep]; WHILE from.GetChar[] # '> DO NULL ENDLOOP; }; ENDCASE => to.PutChar[c]; ENDLOOP; level _ level; }; END. ˆStructuredStreamsTest.Mesa last edited by Spreitzer September 19, 1985 5:16:06 pm PDT Mike Spreitzer July 30, 1986 7:27:12 pm PDT Κg˜šœ™Jšœ:™:Icode™+—J˜KšΟk œœ#˜/K˜šΠbxœœ˜$Kšœœœ˜ Kšœ˜—K˜Kš˜K˜š Οnœœ œœœ œ˜>K˜ šœœ˜Kšœœ˜šœ˜ Kšœœ˜(Kšœœ˜&˜šœœœ˜4K˜ K˜K˜ K˜ Kšœœ˜—Kšœœ˜ Kšœ œ˜'Kšœ˜Kšœœœœ˜*K˜—Kšœ˜—Kšœ˜—K˜K˜—K˜Kšœ˜K˜—…—Έ§