Compiler Construction MCQ :Syntax Analysis(Parser)-Bottom-up parser, Operator Precedence Parser : Link4

Compiler Construction MCQ :Syntax Analysis(Parser)-Bottom-up parser, Operator Precedence Parser : Link4

Compiler Construction MCQ & Answers

       Are you worried about the answers to Compiler Construction questions :Bottom-up parser, Operator Precedence Parser? We have arranged the Show Answer button under the each question. Candidates can click on it to know the right option among the given alternatives. Furthermore, the applicants can check our web portal @ www.totalmcq.com to take part in more MCQ on various subject. Wish, the given information about the Compiler Construction MCQ will helpful to the advance and can learn the various types of questions and answers.


Q.1. Which is not a shift reduce parser action.

A. Shift                                                                           B. goto
C. Reduce                                                                      D. Accept

Q.2. Reverse of a right most derivation is called ------------.

A. reduction                                                                  B. production
C. handle                                                                       D. base

Q.3. The canonical reduction sequence is obtained by ------.

A. reduction                                                                  B. handle
C. production                                                               D. handle pruning

Q.4. Stack is pushed with --------------- symbol.

A. $                                                                                 B. %
C. *                                                                                 D. &

Q.5. LR Parser is a ------------parser.

A. Bottom-Up                                                              B. Top-Down
C. forward                                                                    D. reverse

Q.6. LR parser construct a -----------type of derivation.

A. MMD                                                                         B. RMD
C. LMD                                                                          D. CLR

Q.7. A bottom-up parser generates--------

A. Left-most derivation in reverse                            B. Left-most derivation
C. Right-most derivation in reverse                          D. Right–most derivation

Q.8. The bottom-up parsing method is also called--------

A. Shift reduce parsing                                                B. Predictive parsing
C. Recursive descent parsing                                     D. None of the Above.

Q.9. A shift reduce parser suffers from-------.

A. shift reduce conflict only
B. reduce reduce conflict only
C. shift handle and reduce handle conflicts
D. both shift reduce conflict and reduce reduce conflict

Q.10. The parser cannot decide whether action is shift or reduce. This is called-------

A. Reduce /shift conflict                                            B. Shift/reduce conflict
C. Shift conflict                                                            D. Reduce conflict

Q.11. --------is the most powerful parser.

A. operator precedence                                              B. LALR
C. canonical LR                                                            D. SLR

Q.12. The parser cannot decide which reduction have to be made among many reductions. This is called-------

A. Reduce-shift conflict                                              B. Reduce-Reduce conflict
C. shift-shift conflict                                                   D. shift-Reduce conflict

Q.13. which data structure is used for shift reduce parsing?

A. stack                                                                           B. array
C. queue                                                                         D. pointer variable

Q.14. In operator precedence parsing, precedence relations are defined-------

A. for all pair of non-terminals                                    B. for all pair of terminals
C. to delimit the handle                                                D. None of the above.

Q.15. Which of the following grammar rules violate the requirements of an operator grammar? P, Q, R are nonterminal and s, r, s, t are terminals.
1. P→QR
2. P→QsR
3. P→ε
4. P→QtRr

A. 1 only                                                                           B. 1 and 3 only
C. 2 and 3 only                                                               D. 3 and 4 only