regex-xmlschema-0.1.4: A regular expression library for W3C XML Schema regular expressions

Portabilityportable
Stabilityexperimental
MaintainerUwe Schmidt (uwe@fh-wedel.de)

Text.Regex.XMLSchema.String.RegexParser

Description

W3C XML Schema Regular Expression Parser

This parser supports the full W3C standard, the complete grammar can be found under http://www.w3.org/TR/xmlschema11-2/#regexs

Synopsis

Documentation

parseRegex :: String -> RegexSource

parse a W3C XML Schema regular expression

the Syntax of the W3C XML Schema spec is extended by further useful set operations, like intersection, difference, exor. Subexpression match becomes possible with "named" pairs of parentheses. The multi char escape sequence \a represents any Unicode char, The multi char escape sequence \A represents any Unicode word, (\A = \a*). All syntactically wrong inputs are mapped to the Zero expression representing the empty set of words. Zero contains as data field a string for an error message. So error checking after parsing becomes possible by checking against Zero (isZero predicate)