diff options
author | Alex AUVOLAT <alex.auvolat@ens.fr> | 2014-04-30 17:19:08 +0200 |
---|---|---|
committer | Alex AUVOLAT <alex.auvolat@ens.fr> | 2014-04-30 17:19:08 +0200 |
commit | bcde99fbe99174a094f38fdda70ad69d65a423f4 (patch) | |
tree | 21e16494aba19c4a63d55eba877abfe7fe5d8e80 /main.ml | |
download | SemVerif-Projet-bcde99fbe99174a094f38fdda70ad69d65a423f4.tar.gz SemVerif-Projet-bcde99fbe99174a094f38fdda70ad69d65a423f4.zip |
Fist commit (WIP)
Diffstat (limited to 'main.ml')
-rw-r--r-- | main.ml | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -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 () |