(** Time-stamp: <modified the 14/08/2008 (at 15:31) by Erwan Jahier> *) (** Some global variables. It is quite ugly, but all this kind of uglyness is here and nowhere else *) (* to compute line/col *) let line_num = ref 1 let line_start_pos = ref 0 let (outfile:string ref) = ref "" let (infiles:string list ref) = ref [] let current_file = ref "" let main_node = ref "" let compile_all_items = ref false let run_unit_test = ref false let one_op_per_equation = ref true (* the output channel *) let oc = ref Pervasives.stdout (* those functions are here as they modify some global vars *) let add_infile file_name = infiles := !infiles@[file_name] let lexbuf_of_file_name file = let inchannel = Verbose.print_string ~level:1 (* ("Opening file " ^ (Filename.concat (Sys.getcwd ()) file) ^ "\n"); *) ("Opening file " ^ (file) ^ "\n"); open_in file in line_num := 1; line_start_pos := 0; current_file := file; Lexing.from_channel inchannel