diff options
Diffstat (limited to 'Regex.dcl')
-rw-r--r-- | Regex.dcl | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -2,6 +2,7 @@ definition module Regex from Data.Maybe import ::Maybe from StdOverloaded import class toString, class fromString, class zero +from StdInt import << :: Regex @@ -22,4 +23,19 @@ instance fromString (Maybe Regex) freeRegex :: !Regex -> String // Nothing on error; otherwise True iff match -match :: !Regex !String -> Maybe Bool +match :: !Regex !Flags !String -> Maybe Bool + +/////////////////////////////////////////////////////////////////////////////// +/// regex.h /// +/////////////////////////////////////////////////////////////////////////////// + +/* POSIX `cflags' bits (i.e., information for regcomp = toRegex). */ +REG_EXTENDED :== 1 +REG_ICASE :== REG_EXTENDED << 1 +REG_NEWLINE :== REG_ICASE << 1 +REG_NOSUB :== REG_NEWLINE << 1 + +/* POSIX `eflags' bits (i.e., information for regexec = match). */ +REG_NOTBOL :== 1 +REG_NOTEOL :== (REG_NOTBOL << 1) +REG_STARTEND :== (REG_NOTEOL << 2) |