mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-12 22:03:02 +00:00
c++: trailing end-of-lines in %parse-param
* src/parse-gram.y (add_param): No only skip ' ' and '\t', skip all leading and trailing spaces. * tests/regression.at (Lex and parse params): Check it. * NEWS: Document it.
This commit is contained in:
@@ -734,11 +734,13 @@ add_param (char const *type, char *decl, location loc)
|
||||
|
||||
/* Strip the surrounding '{' and '}', and any blanks just inside
|
||||
the braces. */
|
||||
while (*--p == ' ' || *p == '\t')
|
||||
continue;
|
||||
--p;
|
||||
while (isspace ((unsigned char) *p))
|
||||
--p;
|
||||
p[1] = '\0';
|
||||
while (*++decl == ' ' || *decl == '\t')
|
||||
continue;
|
||||
++decl;
|
||||
while (isspace ((unsigned char) *decl))
|
||||
++decl;
|
||||
|
||||
if (! name_start)
|
||||
complain_at (loc, _("missing identifier in parameter declaration"));
|
||||
|
||||
Reference in New Issue
Block a user