Compare symbols non-hygienic as well to support SREs within hygienic

macros.
This commit is contained in:
mainzelm 2002-04-18 16:06:02 +00:00
parent 897f40fb7a
commit 0a8e312756
1 changed files with 3 additions and 5 deletions

View File

@ -153,7 +153,8 @@
((c sre %eol) (non-cset) re-eol) ((c sre %eol) (non-cset) re-eol)
((pair? sre) ((pair? sre)
(let ((hygn-eq? (lambda (the-sym) (c (car sre) (r the-sym))))) (let ((hygn-eq? (lambda (the-sym) (or (c (car sre) (r the-sym))
(c (car sre) the-sym)))))
(cond (cond
((hygn-eq? '*) (non-cset) (re-repeat 0 #f (parse-seq (cdr sre)))) ((hygn-eq? '*) (non-cset) (re-repeat 0 #f (parse-seq (cdr sre))))
((hygn-eq? '+) (non-cset) (re-repeat 1 #f (parse-seq (cdr sre)))) ((hygn-eq? '+) (non-cset) (re-repeat 1 #f (parse-seq (cdr sre))))
@ -270,14 +271,11 @@
(if (null? sym-list) (if (null? sym-list)
#f #f
(or (c sre (r (car sym-list))) (or (c sre (r (car sym-list)))
(c sre (car sym-list))
(hygn-memq? (cdr sym-list))))))) (hygn-memq? (cdr sym-list)))))))
(let ((cs (cond (let ((cs (cond
((hygn-memq? '(nonl)) nonl-chars) ((hygn-memq? '(nonl)) nonl-chars)
((hygn-memq? '(lower-case lower)) char-set:lower-case) ((hygn-memq? '(lower-case lower)) char-set:lower-case)
;;; any is imported from scsh-utilities and for
;;; some reason this screws the hygienic renaming
;;; up here. So this is bogus:
((eq? sre 'any) char-set:full)
((hygn-memq? '(any)) char-set:full) ((hygn-memq? '(any)) char-set:full)
((hygn-memq? '(upper-case upper)) char-set:upper-case) ((hygn-memq? '(upper-case upper)) char-set:upper-case)
((hygn-memq? '(alphabetic alpha)) char-set:letter) ((hygn-memq? '(alphabetic alpha)) char-set:letter)