     }
   }
   
-  public struct ForwardDecoder {
-    public typealias Buffer = _UIntBuffer<UInt32, UInt8>
-    public init() { buffer = Buffer() }
-    public var buffer: Buffer
-  }
-  
-  public struct ReverseDecoder {
-    public typealias Buffer = _UIntBuffer<UInt32, UInt8>
-    public init() { buffer = Buffer() }
-    public var buffer: Buffer
-  }
-}
-
-extension UTF8.ReverseDecoder : _UTFDecoder {
+  public struct ForwardParser {
+    public typealias _Buffer = _UIntBuffer<UInt32, UInt8>
+    public init() { _buffer = _Buffer() }
+    public var _buffer: _Buffer
+  }
+  
+  public struct ReverseParser {
+    public typealias _Buffer = _UIntBuffer<UInt32, UInt8>
+    public init() { _buffer = _Buffer() }
+    public var _buffer: _Buffer
+  }
+}
+
+extension UTF8.ReverseParser : _UTFParser {
   public typealias Encoding = Unicode.UTF8
 
-  public // @testable
-  func _parseMultipleCodeUnits() -> (isValid: Bool, bitCount: UInt8) {
-    _sanityCheck(buffer._storage & 0x80 != 0) // this case handled elsewhere
-    if buffer._storage                & 0b0__1110_0000__1100_0000
-                                     == 0b0__1100_0000__1000_0000 {
+  public func _parseMultipleCodeUnits() -> (isValid: Bool, bitCount: UInt8) {
+    _sanityCheck(_buffer._storage & 0x80 != 0) // this case handled elsewhere
+    if _buffer._storage                & 0b0__1110_0000__1100_0000
+                                      == 0b0__1100_0000__1000_0000 {
       // 2-byte sequence.  Top 4 bits of decoded result must be nonzero
-      let top4Bits =  buffer._storage & 0b0__0001_1110__0000_0000
+      let top4Bits =  _buffer._storage & 0b0__0001_1110__0000_0000
       if _fastPath(top4Bits != 0) { return (true, 2*8) }
     }
-    else if buffer._storage     & 0b0__1111_0000__1100_0000__1100_0000
-                               == 0b0__1110_0000__1000_0000__1000_0000 {
+    else if _buffer._storage     & 0b0__1111_0000__1100_0000__1100_0000
+                                == 0b0__1110_0000__1000_0000__1000_0000 {
       // 3-byte sequence. The top 5 bits of the decoded result must be nonzero
       // and not a surrogate
-      let top5Bits = buffer._storage & 0b0__1111__0010_0000__0000_0000
+      let top5Bits = _buffer._storage & 0b0__1111__0010_0000__0000_0000
       if _fastPath(
-        top5Bits != 0 &&   top5Bits != 0b0__1101__0010_0000__0000_0000) {
+        top5Bits != 0 &&    top5Bits != 0b0__1101__0010_0000__0000_0000) {
         return (true, 3*8)
       }
     }
-    else if buffer._storage  & 0b0__1111_1000__1100_0000__1100_0000__1100_0000
+    else if _buffer._storage & 0b0__1111_1000__1100_0000__1100_0000__1100_0000
                             == 0b0__1111_0000__1000_0000__1000_0000__1000_0000 {
       // Make sure the top 5 bits of the decoded result would be in range
-      let top5bits = buffer._storage
+      let top5bits = _buffer._storage
                                   & 0b0__0111__0011_0000__0000_0000__0000_0000
       if _fastPath(
         top5bits != 0

  static func decode(_ content: Self.EncodedScalar) -> UnicodeScalar
}

public protocol UnicodeDecoder {
  associatedtype Encoding : _UnicodeEncodingBase
  
  init()

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