1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
(***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
(* Pierre Weis, projet Cristal, INRIA Rocquencourt *)
(* *)
(* Copyright 2001 Institut National de Recherche en Informatique et *)
(* en Automatique. All rights reserved. This file is distributed *)
(* only by permission. *)
(* *)
(***********************************************************************)
let compile f =
match Sys.command ("ocamlc -c " ^ f) with
| 0 -> ()
| _ -> failwith ("Cannot compile " ^ f);;
compile "lexuniv.mli";;
compile "lexuniv.ml";;
#load "lexuniv.cmo";;
compile "syntaxe.mli";;
compile "syntaxe.ml";;
#load "syntaxe.cmo";;
compile "valeur.mli";;
compile "valeur.ml";;
#load "valeur.cmo";;
print_string "coucou"; print_newline();;
compile "envir.mli";;
compile "envir.ml";;
#load "envir.cmo";;
compile "interp.mli";;
compile "interp.ml";;
#load "interp.cmo";;
compile "typage.mli";;
compile "typage.ml";;
#load "typage.cmo";;
compile "ipascal.ml";;
#load "ipascal.cmo";;
compile "compil.mli";;
compile "compil.ml";;
#load "compil.cmo";;
compile "cpascal.ml";;
#load "cpascal.cmo";;
open Ipascal;;
open Cpascal;;
print_string
"Pour lancer:\n \
interprte_fichier \"fichier source\";;\n \
compile_fichier \"fichier source\";;\n\n\
Par exemple:\n \
compile_fichier \"fib2.p\";;\n \
ou encore\n \
compile_fichier \"reines.p\";;\n";
print_newline ();;
|