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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started