mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
* src/parse-gram.y (add_param): Fix the truncation of trailing
spaces.
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2004-10-06 Akim Demaille <akim@epita.fr>
|
||||
|
||||
* src/parse-gram.y (add_param): Fix the truncation of trailing
|
||||
spaces.
|
||||
|
||||
2004-10-05 Akim Demaille <akim@epita.fr>
|
||||
|
||||
In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
|
||||
|
||||
@@ -2024,17 +2024,18 @@ add_param (char const *type, char *decl, location loc)
|
||||
char const *name_start = NULL;
|
||||
char *p;
|
||||
|
||||
for (p = decl; *p; p++)
|
||||
for (p = decl; p[1]; p++)
|
||||
if ((p == decl
|
||||
|| ! memchr (alphanum, p[-1], sizeof alphanum))
|
||||
&& memchr (alphanum, p[0], sizeof alphanum - 10))
|
||||
name_start = p;
|
||||
|
||||
fprintf (stderr, "DECLI: {%s}(%c)\n", decl, *p);
|
||||
/* Strip the surrounding '{' and '}', and any blanks just inside
|
||||
the braces. */
|
||||
while (*--p == ' ' || *p == '\t')
|
||||
continue;
|
||||
*p = '\0';
|
||||
p[1] = '\0';
|
||||
fprintf (stderr, "DECLO: {%s}\n", decl);
|
||||
while (*++decl == ' ' || *decl == '\t')
|
||||
continue;
|
||||
|
||||
|
||||
@@ -480,7 +480,8 @@ add_param (char const *type, char *decl, location loc)
|
||||
char const *name_start = NULL;
|
||||
char *p;
|
||||
|
||||
for (p = decl; *p; p++)
|
||||
/* Stop on last actual character. */
|
||||
for (p = decl; p[1]; p++)
|
||||
if ((p == decl
|
||||
|| ! memchr (alphanum, p[-1], sizeof alphanum))
|
||||
&& memchr (alphanum, p[0], sizeof alphanum - 10))
|
||||
@@ -490,7 +491,7 @@ add_param (char const *type, char *decl, location loc)
|
||||
the braces. */
|
||||
while (*--p == ' ' || *p == '\t')
|
||||
continue;
|
||||
*p = '\0';
|
||||
p[1] = '\0';
|
||||
while (*++decl == ' ' || *decl == '\t')
|
||||
continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user