Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package alex for openSUSE:Factory checked in 
at 2024-02-16 21:41:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/alex (Old)
 and      /work/SRC/openSUSE:Factory/.alex.new.1815 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "alex"

Fri Feb 16 21:41:52 2024 rev:36 rq:1146952 version:3.5.0.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/alex/alex.changes        2023-11-23 
21:43:08.084986566 +0100
+++ /work/SRC/openSUSE:Factory/.alex.new.1815/alex.changes      2024-02-16 
21:41:56.632808845 +0100
@@ -1,0 +2,17 @@
+Sat Dec 30 15:01:39 UTC 2023 - Peter Simons <[email protected]>
+
+- Update alex to version 3.5.0.0.
+  ## Changes in 3.5.0.0
+
+   * Add option `--numeric-version`.
+   * Remove deprecated `-v` as alias for `--version`.
+   * Add `-v` as placeholder for a future `--verbose` option.
+   * Make `alex{G,S}etUserState` available with the 
`monadUserState-bytestring` wrapper
+     ([Issue #220](https://github.com/haskell/alex/issues/220)).
+   * Debugging lexer: print character in addition to its ASCII code
+     ([PR #252](https://github.com/haskell/alex/pull/252)).
+   * Tested with GHC 8.0 - 9.8.1.
+
+  _Andreas Abel, 2023-12-30_
+
+-------------------------------------------------------------------

Old:
----
  alex-3.4.0.1.tar.gz

New:
----
  alex-3.5.0.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ alex.spec ++++++
--- /var/tmp/diff_new_pack.e1iUer/_old  2024-02-16 21:41:57.400836556 +0100
+++ /var/tmp/diff_new_pack.e1iUer/_new  2024-02-16 21:41:57.400836556 +0100
@@ -18,7 +18,7 @@
 
 %bcond_without tests
 Name:           alex
-Version:        3.4.0.1
+Version:        3.5.0.0
 Release:        0
 Summary:        Alex is a tool for generating lexical analysers in Haskell
 License:        BSD-3-Clause

++++++ alex-3.4.0.1.tar.gz -> alex-3.5.0.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alex-3.4.0.1/CHANGELOG.md 
new/alex-3.5.0.0/CHANGELOG.md
--- old/alex-3.4.0.1/CHANGELOG.md       2001-09-09 03:46:40.000000000 +0200
+++ new/alex-3.5.0.0/CHANGELOG.md       2001-09-09 03:46:40.000000000 +0200
@@ -1,3 +1,16 @@
+## Changes in 3.5.0.0
+
+ * Add option `--numeric-version`.
+ * Remove deprecated `-v` as alias for `--version`.
+ * Add `-v` as placeholder for a future `--verbose` option.
+ * Make `alex{G,S}etUserState` available with the `monadUserState-bytestring` 
wrapper
+   ([Issue #220](https://github.com/haskell/alex/issues/220)).
+ * Debugging lexer: print character in addition to its ASCII code
+   ([PR #252](https://github.com/haskell/alex/pull/252)).
+ * Tested with GHC 8.0 - 9.8.1.
+
+_Andreas Abel, 2023-12-30_
+
 ## Changes in 3.4.0.1
 
  * Address new `x-partial` warning of GHC 9.8.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alex-3.4.0.1/alex.cabal new/alex-3.5.0.0/alex.cabal
--- old/alex-3.4.0.1/alex.cabal 2001-09-09 03:46:40.000000000 +0200
+++ new/alex-3.5.0.0/alex.cabal 2001-09-09 03:46:40.000000000 +0200
@@ -1,6 +1,6 @@
 cabal-version: >= 1.10
 name: alex
-version: 3.4.0.1
+version: 3.5.0.0
 -- don't forget updating changelog.md!
 license: BSD3
 license-file: LICENSE
@@ -24,7 +24,7 @@
 tested-with:
         GHC == 9.8.1
         GHC == 9.6.3
-        GHC == 9.4.7
+        GHC == 9.4.8
         GHC == 9.2.8
         GHC == 9.0.2
         GHC == 8.10.7
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alex-3.4.0.1/data/AlexTemplate.hs 
new/alex-3.5.0.0/data/AlexTemplate.hs
--- old/alex-3.4.0.1/data/AlexTemplate.hs       2001-09-09 03:46:40.000000000 
+0200
+++ new/alex-3.5.0.0/data/AlexTemplate.hs       2001-09-09 03:46:40.000000000 
+0200
@@ -155,7 +155,7 @@
      Nothing -> (new_acc, input__)
      Just (c, new_input) ->
 #ifdef ALEX_DEBUG
-      trace ("State: " ++ show IBOX(s) ++ ", char: " ++ show c) $
+      trace ("State: " ++ show IBOX(s) ++ ", char: " ++ show c ++ " " ++ (show 
. chr . fromIntegral) c) $
 #endif
       case fromIntegral c of { IBOX(ord_c) ->
         let
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alex-3.4.0.1/data/AlexWrappers.hs 
new/alex-3.5.0.0/data/AlexWrappers.hs
--- old/alex-3.4.0.1/data/AlexWrappers.hs       2001-09-09 03:46:40.000000000 
+0200
+++ new/alex-3.5.0.0/data/AlexWrappers.hs       2001-09-09 03:46:40.000000000 
+0200
@@ -360,13 +360,13 @@
 alexSetStartCode :: Int -> Alex ()
 alexSetStartCode sc = Alex $ \s -> Right (s{alex_scd=sc}, ())
 
-#if !defined(ALEX_MONAD_BYTESTRING) && defined(ALEX_MONAD_USER_STATE)
+#if defined(ALEX_MONAD_USER_STATE)
 alexGetUserState :: Alex AlexUserState
 alexGetUserState = Alex $ \s@AlexState{alex_ust=ust} -> Right (s,ust)
 
 alexSetUserState :: AlexUserState -> Alex ()
 alexSetUserState ss = Alex $ \s -> Right (s{alex_ust=ss}, ())
-#endif /* !defined(ALEX_MONAD_BYTESTRING) && defined(ALEX_MONAD_USER_STATE) */
+#endif /* defined(ALEX_MONAD_USER_STATE) */
 
 #ifdef ALEX_MONAD
 alexMonadScan = do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alex-3.4.0.1/src/Main.hs new/alex-3.5.0.0/src/Main.hs
--- old/alex-3.4.0.1/src/Main.hs        2001-09-09 03:46:40.000000000 +0200
+++ new/alex-3.5.0.0/src/Main.hs        2001-09-09 03:46:40.000000000 +0200
@@ -53,19 +53,26 @@
 -- `main' decodes the command line arguments and calls `alex'.
 
 main:: IO ()
-main =  do
- args <- getArgs
- case getOpt Permute argInfo args of
+main = do
+  args <- getArgs
+  case getOpt Permute argInfo args of
     (cli,_,[]) | DumpHelp `elem` cli -> do
         prog <- getProgramName
         bye (usageInfo (usageHeader prog) argInfo)
     (cli,_,[]) | DumpVersion `elem` cli ->
         bye copyright
+    (cli,_,[]) | DumpNumericVersion `elem` cli ->
+        bye projectVersion
+    (cli,_,[]) | OptVerbose `elem` cli ->
+        failure "Option '--verbose' not yet implemented"
     (cli,[file],[]) ->
         runAlex cli file
-    (_,_,errors) -> do
-        prog <- getProgramName
-        die (concat errors ++ usageInfo (usageHeader prog) argInfo)
+    (_,_,errors) ->
+        failure $ concat errors
+  where
+    failure err = do
+      prog <- getProgramName
+      die (err ++ usageInfo (usageHeader prog) argInfo)
 
 projectVersion :: String
 projectVersion = showVersion version
@@ -399,6 +406,7 @@
 
 import_debug :: String
 import_debug   = "#if __GLASGOW_HASKELL__ >= 503\n" ++
+                 "import Data.Char (chr)\n" ++
                  "import System.IO\n" ++
                  "import System.IO.Unsafe\n" ++
                  "import Debug.Trace\n" ++
@@ -462,8 +470,10 @@
   | OptTabSize String
   | OptTemplateDir FilePath
   | OptLatin1
+  | OptVerbose
   | DumpHelp
   | DumpVersion
+  | DumpNumericVersion
   deriving Eq
 
 argInfo :: [OptDescr CLIFlags]
@@ -482,10 +492,14 @@
         "set tab size to be used in the generated lexer (default: 8)",
    Option ['d'] ["debug"] (NoArg OptDebugParser)
         "produce a debugging scanner",
+   Option ['v'] ["verbose"] (NoArg OptVerbose)
+        "be verbose (not yet implemented)",
    Option ['?'] ["help"] (NoArg DumpHelp)
         "display this help and exit",
-   Option ['V','v'] ["version"] (NoArg DumpVersion)  -- ToDo: -v is deprecated!
+   Option ['V'] ["version"] (NoArg DumpVersion)
         "output version information and exit"
+  ,Option [] ["numeric-version"] (NoArg DumpNumericVersion)
+        "output the version number and exit"
   ]
 
 -- 
-----------------------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alex-3.4.0.1/src/Scan.hs new/alex-3.5.0.0/src/Scan.hs
--- old/alex-3.4.0.1/src/Scan.hs        2001-09-09 03:46:40.000000000 +0200
+++ new/alex-3.5.0.0/src/Scan.hs        2001-09-09 03:46:40.000000000 +0200
@@ -471,7 +471,7 @@
      Nothing -> (new_acc, input__)
      Just (c, new_input) ->
 #ifdef ALEX_DEBUG
-      trace ("State: " ++ show IBOX(s) ++ ", char: " ++ show c) $
+      trace ("State: " ++ show IBOX(s) ++ ", char: " ++ show c ++ " " ++ (show 
. chr . fromIntegral) c) $
 #endif
       case fromIntegral c of { IBOX(ord_c) ->
         let
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alex-3.4.0.1/tests/Makefile 
new/alex-3.5.0.0/tests/Makefile
--- old/alex-3.4.0.1/tests/Makefile     2001-09-09 03:46:40.000000000 +0200
+++ new/alex-3.5.0.0/tests/Makefile     2001-09-09 03:46:40.000000000 +0200
@@ -102,9 +102,12 @@
 %.g.hs : %.x
        $(ALEX) $(TEST_ALEX_OPTS) -g $< -o $@
 
-CLEAN_FILES += *.n.hs *.g.hs *.info *.hi *.o *.bin *.exe
+%.d.hs : %.x
+       $(ALEX) $(TEST_ALEX_OPTS) --debug $< -o $@
 
-ALL_TEST_HS = $(shell echo $(TESTS) $(TEXT_TESTS) | sed -e 's/\([^\. 
]*\)\.\(l\)\{0,1\}x/\1.n.hs \1.g.hs/g')
+CLEAN_FILES += *.n.hs *.g.hs *.d.hs *.info *.hi *.o *.bin *.exe
+
+ALL_TEST_HS = $(shell echo $(TESTS) $(TEXT_TESTS) | sed -e 's/\([^\. 
]*\)\.\(l\)\{0,1\}x/\1.n.hs \1.g.hs \1.d.hs/g')
 
 ALL_TESTS = $(patsubst %.hs, %.run, $(ALL_TEST_HS))
 
@@ -128,4 +131,6 @@
 # :set args --template=.. simple.x -o simple.n.hs
 
 debug :
-       @echo HC_OPTS=$(HC_OPTS)
+       @echo ALEX      = $(ALEX)
+       @echo HC_OPTS   = $(HC_OPTS)
+       @echo ALL_TESTS = $(ALL_TESTS)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/alex-3.4.0.1/tests/monadUserState_typeclass_bytestring.x 
new/alex-3.5.0.0/tests/monadUserState_typeclass_bytestring.x
--- old/alex-3.4.0.1/tests/monadUserState_typeclass_bytestring.x        
2001-09-09 03:46:40.000000000 +0200
+++ new/alex-3.5.0.0/tests/monadUserState_typeclass_bytestring.x        
2001-09-09 03:46:40.000000000 +0200
@@ -70,6 +70,11 @@
   let
     lexAll =
       do
+        -- Andreas Abel, 2023-12-30, issue #220:
+        -- Test that alex{G,S}etUserState are in scope.
+        u <- alexGetUserState
+        alexSetUserState (u + 1)
+
         res <- alexMonadScan
         case res of
           EOF -> return []
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/alex-3.4.0.1/tests/tokens_monadUserState_bytestring.x 
new/alex-3.5.0.0/tests/tokens_monadUserState_bytestring.x
--- old/alex-3.4.0.1/tests/tokens_monadUserState_bytestring.x   2001-09-09 
03:46:40.000000000 +0200
+++ new/alex-3.5.0.0/tests/tokens_monadUserState_bytestring.x   2001-09-09 
03:46:40.000000000 +0200
@@ -28,30 +28,39 @@
 tok f (p,_,input,_) len = return (f p (B.take (fromIntegral len) input))
 
 -- The token type:
-data Token =
-       Let AlexPosn            |
-       In  AlexPosn            |
-       Sym AlexPosn Char       |
-        Var AlexPosn String     |
-       Int AlexPosn Int        |
-        Err AlexPosn            |
-        EOF
-        deriving (Eq,Show)
+data Token
+  = Let AlexPosn
+  | In  AlexPosn
+  | Sym AlexPosn Char
+  | Var AlexPosn String
+  | Int AlexPosn Int
+  | Err AlexPosn
+  | EOF
+  deriving (Eq,Show)
 
 alexEOF = return EOF
 
 main = if test1 /= result1 then do print test1; exitFailure
-                          else exitWith ExitSuccess
+                           else exitWith ExitSuccess
 
 type AlexUserState = ()
 alexInitUserState = ()
 
 scanner str = runAlex str $ do
-  let loop = do tk <- alexMonadScan
-                if tk == EOF
-                        then return [tk]
-                       else do toks <- loop
-                                return (tk:toks)
+  let
+    loop = do
+
+      -- Andreas Abel, 2023-12-30, issue #220:
+      -- Test that alex{G,S}etUserState are in scope.
+      () <- alexGetUserState
+      alexSetUserState ()
+
+      tk <- alexMonadScan
+      if tk == EOF
+          then return [tk]
+          else do
+            toks <- loop
+            return (tk:toks)
   loop
 
 test1 = case scanner "  let in 012334\n=+*foo bar__'" of

Reply via email to