MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / print_grammar_char

Function print_grammar_char

common/grammar-parser.cpp:288–295  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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) {

Callers 2

print_rule_binaryFunction · 0.70
print_ruleFunction · 0.70

Calls 1

fprintfFunction · 0.85

Tested by

no test coverage detected