   check(expected, "forward, repairing: true")
   do {
     var iterator = utfStr.reversed().makeIterator()
-    let errorCount = Codec.ReverseDecoder.decode(
+    let errorCount = Codec.ReverseParser.decode(
       &iterator, repairingIllFormedSequences: true, into: output1)
     if expectedRepairedTail.isEmpty { expectEqual(0, errorCount) }
     else { expectNotEqual(0, errorCount) }

    return EncodedScalar(_storage: 0xbdbfef, _bitCount: 24)
  }

  public static func _isScalar(_ x: CodeUnit) -> Bool {
    return x & 0x80 == 0
  }


extension Unicode {
  struct ParsingIterator<
    CodeUnitIterator : IteratorProtocol, 
    Parser: UnicodeParser
  > where Parser.Encoding.CodeUnit == CodeUnitIterator.Element {
    var codeUnits: CodeUnitIterator
    var parser: Parser
  }
}

extension Unicode.ParsingIterator : IteratorProtocol, Sequence {
  mutating func next() -> Parser.Encoding.EncodedScalar? {
    switch parser.parseScalar(from: &codeUnits) {
    case let .valid(scalarContent): return scalarContent
    case .invalid: return Parser.Encoding.encodedReplacementCharacter
    case .emptyInput: return nil
    }
  }
