#69 Problem with regexp-search? in 0.6.2

closed-fixed
run-time (53)
5
2002-08-16
2002-05-24
No

With scsh 0.5.3, I have the following:
----------
Scsh 0.5.3
> (let ((r (rx bos "a")))
(values
(regexp-search r "bca" 2)
(regexp-search? r "bca" 2)))
; 2 values
'#{regexp-match}
#t
>
----------
which seems correct, because when regexp-match returns
a match, regexp-match? returns true.

Now with 0.6.2 this isn't the case anymore:
----------
Welcome to scsh 0.6.2 (Gambit-C 4.0)
Type ,? for help.
> (let ((r (rx bos "a")))
(values
(regexp-search r "bca" 2)
(regexp-search? r "bca" 2)))
; 2 values
'#{regexp-match}
#f
----------
Here regexp-match returns a match, while regexp-match?
returns false.
All this is on "Linux lamppc21 2.4.3-12 #1 Fri Jun 8
15:05:56 EDT 2001 i686 unknown". Didn't try on another OS.

Michel.

Discussion

  • Martin Gasbichler

    • assigned_to: nobody --> sperber
     
  • Martin Gasbichler

    • status: open --> closed-fixed
     
  • Martin Gasbichler

    Logged In: YES
    user_id=17553

    The following patch fixes this:
    Index: re-low.scm
    ===================================================================
    RCS file: /cvsroot/scsh/scsh-0.6/scsh/rx/re-low.scm,v
    retrieving revision 1.11
    retrieving revision 1.12
    diff -u -r1.11 -r1.12
    --- re-low.scm 22 Feb 2002 10:27:07 -0000 1.11
    +++ re-low.scm 5 Aug 2002 14:22:11 -0000 1.12
    @@ -114,4 +114,4 @@
    (if (not (cre:regexp/nm cre))
    (set-cre:regexp/nm cre (make-regexp re-str

    (regexp-option extended))))
    - (regexp-match (cre:regexp/nm cre) str #f #f #f)))))
    + (regexp-match (cre:regexp/nm cre) str #f #f #f
    start)))))

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks