9 writes to Ch
System.Text.RegularExpressions (9)
System\Text\RegularExpressions\RegexNode.cs (9)
61
Ch
= ch;
191
Ch
= '\0';
199
Ch
= '\0';
968
Ch
= RegexCharClass.SingletonChar(Str);
978
Ch
= RegexCharClass.SingletonChar(Str);
1448
node.
Ch
= '\0';
1462
node.
Ch
= node.Str[node.Str.Length - 1];
1862
nextNode.
Ch
= nextNode.Str[nextNode.Str.Length - 1];
3011
Ch
= '\0';
116 references to Ch
System.Text.RegularExpressions (116)
System\Text\RegularExpressions\RegexCompiler.cs (18)
3010
Ldc(node.
Ch
);
3611
(literal.Range.LowInclusive <= node.
Ch
&& node.
Ch
<= literal.Range.HighInclusive))) // for ranges, only allow when the range overlaps with the target, since there's no accelerated way to search for the union
3624
overlap = literal.String[0] == node.
Ch
;
3628
Ldc(node.
Ch
);
3634
Ldc(node.
Ch
);
3641
overlap = literal.SetChars.Contains(node.
Ch
);
3666
Ldc(node.
Ch
);
3674
EmitIndexOfAnyWithSearchValuesOrLiteral($"{node.
Ch
}{literal.SetChars}");
3680
overlap = literal.Range.LowInclusive == node.
Ch
;
3684
Ldc(node.
Ch
);
3690
Ldc(node.
Ch
);
3732
Ldc(node.
Ch
);
4232
EmitMultiCharString(new string(node.
Ch
, iterations), emitLengthChecksIfRequired, rtl);
4422
Ldc(node.
Ch
);
4537
Ldc(node.
Ch
);
4659
Ldc(node.
Ch
);
5186
Ldc(node.
Ch
);
System\Text\RegularExpressions\RegexNode.cs (72)
96
new RegexNode(Kind, Options,
Ch
);
198
Str = new string(
Ch
, N);
1138
prevCharClass.AddChar(prev.
Ch
);
1143
prevCharClass.AddNotChar(prev.
Ch
);
1152
prevCharClass.AddChar(at.
Ch
);
1156
prevCharClass.AddNotChar(at.
Ch
);
1247
required.
Ch
!= other.
Ch
||
1366
scratchChar[0] = startingNode.
Ch
;
1386
if (startingSpan[0] != startingNode.
Ch
)
1446
Debug.Assert(startingSpan[0] == node.
Ch
);
1509
return IsOneFamily ?
Ch
: Str![0];
1558
return new StartingLiteralData(range: (node.
Ch
, node.
Ch
), negated: false);
1561
return new StartingLiteralData(range: (node.
Ch
, node.
Ch
), negated: true);
1717
prev.Str = prev.
Ch
.ToString();
1721
((at.Kind == RegexNodeKind.One) ? $"{prev.Str}{at.
Ch
}" : prev.Str + at.Str) :
1722
((at.Kind == RegexNodeKind.One) ? $"{at.
Ch
}{prev.Str}" : at.Str + prev.Str);
1785
case RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Onelazy or RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic or RegexNodeKind.Notonelazy when nextNode.Kind == currentNode.Kind && currentNode.
Ch
== nextNode.
Ch
:
1811
case RegexNodeKind.Oneloop or RegexNodeKind.Onelazy when nextNode.Kind == RegexNodeKind.One && currentNode.
Ch
== nextNode.
Ch
:
1812
case RegexNodeKind.Notoneloop or RegexNodeKind.Notonelazy when nextNode.Kind == RegexNodeKind.Notone && currentNode.
Ch
== nextNode.
Ch
:
1830
currentNode.
Ch
== nextNode.Str![0]:
1835
while (matchingCharsInMulti < nextNode.Str.Length && currentNode.
Ch
== nextNode.Str[matchingCharsInMulti])
1879
case RegexNodeKind.One when (nextNode.Kind is RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Onelazy) && currentNode.
Ch
== nextNode.
Ch
:
1880
case RegexNodeKind.Notone when (nextNode.Kind is RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic or RegexNodeKind.Notonelazy) && currentNode.
Ch
== nextNode.
Ch
:
1894
case RegexNodeKind.Notone when nextNode.Kind == currentNode.Kind && currentNode.
Ch
== nextNode.
Ch
:
2354
case RegexNodeKind.One when node.
Ch
!= subsequent.
Ch
:
2355
case RegexNodeKind.Notone when node.
Ch
== subsequent.
Ch
:
2356
case RegexNodeKind.Set when !RegexCharClass.CharInClass(node.
Ch
, subsequent.Str!):
2357
case RegexNodeKind.Onelazy or RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic when subsequent.M > 0 && node.
Ch
!= subsequent.
Ch
:
2358
case RegexNodeKind.Notonelazy or RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic when subsequent.M > 0 && node.
Ch
== subsequent.
Ch
:
2359
case RegexNodeKind.Setlazy or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic when subsequent.M > 0 && !RegexCharClass.CharInClass(node.
Ch
, subsequent.Str!):
2360
case RegexNodeKind.Multi when node.
Ch
!= subsequent.Str![0]:
2362
case RegexNodeKind.EndZ or RegexNodeKind.Eol when node.
Ch
!= '\n':
2363
case RegexNodeKind.Boundary when node.M > 0 && RegexCharClass.IsBoundaryWordChar(node.
Ch
):
2364
case RegexNodeKind.NonBoundary when node.M > 0 && !RegexCharClass.IsBoundaryWordChar(node.
Ch
):
2365
case RegexNodeKind.ECMABoundary when node.M > 0 && RegexCharClass.IsECMAWordChar(node.
Ch
):
2366
case RegexNodeKind.NonECMABoundary when node.M > 0 && !RegexCharClass.IsECMAWordChar(node.
Ch
):
2369
case RegexNodeKind.Onelazy or RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic when subsequent.M == 0 && node.
Ch
!= subsequent.
Ch
:
2370
case RegexNodeKind.Notonelazy or RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic when subsequent.M == 0 && node.
Ch
== subsequent.
Ch
:
2371
case RegexNodeKind.Setlazy or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic when subsequent.M == 0 && !RegexCharClass.CharInClass(node.
Ch
, subsequent.Str!):
2384
case RegexNodeKind.One when node.
Ch
== subsequent.
Ch
:
2385
case RegexNodeKind.Onelazy or RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic when subsequent.M > 0 && node.
Ch
== subsequent.
Ch
:
2386
case RegexNodeKind.Multi when node.
Ch
== subsequent.Str![0]:
2390
case RegexNodeKind.Onelazy or RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic when subsequent.M == 0 && node.
Ch
== subsequent.
Ch
:
2403
case RegexNodeKind.One when !RegexCharClass.CharInClass(subsequent.
Ch
, node.Str!):
2405
case RegexNodeKind.Onelazy or RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic when subsequent.M > 0 && !RegexCharClass.CharInClass(subsequent.
Ch
, node.Str!):
2416
case RegexNodeKind.Onelazy or RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic when subsequent.M == 0 && !RegexCharClass.CharInClass(subsequent.
Ch
, node.Str!):
2450
case RegexNodeKind.One when !CharInStartingOrEndingSet(subsequent.
Ch
):
2452
case RegexNodeKind.Onelazy or RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic when subsequent.M > 0 && !CharInStartingOrEndingSet(subsequent.
Ch
):
2463
case RegexNodeKind.Onelazy or RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic when subsequent.M == 0 && !CharInStartingOrEndingSet(subsequent.
Ch
):
2864
if (child.
Ch
>= 128 ||
2865
RegexCharClass.ParticipatesInCaseConversion(child.
Ch
))
2870
vsb.Append(child.
Ch
);
3010
Str = new string(
Ch
, max);
3213
sb.Append(" '").Append(RegexCharClass.DescribeChar(
Ch
)).Append('\'');
System\Text\RegularExpressions\RegexNodeKind.cs (8)
16
/// <remarks>The character is specified in <see cref="RegexNode.
Ch
"/>.</remarks>
19
/// <remarks>The character is specified in <see cref="RegexNode.
Ch
"/>.</remarks>
31
/// The character is specified in <see cref="RegexNode.
Ch
"/>, the minimum number of iterations in <see cref="RegexNode.M"/>, and the maximum number of iterations in <see cref="RegexNode.N"/>.
36
/// <remarks>The character is specified in <see cref="RegexNode.
Ch
"/>, the minimum number of iterations in <see cref="RegexNode.M"/>, and the maximum number of iterations in <see cref="RegexNode.N"/>.</remarks>
45
/// <remarks>The character is specified in <see cref="RegexNode.
Ch
"/>, the minimum number of iterations in <see cref="RegexNode.M"/>, and the maximum number of iterations in <see cref="RegexNode.N"/>.</remarks>
49
/// <remarks>The character is specified in <see cref="RegexNode.
Ch
"/>, the minimum number of iterations in <see cref="RegexNode.M"/>, and the maximum number of iterations in <see cref="RegexNode.N"/>.</remarks>
59
/// The character is specified in <see cref="RegexNode.
Ch
"/>, the minimum number of iterations in <see cref="RegexNode.M"/>, and the maximum number of iterations in <see cref="RegexNode.N"/>.
65
/// The character is specified in <see cref="RegexNode.
Ch
"/>, the minimum number of iterations in <see cref="RegexNode.M"/>, and the maximum number of iterations in <see cref="RegexNode.N"/>.
System\Text\RegularExpressions\RegexPrefixAnalyzer.cs (11)
112
case RegexNodeKind.One or RegexNodeKind.Oneloop or RegexNodeKind.Onelazy or RegexNodeKind.Oneloopatomic when !ignoreCase || !RegexCharClass.ParticipatesInCaseConversion(node.
Ch
):
117
sb.Append(node.
Ch
, reps);
423
vsb.Append(node.
Ch
);
435
vsb.Append(node.
Ch
, count);
603
string setString = RegexCharClass.OneToStringClass(node.
Ch
);
611
string setString = RegexCharClass.OneToStringClass(node.
Ch
);
958
cc.AddChar(node.
Ch
);
967
if (node.
Ch
> 0)
970
cc.AddRange((char)0, (char)(node.
Ch
- 1));
972
if (node.
Ch
< char.MaxValue)
975
cc.AddRange((char)(node.
Ch
+ 1), char.MaxValue);
System\Text\RegularExpressions\RegexReplacement.cs (1)
55
vsb.Append(child.
Ch
);
System\Text\RegularExpressions\RegexWriter.cs (3)
383
Emit((RegexOpcode)node.Kind | bits, node.
Ch
);
395
RegexOpcode.Onerep : RegexOpcode.Notonerep) | bits, node.
Ch
, node.M);
399
Emit((RegexOpcode)node.Kind | bits, node.
Ch
, node.N == int.MaxValue ? int.MaxValue : node.N - node.M);
System\Text\RegularExpressions\Symbolic\RegexNodeConverter.cs (3)
58
result.AddLast(_builder.CreateSingleton(_builder._charSetSolver.CreateBDDFromChar(node.
Ch
)));
62
result.AddLast(_builder.CreateSingleton(_builder._solver.Not(_builder._charSetSolver.CreateBDDFromChar(node.
Ch
))));
112
BDD bdd = _builder._charSetSolver.CreateBDDFromChar(node.
Ch
);