I'm doing that fort of thing here:
https://github.com/kristianlm/chicken-minissh/blob/master/minissh-parsing.scm#L5-L11
Here's another example, perhaps easier to follow:
(import-for-syntax (only (chicken string) conc))
(define-syntax syntax-conc
(er-macro-transformer
(lambda (x r t)
(string->symbol (apply conc (intersperse (cdr x) '-))))))
(expand '(syntax-conc "a" "b" "c")) ;; ==> a-b-c
I would recommend using syntax-rules whenever possible,
and only using er-macro-transformer when you have to. So, your syntax-rules
could
expand to syntax-conc.
K.
_______________________________________________
Chicken-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-users