Computer Science Engineering (CSE)  >  Compiler Design  >  Predictive Top Down Parsing Download as PDF

Predictive Top Down Parsing


Test Description

10 Questions MCQ Test Compiler Design | Predictive Top Down Parsing

Predictive Top Down Parsing for Computer Science Engineering (CSE) 2022 is part of Compiler Design preparation. The Predictive Top Down Parsing questions and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus.The Predictive Top Down Parsing MCQs are made for Computer Science Engineering (CSE) 2022 Exam. Find important definitions, questions, notes, meanings, examples, exercises, MCQs and online tests for Predictive Top Down Parsing below.
Solutions of Predictive Top Down Parsing questions in English are available as part of our Compiler Design for Computer Science Engineering (CSE) & Predictive Top Down Parsing solutions in Hindi for Compiler Design course. Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free. Attempt Predictive Top Down Parsing | 10 questions in 10 minutes | Mock test for Computer Science Engineering (CSE) preparation | Free important questions MCQ to study Compiler Design for Computer Science Engineering (CSE) Exam | Download free PDF with solutions
1 Crore+ students have signed up on EduRev. Have you?
Predictive Top Down Parsing - Question 1

S → C C
C → c C | d
The grammar is 

Detailed Solution for Predictive Top Down Parsing - Question 1

Explanation: Since there is no conflict, the grammar is LL (1) hence a predictive parse table with no conflicts can be constructed.

Predictive Top Down Parsing - Question 2

Which of the following statements is false?

Detailed Solution for Predictive Top Down Parsing - Question 2

Explanation:
If a grammar has more than one leftmost (or rightmost) derivation the grammar is ambiguous.

Predictive Top Down Parsing - Question 3

Which of the following derivations does a top-down parser use while parsing an input string?

Detailed Solution for Predictive Top Down Parsing - Question 3

Explanation: Left to right constructing leftmost derivation of the sentence.

Predictive Top Down Parsing - Question 4

Given the following expression grammar:E -> E * F | F + E | FF -> F – F | idWhich of the following is true?

Detailed Solution for Predictive Top Down Parsing - Question 4

Predictive Top Down Parsing - Question 5

Which one of the following is true at any valid state in shift-reduce parsing?

Detailed Solution for Predictive Top Down Parsing - Question 5

Explanation: The prefixes on the stack of a shift-reduce parser are called viable prefixes.

Predictive Top Down Parsing - Question 6

In the context of abstract-syntax-tree and control-flow-graph.Which one of the following is true?

Detailed Solution for Predictive Top Down Parsing - Question 6

Explanation: Successors depends on input .

Predictive Top Down Parsing - Question 7

List-I                                List-II
A. Lexical analysis           1. Graph coloring
B. Parsing                         2. DFA minimization
C. Register allocation       3. Post-order traversal
D. Expression evaluation  4. Production tree

A B C D

Detailed Solution for Predictive Top Down Parsing - Question 7

Explanation: The entire column an items matches the Column B items in a certain way.

Predictive Top Down Parsing - Question 8

Which of the following pairs is the most powerful?

Detailed Solution for Predictive Top Down Parsing - Question 8

Explanation parser algorithm is simple.

Predictive Top Down Parsing - Question 9

 Consider the following grammar G.
S → F ⎪ H
F → p ⎪ c
H → d ⎪ c
Which one is true?
S1: All strings generated by G can be parsed with help of LL (1).

S2: All strings generated by G can be parsed with help of LR (1).

Detailed Solution for Predictive Top Down Parsing - Question 9

Explanation: There is ambiguity as the string can be derived in 2 possible ways.
First Leftmost Derivation
S → F
F → c
Second Leftmost Derivation
S → H
H → c 

Predictive Top Down Parsing - Question 10

 What is the maximum number of reduce moves that can be taken by a bottom-up parser for a grammar with no epsilon- and unit-production to parse a string with n tokens?

Detailed Solution for Predictive Top Down Parsing - Question 10

Explanation: the moves are n-1.

15 videos|55 docs|30 tests
Use Code STAYHOME200 and get INR 200 additional OFF
Use Coupon Code
Information about Predictive Top Down Parsing Page
In this test you can find the Exam questions for Predictive Top Down Parsing solved & explained in the simplest way possible. Besides giving Questions and answers for Predictive Top Down Parsing, EduRev gives you an ample number of Online tests for practice