swift prefix-automaton maker