state-based parser for multi-valued set selector syntax