INTERNALS · SCANNING
Matcher
Anchor index
Programs sharing an anchor also share automaton state and hit lists. Anchor selection favors long, rare surface forms without reducing candidate coverage.
NFC and NFD variants are separate byte patterns linked to the same logical program and source-span projection.
Candidate window
Only a bounded window in which the core can begin and end is inspected around a hit. Particle and ending automata transition over suffix scalars and reject incomplete consumption.
The structural verifier consults the compact index only when a whole-token analysis is required.
Match selection
When several programs succeed at one start, the completed-token length and deterministic program keys produce non-overlapping results while preserving all origins.
Phrase mode retains atom candidates before applying order and gap. This prevents the longest single-atom match from hiding the next atom.
A disjunction places all alternative anchors in one atom matcher, so the source is not rescanned for each alternative.