fn parse_group<'a>( input: &'a str, mask: &mut impl FnMut(&'a str) -> u32, ) -> Vec<Group>
Parsing the input relatively cleanly is a challenge by itself.