From 947b2961479959c79beb8e61a04a6804959dc353 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 2 Apr 2017 22:25:54 -0700 Subject: parser: fix a...b syntax error. This issue has implications mainly for read/print consistency. The (rcons a .b) expression prints a...b, but that doesn't read back. The reason is that the . on .b isn't preceded by whitespace, and so isn't the UREFDOT token recognized in a n_expr. It's just the '.' token which is a syntax error in that situation. * parser.y (n_expr): New special case rule to handle the phrase pattern n_expr DOTDOT '.' n_expr which is now a syntax error. --- parser.y | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/parser.y b/parser.y index 427a3fc1..a4a98300 100644 --- a/parser.y +++ b/parser.y @@ -986,6 +986,12 @@ n_expr : SYMTOK { $$ = symhlpr($1, t); } | n_expr DOTDOT n_expr { uses_or2; $$ = rlcp(list(rcons_s, $1, $3, nao), or2($1, $3)); } + | n_expr DOTDOT '.' n_expr + { uses_or2; + $$ = rlcp(list(rcons_s, $1, + uref_helper(parser, $4), + nao), + or2($1, $4)); } | n_expr '.' n_expr { uses_or2; if (consp($3) && car($3) == qref_s) { rplacd($3, rlcp(cons($1, cdr($3)), $1)); -- cgit v1.2.3