/* Generate the nondeterministic finite state machine for bison,
- Copyright 1984, 1986, 1989, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+ Copyright (C) 1984, 1986, 1989, 2000, 2001, 2002 Free Software
+ Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
state_list_t *node = XMALLOC (state_list_t, 1);
state_t *state = state_new (symbol, core_size, core);
- if (trace_flag)
- 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"),
nstates, symbol, symbols[symbol]->tag);
/* If this is the endtoken, and this is not the initial state, then
{
int i;
- if (trace_flag)
- fprintf (stderr, "Entering new_itemsets, state = %d\n",
+ if (trace_flag & trace_automaton)
+ fprintf (stderr, _("Entering new_itemsets, state = %d\n"),
state->number);
for (i = 0; i < nsyms; i++)
{
state_t *sp;
- if (trace_flag)
- fprintf (stderr, "Entering get_state, symbol = %d (%s)\n",
+ if (trace_flag & trace_automaton)
+ fprintf (stderr, _("Entering get_state, symbol = %d (%s)\n"),
symbol, symbols[symbol]->tag);
sp = state_hash_lookup (core_size, core);
if (!sp)
sp = state_list_append (symbol, core_size, core);
- if (trace_flag)
- fprintf (stderr, "Exiting get_state => %d\n", sp->number);
+ if (trace_flag & trace_automaton)
+ fprintf (stderr, _("Exiting get_state => %d\n"), sp->number);
return sp;
}
int j;
symbol_number_t symbol;
- if (trace_flag)
- fprintf (stderr, "Entering append_states, state = %d\n",
+ if (trace_flag & trace_automaton)
+ fprintf (stderr, _("Entering append_states, state = %d\n"),
state->number);
/* first sort shift_symbol into increasing order */
int count = 0;
int i;
- /* If this is the final state, we want it to have no reductions at
- all, although it has one for `START_SYMBOL $end .'. */
- if (final_state && state->number == final_state->number)
- return;
-
/* Find and count the active items that represent ends of rules. */
for (i = 0; i < nritemset; ++i)
{
while (list)
{
state_t *state = list->state;
- if (trace_flag)
- fprintf (stderr, "Processing state %d (reached by %s)\n",
+ if (trace_flag & trace_automaton)
+ fprintf (stderr, _("Processing state %d (reached by %s)\n"),
state->number,
symbols[state->accessing_symbol]->tag);
/* Set up ruleset and itemset for the transitions out of this