here is the context diff for the tw tail recursion stack overflow problem
the fix is in src/lib/libexpr
your line numbers will vary
thanks
--- .../exparse.y Thu Mar 3 01:30:02 2011
+++ exparse.y Wed Mar 16 10:27:41 2011
@@ -212,7 +212,16 @@
exfreenode(expr.program, $1);
$$ = $2;
}
- else $$ = exnewnode(expr.program, ';', 1, $2->type, $1,
$2);
+ else if ($1->op == ';')
+ {
+ $$ = $1;
+ $1->data.operand.last =
$1->data.operand.last->data.operand.right = exnewnode(expr.program, ';', 1,
$2->type, $2, NiL);
+ }
+ else
+ {
+ $$ = exnewnode(expr.program, ';', 1, $1->type,
$1, NiL);
+ $$->data.operand.last = $$->data.operand.right
= exnewnode(expr.program, ';', 1, $2->type, $2, NiL);
+ }
}
;
--- .../expr.h Wed Aug 18 23:21:21 2010
+++ expr.h Wed Mar 16 10:21:27 2011
@@ -142,6 +142,7 @@
{
Exnode_t* left; /* left operand */
Exnode_t* right; /* right operand */
+ Exnode_t* last; /* for cons */
} operand; /* operands */
struct
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users