1038 |
{ |
{ |
1039 |
YYSIZE_T yysize = 0; |
YYSIZE_T yysize = 0; |
1040 |
int yytype = YYTRANSLATE (yychar); |
int yytype = YYTRANSLATE (yychar); |
1041 |
|
const char* yyprefix; |
1042 |
char *yymsg; |
char *yymsg; |
1043 |
int yyx; |
int yyx; |
1044 |
|
|
1045 |
/* Start YYX at -YYN if negative to avoid negative indexes in |
/* Start YYX at -YYN if negative to avoid negative indexes in |
1046 |
YYCHECK. */ |
YYCHECK. */ |
1047 |
int yyxbase = yyn < 0 ? -yyn : 0; |
int yyxbegin = yyn < 0 ? -yyn : 0; |
1048 |
|
|
1049 |
/* Stay within bounds of both yycheck and yytname. */ |
/* Stay within bounds of both yycheck and yytname. */ |
1050 |
int yychecklim = YYLAST - yyn; |
int yychecklim = YYLAST - yyn; |
1051 |
int yynsyms = sizeof (yytname) / sizeof (yytname[0]); |
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; |
|
int yyxlim = yychecklim < yynsyms ? yychecklim : yynsyms; |
|
1052 |
int yycount = 0; |
int yycount = 0; |
1053 |
|
|
1054 |
for (yyx = yyxbase; yyx < yyxlim; yyx++) |
yyprefix = ", expecting "; |
1055 |
|
for (yyx = yyxbegin; yyx < yyxend; ++yyx) |
1056 |
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) |
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) |
1057 |
{ |
{ |
1058 |
yysize += (! yycount |
yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]); |
1059 |
? sizeof (", expecting ") - 1 |
yycount += 1; |
|
: sizeof (" or ") - 1); |
|
|
yysize += yystrlen (yytname[yyx]); |
|
|
yycount++; |
|
1060 |
if (yycount == 5) |
if (yycount == 5) |
1061 |
{ |
{ |
1062 |
yysize = 0; |
yysize = 0; |
1063 |
break; |
break; |
1064 |
} |
} |
1065 |
} |
} |
1066 |
yysize += (sizeof ("syntax error, unexpected ") |
yysize += (sizeof ("syntax error, unexpected ") |
1067 |
+ yystrlen (yytname[yytype])); |
+ yystrlen (yytname[yytype])); |
1073 |
|
|
1074 |
if (yycount < 5) |
if (yycount < 5) |
1075 |
{ |
{ |
1076 |
yycount = 0; |
yyprefix = ", expecting "; |
1077 |
for (yyx = yyxbase; yyx < yyxlim; yyx++) |
for (yyx = yyxbegin; yyx < yyxend; ++yyx) |
1078 |
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) |
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) |
1079 |
{ |
{ |
1080 |
const char *yyq = ! yycount ? ", expecting " : " or "; |
yyp = yystpcpy (yyp, yyprefix); |
|
yyp = yystpcpy (yyp, yyq); |
|
1081 |
yyp = yystpcpy (yyp, yytname[yyx]); |
yyp = yystpcpy (yyp, yytname[yyx]); |
1082 |
yycount++; |
yyprefix = " or "; |
1083 |
} |
} |
1084 |
} |
} |
1085 |
yyerror (]b4_yyerror_args[yymsg); |
yyerror (]b4_yyerror_args[yymsg); |