diff options
author | Camil Staps | 2016-06-23 09:29:58 +0200 |
---|---|---|
committer | Camil Staps | 2016-06-23 09:41:16 +0200 |
commit | 5daf973fa5ba6fdbf2b4a65f4aed6513e337be8e (patch) | |
tree | 67c8ff9506da2ff689d654ec18805fddfcacffa7 /Regex.dcl | |
parent | Switch to posix; minimal working version (diff) |
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) |