diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2014-03-01 21:49:46 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2014-03-01 21:49:46 -0800 |
commit | 684c8e9d60812778b785ef0fc3fa78592f228bf8 (patch) | |
tree | 3ce51eb4db7a039fcc4e04b2022cfa5b54fde953 /ChangeLog | |
parent | 29bfa94d05a5c7d1a8205753b6c13731ecba564a (diff) | |
download | txr-684c8e9d60812778b785ef0fc3fa78592f228bf8.tar.gz txr-684c8e9d60812778b785ef0fc3fa78592f228bf8.tar.bz2 txr-684c8e9d60812778b785ef0fc3fa78592f228bf8.zip |
New quasiquote idea: let's have two quasiquote macros sharing one
expander. One macro based on sys:qquote, sys:unquote and sys:splice,
and the other based on qquote, unquote and splice in the user package.
The read syntax puts out the sys: one.
* eval.c (expand_qquote): Takes three additional arguments: the
qquote, unquote and splice symbols to recognize.
The invalid splice diagnostic is adjusted based on which backquote
we are expanding.
(me_qquote): Look at the symbol in the first position of the form
and then expand either the internal quasiquote macro or the public one,
passing the right symbols into expand_qquote.
(eval_init): Register error-throwing stub functions
for the sys_qquote_s, sys_unquote_s and sys_splice_s symbols.
Register a macro for sys_qquote_s.
* lib.c (sys_qquote_s, sys_unquote_s, sys_splice_s): New symbol
variables.
(obj_init): Initialize new variables. Change qquote_s,
unquote_s and splice_s to user package.
(obj_print, obj_pprint): Convert only sys_qquote_s,
sys_unquote_s and sys_splice_s to the read syntax.
The quote_s, unquote_s and splice_s symbols are not
treated specially.
* lib.h (sys_qquote_s, sys_unquote_s, sys_splice_s): Declared.
* parser.y (n_expr): Use sys_qquote_s, sys_unquote_s and
sys_splice_s rather than qquote_s, unquote_s and splice_s.
(unquotes_occur): Likewise.
* txr.1: Documented.
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 35 |
1 files changed, 35 insertions, 0 deletions
@@ -1,5 +1,40 @@ 2014-03-01 Kaz Kylheku <kaz@kylheku.com> + New quasiquote idea: let's have two quasiquote macros sharing one + expander. One macro based on sys:qquote, sys:unquote and sys:splice, + and the other based on qquote, unquote and splice in the user package. + The read syntax puts out the sys: one. + + * eval.c (expand_qquote): Takes three additional arguments: the + qquote, unquote and splice symbols to recognize. + The invalid splice diagnostic is adjusted based on which backquote + we are expanding. + (me_qquote): Look at the symbol in the first position of the form + and then expand either the internal quasiquote macro or the public one, + passing the right symbols into expand_qquote. + (eval_init): Register error-throwing stub functions + for the sys_qquote_s, sys_unquote_s and sys_splice_s symbols. + Register a macro for sys_qquote_s. + + * lib.c (sys_qquote_s, sys_unquote_s, sys_splice_s): New symbol + variables. + (obj_init): Initialize new variables. Change qquote_s, + unquote_s and splice_s to user package. + (obj_print, obj_pprint): Convert only sys_qquote_s, + sys_unquote_s and sys_splice_s to the read syntax. + The quote_s, unquote_s and splice_s symbols are not + treated specially. + + * lib.h (sys_qquote_s, sys_unquote_s, sys_splice_s): Declared. + + * parser.y (n_expr): Use sys_qquote_s, sys_unquote_s and + sys_splice_s rather than qquote_s, unquote_s and splice_s. + (unquotes_occur): Likewise. + + * txr.1: Documented. + +2014-03-01 Kaz Kylheku <kaz@kylheku.com> + * configure: changed numerous "if ! conftest" tests to "if conftest", swapping around the consequent and alternative clauses. |