What is the easiest way of telling whether a BNF grammar is ambiguous or not?
问题 Namely, is there a tool out there that will automatically show the full language for a given grammar, including highlighting ambiguities (if any)? 回答1: There might be some peculiarity about BNF-style grammars, but in general, deciding whether a given context-free grammar (such as BNF) is ambiguous is not possible. In short, there does not exist a tool because in general, that tool is mathematically impossible. There might be some special cases that could work for you, though. 回答2: In general,