Cobol_configThis library is used to build configurations, either from file or from a dialect. All the from_ functions will fail if a file is not found, or use the default value of any options that is badly typed in the configuration file or not set in the configuration file.
module Types : sig ... endModule containing most of the types definitions used in Cobol_config.
include module type of Typestype doc = Pretty.simpletype 'a feature = 'a Cobol_dialect.Types.featuretype 'a feature_support = 'a Cobol_dialect.Types.bindingDefinition of a valued option.
module Value = Types.Valuetype standard = Types.standard = type source_format = Cobol_common.Platform.TYPES.source_format_id = type words_spec = (string * word_spec) listand word_spec = Types.word_spec = type t = Types.t = {origin : Cobol_dialect.Types.origin;tab_stops : int list;comment_paragraphs : unit feature_support;safe_partial_replacing_when_src_literal : [ `Safe | `Unsafe ] feature_support;words : words_spec;intrinsic_functions : EzCompat.StringSet.t;system_names : EzCompat.StringSet.t;registers : EzCompat.StringSet.t;text_column : int;pic_length : int;word_length : int;literal_length : int;numeric_literal_length : int;defaultbyte : defaultbyte;standard_define : standard;format : source_format_spec;binary_size : binary_size;binary_byteorder : binary_byteorder;assign_clause : assign_clause;screen_section_rules : screen_section_rules;dpc_in_data : dpc_in_data;filename_mapping : bool;pretty_display : bool;binary_truncate : bool;complex_odo : bool;odoslide : bool;indirect_redefines : bool;relax_syntax_checks : bool;ref_mod_zero_length : bool;relax_level_hierarchy : bool;select_working : bool;local_implies_recursive : bool;sticky_linkage : bool;move_ibm : bool;perform_osvs : bool;arithmetic_osvs : bool;hostsign : bool;program_name_redefinition : bool;accept_update : bool;accept_auto : bool;console_is_crt : bool;no_echo_means_secure : bool;line_col_zero_default : bool;display_special_fig_consts : bool;binary_comp_1 : bool;numeric_pointer : bool;move_non_numeric_lit_to_numeric_is_zero : bool;implicit_assign_dynamic_var : bool;device_mnemonics : bool;xml_parse_xmlss : bool;areacheck : bool;ebcdic_symbolic_characters : bool;control_division : unit feature_support;memory_size_clause : unit feature_support;multiple_file_tape_clause : unit feature_support;label_records_clause : unit feature_support;value_of_clause : unit feature_support;data_records_clause : unit feature_support;top_level_occurs_clause : unit feature_support;same_as_clause : unit feature_support;type_to_clause : unit feature_support;usage_type : unit feature_support;synchronized_clause : unit feature_support;sync_left_right : unit feature_support;special_names_clause : unit feature_support;goto_statement_without_name : unit feature_support;stop_literal_statement : unit feature_support;stop_identifier_statement : unit feature_support;stop_error_statement : unit feature_support;debugging_mode : unit feature_support;use_for_debugging : unit feature_support;padding_character_clause : unit feature_support;next_sentence_phrase : unit feature_support;listing_statements : unit feature_support;title_statement : unit feature_support;entry_statement : unit feature_support;move_noninteger_to_alphanumeric : unit feature_support;move_figurative_constant_to_numeric : unit feature_support;move_figurative_space_to_numeric : unit feature_support;move_figurative_quote_to_numeric : unit feature_support;odo_without_to : unit feature_support;section_segments : unit feature_support;alter_statement : unit feature_support;call_overflow : unit feature_support;numeric_boolean : unit feature_support;hexadecimal_boolean : unit feature_support;national_literals : unit feature_support;hexadecimal_national_literals : unit feature_support;national_character_literals : unit feature_support;hp_octal_literals : unit feature_support;acu_literals : unit feature_support;word_continuation : unit feature_support;not_exception_before_exception : unit feature_support;accept_display_extensions : unit feature_support;larger_redefines : unit feature_support;symbolic_constant : unit feature_support;constant_78 : unit feature_support;constant_01 : unit feature_support;perform_varying_without_by : unit feature_support;reference_out_of_declaratives : unit feature_support;program_prototypes : unit feature_support;call_convention_mnemonic : unit feature_support;call_convention_linkage : unit feature_support;numeric_value_for_edited_item : unit feature_support;incorrect_conf_sec_order : unit feature_support;define_constant_directive : unit feature_support;free_redefines_position : unit feature_support;records_mismatch_record_clause : unit feature_support;record_delimiter : unit feature_support;sequential_delimiters : unit feature_support;record_delim_with_fixed_recs : unit feature_support;missing_statement : unit feature_support;missing_period : unit feature_support;zero_length_literals : unit feature_support;xml_generate_extra_phrases : unit feature_support;continue_after : unit feature_support;goto_entry : unit feature_support;assign_variable : unit feature_support;assign_using_variable : unit feature_support;assign_ext_dyn : unit feature_support;assign_disk_from : unit feature_support;vsam_status : unit feature_support;self_call_recursive : unit feature_support;record_contains_depending_clause : unit feature_support;picture_l : unit feature_support;alphanumeric_comp_x_over_8_chars : unit feature_support;}module Options : sig ... endmodule Default : sig ... endmodule Diagnostics : sig ... endexception ERROR of Diagnostics.errorval default : tval default_search_path :
platform:Cobol_common.Platform.TYPES.platform ->
string listdefault_search_path ~platform is where configuration files are looked up after any search path given to the functions below: the current working directory, $COB_CONFIG_DIR, $XDG_CONFIG_HOME/superbol/gnucobol-config, some system-specific directories, and $COB_CONFIG_DIR_FALLBACK, as platform gives them.
The functions below access the file system and the environment through platform only, so that what they read may be recorded.
val from_file :
platform:Cobol_common.Platform.TYPES.platform ->
?search_path:string list ->
?verbose:bool ->
string ->
t Cobol_common.Diagnostics.with_diagsfrom_file ~platform ~search_path filename loads a configuration from filename, looked up in its directory, then search_path, then default_search_path. Files it includes are looked up likewise, starting with the directory of the file found.
val from_dialect :
platform:Cobol_common.Platform.TYPES.platform ->
?search_path:string list ->
?verbose:bool ->
Cobol_dialect.Types.id ->
t Cobol_common.Diagnostics.with_diagsfrom_dialect ~platform ~search_path dialect returns the configuration module according to the dialect defaults, looking its file up as from_file does.
val dialect : t -> Cobol_dialect.Types.id