Reputation: 1921
In Common Lisp, there are "read macros" that can be used to parse syntax to Lisp code.
Upvotes: 6
Views: 2540
Reputation: 2292
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.
Upvotes: 3