xhaskell-library 0.0.2 → 0.0.3
raw patch · 7 files changed
+18/−19 lines, 7 files
Files
- Text/Regex/PDeriv/ByteString/LeftToRight.lhs +4/−4
- Text/Regex/PDeriv/ByteString/Posix.lhs +4/−4
- Text/Regex/PDeriv/ByteString/RightToLeft.lhs +4/−4
- Text/Regex/PDeriv/ByteString/TwoPasses.lhs +4/−4
- Text/Regex/PDeriv/IntPattern.lhs +1/−1
- Text/Regex/PDeriv/Translate.lhs +0/−1
- xhaskell-library.cabal +1/−1
Text/Regex/PDeriv/ByteString/LeftToRight.lhs view
@@ -65,10 +65,10 @@ > buildPdPat0Table :: Pat -> (PdPat0Table, [Int]) > buildPdPat0Table init = -> let sig = map (\x -> (x,0)) (sigmaRE (strip init)) -- ^ the sigma-> init_dict = D.insertNotOverwrite (D.hash init) (init,0) D.empty -- ^ add init into the initial dictionary-> (all, delta, dictionary) = sig `seq` builder sig [] [] [init] init_dict 1 -- ^ all states and delta-> final = all `seq` [ s | s <- all, isEmpty (strip s)] -- ^ the final states+> let sig = map (\x -> (x,0)) (sigmaRE (strip init)) -- the sigma+> init_dict = D.insertNotOverwrite (D.hash init) (init,0) D.empty -- add init into the initial dictionary+> (all, delta, dictionary) = sig `seq` builder sig [] [] [init] init_dict 1 -- all states and delta+> final = all `seq` [ s | s <- all, isEmpty (strip s)] -- the final states > sfinal = final `seq` dictionary `seq` map (mapping dictionary) final > lists = [ (i,l,jfs) | > (p,l, qfs) <- delta,
Text/Regex/PDeriv/ByteString/Posix.lhs view
@@ -63,10 +63,10 @@ > buildPdPat0Table :: Pat -> (PdPat0TableRev, [Int]) > buildPdPat0Table init = -> let sig = map (\x -> (x,0)) (sigmaRE (strip init)) -- ^ the sigma-> init_dict = D.insertNotOverwrite (D.hash init) (init,0) D.empty -- ^ add init into the initial dictionary-> (all, delta, dictionary) = sig `seq` builder sig [] [] [init] init_dict 1 -- ^ all states and delta-> final = all `seq` [ s | s <- all, isEmpty (strip s)] -- ^ the final states+> let sig = map (\x -> (x,0)) (sigmaRE (strip init)) -- the sigma+> init_dict = D.insertNotOverwrite (D.hash init) (init,0) D.empty -- add init into the initial dictionary+> (all, delta, dictionary) = sig `seq` builder sig [] [] [init] init_dict 1 -- all states and delta+> final = all `seq` [ s | s <- all, isEmpty (strip s)] -- the final states > sfinal = final `seq` dictionary `seq` map (mapping dictionary) final > lists = delta `seq` dictionary `seq` [ (j, l, (i,f,flag,vs)) | (p,l,f,q,flag,vs) <- delta, > let i = mapping dictionary p
Text/Regex/PDeriv/ByteString/RightToLeft.lhs view
@@ -66,10 +66,10 @@ > buildPdPat0Table :: Pat -> (PdPat0TableRev, [Int]) > buildPdPat0Table init = -> let sig = map (\x -> (x,0)) (sigmaRE (strip init)) -- ^ the sigma-> init_dict = D.insertNotOverwrite (D.hash init) (init,0) D.empty -- ^ add init into the initial dictionary-> (all, delta, dictionary) = sig `seq` builder sig [] [] [init] init_dict 1 -- ^ all states and delta-> final = all `seq` [ s | s <- all, isEmpty (strip s)] -- ^ the final states+> let sig = map (\x -> (x,0)) (sigmaRE (strip init)) -- the sigma+> init_dict = D.insertNotOverwrite (D.hash init) (init,0) D.empty -- add init into the initial dictionary+> (all, delta, dictionary) = sig `seq` builder sig [] [] [init] init_dict 1 -- all states and delta+> final = all `seq` [ s | s <- all, isEmpty (strip s)] -- the final states > sfinal = final `seq` dictionary `seq` map (mapping dictionary) final > lists = delta `seq` dictionary `seq` [ (j, l, (i,f,flag)) | (p,l,f,q,flag) <- delta, > let i = mapping dictionary p
Text/Regex/PDeriv/ByteString/TwoPasses.lhs view
@@ -102,10 +102,10 @@ > buildPdPat0Table :: Pat -> (PdPat0Table, [Int], PdPat0TableRev) > buildPdPat0Table init = -> let sig = map (\x -> (x,0)) (sigmaRE (strip init)) -- ^ the sigma-> init_dict = D.insertNotOverwrite (D.hash init) (init,0) D.empty -- ^ add init into the initial dictionary-> (all, delta, dictionary) = sig `seq` builder sig [] [] [init] init_dict 1 -- ^ all states and delta-> final = all `seq` [ s | s <- all, isEmpty (strip s)] -- ^ the final states+> let sig = map (\x -> (x,0)) (sigmaRE (strip init)) -- the sigma+> init_dict = D.insertNotOverwrite (D.hash init) (init,0) D.empty -- add init into the initial dictionary+> (all, delta, dictionary) = sig `seq` builder sig [] [] [init] init_dict 1 -- all states and delta+> final = all `seq` [ s | s <- all, isEmpty (strip s)] -- the final states > sfinal = final `seq` dictionary `seq` map (mapping dictionary) final > sdelta = [ (i,l,jfs) | > (p,l, qfs) <- delta,
Text/Regex/PDeriv/IntPattern.lhs view
@@ -147,7 +147,7 @@ > we are in the position of 'pushing' another label l' into (PPlus p' p*). > Shall we swap the order of the alternatives when p' is non-greedy? > Why not? This seems harmless since we have already made some progress by pushing l into p*. -}-> pdPat (PPlus p1 p2@(PStar _ _)) l -- ^ p2 must be pStar+> pdPat (PPlus p1 p2@(PStar _ _)) l -- p2 must be pStar > | isEmpty (strip p1) = > if isGreedy p1 > then [ PPlus p3 p2 | p3 <- pdPat p1 l ] ++ [ PPlus p3 p2' | (PPlus p1' p2') <- pdPat p2 l, let p3 = p1' `getBindingsFrom` p1 ]
Text/Regex/PDeriv/Translate.lhs view
@@ -108,7 +108,6 @@ > p_trans :: EPat -> State TState Pat > p_trans epat = > case epat of-> -- ^ we might not need this here. > -- () ~>_p () > { EEmpty -> > do { return ( PE Empty )
xhaskell-library.cabal view
@@ -1,5 +1,5 @@ Name: xhaskell-library-Version: 0.0.2+Version: 0.0.3 License: BSD3 License-File: LICENSE Copyright: Copyright (c) 2009, Kenny Zhuo Ming Lu and Martin Sulzmann