mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-19 09:13:04 +00:00
style changes.
* src/parse-gram.y (add_param): Scope changes.
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2009-09-09 Akim Demaille <demaille@gostai.com>
|
||||||
|
|
||||||
|
style changes.
|
||||||
|
* src/parse-gram.y (add_param): Scope changes.
|
||||||
|
|
||||||
2009-09-09 Akim Demaille <demaille@gostai.com>
|
2009-09-09 Akim Demaille <demaille@gostai.com>
|
||||||
|
|
||||||
%parse: support several arguments.
|
%parse: support several arguments.
|
||||||
|
|||||||
@@ -727,23 +727,25 @@ add_param (param_type type, char *decl, location loc)
|
|||||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
||||||
"_"
|
"_"
|
||||||
"0123456789";
|
"0123456789";
|
||||||
|
|
||||||
char const *name_start = NULL;
|
char const *name_start = NULL;
|
||||||
char *p;
|
{
|
||||||
|
char *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))
|
||||||
|
name_start = p;
|
||||||
|
|
||||||
/* Stop on last actual character. */
|
/* Strip the surrounding '{' and '}', and any blanks just inside
|
||||||
for (p = decl; p[1]; p++)
|
the braces. */
|
||||||
if ((p == decl
|
while (*--p == ' ' || *p == '\t')
|
||||||
|| ! memchr (alphanum, p[-1], sizeof alphanum))
|
continue;
|
||||||
&& memchr (alphanum, p[0], sizeof alphanum - 10))
|
p[1] = '\0';
|
||||||
name_start = p;
|
while (*++decl == ' ' || *decl == '\t')
|
||||||
|
continue;
|
||||||
/* Strip the surrounding '{' and '}', and any blanks just inside
|
}
|
||||||
the braces. */
|
|
||||||
while (*--p == ' ' || *p == '\t')
|
|
||||||
continue;
|
|
||||||
p[1] = '\0';
|
|
||||||
while (*++decl == ' ' || *decl == '\t')
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (! name_start)
|
if (! name_start)
|
||||||
complain_at (loc, _("missing identifier in parameter declaration"));
|
complain_at (loc, _("missing identifier in parameter declaration"));
|
||||||
|
|||||||
Reference in New Issue
Block a user