let parse_pref_labels s =
  let comma_re = Str.regexp "[ \t]*,[ \t]*" in
  let eq_re = Str.regexp "[ \t]*=[ \t]*" in
  List.map (fun s' ->
    match Str.split eq_re s with
    |[v] when (Str.string_match (Str.regexp "[0-9\\.]+") v 0) -> ("v",v)
    |[v] when (Str.string_match (Str.regexp "[a-zA-Z]+") v 0) -> ("a",v)
    |[l;v] -> (l,v)
    |-> fatal "To many commas in label %s" s
  ) (Str.split comma_re s)