3 votes 3 votes Given the grammar $s \rightarrow T ^{\ast} S\ \mid T$ $T \rightarrow U+T\ \mid U$ $U \rightarrow a \mid b$ Which of the following statements is wrong? Grammar is not ambiguous Priority of $+$ over $^{\ast}$ is ensured Right to left evaluation of $^{\ast}$ and $+$ happens None of these Compiler Design isro-2020 compiler-design grammar easy + – Satbir asked Jan 13, 2020 edited Apr 10, 2020 by go_editor Satbir 3.7k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
2 votes 2 votes Answer: D) None of these. a. Grammar is not ambiguous - true b. Priority of + is > than *, since + comes lower in parse tree - true. c. Right associativity - true Tuhin Dutta answered Jan 13, 2020 Tuhin Dutta comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes Priority of + over ∗ is ensured as plus is at a lower level as compared to * Also both are right recursive and therefore they are right-associative STUDYGATE2019 answered Jan 13, 2020 STUDYGATE2019 comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes Option D) None of these is the correct answer, a) Grammar is not ambiguous, True b) + is having higher priority than * . c) both + and * are right associative. Sanandan answered Sep 14, 2020 Sanandan comment Share Follow See all 0 reply Please log in or register to add a comment.