gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet-scheme] 01/03: config/parser: Use R7RS symbols instead of Guile'


From: gnunet
Subject: [gnunet-scheme] 01/03: config/parser: Use R7RS symbols instead of Guile's syntax.
Date: Tue, 06 Sep 2022 16:50:36 +0200

This is an automated email from the git hooks/post-receive script.

maxime-devos pushed a commit to branch master
in repository gnunet-scheme.

commit a68a911b54c9173c49db7e0a601845fbb36ef9aa
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Tue Sep 6 16:45:05 2022 +0200

    config/parser: Use R7RS symbols instead of Guile's syntax.
    
    More standard!  Also, works-around
    <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=49623>.
    
    * gnu/gnunet/config/parser.scm: Use the R7RS symbol syntax.
---
 gnu/gnunet/config/parser.scm | 57 ++++++++++++++++++++++----------------------
 1 file changed, 28 insertions(+), 29 deletions(-)

diff --git a/gnu/gnunet/config/parser.scm b/gnu/gnunet/config/parser.scm
index 956e19e..4b69e9c 100644
--- a/gnu/gnunet/config/parser.scm
+++ b/gnu/gnunet/config/parser.scm
@@ -31,7 +31,7 @@
          <position:=> make-=-position =-position?
          position:variable-start position:variable-end
          position:= position:value-start position:value-end
-         |<position:[]>| #{make-[]-position}# #{[]-position?}#
+         |<position:[]>| |make-[]-position| |[]-position?|
          position:section-name-start position:section-name-end
          <position:@inline@> make-@inline@-position @inline@-position?
          position:@inline@-start position:@inline@-end
@@ -40,14 +40,14 @@
          ;; expansion parser (data types)
          <expo:literal> make-literal-position literal-position?
          <expo:$> make-$-position $-position?
-         |<expo:${}>| #{make-${}-position}# #{${}-position?}#
-         |<expo:${:-}>| #{make-${:-}-position}# #{${:-}-position?}#
+         |<expo:${}>| |make-${}-position| |${}-position?|
+         |<expo:${:-}>| |make-${:-}-position| |${:-}-position?|
 
          expo:literal-start expo:literal-end
          expo:$-name-start expo:$-name-end
-         |expo:${}-name-start| #{expo:${}-name-end}#
-         |expo:${:-}-name-start| #{expo:${:-}-name-end}#
-         |expo:${:-}-value-start| #{expo:${:-}-value-end}#
+         |expo:${}-name-start| |expo:${}-name-end|
+         |expo:${:-}-name-start| |expo:${:-}-name-end|
+         |expo:${:-}-value-start| |expo:${:-}-value-end|
          |expo:${:-}-value-parts|
 
          ;; expansion parser (conditions)
