In Common Lisp, there are "read macros" that can be used to parse syntax to Lisp code.
Scheme supports three types of macro. When it comes to understanding what's going on, the easiest of these three types of macro is Lisp's original type of macro, known as defmacro in Common Lisp, EMACS Lisp, and SCM.
A macro is a syntactic form with an associated transformer that expands the original form into existing forms. To put it another way, a macro is an extension to the Racket compiler. Most of the syntactic forms of racket/base and racket are actually macros that expand into a small set of core constructs.
The only semi-portable way that comes to mind is via SRFI-10's limited form of reader macros. These have to start with a sharp sign and a comma, and then a list expression which starts with a symbol which identifies the read-time constructor.
CHICKEN also provides support for using arbitrary characters as reader macro hooks.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With