.
original commit: 7da358f4d0c49fcca9081b0d8fa5abf90cefc8e8
This commit is contained in:
parent
de27c8ea0c
commit
e468aeb397
|
@ -192,7 +192,7 @@
|
||||||
;; Not enough even in the special queue.
|
;; Not enough even in the special queue.
|
||||||
;; Read once and add it.
|
;; Read once and add it.
|
||||||
(let* ([t (make-bytes (min 4096 (+ sk (bytes-length s))))]
|
(let* ([t (make-bytes (min 4096 (+ sk (bytes-length s))))]
|
||||||
[r (read s)])
|
[r (read t)])
|
||||||
(cond
|
(cond
|
||||||
[(evt? r)
|
[(evt? r)
|
||||||
;; We can't deal with an event, so complain
|
;; We can't deal with an event, so complain
|
||||||
|
@ -206,7 +206,7 @@
|
||||||
[else (let ([v (if (number? r)
|
[else (let ([v (if (number? r)
|
||||||
(subbytes t 0 r)
|
(subbytes t 0 r)
|
||||||
r)])
|
r)])
|
||||||
(set-cdr! special-peeked-tail v)
|
(set-cdr! special-peeked-tail (cons v null))
|
||||||
;; Got something; now try again
|
;; Got something; now try again
|
||||||
(do-peek-it s skip unless-evt))]))]
|
(do-peek-it s skip unless-evt))]))]
|
||||||
[(eof-object? (car l))
|
[(eof-object? (car l))
|
||||||
|
@ -547,7 +547,7 @@
|
||||||
(let try-again ()
|
(let try-again ()
|
||||||
(let* ([progress-evt (port-progress-evt input-port)]
|
(let* ([progress-evt (port-progress-evt input-port)]
|
||||||
[m ((if poll?
|
[m ((if poll?
|
||||||
regexp-match-peek-positions*
|
regexp-match-peek-positions-immediate
|
||||||
regexp-match-peek-positions)
|
regexp-match-peek-positions)
|
||||||
pattern input-port 0 #f progress-evt)])
|
pattern input-port 0 #f progress-evt)])
|
||||||
(cond
|
(cond
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
regexp-replace-quote
|
regexp-replace-quote
|
||||||
regexp-match*
|
regexp-match*
|
||||||
regexp-match-positions*
|
regexp-match-positions*
|
||||||
regexp-match-peek-positions**
|
regexp-match-peek-positions*
|
||||||
regexp-split
|
regexp-split
|
||||||
regexp-match-exact?
|
regexp-match-exact?
|
||||||
regexp-match/fail-without-reading)
|
regexp-match/fail-without-reading)
|
||||||
|
@ -316,12 +316,12 @@
|
||||||
(wrap regexp-match-positions* -regexp-match-positions*)
|
(wrap regexp-match-positions* -regexp-match-positions*)
|
||||||
|
|
||||||
;; Returns all the positions at which the pattern matched.
|
;; Returns all the positions at which the pattern matched.
|
||||||
(define -regexp-match-peek-positions**
|
(define -regexp-match-peek-positions*
|
||||||
(regexp-fn 'regexp-match-peek-positions**
|
(regexp-fn 'regexp-match-peek-positions*
|
||||||
;; success-k:
|
;; success-k:
|
||||||
(lambda (expr string start end match-start match-end)
|
(lambda (expr string start end match-start match-end)
|
||||||
(cons (cons match-start match-end)
|
(cons (cons match-start match-end)
|
||||||
(regexp-match-peek-positions** expr string match-end end)))
|
(regexp-match-peek-positions* expr string match-end end)))
|
||||||
;; port-success-k --- use string case
|
;; port-success-k --- use string case
|
||||||
#f
|
#f
|
||||||
;; fail-k:
|
;; fail-k:
|
||||||
|
@ -331,7 +331,7 @@
|
||||||
#f
|
#f
|
||||||
#f
|
#f
|
||||||
#t))
|
#t))
|
||||||
(wrap regexp-match-peek-positions** -regexp-match-peek-positions**)
|
(wrap regexp-match-peek-positions* -regexp-match-peek-positions*)
|
||||||
|
|
||||||
;; Splits a string into a list by removing any piece which matches
|
;; Splits a string into a list by removing any piece which matches
|
||||||
;; the pattern.
|
;; the pattern.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user