grammar; pub PathList: Vec<&'input str> = { => { Vec::new() }, COLON)*> => { left.push(right); left }, }; pub PathListAllowingEmptyPaths: Vec<&'input str> = { => vec![""], Path => vec![<>], COLON => { left.push(""); left }, COLON => { left.push(right); left }, } pub Path: &'input str = { , } // Whitespace is not allowed. match { r"[^z:/]+" => PATH_COMPONENT, r"/" => SLASH, ":" => COLON, }