0% found this document useful (0 votes)
22 views2 pages

7th Sem Cs&It CD Ct3 10

This document is a class test for a compiler design course. It contains 6 questions related to compiler design topics like LL(1) grammars, LR parsing, SLR parsing tables, and LR(1) items. The test asks students to answer any 4 of the 6 questions within a 60 minute time limit and is worth a maximum of 10 marks. It provides short descriptions of what each question is asking for.

Uploaded by

kamar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views2 pages

7th Sem Cs&It CD Ct3 10

This document is a class test for a compiler design course. It contains 6 questions related to compiler design topics like LL(1) grammars, LR parsing, SLR parsing tables, and LR(1) items. The test asks students to answer any 4 of the 6 questions within a 60 minute time limit and is worth a maximum of 10 marks. It provides short descriptions of what each question is asking for.

Uploaded by

kamar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

Silicon Institute of Technology

Class Test III (7 Sem. B. Tech- CS & IT), 2010 Sub : Compiler Design Time 60 mins. Max. Marks 10 Date : 12.11.10 (Answer any four) Q.1. Answer the following questions. a) Give the conditions for a given grammar G to be LL(1).[1.0] b) Give the configurations of an LR parser at any instant of time and also with shift and reduce actions. [1.0] c) What is viable prefix? [0.5] Q.2. Generate an SLR parsing table for the given grammar. E E + T, E T, T T * F, T F, F (E) and F id. Q.3. Q.4. Q.5. [2.5] Q.3. Q.4. Q.5. Construct the DFA of the canonical collection of LR(0) items for the grammar given in Q.2. [2.5] Give the algorithm for construction of an SLR parsing table. [2.5] Show that the following grammar is not LL(1). [2.5] S iCtSS' | a S' eS | C b. Q.6. Construct the collection of LR(1) items for the given grammar. S CC, C cC | d. Good Luck [2.5] Q.6. Q.1.
th

Silicon Institute of Technology


Class Test III (7th Sem. B. Tech- CS & IT), 2010 Sub : Compiler Design Time 60 mins. Max. Marks 10 Date : 12.11.10 (Answer any four) Answer the following questions. a) Give the conditions for a given grammar G to be LL(1).[1.0] b) Give the configurations of an LR parser at any instant of time and also with shift and reduce actions. [1.0] c) What is viable prefix? [0.5] Q.2. Generate an SLR parsing table for the given grammar. E E + T, E T, T T * F, T F, F (E) and F id. [2.5] Construct the DFA of the canonical collection of LR(0) items for the grammar given in Q.2. [2.5] Give the algorithm for construction of an SLR parsing table. [2.5] Show that the following grammar is not LL(1). [2.5] S iCtSS' | a S' eS | C b. Construct the collection of LR(1) items for the given grammar. S CC, C cC | d. Good Luck [2.5]

You might also like