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