- Copyright (C) 1984, 1986, 1989, 2000-2002, 2004-2011 Free Software
+ Copyright (C) 1984, 1986, 1989, 2000-2002, 2004-2012 Free Software
if (trace_flag & trace_automaton)
fprintf (stderr, "state_list_append (state = %d, symbol = %d (%s))\n",
if (trace_flag & trace_automaton)
fprintf (stderr, "state_list_append (state = %d, symbol = %d (%s))\n",
- symbol_number sym = item_number_as_symbol_number (ritem[itemset[i]]);
- if (!kernel_size[sym])
- {
- shift_symbol[nshifts] = sym;
- nshifts++;
- }
-
- kernel_base[sym][kernel_size[sym]] = itemset[i] + 1;
- kernel_size[sym]++;
+ symbol_number sym = item_number_as_symbol_number (ritem[itemset[i]]);
+ if (!kernel_size[sym])
+ {
+ shift_symbol[nshifts] = sym;
+ nshifts++;
+ }
+
+ kernel_base[sym][kernel_size[sym]] = itemset[i] + 1;
+ kernel_size[sym]++;
if (trace_flag & trace_automaton)
fprintf (stderr, "Entering get_state, symbol = %d (%s)\n",
if (trace_flag & trace_automaton)
fprintf (stderr, "Entering get_state, symbol = %d (%s)\n",
/*---------------------------------------------------------------.
| Use the information computed by new_itemsets to find the state |
/*---------------------------------------------------------------.
| Use the information computed by new_itemsets to find the state |
| |
| SHIFTSET is set up as a vector of those states. |
`---------------------------------------------------------------*/
| |
| SHIFTSET is set up as a vector of those states. |
`---------------------------------------------------------------*/
- {
- rule_number r = item_number_as_rule_number (item);
- redset[count++] = &rules[r];
- if (r == 0)
- {
- /* This is "reduce 0", i.e., accept. */
- aver (!final_state);
- final_state = s;
- }
- }
+ {
+ rule_number r = item_number_as_rule_number (item);
+ redset[count++] = &rules[r];
+ if (r == 0)
+ {
+ /* This is "reduce 0", i.e., accept. */
+ aver (!final_state);
+ final_state = s;
+ }
+ }
state_list *this = first_state;
/* Pessimization, but simplification of the code: make sure all
state_list *this = first_state;
/* Pessimization, but simplification of the code: make sure all
- the states have valid transitions and reductions members,
- even if reduced to 0. It is too soon for errs, which are
- computed later, but set_conflicts. */
+ the states have valid transitions and reductions members,
+ even if reduced to 0. It is too soon for errs, which are
+ computed later, but set_conflicts. */
- fprintf (stderr, "Processing state %d (reached by %s)\n",
- s->number,
- symbols[s->accessing_symbol]->tag);
+ fprintf (stderr, "Processing state %d (reached by %s)\n",
+ s->number,
+ symbols[s->accessing_symbol]->tag);
/* Set up itemset for the transitions out of this state. itemset gets a
vector of all the items that could be accepted next. */
closure (s->items, s->nitems);
/* Set up itemset for the transitions out of this state. itemset gets a
vector of all the items that could be accepted next. */
closure (s->items, s->nitems);