Question: Questions: 1. Consider the given grammar and do the following? (2 MARKS) S aS | AB A bA | B cS | C C

Questions: 1. Consider the given grammar and do the following? (2 MARKS) S  aS | AB A  bA |  B cS | C C a.

Questions: 1. Consider the given grammar and do the following? (2 MARKS) S aS | AB A bA | B cS | C C a. Find FIRST and FOLLOW sets b. Construct Predictive Parsing Table. 2. Consider the following grammar and answer the following? (2 MARKS) Ss, *A | A A A-B | B B (S) | digit digit 3 | 4 | 6 | 7 a. Give the Syntax Directed Translation (SDT) Semantic rules. b. Draw the reduction parse tree to find the S.val for the input 4*(6-3)*7. 3. Remove left recursion from the following grammar? (1.50 MARKS) Q2 Q3 Q4 E Xx|z X Ey | w 4. Consider the following NFA table and answer the following? (2.50 MARKS) X y Qo Q1 ||Q1{Q1,Q2}|Q1 |Q3| Q4 a. Draw the transition diagram of NFA b. Make the DFA transition table and draw DFA transition diagram 5. Consider the given grammar is ambiguous or not and find out the following,? (2 MARKS) where the string sentence w-xxxyxqzw T xYZw Y YyZz | xx Z xq | e a. Leftmost and rightmost derivation b. Parse tree

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

1 a FIRST sets FIRSTS The FIRST set of S is the set of terminals that can start a string derived from S FIRSTS a b FIRSTA The FIRST set of A is the set of terminals that can start a string derived fro... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!