(************************************************************************) (* * 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) *) (************************************************************************)
(** When one registers a keyword she can declare it starts a quotation. InparticularusingQUOTATION("name:")inagrammarrule declares"name:"asakeywordandthetokenQUOTATIONis matchedwheneverthekeywordisfollowedbyanidentifierora parenthesizedtext.Eg
Keywords don't need to end in ':' *) type starts_quotation = NoQuotation | Quotation
type keyword_state
val empty_keyword_state : keyword_state
val add_keyword : ?quotation:starts_quotation -> keyword_state -> string -> keyword_state
val is_keyword : keyword_state -> string -> bool val keywords : keyword_state -> CString.Set.t
val check_ident : string -> unit val is_ident : string -> bool val check_keyword : string -> unit
val add_keyword_tok : keyword_state -> 'c Tok.p -> keyword_state
(** When string is not an ident, returns a keyword. *) val terminal : keyword_state -> string -> string Tok.p
(** Precondition: the input is a number (c.f. [NumTok.t]) *) val terminal_number : string -> NumTok.Unsigned.t Tok.p
(** [after loc] Will advance a lexing location as the lexer does; this canbeusedtoimplementparsingresumptionfromagivenposition: {[ letloc=Procq.Parsable.locpa|>afterin letstr=Gramlib.Stream.of_stringtextin
(* Stream.count being correct is critical for Rocq's lexer *)
Gramlib.Stream.njunk loc.ep str; let pa = Procq.Parsable.make ~loc str in (* ready to resume parsing *)
]}
*) val after : Loc.t -> Loc.t
¤ 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.0.2Bemerkung:
¤
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 und die Messung sind noch experimentell.