fn parse_gate(line: &str) -> IResult<&str, (Gate, String), ()>