Regular expressions to NFA conversion