Commit 70206d3d879f21c5f17aea19e12f4b344bfa9ab2

  • avatar
  • Antti-Juhani Kaijanaho <antti-juhani @kaij…aho.fi> (Committer)
  • Fri Nov 16 19:05:11 EET 2012
  • avatar
  • Antti-Juhani Kaijanaho <antti-juhani @kaij…aho.fi> (Author)
  • Fri Nov 16 19:05:11 EET 2012
Bugfixes.

Signed-off-by: Antti-Juhani Kaijanaho <antti-juhani@kaijanaho.fi>
hm.y
(11 / 4)
  
301301 fputc('\n', stdout);
302302 struct term *te = $1;
303303 while (term_reduce_step(te)) {
304 fputs(" --> ", stderr);
304 fputs(" --> ", stdout);
305305 print_term($1, stdout);
306306 fputc('\n', stdout);
307307 }
10021002 make_te_var(z,
10031003 term_start(t),
10041004 term_end(t)));
1005 return make_te_abs(z,
1005 return make_te_abs(dup_str(z),
10061006 subst(b_, x, u),
10071007 term_start(t), term_end(t));
10081008 } else {
10181018 make_te_var(z,
10191019 term_start(t),
10201020 term_end(t)));
1021 return make_te_let(z,
1021 return make_te_let(dup_str(z),
10221022 subst(te_let_def(t), x, u),
10231023 subst(b_, x, u),
10241024 term_start(t), term_end(t));
10361036 make_te_var(z,
10371037 term_start(t),
10381038 term_end(t)));
1039 return make_te_mu(z,
1039 return make_te_mu(dup_str(z),
10401040 subst(b_, x, u),
10411041 term_start(t), term_end(t));
10421042 } else {
15621562 /* passthrough */
15631563 default:
15641564 *ee = *ment;
1565 }
1566 switch (ee->kind) {
1567 case TE_VAR: case TE_MU: case TE_ABS: case TE_LET:
1568 ee->u.var = dup_str(ee->u.var);
1569 break;
1570 default:
1571 break;
15651572 }
15661573}
15671574