Assignment-2: - B. H. Gardi College of Engineering & Technology
Assignment-2: - B. H. Gardi College of Engineering & Technology
Assignment-2
1) Explain lexical analysis phase of a compiler and, for a statement given below, write output of all phases (except of an optimization phase) of a copiler. Assume a, b and c of type float a = a+b*c*2; 2) Find the regular Expression corresponding to given statement, subset of {0,1}* a. The Language of all strings containing at least one 0 and at least one. b. The Language of all strings containing 0s and 1s both are even. c. The Language of all strings containing at most one pair of Consecutive 1s. d. The Language of all strings that do not end with 01. 3) Construct a NFA for following regular expression using Thompsons notation and then convert it into DFA. aa*(b | c) a*c# 4) Construct a DFA for a given regular expression (010+00)*(10)*.