53 references to CharKind
System.Text.RegularExpressions (53)
System\Text\RegularExpressions\Symbolic\MatchingState.cs (9)
34
/// this will always be set to <see cref="
CharKind
.General"/>, which can reduce the number of states created.
59
Debug.Assert(
CharKind
.IsValidCharKind(nextCharKind));
60
uint context =
CharKind
.Context(PrevCharKind, nextCharKind);
77
uint context =
CharKind
.Context(PrevCharKind, nextCharKind);
93
uint context =
CharKind
.Context(PrevCharKind, nextCharKind);
107
Debug.Assert(nextCharKind is >= 0 and <
CharKind
.CharKindCount);
162
for (uint charKind = 0; charKind <
CharKind
.CharKindCount; charKind++)
164
nullabilityInfo |= (byte)(Node.IsNullableFor(
CharKind
.Context(PrevCharKind, charKind)) ? 1 << (int)charKind : 0);
179
$"({
CharKind
.DescribePrev(PrevCharKind)},{Node})";
System\Text\RegularExpressions\Symbolic\SymbolicRegexMatcher.cs (11)
117
/// Character kinds <see cref="
CharKind
"/> for all minterms in <see cref="_minterms"/> as well as two special
218
int statesCount = _pattern._info.ContainsSomeAnchor ?
CharKind
.CharKindCount : 1;
221
Debug.Assert(
CharKind
.General == 0);
251
_initialStateId = _dotstarredInitialStates[
CharKind
.General].Id;
275
return
CharKind
.BeginningEnd;
282
return
CharKind
.NewLineS;
291
return
CharKind
.Newline;
297
return
CharKind
.WordLetter;
302
return
CharKind
.General;
335
CharKind
.General : // The previous character kind is irrelevant when anchors are not used.
1088
CharKind
.Context(endState.PrevCharKind, GetCharKind(input, iEnd)), (Registers: endRegisters, Pos: iEnd));
System\Text\RegularExpressions\Symbolic\SymbolicRegexMatcher.Dgml.cs (1)
33
string info =
CharKind
.DescribePrev(state.PrevCharKind);
System\Text\RegularExpressions\Symbolic\SymbolicRegexMatcher.Sample.cs (4)
90
if (flags.IsNullable() || SymbolicRegexMatcher<TSet>.NfaStateHandler.IsNullableFor(this, in statesWrapper,
CharKind
.BeginningEnd))
96
if (SymbolicRegexMatcher<TSet>.NfaStateHandler.IsNullableFor(this, in statesWrapper,
CharKind
.Newline))
102
if (SymbolicRegexMatcher<TSet>.NfaStateHandler.IsNullableFor(this, in statesWrapper,
CharKind
.WordLetter))
108
if (SymbolicRegexMatcher<TSet>.NfaStateHandler.IsNullableFor(this, in statesWrapper,
CharKind
.General))
System\Text\RegularExpressions\Symbolic\SymbolicRegexNode.cs (28)
71
_nullabilityCache = info.StartsWithSomeAnchor && info.CanBeNullable ? new byte[
CharKind
.ContextLimit] : null;
244
Debug.Assert(context <
CharKind
.ContextLimit);
273
is_nullable =
CharKind
.Prev(context) ==
CharKind
.BeginningEnd;
277
is_nullable =
CharKind
.Next(context) ==
CharKind
.BeginningEnd;
283
is_nullable = (
CharKind
.Prev(context) &
CharKind
.NewLineS) != 0;
289
is_nullable = (
CharKind
.Next(context) &
CharKind
.NewLineS) != 0;
294
is_nullable = ((
CharKind
.Prev(context) &
CharKind
.WordLetter) ^ (
CharKind
.Next(context) &
CharKind
.WordLetter)) != 0;
299
is_nullable = ((
CharKind
.Prev(context) &
CharKind
.WordLetter) ^ (
CharKind
.Next(context) &
CharKind
.WordLetter)) == 0;
305
is_nullable = (
CharKind
.Next(context) &
CharKind
.BeginningEnd) != 0;
324
is_nullable = (
CharKind
.Prev(context) &
CharKind
.BeginningEnd) != 0;
2093
return prevKind ==
CharKind
.BeginningEnd ?
2098
return ((prevKind &
CharKind
.BeginningEnd) != 0) ?
2103
return (prevKind ==
CharKind
.WordLetter ? contWithNWL : contWithWL) ?
2110
return (prevKind ==
CharKind
.WordLetter ? contWithWL : contWithNWL) ?
2256
/// is #(this) if there are no anchors else <see cref="
CharKind
.CharKindCount"/>x#(this).
2259
internal int EstimateNfaSize() => Times(_info.ContainsSomeAnchor ?
CharKind
.CharKindCount : 1, Sum(1, CountSingletons()));