1
(************************************************************************)
2
(* v * The Coq Proof Assistant / The Coq Development Team *)
3
(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
4
(* \VV/ **************************************************************)
5
(* // * This file is distributed under the terms of the *)
6
(* * GNU Lesser General Public License Version 2.1 *)
7
(************************************************************************)
9
(*i $Id: toplevel.mli 5920 2004-07-16 20:01:26Z herbelin $ i*)
16
(* The Coq toplevel loop. *)
18
(* A buffer for the character read from a channel. We store the command
19
* entered to be able to report errors without pretty-printing. *)
22
mutable prompt : unit -> string;
23
mutable str : string; (* buffer of already read characters *)
24
mutable len : int; (* number of chars in the buffer *)
25
mutable bols : int list; (* offsets in str of begining of lines *)
26
mutable tokens : Pcoq.Gram.parsable; (* stream of tokens *)
27
mutable start : int } (* stream count of the first char of the buffer *)
29
(* The input buffer of stdin. *)
31
val top_buffer : input_buffer
32
val set_prompt : (unit -> string) -> unit
34
(* Toplevel error explanation, dealing with locations, Drop, Ctrl-D
35
May raise only the following exceptions: [Drop] and [End_of_input],
36
meaning we get out of the Coq loop. *)
38
val print_toplevel_error : exn -> std_ppcmds
40
(* Parse and execute a vernac command. *)
42
val do_vernac : unit -> unit
44
(* Main entry point of Coq: read and execute vernac commands. *)
46
val loop : unit -> unit