anchor.diff:          |> raise
   
   let rec private parseCharSet_impl i state (xs: ResizeArray<_>) (pos: inref<_>) (data: ReadOnlySpan<_>) =
  -
       if i = data.Length then
           match state with
           | Empty -> ()
  
positive.code:             addRange cFrom cTo i xs &pos data
              parseCharSet_impl (i + 1) Empty xs &pos data
  
  let private parseCharSet (pos: inref<_>) data =
      parseCharSet_impl 0 Empty (ResizeArray()) &pos data
  
  let private unescapeString escapeChar (data: ReadOnlySpan<char>) =
      let sb = StringBuilder(data.Length)
  
negative.code:             char ']'
          ]
          |> terminal name (T(fun ctx data ->
              // We trim only the end of the span but instruct the parser
              // to begin after the starting characters. We keep them on
              // the span for accurate error position reporting.
              let data = data.Slice(0, data.Length - 1)
              parseCharSet start.Length &ctx.StartPosition data |> fChars))
  
      let predefinedSet = mkPredefinedSet "Predefined set" "\p{" chars
      let notPredefinedSet = mkPredefinedSet "All but Predefined set" "\P{" allButChars
  