summaryrefslogtreecommitdiff
path: root/toplevel/metasyntax.mli
blob: fefc0b279442791a61caec16f6f5bbeb5ba8ceb3 (plain)
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
(************************************************************************)
(*  v      *   The Coq Proof Assistant  /  The Coq Development Team     *)
(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
(*   \VV/  **************************************************************)
(*    //   *      This file is distributed under the terms of the       *)
(*         *       GNU Lesser General Public License Version 2.1        *)
(************************************************************************)

(*i $Id: metasyntax.mli 11481 2008-10-20 19:23:51Z herbelin $ i*)

(*i*)
open Util
open Libnames
open Ppextend
open Extend
open Tacexpr
open Vernacexpr
open Notation
open Topconstr
(*i*)

val add_token_obj : string -> unit

(* Adding a tactic notation in the environment *)

val add_tactic_notation : 
  int * grammar_production list * raw_tactic_expr -> unit

(* Adding a (constr) notation in the environment*)

val add_infix : locality_flag -> (string * syntax_modifier list) ->
  reference -> scope_name option -> unit

val add_notation : locality_flag -> constr_expr ->
  (string * syntax_modifier list) -> scope_name option -> unit

(* Declaring delimiter keys and default scopes *)

val add_delimiters : scope_name -> string -> unit
val add_class_scope : scope_name -> Classops.cl_typ -> unit

(* Add only the interpretation of a notation that already has pa/pp rules *)

val add_notation_interpretation : string -> Constrintern.implicits_env ->
  constr_expr -> scope_name option -> unit

(* Add only the parsing/printing rule of a notation *)

val add_syntax_extension : 
  locality_flag -> (string * syntax_modifier list) -> unit

(* Print the Camlp4 state of a grammar *)

val print_grammar : string -> unit

(* Removes quotes in a notation *)

val standardize_locatable_notation : string -> string

(* Evaluate whether a notation is not printable *)

val is_not_printable : aconstr -> bool