diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-09-06 06:32:17 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-09-06 06:32:17 -0700 |
commit | add0e86529a33fae5aa424c7d3f3bbc9854886c1 (patch) | |
tree | ea37b9f1512f580158c4a7a2def21b129855136e | |
parent | e6191860f4f015db062c42945ef4615fe45feda2 (diff) | |
download | txr-add0e86529a33fae5aa424c7d3f3bbc9854886c1.tar.gz txr-add0e86529a33fae5aa424c7d3f3bbc9854886c1.tar.bz2 txr-add0e86529a33fae5aa424c7d3f3bbc9854886c1.zip |
Regression: @(rep) wrongly diagnoses empty clause.
Introduced on 2016-04-27 in 7afbcc19.
* parser.y (elem): Check $4 phrase position for
empty clauses, rather than $2. That's where they are.
-rw-r--r-- | parser.y | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -472,14 +472,14 @@ elem : texts { $$ = rlcp(cons(text_s, $1), $1); $2, nao); rl($$, num($1)); rl($6, car($5)); } - | REP exprs_opt ')' elems END { if (nilp($2)) + | REP exprs_opt ')' elems END { if (nilp($4)) yyerr("empty rep clause"); $$ = list(rep_s, $4, nil, $2, nao); rl($$, num($1)); } | REP exprs_opt ')' elems until_last exprs_opt ')' elems END - { if (nilp($2)) + { if (nilp($4)) yyerr("empty rep clause"); if (nilp($8)) yyerr("empty until/last in rep"); |