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

Method sequence

common/peg-parser.cpp:1157–1169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1155common_peg_parser_builder::common_peg_parser_builder() {}
1156
1157common_peg_parser common_peg_parser_builder::sequence(const std::vector<common_peg_parser_id> & parsers) {
1158 // Flatten nested sequences
1159 std::vector<common_peg_parser_id> flattened;
1160 for (const auto & p : parsers) {
1161 const auto & parser = arena_.get(p);
1162 if (auto seq = std::get_if<common_peg_sequence_parser>(&parser)) {
1163 flattened.insert(flattened.end(), seq->children.begin(), seq->children.end());
1164 } else {
1165 flattened.push_back(p);
1166 }
1167 }
1168 return wrap(arena_.add_parser(common_peg_sequence_parser{flattened}));
1169}
1170
1171common_peg_parser common_peg_parser_builder::sequence(const std::vector<common_peg_parser> & parsers) {
1172 std::vector<common_peg_parser_id> ids;

Callers 9

test_example_nativeFunction · 0.45
test_example_qwen3_coderFunction · 0.45
test_python_dict_parserFunction · 0.45
test_unicodeFunction · 0.45
peg-parser.cppFile · 0.45
operator+Method · 0.45
operator<<Method · 0.45

Calls 8

endMethod · 0.80
add_parserMethod · 0.80
getMethod · 0.45
insertMethod · 0.45
beginMethod · 0.45
push_backMethod · 0.45
sizeMethod · 0.45
idMethod · 0.45

Tested by 5

test_example_nativeFunction · 0.36
test_example_qwen3_coderFunction · 0.36
test_python_dict_parserFunction · 0.36
test_unicodeFunction · 0.36