(** * exemple.ml * ColorML_v2 project * (C) Lilian Besson, 2014 *) open Types;; open Parser;; open Lexer;; open Print;; ecrit_string "*****************************\n";; ecrit_string "* [ColorML MOcaml] Exemples *\n";; ecrit_string "*****************************\n";; ecrit_string "\t***************************\n";; ecrit_string "\tTest depuis une chaine :";; ecrit_string "\n\tNon coloré : \n";; affiche_string "let rec fact n = if (n=0) then 1 else n*fact(n-1);;\n(* calcule de la factorielle *)" ~color:false ();; ecrit_string "\n\tColoré : \n";; affiche_string "let rec fact n = if (n=0) then 1 else n*fact(n-1);;\n(* calcule de la factorielle *)" ~color:true ();; ecrit_string "\t**************************\n";; ecrit_string "\tTest depuis un fichier :";; (*ecrit_string "\n\tNon coloré, sans stats : \n";;*) (*affiche_fichier ~adresse_in:"exemple.ml" ~adresse_out:"stdout" ~stat:false ~adresse_stat:"stdout" ~color:false ();;*) ecrit_string "\n\tNon coloré, avec stats : \n";; affiche_fichier ~adresse_in:"exemple.ml" ~adresse_out:"stdout" ~stat:true ~adresse_stat:"stdout" ~color:false ();; ecrit_string "\n\tColoré, sans stats : \n";; affiche_fichier ~adresse_in:"exemple.ml" ~adresse_out:"stdout" ~stat:false ~adresse_stat:"stdout" ~color:true ();; ecrit_string "\n***********************************\n";; ecrit_string "* [ColorML MOcaml] Exemples finis *\n";; ecrit_string "***********************************\n";;