gll-0.4.1.0: GLL parser with simple combinator interface
Safe HaskellSafe-Inferred
LanguageHaskell2010

GLL.Combinators.Options

Synopsis

Documentation

data PCOptions Source #

CombinatorOptions datatype * left_biased_choice: see function leftBiased * pivot_select: provide a filtering function on pivots

type CombinatorOptions = [CombinatorOption] Source #

A list of CombinatorOptions for evaluating combinator expressions.

type CombinatorOption = PCOptions -> PCOptions Source #

A single option.

defaultOptions :: PCOptions Source #

The default options: no disambiguation.

maximumPivot :: CombinatorOption Source #

Enables a 'longest-match' at production level.

minimumPivot :: CombinatorOption Source #

Enables a 'shortest-match' at production level.

anyPivot :: CombinatorOption Source #

Discards a pivot select option (internal use only)

maximumPivotAtNt :: CombinatorOption Source #

Enables 'longest-match' at non-terminal level.

maximumErrors :: Int -> CombinatorOption Source #

Set the maximum number of errors shown in case of an unsuccessful parse.

throwErrors :: CombinatorOption Source #

If there are no parse results, the default behaviour is to return an empty list. If this option is used, a runtime error will be reported, with debugging information.

leftBiased :: CombinatorOption Source #

Turns all occurrences of <||> into a 'left biased' variant: only return results of the second alternate if the first alternate does not have any results.

useMemoisation :: CombinatorOption Source #

Whether to use unsafe memoisation to speed up the enumeration of parse results.

maximumsWith :: (a -> a -> Ordering) -> [a] -> [a] Source #

Filter a list such that the only remaining elements are equal to the maximum element, given an ordering operator.

maintainWith :: Eq k => (k -> k -> Ordering) -> [[(k, a)]] -> [[(k, a)]] Source #

doSelectTest :: CombinatorOption Source #

Enables select tests at all levels: nonterminal, alternative and slot.

noSelectTest :: CombinatorOption Source #

Disables select tests at all levels: nonterminal, alternative and slot.

doAltSelectTest :: CombinatorOption Source #

Enables select tests at the level of alternatives

noAltSelectTest :: CombinatorOption Source #

Disables select tests at the level of alternatives

doNtSelectTest :: CombinatorOption Source #

Enables select tests at the level of nonterminals

noNtSelectTest :: CombinatorOption Source #

Disables select tests at the level of nonterminals

doSlotSelectTest :: CombinatorOption Source #

Enables select tests at the level of grammar slots

noSlotSelectTest :: CombinatorOption Source #

Disables select tests at the level of grammar slots