Add copyright notices and new function String.chomp
[ocaml.git] / camlp4 / Camlp4 / Register.mli
blobdf1180ffdd4b7d890e077014b76a5b0deb01a22e
1 (****************************************************************************)
2 (* *)
3 (* Objective Caml *)
4 (* *)
5 (* INRIA Rocquencourt *)
6 (* *)
7 (* Copyright 2006 Institut National de Recherche en Informatique et *)
8 (* en Automatique. All rights reserved. This file is distributed under *)
9 (* the terms of the GNU Library General Public License, with the special *)
10 (* exception on linking described in LICENSE at the top of the Objective *)
11 (* Caml source tree. *)
12 (* *)
13 (****************************************************************************)
15 (* Authors:
16 * - Daniel de Rauglaudre: initial version
17 * - Nicolas Pouillard: refactoring
20 module Plugin
21 (Id : Sig.Id) (Plugin : functor (Unit : sig end) -> sig end) : sig end;
23 module SyntaxPlugin
24 (Id : Sig.Id) (SyntaxPlugin : functor (Syn : Sig.Syntax) -> sig end) :
25 sig end;
27 module SyntaxExtension
28 (Id : Sig.Id) (SyntaxExtension : Sig.SyntaxExtension) : sig end;
30 module OCamlSyntaxExtension
31 (Id : Sig.Id)
32 (SyntaxExtension : functor (Syntax : Sig.Camlp4Syntax) -> Sig.Camlp4Syntax)
33 : sig end;
35 (** {6 Registering Parsers} *)
37 type parser_fun 'a =
38 ?directive_handler:('a -> option 'a) -> PreCast.Loc.t -> Stream.t char -> 'a;
40 value register_str_item_parser : parser_fun PreCast.Ast.str_item -> unit;
41 value register_sig_item_parser : parser_fun PreCast.Ast.sig_item -> unit;
42 value register_parser : parser_fun PreCast.Ast.str_item -> parser_fun PreCast.Ast.sig_item -> unit;
44 module Parser
45 (Id : Sig.Id) (Maker : functor (Ast : Sig.Ast) -> (Sig.Parser Ast).S) : sig end;
47 module OCamlParser
48 (Id : Sig.Id) (Maker : functor (Ast : Sig.Camlp4Ast) -> (Sig.Parser Ast).S) : sig end;
50 module OCamlPreCastParser
51 (Id : Sig.Id) (Parser : (Sig.Parser PreCast.Ast).S) : sig end;
53 (** {6 Registering Printers} *)
55 type printer_fun 'a =
56 ?input_file:string -> ?output_file:string -> 'a -> unit;
58 value register_str_item_printer : printer_fun PreCast.Ast.str_item -> unit;
59 value register_sig_item_printer : printer_fun PreCast.Ast.sig_item -> unit;
60 value register_printer : printer_fun PreCast.Ast.str_item -> printer_fun PreCast.Ast.sig_item -> unit;
62 module Printer
63 (Id : Sig.Id)
64 (Maker : functor (Syn : Sig.Syntax) -> (Sig.Printer Syn.Ast).S) :
65 sig end;
67 module OCamlPrinter
68 (Id : Sig.Id)
69 (Maker : functor (Syn : Sig.Camlp4Syntax) -> (Sig.Printer Syn.Ast).S) :
70 sig end;
72 module OCamlPreCastPrinter
73 (Id : Sig.Id) (Printer : (Sig.Printer PreCast.Ast).S) :
74 sig end;
76 (** {6 Registering Filters} *)
78 module AstFilter
79 (Id : Sig.Id) (Maker : functor (F : Sig.AstFilters) -> sig end) : sig end;
81 value declare_dyn_module : string -> (unit -> unit) -> unit;
82 value iter_and_take_callbacks : ((string * (unit -> unit)) -> unit) -> unit;
83 value loaded_modules : ref (list string);
85 module CurrentParser : (Sig.Parser PreCast.Ast).S;
86 module CurrentPrinter : (Sig.Printer PreCast.Ast).S;
88 value enable_ocaml_printer : unit -> unit;
89 value enable_ocamlr_printer : unit -> unit;
90 (* value enable_ocamlrr_printer : unit -> unit; *)
91 value enable_null_printer : unit -> unit;
92 value enable_dump_ocaml_ast_printer : unit -> unit;
93 value enable_dump_camlp4_ast_printer : unit -> unit;