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

Homework 1 CC

Uploaded by

Zeeshan Ali
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)
45 views2 pages

Homework 1 CC

Uploaded by

Zeeshan Ali
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

Total Marks: 20 Submission Deadline: 19 April 2024

Homework # 1: Compiler Construction Course [CLO 3]


Guidelines: The deadline for Homework is 19 April 2024. Submit your homework in the soft form at LMS.

Prepare your script by yourself otherwise prepare for the penalty.

Lexical analyzer: Lexical analyzer (LA) reads the source code as lexemes and converts
it into a sequence of tokens if a specific pattern matches. Your task is to implement a lexical
analyzer using any coding approach (LA using transition diagram, transition table, and lex/flex
tool). Your program should read the source program given below as sample input from a text
file “input.txt” and the output sequence of the token in another text file “output.txt”. Tokens
and corresponding Regular expressions from a lexical specification are given in Table 1.

1. Sample Input:

2. Sample Output:
Total Marks: 20 Submission Deadline: 19 April 2024

3. Submission Detail
Submit the transition diagram and transition table along with complete source code (any
language C/C++/Java/Python), input file, and output file.

You might also like