2 votes 2 votes Make this grammer into unambiguous Compiler Design compiler-design ambiguous-grammar + – learner_geek asked Aug 5, 2017 • retagged Jun 18, 2022 by Lakshman Bhaiya learner_geek 990 views answer comment Share Follow See 1 comment See all 1 1 comment reply Bikram commented Aug 7, 2017 reply Follow Share These 2 are the main points when convert a grammar from ambiguous to unambiguous : The operator '*' have higher precedence than the operator '+' Both the operators '*' and '+' are left associative. Read this : http://www.iitg.ernet.in/gkd/ma513/sep/sep27/note-0.pdf 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes $$L(G) = x^nx^+xx^n, n\geq 0$$ If we take n = 0, then the language becomes $x^+x = xxx^*$ which generates all the strings produced by G. A simple unamibigous grammar producing the same language will be, $$S\rightarrow Sx|xx$$ zxy123 answered Dec 29, 2020 • edited Dec 29, 2020 by zxy123 zxy123 comment Share Follow See all 0 reply Please log in or register to add a comment.