summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--parser.y2
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 96c516fc..99ae385e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2011-12-29 Kaz Kylheku <kaz@kylheku.com>
+ * 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 <kaz@kylheku.com>
+
* txr.1: Useless sentence under reduce-left and reduce-right removed.
Missing Description headings added.
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);