loc.mli 2.03 KB
Newer Older
1 2
(**************************************************************************)
(*                                                                        *)
3
(*  Copyright (C) 2010-2011                                               *)
MARCHE Claude's avatar
MARCHE Claude committed
4 5 6
(*    François Bobot                                                     *)
(*    Jean-Christophe Filliâtre                                          *)
(*    Claude Marché                                                      *)
7
(*    Andrei Paskevich                                                    *)
8 9 10 11 12 13 14 15 16 17 18
(*                                                                        *)
(*  This software is free software; you can redistribute it and/or        *)
(*  modify it under the terms of the GNU Library General Public           *)
(*  License version 2.1, with the special exception on linking            *)
(*  described in file LICENSE.                                            *)
(*                                                                        *)
(*  This software 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.                  *)
(*                                                                        *)
(**************************************************************************)
19 20 21

open Format

22
(* Lexing locations *)
23

24 25 26
val current_offset : int ref
val reloc : Lexing.position -> Lexing.position
val set_file : string -> Lexing.lexbuf -> unit
27

28 29
val transfer_loc : Lexing.lexbuf -> Lexing.lexbuf -> unit

30
(* locations in files *)
31

32
type position
33

34 35
val extract : Lexing.position * Lexing.position -> position
val join : position -> position -> position
36

37
exception Located of position * exn
38

39 40
val dummy_position : position

41
val user_position : string -> int -> int -> int -> position
42

43
val get : position -> string * int * int * int
44

45
val compare : position -> position -> int
46 47 48

val gen_report_position : formatter -> position -> unit

49
val report_position : formatter -> position -> unit
50