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

Fall 2024 - CS606 - 1

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)
9 views2 pages

Fall 2024 - CS606 - 1

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

CS606 – Compiler Construction

Total Marks: 20
Assignment No. 01
Due Date: Nov 25, 2024
Semester: Fall 2024

Please read the following instructions carefully before solving & submitting assignment:

Uploading Instructions:
o You are supposed to consult recommended book/s to clarify your concepts as handouts are not sufficient.
o The assignment file must be an MS Word file. Any other software/tool is not allowed.
o The required file format is .doc or .docx. Any other format like scan images, txt, pdf, png or jpeg etc. will
not be accepted.
o Place all solutions in a single MS Word file along with your own Student Id at top.
o Submit the MS Word file at VULMS within the due date.

Rules for Marking:


It should be cleared that your assignment will not get any credit if:
o The assignment is submitted after due date.
o The assignment is not submitted in .doc or .docx format.
o The submitted assignment does not open or file is corrupt.
o The assignment is fully or partially copied from other student or ditto copy from handouts or Internet;
strict disciplinary action will be taken in this case.
o The submitted file does not contain your own Student Id, or contain other than yours; Zero Marks will be
awarded, and no excuse will be accepted in any case.

Note:
o No assignment will be accepted after the due date via email in any case (whether it is the case of load
shedding or internet malfunctioning etc.). Hence refrain from uploading assignment in the last hour of
deadline.
o It is recommended to upload solution file at least one day before its closing date.
o Do not put any query on MDB regarding this assignment, if you have any query then email at
[email protected]

Lectures Covered: This assignment covers Lectures # 1 to 10.

1
CS606 – Compiler Construction
Total Marks: 20
Assignment No. 01
Due Date: Nov 25, 2024
Semester: Fall 2024

Question 1 (10 Marks)


Explain the role of a lexical analyzer in a compiler. What are the
different phases it involves? Use a small code snippet in C to
illustrate how the lexical analyzer breaks down the source code into
tokens.

Question 2 (10 Marks)

Consider the following code snippet. Identify the lexemes and


corresponding tokens for each line.
int x = 20;
if (x > 10) {
x = x + 5;
}

Good Luck

You might also like