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
|
(***********************************************************************)
(* *)
(* 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. *)
(* *)
(***********************************************************************)
open Syntaxe;;
type erreur_de_type =
| Indfini of string (* variable utilise mais non dfinie *)
| Conflit of string * expr_type * expr_type (* conflit de types *)
| Arit of string * int * int (* mauvais nombre d'arguments *)
| Tableau_attendu (* [..] appliqu un non-tableau *)
| Tableau_interdit of string;; (* tableau renvoy en rsultat *)
exception Erreur_typage of erreur_de_type;;
val type_programme: programme -> unit;;
val affiche_erreur: erreur_de_type -> unit;;
val type_op_unaire: string -> expr_type * expr_type;;
val type_op_binaire: string -> expr_type * expr_type * expr_type;;
|