Question: convert the Regular Expression given over there to equivalent NFA. Then convert the NFA to DFA. Finally, using an example show that this DFA can

convert the Regular Expression given over there to equivalent NFA. Then convert the NFA to DFA. Finally, using an example show that this DFA can be used by the Lexical Analyzer to verify whether a number is a valid number or not.
Regular expressions are useful tools in the design of compilers for program- ming languages. Elemental objects in a programming language, called tokens, such as the variable names and constants, may be described with regular ex- pressions. For example, a numerical constant that may include a fractional part and/or a sign may be described as a member of the language (+U U) (D* U D* . D* U D* .D*) where D = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} is the alphabet of decimal digits. Examples of generated strings are: 72, 3.14159, +7., and .01.
Step by Step Solution
3.29 Rating (161 Votes )
There are 3 Steps involved in it
Solutions Step1 Regular expression Regular expressions regex Patterns for matching text strings Compilers Programs that translate code into machinerea... View full answer
Get step-by-step solutions from verified subject matter experts
