0 0 votes 8:14 AM 37\% Deepali bansal's doubt 7 hrs Jaipur Compiler Design CS \& IT Engg Where €,; IF THEN and all capital letters are terminal and stmt, ifstmt, whilestmt and bexpr are non terminal The above grammar is 1 ambiguous 2 unambiguous 3 LL(1) 4 LR(1) Pls expain with the draw parse tree and how to generate the grammar T4. Consider the following CFG. stmt $\rightarrow \varepsilon$ | stmt; stmt; lifstmt | whilestmt ifstmt $\rightarrow$ If bexpr THEN stmt |IF bexpr THEN stmt ELSE stmt END whilestmt $\rightarrow$ WHILE bexpr DO stmt END bexpr $\rightarrow$ TRUE|FALSE Answers (0) Compiler Design compiler-design parsing lr-parser ambiguous ll-parser test-series + – Deepalitrapti 688 views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
2 2 votes We can draw multiple parse tree so it is ambiguous grammar. abhishekmehta4u answered Jul 19, 2018 abhishekmehta4u comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes Given grammar is ambiguous, Hence option A. We can generate more than 1 parse trees for even number of ';' like ;;. ;;;; . ;;;;;; aambazinga answered Jul 19, 2018 aambazinga comment Share Follow 0 reply Please log in or register to add a comment.