| 136 | }; |
| 137 | |
| 138 | std::vector<CylinderHead> parseCylinderHeadsString(const std::string& s) |
| 139 | { |
| 140 | auto input = lexy::string_input(s); |
| 141 | auto result = lexy::parse<grammar::chs>(input, error_collector()); |
| 142 | if (result.is_error()) |
| 143 | { |
| 144 | error(fmt::format("track descriptor parse error: {}", |
| 145 | fmt::join(result.errors(), "; "))); |
| 146 | } |
| 147 | |
| 148 | std::vector<CylinderHead> results = result.value(); |
| 149 | std::sort(results.begin(), results.end()); |
| 150 | return results; |
| 151 | } |
| 152 | |
| 153 | std::string convertCylinderHeadsToString(const std::vector<CylinderHead>& chs) |
| 154 | { |