Subset
Attributes
- Source
- Subset.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Subset.type
Members list
Type members
Classlikes
Attributes
- Source
- Subset.scala
- Supertypes
- Self type
-
given_ToExpr_Subset.type
Value members
Concrete methods
Lifts an existing Regex into Subset, erasing every Regex.Group wrapper it contains along the way (Regex.Group's own doc comment covers why that's a safe, language-preserving transform: L(Group(_, _, inner)) = L(inner) exactly). Capturing groups matter to code that walks a Regex tree directly (the parser, a future capture-span extractor) - they're invisible to every containment/matching question this type answers, so there's no reason for any of rawDerive/stripStartAnchor/hasLeadingLook below to know Group exists at all, and erasing here guarantees they never have to find out.
Lifts an existing Regex into Subset, erasing every Regex.Group wrapper it contains along the way (Regex.Group's own doc comment covers why that's a safe, language-preserving transform: L(Group(_, _, inner)) = L(inner) exactly). Capturing groups matter to code that walks a Regex tree directly (the parser, a future capture-span extractor) - they're invisible to every containment/matching question this type answers, so there's no reason for any of rawDerive/stripStartAnchor/hasLeadingLook below to know Group exists at all, and erasing here guarantees they never have to find out.
Attributes
- Source
- Subset.scala
Parses a pattern into a Subset.
Concrete fields
The empty-language subset; reference-equal to Regex.Empty under the opaque type.
The empty-language subset; reference-equal to Regex.Empty under the opaque type.
Attributes
- Source
- Subset.scala
Givens
Givens
Attributes
- Source
- Subset.scala
Extensions
Extensions
Brzozowski derivative of a with respect to code point c. Wrapped with stripStartAnchor: whatever rawDerive returns represents "having consumed c from a", meaning at least one character has now been consumed somewhere in the whole match, so any ^/\A reachable in that raw result — even one that was never itself touched by this step, e.g. because it sat untouched inside an undivided sibling — has to die. See stripStartAnchor's doc for why this can't be handled locally the way Look is.
Brzozowski derivative of a with respect to code point c. Wrapped with stripStartAnchor: whatever rawDerive returns represents "having consumed c from a", meaning at least one character has now been consumed somewhere in the whole match, so any ^/\A reachable in that raw result — even one that was never itself touched by this step, e.g. because it sat untouched inside an undivided sibling — has to die. See stripStartAnchor's doc for why this can't be handled locally the way Look is.
Attributes
- Source
- Subset.scala
true iff L(a) = ∅.
Like isEmpty, but fails fast with Left(StateSpaceLimitExceeded(maxStates)) the moment the BFS would need to have visited more than maxStates distinct derivative states to keep going, instead of exploring an unbounded number of them. Opt-in guard for callers deciding emptiness/subset (see subsetBounded) of a pattern that may come from untrusted input - see StateSpaceLimitExceeded.
Like isEmpty, but fails fast with Left(StateSpaceLimitExceeded(maxStates)) the moment the BFS would need to have visited more than maxStates distinct derivative states to keep going, instead of exploring an unbounded number of them. Opt-in guard for callers deciding emptiness/subset (see subsetBounded) of a pattern that may come from untrusted input - see StateSpaceLimitExceeded.
Attributes
- Source
- Subset.scala
true iff ε ∈ L(a).
true iff L(a) ⊆ L(b) and L(a) ≠ L(b).
true iff L(a) ⊆ L(b).
Like subset, but fails fast with StateSpaceLimitExceeded instead of letting the underlying isEmptyBounded BFS visit more than maxStates distinct derivative states - see StateSpaceLimitExceeded for why that matters on untrusted patterns.
Like subset, but fails fast with StateSpaceLimitExceeded instead of letting the underlying isEmptyBounded BFS visit more than maxStates distinct derivative states - see StateSpaceLimitExceeded for why that matters on untrusted patterns.
Attributes
- Source
- Subset.scala
Underlying Regex.
Σ*-extended view — matches every string having a as prefix.