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

Compoler Design Kiet ct1

This document outlines the CT-1 Examination for the Compiler Design course at KIET Group of Institutions, detailing the structure and content of the exam. It includes sections with various questions on compiler concepts, grammar analysis, and parsing techniques, along with instructions for answering. The exam is designed for 3rd-year B. Tech students in the Computer Science department, with a total duration of 2 hours and a maximum score of 60 marks.

Uploaded by

vivankapoor600
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views2 pages

Compoler Design Kiet ct1

This document outlines the CT-1 Examination for the Compiler Design course at KIET Group of Institutions, detailing the structure and content of the exam. It includes sections with various questions on compiler concepts, grammar analysis, and parsing techniques, along with instructions for answering. The exam is designed for 3rd-year B. Tech students in the Computer Science department, with a total duration of 2 hours and a maximum score of 60 marks.

Uploaded by

vivankapoor600
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Roll No.

___________________

KIET Group of Institutions, Ghaziabad


CT-1 Examination (2022-2023) EVEN Semester

Department: Computer Science Course: B. Tech.


Year: 3rd Semester: 5th
Subject Name: Compiler Design Subject Code: KCS502
Duration: 2 Hrs Max. Marks: 60

Note: Attempt all the questions of each section


Section-A (2X10=20)
Q. 1 Competitive C BL/
Exam# O KC*
Differentiate between compiler and interpreter. AKTU
a 2017-18 1 2/C
CO
b In a compiler, keywords of a language are recognized during which GATE
1 2/C
phase of the compiler? 2011
c Design a DFA over {a,b} such that every string accepted must start with
1 3/C
a substring abb.
d In some programming languages, an identifier is permitted to be a letter
following by any number of letters or digits. If L and D denote the sets GATE 3/C,P
2
of letters and digits respectively, define the regular expression that 1995
define such an identifier.
e Demonstrate that the following grammar is ambiguous or not?
UGC NET
G1: SSbS | a 1 3/C,P
2018
G2: SaB | ab AGAB | a BABb | b
f Consider the following grammar: AKTU
2 3/C
S→B|SabS, B→bB| ε Compute FOLLOW(B) 2020-2021
g Write down the name of various Compiler Construction Tools. 1 2/F
h Consider the augmented grammar with {+, *, (, ), id} as the set of
terminals.
S' → S
S→S+R|R GATE
2 3/C,P
R→R*P|P 2022
P → (S) | id
If I0 is the set of two LR(0) items {[S' → S.], [S → S. + R]}, then
goto(closure(I0), +) contains exactly how many items?
i List down the conflicts during shift reduce parsing. AKTU
2 2/C
2021-22
j Differentiate between Synthesized and Inherited attributes. AKTU
3 2/C
2021-22
Section-B (5X4=20)
Construct the NFA for the following Regular Expression: AKTU
ab* | ab 2016-17
Q. 2 OR 1 3/C,P
Construct all the phases of compiler for the source program: AKTU
a=b+c*70 2020-21
Describe cross compiler. How is bootstrapping of a compiler done to a AKTU
second machine 2015-2016
Q. 3 1 2/F,C
OR
Describe the LEX compiler.

 CO -Course Outcome generally refer to traits, knowledge, skill set that a student attains after completing the course successfully.
 Bloom’s Level (BL) - Bloom’s taxonomy framework is planning and designing of assessment of student’s learning.
 *Knowledge Categories (KCs): F-Factual, C-Conceptual, P-Procedural, M-Metacognitive
 #Reference to Competitive Exams (GATE, GPAT, CAT, GRE, TOFEL, NET, etc. )
Roll No. ___________________
Consider the following grammar:
S(L) |a AKTU
LL,S |S 2018-19
Parse the input string (a,(a,a)) using shift reduce parser?
OR
Q. 4 Create the Non-Recursive Predictive Parsing table for the following 2 3/C,P
grammar:
AKTU
E → TE’ E’ → +TE’ | ε T → FT’ T’ → *FT’ | ε F → 2017-2018
(E) | id

Show whether left recursion exists for the following grammar:


S Aa | b \
AAc | Sd | e
OR
Q. 5 Compute the FIRST and FOLLOW for the following grammar? AKTU 2 3/C,P
E -> E+T 2021-22
T -> T*F
F -> (E) | id

Section-C (10X2=20)
Construct the DFA for the following regular expression by the use of
Optimization of DFA based pattern matcher:
(a+b)*abb
Q. 6 OR 1 4/C,P
Language L1 is defined by the grammar: S1→aS1b|ε
Language L2 is defined by the grammar: S2→abS2|ε GATE
Determine which language/languages are regular? 2016

Construct the CLR(1) parsing table for the following grammar: AKTU
S→AA, A→aA|b 2020-21
OR
Give Operator –precedence parsing algorithm. Consider the
AKTU
Q. 7 following grammar and build up operator precedence table. Also 2 4/C,P
2017-2018
parse the input string (id+(id*id))
CO
E -> E+T
T -> T*F
F -> (E) | id

 CO -Course Outcome generally refer to traits, knowledge, skill set that a student attains after completing the course successfully.
 Bloom’s Level (BL) - Bloom’s taxonomy framework is planning and designing of assessment of student’s learning.
 *Knowledge Categories (KCs): F-Factual, C-Conceptual, P-Procedural, M-Metacognitive
 #Reference to Competitive Exams (GATE, GPAT, CAT, GRE, TOFEL, NET, etc. )

You might also like