Commit d93bc87b authored by Bruno Guillaume's avatar Bruno Guillaume
Browse files

add an argument -force for compile mode

parent c9adc82c
......@@ -36,6 +36,7 @@ module Grew_args = struct
let config = ref (Conllx_config.build "ud") (* "ud" is used as default value. *)
let grew_match_server = ref None
let force = ref false
let help () = List.iter (fun x -> Printf.printf "%s\n" x) [
"----------------------------------------------------------";
......@@ -125,6 +126,7 @@ module Grew_args = struct
| "-json" :: args -> output := Json; loop args
| "-grew_match_server" :: dir :: args -> grew_match_server := Some dir; loop args
| "-force" :: args -> force := true; loop args
| "-safe_commands" :: args -> Libgrew.set_safe_commands true; loop args
| "-track_rules" :: args -> Libgrew.set_track_rules true; loop args
......
......@@ -190,7 +190,7 @@ let compile () =
let corpus_desc_list = Corpus_desc.load_json json_file in
List.iter
(fun corpus_desc ->
Corpus_desc.compile ?grew_match corpus_desc
Corpus_desc.compile ~force:!Grew_args.force ?grew_match corpus_desc
) corpus_desc_list
) !Grew_args.input_data
) ()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment