| 286 | } |
| 287 | |
| 288 | static void print_grammar_char(FILE * file, uint32_t c) { |
| 289 | if (0x20 <= c && c <= 0x7f) { |
| 290 | fprintf(file, "%c", static_cast<char>(c)); |
| 291 | } else { |
| 292 | // cop out of encoding UTF-8 |
| 293 | fprintf(file, "<U+%04X>", c); |
| 294 | } |
| 295 | } |
| 296 | |
| 297 | static bool is_char_element(llama_grammar_element elem) { |
| 298 | switch (elem.type) { |
no test coverage detected