From fc944fa1134a6a22a252164b347f702410e76902 Mon Sep 17 00:00:00 2001 From: Scott Owens Date: Tue, 7 Sep 2004 22:56:45 +0000 Subject: [PATCH] *** empty log message *** original commit: b69d1aa062a5b0434253a549ab33fd6661c390d9 --- collects/parser-tools/lex.ss | 7 +++---- collects/parser-tools/private-lex/front.ss | 13 +++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/collects/parser-tools/lex.ss b/collects/parser-tools/lex.ss index 1e457c7..15f36b0 100644 --- a/collects/parser-tools/lex.ss +++ b/collects/parser-tools/lex.ss @@ -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)))))) diff --git a/collects/parser-tools/private-lex/front.ss b/collects/parser-tools/private-lex/front.ss index 11998d8..417cafd 100644 --- a/collects/parser-tools/private-lex/front.ss +++ b/collects/parser-tools/private-lex/front.ss @@ -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))