Tagged non-deterministic finite-state automata