<> <> <> <> <> <> <> <> <> <> DIRECTORY Rope USING [ROPE], TextFind USING [Finder], TextNode USING [Ref, RefTextNode]; TreeFind: CEDAR DEFINITIONS = BEGIN Ref: TYPE = TextNode.Ref; RefTextNode: TYPE = TextNode.RefTextNode; ROPE: TYPE = Rope.ROPE; Finder: TYPE = TextFind.Finder; Create: PROC [pattern: RefTextNode, literal, word, ignoreLooks, ignoreCase, addBounds: BOOL _ FALSE, patternStart: INT _ 0, patternLen: INT _ LAST[INT]] RETURNS [Finder]; <> <> <> <> <> <> <> <> CreateFromRope: PROC [pattern: ROPE, literal, word, ignoreCase, addBounds: BOOL _ FALSE, patternStart: INT _ 0, patternLen: INT _ LAST[INT]] RETURNS [Finder]; CommentControl: TYPE = { includeComments, excludeComments, commentsOnly }; Try: PROC [finder: Finder, first: Ref, start: INT _ 0, last: Ref _ NIL, lastLen: INT _ LAST[INT], looksExact: BOOL _ FALSE, commentControl: CommentControl _ includeComments, checkFormat: BOOL _ FALSE, format: ATOM _ NIL, checkStyle: BOOL _ FALSE, style: ATOM _ NIL, styleProc: PROC [Ref] RETURNS [ATOM] _ NIL, interrupt: REF BOOL _ NIL ] RETURNS [found: BOOL, where: RefTextNode, at, atEnd, before, after: INT]; <> <> <> <> <> <> < atEnd if used } in pattern>> <> <> <> <> <> <> <> <> TryBackwards: PROC [ finder: Finder, first: Ref, len: INT _ LAST[INT], last: Ref _ NIL, lastStart: INT _ 0, looksExact: BOOL _ FALSE, commentControl: CommentControl _ includeComments, checkFormat: BOOL _ FALSE, format: ATOM _ NIL, checkStyle: BOOL _ FALSE, style: ATOM _ NIL, styleProc: PROC [Ref] RETURNS [ATOM] _ NIL, interrupt: REF BOOL _ NIL ] RETURNS [found: BOOL, where: RefTextNode, at, atEnd, before, after: INT]; <> <> <> Apply: PROC [ finder: Finder, first: Ref, proc: ApplyProc, start: INT _ 0, last: Ref _ NIL, lastLen: INT _ LAST[INT], looksExact: BOOL _ FALSE, commentControl: CommentControl _ includeComments, checkFormat: BOOL _ FALSE, format: ATOM _ NIL, checkStyle: BOOL _ FALSE, style: ATOM _ NIL, styleProc: PROC [Ref] RETURNS [ATOM] _ NIL ] RETURNS [count: LONG INTEGER]; <> ApplyProc: TYPE = PROC [where: RefTextNode, at, atEnd, before, after: INT] RETURNS [continue, bumpCount: BOOL, from, delta: INT]; <> <> <> <> <> <> <<>> END.