*** empty log message ***

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

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

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

Loading…
Cancel
Save