From 6998d49dbbefb13272ebb35a710ad214f1920fc8 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sat, 13 Oct 2001 05:54:33 +0000 Subject: [PATCH] Rewrite so we don't depend on matchers lifting complex expressions upwards. --- v7/src/imail/imap-syntax.scm | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/v7/src/imail/imap-syntax.scm b/v7/src/imail/imap-syntax.scm index 99467ac58..b68db7bc2 100644 --- a/v7/src/imail/imap-syntax.scm +++ b/v7/src/imail/imap-syntax.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: imap-syntax.scm,v 1.17 2001/10/10 04:26:48 cph Exp $ +;;; $Id: imap-syntax.scm,v 1.18 2001/10/13 05:54:33 cph Exp $ ;;; ;;; Copyright (c) 2000, 2001 Massachusetts Institute of Technology ;;; @@ -107,11 +107,12 @@ url:match:escape)))))) (define imap:parse:enc-mailbox - (*parser - (map url:decode-string - (match (+ (alt (char-set (char-set-union imap:char-set:achar - (string->char-set ":@/"))) - url:match:escape)))))) + (let ((imap:char-set:bchar + (char-set-union imap:char-set:achar (string->char-set ":@/")))) + (*parser + (map url:decode-string + (match (+ (alt (char-set imap:char-set:bchar) + url:match:escape))))))) (define imap:parse:section (*parser @@ -137,11 +138,11 @@ ")")))) (define imap:parse:nz-number - (*parser - (map string->number - (match (seq (char-set (char-set-difference char-set:numeric - (char-set #\0))) - (* (char-set char-set:numeric))))))) + (let ((char-set:1-9 (char-set-difference char-set:numeric (char-set #\0)))) + (*parser + (map string->number + (match (seq (char-set char-set:1-9) + (* (char-set char-set:numeric)))))))) (define imap:parse:astring (*parser (alt imap:parse:atom imap:parse:string))) -- 2.25.1