1995-08-09 08:06:35 -07:00
|
|
|
(***********************************************************************)
|
|
|
|
(* *)
|
1996-04-30 07:53:58 -07:00
|
|
|
(* Objective Caml *)
|
1995-08-09 08:06:35 -07:00
|
|
|
(* *)
|
|
|
|
(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
|
|
|
|
(* *)
|
1996-04-30 07:53:58 -07:00
|
|
|
(* Copyright 1996 Institut National de Recherche en Informatique et *)
|
1995-08-09 08:06:35 -07:00
|
|
|
(* Automatique. Distributed only by permission. *)
|
|
|
|
(* *)
|
|
|
|
(***********************************************************************)
|
|
|
|
|
|
|
|
(* $Id$ *)
|
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
(* The interactive toplevel loop *)
|
|
|
|
|
|
|
|
val loop: unit -> unit
|
|
|
|
|
|
|
|
(* Interface with toplevel directives *)
|
|
|
|
|
|
|
|
type directive_fun =
|
|
|
|
Directive_none of (unit -> unit)
|
|
|
|
| Directive_string of (string -> unit)
|
|
|
|
| Directive_int of (int -> unit)
|
|
|
|
| Directive_ident of (Longident.t -> unit)
|
|
|
|
|
|
|
|
val directive_table: (string, directive_fun) Hashtbl.t
|
|
|
|
(* Table of known directives, with their execution function *)
|
1995-09-02 11:55:37 -07:00
|
|
|
val execute_phrase: Parsetree.toplevel_phrase -> bool
|
|
|
|
(* Execute the given toplevel phrase. Return [true] if the
|
|
|
|
phrase executed with no errors and [false] otherwise. *)
|
1995-05-04 03:15:53 -07:00
|
|
|
val print_exception_outcome: exn -> unit
|
|
|
|
(* Print an exception resulting from the evaluation of user code. *)
|
|
|
|
val toplevel_env: Env.t ref
|
|
|
|
(* Typing environment for the toplevel *)
|
1996-05-22 05:43:11 -07:00
|
|
|
val parse_toplevel_phrase : (Lexing.lexbuf -> Parsetree.toplevel_phrase) ref
|