let location_of_string s = try let f a b = `Linechar(a,b) in Some (Scanf.sscanf s "%d,%d" f) with _ -> try Some (`Char(Cam_misc.my_int_of_string s)) with _ -> None