let process_file (s : string) =
let _ = if !Options.reset then reset_all () in
try
let channel = open_in s in
(try
let lexbuf = Lexing.from_channel channel in
Printf.printf "# Processing file %s\n" s;
flush stdout;
process lexbuf;
close_in_noerr channel
with Options.Known_error ->
(* Stop execution if abort-on-errors was specified *)
close_in_noerr channel;
if not (!Options.noerr) then exit(-1))
with Sys_error _ ->
printerror ("Failed to open " ^ s);
if not (!Options.noerr) then exit(-1)