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

Diff of /bison/src/symtab.c

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

revision 1.44 by akim, Tue Jul 9 15:54:39 2002 UTC revision 1.45 by akim, Tue Jul 16 14:04:06 2002 UTC
# Line 55  symbol_new (const char *tag, location_t Line 55  symbol_new (const char *tag, location_t
55    
56    res->number = NUMBER_UNDEFINED;    res->number = NUMBER_UNDEFINED;
57    res->prec = 0;    res->prec = 0;
58    res->assoc = right_assoc;    res->assoc = undef_assoc;
59    res->user_token_number = USER_NUMBER_UNDEFINED;    res->user_token_number = USER_NUMBER_UNDEFINED;
60    
61    res->alias = NULL;    res->alias = NULL;
# Line 129  symbol_printer_set (symbol_t *symbol, ch Line 129  symbol_printer_set (symbol_t *symbol, ch
129    
130  void  void
131  symbol_precedence_set (symbol_t *symbol,  symbol_precedence_set (symbol_t *symbol,
132                         int prec, associativity assoc, location_t location)                         int prec, assoc_t assoc, location_t location)
133  {  {
134    if (assoc != undef_assoc)    if (assoc != undef_assoc)
135      {      {
# Line 288  symbol_check_alias_consistence (symbol_t Line 288  symbol_check_alias_consistence (symbol_t
288    
289        if (this->assoc != this->alias->assoc)        if (this->assoc != this->alias->assoc)
290          {          {
291            /* FIXME: For some reason (probably the S/R => keep the S),            if (this->assoc != undef_assoc && this->alias->assoc != undef_assoc)
              the right assoc is chosen has the ``not set''.  This is  
              not nice, fix this!  */  
           if (this->assoc != right_assoc  
               && this->alias->assoc != right_assoc)  
292              complain_at (this->alias->location,              complain_at (this->alias->location,
293                           _("conflicting associativities for %s and %s"),                           _("conflicting associativities for %s (%s) and %s (%s)"),
294                           this->tag, this->alias->tag);                           this->tag, assoc_to_string (this->assoc),
295            if (this->assoc != 0)                           this->alias->tag, assoc_to_string (this->alias->assoc));
296              if (this->assoc != undef_assoc)
297              this->alias->assoc = this->assoc;              this->alias->assoc = this->assoc;
298            else            else
299              this->assoc = this->alias->assoc;              this->assoc = this->alias->assoc;

Legend:
Removed from v.1.44  
changed lines
  Added in v.1.45

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