From 7f08f2e2c8a52055b218febedef37fa0d52f39a2 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Thu, 10 Nov 2016 15:50:45 -0800 Subject: [PATCH] rename --- beautiful-racket/br/demo/jsonic/tokenizer.rkt | 4 ++-- brag/brag/brag.scrbl | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/beautiful-racket/br/demo/jsonic/tokenizer.rkt b/beautiful-racket/br/demo/jsonic/tokenizer.rkt index fc99bab..58f40b4 100644 --- a/beautiful-racket/br/demo/jsonic/tokenizer.rkt +++ b/beautiful-racket/br/demo/jsonic/tokenizer.rkt @@ -5,8 +5,8 @@ (define our-lexer (lexer [(eof) eof] - [(delimited-by "//" "\n") (next-token)] - [(delimited-by "@$" "$@") + [(between "//" "\n") (next-token)] + [(between "@$" "$@") (token 'SEXP-TOK (trim-delimiters "@$" lexeme "$@"))] [any-char (token 'CHAR-TOK lexeme)])) (our-lexer port)) diff --git a/brag/brag/brag.scrbl b/brag/brag/brag.scrbl index 97585a1..f628c45 100755 --- a/brag/brag/brag.scrbl +++ b/brag/brag/brag.scrbl @@ -983,11 +983,11 @@ Repeatedly apply @racket[tokenizer] to @racket[source-string], gathering the res } -@defproc[(trim-delimiters [left-delimiter string?] +@defproc[(trim-ends [left-str string?] [str string?] -[right-delimiter string?]) +[right-str string?]) string?]{ -Remove @racket[left-delimiter] from the left side of @racket[str], and @racket[right-delimiter] from its right side. Intended as a helper function for @racket[delimited-by]. +Remove @racket[left-str] from the left side of @racket[str], and @racket[right-str] from its right side. Intended as a helper function for @racket[between]. } @@ -1050,9 +1050,9 @@ one character.} Character ranges, matching characters between successive pairs of characters.} -@defform[(delimited-by open close)]{ +@defform[(between open close)]{ -A string that is bounded by the @racket[open] and @racket[close] delimiters. Matching is non-greedy (meaning, it stops at the first occurence of @racket[close]). The resulting lexeme includes the delimiters. To remove them, see @racket[trim-delimiters].} +A string that is bounded by @racket[open] and @racket[close]. Matching is non-greedy (meaning, it stops at the first occurence of @racket[close]). The resulting lexeme includes @racket[open] and @racket[close]. To remove them, see @racket[trim-ends].} @close-eval[my-eval]