From f533db489cc03d29ff49ed71785b034080d9986a Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Thu, 12 Dec 2019 23:54:02 -0700 Subject: [PATCH] devops: Simpler char-in regsexps. The char-in expression will union multiple char-set-ishes. --- src/devops/devops.scm | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/devops/devops.scm b/src/devops/devops.scm index 389e296f2..f21b3e11a 100644 --- a/src/devops/devops.scm +++ b/src/devops/devops.scm @@ -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) -- 2.25.1