def pairparse(ts)
    (typ, _, k), ts = ts[0], ts[1..-1]
    if typ != :str
      raise Error, "unexpected #{k.inspect}"
    end
    ts = eat(':', ts)
    v, ts = valparse(ts)
    [k, v, ts]
  end
def pairparse(ts)
    (typ, _, k), ts = ts[0], ts[1..-1]
    if typ != :str
      raise Error, "unexpected #{k.inspect}"
    end
    ts = eat(':', ts)
    v, ts = valparse(ts)
    [k, v, ts]
  end
Parses a "member" in the sense of RFC 4627.
 Returns the parsed values and any trailing tokens.