File ‹context_parsers.ML›
@{parse_entries (sig) PARSE_CONTEXT_PARSERS_ARGS [add, del, default]}
signature CONTEXT_PARSERS =
sig
structure Parsers_Data : GENERIC_TABLE_DATA
where type key = Zippy_Identifier.id
where type value = unit context_parser
val get_parsers_table : Context.generic -> Parsers_Data.table
structure Default_Data : GENERIC_DATA
where type T = Parsers_Data.key option
val pretty_Data : Proof.context -> Pretty.T
val get_default : Context.generic -> Parsers_Data.key option
val map_default : (Parsers_Data.key option -> Parsers_Data.key option) ->
Context.generic -> Context.generic
val insert : Parsers_Data.key * Parsers_Data.value -> Context.generic -> Context.generic
val delete : Parsers_Data.key -> Context.generic -> Context.generic
val binding : Binding.binding
val add_arg_parser : ML_Code_Util.code list parser
val del_arg_parser : ML_Code_Util.code list parser
val default_arg_parser : ML_Code_Util.code option parser
val add_attribute : ML_Code_Util.code list * Position.T -> attribute
val del_attribute : ML_Code_Util.code list * Position.T -> attribute
val default_attribute : ML_Code_Util.code option * Position.T -> attribute
val parse_attribute : attribute parser
val setup_attribute : string option -> local_theory -> local_theory
val parsers_separator : string
val parse : Parsers_Data.key list context_parser
end
functor Context_Parsers(
structure FI : FUNCTOR_INSTANCE_BASE
val parent_logger : Logger.logger_binding
val parsers_separator : string
) : CONTEXT_PARSERS =
struct
val logger = Logger.setup_new_logger parent_logger "Context_Parsers"
structure FI = Functor_Instance(FI)
structure Id = Zippy_Identifier
structure MCU = ML_Code_Util
structure PU = Parse_Util
structure PKV = Parse_Key_Value
structure Show = SpecCheck_Show_Base