Fix for (rx (|)) by Peter Wang
This commit is contained in:
parent
e60e77997f
commit
acb0c8265f
|
@ -437,11 +437,15 @@
|
|||
re-choice:posix))
|
||||
|
||||
((re-char-set? re)
|
||||
(if (re-any? re)
|
||||
(r 're-any) ; Special hack for ANY.
|
||||
(doit/leaf 'make-re-char-set 'make-re-char-set/posix
|
||||
`(,(char-set->scheme (re-char-set:cset re) r))
|
||||
re-char-set:posix)))
|
||||
(cond
|
||||
((re-any? re)
|
||||
(r 're-any)) ; Special hack for ANY.
|
||||
((re-empty? re)
|
||||
(r 're-empty)) ; Special hack for EMPTY.
|
||||
(else
|
||||
(doit/leaf 'make-re-char-set 'make-re-char-set/posix
|
||||
`(,(char-set->scheme (re-char-set:cset re) r))
|
||||
re-char-set:posix))))
|
||||
|
||||
((re-repeat? re)
|
||||
(doit 'make-re-repeat 'make-re-repeat/tsm (re-repeat:tsm re)
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
(define (regexp->posix-string re)
|
||||
;; We *must* simplify, to guarantee correct translation.
|
||||
(let ((re (simplify-regexp re)))
|
||||
(if (simple-empty-re? re) (values #f #f #f #f)
|
||||
(if (simple-empty-re? re) (values #f #f #f '#())
|
||||
(translate-regexp re))))
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue