aboutsummaryrefslogtreecommitdiffhomepage
path: root/toplevel/metasyntax.mli
blob: 0c84a3ead7605d4232c7782a0e113e206c464e1e (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
(***********************************************************************)
(*  v      *   The Coq Proof Assistant  /  The Coq Development Team    *)
(* <O___,, *        INRIA-Rocquencourt  &  LRI-CNRS-Orsay              *)
(*   \VV/  *************************************************************)
(*    //   *      This file is distributed under the terms of the      *)
(*         *       GNU Lesser General Public License Version 2.1       *)
(***********************************************************************)

(*i $Id$ i*)

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

(* Adding grammar and pretty-printing objects in the environment *)

val add_syntax_obj : string -> raw_syntax_entry list -> unit

val add_grammar_obj : string -> raw_grammar_entry list -> unit
val add_token_obj : string -> unit
val add_tactic_grammar :
  (string * (string * grammar_production list) * raw_tactic_expr) list -> unit

val add_infix :
  grammar_associativity -> precedence -> string -> reference -> bool ->
    (grammar_associativity * precedence * string) option ->
      scope_name option -> unit
val add_distfix :
  grammar_associativity -> precedence -> string -> reference
    -> scope_name option -> unit
val add_delimiters : scope_name -> string -> unit

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

val add_syntax_extension : string -> syntax_modifier list -> unit

val print_grammar : string -> string -> unit

val interp_infix_modifiers : Gramext.g_assoc option -> int option -> 
  syntax_modifier list -> Gramext.g_assoc option * int * bool