MCPcopy Create free account
hub / github.com/antirez/llama.cpp-deepseek-v4-flash / rule

Method rule

common/peg-parser.cpp:1230–1235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1228}
1229
1230common_peg_parser common_peg_parser_builder::rule(const std::string & name, const common_peg_parser & p, bool trigger) {
1231 auto clean_name = rule_name(name);
1232 auto rule_id = arena_.add_parser(common_peg_rule_parser{clean_name, p.id(), trigger});
1233 arena_.add_rule(clean_name, rule_id);
1234 return ref(clean_name);
1235}
1236
1237common_peg_parser common_peg_parser_builder::rule(const std::string & name, const std::function<common_peg_parser()> & builder_fn, bool trigger) {
1238 auto clean_name = rule_name(name);

Callers 15

test_example_qwen3_coderFunction · 0.80
test_prefix_tool_namesFunction · 0.80
test_python_dict_parserFunction · 0.80
test_basicFunction · 0.80
test_gbnf_generationFunction · 0.80
parse_ini_from_fileFunction · 0.80
build_parserMethod · 0.80

Calls 5

rule_nameFunction · 0.85
add_parserMethod · 0.80
has_ruleMethod · 0.80
idMethod · 0.45
add_ruleMethod · 0.45

Tested by 7

test_example_qwen3_coderFunction · 0.64
test_prefix_tool_namesFunction · 0.64
test_python_dict_parserFunction · 0.64
test_basicFunction · 0.64
test_gbnf_generationFunction · 0.64