packages feed

uu-parsinglib 2.7.3.4 → 2.7.4

raw patch · 4 files changed

+15/−14 lines, 4 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Text.ParserCombinators.UU.Demo.MergeAndPermute: pA, pC, pB :: Grammar String
- Text.ParserCombinators.UU.Demo.MergeAndPermute: run_demos :: IO ()
- Text.ParserCombinators.UU.Utils: pDot, pRBrace, pLBrace, pRBracket, pLBracket, pRParen, pLParen, pDQuote, pComma :: Parser Char
+ Text.ParserCombinators.UU.Demo.MergeAndPermute: pA :: Grammar String
+ Text.ParserCombinators.UU.Demo.MergeAndPermute: pB :: Grammar String
+ Text.ParserCombinators.UU.Demo.MergeAndPermute: pC :: Grammar String
+ Text.ParserCombinators.UU.Demo.MergeAndPermute: show_demos :: IO ()
+ Text.ParserCombinators.UU.Utils: pComma :: Parser Char
+ Text.ParserCombinators.UU.Utils: pDQuote :: Parser Char
+ Text.ParserCombinators.UU.Utils: pDot :: Parser Char
+ Text.ParserCombinators.UU.Utils: pLBrace :: Parser Char
+ Text.ParserCombinators.UU.Utils: pLBracket :: Parser Char
+ Text.ParserCombinators.UU.Utils: pLParen :: Parser Char
+ Text.ParserCombinators.UU.Utils: pRBrace :: Parser Char
+ Text.ParserCombinators.UU.Utils: pRBracket :: Parser Char
+ Text.ParserCombinators.UU.Utils: pRParen :: Parser Char
- Text.ParserCombinators.UU.Demo.Examples: run' :: (Show a1, Show a, ListLike s a) => P (Str a s LineColPos) a1 -> s -> IO ()
+ Text.ParserCombinators.UU.Demo.Examples: run' :: (Show a, Show a1, ListLike s a) => P (Str a s LineColPos) a1 -> s -> IO ()

Files

src/Text/ParserCombinators/UU/CHANGELOG.hs view
@@ -2,6 +2,10 @@ -- -- export of constructors of LineCol and LineColPos exported --+-- Version 2.7.4+--+-- Made some abstrcat interpretation a bit simpler, and made comparing lengths less trict. Some times the abstrcat interpretation would <<loop>>+-- -- Version 2.7.3.3 -- -- cured a problem with loosing priority information when applying semantic actions, final cure is probably to intrduce a real priority mechanism
src/Text/ParserCombinators/UU/Core.hs view
@@ -215,7 +215,9 @@  instance Alternative (P   state) where    P ap np  pe pl <|> P aq nq qe ql -    =  let (rl, b) = trace' "calling natMin from <|>" (nat_min pl ql 0)+    =  let pl' = maybe pl (const (Zero pl)) pe+           ql' = maybe ql (const (Zero ql)) qe+           (rl, b) = trace' "calling natMin from <|>" (nat_min pl' ql' 0)            Nothing `alt` q  = q            p       `alt` Nothing = p            Just p  `alt` Just q  = Just (p <|>q)@@ -305,7 +307,7 @@     in mkParser nnp pe pl  -- |  For the precise functioning of the `amb` combinators see the paper cited in the "Text.ParserCombinators.UU.README";---    it converts an ambiguous parser into a parser which returns a list of possible recognitions,+--    it converts an ambiguous parser into a parser which returns a list of all possible recognitions, amb :: P st a -> P st [a] amb (P _  np  pe pl)   = let  combinevalues  :: Steps [(a,r)] -> Steps ([a],r)@@ -606,15 +608,10 @@ nat_add :: Nat -> Nat -> Nat nat_add (Zero _)        r           = trace' "Zero in add\n"        r nat_add (Succ l)        r           = trace' "Succ in add\n"        (Succ (nat_add l r))-nat_add l               (Zero _)    = trace' "Zero in right operand of add" l-nat_add l               (Succ r)    = trace' "Succ in right operand of add" (Succ (nat_add l r)) nat_add Infinite        _           = trace' "Infinite in add\n"    Infinite-nat_add l               Infinite    = trace' "Infinite in add\n"    Infinite nat_add Hole            _           = Hole-nat_add _               Hole        = Hole-nat_add Unspecified     Unspecified = Unspecified-nat_add Unspecified     r           = trace' "Unspecified in add\n" (nat_add r Unspecified)-+nat_add Unspecified     r           = trace' "Unspecified in add\n" Unspecified+    trace' :: String -> b -> b
src/Text/ParserCombinators/UU/Demo/MergeAndPermute.hs view
@@ -46,7 +46,7 @@ --  -- The 'a' at the right hand side can b any of the three 'a'-s in the input: ----- >>>   run ((,)    <$> pAtLeast 3 pA <||> pAtMost 3 pB)                              "aabbbb"+-- >>>   run ((,)    <$> pAtLeast 3 pA <||> pAtMost 3 pB)                              "ababbb" --  Result: (["a","a","a"],["b","b","b"]) --  Correcting steps:  --    Deleted   'b' at position LineColPos 0 5 5 expecting 'a'@@ -82,15 +82,15 @@ --  Result: (["a","a"],["b","b"]) --  -run_demos :: IO ()-run_demos =  do DEMOG (((,,) <$> two pA <||> three pB <||> pBetween 2 4 pC ), "cababbcccc")+show_demos :: IO ()+show_demos = do DEMOG (((,,) <$> two pA <||> three pB <||> pBetween 2 4 pC ), "cababbcccc")                 DEMO  ((amb (mkParserM ((,) <$> pmMany ((,) <$>  pA <*> pC) <||> pmMany pB)))  , "aabbcaabbccc")                 DEMOG ((pmMany(pABC))                                                          , "a2a1b1b2c2a3b3c1c3")                 DEMOG (((,)    <$> pBetween 2 3 pA <||> pBetween 1 2 pB)                       , "abba")                   DEMOG (((,)    <$> pBetween 2 3 pA <||> pBetween 1 2 pB)                       , "bba")                 DEMO ((amb (mkParserM( ((,)    <$> pBetween 2 3 pA <||> pBetween 1 2 pA))))    , "aaa")                 putStr "-- The 'a' at the right hand side can b any of the three 'a'-s in the input\n"-                DEMOG (((,)    <$> pAtLeast 3 pA <||> pAtMost 3 pB)                            , "aabbbb")  +                DEMOG (((,)    <$> pAtLeast 3 pA <||> pAtMost 3 pB)                            , "ababbb")                   DEMOG (((,)    <$> pSome pA <||> pMany pB)                                     , "abba")                        DEMOG (((,)    <$> pSome pA <||> pMany pB)                                     , "abba")                            DEMOG (((,)    <$> pSome pA <||> pMany pB)                                     , "")         
uu-parsinglib.cabal view
@@ -1,5 +1,5 @@ Name:                uu-parsinglib-Version:             2.7.3.4+Version:             2.7.4 Build-Type:          Simple License:             MIT Copyright:           S Doaitse Swierstra