Question: Given the regular expression r = (+|-)?d*(.d+)? ((e|E)(+ | - )?d+)? where d represents the character class of digits (0,1,..9). The L(r) language is the

Given the regular expression r = (+|-)?\d*(.\d+)? ((e|E)(+ | - )?\d+)? where \d represents the character class of digits (0,1,..9). The L(r) language is the set of numbers formed from a floating point literal with an optional exponent.

Examples of valid values:

125

45e45

-67.677E-2

0.0001

Examples of invalid values:

.75

56.

e+25

The aim of the assignment is the implementation of a program allowing the recognition of the elements of L(r) using the construction approach based on automata.

Question 1

Construct the non-deterministic finite state automaton (NFA) corresponding to the regular expression r.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!