From 195d429226afa75ca6a48faca8a67b989a71a011 Mon Sep 17 00:00:00 2001 From: Scott Owens Date: Thu, 16 Dec 2004 19:32:50 +0000 Subject: [PATCH] *** empty log message *** original commit: 1ec30fb00dd2e72f294ed06a6d8f78ec659dd076 --- collects/parser-tools/lex.ss | 4 +++- collects/parser-tools/private-lex/deriv.ss | 1 + collects/parser-tools/private-lex/util.ss | 1 - 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/collects/parser-tools/lex.ss b/collects/parser-tools/lex.ss index 52b5b5d..c1ca19e 100644 --- a/collects/parser-tools/lex.ss +++ b/collects/parser-tools/lex.ss @@ -98,6 +98,8 @@ name-lst))) (let-values (((trans start action-names no-look disappeared-uses) (build-lexer re-actname-lst))) + #;(when (vector-ref action-names start) + (raise-syntax-error #f "accepts the empty string" stx)) (with-syntax ((start-state-stx start) (trans-table-stx trans) (no-lookahead-stx no-look) @@ -249,7 +251,7 @@ ;; including the one just read (length-chars 1) ;; how many characters are in the longest match - (longest-match-length 1)) + (longest-match-length 0)) (let ((next-state (cond ((eof-object? char) #f) diff --git a/collects/parser-tools/private-lex/deriv.ss b/collects/parser-tools/private-lex/deriv.ss index 84ae825..0f025f2 100644 --- a/collects/parser-tools/private-lex/deriv.ss +++ b/collects/parser-tools/private-lex/deriv.ss @@ -334,5 +334,6 @@ (define t13 (build-test-dfa `((intersection (concatenation (intersection) "111" (intersection)) (complement (union (concatenation (intersection) "01") (repeat 1 +inf.0 "1"))))))) + (define t14 (build-test-dfa `((complement "1")))) |# ) \ No newline at end of file diff --git a/collects/parser-tools/private-lex/util.ss b/collects/parser-tools/private-lex/util.ss index 13878b0..0448ca3 100644 --- a/collects/parser-tools/private-lex/util.ss +++ b/collects/parser-tools/private-lex/util.ss @@ -107,6 +107,5 @@ null) '(5 1 2 3 4 1 2 3 2 1))) - )