Question: 1. Consider the following format for floating point literals. Assume a fraction part consisting of a string of one or more decimal digits with

1. Consider the following format for floating point literals. Assume a fraction 

1. Consider the following format for floating point literals. Assume a fraction part consisting of a string of one or more decimal digits with an optional decimal point (period) that can be added immediately before or after any of the digits. In addition, an optional exponent can be appended to the fraction part, consisting of an e or E, followed by an optional sign, followed by one or more decimal digits. A floating point literal must contain either a decimal point, or an exponent, or both. Examples: .0, 0., 0.1, .01e-01, 01E00 a. Give a regular expression for this construct. You may use . b. Use Thompson's construction to translate the regular expression into an NFA.

Step by Step Solution

3.42 Rating (152 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a 090909eE09 bFollowing Thompsons construction the NFA for the regular expression 090909eE09 can be ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!