Question: Design a DFA to recognize identifiers defined as follow: - identifier name can be any combination of letters and decimal digits as long as the
Design a DFA to recognize identifiers defined as follow:
- identifier name can be any combination of letters and decimal digits as long as the
total number of letters is greater than the total number of digits
- identifier token may start with white spaces and it is always followed by one white
space
- the DFA should report whether the input is a valid identifier or error otherwise
Example:
x12y error
xy12z ok
12yyy ok
If you have done it, skip the rest. If you think this cannot be done, explain why and
then assume that the total length of a token cannot be more than 3 characters
(excluding white spaces) - redo the problem now or argue why it cannot be done.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
