- "Errors obtained during phase " ^ string_of_int n ^":\n" ^
- String.concat "\n" (List.map Lazy.force phase) ^ "\n" ^ "\n"
+ "***** Errors obtained during phase " ^ string_of_int n ^": *****\n"^
+ String.concat "\n\n"
+ (List.map (fun (floc,msg) ->
+ let loc_descr =
+ match floc with
+ None -> ""
+ | Some floc ->
+ let (x, y) = HExtlib.loc_of_floc floc in
+ sprintf " at %d-%d" (x+offset) (y+offset)
+ in
+ "*Error" ^ loc_descr ^ ": " ^ Lazy.force msg) phase) ^
+ "\n\n\n" in
+ let loc =
+ match errorll with
+ ((Some floc,_)::_)::_ ->
+ let (x, y) = HExtlib.loc_of_floc floc in
+ let x = x + offset in
+ let y = y + offset in
+ let flocb,floce = floc in
+ let floc =
+ {flocb with Lexing.pos_cnum = x}, {floce with Lexing.pos_cnum = y}
+ in
+ Some floc
+ | _ -> None