removed. It is called _after_ we reduce a production, just before we
`shift` the nonterminal in.
-`pop` is only called if there are entries to remove, so `num` is never zero.
-
###### parser functions
static int pop(struct parser *p, int num,
bufsize = do_reduce(prod, body, config, buf);
- if (size)
- indents = pop(&p, size, &start_of_line,
- do_free);
- else {
- indents = 0;
- start_of_line = 0;
- }
+ indents = pop(&p, size, &start_of_line,
+ do_free);
res = memdup(buf, bufsize);
memset(buf, 0, bufsize);
if (!shift(&p, nextstate->reduce_sym,
tos->indents += indents;
}
free(tk);
- if (p.tos)
- pop(&p, p.tos, NULL, do_free);
+ pop(&p, p.tos, NULL, do_free);
free(p.asn_stack);
free(p.stack);
return ret;