(************************************************************************) (* * The Rocq Prover / The Rocq Development Team *) (* v * Copyright INRIA, CNRS and contributors *) (* <O___,, * (see version control and CREDITS file for authors & dates) *) (* \VV/ **************************************************************) (* // * This file is distributed under the terms of the *) (* * GNU Lesser General Public License Version 2.1 *) (* * (see LICENSE file for the text of the license) *) (************************************************************************)
open Util open Pp open Notationextern open Notation open Constrexpr
(*s Pretty-print. *)
type ppbox =
| PpHB
| PpHOVB of int
| PpHVB of int
| PpVB of int
type ppcut =
| PpBrk of int * int
| PpFnl
let ppcmd_of_box = function
| PpHB -> h
| PpHOVB n -> hov n
| PpHVB n -> hv n
| PpVB n -> v n
let ppcmd_of_cut = function
| PpFnl -> fnl ()
| PpBrk(n1,n2) -> brk(n1,n2)
type pattern_quote_style = QuotedPattern | NotQuotedPattern
type unparsing =
| UnpMetaVar of notation_entry_relative_level
| UnpBinderMetaVar of notation_entry_relative_level * pattern_quote_style
| UnpListMetaVar of notation_entry_relative_level * unparsing list
| UnpBinderListMetaVar of bool(* true if open binder *) * bool(* true if printed with a quote *) *
unparsing list
| UnpTerminal ofstring
| UnpBox of ppbox * unparsing Loc.located list
| UnpCut of ppcut
let has_generic_notation_printing_rule ntn = try (NotationMap.find ntn !generic_notation_printing_rules).notation_printing_reserved with Not_found -> false
let find_generic_notation_printing_rule ntn =
NotationMap.find ntn !generic_notation_printing_rules
let find_specific_notation_printing_rule specific_ntn =
SpecificNotationMap.find specific_ntn !specific_notation_printing_rules
let find_notation_printing_rule which ntn = trymatch which with
| None -> raise Not_found (* Normally not the case *)
| Some which -> (find_specific_notation_printing_rule (which,ntn)) with Not_found -> (find_generic_notation_printing_rule ntn).notation_printing_rules
¤ Dauer der Verarbeitung: 0.15 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.