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

Function is_char_element

common/grammar-parser.cpp:297–305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

295 }
296
297 static bool is_char_element(llama_grammar_element elem) {
298 switch (elem.type) {
299 case LLAMA_GRETYPE_CHAR: return true;
300 case LLAMA_GRETYPE_CHAR_NOT: return true;
301 case LLAMA_GRETYPE_CHAR_ALT: return true;
302 case LLAMA_GRETYPE_CHAR_RNG_UPPER: return true;
303 default: return false;
304 }
305 }
306
307 static void print_rule_binary(FILE * file, const std::vector<llama_grammar_element> & rule) {
308 for (auto elem : rule) {

Callers 1

print_ruleFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected