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

Diff of /bison/src/reader.c

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

revision 1.165 by akim, Mon Apr 8 11:46:00 2002 UTC revision 1.166 by akim, Tue Apr 9 19:19:59 2002 UTC
# Line 237  symbol_translation (symbol_t *this) Line 237  symbol_translation (symbol_t *this)
237        && this->user_token_number != SALIAS)        && this->user_token_number != SALIAS)
238      {      {
239        /* A token which translation has already been set? */        /* A token which translation has already been set? */
240        if (token_translations[this->user_token_number] != 2)        if (token_translations[this->user_token_number] != undeftoken->number)
241          complain (_("tokens %s and %s both assigned number %d"),          complain (_("tokens %s and %s both assigned number %d"),
242                    symbols[token_translations[this->user_token_number]]->tag,                    symbols[token_translations[this->user_token_number]]->tag,
243                    this->tag, this->user_token_number);                    this->tag, this->user_token_number);
# Line 1697  token_translations_init (void) Line 1697  token_translations_init (void)
1697       token number for $undefined., which represents all invalid       token number for $undefined., which represents all invalid
1698       inputs.  */       inputs.  */
1699    for (i = 0; i < max_user_token_number + 1; i++)    for (i = 0; i < max_user_token_number + 1; i++)
1700      token_translations[i] = 2;      token_translations[i] = undeftoken->number;
1701    
1702    symbols_do (symbol_translation, NULL);    symbols_do (symbol_translation, NULL);
1703  }  }
# Line 1718  packsymbols (void) Line 1718  packsymbols (void)
1718    
1719    token_translations_init ();    token_translations_init ();
1720    
   error_token_number = errtoken->number;  
   
1721    if (startval->class == unknown_sym)    if (startval->class == unknown_sym)
1722      fatal (_("the start symbol %s is undefined"), startval->tag);      fatal (_("the start symbol %s is undefined"), startval->tag);
1723    else if (startval->class == token_sym)    else if (startval->class == token_sym)
# Line 1831  reader (void) Line 1829  reader (void)
1829    undeftoken = getsym ("$undefined.");    undeftoken = getsym ("$undefined.");
1830    undeftoken->class = token_sym;    undeftoken->class = token_sym;
1831    undeftoken->number = ntokens++;    undeftoken->number = ntokens++;
   undeftoken->user_token_number = 2;  
1832    
1833    /* Initialize the obstacks. */    /* Initialize the obstacks. */
1834    obstack_init (&action_obstack);    obstack_init (&action_obstack);

Legend:
Removed from v.1.165  
changed lines
  Added in v.1.166

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