An efficient library that defines a structure of regular expressions and some operations for regular expressions. This library is used to translate integrated code in the form of POSIX extended regular expressions into efficient Curry programs. The implementation is based on the paper "A Play on Regular Expressions - Functional Pearl" by Fischer, Huch and Wilke (September 27–29, 2010, Baltimore, Maryland, USA).
Author: Corinna Wambsganz
Version: October 2022
eps
:: (Ord a, Eq b, CGFunction b, Semiring b) => [Int] -> Reg a b
|
literal
:: (Eq a, CGFunction a, Semiringc a) => [Int] -> Char -> Reg (Int,Char) a
|
alt
:: (Ord a, Eq b, CGFunction b, Semiring b) => [Int] -> Reg a b -> Reg a b -> Reg a b
|
conc
:: (Ord a, Eq b, CGFunction b, Semiring b) => [Int] -> Reg a b -> Reg a b -> Reg a b
|
rep
:: (Ord a, Eq b, CGFunction b, Semiring b) => [Int] -> Reg a b -> Reg a b
|
pl
:: (Ord a, Eq b, CGFunction b, Semiring b) => [Int] -> Reg a b -> Reg a b
|
anyL
:: (Ord a, Eq b, CGFunction b, Semiring b) => [Int] -> Reg a b
|
bracket
:: (Eq a, CGFunction a, Semiringc a) => [Int] -> [Either Char (Char,Char)] -> Reg (Int,Char) a
|
negBracket
:: (Eq a, CGFunction a, Semiringc a) => [Int] -> [Either Char (Char,Char)] -> Reg (Int,Char) a
|
start
:: (Eq a, CGFunction a, Semiringc a) => [Int] -> Reg (Int,Char) a -> Bool -> Reg (Int,Char) a
|
end
:: (Eq a, CGFunction a, Semiringc a) => [Int] -> Reg (Int,Char) a -> Bool -> Reg (Int,Char) a
|
times
:: (Ord a, Eq b, CGFunction b, Semiring b) => [Int] -> Int -> Int -> Reg a b -> Reg a b
|
captureG
:: (Ord a, Eq b, CGFunction b, Semiring b) => Int -> Reg a b -> Reg a b
|
grep
:: Ord a => Reg (Int,a) All -> [a] -> [Int]
The grep function returns efficient a list with startingpositions of substrings that match the regular expression. |
grepPos
:: Ord a => Reg (Int,a) All -> [a] -> Int
The grepPos function returns efficient the first startingposition of a substring which matches the regular expression. |
grepShow
:: Ord a => Reg (Int,a) AllRange -> [a] -> [[a]]
The grepShow function returns efficient a list of substrings that match the regular expression. |
grepShowUnique
:: Ord a => Reg (Int,a) AllRange -> [a] -> [[a]]
|
capture
:: Ord a => Reg (Int,a) CaptureGroups -> [a] -> [(Int,[[a]])]
The capture function is used to return capture groups efficient. |
match
:: Ord a => Reg (Int,a) CaptureGroups -> [a] -> Bool
|
Constructors:
|
|
|
|
|
|
|
|
|
|
|
The grep function returns efficient a list with startingpositions of substrings that match the regular expression.
|
The grepPos function returns efficient the first startingposition of a substring which matches the regular expression.
|
The grepShow function returns efficient a list of substrings that match the regular expression.
|
|
The capture function is used to return capture groups efficient.
|
|