How to resolve a shift/reduce conflict forcing a shift or a reduce?
When there is a shift/reduce conflict in Yacc/Bison, is it possible to force the conflict to be solved exactly as you want? In other words: is it possible explicitly force it to prioritize the shift or the reduce? For what I have read, if you are happy with the default resolution you can tell the generator to not complain about it . I really don't like this because it is obfuscating your rational choice. Another option is to rewrite the grammar to fix the issue. I don't know if this is always possible and often this makes it much harder to understand. Finally, I have read the precedence rules