regex-pderiv-0.1.2: Replaces/Enhances Text.Regex. Implementing regular expression matching using Antimirov's partial derivatives. The svn source also shipped with two other referential implementations, e.g. Thomspon NFA and Glushkov NFA. For more detail please check out http://code.google.com/p/xhaskell-library/

Safe HaskellSafe-Infered

Text.Regex.PDeriv.ExtPattern

Synopsis

Documentation

data EPat Source

The external pattern syntax (ERE syntax)

Constructors

EEmpty 
EGroupNonMarking EPat

non marking group (?: re )

EGroup EPat

the group ( re )

EOr [EPat]

the union re|re

EConcat [EPat]

the concantenation rere

EOpt EPat Bool

the option re?, the last boolean flag indicates whether it is greedy

EPlus EPat Bool

the plus re+

EStar EPat Bool

the star re*

EBound EPat Int (Maybe Int) Bool

re{1:10}

ECarat

the ^ NOTE:shouldn't this must be top level?

EDollar

the $

EDot

the any char .

EAny [Char]

the character class [ a-z ]

ENoneOf [Char]

the negative character class [^a-z]

EEscape Char

backslash char

EChar Char

the non-escaped char

Instances

hasGroup :: EPat -> BoolSource

Function hasGroup tests whether an external pattern has ( ... ) (i.e. variable patterns in the internal pattern)