A state marks a stage
q₀ means that no a has been read. q₁ means at least one a has been read: another a keeps the machine there, while b moves it to q₂. q₂ is the accepting state. Any further character is rejected.
Acceptance depends on the complete input. Passing through an accepting state midway through a longer string does not make the whole string valid.
What this experiment covers
This is a hand-defined deterministic finite automaton. Regular-expression parsing, NFA conversion, and a complete lexer are possible next steps.