<> <> <> DIRECTORY IO USING [STREAM], RegularExpression USING [Finder], Rope USING [ROPE]; Grep: CEDAR DEFINITIONS = { Switches: TYPE = {oncePerLine, textOnly, positionsOnly, verbose, fileNamesOnly}; SwitchSettings: TYPE = ARRAY Switches OF BOOLEAN; GetSwitches: PROC[cmdLine: LIST OF Rope.ROPE, prefixLen: INT _ 2] RETURNS[ switches: SwitchSettings, remainder: LIST OF Rope.ROPE ]; RegularOutput: PROC[switches: SwitchSettings] RETURNS[ yes: BOOL ]; <> GrepStream: PROC[ pattern: RegularExpression.Finder, inStream, outStream: IO.STREAM, switches: SwitchSettings, fileName: Rope.ROPE, interrupt: REF BOOL ] RETURNS [numberOfHits: INT]; }.