<> <> <> <> <> DIRECTORY IO USING [STREAM], RegularExpression USING [Finder], Rope USING [ROPE]; Grep: CEDAR DEFINITIONS = { Switches: TYPE = {oncePerLine, textOnly, locations, verbose, fileNamesOnly, except, quiet}; 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]; }.