Attributes
- Companion
- enum
- Source
- Regex.scala
- Graph
-
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
Regex.type
Members list
Type members
Classlikes
Embeds the value's already-computed RegexEncoder.Encoded shape, reconstructed by RegexDecoder, instead of regenerating it through the public smart constructors (concat, alt, inter, star, unary_!, lookahead) at every call site - the same spirit as TokenMatcher's ToExpr embedding its DFA tables as plain data. The smart constructors exist to (re-)establish ACI normalization and merge Chars sets when building a tree from scratch; a Regex value reaching this given is already normalized, so re-running them at every macro call site - and again at every class load, since the generated code re-executes them - would just redo that work for a result that's already known. See RegexEncoder for why the encoding is flat data rather than nested constructor calls.
Embeds the value's already-computed RegexEncoder.Encoded shape, reconstructed by RegexDecoder, instead of regenerating it through the public smart constructors (concat, alt, inter, star, unary_!, lookahead) at every call site - the same spirit as TokenMatcher's ToExpr embedding its DFA tables as plain data. The smart constructors exist to (re-)establish ACI normalization and merge Chars sets when building a tree from scratch; a Regex value reaching this given is already normalized, so re-running them at every macro call site - and again at every class load, since the generated code re-executes them - would just redo that work for a result that's already known. See RegexEncoder for why the encoding is flat data rather than nested constructor calls.
Attributes
- Source
- Regex.scala
- Supertypes
- Self type
-
given_ToExpr_Regex.type
Inherited and Abstract types
The names of the product elements.
The name of the type.
Value members
Concrete methods
Alternation of a collection, preferring earlier elements - see Regex.Alt's doc comment. Builds flat straight into an AltBranches (order-preserving dedup, one pass) instead of .toVector.distinct followed by a separate .toSet later for equals/hashCode: the latter would build two different set-like views of the same elements where one suffices.
Alternation of a collection, preferring earlier elements - see Regex.Alt's doc comment. Builds flat straight into an AltBranches (order-preserving dedup, one pass) instead of .toVector.distinct followed by a separate .toSet later for equals/hashCode: the latter would build two different set-like views of the same elements where one suffices.
Attributes
- Source
- Regex.scala
Attributes
- Source
- Regex.scala
Smart constructor for a capturing group node - see Regex.Group. Unlike lookahead/ star/etc., this never collapses even when inner is Eps/Empty: the group's identity (its index/name existing at all) matters regardless of what it can match, e.g. (a?) is still a real, numbered group even though it can capture the empty string.
Smart constructor for a capturing group node - see Regex.Group. Unlike lookahead/ star/etc., this never collapses even when inner is Eps/Empty: the group's identity (its index/name existing at all) matters regardless of what it can match, e.g. (a?) is still a real, numbered group even though it can capture the empty string.
Attributes
- Source
- Regex.scala
Intersection of a collection.
Convenience: literal char.
Convenience: literal string, one character per code point (a surrogate pair is one character).
Convenience: literal string, one character per code point (a surrogate pair is one character).
Attributes
- Source
- Regex.scala
Zero-width lookahead assertion: Regex.lookahead(r, true) is (?=r), Regex.lookahead(r, false) is (?!r). Degenerates to Eps/Empty directly when r itself is Eps/Empty, since the assertion is then a constant regardless of context.
Zero-width lookahead assertion: Regex.lookahead(r, true) is (?=r), Regex.lookahead(r, false) is (?!r). Degenerates to Eps/Empty directly when r itself is Eps/Empty, since the assertion is then a constant regardless of context.
Attributes
- Source
- Regex.scala
Convenience: char range.
Concrete fields
All-strings regex Σ*.
Upper bound on quantifier bounds accepted by repeat. Repeat itself stays O(1) regardless of lo/hi (see repeat), but each Brzozowski derivative step through it (Subset.rawDerive) peels one repetition off, so exploring L(r{0,hi}) up to a fixed point (Subset.isEmpty/subset) still visits on the order of hi distinct states - an unbounded value would let a single malformed pattern blow up that exploration. Real-world token patterns never need bounds anywhere near this size.
Upper bound on quantifier bounds accepted by repeat. Repeat itself stays O(1) regardless of lo/hi (see repeat), but each Brzozowski derivative step through it (Subset.rawDerive) peels one repetition off, so exploring L(r{0,hi}) up to a fixed point (Subset.isEmpty/subset) still visits on the order of hi distinct states - an unbounded value would let a single malformed pattern blow up that exploration. Real-world token patterns never need bounds anywhere near this size.
Attributes
- Source
- Regex.scala
Givens
Givens
Embeds the value's already-computed RegexEncoder.Encoded shape, reconstructed by RegexDecoder, instead of regenerating it through the public smart constructors (concat, alt, inter, star, unary_!, lookahead) at every call site - the same spirit as TokenMatcher's ToExpr embedding its DFA tables as plain data. The smart constructors exist to (re-)establish ACI normalization and merge Chars sets when building a tree from scratch; a Regex value reaching this given is already normalized, so re-running them at every macro call site - and again at every class load, since the generated code re-executes them - would just redo that work for a result that's already known. See RegexEncoder for why the encoding is flat data rather than nested constructor calls.
Embeds the value's already-computed RegexEncoder.Encoded shape, reconstructed by RegexDecoder, instead of regenerating it through the public smart constructors (concat, alt, inter, star, unary_!, lookahead) at every call site - the same spirit as TokenMatcher's ToExpr embedding its DFA tables as plain data. The smart constructors exist to (re-)establish ACI normalization and merge Chars sets when building a tree from scratch; a Regex value reaching this given is already normalized, so re-running them at every macro call site - and again at every class load, since the generated code re-executes them - would just redo that work for a result that's already known. See RegexEncoder for why the encoding is flat data rather than nested constructor calls.
Attributes
- Source
- Regex.scala
Extensions
Extensions
Attributes
- Source
- Regex.scala