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 | 5db7ffe4319853562706a84f068c223815da5ee8 (patch) | |
tree | ea37b9f1512f580158c4a7a2def21b129855136e | |
parent | 9d7a9f04240877f12e573be6f579058f31647a8a (diff) | |
download | txr-5db7ffe4319853562706a84f068c223815da5ee8.tar.gz txr-5db7ffe4319853562706a84f068c223815da5ee8.tar.bz2 txr-5db7ffe4319853562706a84f068c223815da5ee8.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"); |