From a25862d24050e8ff6e8eb1077715abac4afe5ff4 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 17 Nov 2015 06:41:38 -0800 Subject: @(rep) as shorthand for @(coll :vars nil). * match.c (h_coll): Check for rep symbol, and handle similarly to v_coll. Use symbol in error message. (dir_tables_init): Bind rep symbol to h_coll. * parser.y (elems): Don't generate rep_elem phrase structure for the sake of catching "rep outside of output"; this production now conflicts with the intent to allow this. (elem): Add various REP productions which clones of COLL. * txr.1: Documented new @(rep) usage. --- txr.1 | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'txr.1') diff --git a/txr.1 b/txr.1 index dbb819d9..45d49946 100644 --- a/txr.1 +++ b/txr.1 @@ -3011,7 +3011,13 @@ understood in an output clause. A directive understood within an @(output) section, for repeating multi-line text, with successive substitutions pulled from lists. The directive .code @(rep) -produces iteration over lists horizontally within one line. +produces iteration over lists horizontally within one line. These directives +have a different meaning in matching clauses, providing a shorthand +notation for +.code @(repeat :vars nil) +and +.codn "@(rep :vars nil)" , +respectively. .coIP @(deffilter) This directive is used for defining named filters, which are useful @@ -5107,6 +5113,20 @@ an analogous .code :chars keyword. +The +.code @(coll) +directive takes the +.code :vars +keyword. + +The shorthand +.code @(rep) +may be used instead of +.codn "@(coll :vars nil)" . +.code @(rep) +takes all keywords, except +.codn :vars . + .dir flatten The -- cgit v1.2.3