syntax/parse: fix progress ordering

This commit is contained in:
Ryan Culpepper 2016-06-15 18:01:30 -04:00
parent 51bd8f3de5
commit 2eb806d20c

View File

@ -161,16 +161,20 @@ ie (ps->stx+index ps1) = (ps->stx+index ps2).
(partition (lambda (item) (eq? '#f (item-first-prf item))) rest4)) (partition (lambda (item) (eq? '#f (item-first-prf item))) rest4))
(unless (null? rest5) (unless (null? rest5)
(error 'syntax-parse "INTERNAL ERROR: bad progress: ~e\n" rest5)) (error 'syntax-parse "INTERNAL ERROR: bad progress: ~e\n" rest5))
(append (cond [(pair? CDR)
(maximal/stx STX) (define leastCDR (apply min (map item-first-prf CDR)))
(cond [(pair? CDR) (append
(define leastCDR (apply min (map item-first-prf CDR))) (maximal/stx STX)
(maximal/progress (map (lambda (item) (item-pop-prf-ncdrs item leastCDR)) CDR))] (maximal/progress (map (lambda (item) (item-pop-prf-ncdrs item leastCDR)) CDR)))]
[(pair? CAR) [(pair? CAR)
(maximal/progress (map item-pop-prf CAR))] (append
[(pair? NULL) (maximal/stx STX)
(list (map cdr NULL))] (maximal/progress (map item-pop-prf CAR)))]
[else null]))])) [(pair? STX)
(maximal/stx STX)]
[(pair? NULL)
(list (map cdr NULL))]
[else null])]))
;; maximal-prf1/ord : (NEListof (Cons IPS A)) -> (NEListof (Cons IPS A)) ;; maximal-prf1/ord : (NEListof (Cons IPS A)) -> (NEListof (Cons IPS A))
;; PRE: each item has ORD first frame ;; PRE: each item has ORD first frame