|
|
@ -184,10 +184,9 @@
|
|
|
|
(define id (lambda (x) x))
|
|
|
|
(define id (lambda (x) x))
|
|
|
|
|
|
|
|
|
|
|
|
(define (do-match lb first-pos longest-match-length length longest-match-action wrap?)
|
|
|
|
(define (do-match lb first-pos longest-match-length length longest-match-action wrap?)
|
|
|
|
(if (not longest-match-action)
|
|
|
|
(unless longest-match-action
|
|
|
|
(let* ((match (read-string length lb))
|
|
|
|
(let* ((match (read-string length lb))
|
|
|
|
(end-pos (get-position lb)))
|
|
|
|
(end-pos (get-position lb)))
|
|
|
|
(if (not longest-match-action)
|
|
|
|
|
|
|
|
(raise-read-error
|
|
|
|
(raise-read-error
|
|
|
|
(format "lexer: No match found in input starting with: ~a" match)
|
|
|
|
(format "lexer: No match found in input starting with: ~a" match)
|
|
|
|
(file-path)
|
|
|
|
(file-path)
|
|
|
@ -214,7 +213,7 @@
|
|
|
|
end-pos
|
|
|
|
end-pos
|
|
|
|
match
|
|
|
|
match
|
|
|
|
id
|
|
|
|
id
|
|
|
|
lb))))))
|
|
|
|
lb)))))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(define-struct position (offset line col))
|
|
|
|
(define-struct position (offset line col))
|
|
|
|