(***********************************************************************)
(*                                                                     *)
(*                                 GALAX                               *)
(*                           XML Query Engine                          *)
(*                                                                     *)
(*  Copyright 2000, Lucent Technologies.                               *)
(*  Distributed only by permission.                                    *)
(*                                                                     *)
(***********************************************************************)

(* $Id: finfo.mli,v 1.3 2002/10/27 20:02:51 simeon Exp $ *)

(* Module Finfo
   Description:
     This module is used to keep track of the original location of
     expressions in files during query processing. This is essentially
     used to provide accurate error messages.
*)

type finfo
    (* A file location *)

val current_file : string ref
    (* The file currently being parsed *)

val make_finfo : int -> int -> finfo
    (* Creates a file location *)

val bogus : finfo
    (* An empty file location *)

val finfo_to_string : finfo -> string
    (* Prints a location within a string *)

val parsing_locinfo : unit -> finfo
    (* Generates a file location during parsing *)

val lexing_locinfo : Lexing.lexbuf -> finfo
    (* Generates a file location during lexing *)

val extract : string -> finfo -> string
    (* Extracts the part of a string corresponding to a given file
       location *)

