From f4a6c56c8e8841c1991c1bb44546681ccbdb8f3a Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 25 Mar 2014 22:10:31 -0700 Subject: * eval.c (me_quasilist): New static function. (eval_init): Register me_quasilist as quasilist macro expander. * lib.c (quasilist_s): New global variable. (obj_init): quasilist_s initialized. * lib.h (quasilist_s): Declared. * match.c (do_txreval): Handle quasilist syntax. * parser.l (QWLIT): New exclusive state. Extend lexical grammar to transition to QWLIT state upon the #` or #*` sequence which kicks off a word literal, and in that state, piecewise lexically analyze the QLL, mostly by borrowing rules from quasiliterals. * parser.y (QWORDS, QWSPLICE): New tokens. (n_exprs): Integrate splicing form of QLL syntax. (n_expr): Integrate non-splicing form of QLL syntax. (litchars): Propagate line number info. (quasilit): Fix "string literal" wording in error message. * txr.1: Introduced WLL abbreviation for word list literals, cleaned up the text a little, and documented QLL's. --- lib.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib.h') diff --git a/lib.h b/lib.h index 702ef585..cf7f3413 100644 --- a/lib.h +++ b/lib.h @@ -330,7 +330,8 @@ extern val var_s, expr_s, regex_s, chset_s, set_s, cset_s, wild_s, oneplus_s; extern val nongreedy_s, compiled_regex_s; extern val quote_s, qquote_s, unquote_s, splice_s; extern val sys_qquote_s, sys_unquote_s, sys_splice_s; -extern val zeroplus_s, optional_s, compl_s, compound_s, or_s, and_s, quasi_s; +extern val zeroplus_s, optional_s, compl_s, compound_s; +extern val or_s, and_s, quasi_s, quasilist_s; extern val skip_s, trailer_s, block_s, next_s, freeform_s, fail_s, accept_s; extern val all_s, some_s, none_s, maybe_s, cases_s, collect_s, until_s, coll_s; extern val define_s, output_s, single_s, first_s, last_s, empty_s; -- cgit v1.2.3