| hxt-8.5.4: A collection of tools for processing XML with Haskell. | Source code | Contents | Index
Text.XML.HXT.DTDValidation.XmlRE |
Portability | portable
Stability | experimental
Maintainer | Uwe Schmidt (uwe@fh-wedel.de)
Description
A module for regular expression matching, adapted for XML DTDs. This module is based on the module RE.
Synopsis
data RE a
checkRE :: Show a => RE a -> String
matches :: RE String -> XmlTrees -> RE String
printRE :: Show a => RE a -> String
re_unit :: RE a
re_zero :: String -> RE a
re_sym :: a -> RE a
re_rep :: RE a -> RE a
re_plus :: RE a -> RE a
re_opt :: RE a -> RE a
re_seq :: RE a -> RE a -> RE a
re_alt :: RE a -> RE a -> RE a
re_dot :: RE a
Documentation
data RE a | Source
Data type for regular expressions.
Instances
Eq a => Eq (RE a)
Show a => Show (RE a)
checkRE :: Show a => RE a -> String | Source
Checks if an input matched a regular expression. The function should be called after matches. Was the sentence used in `matches` in the language of the regular expression? -> matches e s == s `in` L(e)? 1.parameter re : the derived regular expression returns : empty String if input matched the regular expression, otherwise an error message is returned
matches :: RE String -> XmlTrees -> RE String | Source
Derives a regular expression with respect to a list of elements. 1.parameter re : regular expression 2.parameter list : list of elements to which the regular expression is applied returns : the derived regular expression
printRE :: Show a => RE a -> String | Source
Constructs a string representation of a regular expression. 1.parameter re : a regular expression returns : the string representation of the regular expression
re_unit :: RE a | Source
Constructs a regular expression for an empty sequence. returns : regular expression for an empty sequence
re_zero :: String -> RE a | Source
Constructs a regular expression for an empty set. 1.parameter errMsg : error message returns : regular expression for an empty set
re_sym :: a -> RE a | Source
Constructs a regular expression for accepting a symbol 1.parameter sym : the symbol to be accepted returns : regular expression for accepting a symbol
re_rep :: RE a -> RE a | Source
Constructs an optional repetition (*) of a regular expression 1.parameter re_a : regular expression to be repeted returns : new regular expression
re_plus :: RE a -> RE a | Source
Constructs a repetition (+) of a regular expression 1.parameter re_a : regular expression to be repeted returns : new regular expression
re_opt :: RE a -> RE a | Source
Constructs an option (?) of a regular expression 1.parameter re_a : regular expression to be optional returns : new regular expression
re_seq :: RE a -> RE a -> RE a | Source
Constructs a sequence (,) of two regular expressions 1.parameter re_a : first regular expression in sequence 2.parameter re_b : second regular expression in sequence returns : new regular expression
re_alt :: RE a -> RE a -> RE a | Source
Constructs an alternative (|) of two regular expressions 1.parameter re_a : first regular expression of alternative 2.parameter re_b : second regular expression of alternative returns : new regular expression
re_dot :: RE a | Source
Constructs a regular expression for accepting any singel symbol returns : regular expression for accepting any singel symbol
Produced by Haddock version 2.4.2