regexdot- A polymorphic, POSIX, extended regex-engine.

Safe HaskellSafe




Dr. Alistair Ward
  • Defines those options relating to the RegExDot.RegEx-runtime.
  • These tend to be options which don't affect the result, only the means by which it is achieved.
  • Whilst similar structures are present in other regex-implementations, there's no standardisation of the fields.



data ExecutionOptions Source #

The switches used to control execution of the regex-engine.




  • abortTrialRepetitionsOnInherentFailure :: Bool

    If an alternative can't match, irrespective of the subsequent RegExDot.RegEx.Concatenation, then avoid futile trial RegExDot.Repeatable.Repetitions. The converse of checkForUnconsumableData.

  • abortTrialRepetitionsOnZeroConsumption :: Bool

    Check for zero data-consumption by the n-th RegExDot.Repeatable.Repeatable RegExDot.RegEx.CaptureGroup, before attempting n+1.

  • bypassInputDataForLiberalConsumer :: Bool

    Whether to bypass reading of the input data, if the mapping to specific RegExDot.RegEx.RepeatablePatterns isn't required, & the RegExDot.RegEx.ExtendedRegEx can consume the required quantity of anything.

  • catchIncompatibleAnchors :: Bool

    Avoid futile trial solutions, involving repetitions of anchored alternatives, which must consume data.

  • checkExistenceOfInelasticTail :: Bool

    If the RegExDot.RegEx.ExtendedRegEx ends in an inelastic (zero Star-height) tail, confirm its existence at the end of the RegExDot.RegEx.InputData.

  • checkForUnconsumableData :: Bool

    Check whether there's no possibility of consuming some of the input data. The converse of abortTrialRepetitionsOnInherentFailure.

  • moderateGreed :: Bool

    Greedily consume data, only up to the limit beyond which, future requirements would be compromised.

  • permitReorderingOfAlternatives :: Bool

    Permit RegExDot.RegEx.Alternatives to be re-ordered, in an attempt to more quickly locate a result.

  • preferAlternativesWhichFeedTheGreedy :: Bool

    Within the RegExDot.RegEx.MatchedData from which each candidate RegExDot.RegEx.Match amongst sequences of RegExDot.RegEx.Alternatives, is ultimately composed, prefer RegExDot.ConsumptionBounds.ConsumptionBounds of RegExDot.RegEx.InputData, beyond RegExDot.Repeatable.getFewest, by RegExDot.Repeatable.isGreedy RegExDot.RegEx.RepeatablePatterns.

  • preferAlternativesWhichMimickUnrolling :: Bool

    Compare RegExDot.ConsumptionBounds.ConsumptionBounds on successive RegExDot.Repeatable.Repetitions of RegExDot.RegEx.CaptureGroup, between candidate RegExDot.RegEx.Matches, to mimic the behaviour of the unrolled RegExDot.Repeatable.Repetitions.

  • preferFewerRepeatedAlternatives :: Bool

    Prefer fewer RegExDot.Repeatable.Repetitions of RegExDot.RegEx.Alternatives, to discourage the capture of null lists of RegExDot.RegEx.InputData.

  • requireMatchList :: Bool

    If merely interested in a Bool result, rather than the optimal mapping of input data to RegExDot.RegEx.RepeatablePatterns, avoid unnecessary evaluation of the RegEx.Match.

  • unrollRepeatedSingletonAlternative :: Bool

    Check whether RegExDot.RegEx.Alternatives consists of just a singleton RegExDot.RegEx.ExtendedRegEx, & has therefore been used merely as a capture-group. Though this doesn't affect the result, it vastly improves efficiency.

  • useFirstMatchAmongAlternatives :: Bool

    Rather than performing an exhaustive search for the optimal choice amongst RegExDot.RegEx.Alternatives, merely select the first that matches; conform to Perl rather than POSIX.

  • validateMinConsumptionOfAlternatives :: Bool

    When the number of repetitions of a RegExDot.RegEx.CaptureGroup is precisely specified, check whether the resulting minimum data-requirement is available.



setVerbose :: Bool -> ExecutionOptions -> ExecutionOptions Source #

Sets those fields which depend crucially on whether the caller wants to retrieve any RegExDot.RegEx.MatchList from the RegExDot.RegEx.Result, or just query whether there is one.