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
8 years ago
(require "lexer.rkt" brag/support racket/contract)
8 years ago
(define (make-tokenizer ip [path #f])
8 years ago
(port-count-lines! ip)
8 years ago
(file-path path)
8 years ago
(define (next-token) (basic-lexer ip))
8 years ago
next-token)
(provide
(contract-out
[make-tokenizer
((input-port?) (path?) . ->* .
(-> (or/c eof-object? string? srcloc-token?)))]))