Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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 Thompsons construction to translate the regular expression into an NFA.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Manga Guide To Databases

Authors: Mana Takahashi, Shoko Azuma, Co Ltd Trend

1st Edition

1593271905, 978-1593271909

More Books

Students also viewed these Databases questions

Question

12. What are their values? (ethical stance in society)

Answered: 1 week ago