| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
open Names |
| 12 |
open Genarg |
| 13 |
open Constrexpr |
| 14 |
open Libnames |
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
include Gramlib.Grammar.S |
| 19 |
with type keyword_state := CLexer.keyword_state |
| 20 |
and type te := Tok.t |
| 21 |
and type 'a pattern := 'a Tok.p |
| 22 |
and type 'a with_gstate := 'a |
| 23 |
and type 'a with_kwstate := 'a |
| 24 |
and type 'a with_estate := 'a |
| 25 |
and type 'a mod_estate := 'a |
| 26 |
|
| 27 |
module Lookahead : sig |
| 28 |
type t |
| 29 |
val to_entry : string -> t -> unit Entry.t |
| 30 |
val (>>) : t -> t -> t |
| 31 |
val (<+>) : t -> t -> t |
| 32 |
val lk_empty : t |
| 33 |
val lk_list : t -> t |
| 34 |
val check_no_space : t |
| 35 |
val lk_kw : string -> t |
| 36 |
val lk_kws : string list -> t |
| 37 |
val lk_nat : t |
| 38 |
val lk_ident : t |
| 39 |
val lk_field : t |
| 40 |
val lk_name : t |
| 41 |
val lk_qualid : t |
| 42 |
val lk_ident_except : string list -> t |
| 43 |
val lk_ident_list : t |
| 44 |
end |
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
|
| 124 |
|
| 125 |
|
| 126 |
|
| 127 |
|
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
|
| 132 |
|
| 133 |
val parse_string : 'a Entry.t -> ?loc:Loc.t -> string -> 'a |
| 134 |
val eoi_entry : 'a Entry.t -> 'a Entry.t |
| 135 |
|
| 136 |
val create_generic_entry2 : string -> |
| 137 |
('a, rlevel) abstract_argument_type -> 'a Entry.t |
| 138 |
|
| 139 |
val register_grammar : ('raw, 'glb, 'top) genarg_type -> 'raw Entry.t -> unit |
| 140 |
val genarg_grammar : ('raw, 'glb, 'top) genarg_type -> 'raw Entry.t |
| 141 |
|
| 142 |
module Prim : |
| 143 |
sig |
| 144 |
open Names |
| 145 |
open Libnames |
| 146 |
val preident : string Entry.t |
| 147 |
val ident : Id.t Entry.t |
| 148 |
val name : lname Entry.t |
| 149 |
val identref : lident Entry.t |
| 150 |
val univ_decl : universe_decl_expr Entry.t |
| 151 |
val ident_decl : ident_decl Entry.t |
| 152 |
val pattern_ident : lident Entry.t |
| 153 |
val bignat : string Entry.t |
| 154 |
val natural : int Entry.t |
| 155 |
val bigint : string Entry.t |
| 156 |
val integer : int Entry.t |
| 157 |
val string : string Entry.t |
| 158 |
val lstring : lstring Entry.t |
| 159 |
val reference : qualid Entry.t |
| 160 |
val fields : (Id.t list * Id.t) Entry.t |
| 161 |
val qualid : qualid Entry.t |
| 162 |
val fullyqualid : Id.t list CAst.t Entry.t |
| 163 |
val by_notation : (string * string option) Entry.t |
| 164 |
val smart_global : qualid or_by_notation Entry.t |
| 165 |
val dirpath : DirPath.t Entry.t |
| 166 |
val ne_string : string Entry.t |
| 167 |
val ne_lstring : lstring Entry.t |
| 168 |
val hyp : lident Entry.t |
| 169 |
val bar_cbrace : unit Entry.t |
| 170 |
val strategy_level : Conv_oracle.level Entry.t |
| 171 |
end |
| 172 |
|
| 173 |
module Constr : |
| 174 |
sig |
| 175 |
val constr : constr_expr Entry.t |
| 176 |
val constr_eoi : constr_expr Entry.t |
| 177 |
val lconstr : constr_expr Entry.t |
| 178 |
val binder_constr : constr_expr Entry.t |
| 179 |
val term : constr_expr Entry.t |
| 180 |
val ident : Id.t Entry.t |
| 181 |
val global : qualid Entry.t |
| 182 |
val universe_name : sort_name_expr Entry.t |
| 183 |
val sort : sort_expr Entry.t |
| 184 |
val sort_quality_or_set : UnivGen.QualityOrSet.t Entry.t |
| 185 |
val sort_quality_var : quality_expr Entry.t |
| 186 |
val pattern : cases_pattern_expr Entry.t |
| 187 |
val constr_pattern : constr_expr Entry.t |
| 188 |
val cpattern : constr_expr Entry.t |
| 189 |
val closed_binder : local_binder_expr list Entry.t |
| 190 |
val binder : local_binder_expr list Entry.t |
| 191 |
val binders : local_binder_expr list Entry.t |
| 192 |
val open_binders : local_binder_expr list Entry.t |
| 193 |
val one_open_binder : kinded_cases_pattern_expr Entry.t |
| 194 |
val one_closed_binder : kinded_cases_pattern_expr Entry.t |
| 195 |
val binders_fixannot : (local_binder_expr list * fixpoint_order_expr option) Entry.t |
| 196 |
val typeclass_constraint : (lname * bool * constr_expr) Entry.t |
| 197 |
val record_declaration : constr_expr Entry.t |
| 198 |
val arg : (constr_expr * explicitation CAst.t option) Entry.t |
| 199 |
val type_cstr : constr_expr Entry.t |
| 200 |
end |
| 201 |
|
| 202 |
module Module : |
| 203 |
sig |
| 204 |
val module_expr : module_ast Entry.t |
| 205 |
val module_type : module_ast Entry.t |
| 206 |
end |
| 207 |
|
| 208 |
|
| 209 |
|
| 210 |
val epsilon_value : ('a -> 'self) -> ('self, _, 'a) Symbol.t -> 'self option |
| 211 |
|
| 212 |
|
| 213 |
|
| 214 |
val grammar_extend : ignore_kw:bool -> 'a Entry.t -> 'a extend_statement -> unit |
| 215 |
|
| 216 |
|
| 217 |
|
| 218 |
|
| 219 |
|
| 220 |
|
| 221 |
module GramState : Store.S |
| 222 |
|
| 223 |
|
| 224 |
val gramstate : unit -> GramState.t |
| 225 |
|
| 226 |
|
| 227 |
|
| 228 |
type 'a grammar_command |
| 229 |
|
| 230 |
|
| 231 |
|
| 232 |
type extend_rule = |
| 233 |
| ExtendRule : 'a Entry.t * 'a extend_statement -> extend_rule |
| 234 |
|
| 235 |
type 'a grammar_extension = { |
| 236 |
gext_fun : 'a -> GramState.t -> extend_rule list * GramState.t; |
| 237 |
gext_eq : 'a -> 'a -> bool; |
| 238 |
} |
| 239 |
|
| 240 |
|
| 241 |
|
| 242 |
|
| 243 |
|
| 244 |
val create_grammar_command : string -> 'a grammar_extension -> 'a grammar_command |
| 245 |
|
| 246 |
|
| 247 |
|
| 248 |
val extend_grammar_command : ignore_kw:bool -> 'a grammar_command -> 'a -> unit |
| 249 |
|
| 250 |
|
| 251 |
|
| 252 |
|
| 253 |
|
| 254 |
type ('a,'b) entry_extension = { |
| 255 |
|
| 256 |
eext_fun : 'a -> 'b Entry.t -> GramState.t -> GramState.t; |
| 257 |
|
| 258 |
eext_name : 'a -> string; |
| 259 |
|
| 260 |
eext_eq : 'a -> 'a -> bool; |
| 261 |
} |
| 262 |
|
| 263 |
type ('a,'b) entry_command |
| 264 |
|
| 265 |
|
| 266 |
val create_entry_command : string -> ('a,'b) entry_extension -> ('a,'b) entry_command |
| 267 |
|
| 268 |
|
| 269 |
val extend_entry_command : ('a,'b) entry_command -> 'a -> unit |
| 270 |
|
| 271 |
|
| 272 |
|
| 273 |
|
| 274 |
|
| 275 |
|
| 276 |
val register_grammars_by_name : string -> Entry.any_t list -> unit |
| 277 |
val find_grammars_by_name : string -> Entry.any_t list |
| 278 |
|
| 279 |
|
| 280 |
|
| 281 |
val with_grammar_rule_protection : ('a -> 'b) -> 'a -> 'b |
| 282 |
|
| 283 |
type frozen_t |
| 284 |
val parser_summary_tag : frozen_t Summary.Dyn.tag |
| 285 |
|
| 286 |
|
| 287 |
val freeze : unit -> frozen_t |
| 288 |
val unfreeze : frozen_t -> unit |
| 289 |
|
| 290 |
val get_keyword_state : unit -> CLexer.keyword_state |
| 291 |
|
| 292 |
val modify_keyword_state : (CLexer.keyword_state -> CLexer.keyword_state) -> unit |