diff --git a/beautiful-racket/br/demo/jsonic/expander.rkt b/beautiful-racket/br/demo/jsonic/expander.rkt index b93d58c..429af9d 100644 --- a/beautiful-racket/br/demo/jsonic/expander.rkt +++ b/beautiful-racket/br/demo/jsonic/expander.rkt @@ -2,8 +2,8 @@ (require json (for-syntax br/datum racket/string)) (provide (rename-out [jsonic-mb #%module-begin]) jsonic-program - char - s-val) + other-char + s-exp) (define-macro (jsonic-mb PARSE-TREE) #'(#%module-begin @@ -14,7 +14,7 @@ (define-macro (jsonic-program STR ...) #'(string-append STR ...)) -(define-macro (char STR) +(define-macro (other-char STR) #'STR) (define (stringify result) @@ -26,7 +26,7 @@ (format "~a: ~a" (stringify k) (stringify v))) ", "))] [else ""])) -(define-macro (s-val STR ...) +(define-macro (s-exp STR ...) (define s-exp-string (string-join (map syntax->datum (syntax->list #'(STR ...))) "")) (with-pattern ([DATUM (format-datum '~a s-exp-string)]) diff --git a/beautiful-racket/br/demo/jsonic/parser.rkt b/beautiful-racket/br/demo/jsonic/parser.rkt index ae1ed5d..cda9d00 100644 --- a/beautiful-racket/br/demo/jsonic/parser.rkt +++ b/beautiful-racket/br/demo/jsonic/parser.rkt @@ -1,4 +1,4 @@ #lang brag -jsonic-program: (char | s-val)* -char: CHAR -s-val: /OPEN CHAR* /CLOSE \ No newline at end of file +jsonic-program: (other-char | s-exp)* +other-char: CHAR +s-exp: /OPEN CHAR* /CLOSE \ No newline at end of file