Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
60 lines (48 sloc) 2.05 KB
(************************************************************************)
(* v * The Coq Proof Assistant / The Coq Development Team *)
(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2010 *)
(* \VV/ **************************************************************)
(* // * This file is distributed under the terms of the *)
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
open Compat
open Pp
open Names
open Constrexpr
open Notation_term
open Pcoq
open Extend
open Vernacexpr
open Ppextend
open Genarg
open Egramml
(** Mapping of grammar productions to camlp4 actions *)
(** This is the part specific to Coq-level Notation and Tactic Notation.
For the ML-level tactic and vernac extensions, see Egramml. *)
(** For constr notations *)
type grammar_constr_prod_item =
| GramConstrTerminal of Tok.t
| GramConstrNonTerminal of constr_prod_entry_key * identifier option
| GramConstrListMark of int * bool
(* tells action rule to make a list of the n previous parsed items;
concat with last parsed list if true *)
type notation_grammar =
int * gram_assoc option * notation * grammar_constr_prod_item list list
(** Adding notations *)
type all_grammar_command =
| Notation of
(precedence * tolerability list)
* notation_var_internalization_type list
(** not needed for defining grammar, hosted by egrammar for
transmission to interp_aconstr (via recover_notation_grammar) *)
* notation_grammar
| TacticGrammar of
(string * int * grammar_prod_item list *
(dir_path * Tacexpr.glob_tactic_expr))
val extend_grammar : all_grammar_command -> unit
(** For a declared grammar, returns the rule + the ordered entry types
of variables in the rule (for use in the interpretation) *)
val recover_notation_grammar :
notation -> (precedence * tolerability list) ->
notation_var_internalization_type list * notation_grammar
val with_grammar_rule_protection : ('a -> 'b) -> 'a -> 'b
Something went wrong with that request. Please try again.