From fb26d2b7cdf91c74859c252889958764f7c61fc7 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Sat, 28 Jan 2017 10:21:26 -0800 Subject: [PATCH] change name --- brag/brag/brag.scrbl | 6 +++--- brag/brag/support.rkt | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/brag/brag/brag.scrbl b/brag/brag/brag.scrbl index d249c87..648a818 100755 --- a/brag/brag/brag.scrbl +++ b/brag/brag/brag.scrbl @@ -967,11 +967,11 @@ DrRacket should highlight the offending locations in the source.} -@defproc[(apply-tokenizer [tokenizer procedure?] - [source-string (or/c string? +@defproc[(apply-tokenizer-maker [tokenizer-maker procedure?] + [source (or/c string? input-port?)]) list?]{ -Repeatedly apply @racket[tokenizer] to @racket[source-string], gathering the resulting tokens into a list. Useful for testing or debugging a tokenizer. +Repeatedly apply @racket[tokenizer-maker] to @racket[source], gathering the resulting tokens into a list. @racket[source] can be a string or an input port. Useful for testing or debugging a tokenizer. } diff --git a/brag/brag/support.rkt b/brag/brag/support.rkt index 6af19c1..5328323 100755 --- a/brag/brag/support.rkt +++ b/brag/brag/support.rkt @@ -60,8 +60,9 @@ (exn:fail:parsing-srclocs instance))) -(provide apply-tokenizer) -(define (apply-tokenizer tokenize in) +(provide apply-tokenizer-maker + (rename-out [apply-tokenizer-maker apply-tokenizer])) +(define (apply-tokenizer-maker tokenize in) (define input-port (if (string? in) (open-input-string in) in))