Can someone please write a tool that takes a BNF for an LALR parser with shift/reduce or reduce/reduce conflicts as input and produces minimal inputs for how the conflict can be triggered? That would be super helpful, thanks! (Also: Let me know if such a thing exists. :)
I think so as well. And it would be extremely helpful in cases where it is unclear why certain rules end up in the same state when they are seemingly unrelated from just looking at the grammar.
-
-
Yes. And it’s got to be pretty easy to find the shortest path from the start state to the state with a conflict … or from the conflict state back to the start state (few states have more than one predecessor)
-
Both is worst-case exponential afaiu but a breadth-first search backward from the conflict state should be fine for most real-world grammars I'd suspect. Could easily be done from bison .output files. Damn.. I didn't want to do any "serious" work today, maybe even go outside.. :)
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.