0% found this document useful (0 votes)
37 views

Assignment-2: - B. H. Gardi College of Engineering & Technology

This document contains an assignment given to student CD by Professor RP on July 25th, 2013, with a deadline of July 30th, 2013. The assignment contains 4 questions: 1) Explain lexical analysis and write the output of compiler phases for a C statement. 2) Find regular expressions for 4 string languages. 3) Construct an NFA and DFA for a regular expression using Thompson's notation. 4) Construct a DFA for a given regular expression. The document was prepared by Professor Renish Padariya and approved by Professor Yatin Shukla.

Uploaded by

Devang_Ghiya
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views

Assignment-2: - B. H. Gardi College of Engineering & Technology

This document contains an assignment given to student CD by Professor RP on July 25th, 2013, with a deadline of July 30th, 2013. The assignment contains 4 questions: 1) Explain lexical analysis and write the output of compiler phases for a C statement. 2) Find regular expressions for 4 string languages. 3) Construct an NFA and DFA for a regular expression using Thompson's notation. 4) Construct a DFA for a given regular expression. The document was prepared by Professor Renish Padariya and approved by Professor Yatin Shukla.

Uploaded by

Devang_Ghiya
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Subject Name: CD (170701) Faculty Name: RP

Date of Given: 25/07/2013 Last date of submission: 30/07/2013

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)*.

Prepared By:Prof. Renish Padariya

Approved By:Prof. Yatin Shukla

| B. H. Gardi College of Engineering & Technology

You might also like