From 3e09c38f75b087e583abb30762a9a251b8f424f9 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 29 Dec 2011 21:47:30 -0800 Subject: * parser.y (repeat_rep_helper): Bugfix. Circular lists were being created here when clauses of the same kind appear multiple times. The problem is that append2 no longer copies the second list, which the code was relying on it to do. --- ChangeLog | 7 +++++++ parser.y | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 96c516fc..99ae385e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-12-29 Kaz Kylheku + + * parser.y (repeat_rep_helper): Bugfix. Circular lists + were being created here when clauses of the same kind appear multiple + times. The problem is that append2 no longer copies the second list, + which the code was relying on it to do. + 2011-12-29 Kaz Kylheku * txr.1: Useless sentence under reduce-left and reduce-right removed. diff --git a/parser.y b/parser.y index 9703a078..ef7fefdf 100644 --- a/parser.y +++ b/parser.y @@ -793,7 +793,7 @@ static val repeat_rep_helper(val sym, val main, val parts) for (iter = parts; iter != nil; iter = cdr(iter)) { val part = car(iter); val sym = car(part); - val clauses = cdr(part); + val clauses = copy_list(cdr(part)); if (sym == single_s) single_parts = nappend2(single_parts, clauses); -- cgit v1.2.3