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

Compiler 2

This document contains a practice test for a Compiler Design course. It includes 6 questions: [1] Construct a predictive parsing table for a grammar, [2] Prove that a grammar is LL(1), [3] Find the canonical collection of LR(1) items for an augmented grammar, [4] Give the algorithm to construct a non-recursive predictive parsing table, [5] Construct an LALR parsing table for an augmented grammar, and [6] Provide a short note with example on synthesized attributes, inherited attributes, quadruple notation of 3-address code, and triple notation of 3-address code. The test is for a 5th semester B.Tech course in Computer

Uploaded by

api-3812391
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)
63 views2 pages

Compiler 2

This document contains a practice test for a Compiler Design course. It includes 6 questions: [1] Construct a predictive parsing table for a grammar, [2] Prove that a grammar is LL(1), [3] Find the canonical collection of LR(1) items for an augmented grammar, [4] Give the algorithm to construct a non-recursive predictive parsing table, [5] Construct an LALR parsing table for an augmented grammar, and [6] Provide a short note with example on synthesized attributes, inherited attributes, quadruple notation of 3-address code, and triple notation of 3-address code. The test is for a 5th semester B.Tech course in Computer

Uploaded by

api-3812391
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

RADHA GOVIND ENGINEERING COLLEGE, MEERUT

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING


2ND SESSIONAL TEST-2008-2009
B.Tech:V Sem (CS)
Compiler Design

Time: 1Hr. MM:30

NOTE: Attempt any 5 questions.


. Q1.Construct a predictive parsing table for the following grammer.

E-> TE’
E’->+TE’/Λ
T->FT’
T’->*FT’/ Λ
F->(E)/id

This Λ shows empty character.

Q2. Proof that the following grammer is LL(1). Test whether the following grammer is LL(1)

• S->AaAb/BbBa

A-> Λ
B-> Λ

• S->1AB/ Λ
A->1AC/0C
B->0S
C->1

Q3.Consider the following augmented grammer

S’->S
S->CC
C->eC/d
Find canonical collection of LR(1) items.

Q4. Give the algorithm to construct non recursive predictive parsing table.

Q5. Construct LALR parsing table for Q3.augmented grammer.

Q6. Write short note with one example for the following:

• Synthesized attributes
• Inherited attributes
• Quadruple notation of 3 addr code
• Triple notation of 3 addr code

You might also like