From 24f324071048aea4d0e6e43637b88a2a19c4b5b5 Mon Sep 17 00:00:00 2001 From: Scott Owens Date: Thu, 12 Aug 2004 03:09:55 +0000 Subject: [PATCH] *** empty log message *** original commit: ad85b3d11bfda2b8813c7b17f2c97d0f0d928c4e --- collects/parser-tools/lex-sre.ss | 4 ++-- collects/parser-tools/lex.ss | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/collects/parser-tools/lex-sre.ss b/collects/parser-tools/lex-sre.ss index 00d495b..a5560b1 100644 --- a/collects/parser-tools/lex-sre.ss +++ b/collects/parser-tools/lex-sre.ss @@ -13,7 +13,7 @@ & ~ (rename sre-- -) - (rename sre-/ /)) + (rename sre-/ /)/-only-chars) (define-lex-trans sre-* (syntax-rules () @@ -114,4 +114,4 @@ ) - \ No newline at end of file + diff --git a/collects/parser-tools/lex.ss b/collects/parser-tools/lex.ss index 271eada..b5a9a7a 100644 --- a/collects/parser-tools/lex.ss +++ b/collects/parser-tools/lex.ss @@ -173,7 +173,9 @@ (let ((first-pos (get-position ip)) (first-char (peek-char-or-special ip 0))) (cond - ((eq? 'special first-char) + ((eof-object? first-char) + (do-match ip first-pos eof-action (read-char-or-special ip) wrap?)) + ((not (char? first-char)) (let* ((comment? #f) (error? #f) (spec (with-handlers ((special-comment? @@ -190,8 +192,6 @@ (error? special-error-action) (else special-action)) spec wrap?))))) - ((eof-object? first-char) - (do-match ip first-pos eof-action (read-char-or-special ip) wrap?)) (else (let lexer-loop ( ;; current-state @@ -210,7 +210,7 @@ (let ((next-state (cond ((eof-object? char) #f) - ((eq? char 'special) #f) + ((not (char? char)) #f) (else (get-next-state (char->integer char) (vector-ref trans-table state)))))) (cond