From bcde99fbe99174a094f38fdda70ad69d65a423f4 Mon Sep 17 00:00:00 2001 From: Alex AUVOLAT Date: Wed, 30 Apr 2014 17:19:08 +0200 Subject: Fist commit (WIP) --- main.ml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 main.ml (limited to 'main.ml') diff --git a/main.ml b/main.ml new file mode 100644 index 0000000..2db911e --- /dev/null +++ b/main.ml @@ -0,0 +1,27 @@ +(* + Cours "Sémantique et Application à la Vérification de programmes" + + Antoine Miné 2014 + Ecole normale supérieure, Paris, France / CNRS / INRIA +*) + +(* + Simple driver: parses the file given as argument and prints it back. + + You should modify this file to call your functions instead! +*) + + +(* parse and print filename *) +let doit filename = + let prog = File_parser.parse_file filename in + Abstract_syntax_printer.print_prog Format.std_formatter prog + + +(* parses arguments to get filename *) +let main () = + match Array.to_list Sys.argv with + | _::filename::_ -> doit filename + | _ -> invalid_arg "no source file specified" + +let _ = main () -- cgit v1.2.3