(*********************************************************************************)
(*                OCaml-RDF                                                      *)
(*                                                                               *)
(*    Copyright (C) 2012-2024 Institut National de Recherche en Informatique     *)
(*    et en Automatique. All rights reserved.                                    *)
(*                                                                               *)
(*    This program is free software; you can redistribute it and/or modify       *)
(*    it under the terms of the GNU Lesser General Public License version        *)
(*    3 as published by the Free Software Foundation.                            *)
(*                                                                               *)
(*    This program is distributed in the hope that it will be useful,            *)
(*    but WITHOUT ANY WARRANTY; without even the implied warranty of             *)
(*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              *)
(*    GNU General Public License for more details.                               *)
(*                                                                               *)
(*    You should have received a copy of the GNU General Public License          *)
(*    along with this program; if not, write to the Free Software                *)
(*    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA                   *)
(*    02111-1307  USA                                                            *)
(*                                                                               *)
(*    Contact: Maxence.Guesdon@inria.fr                                          *)
(*                                                                               *)
(*********************************************************************************)

(** Locations. *)

type loc = { loc_start : Lexing.position; loc_end : Lexing.position; }

(** Dummy location. *)
val dummy_loc : loc

(** From the given utf8 string and start and stop characters, return
  the corresponding location. *)
val source_info_string : string -> int -> int -> loc

(** From the given file and start and stop characters, read
  the content of the file as utf8, and return the corresponding
  location. *)
val source_info_file : string -> int -> int -> loc

(** Return a string representing the given location. *)
val string_of_loc : loc -> string

(** Pretty-print the given location. *)
val pp : Format.formatter -> loc -> unit

