devops: Simpler char-in regsexps.
authorMatt Birkholz <matt@birchwood-abbey.net>
Fri, 13 Dec 2019 06:54:02 +0000 (23:54 -0700)
committerMatt Birkholz <matt@birchwood-abbey.net>
Fri, 13 Dec 2019 06:54:02 +0000 (23:54 -0700)
The char-in expression will union multiple char-set-ishes.

src/devops/devops.scm

index 389e296f2526af3cbde856d74f6b6911e6394382..f21b3e11aaf65619f919bb98dd8d261df09a3927 100644 (file)
@@ -201,7 +201,7 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
   (compile-regsexp '(seq (* (any-char))
                         "ubsystem-identification! \"Release\""
                         " '("
-                        (group version (+ (alt #\space (char-in numeric))))
+                        (group version (+ (char-in #\space numeric)))
                         ")")))
 
 (define (get-core-version)
@@ -224,8 +224,7 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 (define (make-news-pattern fullname)
   (compile-regsexp `(seq ,fullname
                         #\space
-                        (group version
-                               (+ (alt #\. (char-in numeric))))
+                        (group version (+ (char-in #\. numeric)))
                         " - "
                         (group author (+ (char-not-in #\,)))
                         ", "
@@ -257,7 +256,7 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
    '(seq "(add-subsystem-identification!"
         " \""(+ (char-not-in #\"))"\""
         " '"(group version (seq "("
-                                (+ (alt #\space (char-in numeric)))
+                                (+ (char-in #\space numeric))
                                 ")"))
         ")")))
 
@@ -337,7 +336,7 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 (define plugin-version-pattern
   (compile-regsexp '(seq (* (char-in whitespace))
                         #\[
-                        (group version (+ (alt #\. (char-in numeric))))
+                        (group version (+ (char-in #\. numeric)))
                         #\])))
 
 (define (plugin-version plugin)
@@ -1145,8 +1144,7 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 (define (sorted-tags package-name)
   (sort (let ((pattern (compile-regsexp
                        `(seq ,package-name #\-
-                             (group version
-                                    (+ (alt #\. (char-in numeric))))
+                             (group version (+ (char-in #\. numeric)))
                              (string-end)))))
          (append-map!
           (lambda (line)