A Second Course in Formal Languages and Automata Theory by Jeffrey Shallit