11 writes to N
System.Text.RegularExpressions (11)
System\Text\RegularExpressions\RegexNode.cs (11)
83
N
= n;
99
newNode.
N
= N == int.MaxValue ? int.MaxValue : N - 1;
154
N
= max;
172
N
= M;
188
M =
N
= 0;
492
node.
N
= node.M;
831
u.
N
= max = ((int.MaxValue - 1) / u.N < max) ? int.MaxValue : u.N * max;
1683
currentNode.
N
= nextNode.N == int.MaxValue ? int.MaxValue : currentNode.N + nextNode.N;
1697
currentNode.
N
++;
1724
currentNode.
N
+= matchingCharsInMulti;
1764
currentNode.
N
= nextNode.N == int.MaxValue ? int.MaxValue : nextNode.N + 1;
86 references to N
System.Text.RegularExpressions (86)
System\Text\RegularExpressions\RegexCompiler.cs (1)
1250
Debug.Assert(target.LoopNode.
N
== int.MaxValue);
System\Text\RegularExpressions\RegexFindOptimizations.cs (1)
793
Debug.Assert(loopNode.
N
== int.MaxValue);
System\Text\RegularExpressions\RegexNode.cs (44)
99
newNode.N =
N
== int.MaxValue ? int.MaxValue :
N
- 1;
173
if (
N
== 0)
181
else if (Kind == RegexNodeKind.Oneloopatomic &&
N
is >= 2 and <= MultiVsRepeaterLimit)
186
Str = new string(Ch,
N
);
384
case RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic or RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic when node.
N
== int.MaxValue:
385
case RegexNodeKind.Onelazy or RegexNodeKind.Notonelazy or RegexNodeKind.Setlazy when node.
N
== int.MaxValue && !atomicByAncestry:
496
if (node.
N
== 1)
773
int max =
N
;
817
if (u.M == 0 && child.M > 1 || child.
N
< child.M * 2)
829
if (u.
N
> 0)
831
u.N = max = ((int.MaxValue - 1) / u.
N
< max) ? int.MaxValue : u.
N
* max;
852
child.MakeRep(u.Kind == RegexNodeKind.Lazyloop ? RegexNodeKind.Onelazy : RegexNodeKind.Oneloop, u.M, u.
N
);
1109
case RegexNodeKind.Oneloop or RegexNodeKind.Notoneloop or RegexNodeKind.Setloop or RegexNodeKind.Onelazy or RegexNodeKind.Notonelazy or RegexNodeKind.Setlazy when required.M == required.
N
:
1124
required.
N
!= other.
N
||
1675
if (!CanCombineCounts(currentNode.M, currentNode.
N
, nextNode.M, nextNode.
N
))
1681
if (currentNode.
N
!= int.MaxValue)
1683
currentNode.N = nextNode.
N
== int.MaxValue ? int.MaxValue : currentNode.
N
+ nextNode.
N
;
1692
if (CanCombineCounts(currentNode.M, currentNode.
N
, 1, 1))
1695
if (currentNode.
N
!= int.MaxValue)
1718
if (CanCombineCounts(currentNode.M, currentNode.
N
, matchingCharsInMulti, matchingCharsInMulti))
1722
if (currentNode.
N
!= int.MaxValue)
1760
if (CanCombineCounts(1, 1, nextNode.M, nextNode.
N
))
1764
currentNode.N = nextNode.
N
== int.MaxValue ? int.MaxValue : nextNode.
N
+ 1;
2389
return
N
== int.MaxValue ? null :
N
;
2392
if (
N
!= int.MaxValue)
2397
long maxLength = (long)
N
* childMaxLength;
2555
(child.Kind is RegexNodeKind.Setloop or RegexNodeKind.Setlazy or RegexNodeKind.Setloopatomic && child.M == child.
N
))
2641
when node.M == node.
N
=> true,
2902
if (
N
!= -1)
2904
sb.Append($", unindex = {
N
}");
2941
(M == 0 &&
N
== int.MaxValue) ? "*" :
2942
(M == 0 &&
N
== 1) ? "?" :
2943
(M == 1 &&
N
== int.MaxValue) ? "+" :
2944
(
N
== int.MaxValue) ? $"{{{M}, *}}" :
2945
(
N
== M) ? $"{{{M}}}" :
2946
$"{{{M}, {
N
}}}");
System\Text\RegularExpressions\RegexNodeKind.cs (12)
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>
40
/// <remarks>The <see cref="RegexCharClass"/> set string is specified in <see cref="RegexNode.Str"/>, 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>
53
/// <remarks>The <see cref="RegexCharClass"/> set string is specified in <see cref="RegexNode.Str"/>, 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
"/>.
71
/// The <see cref="RegexCharClass"/> set string is specified in <see cref="RegexNode.Str"/>, the minimum number of iterations in <see cref="RegexNode.M"/>, and the maximum number of iterations in <see cref="RegexNode.
N
"/>.
129
/// and the maximum number of iterations is in <see cref="RegexNode.
N
"/>.
135
/// and the maximum number of iterations is in <see cref="RegexNode.
N
"/>.
142
/// group, <see cref="RegexNode.
N
"/> is the uncapture.
System\Text\RegularExpressions\RegexPrefixAnalyzer.cs (9)
119
return node.Kind is RegexNodeKind.One || reps == node.
N
;
209
return node.Kind is RegexNodeKind.Set || reps == node.
N
;
236
return limit == node.
N
;
436
return count == node.
N
&& !rtl;
450
return limit == node.
N
&& !rtl;
618
return i == node.M && i == node.
N
;
649
return i == node.M && i == node.
N
;
658
case RegexNodeKind.Notonelazy or RegexNodeKind.Notoneloop or RegexNodeKind.Notoneloopatomic when node.M == node.
N
:
1135
if (firstChild.Kind is not (RegexNodeKind.Setloop or RegexNodeKind.Setloopatomic or RegexNodeKind.Setlazy) || firstChild.
N
!= int.MaxValue)
System\Text\RegularExpressions\RegexTreeAnalyzer.cs (3)
50
case RegexNodeKind.Loop or RegexNodeKind.Lazyloop when node.M != node.
N
:
51
case RegexNodeKind.Oneloop or RegexNodeKind.Notoneloop or RegexNodeKind.Setloop or RegexNodeKind.Onelazy or RegexNodeKind.Notonelazy or RegexNodeKind.Setlazy when node.M != node.
N
:
111
RegexNodeKind.Loop or RegexNodeKind.Lazyloop when node.
N
== 1 => true,
System\Text\RegularExpressions\RegexWriter.cs (11)
314
if (node.
N
< int.MaxValue || node.M > 1)
333
if (node.
N
< int.MaxValue || node.M > 1)
334
Emit(RegexOpcode.Branchcount + Lazy, _intStack.Pop(), node.
N
== int.MaxValue ? int.MaxValue : node.
N
- node.M);
348
Emit(RegexOpcode.Capturemark, RegexParser.MapCaptureNumber(node.M, _tree.CaptureNumberSparseMapping), RegexParser.MapCaptureNumber(node.
N
, _tree.CaptureNumberSparseMapping));
397
if (node.
N
> node.M)
399
Emit((RegexOpcode)node.Kind | bits, node.Ch, node.
N
== int.MaxValue ? int.MaxValue : node.
N
- node.M);
412
if (node.
N
> node.M)
414
Emit((RegexOpcode)node.Kind | bits, stringCode, (node.
N
== int.MaxValue) ? int.MaxValue : node.
N
- node.M);
System\Text\RegularExpressions\Symbolic\RegexNodeConverter.cs (5)
88
case RegexNodeKind.Capture when node.
N
== -1: // N == -1 because balancing groups (which have N >= 0) aren't supported
117
result.AddLast(_builder.CreateLoop(_builder.CreateSingleton(bdd), node.Kind is RegexNodeKind.Onelazy or RegexNodeKind.Notonelazy, node.M, node.
N
));
128
result.AddLast(_builder.CreateLoop(_builder.CreateSingleton(setBdd), node.Kind == RegexNodeKind.Setlazy, node.M, node.
N
));
260
result.AddLast(_builder.CreateLoop(body, node.Kind == RegexNodeKind.Lazyloop, node.M, node.
N
));
267
Debug.Assert(node.Kind == RegexNodeKind.Capture && node.
N
== -1);