packages feed

regex-tdfa 1.1.4 → 1.1.6

raw patch · 3 files changed

+9/−5 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

Text/Regex/TDFA/CorePattern.hs view
@@ -444,17 +444,18 @@            --        Non-accepting possibilities can all commute to the front and            --        become part of the nullQ.  The accepting bits then need prioritizing.            --    Does the above require changes in POr handling in TNFA?  Yes.-           --    Have to always use nullQ instead of recapitulating it.+           --    Have to always use nullQ instead of "recapitulating" it.            --    Could also create a constant-writing tag instead of many index tags.            -- Exasperation: This POr recursive mdo is very easy to make loop and lockup the program            -- if needTags is False then there is no way to disambiguate branches so fewer tags are needed+           let needUniqTags = childGroups ans            let needTags = varies ans || childGroups ans -- childGroups detects that "abc|a(b)c" needs tags            a <- if noTag m1 && needTags then uniq "POr start" else return m1 -- whole POr            b <- if noTag m2 && needTags then uniq "POr stop" else return m2 -- whole POr            let aAdvice = toAdvice a -- all branches share 'aAdvice'                bAdvice = toAdvice b -- last branch gets 'bAdvice', others may get own tag                -- Due to the recursive-do, it seems that I have to put the if needTags into the op'-               newUniq = if needTags then uniq "POr branch" else return bAdvice+               newUniq = if needUniqTags then uniq "POr branch" else return bAdvice --           trace ("\nPOr sub "++show aAdvice++" "++show bAdvice++"needsTags is "++show needTags) $ return ()            -- The "bs" values are allocated in left-to-right order before the children in "qs"            -- optimiztion: low priority for last branch is implicit, do not create separate tag here.@@ -496,7 +497,8 @@            b <- if noTag m2 && needsTags then uniq "PStar stop" else return m2            mOrbit <- if needsOrbit then makeOrbit else return Nothing -- any Orbit tag is created after the pre and post tags --           test1 <- if tagged q then uniq "not-TEST1" Minimize else return NoTag-           (q,resetOrbitTags) <- withOrbit (go p NoTag NoTag) -- all contained orbit tags get listened to (not including this one).+-- XXX XXX 1.1.5 testing second NoTag replaced with (toAdvice b)+           (q,resetOrbitTags) <- withOrbit (go p NoTag (toAdvice b)) -- all contained orbit tags get listened to (not including this one).            let nullView | mayFirstBeNull = cleanNullView $ childViews ++ skipView                         | otherwise = skipView                  where childViews = tagWrapNullView a b . orbitWrapNullView mOrbit resetOrbitTags $ nullQ q
Text/Regex/TDFA/ReadRegex.hs view
@@ -100,7 +100,7 @@  -- p_set :: Bool -> GenParser Char st Pattern p_set invert = do initial <- (option "" ((char ']' >> return "]") <|> (char '-' >> return "-")))-                  values <- many1 p_set_elem+                  values <- if null initial then many1 p_set_elem else many p_set_elem                   _ <- char ']'                   ci <- char_index                   let chars = maybe'set $ initial
regex-tdfa.cabal view
@@ -1,5 +1,5 @@ Name:                   regex-tdfa-Version:                1.1.4+Version:                1.1.6 -- 0.99.4 tests pnonempty' = \ p -> POr [ PEmpty, p ] instead of PNonEmpty -- 0.99.5 remove PNonEmpty constructor -- 0.99.6 change to nested nonEmpty calls for PBound@@ -42,6 +42,8 @@ -- 1.1.2 worked -- 1.1.3 BROKEN after 100 characters the compressOrbit dies! -- 1.1.4 fixed +-- 1.1.5 try needUniqTags in POr in CorePattern.hs, try (toAdvice b) for PStar child+-- 1.1.6 Fix bug preventing []] [-] [^]] [^-] (thanks to Maxime Henrion) License:                BSD3 License-File:           LICENSE Copyright:              Copyright (c) 2007, Christopher Kuklewicz