pike.git / lib / modules / Parser.pmod / LR.pmod / module.pmod

version» Context lines:

pike.git/lib/modules/Parser.pmod/LR.pmod/module.pmod:737:    } else {    used_by[symbol] = (< r >);    }    }    }       if (!(r->num_nonnullables)) {    /* 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));    nullable[symbol] = 1;    if (used_by[symbol]) {    foreach (indices(used_by[symbol]), Rule r2) {    if (!(--r2->num_nonnullables)) {    new_nullables->push(r2->nonterminal);    }    }
pike.git/lib/modules/Parser.pmod/LR.pmod/module.pmod:868:       protected ADT.Stack item_stack;       protected void traverse_items(Item i,    function(int:void) conflict_func)    {    int depth;       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) {    traverse_items(i2, conflict_func);    }    if (i->counter > i2->counter) {    i->counter = i2->counter;    }       i->direct_lookahead |= i2->direct_lookahead;
pike.git/lib/modules/Parser.pmod/LR.pmod/module.pmod:1677:    "Shifting \"%s\", value \"%O\"", input, value);    value_stack->push(value);    state_stack->push(state);    state = [object(Kernel)]a;    } else {    /* ERROR */    if (input = "") {    /* 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();    continue;    } else {    report(ERROR, "parse", "Empty stack at EOF!");    return 0;    }    } else {    report(ERROR, "parse", "Bad state at EOF");