Cobol_parser.Options
Options to tune the parser engine
module EXEC_MAP = Cobol_preproc.Options.EXEC_MAP
Gathers some types used to define options for the parser engine.
Switch for the recovery mechanism
type exec_scanner =
| Stateless_exec_scanner : (Cobol_preproc.Text.t ->
Cobol_common.Exec_block.t * Cobol_common.Exec_block.diagnostic list) ->
exec_scanner
| Stateful_exec_scanner : (Cobol_preproc.Text.t ->
'state ->
Cobol_common.Exec_block.t * Cobol_common.Exec_block.diagnostic list * 'state)
* 'state -> exec_scanner
Scanners for EXECs are functions fed with EXEC(UTE)/END-EXEC text blocks (including the "EXEC" and "END-EXEC" text words).
type exec_scanners = {
exec_scanner_fallback : exec_scanner;
exec_scanners : exec_scanner EXEC_MAP.t;
}
type 'm memory =
| Amnesic : Cobol_common.Behaviors.amnesic memory
| Eidetic : Cobol_common.Behaviors.eidetic memory
type parser_options = {
verbose : bool;
show : [ `Pending ] list;
recovery : recovery;
config : Cobol_config.t;
exec_scanners : exec_scanners;
}
val default_recovery : recovery
val default : exec_scanners:exec_scanners -> parser_options