
CS606 Compiler Construction MCQS QUIZ OBJECTIVE QUESTIONS 
CS606Compiler Construction Quiz #Objective #Questions
1. NFA of LR(1) items means ___
 no lookahead
 lookahead one symbols ✔
 lookahead all symbols
 None
2. In the Parsing Table, the rows correspond to Parsing DFA states and columns correspond to ___
 Terminals and Nonterminals ✔
 Start Symbol and its derivation
 Handles and derivations
 None
3. A grammar is LR if a ___ shift reducereduce parser can recognize handles when they appear on the top of the stack
 lefttoreverse
 lefttorise
 lefttoright ✔
 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 nonterminal. The item can be written as A?Xa.?
6. A handle is a substring that matches a ___ side of production rule in the grammar.
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.
9. Suppose ? begins with symbol X which may be a terminal (token) or nonterminal. 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 ✔
 look ahead one symbol
 look ahead all symbols
 All of the given