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

Internal 1 Set 1

Uploaded by

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

Internal 1 Set 1

Uploaded by

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

Register

Number:

INTERNAL TEST I Date/Session 19.09.24&FN Marks 50


Course code CS3501 Course Title Compiler Design
Regulation 2021 Duration 1:30 Hours Academic Year 2024-2025
Year III Semester IV Department CSE
COURSE OUTCOMES
CO1: Understand the different phases of compiler.
CO2: Design a lexical analyzer for a sample language.
CO3: Apply different parsing algorithms to develop the parsers for a given grammar.
CO4: Understand syntax-directed translation and run-time environment.
CO5: Learn to implement code optimization techniques and a simple code generator
CO6: Design and implement a scanner and a parser using LEX and YACC tools.
Q.No. Question CO BTS
PART A
(Answer all the Questions 10 x 2 = 20 Marks)
1 State the two main parts of compilation and its function CO1 U
2 Describe the possible error recovery action in lexical analyzer CO2 R
3 What is the role of lexical analysis phase CO2 R
4 Define lexeme CO2 R
5 Draw the syntax tree for the expression a=b*c+b*c CO1 U
6 List the cousins of compiler CO1 R
7 Write the regular expression for an identifier and number CO1 U
8 What are the various parts of LEX program? CO1 U
9 Define ambiguous grammar CO1 R
10 Define NFA CO1 R
PART B
(Answer all the Questions 2 x 15 = 30 Marks)
11a State 0 1
->p {p,q {p} CO1 A
}
q {r} {r}
r {s} 0
*s {s} {r}
Convert NFA to is equivalent DFA

OR
11b(i) Difference between lexeme, token and pattern CO1 A
(ii) Define the following terms: Compiler,Interpreter,Translator and differentiate between them CO1 R
12a What are the various phases of compiler? Explain the phases in detail. CO1 R
OR
12b Draw the transition diagram for relational operator and unsigned numbers CO2 A

Page 1 of 2
Course Faculty HOD Principal

Page 2 of 2

You might also like