Is $__0__$
a legal Java identifier?
Yes, but not a recommended choice.
A somewhat more practical application is a
program that verifies that a date is in the
correct format.
For this program, dates are expected to
be in the format: dd/mm/yy
.
The day and month can be "1" as well as "01",
"2" as well as "02" and so on.
The year must be two digits.
The automaton will not reject non-existant dates
such as "43/13/01".
It only looks at syntax.
Perhaps it verifies the correct form of input for
another program that does check for absurd dates.
Here is the automaton, but the transitions have not been labeled. Your job is to label them.
Not all browsers display the above diagram sensibly. If yours does, click on the buttons to see the correct labels.