(***********************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) (* string * string val rename_command : string -> string val subst_grammar_command : Names.substitution -> grammar_command -> grammar_command (*s Pretty-print. *) (* Dealing with precedences *) type precedence = int * int * int type parenRelation = L | E | Any | Prec of precedence type ppbox = | PpHB of int | PpHOVB of int | PpHVB of int | PpVB of int | PpTB (* unparsing objects *) type 'pat unparsing_hunk = | PH of 'pat * string option * parenRelation | RO of string | UNP_BOX of ppbox * 'pat unparsing_hunk list | UNP_BRK of int * int | UNP_TBRK of int * int | UNP_TAB | UNP_FNL | UNP_INFIX of Libnames.extended_global_reference * string * string * (parenRelation * parenRelation) (*val subst_unparsing_hunk : Names.substitution -> (Names.substitution -> 'pat -> 'pat) -> 'pat unparsing_hunk -> 'pat unparsing_hunk *) (* Checks if the precedence of the parent printer (None means the highest precedence), and the child's one, follow the given relation. *) type tolerability = (string * precedence) * parenRelation val tolerable_prec : tolerability option -> (string * precedence) -> bool val ppcmd_of_box : ppbox -> std_ppcmds -> std_ppcmds type 'pat syntax_entry = { syn_id : string; syn_prec: precedence; syn_astpat : 'pat; syn_hunks : 'pat unparsing_hunk list } val subst_syntax_entry : (Names.substitution -> 'pat -> 'pat) -> Names.substitution -> 'pat syntax_entry -> 'pat syntax_entry type 'pat syntax_command = { sc_univ : string; sc_entries : 'pat syntax_entry list } val subst_syntax_command : (Names.substitution -> 'pat -> 'pat) -> Names.substitution -> 'pat syntax_command -> 'pat syntax_command type syntax_rule = string * Coqast.t * Coqast.t unparsing_hunk list type syntax_entry_ast = precedence * syntax_rule list val interp_grammar_command : string -> (string * string -> entry_type) -> raw_grammar_entry list -> grammar_command val interp_syntax_entry : string -> syntax_entry_ast list -> Ast.astpat syntax_command