Hello.

I'm a GSoC participant working on doxygen comments parsing and translating. And currently I have some problems in extracting comments from the source files in parser.y. The problem is that parser fails when there is no node to attach comment to.
I'm defining comment rules like that:

interface      : interface declaration {  

                   /* add declaration to end of linked list (the declaration isn't always a single declaration, sometimes it is a linked list itself) */

                   appendChild($1,$2);

                   $$ = $1;

               }

               | interface doxygen_comment declaration {

                   set_comment($3, $2);

                   appendChild($1, $3);

                   $$ = $1;

               }

               | interface declaration doxygen_post_comment {

                   set_comment($2, $3);

                   appendChild($1, $2);

                   $$ = $1;

               }

And that was giving "Syntax error in input" for example for empty file with no node to attach doxygen_comment to. Then I modified that:

interface      : ...

               | interface doxygen_comment {

                   $$ = $1;

               }

But that produces lots of reduce/reduce warnings and breaks the whole comments parsing. And I don't understand why is it so, doxygen_comment and doxygen_post_comment are defined as a simple DOXYGENSTRINGs tokens, and there should be no problems.
As I'm not very good at bison, I'm asking for your help. I've tried lots of lots of variations of rules, but nothing seems to work.
--
Regards,
Dmitry Kabak