A step taken during the traversal of a Slice by a forward or backward searcher.
- rejected
{s : Slice}
(startPos endPos : s.Pos)
: SearchStep s
The subslice starting at
startPosand ending atendPosdid not match the pattern. - matched
{s : Slice}
(startPos endPos : s.Pos)
: SearchStep s
The subslice starting at
startPosand ending atendPosdid not match the pattern.
Instances For
Provides a conversion from a pattern to an iterator of SearchStep that searches for matches
of the pattern from the start towards the end of a Slice.
Builds an iterator of
SearchStepcorresponding to matches ofpatalong the slices. TheSearchSteps returned by this iterator must contain ranges that are adjacent, non-overlapping and cover all ofs.
Instances
Provides simple pattern matching capabilities from the start of a Slice.
While these operations can be implemented on top of ToForwardSearcher some patterns allow
for more efficient implementations. This class can be used to specialize for them. If there is no
need to specialize in this fashion, then
ForwardPattern.defaultImplementation can be used
to automatically derive an instance.
Checks whether the slice starts with the pattern.
Checks whether the slice starts with the pattern. If it does, the slice is returned with the prefix removed; otherwise the result is
none.
Instances
Equations
- String.Slice.Pattern.Internal.memcmp lhs rhs lstart rstart len h1 h2 = String.Slice.Pattern.Internal.memcmp.go✝ lhs rhs lstart rstart len h1 h2 0
Instances For
Tries to skip the searcher until the next SearchStep.matched and return it. If no
match is found until the end returns none.
Equations
Instances For
Tries to skip the searcher until the next SearchStep.rejected and return it. If no
reject is found until the end returns none.
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Provides a conversion from a pattern to an iterator of SearchStep searching for matches of
the pattern from the end towards the start of a Slice.
Build an iterator of
SearchStepcorresponding to matches ofpatalong the slices. TheSearchSteps returned by this iterator must contain ranges that are adjacent, non-overlapping and cover all ofs.
Instances
Provides simple pattern matching capabilities from the end of a Slice.
While these operations can be implemented on top of ToBackwardSearcher, some patterns allow
for more efficient implementations. This class can be used to specialize for them. If there is no
need to specialize in this fashion, then
BackwardPattern.defaultImplementation can be
used to automatically derive an instance.
Checks whether the slice ends with the pattern.
Checks whether the slice ends with the pattern. If it does, the slice is returned with the suffix removed; otherwise the result is
none.
Instances
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.