Assignment 01
Assignment 01
NOTE:
This assignment covers Lecture slides # 1 to 5.
Submissions after deadline will not be considered.
Question #1 Marks = 5 + 2 +3 = 10
i. Consider the following stream of characters as input to the lexical analyzer (i.e., scanner)
if (i % 2 == 0) {
} else {
You are required to find the tokens produced by lexical analyzer and write them along with their
types (types are given below) in the following sample table.
No Token Type
Note: You can add/delete rows in this table as per your requirement.
ii. Construct a Transition Table with the help of following Transition Graph of a Typical
NFA.
iii. Draw a Transition Graph with the help of following transition table of typical NFA.
0 1 Ε
A A,B E
B C A D,E
C D B,C
D D,E C
E A D,E
Table: Transition Table of a typical NFA
Note: In transition table, ε represents epsilon (i.e., empty / null input).
_______________________________GOOD LUCK_______________________________________