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