Formal Languages and Automata Theory