2 votes 2 votes Consider the following context-free grammar S → SS + | SS*| a for the string aa + a*. Is the grammar ambiguous ? Compiler Design ambiguous compiler-design grammar theory-of-computation + – Shashank Chandekar asked Nov 3, 2016 Shashank Chandekar 4.3k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes I think only one parse tree is possible for the grammer and hence it is not ambiguos. Arpit Dhuriya answered Nov 3, 2016 Arpit Dhuriya comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes No it is not ambiguous as only one parse tree is possible for this string. You can also see it in this way that 1 lmd is possible n 1 rmd is possible but the tree generated from both is same. Hence it is unambiguous. Chetnawadhwa answered Nov 8, 2016 Chetnawadhwa comment Share Follow See all 0 reply Please log in or register to add a comment.