Commits

Anonymous committed c26b1c6

Adapt to latest comparse API

Comments (0)

Files changed (1)

   (char-set #\space #\tab))
 
 (define space-char
-  (preceded-by (satisfies space-chars)
+  (preceded-by (in space-chars)
                (result #\space)))
 
 (define space*
             #\- #\. #\^))
 
 (define special-char
-  (satisfies special-chars))
+  (in special-chars))
 
 (define normal-chars
   (char-set-complement!
     (char-set #\newline))))
 
 (define normal-char
-  (satisfies normal-chars))
+  (in normal-chars))
 
 (define non-space-char
   (none-of* space-char new-line item))
           (parser input)))))))
 
 (define link-title
-  (sequence* ((delimiter (is #\' #\"))
+  (sequence* ((delimiter (in #\' #\"))
               (title (-> (preceded-by
                           (is delimiter)
                           space*
 (define link-label
   (mutually-recursive-parser
    (enclosed-by (is #\[)
-                (sequence* ((text (-> (none-of* (is #\[ #\]) inline)
+                (sequence* ((text (-> (none-of* (in #\[ #\]) inline)
                                       (zero-or-more)))
                             (label (maybe (link-label))))
                   (result (if label
 
 (define explicit-link-source-contents
   (mutually-recursive-parser
-   (-> (is #\( #\) #\>)
+   (-> (in #\( #\) #\>)
        (none-of* non-space-char)
        (one-or-more)
        (any-of (sequence (is #\() (explicit-link-source-contents) (is #\))))
 (define auto-link-email
   (sequence* ((_ (preceded-by (is #\<) (maybe (char-seq "mailto:"))))
               (email (-> (sequence
-                           (one-or-more (satisfies #[-a-za-z0-9+_./!%~$]))
+                           (one-or-more (in #[-a-za-z0-9+_./!%~$]))
                            (is #\@)
                            (one-or-more (none-of* new-line (is #\>) item)))
                          (as-string)))
 
 (define auto-link-url
   (sequence* ((_ (is #\<))
-              (uri (-> (sequence (one-or-more (satisfies #[a-za-z]))
+              (uri (-> (sequence (one-or-more (in #[a-za-z]))
                                  (char-seq "://")
                                  (-> (none-of* new-line (is #\>) item)
                                      (one-or-more)))
   (any-of (line-of #\*) (line-of #\_)))
 
 (define escaped-char
-  (->> (string->char-set "-\\`|*_{}[]()#+.!><")
-       (satisfies)
+  (->> (in (string->char-set "-\\`|*_{}[]()#+.!><"))
        (preceded-by (is #\\) (none-of new-line))))
 
 (define code
     (result code)))
 
 (define alphanumeric-ascii
-  (satisfies #[a-za-z0-9]))
+  (in #[a-za-z0-9]))
 
 (define entity
   (->> (enclosed-by (is #\&)
                     (any-of (sequence (is #\#)
-                                      (satisfies (char-set #\x #\x))
-                                      (one-or-more (satisfies #[0-9a-fa-f])))
+                                      (in (char-set #\x #\x))
+                                      (one-or-more (in #[0-9a-fa-f])))
                             (sequence (is #\#)
-                                      (one-or-more (satisfies #[0-9])))
+                                      (one-or-more (in #[0-9])))
                             (one-or-more alphanumeric-ascii))
                     (is #\;))
        (as-string)
        (node '&)))
 
 (define quoted
-  (let ((delimiters (satisfies (char-set #\" #\'))))
+  (let ((delimiters (in #\" #\')))
     (sequence* ((delimiter delimiters)
                 (text (zero-or-more (none-of* (is delimiter) item)))
                 (_ (is delimiter)))
 
 (define reference-title
   (let ((delimiters '((#\( . #\)))))
-    (sequence* ((delimiter (->> (satisfies (char-set #\( #\' #\"))
+    (sequence* ((delimiter (->> (in #\( #\' #\")
                                 (preceded-by space-new-line)))
                 (closing-delimiter (result (or (alist-ref delimiter delimiters) delimiter)))
                 (title (-> (preceded-by
                         (title ,title)))))
 
 (define raw-line
-  (any-of (-> (is #\return #\newline)
+  (any-of (-> (in #\return #\newline)
               (none-of* item)
               (zero-or-more)
               (sequence new-line))
   (char-set #\* #\- #\_))
 
 (define horizontal-rule-char
-  (satisfies horizontal-rule-chars))
+  (in horizontal-rule-chars))
 
 (define horizontal-rule
   (sequence* ((_ non-indent-space)
 
 (define enumerator
   (preceded-by non-indent-space
-               (one-or-more (satisfies char-set:digit))
+               (one-or-more (in char-set:digit))
                (is #\.) space+))
 
 (define bullet-chars
   (char-set #\+ #\* #\-))
 
 (define bullet-char
-  (satisfies bullet-chars))
+  (in bullet-chars))
 
 (define bullet
   (enclosed-by (preceded-by non-indent-space (none-of horizontal-rule))