0% found this document useful (0 votes)
4 views

Mid Term CSC 437 Sec D

Uploaded by

goat59775
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)
4 views

Mid Term CSC 437 Sec D

Uploaded by

goat59775
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

Founded 1991 by Md.

Alimullah Miyan

College of Engineering and Technology (CEAT)


Department of Computer Science and Engineering
Mid Term Examination of Fall Semester 2023
Program: Bachelor of Computer Science and Engineering (BCSE)
Course Instructor: Mahmudul Hasan
Course Code: CSC 437 Time: 01 hour
Course Title: Compiler Design Full Marks: 100
Section: D Date: 15 – 11 – 2023

Instructions:
I. Answer all the following questions. II. Marks allocated are indicated in the right margin.

CO 1 2 3 4 PO 1 2

1. Consider, a computer programming language have following operators CO2 C3 30


{*(multiplication), **(exponential), *=(multiplication assignment), PO1
<<(left shift), =(assignment), ==(equal)}. Now develop a Transition
Diagram to recognize those given operators. Also write a Function (use any
programming language) of this Transition diagram for operators to return
respective Tokens.

2. Lex is a tool that generates Lexical Analyzers (converts the stream of CO2 C2 20
characters into tokens). Describe the working process of a LEX tool with a PO1
suitable diagram.

3. Error recovery strategies are used by the parser to recover from errors once it CO2 C2 25
is detected. Now, properly explain about Error Recovery Strategies like PO1
Panic-Mode Recovery, Phrase-Level Recovery and Error Productions with
examples.

4. Show a Leftmost Derivation and a Parse Tree for the following string ‘acb’ CO2 C3 25
by using the given Context Free Grammar. Here, S is the start symbol. PO1

S → ASB | c
A → aA | ε
B → bB | ε

Page 1
Founded 1991 by Md. Alimullah Miyan

Bloom’s Taxonomy Levels in Cognitive Domain:


C1: Remember; C2: Understand; C3: Apply; C4: Analyze; C5: Evaluate; C6: Create

Course Outcome (CO):

CO1 : Explain the fundamental structure and different phases of a compiler.

CO2 : Apply various techniques or methods in different phases of a compiler.

CO3 : Analyze run-time storage management, code generation and optimization.

CO4 : Design and develop a simple compiler or portions of a compiler.

Program Outcomes:

PO1: Engineering Knowledge: An ability to apply knowledge of computing, mathematics, science and engineering fundamentals to the
solution of complex engineering problems.

PO2: Problem Analysis: An ability to identify, formulate and analyze complex engineering problems. Also capability to select and apply the
engineering knowledge to computing problems that requires the application of principles and applied procedures or methodologies.

Page 2

You might also like