materializeRegexGroups groups constructs a mapping that associates each capture group's tag
with the start/end positions of the last appearance of the capture group in the input string.
Equations
- Regex.Strategy.materializeRegexGroups Regex.Data.CaptureGroups.empty x✝ = none
- Regex.Strategy.materializeRegexGroups (Regex.Data.CaptureGroups.group tag first last groups) x✝ = if tag = x✝ then some (first, last) else Regex.Strategy.materializeRegexGroups groups x✝
- Regex.Strategy.materializeRegexGroups (g₁.concat g₂) x✝ = (Regex.Strategy.materializeRegexGroups g₂ x✝ <|> Regex.Strategy.materializeRegexGroups g₁ x✝)
Instances For
def
Regex.Strategy.materializeUpdatesAux
{s : String}
(n : Nat)
(accum : Vector s.ValidPosPlusOne n)
:
Equations
- Regex.Strategy.materializeUpdatesAux n accum [] = accum
- Regex.Strategy.materializeUpdatesAux n accum ((offset, pos) :: rest) = Regex.Strategy.materializeUpdatesAux n (accum.setIfInBounds offset (String.ValidPosPlusOne.validPos pos)) rest
Instances For
materializeUpdates n updates constructs a buffer of size n which interprets the updates list
as the writes to the buffer. When the same offset appears multiple times in the list, the last
one wins.
Equations
- Regex.Strategy.materializeUpdates n updates = Regex.Strategy.materializeUpdatesAux n (Vector.replicate n (String.ValidPosPlusOne.sentinel s)) updates
Instances For
Equations
- Regex.Strategy.equivPos (some p_2) p' = (p' = String.ValidPosPlusOne.validPos p_2)
- Regex.Strategy.equivPos none p' = (p' = String.ValidPosPlusOne.sentinel s)
Instances For
@[simp]
@[simp]
@[simp]
@[simp]