You are on page 1of 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