nfa for choose, repeat patterns