Implementation of basic finite automata concepts