MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / CBMAutomaton

Class CBMAutomaton

internal/cbm/ac.c:34–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32#define DECOMP_BUF_ALIGN_MASK 0xFFFF
33
34struct CBMAutomaton {
35 int num_states;
36 int num_patterns;
37 int alpha_size; // 256 for raw byte, or smaller for mapped alphabet
38 uint8_t alpha_map[CBM_AC_BYTE_RANGE]; // byte → mapped index (identity if alpha_size==256)
39 int *go_table; // [num_states * alpha_size] — pre-computed transitions
40 uint64_t *output; // [num_states] — bitmask of matching pattern IDs
41 int *output_list; // [num_states] — linked list: pattern ID or -1
42 int *output_next; // [num_states] — next pointer for output_list chain
43};
44
45// ─── Build ─────────────────────────────────────────────────────────────────
46

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected