Open josevalim opened 13 years ago
I took a look at the parser tables generated by Bison and Jison, and the difference appears to be in how Bison resolves default reductions. In their second example of resolving the conflict, switching name
with ID
creates a default reduction in the parser state which had the conflict, resolving the ambiguity. Jison currently only creates default reductions when one action is possible.
It's not well documented how it works (it's separate from the table generation algorithms,) so I'll have to do some digging. Thanks for catching this!
Sweet. Just to let you know, the second example to solve the issue in that section does not work on Jison as well. I am afraid I cannot dive into Jison source code, but let me know if there is anything else I can do to help.
Did you ever figure out how to solve this?
Bison specification describes the possibility of "mysterious conflicts" in LALR parsers:
http://www.gnu.org/software/bison/manual/bison.html#Mysterious-Conflicts
However, the solution presented does not currently work in Jison. It continues showing the same reduce/reduce conflicts.