Newer
Older
(** Time-stamp: <modified the 11/03/2009 (at 16:14) by Erwan Jahier> *)
Erwan Jahier
committed
(* 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 true
Erwan Jahier
committed
let run_unit_test = ref false
let one_op_per_equation = ref true
let inline_iterator = ref false
let lv4 = ref false
let ec = ref false
let dont_expand_nodes : string list ref = ref []
let expand_enums = ref false
let expand_structs = ref false
Erwan Jahier
committed
(* the output channel *)
Erwan Jahier
committed
(* 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");
Erwan Jahier
committed
open_in file
in
line_num := 1;
line_start_pos := 0;
current_file := file;
Lexing.from_channel inchannel