I'm a GSoC participant, and I have a question about Bison part of swig's parser (parser.y file). I'm working on implementing comments parsing in swig, and I seem to have some problems understanding how bison works. So, right now it has doxygen_comment rule defined, and all c/c++ parts where comments may appear are copied and prepended with doxygen_comment. This was done in ~ year 2008 by another GSoC participant. And after merging this code with trunk, those rules without doxygen_comment where updated, and those that had that thing were nor. And I really don't like the way it's implemented right now.
So I wanted to make this code more clear and simple. I don't like copying same code at all, and I decided to merge bison rules like 'edecl : ID | doxygen_comment ID' by the only rule 'edecl : doxygen_comment ID' and define doxygen_comment as doxygen_comment or empty. Unfortunately, after that the bison shows huge number of shift-reduce conflicts (about 400, and clean swig shows 7), and the swig program loops forever. I tried debugging that, but bison debugging output seems not to be very understandable. So, why could it be so?
This is the branch with all the sources: http://swig.svn.sourceforge.net/viewvc/swig/branches/gsoc2012-doxygen/.
I'm sorry for such a long post!
Summarising everything: I made one bison rule as 'rule | empty', and swig now loops forever. I'm not a big professional in bison and I don't know how to debug things like that.