Module Cobol_parser.Options

Options to tune the parser engine

Gathers some types used to define options for the parser engine.

type recovery =
  1. | DisableRecovery
  2. | EnableRecovery of recovery_options

Switch for the recovery mechanism

and recovery_options = {
  1. silence_benign_recoveries : bool;
    (*

    Whether to silence reports about some missing tokens (e.g, periods).

    *)
}
type exec_scanner =
  1. | Stateless_exec_scanner : (Cobol_preproc.Text.t -> Cobol_common.Exec_block.t * Cobol_common.Exec_block.diagnostic list) -> exec_scanner
  2. | 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 = {
  1. exec_scanner_fallback : exec_scanner;
  2. exec_scanners : exec_scanner EXEC_MAP.t;
}
type parser_options = {
  1. verbose : bool;
  2. show : [ `Pending ] list;
  3. recovery : recovery;
  4. config : Cobol_config.t;
  5. exec_scanners : exec_scanners;
}
val default_recovery : recovery
val default : exec_scanners:exec_scanners -> parser_options