regex-tdfa-quasiquoter-0.2.1.0: Quasi-quoter for TDFA (extended POSIX) regular expressions.

Text.Regex.TDFA.QuasiQuoter

Description

Quasi-quoters for Text.Regex.TDFA (extended POSIX) regular expressions. Refer to that module's documentation for more information on supported features.

Quasi-quoters included in this module are:

• re For splicing the expression to compile a regular expression AST to a Regex value.
• pat For splicing a regular expression AST of type Pattern.

Synopsis

# Documentation

Quasi-quoter for Text.Regex.TDFA (extended POSIX) regular expressions. Refer to that module's documentation for more information on supported features.

See the documentation of unescape for escape sequences this quasi-quoter supports.

[re|flags;regexp|] splices the expression to compile the AST (of type Pattern) of regexp using the CompOption and ExecOption indicated by flags. Incorrect flags or a failure to parse the regular expression is a compile-time error.

Examples:

• [re|ga;a+b+c+|] has flags = MCgRaN and regexp = a+b+c+.
• [re|;(z*)|] has flags = MCGRaN and regexp = (z*).

Every flag name is assigned a unique upper and lower case letter pair. The uppercase letter indicates the flag to be True ("on"), and the lowercase letter indicates the flag to be False ("off").

Flag name          |  True  |  False  |  Default
-------------------+--------+-------------------
Multiline          |  M     |  m      |  M
Case sensitive     |  C     |  c      |  C
Capture groups     |  G     |  g      |  G
Right associative  |  R     |  r      |  R
Last star greedy   |  A     |  a      |  a
New syntax         |  N     |  n      |  N


Refer to CompOption and ExecOption for the meanings of each flag.

For the significance of associativity see https://wiki.haskell.org/Regex_Posix Section 3 "Types of failure".

The default flags are MCGRaN. Zero or more explicit flags must be specified in the flags field. Explicit flags take precedence over default flags. Every explicit flag must occur at most once. If a flag is explicit the negated flag must not also be.

Quasi-quoter for Text.Regex.TDFA (extended POSIX) regular expressions. Refer to that module's documentation for more information on supported features.

See the documentation of unescape for escape sequences this quasi-quoter supports.

[pat|regexp] splices the AST (of type Pattern) of regexp. A parse failure is a compile-time error.