fix empty-matching lexers

original commit: a6723283b8fc9647467b8daea20f17d134bc1b29
tokens
Matthew Flatt 14 years ago
parent 8252d4d2b6
commit 5d47014554

@ -8,14 +8,14 @@
(define match-double-string
(lexer
((:* (:~ #\" #\\)) (append (string->list lexeme)
((:+ (:~ #\" #\\)) (append (string->list lexeme)
(match-double-string input-port)))
((:: #\\ any-char) (cons (string-ref lexeme 1) (match-double-string input-port)))
(#\" null)))
(define match-single-string
(lexer
((:* (:~ #\' #\\)) (append (string->list lexeme)
((:+ (:~ #\' #\\)) (append (string->list lexeme)
(match-single-string input-port)))
((:: #\\ any-char) (cons (string-ref lexeme 1) (match-single-string input-port)))
(#\' null)))

Loading…
Cancel
Save