We are learning about ambiguity in class, and the following grammar was given as an example of an ambiguous grammar. I just am not seeing how it is ambiguous. Is there a set pattern or method people use to determine ambiguity or is it just like a logic puzzle where you have to work through combinations to find an ambiguous sentence in the grammar? The examples I've read online mostly given the ambiguous sentence already, but how do you find that sentence in the first place? I'd appreciate any help, thank you.
< stmt_list> ==> < stmt>
| < stmt> ; < stmt_list>
< var> ==> A | B | C
< stmt> ==> < var> + < var>
| < var> - < var>
| < var>