(* errormsg.mli *) (* 15-411 *) (* by Benjamin Vernot, Peter Lee, Roland Flury *) (* @version $Id: errormsg.mli,v 1.2 2004/10/10 02:11:35 ajo Exp $ *) type pos = (int * int) (***********************************************************************) (* Flags, debug-printing *) (***********************************************************************) (* debug printing *) val debug : bool ref (* Print a debug-msg if debug is set to true *) val print_debug : string -> unit (* Print a debug-msg with |Printf.printf| formatting *) val debugf : ('a, unit, string) format -> 'a (* Print warnings if set *) val warningFlag : bool ref (***********************************************************************) (* Functions that are called from within the lexer *) (***********************************************************************) (* Initialize current-struct mainly with file-name *) val startFile : string -> unit (* Called for each newline *) val startNewline : int -> unit (* Called when a new file is scanned *) val startNewFile : int -> string -> int -> unit (***********************************************************************) (* Error messages *) (***********************************************************************) (* Prints an error message *) val error : pos -> string -> unit (* Prints a warning *) val warning : pos -> string -> unit (* Tells how many fatal errors or warnings have been encountered *) val current_errors : unit -> int val current_warnings : unit -> int