Regex module

Dfa

structSource

Fields

program: *Program
null for a DFA that was built completely at compile time
reverse: bool
match_all: bool
keep going after a match (the reverse DFA wants the leftmost start)
stride: int
byte classes + 1; the last column is the end of the text
byte_class: [256] u8
trans: [] u32
[state * stride + class]; states are stored premultiplied by stride
starts: [START_COUNT] u32
by START_INDEX(side, anchored)
skips: [START_COUNT] Skip
per unanchored start: how to jump over bytes that stay in it
rows: [..] u32
Only while building:
lists: [..] u32
every state's instructions, back to back
list_start: [..] u32
per state
list_count: [..] u32
left: [..] u8
per state: the kind of byte before it (for unresolved looks)
known: Table(string, u32)
resolved: [..] u32
next: [..] u32
stack: [..] u32
mark_a: [] u32
mark_b: [] u32
generation: u32
state_limit: int
gave_up: bool
unicode_word: bool
The program has a Unicode \b, which needs to see whole characters: a non-ASCII byte's column holds QUIT, and the search decodes the text there and steps through one of the CHARACTER_COLUMNS copies of the byte's column instead, which says whether a word character starts at the byte and whether one ends with it.
classes: int

See also