summaryrefslogtreecommitdiffstats
path: root/lib.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-03-25 22:10:31 -0700
committerKaz Kylheku <kaz@kylheku.com>2014-03-25 22:10:31 -0700
commitf4a6c56c8e8841c1991c1bb44546681ccbdb8f3a (patch)
tree943413daf7f15ed66562552b9cb43c8ada7053d0 /lib.h
parent4c6d387b73dca86caed48b1e786c5c1bc2c4716b (diff)
downloadtxr-f4a6c56c8e8841c1991c1bb44546681ccbdb8f3a.tar.gz
txr-f4a6c56c8e8841c1991c1bb44546681ccbdb8f3a.tar.bz2
txr-f4a6c56c8e8841c1991c1bb44546681ccbdb8f3a.zip
* 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.
Diffstat (limited to 'lib.h')
-rw-r--r--lib.h3
1 files changed, 2 insertions, 1 deletions
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;