Oops --- hadn't updated the nts array for the new child order.

This commit is contained in:
David Given 2016-10-04 21:32:28 +02:00
parent e13ff5be31
commit 8d4186130d

View file

@ -779,9 +779,12 @@ static char* computents(Tree t, char* bp)
if (t) if (t)
{ {
Nonterm p = t->op; Nonterm p = t->op;
if (p->kind == NONTERM) if (!t->left && !t->right)
{ {
sprintf(bp, "%s_%s_NT, ", prefix, p->name); if (p->kind == NONTERM)
sprintf(bp, "%s_%s_NT, ", prefix, p->name);
else
sprintf(bp, "0, ");
bp += strlen(bp); bp += strlen(bp);
} }
else else