Module Mlang.Dgfip_gen_files

val ascii_to_ebcdic : int array
val ebcdic_compare : string -> string -> int
type gen_opt = {
with_verif : bool;
with_classe : bool;
with_priorite : bool;
with_categorie_TL : bool;
with_nat_code : bool;
with_cotsoc : bool;
with_ind_abat : bool;
with_acompte : bool;
with_avfisc : bool;
with_rapcat : bool;
with_sanction : bool;
with_modcat : bool;
with_liee : bool;
with_libelle : bool;
with_alias : bool;
with_type : bool;
with_type_donnee : bool;
with_primrest : bool;
}
type idx = {
out : int Stdlib.ref;
comp : int Stdlib.ref;
base : int Stdlib.ref;
inp : int Stdlib.ref;
ctxt : int Stdlib.ref;
fam : int Stdlib.ref;
rev : int Stdlib.ref;
revc : int Stdlib.ref;
var : int Stdlib.ref;
pen : int Stdlib.ref;
}
type var_subtype =
| Context
| Family
| Income
| CorrIncome
| Variation
| Penality
| Base
| Computed
type gen_type =
| Computed of var_subtype option
| Input of var_subtype option
| Output
| Debug of int
val default_flags : Dgfip_options.flags
val is_input : var_subtype -> bool
val is_computed : var_subtype -> bool
val input_var_subtype : Mast.input_variable -> var_subtype
val computed_var_subtype : Mast.computed_variable -> var_subtype
val computed_var_is_output : Mast.computed_variable -> bool
val input_var_is_output : Mast.input_variable -> bool
val consider_output : bool -> (string Pos.marked * int Pos.marked) list -> bool
val subtype_name : var_subtype -> string
val req_type_name : gen_type -> string
val new_idx : unit -> idx
val next_idx : idx -> var_subtype -> bool -> int -> int * int * int option
val get_attr : string -> (string Pos.marked * int Pos.marked) list -> int
val get_name : 'a -> 'a option -> 'a
val sort_vars_by_alias : ('a * 'b * 'c * 'd * Stdlib.String.t * Stdlib.String.t option * 'e * 'f * 'g * 'h) list -> bool -> ('a * 'b * 'c * 'd * Stdlib.String.t * Stdlib.String.t option * 'e * 'f * 'g * 'h) list
val sort_vars_by_name : ('a * 'b * 'c * 'd * Stdlib.String.t * 'e * 'f * 'g * 'h * 'i) list -> bool -> ('a * 'b * 'c * 'd * Stdlib.String.t * 'e * 'f * 'g * 'h * 'i) list
val get_vars : Mast.source_file_item Pos.marked list list -> bool -> (var_subtype * int * int * int option * Stdlib.String.t * Stdlib.String.t option * string * Mast.value_typ Pos.marked option * Mast.variable_attribute list * int) list
val get_vars_debug : ('a * 'b * 'c * 'd * Stdlib.String.t * Stdlib.String.t option * 'e * 'f * 'g * 'h) list -> bool -> ('a * 'b * 'c * 'd * Stdlib.String.t * Stdlib.String.t option * 'e * 'f * 'g * 'h) list
val split_list : 'a list -> int -> 'a list list
val gen_var : Stdlib.Format.formatter -> gen_type -> gen_opt -> idx:int -> name:string -> tvar:var_subtype -> is_output:bool -> typ_opt:Mast.value_typ Pos.marked option -> attributes:(string Pos.marked * int Pos.marked) list -> desc:string -> alias_opt:string option -> unit
val var_matches : gen_type -> var_subtype -> bool -> bool
val gen_table : Stdlib.Format.formatter -> Dgfip_options.flags -> (var_subtype * int * 'a * 'b option * Stdlib.String.t * Stdlib.String.t option * string * Mast.value_typ Pos.marked option * (string Pos.marked * int Pos.marked) list * 'c) list -> gen_type -> gen_opt -> unit
val gen_desc : Stdlib.Format.formatter -> (var_subtype * 'a * int * int option * Stdlib.String.t * Stdlib.String.t option * 'b * 'c * 'd * 'e) list -> alias_only:bool -> bool -> unit
val gen_table_output : Stdlib.Format.formatter -> Dgfip_options.flags -> (var_subtype * int * 'a * 'b option * Stdlib.String.t * Stdlib.String.t option * string * Mast.value_typ Pos.marked option * (string Pos.marked * int Pos.marked) list * 'c) list -> unit
val gen_table_context : Stdlib.Format.formatter -> Dgfip_options.flags -> (var_subtype * int * 'a * 'b option * Stdlib.String.t * Stdlib.String.t option * string * Mast.value_typ Pos.marked option * (string Pos.marked * int Pos.marked) list * 'c) list -> unit
val gen_table_family : Stdlib.Format.formatter -> Dgfip_options.flags -> (var_subtype * int * 'a * 'b option * Stdlib.String.t * Stdlib.String.t option * string * Mast.value_typ Pos.marked option * (string Pos.marked * int Pos.marked) list * 'c) list -> unit
val gen_table_income : Stdlib.Format.formatter -> Dgfip_options.flags -> (var_subtype * int * 'a * 'b option * Stdlib.String.t * Stdlib.String.t option * string * Mast.value_typ Pos.marked option * (string Pos.marked * int Pos.marked) list * 'c) list -> unit
val gen_table_corrincome : Stdlib.Format.formatter -> Dgfip_options.flags -> (var_subtype * int * 'a * 'b option * Stdlib.String.t * Stdlib.String.t option * string * Mast.value_typ Pos.marked option * (string Pos.marked * int Pos.marked) list * 'c) list -> unit
val gen_table_variation : Stdlib.Format.formatter -> Dgfip_options.flags -> (var_subtype * int * 'a * 'b option * Stdlib.String.t * Stdlib.String.t option * string * Mast.value_typ Pos.marked option * (string Pos.marked * int Pos.marked) list * 'c) list -> unit
val gen_table_penality : Stdlib.Format.formatter -> Dgfip_options.flags -> (var_subtype * int * 'a * 'b option * Stdlib.String.t * Stdlib.String.t option * string * Mast.value_typ Pos.marked option * (string Pos.marked * int Pos.marked) list * 'c) list -> unit
val gen_table_debug : Stdlib.Format.formatter -> Dgfip_options.flags -> (var_subtype * int * 'a * 'b option * Stdlib.String.t * Stdlib.String.t option * string * Mast.value_typ Pos.marked option * (string Pos.marked * int Pos.marked) list * 'c) list -> int -> unit
val gen_table_varinfo : Stdlib.Format.formatter -> (Mir.variable * int * int) StrMap.t -> Mir.cat_variable -> Mir.cat_variable_data -> (string * int * int * StrSet.t) Mir.CatVarMap.t -> (string * int * int * StrSet.t) Mir.CatVarMap.t
val gen_table_varinfos : Stdlib.Format.formatter -> Bir.program -> ('a * int * 'b * 'c * StrMap.key * 'd * 'e * 'f * 'g * int) list -> (string * int * int * StrSet.t) Mir.CatVarMap.t
val gen_decl_varinfos : Stdlib.Format.formatter -> (string * int * int * StrSet.t) Mir.CatVarMap.t -> unit
val is_valid_app : Stdlib.String.t Pos.marked list -> bool
val get_rules_verif_etc : Mast.source_file_item Pos.marked list list -> int list * int list * Mast.error_ list * StrSet.t
val gen_table_call : Stdlib.Format.formatter -> Dgfip_options.flags -> (var_subtype * int * 'a * 'b option * Stdlib.String.t * Stdlib.String.t option * string * Mast.value_typ Pos.marked option * (string Pos.marked * int Pos.marked) list * 'c) list -> string -> int list -> StrSet.t -> Mast.error_ list -> unit
val gen_table_verif : Stdlib.Format.formatter -> Dgfip_options.flags -> string -> int list -> unit
val count : (var_subtype * 'a * 'b * 'c option * 'd * 'e * 'f * 'g * 'h * int) list -> gen_type -> int
val gen_annee : Stdlib.Format.formatter -> Dgfip_options.flags -> unit
val gen_compir_h : Stdlib.Format.formatter -> Dgfip_options.flags -> (var_subtype * 'a * 'b * 'c option * 'd * 'e * 'f * 'g * 'h * int) list -> 'i list list -> unit
val gen_erreurs_c : Stdlib.Format.formatter -> Dgfip_options.flags -> Mast.error_ list -> unit
val gen_conf_h : Stdlib.Format.formatter -> Dgfip_options.flags -> (var_subtype * 'a * 'b * 'c option * 'd * 'e * 'f * 'g * 'h * int) list -> unit
val gen_dbg : Stdlib.Format.formatter -> unit
val gen_const : Stdlib.Format.formatter -> unit
val gen_lib : Stdlib.Format.formatter -> Dgfip_options.flags -> (var_subtype * 'a * 'b * 'c option * 'd * 'e * 'f * 'g * 'h * int) list -> 'i list -> 'j list -> StrSet.t -> Mast.error_ list -> unit
val gen_decl_targets : Stdlib.Format.formatter -> Bir.program -> unit
val gen_mlang_h : Stdlib.Format.formatter -> Bir.program -> Dgfip_options.flags -> (var_subtype * 'a * 'b * 'c option * 'd * 'e * 'f * 'g * 'h * int) list -> (string * int * int * StrSet.t) Mir.CatVarMap.t -> 'i list -> 'j list -> StrSet.t -> Mast.error_ list -> unit
val gen_mlang_c : Stdlib.Format.formatter -> unit
val extract_var_ids : Bir.program -> (var_subtype * int * 'a * 'b * StrMap.key * StrMap.key option * 'c * 'd * 'e * 'f) list -> Dgfip_varid.var_id Mir.VariableMap.t
val open_file : string -> Stdlib.out_channel * Stdlib.Format.formatter