# CS606 Compiler Construction Quiz MCQs Lecture 23-30 Objective Questions | SUPERSTARWEBTECH CS606 Compiler Construction MCQS QUIZ OBJECTIVE QUESTIONS

CS606-Compiler Construction Quiz #Objective #Questions

1. NFA of LR(1) items means ___

• None

2. In the Parsing Table, the rows correspond to Parsing DFA states and columns correspond to ___

• Terminals and Non-terminals ✔
• Start Symbol and its derivation
• Handles and derivations
• None

3. A grammar is LR if a ___ shift reduce-reduce parser can recognize handles when they appear on the top of the stack

• left-to-reverse
• left-to-rise
• left-to-right ✔
• None

4. If / is a set of items for grammar then closure(/) is a set of items constructed from / by the following rule.

• If A-> aX.Y is in closure(/) and Y->r is production, then add X->.r to closure(/)
• If A->a.XY is in closure(/) and X->r is production, then add X->.r to closure(/) ✔
• If A->aXY. is in closure(/) and A->r isproduction, then add X->.r to closure(/)
• None

5. Suppose ? begins with symbol X which may be a terminal (token) or non-terminal. The item can be written as A?Xa.?

• True ✔
• False

6. A handle is a substring that matches a ___ side of production rule in the grammar.

• right hand✔
• left hand

7. If T->XYZ is a production of grammar G then which of the following item indicates that a string derivable from X has been seen so far on the input and we hope to see a string derivable from YZ next on the input.

• T->.XYZ
• T->X.YZ ✔
• T->XY.Z
• T->XYZ.

8. In the canonical collection procedure, a DFA can not be constructed from NFA using the subset construction, similar to the one we used for lexical analysis.

• True
• False ✔

9. Suppose ? begins with symbol X which may be a terminal (token) or non-terminal. The item can be written as ___

• A?a.X?
• A?Xa.? ✔
• A?X?.
• X?Aa.?

10. If / is a set of items for grammar then closure(/) is a set of items constructed from / by the following rule.

• Every item in / is in closure(/) ✔
• Every item in / is not in closure(/)
• Only one item in / is in closure(/)
• None

11. NFA of LR(0) items means ___

• no look ahead symbol ✔