Cobol_preproc.EnvEnvironment for preprocessing and compilation. Holds definitions of preprocessor constants (preprocessor DEFINES, computation process variables), along with compilation variables (78-level constants).
Accepted values for these preprocessor variables are:
For now, the set of values for compilation variables is equivalent to that of preprocessor variables.
module VAL = Cobol_data.Valuemodule VAR : sig ... endUtility module that maps any string to a physically unique upper-cased internal representation.
module MAP : sig ... endmodule TYPES : sig ... endinclude module type of struct include TYPES endtype env = TYPES.env = {preproc_vars : preproc_var_definition MAP.t;compil_vars : compilation_var_definition MAP.t;}and var = VAR.tand preproc_var_definition =
compilation_variable_definition Cobol_common.Srcloc.TYPES.with_srcand compilation_var_definition =
compilation_variable_definition Cobol_common.Srcloc.TYPES.with_srcand compilation_variable_definition = TYPES.compilation_variable_definition = {compvar : var;compvar_value : value Cobol_common.Srcloc.TYPES.with_src;}and value = TYPES.value = | Alphanum of Cobol_data.Types.alphanum_value| Boolean of Cobol_data.Types.boolean_value| Numeric of Cobol_data.Types.fixed_valuetype var_definition = TYPES.var_definition = | Preproc_var of preproc_var_definition| Compilation_var of compilation_var_definitiontype t = envval pp_value : Stdlib.Format.formatter -> value -> unitval pp_compilation_variable_definition :
Stdlib.Format.formatter ->
compilation_variable_definition ->
unitval pp : t Pretty.printerval empty : envval var : string -> varval var' :
string Cobol_common.Srcloc.TYPES.with_loc ->
var Cobol_common.Srcloc.TYPES.with_locval var_definition_of :
var:MAP.key Cobol_common__Srcloc.TYPES.with_loc ->
?try_compil_vars:bool ->
env ->
(var_definition, lookup_error) Stdlib.resultval register_preproc_var :
src:Cobol_common.Srcloc.src ->
var ->
value Cobol_common.Srcloc.TYPES.with_src ->
env ->
env * compilation_variable_definition Cobol_common.Srcloc.with_srcval define_preproc_var :
loc:Cobol_common.Srcloc.TYPES.srcloc ->
MAP.key Cobol_common__Srcloc.TYPES.with_loc ->
value Cobol_common.Srcloc.TYPES.with_src ->
?override:bool ->
t ->
t * preproc_var_definitionval define_process_parameter :
var ->
value Cobol_common.Srcloc.TYPES.with_src ->
t ->
env * compilation_variable_definition Cobol_common.Srcloc.with_srcval define_compilation_var :
loc:Cobol_common.Srcloc.srcloc ->
var Cobol_common__Srcloc.TYPES.with_loc ->
value Cobol_common.Srcloc.TYPES.with_src ->
t ->
t * compilation_var_definitionval find_compilation_var : MAP.key -> env -> compilation_var_definition optionval alphanum_literal_value' :
Cobol_data.Types.alphanum_literal Cobol_common.Srcloc.TYPES.with_loc ->
valueval boolean_literal_value' :
Cobol_data.Types.boolean_literal Cobol_common.Srcloc.TYPES.with_loc ->
valueval numeric_literal_value' :
Cobol_data.Types.fixed_literal Cobol_common.Srcloc.TYPES.with_loc ->
valueval numeric_value' :
Cobol_data.Types.fixed_value Cobol_common.Srcloc.TYPES.with_loc ->
valueval alphanum_literal_value :
Cobol_data.Types.alphanum_literal Cobol_common.Srcloc.TYPES.with_loc ->
value Cobol_common.Srcloc.TYPES.with_srcval boolean_literal_value :
Cobol_data.Types.boolean_literal Cobol_common.Srcloc.TYPES.with_loc ->
value Cobol_common.Srcloc.TYPES.with_srcval numeric_literal_value :
Cobol_data.Types.fixed_literal Cobol_common.Srcloc.TYPES.with_loc ->
value Cobol_common.Srcloc.TYPES.with_srcval numeric_value :
Cobol_data.Types.fixed_value Cobol_common.Srcloc.TYPES.with_loc ->
value Cobol_common.Srcloc.TYPES.with_src