]> git.saurik.com Git - bison.git/blobdiff - src/parse-gram.y
* src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
[bison.git] / src / parse-gram.y
index c346b88b071f48d2a54c1cf4b7f141e450e4d0ea..bc012637d70367d3f260031ce1ac52f9cd2ec3d9 100644 (file)
@@ -304,14 +304,20 @@ grammar_declaration:
     {
       char const *body = $3;
 
-      if (union_seen)
+      /* Concatenate the %union bodies.  If this is the first %union, make sure
+        the synchronization line appears after the opening '{' so as not to
+        confuse Doxygen.  Otherwise, turn the previous %union's trailing '}'
+        into '\n', and omit the new %union's leading '{'.  */
+      if (!union_seen)
+       {
+         muscle_grow ("stype", "{", "");
+       }
+      else
        {
-         /* Concatenate the union bodies, turning the first one's
-            trailing '}' into '\n', and omitting the second one's '{'.  */
          char *code = muscle_find ("stype");
          code[strlen (code) - 1] = '\n';
-         body++;
        }
+      body++;
 
       union_seen = true;
       muscle_code_grow ("stype", body, @3);