/[bison]/bison/data/glr.c
ViewVC logotype

Diff of /bison/data/glr.c

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

revision 1.16 by akim, Mon Oct 14 13:00:48 2002 UTC revision 1.17 by eggert, Sat Oct 19 01:33:20 2002 UTC
# Line 1552  yyreportParseError (yyGLRStack* yystack, Line 1552  yyreportParseError (yyGLRStack* yystack,
1552                yysize += strlen (yytokenName (yyx)) + strlen (yyprefix),                yysize += strlen (yytokenName (yyx)) + strlen (yyprefix),
1553                  yycount += 1, yyprefix = " or ";                  yycount += 1, yyprefix = " or ";
1554            yymsg = yyp = (char*) malloc (yysize);            yymsg = yyp = (char*) malloc (yysize);
1555            yyp += sprintf (yyp, "parse error, unexpected %s",            sprintf (yyp, "parse error, unexpected %s",
1556                            yytokenName (*yytokenp));                     yytokenName (*yytokenp));
1557              yyp += strlen (yyp);
1558            if (yycount < 5)            if (yycount < 5)
1559              {              {
1560                yyprefix = ", expecting ";                yyprefix = ", expecting ";
1561                for (yyx = yyn < 0 ? -yyn : 0; yyx < yytname_size; yyx += 1)                for (yyx = yyn < 0 ? -yyn : 0; yyx < yytname_size; yyx += 1)
1562                  if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)                  if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1563                    {                    {
1564                      yyp += sprintf (yyp, "%s%s", yyprefix, yytokenName (yyx));                      sprintf (yyp, "%s%s", yyprefix, yytokenName (yyx));
1565                        yyp += strlen (yyp);
1566                      yyprefix = " or ";                      yyprefix = " or ";
1567                    }                    }
1568              }              }

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

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