*** empty log message ***

original commit: b69d1aa062a5b0434253a549ab33fd6661c390d9
tokens
Scott Owens 21 years ago
parent 6e3f0cd227
commit fc944fa113

@ -173,11 +173,10 @@
#f #f
(let* ((try (quotient (+ min max) 2)) (let* ((try (quotient (+ min max) 2))
(el (vector-ref table try)) (el (vector-ref table try))
(range (car el)) (r1 (vector-ref el 0))
(r1 (car range)) (r2 (vector-ref el 1)))
(r2 (cdr range)))
(cond (cond
((and (>= char r1) (<= char r2)) (cdr el)) ((and (>= char r1) (<= char r2)) (vector-ref el 2))
((< char r1) (get-next-state-helper char min try table)) ((< char r1) (get-next-state-helper char min try table))
(else (get-next-state-helper char (add1 try) max table)))))) (else (get-next-state-helper char (add1 try) max table))))))

@ -34,11 +34,12 @@
(let ((char-ranges (loc:integer-set-contents (car chars/to))) (let ((char-ranges (loc:integer-set-contents (car chars/to)))
(to (cdr chars/to))) (to (cdr chars/to)))
(map (lambda (char-range) (map (lambda (char-range)
(cons char-range to)) (vector (car char-range) (cdr char-range) to)
#;(cons char-range to))
char-ranges))) char-ranges)))
all-chars/to)) all-chars/to))
(lambda (a b) (lambda (a b)
(< (caar a) (caar b)))))) (< (vector-ref a 0) (vector-ref b 0))))))
(vector-set! state-table from-state (list->vector flat-all-chars/to)))) (vector-set! state-table from-state (list->vector flat-all-chars/to))))
(dfa-transitions dfa)) (dfa-transitions dfa))
state-table)) state-table))
@ -113,12 +114,12 @@
v)) v))
((dfa->1d-table d1) (make-vector 1 #f)) ((dfa->1d-table d1) (make-vector 1 #f))
((dfa->1d-table d2) #(#f ((dfa->1d-table d2) #(#f
#(((49 . 50) . 1) ((51 . 51) . 2)) #(#(49 50 1) #(51 51 2))
#(((49 . 49) . 3)) #(#(49 49 3))
#f)) #f))
((dfa->1d-table d3) #(#f ((dfa->1d-table d3) #(#f
#(((49 . 50) . 1) ((51 . 51) . 2) ((100 . 200) . 0)) #(#(49 50 1) #(51 51 2) #(100 200 0))
#(((49 . 49) . 3)) #(#(49 49 3))
#f)) #f))
((dfa->actions d1) (vector #f)) ((dfa->actions d1) (vector #f))
((dfa->actions d2) (vector #f #f 2 3)) ((dfa->actions d2) (vector #f #f 2 3))

Loading…
Cancel
Save