package piqilib

  1. Overview
  2. Docs
module C = Piqi_common
module Idtable = Piqi_db.Idtable
type idtable = C.T.typedef Idtable.t
val is_boot_mode : bool ref
val piqi_lang_def : C.T.piqtype ref
val piqi_spec_def : C.T.piqtype ref
val piq_def : C.T.piqtype ref
val typedef_def : C.T.piqtype ref
val field_def : C.T.piqtype ref
val option_def : C.T.piqtype ref
val function_def : C.T.piqtype ref
val import_def : C.T.piqtype ref
val piqi_spec : C.T.piqi option ref
val piqi_lang : C.T.piqi option ref
val piq_spec : C.T.piqi option ref
val is_boot_piqi : C.T.piqi -> bool
val processing_hooks : (C.T.typedef Idtable.M.t -> C.T.piqi -> unit) list ref
val register_processing_hook : (idtable -> C.T.piqi -> unit) -> unit
val add_imported_typedef : C.T.typedef Idtable.M.t -> C.T.typedef -> C.T.typedef Idtable.M.t
val add_imported_typedefs : C.T.typedef Idtable.M.t -> C.T.typedef list -> C.T.typedef Idtable.M.t
val find_def : 'a Idtable.M.t -> Idtable.M.key -> 'b
val is_func_param : [< `alias of C.A.t | `enum of C.E.t | `list of C.L.t | `record of C.R.t | `variant of C.V.t ] -> bool
val set_is_func_param_flag : [< `alias of C.A.t | `enum of C.E.t | `list of C.L.t | `record of C.R.t | `variant of C.V.t ] -> unit
val resolve_typename : [< C.T.piqtype ] Idtable.M.t -> Idtable.M.key -> C.T.piqtype
val resolve_field_typename : [< C.T.piqtype ] Idtable.M.t -> C.F.t -> unit
val resolve_option_typename : [< C.T.piqtype ] Idtable.M.t -> C.O.t -> unit
val resolve_def_typenames : [< C.T.piqtype ] Idtable.M.t -> [< `alias of C.A.t | `enum of 'a | `list of C.L.t | `record of C.R.t | `variant of C.V.t ] -> unit
val check_name : string -> unit
val check_opt_name : string option -> unit
val check_dup_names : string -> string list -> unit
val check_field : C.Field.t -> unit
val check_def_name : 'a -> string option -> unit
val check_record : C.R.t -> unit
val check_option : C.Option.t -> unit
val check_variant : C.V.t -> unit
val check_enum_option : C.O.t -> unit
val check_enum : C.E.t -> unit
val check_alias : C.A.t -> unit
val check_list : C.L.t -> unit
val check_def : [< `alias of C.A.t | `enum of C.E.t | `list of C.L.t | `record of C.R.t | `variant of C.V.t ] -> unit
val check_resolved_alias : C.A.t -> unit
val check_resolved_def : [> `alias of C.A.t | `enum of C.E.t | `record of C.R.t | `variant of C.V.t ] -> unit
val check_no_infinite_types : parent:C.T.namespace -> [< C.T.piqtype variant ] list -> unit
val is_valid_scoped_extension_name : string -> bool
val check_extension_name : [< `field of string | `func of string | `import of string | `name of string | `option of string | `typedef of string ] -> unit
val check_extension_spec : [< `field of string | `func of string | `import of string | `name of string | `option of string | `typedef of string name ] -> unit
val check_extension : C.Extend.t -> unit
val debug_loc : string -> unit
val assert_loc : unit -> unit
val add_fake_loc : Piqobj.obj -> unit
val resolve_default_value : Piqi_impl_piqi.any -> Piqi_impl_piqi.piqtype -> unit
val resolve_field_default : C.F.t -> unit
val resolve_field_piq_flag_default : C.F.t -> unit
val resolve_defaults : [> `record of C.R.t ] -> unit
val copy_obj : 'a -> 'b
val copy_obj_list : 'a list -> 'b list
val copy_variant : ?copy_parts:bool -> C.V.t -> C.V.t
val copy_enum : ?copy_parts:bool -> C.E.t -> C.E.t
val copy_record : ?copy_parts:bool -> C.R.t -> C.R.t
val copy_def : copy_parts:bool -> C.T.typedef -> [> `alias of C.T.Piqi_impl_piqi.alias | `enum of C.E.t | `list of C.T.Piqi_impl_piqi.piqi_list | `record of C.R.t | `variant of C.V.t ]
val copy_defs : ?copy_parts:bool -> C.T.typedef list -> [> `alias of C.T.Piqi_impl_piqi.alias | `enum of C.E.t | `list of C.T.Piqi_impl_piqi.piqi_list | `record of C.R.t | `variant of C.V.t ] list
val copy_imports : 'a list -> 'b list
val transform_flag : C.F.t -> unit
val transform_flags : [> `record of C.R.t ] -> unit
val check_defs : piqi:C.T.Piqi_impl_piqi.piqi -> C.T.typedef Idtable.M.t -> C.T.typedef list -> unit
val read_piqi_common : string -> (string * (Piq_parser.L.token * (int * int)) Stream.t) -> C.piq_ast
val read_piqi_channel : string -> in_channel -> C.piq_ast
val read_piqi_string : string -> string -> C.piq_ast
val open_piqi : string -> in_channel
val read_piqi_file : string -> C.piq_ast
val check_modname : string -> unit
val check_assign_module_name : ?modname:Piqi_impl_piqi.Piqi_impl_piqi.word -> string -> C.T.piqi -> unit
val assign_import_name : C.Import.t -> unit
val mlobj_to_piqobj : Piqobj_of_protobuf.C.T.piqtype -> (int -> 'a -> C.Piqirun.OBuf.t) -> 'b -> Piqobj.obj
val mlobj_to_ast : Piqobj_of_protobuf.C.T.piqtype -> (int -> 'a -> C.Piqirun.OBuf.t) -> 'b -> Piqobj_to_piq.C.piq_ast
val mlobj_of_piqobj : (C.Piqirun.t -> 'a) -> Piqobj.obj -> 'b
val mlobj_of_ast : Piqobj_of_piq.C.T.piqtype -> (C.Piqirun.t -> 'a) -> Piqobj_of_piq.C.piq_ast -> 'b
val is_unknown_field : string list -> [> `name of string | `named of Piq_ast.Named.t ] -> bool
val check_unknown_fields : ?prepend:(unit -> unit) -> Piq_gen.C.piq_ast list -> string list -> unit
val parse_scoped_name : string -> string * string
val list_replace : 'a list -> ('b -> bool) -> 'c -> 'd list
val idtable_of_defs : C.T.typedef list -> C.T.typedef Idtable.M.t
val idtable_of_imports : C.Import.t list -> C.Import.t Idtable.M.t
val idtable_of_functions : C.T.Func.t list -> C.T.Func.t Idtable.M.t
val list_of_idtable : 'a Idtable.M.t -> 'b list -> ('c -> Idtable.M.key) -> 'd list
val apply_extensions : 'a -> Piqobj_of_protobuf.C.T.piqtype -> (C.Piqirun.t -> 'b) -> (int -> 'c -> C.Piqirun.OBuf.t) -> Piqi_impl_piqi.any list -> string list -> override:bool -> 'd
val apply_option_extensions : [> `variant of C.V.t ] as 'a Idtable.M.t -> string -> Piqi_impl_piqi.any list -> string list -> override:bool -> 'b Idtable.M.t
val apply_field_extensions : [> `record of C.R.t ] as 'a Idtable.M.t -> string -> Piqi_impl_piqi.any list -> string list -> override:bool -> 'b Idtable.M.t
val extend_import : C.T.Piqi_impl_piqi.import Idtable.M.t -> Idtable.M.key -> Piqi_impl_piqi.any list -> string list -> override:bool -> C.T.Piqi_impl_piqi.import Idtable.M.t
val extend_imports : C.Import.t list -> ([> `import of Idtable.M.key ] * bool * Piqi_impl_piqi.any list) list -> string list -> C.T.Piqi_impl_piqi.import list
val extend_function : C.T.Piqi_impl_piqi.func Idtable.M.t -> Idtable.M.key -> Piqi_impl_piqi.any list -> string list -> override:bool -> C.T.Piqi_impl_piqi.func Idtable.M.t
val extend_functions : C.T.Func.t list -> ([> `func of Idtable.M.key ] * bool * Piqi_impl_piqi.any list) list -> string list -> C.T.Piqi_impl_piqi.func list
val apply_def_extensions : C.T.Piqi_impl_piqi.typedef Idtable.M.t -> [> `field of string | `name of Idtable.M.key | `option of string | `typedef of Idtable.M.key ] -> Piqi_impl_piqi.any list -> string list -> override:bool -> C.T.Piqi_impl_piqi.typedef Idtable.M.t
val apply_defs_extensions : C.T.typedef list -> ([> `field of string | `name of Idtable.M.key | `option of string | `typedef of Idtable.M.key ] * bool * Piqi_impl_piqi.any list) list -> string list -> C.T.Piqi_impl_piqi.typedef list
val get_imported_defs : C.Import.t list -> [> `alias of C.T.Piqi_impl_piqi.alias | `enum of C.E.t | `list of C.T.Piqi_impl_piqi.piqi_list | `record of C.R.t | `variant of C.V.t ] list
val make_param_name : C.T.Func.t -> string -> string
val make_param_record : Piqi_impl_piqi.Piqi_impl_piqi.name -> C.R.t -> C.R.t
val make_param_variant : Piqi_impl_piqi.Piqi_impl_piqi.name -> C.V.t -> C.V.t
val make_param_enum : Piqi_impl_piqi.Piqi_impl_piqi.name -> C.E.t -> C.E.t
val make_param_list : Piqi_impl_piqi.Piqi_impl_piqi.name -> C.L.t -> C.L.t
val make_param_alias : Piqi_impl_piqi.Piqi_impl_piqi.name -> C.A.t -> C.A.t
val resolve_param : C.T.Func.t -> string -> [< `alias of C.A.t | `enum of C.E.t | `list of C.L.t | `name of Piqi_impl_piqi.Piqi_impl_piqi.typename | `record of C.R.t | `variant of C.V.t ] -> [> `alias of C.T.Alias.t | `enum of C.E.t | `list of C.L.t | `record of C.R.t | `variant of C.V.t ]
val process_func : C.T.Func.t -> ([> `alias of C.T.Alias.t | `enum of C.E.t | `list of C.L.t | `record of C.R.t | `variant of C.V.t ] * (Piqi_impl_piqi.Piqi_impl_piqi.name * (Piqi_impl_piqi.Piqi_impl_piqi.typedef -> unit))) list
val get_function_defs : C.T.typedef list -> C.T.Func.t list -> [> `alias of C.A.t | `enum of C.E.t | `list of C.L.t | `record of C.R.t | `variant of C.V.t ] list * (Piqi_impl_piqi.Piqi_impl_piqi.typedef -> unit) Idtable.M.t
val prepare_included_piqi_ast : [> `list of [> `named of Piq_ast.Named.t ] as 'a list ] -> 'a list
val expand_includes : C.P.t -> C.P.t list -> C.T.Piqi_impl_piqi.piqi
val is_extension : string -> bool
val find_piqi_file : C.P.t -> Piqi_db.Piqitable.M.key -> Piqi_db.Piqitable.M.key * string
val find_extensions : C.P.t -> Piqi_db.Piqitable.M.key list
val pre_process_piqi : ?modname:Piqi_impl_piqi.Piqi_impl_piqi.word -> fname:string -> ?ast:C.piq_ast -> C.T.piqi -> C.T.piqi
val is_processed : C.P.t -> bool
val is_being_processed : C.P.t -> C.P.t list -> bool
val process_piqi : ?modname:Piqi_impl_piqi.Piqi_impl_piqi.word -> ?include_path:C.P.t list -> ?fname:string -> ?ast:C.piq_ast -> cache:bool -> C.T.piqi -> C.T.piqi
val load_piqi_file : ?modname:Piqi_impl_piqi.Piqi_impl_piqi.word -> ?include_path:C.P.t list -> string -> C.T.piqi
val load_piqi_ast : ?modname:Piqi_impl_piqi.Piqi_impl_piqi.word -> ?include_path:C.P.t list -> cache:bool -> string -> C.piq_ast -> C.T.piqi
val load_piqi_module : ?include_path:C.P.t list -> Piqi_db.Piqitable.M.key -> string -> C.T.piqi
val load_imports : C.T.piqi -> C.Import.t list -> unit
val load_import : C.T.piqi -> Piqi_impl_piqi.Piqi_impl_piqi.import -> unit
val load_includes : include_path:C.P.t list -> C.T.piqi -> C.Includ.t list -> Piqi_impl_piqi.Piqi_impl_piqi.piqi list
val load_include : include_path:C.P.t list -> C.T.piqi -> C.Includ.t -> C.P.t
val piqi_loader : ?modname:Piqi_impl_piqi.Piqi_impl_piqi.word -> string -> C.T.piqi
val embedded_modname : string
val find_embedded_piqtype : string -> Piqi_db.C.T.piqtype
val boot : unit -> unit
val load_piqi : string -> in_channel -> C.T.piqi
val reconsitute_extended_functions : C.T.Func.t list -> C.T.typedef list -> C.T.Func.t list
val expand_function : C.T.Func.t -> C.T.Func.t
val expand_piqi : extensions:bool -> functions:bool -> C.P.t -> C.P.t
val lang_to_spec : C.P.t -> C.P.t
val piqi_to_ast : ?is_external_mode:bool -> C.T.Piqi_impl_piqi.piqi -> Piqobj_to_piq.C.piq_ast
val transform_piqi_ast : C.piq_ast -> Piq_ast.Piq_ast.ast
val piqi_to_piqobj : ?piqi_piqtype:C.T.piqtype -> ?add_codes:bool -> C.P.t -> Piqobj.obj
val piqi_of_piqobj : ?process:bool -> Piqobj.obj -> C.T.piqi
val piqi_to_pb : ?code:int -> C.P.t -> Piqobj_to_protobuf.C.Piqirun.OBuf.t
val piqi_of_pb : ?process:bool -> Piqobj_of_protobuf.C.Piqirun.t -> C.T.piqi
val get_piqi_deps : ?only_imports:bool -> C.P.t -> C.P.t list
OCaml

Innovation. Community. Security.