👁️ 133 views
University of Barishal Logo

University of Barishal

Department of Computer Science and Engineering

1st Mid Exam

Course Title: Compiler Design and Construction (CSE-4103)

Semester: 7th | Session: 18-19

Time: N/A | Marks: N/A

Answer ALL Questions

1.


1)

Analyse the terms pre-processing and assembling.
 

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
4 Marks
2)

Compiler design impacts several other areas of computer science. Review the three most important interactions and applications of the technology. Give example(s) for these applications.
 

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
9 Marks
3)

Let, two Context-free grammar G1 and G2:

G1=<{list, digit}, {+,-,0,1,2,3,4,5,6,7,8,9}, P, list> with production 
P = list → list + digit 
      list → list-digit 
      list → digit
     digit →
0 |1| ... |9

G2 <{string}, {+,-,0,1,2,3,4,5,6,7,8,9), P, string> with production P = string → string + string | string - string | 0 | 1 | ... |9.

Which grammar (from G1 and G2) is ambiguous to represent the string 9-5+2?
 

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
10 Marks
4)

Write two methods used in lexical analyzer for buffering in the input. Which technique is used for speeding up the lexical analyzer?

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
6 Marks
5)

Compute FIRST from the following grammar:

        S-> iEtS/iEtSeS/a

        B -> b
 

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
4 Marks
6)

Most languages are case sensitive, so keywords can be written only one way, and the regular expressions describing their lexemes are very simple. However, some languages, like SQL, are case insensitive, so a keyword can be written either in lowercase or in uppercase, or in any mixture of cases. Thus, the SQL keyword SELECT can also be written select, Select, or sElEcT, for instance. Show how to write a regular expression for a keyword in a case-insensitive language. Illustrate the idea by writing the expression for "select" in SQL.

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
4 Marks
7)

Describe the languages denoted by the following regular expressions:        (i) a*                (ii) a | a*b                (iii) ((ε | a) b*)*

Please SUBSCRIBE to view full question

Topics: N/A Solution is Coming!
3 Marks

Contributors of this Question:

Role Name Date
Uploaded By: Onebyzero Edu Aug. 9, 2024, 11:11 p.m.
Converted By (Img/PDF to Text): Baishakhi Bir Feb. 7, 2026, 9:07 p.m.
Reviewed By: Obaydul Hasan Nayeem Feb. 8, 2026, 10:09 a.m.