open Ast (* command line options *) let dump = ref false let ifile = ref "" let usage = "usage: analyzer [options] file.scade" let options = [ "--dump", Arg.Set dump, "Dump program source."; ] let () = Arg.parse options (fun f -> ifile := f) usage; if !ifile = "" then begin Format.eprintf "No input file...@."; exit 1 end; let prog = File_parser.parse_file !ifile in if !dump then Ast_printer.print_prog Format.std_formatter prog; () (* nothing to do yet ... *)