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

Function generate_symbol_id

common/grammar-parser.cpp:33–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31 }
32
33 static uint32_t generate_symbol_id(parse_state & state, const std::string & base_name) {
34 uint32_t next_id = static_cast<uint32_t>(state.symbol_ids.size());
35 state.symbol_ids[base_name + '_' + std::to_string(next_id)] = next_id;
36 return next_id;
37 }
38
39 static void add_rule(
40 parse_state & state,

Callers 2

parse_sequenceMethod · 0.85
parse_sequenceFunction · 0.85

Calls 2

to_stringFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected