anchor.diff:  
   #endif
   
  -open System.Text.RegularExpressions 
  -
  -//printfn "result as AST:  %A" result
  -//printfn "result as term: %s" (NHol.printer.string_of_term result)
  +open System.Text.RegularExpressions
   
   /// Convert a path to a list of absolute file names.
   // A path can be absolute or relative, a directory or file, or empty.
  
positive.code:         regex.Matches(fileText)
          |> Seq.cast 
          |> Seq.toList 
      let rec processMatchList lineNumber acc matches=
          match matches with
          | (hd : Match) :: tl ->
              let acc = (lineNumber, hd.Captures.[0].Index) :: acc
              processMatchList (lineNumber + 1) acc tl 
          | [] -> List.rev  acc
      getMatches fileName pattern
      |> processMatchList 1 [(0,0)] 
      |> Map.ofList
  
  /// Given an offset in a file return the line number.
  // Note: This processes the map sequentially. 
  // Could probably be enhanced using a differnt data structure
  // or using a binary search algorithm.
  let lineNumberLookup lineNumberMap offset : int =
      let rec findLine offset checkLineNumber =
          match Map.tryFind checkLineNumber lineNumberMap with
          | Some(lineEnd) ->
              if offset > lineEnd
              then findLine offset (checkLineNumber + 1)
              else checkLineNumber
          | None -> 0
      findLine offset 1
  
  /// Returns tuple of (filename, linenumber, Match) for all matches against all filesnames for all patterns.
  let getMatches (filenames : string list) (patterns : string list) : (string * int * Match) list =                
      let rec processFiles (pattern : string) (filenames : string list) acc =
          match filenames with
          | fileName :: tl ->
  
negative.code:         then NHol.parser.parse_type parseString |> ignore
          else failwith ("Unknow parse function: " + parseFunction)
          let msg = parseFunction + " successful."
          (fileName, lineNumber, offset, regexMatch, parseString, msg) :: acc
      with
      | _ -> acc
  
  /// Use to pass functionName with no condtions.
  let functionNameAlwaysCondition (item : (string * int * int * Match)) acc : (string * int * int * Match * string * string) list =
      let (fileName, lineNumber, offset, regexMatch) = item
      let functionName = regexMatch.Groups.["functionName"].Value
      (fileName, lineNumber, offset, regexMatch, functionName, "") :: acc
      
  /// Adds a message to the list if a HOL Light name is found.
  let holLightNameCondition (item : (string * int * int * Match)) acc : (string * int * int * Match * string * string) list =
      let (fileName, lineNumber, offset, regexMatch) = item
      let functionName = regexMatch.Groups.["functionName"].Value
      let functionNameCondition = 
  //        functionName.ToUpper() = functionName &&
          offset = 0 &&
          Regex.IsMatch(functionName, @"^[A-Z0-9_]+$")
      if functionNameCondition 
      then (fileName, lineNumber, offset, regexMatch, functionName, "") :: acc
      else acc
  
  /// Process the matches to build a list of messages based on the condtions.
  let processConditions conditions info  : (string * int * int * Match * string * string) list =
      let rec processConditions (item : (string * int * int * Match)) conditions acc : (string * int * int * Match * string * string) list =
          match conditions with
          | condition :: tl ->
              let acc = condition item acc
              processConditions item tl acc
          | [] -> acc
      let rec prcessInfo (info : (string * int * int * Match) list) conditions acc : (string * int * int * Match * string * string) list =
          match info with
          | hd :: tl -> 
              let acc = processConditions hd conditions acc
  