let parse_file ?dir file =
try
with_input_file file begin fun ic ->
let conf = Lexers.conf_lines dir 1 (Printf.sprintf "file: %S" file) (Lexing.from_channel ic) in
add_config conf
end
with Lexers.Error msg -> raise (Lexers.Error (file ^ ": " ^ msg))