[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fixed: #line in YYSTYPE confuses Doxygen
From: |
Joel E. Denny |
Subject: |
Fixed: #line in YYSTYPE confuses Doxygen |
Date: |
Thu, 13 Jul 2006 16:05:41 -0400 (EDT) |
The right approach is probably to fix Doxygen, but the following committed
patch is faster and seems clean to me.
Joel
Index: ChangeLog
===================================================================
RCS file: /sources/bison/bison/ChangeLog,v
retrieving revision 1.1535
diff -p -u -r1.1535 ChangeLog
--- ChangeLog 13 Jul 2006 08:12:00 -0000 1.1535
+++ ChangeLog 13 Jul 2006 19:58:49 -0000
@@ -1,3 +1,11 @@
+2006-07-13 Joel E. Denny <address@hidden>
+
+ * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
+ least 1.4.7 and 1.4.4) by putting a #line between `typedef union
+ YYSTYPE' and `{'.
+ * src/muscle_tab.h (muscle_grow): Replace the header comments with
+ those from muscle_tab.c since the old ones are misleading.
+
2006-07-13 Akim Demaille <address@hidden>
Support %define "KEY" {VALUE}.
Index: src/muscle_tab.h
===================================================================
RCS file: /sources/bison/bison/src/muscle_tab.h,v
retrieving revision 1.15
diff -p -u -r1.15 muscle_tab.h
--- src/muscle_tab.h 24 Jul 2005 07:24:22 -0000 1.15
+++ src/muscle_tab.h 13 Jul 2006 19:58:49 -0000
@@ -82,9 +82,9 @@ extern struct obstack muscle_obstack;
muscle_insert (Key, obstack_finish (&muscle_obstack)); \
}
-/* Insert (KEY, VALUE). If KEY already existed, overwrite the
- previous value. Uses MUSCLE_OBSTACK. De-allocates the previously
- associated value. VALUE and SEPARATOR are copied. */
+/* Append VALUE to the current value of KEY. If KEY did not already
+ exist, create it. Use MUSCLE_OBSTACK. De-allocate the previously
+ associated value. Copy VALUE and SEPARATOR. */
void muscle_grow (const char *key, const char *value, const char *separator);
Index: src/parse-gram.y
===================================================================
RCS file: /sources/bison/bison/src/parse-gram.y,v
retrieving revision 1.86
diff -p -u -r1.86 parse-gram.y
--- src/parse-gram.y 13 Jul 2006 08:12:00 -0000 1.86
+++ src/parse-gram.y 13 Jul 2006 19:58:50 -0000
@@ -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);
- Fixed: #line in YYSTYPE confuses Doxygen,
Joel E. Denny <=