Fix bug in bos/eos handling.
CRE-SEARCH? (defined in scsh/rx/re-low.scm) calls REGEXP-MATCH with 4th and 5th arguments indicating whether this corresponds to begin/end of line. For matching a string, these must be #t. The reason it was working previously (with both parameters set to #f) was a bug in regexp1.c:116 (fixed now by placing the appropriate parenthesis), caused by | having higher precedence than ?: in C (as a result, the flags passed to the C regexp engine were not correctly computed).
This commit is contained in:
parent
b0d75bda86
commit
35e91dcfd2
|
@ -81,7 +81,7 @@
|
|||
(let ((ret (regexp-match (cre:regexp cre) str #t #f #f start)))
|
||||
(if (not ret)
|
||||
#f
|
||||
(make-regexp-match str
|
||||
(make-regexp-match str
|
||||
(translate-submatches ret
|
||||
(cre:tvec cre)
|
||||
match-vec))))))))
|
||||
|
@ -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 start)))))
|
||||
(regexp-match (cre:regexp/nm cre) str #f #t #t start)))))
|
||||
|
|
Loading…
Reference in New Issue