From 330d822f9fb259ba10ff585324472463da864be9 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Fri, 20 Jan 2017 14:29:07 -0800 Subject: [PATCH] fixes --- brag/brag/support.rkt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/brag/brag/support.rkt b/brag/brag/support.rkt index c154c0d..6af427e 100755 --- a/brag/brag/support.rkt +++ b/brag/brag/support.rkt @@ -79,6 +79,15 @@ [(_ OPEN CLOSE) #'(:seq OPEN (complement (:seq any-string CLOSE any-string)) CLOSE)]))) +(provide uc+lc) +(define-lex-trans uc+lc + (λ(stx) + (syntax-case stx () + [(_ . STRS) + (with-syntax ([(UCSTR ...) (map (compose1 string-upcase syntax->datum) (syntax->list #'STRS))] + [(LCSTR ...) (map (compose1 string-downcase syntax->datum) (syntax->list #'STRS))]) + #'(union (union UCSTR ...) (union LCSTR ...)))]))) + ;; change names of lexer abbreviations to be consistent with Racket srcloc conventions (define-syntax-rule (dprt ID-IN ID-OUT)