Cobol_unit.TypesRepresentation of COBOL compilation units
A type to manage sets of items in both named and ordered form. Note that in many cases anonymous elements of list many not belong to named.
type 'a resolved_name =
('a, Cobol_ptree.name Cobol_common.Srcloc.TYPES.with_loc) resolved_referencetype 'a resolved_qualname =
('a, Cobol_ptree.qualname Cobol_common.Srcloc.TYPES.with_loc)
resolved_referencetype display_sign = {sign_position : sign_position;relevant for non-binary representations
*)sign_separate : bool;true = separate character (extra byte)
}type unit_config = {unit_currency_signs : Cobol_common.Basics.CharSet.t;unit_decimal_point : char;unit_display_sign_config : Cobol_data.Types.display_sign_config;}Corresponds to the contents of the CONFIGURATION SECTION.
type data_definitions = {data_items : Cobol_data.Types.data_definition named_n_ordered;data_records : Cobol_data.Types.record list;}data_definitions exposes two views on the items (fields and tables) in DATA DIVISION:
data_items contains all the items with direct access by name.data_records is a list of record trees where each element represents a record definition (typically a level 01 or 77 data item)type procedure_paragraph = {paragraph_name : Cobol_ptree.procedure_name Cobol_common.Srcloc.TYPES.with_loc
option;paragraph : Cobol_ptree.paragraph Cobol_common.Srcloc.TYPES.with_loc;}type procedure_section = {section_name : Cobol_ptree.procedure_name Cobol_common.Srcloc.TYPES.with_loc;section_paragraphs : procedure_paragraph Cobol_common.Srcloc.TYPES.with_loc
named_n_ordered;}type procedure_block = | Paragraph of procedure_paragraph Cobol_common.Srcloc.TYPES.with_loc| Section of procedure_section Cobol_common.Srcloc.TYPES.with_loctype procedure_using = procedure_arg Cobol_common.Srcloc.TYPES.with_loc listand procedure_arg = {arg_data_definition : Cobol_data.Types.data_definition resolved_name;arg_passing_style : arg_passing_style;}type procedure = {procedure_using : procedure_using Cobol_common.Srcloc.TYPES.with_loc option;procedure_blocks : procedure_block named_n_ordered;}type expanded_cond = | Expr of Cobol_ptree.expr Cobol_common.Srcloc.TYPES.with_locexpression used as a condition
*)| Relation of Cobol_ptree.expr Cobol_common.Srcloc.TYPES.with_loc
* Cobol_ptree.relop
* Cobol_ptree.expr Cobol_common.Srcloc.TYPES.with_loce <relop> e'*)
| ClassCond of Cobol_ptree.expr Cobol_common.Srcloc.TYPES.with_loc
* Cobol_ptree.class_class condition
*)| SignCond of Cobol_ptree.expr Cobol_common.Srcloc.TYPES.with_loc
* Cobol_ptree.signze POSITIVE/NEGATIVE/ZERO*)
| Omitted of Cobol_ptree.expr Cobol_common.Srcloc.TYPES.with_locc OMITTED*)
| Not of expanded_cond Cobol_common.Srcloc.TYPES.with_locNOT c*)
| Combined of expanded_cond Cobol_common.Srcloc.TYPES.with_loc
* Cobol_ptree.logop
* expanded_cond Cobol_common.Srcloc.TYPES.with_locc <AND/OR> c'*)
type expanded_selection_subject = | SubjectValue of Cobol_ptree.expr Cobol_common.Srcloc.TYPES.with_loc| SubjectCond of expanded_cond| SubjectConst of booltype expanded_selection_object = | SelCond of expanded_cond| SelValue of {negated : bool;value : Cobol_ptree.expr Cobol_common.Srcloc.TYPES.with_loc;}| SelRange of Cobol_ptree.selection_range| SelConst of bool| SelAnytype cobol_unit = {unit_name : string Cobol_common.Srcloc.TYPES.with_loc;unit_parent_name : string Cobol_common.Srcloc.TYPES.with_loc option;unit_env : unit_env;unit_data : data_definitions;unit_procedure : procedure;}Type of a main COBOL compilation unit
val block_name :
procedure_block ->
Cobol_ptree.qualname Cobol_common.Srcloc.TYPES.with_loc option