How to Prove a Grammar is ambiguous? S -> (S)|SS|()
问题 I am rather new to grammars, and was wondering if someone could help me determine using a parse tree how this grammar below is ambiguous? I know that it needs to have two different strings that can be created. S -> (S)|SS|() I can def convert it to chomsky normal form and greibach, but ambiguity is perplexing to me with these. 回答1: The easiest way to prove a grammar ambiguous is to find a sentence with two different parse trees. (Or two different rightmost derivations, which is exactly the