State Transition Diagram: An Improvement

FSM diagram

Here is another copy of the original transition state diagram for parsing telephone numbers.

Look more carefully at state 15. It discards blank spaces while it looks for a hyphen.

This state is unnecessary -- state 8 could have done the same job. The arrow pointing from 8 to 15 could have just pointed back to 8.


[home]Cobol Home [gears]Finite State Machines