-
Notifications
You must be signed in to change notification settings - Fork 0
/
yysphinxql.patch
40 lines (37 loc) · 1.07 KB
/
yysphinxql.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
--- yysphinxql.c.orig Mon Jun 14 05:20:39 2010
+++ yysphinxql.c Mon Jun 14 05:13:37 2010
@@ -1953,7 +1953,7 @@
char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
yyp = yystpcpy (yyp, yytname[yytype]);
- if (yycount < 5)
+ if (yycount < 4)
{
yycount = 0;
for (yyx = yyn < 0 ? -yyn : 0;
@@ -1967,6 +1967,19 @@
yycount++;
}
}
+ else
+ {
+ for (yyx = yyn < 0 ? -yyn : 0;
+ yyx < (int) (sizeof (yytname) / sizeof (char *));
+ yyx++)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+ {
+ snprintf (yyp, (int)(yysize - (yyp - yymsg)), ", expecting %s (or %d other tokens)", yytname[yyx], yycount - 1);
+ while (*yyp++);
+ break;
+ }
+ }
+
yyerror (pParser, yymsg);
YYSTACK_FREE (yymsg);
}
@@ -2019,7 +2032,7 @@
/* Suppress GCC warning that yyerrlab1 is unused when no action
invokes YYERROR. */
#if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__)
- __attribute__ ((__unused__))
+// __attribute__ ((__unused__))
#endif