Debian Codegraph @

vernac/egramml.mli

raw symbols SCIP
1 (************************************************************************)
2 (* * The Rocq Prover / The Rocq Development Team *)
3 (* v * Copyright INRIA, CNRS and contributors *)
4 (* <O___,, * (see version control and CREDITS file for authors & dates) *)
5 (* \VV/ **************************************************************)
6 (* // * This file is distributed under the terms of the *)
7 (* * GNU Lesser General Public License Version 2.1 *)
8 (* * (see LICENSE file for the text of the license) *)
9 (************************************************************************)
10
11 open Vernacexpr
12
13 (** Mapping of grammar productions to camlp5 actions. *)
14
15 (** This is the part specific to vernac extensions.
16 For the Rocq-level Notation and Tactic Notation, see Egramrocq. *)
17
18 type 's grammar_prod_item =
19 | GramTerminal of string
20 | GramNonTerminal : ('a Genarg.raw_abstract_argument_type *
21 ('s, _, 'a) Procq.Symbol.t) Loc.located -> 's grammar_prod_item
22
23 val declare_vernac_command_grammar :
24 allow_override:bool -> extend_name -> vernac_expr Procq.Entry.t option ->
25 vernac_expr grammar_prod_item list -> unit
26
27 val extend_vernac_command_grammar : undoable:bool -> ignore_kw:bool -> extend_name -> unit
28
29 val grammar_extend
30 : ?plugin_uid:(string * string)
31 -> ignore_kw:bool
32 -> 'a Procq.Entry.t
33 -> 'a Procq.extend_statement
34 -> unit
35
36 val get_extend_vernac_rule : extend_name -> vernac_expr grammar_prod_item list
37
38 val proj_symbol : ('a, 'b, 'c) Extend.ty_user_symbol -> ('a, 'b, 'c) Genarg.genarg_type
39
40 (** Utility function reused in Egramrocq : *)
41
42 val make_rule :
43 (Loc.t -> Genarg.raw_generic_argument list -> 'a) ->
44 'a grammar_prod_item list -> 'a Procq.Production.t