|
|
|
@ -239,19 +239,19 @@
|
|
|
|
|
(cond
|
|
|
|
|
((and (null? old-states) (null? new-states))
|
|
|
|
|
(make-dfa (get-state-number) (state-index start)
|
|
|
|
|
(mergesort (filter (lambda (x) (cdr x))
|
|
|
|
|
(map (lambda (state)
|
|
|
|
|
(cons (state-index state) (get-final (state-spec state))))
|
|
|
|
|
all-states))
|
|
|
|
|
(lambda (a b) (< (car a) (car b))))
|
|
|
|
|
(mergesort (hash-table-map transitions
|
|
|
|
|
(lambda (state trans)
|
|
|
|
|
(cons (state-index state)
|
|
|
|
|
(map (lambda (t)
|
|
|
|
|
(cons (car t)
|
|
|
|
|
(state-index (cdr t))))
|
|
|
|
|
trans))))
|
|
|
|
|
(lambda (a b) (< (car a) (car b))))))
|
|
|
|
|
(sort (filter (lambda (x) (cdr x))
|
|
|
|
|
(map (lambda (state)
|
|
|
|
|
(cons (state-index state) (get-final (state-spec state))))
|
|
|
|
|
all-states))
|
|
|
|
|
(lambda (a b) (< (car a) (car b))))
|
|
|
|
|
(sort (hash-table-map transitions
|
|
|
|
|
(lambda (state trans)
|
|
|
|
|
(cons (state-index state)
|
|
|
|
|
(map (lambda (t)
|
|
|
|
|
(cons (car t)
|
|
|
|
|
(state-index (cdr t))))
|
|
|
|
|
trans))))
|
|
|
|
|
(lambda (a b) (< (car a) (car b))))))
|
|
|
|
|
((null? old-states)
|
|
|
|
|
(loop new-states null all-states (compute-chars new-states)))
|
|
|
|
|
((null? cs)
|
|
|
|
@ -336,4 +336,4 @@
|
|
|
|
|
(repetition 1 +inf.0 "1")))))))
|
|
|
|
|
(define t14 (build-test-dfa `((complement "1"))))
|
|
|
|
|
|#
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|