|
|
@ -744,6 +744,18 @@
|
|
|
|
val
|
|
|
|
val
|
|
|
|
(next success-k fail-k max-depth tasks)))]
|
|
|
|
(next success-k fail-k max-depth tasks)))]
|
|
|
|
[fail-k (lambda (max-depth tasks)
|
|
|
|
[fail-k (lambda (max-depth tasks)
|
|
|
|
|
|
|
|
(cond
|
|
|
|
|
|
|
|
[(null? tok-list)
|
|
|
|
|
|
|
|
(if error-proc
|
|
|
|
|
|
|
|
(error-proc #t
|
|
|
|
|
|
|
|
'no-tokens
|
|
|
|
|
|
|
|
#f
|
|
|
|
|
|
|
|
(make-position #f #f #f)
|
|
|
|
|
|
|
|
(make-position #f #f #f))
|
|
|
|
|
|
|
|
(error
|
|
|
|
|
|
|
|
'cfg-parse
|
|
|
|
|
|
|
|
"no tokens"))]
|
|
|
|
|
|
|
|
[else
|
|
|
|
(let ([bad-tok (list-ref tok-list
|
|
|
|
(let ([bad-tok (list-ref tok-list
|
|
|
|
(min (sub1 (length tok-list))
|
|
|
|
(min (sub1 (length tok-list))
|
|
|
|
max-depth))])
|
|
|
|
max-depth))])
|
|
|
@ -756,7 +768,7 @@
|
|
|
|
(error
|
|
|
|
(error
|
|
|
|
'cfg-parse
|
|
|
|
'cfg-parse
|
|
|
|
"failed at ~a"
|
|
|
|
"failed at ~a"
|
|
|
|
(tok-val bad-tok)))))])
|
|
|
|
(tok-val bad-tok))))]))])
|
|
|
|
(#,start tok-list
|
|
|
|
(#,start tok-list
|
|
|
|
;; we simulate a token at the very beginning with zero width
|
|
|
|
;; we simulate a token at the very beginning with zero width
|
|
|
|
;; for use with the position-generating code (*-start-pos, *-end-pos).
|
|
|
|
;; for use with the position-generating code (*-start-pos, *-end-pos).
|
|
|
|