We study ambiguity in a class, and the following grammar has been cited as an example of an ambiguous grammar. I just donβt see how ambiguous it is. Is there a set of patterns or methods that people use to determine ambiguity, or is it just a logic puzzle where you need to work through combinations to find an ambiguous sentence in a grammar? The examples I read on the Internet basically got an ambiguous offer, but how do you find this offer in the first place? I would be grateful for any help, thanks.
< stmt_list> ==> < stmt> | < stmt> ; < stmt_list> < var> ==> A | B | C < stmt> ==> < var> + < var> | < var> - < var> | < var>
source share