text
stringlengths
12
786k
let o_name = function Name_v v -> v | _ -> assert false
let o_name_alias = function Name_alias_v v -> v | _ -> assert false
let o_numeric_type = function Numeric_type_v v -> v | _ -> assert false
let o_numeric_value = function Numeric_value_v v -> v | _ -> assert false
let o_script = function Script_v v -> v | _ -> assert false
let o_script_extensions = function Script_extensions_v v -> v | _ -> assert false
let o_sentence_break = function Sentence_break_v v -> v | _ -> assert false
let o_cps = function Cps_v v -> v | _ -> assert false
let o_cps_map = function Cps_map_v v -> v | _ -> assert false
let o_string = function String_v v -> v | _ -> assert false
let o_uax_42_element = function UAX_42_element_v v -> v | _ -> assert false
let o_vertical_orientation = function Vertical_orientation_v v -> v | _ -> assert false
let o_word_break = function Word_break_v v -> v | _ -> assert false
let i_age v = Age_v begin match v with try match List . map int_of_string ( split_string v ' . ' ) with | [ v1 ; v2 ; ] -> ` Version ( v1 , v2 ) | _ -> failwith " " with Failure _ -> err ( err_att_val v ) end
let i_bidi_class v = Bidi_class_v begin match v with end
let i_bidi_paired_bracket_type v = Bidi_paired_bracket_type_v begin match v with end
let i_block v = Block_v begin match v with end
let i_bool v = Bool_v begin match v with end
let i_bool_maybe v = Bool_maybe_v begin match v with end
let i_cp v = Cp_v ( cp_of_string v )
let i_cp_map v = if v = " " # then Cp_map_v ` Self else Cp_map_v ( ` Cp ( cp_of_string v ) )
let i_cp_opt v = if v = " " then Cp_opt_v None else Cp_opt_v ( Some ( cp_of_string v ) )
let i_cps ? empty v = Cps_v ( cps_of_string ? empty v )
let i_cps_map ? empty v = if v = " " # then Cps_map_v ` Self else Cps_map_v ( ` Cps ( cps_of_string ? empty v ) )
let i_decomposition_type v = Decomposition_type_v begin match v with end
let i_east_asian_width v = East_asian_width_v begin match v with end
let i_general_category v = General_category_v begin match v with end
let i_grapheme_cluster_break v = Grapheme_cluster_break_v begin match v with end
let i_hangul_syllable_type v = Hangul_syllable_type_v begin match v with end
let i_int v = try Int_v ( int_of_string v ) with Failure _ -> err ( err_att_val v )
let i_indic_syllabic_category v = Indic_syllabic_category_v begin match v with end
let i_indic_matra_category v = Indic_matra_category_v begin match v with end
let i_indic_positional_category v = Indic_positional_category_v end
let i_joining_group v = Joining_group_v begin match v with end
let i_joining_type v = Joining_type_v begin match v with end
let i_line_break v = Line_break_v begin match v with end
let i_name v = Name_v ( if String . contains v ' ' # then ` Pattern v else ` Name v )
let i_numeric_type v = Numeric_type_v begin match v with end
let i_numeric_value v = Numeric_value_v begin try match ( split_string v ' ' ) / with | [ " NaN " ] -> ` NaN | [ num ; denom ; ] -> ` Frac ( int_of_string num , int_of_string denom ) | [ num ] -> ` Num ( Int64 . of_string num ) | _ -> failwith " " with Failure _ -> err ( err_att_val v ) end
let i_script v = Script_v begin match v with end
let i_script_seq v = let script v = o_script ( i_script v ) in Script_extensions_v ( List . map script ( split_string v ' ' ) )
let i_sentence_break v = Sentence_break_v begin match v with end
let i_string v = String_v v
let i_uax_42_element v = UAX_42_element_v begin match v with end
let i_vertical_orientation v = Vertical_orientation_v begin match v with end
let i_word_break v = Word_break_v begin match v with end
module Pkey = struct type t = key let compare : key -> key -> int = compare end
module Pmap = Map . Make ( Pkey )
type props = value Pmap . t
type ' a prop = key * ( value -> ' a )
let find props ( k , o ) = try Some ( o ( Pmap . find k props ) ) with Not_found -> None
let unknown_prop name = ( Other name ) , o_string
let uax_42_element = UAX_42_element , o_uax_42_element
let age = Age , o_age
let alphabetic = Alphabetic , o_bool
let ascii_hex_digit = Ascii_hex_digit , o_bool
let bidi_class = Bidi_class , o_bidi_class
let bidi_control = Bidi_control , o_bool
let bidi_mirrored = Bidi_mirrored , o_bool
let bidi_mirroring_glyph = Bidi_mirroring_glyph , o_cp_opt
let bidi_paired_bracket = Bidi_paired_bracket , o_cp_map
let bidi_paired_bracket_type = Bidi_paired_bracket_type , o_bidi_paired_bracket_type
let block = Block , o_block
let canonical_combining_class = Canonical_combining_class , o_int
let cased = Cased , o_bool
let case_folding = Case_folding , o_cps_map
let case_ignorable = Case_ignorable , o_bool
let changes_when_casefolded = Changes_when_casefolded , o_bool
let changes_when_casemapped = Changes_when_casemapped , o_bool
let changes_when_lowercased = Changes_when_lowercased , o_bool
let changes_when_nfkc_casefolded = Changes_when_nfkc_casefolded , o_bool
let changes_when_titlecased = Changes_when_titlecased , o_bool
let changes_when_uppercased = Changes_when_uppercased , o_bool
let composition_exclusion = Composition_exclusion , o_bool
let dash = Dash , o_bool
let decomposition_mapping = Decomposition_mapping , o_cps_map
let decomposition_type = Decomposition_type , o_decomposition_type
let default_ignorable_code_point = Default_ignorable_code_point , o_bool
let deprecated = Deprecated , o_bool
let diacritic = Diacritic , o_bool
let east_asian_width = East_asian_width , o_east_asian_width
let emoji = Emoji , o_bool
let emoji_presentation = Emoji_presentation , o_bool
let emoji_modifier = Emoji_modifier , o_bool
let emoji_modifier_base = Emoji_modifier_base , o_bool
let emoji_component = Emoji_component , o_bool
let equivalent_unified_ideograph = Equivalent_unified_ideograph , o_cp_opt
let extended_pictographic = Extended_pictographic , o_bool
let expands_on_nfc = Expands_on_nfc , o_bool
let expands_on_nfd = Expands_on_nfd , o_bool
let expands_on_nfkc = Expands_on_nfkc , o_bool
let expands_on_nfkd = Expands_on_nfkd , o_bool
let extender = Extender , o_bool
let fc_nfkc_closure = Fc_nfkc_closure , o_cps_map
let full_composition_exclusion = Full_composition_exclusion , o_bool
let general_category = General_category , o_general_category
let grapheme_base = Grapheme_base , o_bool
let grapheme_cluster_break = Grapheme_cluster_break , o_grapheme_cluster_break
let grapheme_extend = Grapheme_extend , o_bool
let grapheme_link = Grapheme_link , o_bool