Dolmen_std.ParseLocationStandard implementation of file locations.
module type S = Dolmen_intf.Location.SAn anstract module type for providing locations. Used as argumentby much of the functors provided in Dolmen. This module (ParseLocation) implements this specification.
exception Uncaught of t * exnexception Lexing_error of t * stringexception Syntax_error of t * stringExceptions that may occur during parsing
val hash : t -> intval mk : string -> int -> int -> int -> int -> tval mk_pair : string -> (int * int) -> (int * int) -> tval mk_pos : Lexing.position -> Lexing.position -> tConstruction functions
val fmt : Format.formatter -> t -> unitval fmt_hint : Format.formatter -> t -> unitPrinting functions
Location that spans the two given positions. The file is assumed to be the same in both case, and is chosen from one of the two positions.
smaller p1 p2 is true if p1 is included in p2, ie p1 is a sub-location of p2 (interval inclusion)
val set_file : Lexing.lexbuf -> string -> unitChange the file name used for positions in this lexbuf
val mk_lexbuf : [ `Stdin | `File of string ] -> Lexing.lexbuf * (unit -> unit)Returns the lexbuf associetd with the given file or stdin, with the correct filename, together with a function to close the associated file descriptor.
val of_lexbuf : Lexing.lexbuf -> tRecover a position from a lexbuf