Unified diff parsing function in OCaml.