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

Diff of /bison/src/output.c

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

revision 1.154 by akim, Tue May 7 08:07:32 2002 UTC revision 1.155 by akim, Sun May 26 18:39:04 2002 UTC
# Line 215  Name (const char *name,                                                        \ Line 215  Name (const char *name,                                                        \
215    
216  GENERATE_MUSCLE_INSERT_TABLE(muscle_insert_unsigned_int_table, unsigned int)  GENERATE_MUSCLE_INSERT_TABLE(muscle_insert_unsigned_int_table, unsigned int)
217  GENERATE_MUSCLE_INSERT_TABLE(muscle_insert_short_table, short)  GENERATE_MUSCLE_INSERT_TABLE(muscle_insert_short_table, short)
218  GENERATE_MUSCLE_INSERT_TABLE(muscle_insert_token_number_table, token_number_t)  GENERATE_MUSCLE_INSERT_TABLE(muscle_insert_symbol_number_table, symbol_number_t)
219  GENERATE_MUSCLE_INSERT_TABLE(muscle_insert_item_number_table, item_number_t)  GENERATE_MUSCLE_INSERT_TABLE(muscle_insert_item_number_table, item_number_t)
220    
221    
# Line 227  GENERATE_MUSCLE_INSERT_TABLE(muscle_inse Line 227  GENERATE_MUSCLE_INSERT_TABLE(muscle_inse
227  static void  static void
228  prepare_tokens (void)  prepare_tokens (void)
229  {  {
230    muscle_insert_token_number_table ("translate",    muscle_insert_symbol_number_table ("translate",
231                                      token_translations,                                      token_translations,
232                                      0, 1, max_user_token_number + 1);                                      0, 1, max_user_token_number + 1);
233    
# Line 290  prepare_rules (void) Line 290  prepare_rules (void)
290    item_number_t *rhs = XMALLOC (item_number_t, nritems);    item_number_t *rhs = XMALLOC (item_number_t, nritems);
291    unsigned int *prhs = XMALLOC (unsigned int, nrules + 1);    unsigned int *prhs = XMALLOC (unsigned int, nrules + 1);
292    unsigned int *rline = XMALLOC (unsigned int, nrules + 1);    unsigned int *rline = XMALLOC (unsigned int, nrules + 1);
293    token_number_t *r1 = XMALLOC (token_number_t, nrules + 1);    symbol_number_t *r1 = XMALLOC (symbol_number_t, nrules + 1);
294    unsigned int *r2 = XMALLOC (unsigned int, nrules + 1);    unsigned int *r2 = XMALLOC (unsigned int, nrules + 1);
295    
296    for (r = 1; r < nrules + 1; ++r)    for (r = 1; r < nrules + 1; ++r)
# Line 315  prepare_rules (void) Line 315  prepare_rules (void)
315    muscle_insert_item_number_table ("rhs", rhs, ritem[0], 1, nritems);    muscle_insert_item_number_table ("rhs", rhs, ritem[0], 1, nritems);
316    muscle_insert_unsigned_int_table ("prhs", prhs, 0, 1, nrules + 1);    muscle_insert_unsigned_int_table ("prhs", prhs, 0, 1, nrules + 1);
317    muscle_insert_unsigned_int_table ("rline", rline, 0, 1, nrules + 1);    muscle_insert_unsigned_int_table ("rline", rline, 0, 1, nrules + 1);
318    muscle_insert_token_number_table ("r1", r1, 0, 1, nrules + 1);    muscle_insert_symbol_number_table ("r1", r1, 0, 1, nrules + 1);
319    muscle_insert_unsigned_int_table ("r2", r2, 0, 1, nrules + 1);    muscle_insert_unsigned_int_table ("r2", r2, 0, 1, nrules + 1);
320    
321    free (rhs);    free (rhs);
# Line 333  static void Line 333  static void
333  prepare_states (void)  prepare_states (void)
334  {  {
335    size_t i;    size_t i;
336    token_number_t *values =    symbol_number_t *values =
337      (token_number_t *) alloca (sizeof (token_number_t) * nstates);      (symbol_number_t *) alloca (sizeof (symbol_number_t) * nstates);
338    for (i = 0; i < nstates; ++i)    for (i = 0; i < nstates; ++i)
339      values[i] = states[i]->accessing_symbol;      values[i] = states[i]->accessing_symbol;
340    muscle_insert_token_number_table ("stos", values,    muscle_insert_symbol_number_table ("stos", values,
341                                      0, 1, nstates);                                      0, 1, nstates);
342  }  }
343    
# Line 390  action_row (state_t *state) Line 390  action_row (state_t *state)
390       to reduce.  */       to reduce.  */
391    for (i = 0; i < shiftp->nshifts; i++)    for (i = 0; i < shiftp->nshifts; i++)
392      {      {
393        token_number_t symbol;        symbol_number_t symbol;
394        int shift_state = shiftp->shifts[i];        int shift_state = shiftp->shifts[i];
395        if (!shift_state)        if (!shift_state)
396          continue;          continue;

Legend:
Removed from v.1.154  
changed lines
  Added in v.1.155

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