regex-pderiv-0.1.0: Replaces/Enhances Text.Regex

Text.Regex.PDeriv.RE

Synopsis

Documentation

data RE Source

data type of the regular expresions

Constructors

Phi 
Empty

an empty exp

L Char

a literal / a character

Choice RE RE GFlag

a choice exp 'r1 + r2'

Seq RE RE

a pair exp '(r1,r2)'

Star RE GFlag

a kleene's star exp 'r*'

Any

.

Not [Char]

excluding characters e.g. [^abc]

Instances

Eq RE

the eq instance

Show RE

A pretty printing function for regular expression

Key RE 
IsGreedy RE 
Simplifiable RE 
IsPhi RE 
IsEpsilon RE

function isEpsilon checks whether epsilon = r

PosEpsilon RE 

resToRE :: [RE] -> RESource

function resToRE sums up a list of regular expressions with the choice operation.

partDeriv :: RE -> Char -> [RE]Source

function partDeriv implements the partial derivative operations for regular expressions. We don't pay attention to the greediness flag here.

sigmaRE :: RE -> [Char]Source

function sigmaRE returns all characters appearing in a reg exp.