Here is an automaton to recognize Ada identifiers.

M = (Q, , , q0, F), where

- Q is {q0, q1, q2, q3},
- is {letter, digit, underline},
- is given by
(q0, letter) = q1 (q1, letter) = q1 (q0, digit) = q3 (q1, digit) = q1 (q0, underline) = q3 (q1, underline) = q2 (q2, letter) = q1 (q3, letter) = q3 (q2, digit) = q1 (q3, digit) = q3 (q2, underline) = q3 (q3, underline) = q3

- q0 Q is
the
*initial state,* - {q1}
Q is a set of
*final states.*

Copyright © 1996 by David Matuszek

Last modified Jan 29, 1996