Skip to content
Snippets Groups Projects

Resolve "add basic argument handling"

Merged aalbert requested to merge 1-add-basic-argument-handling into main
1 file
+ 13
2
Compare changes
  • Side-by-side
  • Inline
+ 13
2
open Dolmen
module M = Dimacs.Make(Std.Loc)(Std.Term)(Std.Statement)
let () = print_endline "Hello, World!"
let usage_msg = "project1 [--mode] ... [files]"
let input_files = ref []
let mode = ref "xor"
let anon_fun filename =
input_files := filename :: !input_files
let speclist =
[("--mode", Arg.Set_string mode, "Set working mode (xor or horn), default to xor");
("-m", Arg.Set_string mode, "Set working mode (xor or horn), default to xor")]
let () =
Arg.parse speclist anon_fun usage_msg;
List.iter print_endline !input_files;
print_endline !mode;
Loading