let
add_state (n : nfa) (s : state) : unit =
add n.q s;
n.next_q <- max n.next_q (s + 1)