You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
beautiful-racket/beautiful-racket-demo/basic-demo/tokenizer.rkt

14 lines
342 B
Racket

#lang br
(require "lexer.rkt" brag/support racket/contract)
(define (make-tokenizer ip [path #f])
(port-count-lines! ip)
(file-path path)
(define (next-token) (basic-lexer ip))
next-token)
(provide
(contract-out
[make-tokenizer
((input-port?) (path?) . ->* .
(-> (or/c eof-object? string? srcloc-token?)))]))