/[bison]/bison/data/lalr1.cc
ViewVC logotype

Diff of /bison/data/lalr1.cc

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

revision 1.29 by eggert, Tue Feb 25 07:57:09 2003 UTC revision 1.30 by akim, Sun Mar 2 13:39:44 2003 UTC
# Line 498  b4_syncline([@oline@], [@ofile@])[ Line 498  b4_syncline([@oline@], [@ofile@])[
498            message += name_[ilooka_];            message += name_[ilooka_];
499            {            {
500              int count = 0;              int count = 0;
501              for (int x = (n_ < 0 ? -n_ : 0); x < ntokens_ + nnts_; ++x)              /* Start YYX at -YYN if negative to avoid negative indexes in
502                   YYCHECK.  */
503                int xbegin = n_ < 0 ? -n_ : 0;
504                /* Stay within bounds of both yycheck and yytname.  */
505                int checklim = last_ - n_;
506                int xend = checklim < ntokens_ ? checklim : ntokens_;
507                for (int x = xbegin; x < xend; ++x)
508                if (check_[x + n_] == x && x != terror_)                if (check_[x + n_] == x && x != terror_)
509                  ++count;                  ++count;
510              if (count < 5)              if (count < 5)
511                {                {
512                  count = 0;                  count = 0;
513                  for (int x = (n_ < 0 ? -n_ : 0); x < ntokens_ + nnts_; ++x)                  for (int x = xbegin; x < xend; ++x)
514                    if (check_[x + n_] == x && x != terror_)                    if (check_[x + n_] == x && x != terror_)
515                      {                      {
516                        message += (!count++) ? ", expecting " : " or ";                        message += (!count++) ? ", expecting " : " or ";

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30

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