1 votes 1 votes S->AB A->a B->b this grammar is ambiguous or not. Q2; is it true that the number of left most derivation tree is always equal to number of right most derivation tree.? Compiler Design compiler-design parsing ambiguous-grammar descriptive + – eyeamgj asked Nov 12, 2018 edited Jun 23, 2022 by Lakshman Bhaiya eyeamgj 293 views answer comment Share Follow See 1 comment See all 1 1 comment reply PiratedVirus commented Nov 12, 2018 reply Follow Share Only string we can derive from above grammer is 'ab', since we have no recalling to any other productions or any alternates, And to produce, 'ab', we can't have multiple derivation tress, hence not ambiguous. Correct me if I am wrong! 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes No this grammar is LL(1), LR(0) and by expansion, SLR(1), LALR(1) and CLR(1) also. So it is not ambiguous shashankrustagi answered Nov 19, 2020 shashankrustagi comment Share Follow See all 0 reply Please log in or register to add a comment.