Extend the parser such that groups of symbols written as [sebf], [h-k], [^abc], and [^h-k] as well as special symbols such as . or \d can be used in regular expressions.
To do so, change of the RegExp data type. The Symbol constructor should take a predicate :: a -> Bool rather than a symbol :: a.
Extend the parser such that groups of symbols written as
[sebf]
,[h-k]
,[^abc]
, and[^h-k]
as well as special symbols such as.
or\d
can be used in regular expressions.To do so, change of the
RegExp
data type. TheSymbol
constructor should take a predicate:: a -> Bool
rather than a symbol:: a
.