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 |
} |
} |