I've done semi-automat.

I hope it work correct in all of cases.
I've added Automat to GUI and wrote some doc comments.
Merge pull request #1 from MikeKPI/MPA

I've done PDA (push down automaton).