/[bison]/bison/src/LR0.c
ViewVC logotype

Diff of /bison/src/LR0.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.15.2.7 by akim, Mon Nov 19 09:17:53 2001 UTC revision 1.15.2.8 by akim, Mon Nov 19 09:21:26 2001 UTC
# Line 23  Line 23 
23     The entry point is generate_states.  */     The entry point is generate_states.  */
24    
25  #include "system.h"  #include "system.h"
26    #include "getargs.h"
27  #include "gram.h"  #include "gram.h"
28  #include "state.h"  #include "state.h"
29  #include "complain.h"  #include "complain.h"
# Line 147  new_itemsets (void) Line 148  new_itemsets (void)
148    int i;    int i;
149    int shiftcount;    int shiftcount;
150    
151  #if TRACE    if (trace_flag)
152    fprintf (stderr, "Entering new_itemsets, state = %d\n",      fprintf (stderr, "Entering new_itemsets, state = %d\n", nstates);
            this_state->number);  
 #endif  
153    
154    for (i = 0; i < nsyms; i++)    for (i = 0; i < nsyms; i++)
155      kernel_end[i] = NULL;      kernel_end[i] = NULL;
# Line 192  new_state (int symbol) Line 191  new_state (int symbol)
191    int n;    int n;
192    core *p;    core *p;
193    
194  #if TRACE    if (trace_flag)
195    fprintf (stderr, "Entering new_state, symbol = %d, state = %d\n",      fprintf (stderr, "Entering new_state, state = %d, symbol = %d\n",
196             symbol, nstates);               nstates, symbol);
 #endif  
197    
198    if (nstates >= MAXSHORT)    if (nstates >= MAXSHORT)
199      fatal (_("too many states (max %d)"), MAXSHORT);      fatal (_("too many states (max %d)"), MAXSHORT);
# Line 233  get_state (int symbol) Line 231  get_state (int symbol)
231    
232    int n = kernel_end[symbol] - kernel_base[symbol];    int n = kernel_end[symbol] - kernel_base[symbol];
233    
234  #if TRACE    if (trace_flag)
235    fprintf (stderr, "Entering get_state, state = %d, symbol = %d\n",      fprintf (stderr, "Entering get_state, state = %d, symbol = %d\n",
236             nstates, symbol);               nstates, symbol);
 #endif  
237    
238    /* Add up the target state's active item numbers to get a hash key.    /* Add up the target state's active item numbers to get a hash key.
239       */       */
# Line 296  append_states (void) Line 293  append_states (void)
293    int j;    int j;
294    int symbol;    int symbol;
295    
296  #if TRACE    if (trace_flag)
297    fprintf (stderr, "Entering append_states\n");      fprintf (stderr, "Entering append_states\n");
298  #endif  
299    
300    /* first sort shift_symbol into increasing order */    /* first sort shift_symbol into increasing order */
301    

Legend:
Removed from v.1.15.2.7  
changed lines
  Added in v.1.15.2.8

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26