MCPcopy Create free account
hub / github.com/dlclark/regexp2 / DispatchTable

Struct DispatchTable

syntax/code.go:138–143  ·  view source on GitHub ↗

DispatchTable maps disjoint character sets to branch indices. Larger tables use a direct ASCII lookup, small tables use compact masks, and non-ASCII runes inspect the full sets.

Source from the content-addressed store, hash-verified

136// use a direct ASCII lookup, small tables use compact masks, and non-ASCII
137// runes inspect the full sets.
138type DispatchTable struct {
139 Sets []int
140 Branches []int
141 ASCII *[128]uint16 // entry index + 1; zero means no branch
142 ASCIIMasks []uint64 // two membership words per branch when ASCII is nil
143}
144
145// captureSlotsInUse returns the capture slots whose values can affect matching.
146// Group 0 is always retained as the success marker. Ordinary captures that are

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected