Explanation of Grammar Ambiguity
-
03-11-2019 - |
Question
Consider now the grammar G
S -> (S + S)
S -> (S * S)
S -> a
Is it ambiguous?
Answer: No because there are disambiguating parentheses and so no left or right recursion.
Can someone explain how the parentheses are disambiguating. I could understand if they were "[" and "(".
Appreciate the help
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with cs.stackexchange