Branch: Tag:

2018-03-12

2018-03-12 16:52:54 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Parser.LR: Don't use deprecated symbols in ADT.Stack.

Fixes several warnings.

744:    /* This rule was nullable */    new_nullables->push(r->nonterminal);    -  while (new_nullables->ptr) { +  while (sizeof(new_nullables)) {    symbol = [int]new_nullables->pop();    report(NOTICE, "add_rule", "Nulling symbol %s",    symbol_to_string(symbol));
875:       item_stack->push(i);    -  i->counter = depth = item_stack->ptr; +  i->counter = depth = sizeof(item_stack);       foreach (indices(i->relation), Item i2) {    if (!i2->counter) {
1684:    /* At end of file */    lr_error |= ERROR_EOF;    -  if (value_stack->ptr != 1) { -  if (value_stack->ptr) { +  if (sizeof(value_stack) != 1) { +  if (sizeof(value_stack)) {    report(ERROR, "parse", "Bad state at EOF -- Throwing \"%O\"",    value_stack->pop());    state = [object(Kernel)]state_stack->pop();