48 references to CharKind
System.Text.RegularExpressions (48)
System\Text\RegularExpressions\Symbolic\MatchingState.cs (8)
52
/// this will always be set to <see cref="
CharKind
.General"/>, which can reduce the number of states created.
77
Debug.Assert(
CharKind
.IsValidCharKind(nextCharKind));
78
uint context =
CharKind
.Context(PrevCharKind, nextCharKind);
95
uint context =
CharKind
.Context(PrevCharKind, nextCharKind);
111
uint context =
CharKind
.Context(PrevCharKind, nextCharKind);
125
Debug.Assert(nextCharKind is >= 0 and <
CharKind
.CharKindCount);
159
for (uint charKind = 0; charKind <
CharKind
.CharKindCount; charKind++)
161
nullabilityInfo |= (byte)(node.IsNullableFor(
CharKind
.Context(PrevCharKind, charKind)) ? 1 << (int)charKind : 0);
System\Text\RegularExpressions\Symbolic\SymbolicRegexBuilder.cs (2)
73
/// Caches nullability of this node for any given context (0 <= context < <see cref="
CharKind
.ContextLimit"/>)
78
info.StartsWithSomeAnchor && info.CanBeNullable ? new byte[
CharKind
.ContextLimit] : null;
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
219
int statesCount = patternInfo.ContainsSomeAnchor ?
CharKind
.CharKindCount : 1;
222
Debug.Assert(
CharKind
.General == 0);
252
_initialStateId = _dotstarredInitialStates[
CharKind
.General].Id;
276
return
CharKind
.BeginningEnd;
283
return
CharKind
.NewLineS;
292
return
CharKind
.Newline;
298
return
CharKind
.WordLetter;
303
return
CharKind
.General;
336
CharKind
.General : // The previous character kind is irrelevant when anchors are not used.
1091
CharKind
.Context(endState.PrevCharKind, GetCharKind(input, iEnd)), (Registers: endRegisters, Pos: iEnd));
System\Text\RegularExpressions\Symbolic\SymbolicRegexNode.cs (27)
397
Debug.Assert(context <
CharKind
.ContextLimit);
428
is_nullable =
CharKind
.Prev(context) ==
CharKind
.BeginningEnd;
432
is_nullable =
CharKind
.Next(context) ==
CharKind
.BeginningEnd;
438
is_nullable = (
CharKind
.Prev(context) &
CharKind
.NewLineS) != 0;
444
is_nullable = (
CharKind
.Next(context) &
CharKind
.NewLineS) != 0;
449
is_nullable = ((
CharKind
.Prev(context) &
CharKind
.WordLetter) ^ (
CharKind
.Next(context) &
CharKind
.WordLetter)) != 0;
454
is_nullable = ((
CharKind
.Prev(context) &
CharKind
.WordLetter) ^ (
CharKind
.Next(context) &
CharKind
.WordLetter)) == 0;
460
is_nullable = (
CharKind
.Next(context) &
CharKind
.BeginningEnd) != 0;
479
is_nullable = (
CharKind
.Prev(context) &
CharKind
.BeginningEnd) != 0;
2312
return prevKind ==
CharKind
.BeginningEnd ?
2317
return ((prevKind &
CharKind
.BeginningEnd) != 0) ?
2322
return (prevKind ==
CharKind
.WordLetter ? contWithNWL : contWithWL) ?
2329
return (prevKind ==
CharKind
.WordLetter ? contWithWL : contWithNWL) ?
2434
/// is #(this) if there are no anchors else <see cref="
CharKind
.CharKindCount"/>x#(this).
2437
internal int EstimateNfaSize() => Times(_info.ContainsSomeAnchor ?
CharKind
.CharKindCount : 1, Sum(1, CountSingletons()));