2002-02-08 02:14:31 -08:00
|
|
|
(***********************************************************************)
|
|
|
|
(* *)
|
2011-07-27 07:17:02 -07:00
|
|
|
(* OCaml *)
|
2002-02-08 02:14:31 -08:00
|
|
|
(* *)
|
|
|
|
(* Daniel de Rauglaudre, projet Cristal, INRIA Rocquencourt *)
|
|
|
|
(* *)
|
|
|
|
(* Copyright 2002 Institut National de Recherche en Informatique et *)
|
|
|
|
(* en Automatique. All rights reserved. This file is distributed *)
|
|
|
|
(* under the terms of the Q Public License version 1.0. *)
|
|
|
|
(* *)
|
|
|
|
(***********************************************************************)
|
|
|
|
|
|
|
|
open Format
|
|
|
|
|
2013-01-25 01:12:31 -08:00
|
|
|
type error =
|
|
|
|
| CannotRun of string
|
|
|
|
| WrongMagic of string
|
|
|
|
|
|
|
|
exception Error of error
|
2002-02-08 02:14:31 -08:00
|
|
|
|
|
|
|
val preprocess : string -> string
|
|
|
|
val remove_preprocessed : string -> unit
|
2015-09-11 04:58:31 -07:00
|
|
|
val file :
|
|
|
|
formatter -> tool_name:string -> string -> (Lexing.lexbuf -> 'a) -> string ->
|
|
|
|
'a
|
2014-10-02 00:37:08 -07:00
|
|
|
val apply_rewriters: ?restore:bool -> tool_name:string -> string -> 'a -> 'a
|
2015-09-11 04:58:31 -07:00
|
|
|
(** If [restore = true] (the default), cookies set by external
|
|
|
|
rewriters will be kept for later calls. *)
|
2014-10-02 00:37:08 -07:00
|
|
|
|
2015-09-11 04:58:31 -07:00
|
|
|
val apply_rewriters_str:
|
|
|
|
?restore:bool -> tool_name:string -> Parsetree.structure ->
|
|
|
|
Parsetree.structure
|
|
|
|
val apply_rewriters_sig:
|
|
|
|
?restore:bool -> tool_name:string -> Parsetree.signature ->
|
|
|
|
Parsetree.signature
|
2014-10-02 00:37:08 -07:00
|
|
|
|
|
|
|
|
2013-01-25 01:12:31 -08:00
|
|
|
val report_error : formatter -> error -> unit
|
2013-09-10 06:44:34 -07:00
|
|
|
|
|
|
|
|
2015-09-11 04:58:31 -07:00
|
|
|
val parse_implementation:
|
|
|
|
formatter -> tool_name:string -> string -> Parsetree.structure
|
|
|
|
val parse_interface:
|
|
|
|
formatter -> tool_name:string -> string -> Parsetree.signature
|
2015-07-17 07:31:05 -07:00
|
|
|
|
|
|
|
(* [call_external_preprocessor sourcefile pp] *)
|
|
|
|
val call_external_preprocessor : string -> string -> string
|
|
|
|
val open_and_check_magic : string -> string -> in_channel * bool
|
|
|
|
val read_ast : string -> string -> 'a
|