]> git.saurik.com Git - bison.git/commitdiff
style changes.
authorAkim Demaille <demaille@gostai.com>
Wed, 9 Sep 2009 13:36:02 +0000 (15:36 +0200)
committerAkim Demaille <demaille@gostai.com>
Wed, 9 Sep 2009 14:26:18 +0000 (16:26 +0200)
* src/parse-gram.y (add_param): Scope changes.

ChangeLog
src/parse-gram.y

index d8a5d80e1166f0e3eeb2d2049410b299ebd4dc5c..8caca3e091ecf4c5663a2fd9929611714a5b6670 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
 
        %parse: support several arguments.
index 453c35f84a944f2fe09e9dd3340ea07c60925e71..3e208d1bec98887572a2dc714b8f4478ee7cb4a7 100644 (file)
@@ -727,23 +727,25 @@ add_param (param_type type, char *decl, location loc)
     "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
     "_"
     "0123456789";
+
   char const *name_start = NULL;
-  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;
-
-  /* Strip the surrounding '{' and '}', and any blanks just inside
-     the braces.  */
-  while (*--p == ' ' || *p == '\t')
-    continue;
-  p[1] = '\0';
-  while (*++decl == ' ' || *decl == '\t')
-    continue;
+  {
+    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;
+
+    /* 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)
     complain_at (loc, _("missing identifier in parameter declaration"));