@@ -153,7 +153,7 @@ If the value is empty, then by convention 
@var{variable-start} and
 @var{variable-end} are the positions right after the equality sign.")
 
     (define-positions-type
-      (|<position:[]>| #{make-[]-position}# #{[]-position?}#)
+      (|<position:[]>| |make-[]-position| |[]-position?|)
       ((section-name-start position:section-name-start)
        (section-name-end position:section-name-end))
       ;; TODO: should empty section names be allowed?
@@ -269,28 +269,27 @@ the start and end positions of a region of texts without 
expansions.")
       "@var{$-name-start} (inclusive) and @var{$-name-end} (exclusive) are the
 start and end positions of a variable name in an expansion X/$VAR/etcetera.")
 
-    (define-positions-type (|<expo:${}>| #{make-${}-position}#
-                           |${}-position?|)
-      ((|${}-name-start| #{expo:${}-name-start}#)
-       (|${}-name-end| #{expo:${}-name-end}#))
-      ((< |${}-name-start| #{${}-name-end}#))
+    (define-positions-type (|<expo:${}>| |make-${}-position| |${}-position?|)
+      ((|${}-name-start| |expo:${}-name-start|)
+       (|${}-name-end| |expo:${}-name-end|))
+      ((< |${}-name-start| |${}-name-end|))
       "@var{$@{@}-name-start} (inclusive) and @var{$@{@}-name-end}
 (exclusive) are the start and end positions of a variable name in an expansion
 ${VAR}.")
 
-    (define-record-type (|<expo:${:-}>| #{make-${:-}-position}#
+    (define-record-type (|<expo:${:-}>| |make-${:-}-position|
                         |${:-}-position?|)
-      (fields (immutable |${:-}-name-start| #{expo:${:-}-name-start}#)
-             (immutable |${:-}-name-end| #{expo:${:-}-name-end}#)
-             (immutable |${:-}-value-start| #{expo:${:-}-value-start}#)
-             (immutable |${:-}-value-end| #{expo:${:-}-value-end}#)
-             (immutable |${:-}-value-parts| #{expo:${:-}-value-parts}#))
+      (fields (immutable |${:-}-name-start| |expo:${:-}-name-start|)
+             (immutable |${:-}-name-end| |expo:${:-}-name-end|)
+             (immutable |${:-}-value-start| |expo:${:-}-value-start|)
+             (immutable |${:-}-value-end| |expo:${:-}-value-end|)
+             (immutable |${:-}-value-parts| |expo:${:-}-value-parts|))
       (sealed #t)
       (opaque #t)
       (protocol
        (lambda (%make)
-        (lambda (|${:-}-name-start| #{${:-}-name-end}#
-                 |${:-}-value-start| #{${:-}-value-end}#
+        (lambda (|${:-}-name-start| |${:-}-name-end|
+                 |${:-}-value-start| |${:-}-value-end|
                  |${:-}-value-parts|)
           "@var{$@{:-@}-name-start} (inclusive) and @var{$@{:-@}-name-end}
 (exclusive) are the start and end positions of a variable name in an expansion
@@ -300,16 +299,16 @@ DEFAULT-VALUE.  @var{${:-}-value-parts} is an ordered 
list of contiguous
 expansion position objects, representing the structure of @samp{DEFAULT-VALUE}
 (unverified)."
           (assert (and (exact-integers?
-                        |${:-}-name-start| #{${:-}-name-end}#
-                        |${:-}-value-start| #{${:-}-value-end}#)
+                        |${:-}-name-start| |${:-}-name-end|
+                        |${:-}-value-start| |${:-}-value-end|)
                        (<= 0 |${:-}-name-start|)
-                       (< |${:-}-name-start| #{${:-}-name-end}#)
-                       (= (- |${:-}-value-start| #{${:-}-name-end}#) 2)
-                       (<= |${:-}-value-start| #{${:-}-value-end}#)
+                       (< |${:-}-name-start| |${:-}-name-end|)
+                       (= (- |${:-}-value-start| |${:-}-name-end|) 2)
+                       (<= |${:-}-value-start| |${:-}-value-end|)
                        (or (pair? |${:-}-value-parts|)
                            (null? |${:-}-value-parts|))))
-          (%make |${:-}-name-start| #{${:-}-name-end}#
-                 |${:-}-value-start| #{${:-}-value-end}#
+          (%make |${:-}-name-start| |${:-}-name-end|
+                 |${:-}-value-start| |${:-}-value-end|
                  |${:-}-value-parts|)))))
 
     ;; Now define the possible syntax errors.
@@ -334,7 +333,7 @@ expansions with a default, @code{$@{@}} for braced variable 
expansions without
 default and @code{$} for unbraced variable expansions."
       (assert (and (exact-integers? position)
                   (<= 0 position)
-                  (memq kind '($ |${}| #{${:-}}#))))
+                  (memq kind '($ |${}| |${:-}|))))
       (%make-empty-variable-violation position kind))
 
     (define-condition-type &missing-close &expansion-violation
@@ -349,7 +348,7 @@ indicates the type of variable expansion found, as in
 @code{empty-variable-violation}, though it cannot be @code{$@}."
       (assert (and (exact-integers? position)
                   (<= 0 position)
-                  (memq kind '(|${}| #{${:-}}#))))
+                  (memq kind '(|${}| |${:-}|))))
       (%make-missing-close-violation position kind))
 
     (define cs::-or-close (char-set #\: #\}))

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]