1 write to _left
System.Text.RegularExpressions (1)
System\Text\RegularExpressions\Symbolic\SymbolicRegexNode.cs (1)
65
_left
= left;
250 references to _left
System.Text.RegularExpressions (250)
System\Text\RegularExpressions\Symbolic\SymbolicRegexBuilder.cs (8)
235
Debug.Assert(node.
_left
is not null);
239
return SymbolicRegexNode<TSet>.CreateLoop(this, node.
_left
, 0, 1, isLazy);
319
Debug.Assert(node.
_left
is not null);
320
return builder.CreateLoop(Transform(node.
_left
, builder, setTransformer), node.IsLazy, node._lower, node._upper);
323
Debug.Assert(node.
_left
is not null && node._right is not null);
325
Transform(node.
_left
, builder, setTransformer),
347
Debug.Assert(node.
_left
is not null);
348
return builder.CreateDisableBacktrackingSimulation(Transform(node.
_left
, builder, setTransformer));
System\Text\RegularExpressions\Symbolic\SymbolicRegexMatcher.Automata.cs (3)
205
SymbolicRegexNode<TSet>? left = node.
_left
;
218
if (left._lower <= 0 || left.
_left
!.Kind is not SymbolicRegexNodeKind.Singleton)
226
_builder.CreateLoop(left.
_left
, left.IsLazy, 0, left._upper - left._lower),
System\Text\RegularExpressions\Symbolic\SymbolicRegexNode.cs (239)
128
Debug.Assert(node.
_left
is not null && node._right is not null);
131
if (!IsHighPriorityNullableFor(node.
_left
, context))
141
Debug.Assert(node.
_left
is not null);
144
if (!node.
_left
._info.CanBeNullable)
148
node = node.
_left
;
203
Debug.Assert(node.
_left
is not null && node._right is not null);
204
if (node.
_left
._kind == listKind)
206
AppendToList(node.
_left
, list, listKind);
210
list.Add(node.
_left
);
258
Debug.Assert(
_left
is not null);
259
is_nullable = _lower == 0 ||
_left
.IsNullableFor(context);
263
Debug.Assert(
_left
is not null && _right is not null);
264
is_nullable =
_left
.IsNullableFor(context) && _right.IsNullableFor(context);
268
Debug.Assert(
_left
is not null && _right is not null);
269
is_nullable =
_left
.IsNullableFor(context) || _right.IsNullableFor(context);
315
Debug.Assert(
_left
is not null);
316
is_nullable =
_left
.IsNullableFor(context);
339
Debug.Assert(
_left
is not null);
340
if (
_left
._kind == SymbolicRegexNodeKind.Singleton)
342
Debug.Assert(
_left
._set is not null);
343
return !IsLazy && solver.Full.Equals(
_left
._set);
416
Debug.Assert(body.
_left
is not null);
417
return CreateLoop(builder, body.
_left
, 0, 1, isLazy || body.IsLazy);
432
Debug.Assert(node.
_left
is not null && node._right is not null);
433
return CreateEffect(builder, node.
_left
, CreateConcat(builder, effectNode, node._right));
465
Debug.Assert(left.
_left
is not null && left._right is not null);
466
return CreateEffect(builder, CreateConcat(builder, left.
_left
, right), left._right);
497
SymbolicRegexNode<TSet> head = right._kind == SymbolicRegexNodeKind.Alternate ? right.
_left
! : right;
521
Debug.Assert(current.
_left
is not null && current._right is not null);
523
Debug.Assert(current.
_left
._kind != SymbolicRegexNodeKind.Alternate);
524
if (current.
_left
== left)
653
Debug.Assert(left.
_left
is not null && left._right is not null);
654
return left.
_left
.Subsumes(builder, right, depth);
661
Debug.Assert(right.
_left
is not null && right._right is not null);
662
return left.Subsumes(builder, right.
_left
, depth);
669
Debug.Assert(left.
_left
is not null && right.
_left
is not null && right._right is not null);
670
SymbolicRegexNode<TSet> rl = right.
_left
;
671
if (left.
_left
.IsNullable && rl._kind == SymbolicRegexNodeKind.Loop && rl._lower == 0 && rl._upper == 1 && rl.IsLazy)
673
Debug.Assert(rl.
_left
is not null);
674
if (TrySkipPrefix(left, rl.
_left
, out SymbolicRegexNode<TSet>? tail))
683
Debug.Assert(left.
_left
is not null && left._right is not null);
684
SymbolicRegexNode<TSet> ll = left.
_left
;
687
Debug.Assert(ll.
_left
is not null);
688
if (TrySkipPrefix(right, ll.
_left
, out SymbolicRegexNode<TSet>? tail))
696
Debug.Assert(left.
_left
is not null && left._right is not null);
697
if (left.
_left
.IsNullable)
715
Debug.Assert(prefix.
_left
is not null && prefix._right is not null);
719
Debug.Assert(node.
_left
is not null && node._right is not null);
720
if (node.
_left
!= prefix.
_left
)
731
Debug.Assert(node.
_left
is not null && node._right is not null);
732
if (node.
_left
== prefix)
752
Debug.Assert(current.
_left
is not null);
753
current = current.
_left
;
791
Debug.Assert(left.
_left
is not null && left._right is not null);
792
Debug.Assert(right.Subsumes(builder, left.
_left
));
803
if (TryFoldAlternation(builder, left.
_left
, right, out SymbolicRegexNode<TSet>? innerResult, rightEffects))
814
Debug.Assert(right.
_left
is not null && right._right is not null);
815
Debug.Assert(right.
_left
.Subsumes(builder, left));
817
return TryFoldAlternation(builder, left, right.
_left
, out result, rightEffects);
823
Debug.Assert(right.
_left
is not null && right._right is not null);
824
if (right.
_left
.IsNullable && TrySplitConcatSubsumption(builder, left, right, out SymbolicRegexNode<TSet>? prefix))
844
Debug.Assert(suffix.
_left
is not null && suffix._right is not null);
857
prefixElements.Add(suffix.
_left
);
911
Debug.Assert(
_left
is not null);
914
long length =
_left
.GetFixedLength();
929
Debug.Assert(
_left
is not null && _right is not null);
930
int leftLength =
_left
.GetFixedLength();
948
Debug.Assert(
_left
is not null && _right is not null);
949
int length =
_left
.GetFixedLength();
962
Debug.Assert(
_left
is not null);
963
return
_left
.GetFixedLength();
990
Debug.Assert(
_left
is not null && _right is not null);
993
_left
.AddFixedLengthMarkers(builder, lengthSoFar),
997
Debug.Assert(
_left
is not null && _right is not null);
999
int leftLength =
_left
.GetFixedLength();
1002
return CreateConcat(builder,
_left
, _right.AddFixedLengthMarkers(builder, lengthSoFar + leftLength));
1008
return CreateConcat(builder,
_left
.AddFixedLengthMarkers(builder, lengthSoFar), _right);
1069
Debug.Assert(
_left
is not null);
1070
SymbolicRegexNode<TSet> derivative =
_left
.CreateDerivative(builder, elem, context);
1103
Debug.Assert(
_left
is not null && _right is not null);
1109
prunedNode =
_left
.IsNullableFor(context) ?
_left
.PruneLowerPriorityThanNullability(builder, context) :
1110
CreateAlternate(builder,
_left
, _right.PruneLowerPriorityThanNullability(builder, context), deduplicated: true);
1114
Debug.Assert(
_left
is not null && _right is not null);
1115
prunedNode =
_left
._kind switch
1119
SymbolicRegexNodeKind.Concat => CreateConcat(builder,
_left
.
_left
!, CreateConcat(builder,
_left
._right!, _right))
1126
SymbolicRegexNodeKind.Alternate => (
_left
.
_left
!.IsNullableFor(context) ?
1127
CreateConcat(builder,
_left
.
_left
, _right).PruneLowerPriorityThanNullability(builder, context) :
1128
CreateAlternate(builder, CreateConcat(builder,
_left
.
_left
, _right),
1129
CreateConcat(builder,
_left
._right!, _right).PruneLowerPriorityThanNullability(builder, context), deduplicated: true)),
1131
SymbolicRegexNodeKind.Loop => PruneLoop(builder, context,
_left
, _right),
1134
_ => CreateConcat(builder,
_left
, _right.PruneLowerPriorityThanNullability(builder, context)),
1145
Debug.Assert(
_left
is not null && _right is not null);
1146
prunedNode = CreateEffect(builder,
_left
.PruneLowerPriorityThanNullability(builder, context), _right);
1160
Debug.Assert(loop.Kind == SymbolicRegexNodeKind.Loop && loop.
_left
is not null);
1171
else if (!loop.
_left
.IsNullableFor(context))
1177
CreateConcat(builder, CreateLoop(builder, loop.
_left
, 1, loop._upper, loop.IsLazy), tail),
1190
SymbolicRegexNode<TSet> skipLoopCase = CreateConcat(builder, loop.
_left
.PruneLowerPriorityThanNullability(builder, context),
1192
return loop.
_left
.IsHighPriorityNullableFor(context) ? skipLoopCase : CreateAlternate(builder,
1193
CreateConcat(builder, loop.
_left
.PruneLowerPriorityThanNullability(builder, context), CreateConcat(builder, loop, tail)),
1199
Debug.Assert(loop.
_left
.IsNullableFor(context));
1201
return CreateConcat(builder, loop.
_left
, CreateConcat(builder, loop.CreateLoopContinuation(builder), tail))
1214
Debug.Assert(_kind == SymbolicRegexNodeKind.Loop &&
_left
is not null);
1223
return builder.CreateLoop(
_left
, IsLazy, newlower, newupper);
1285
Debug.Assert(
_left
is not null && _right is not null);
1287
if (!
_left
.IsNullableFor(context))
1291
derivative = builder.CreateConcat(
_left
.CreateDerivative(builder, elem, context), _right);
1295
SymbolicRegexNode<TSet> leftDerivative = builder.CreateConcat(
_left
.CreateDerivative(builder, elem, context), _right);
1296
SymbolicRegexNode<TSet> rightDerivative = builder.CreateEffect(_right.CreateDerivative(builder, elem, context),
_left
);
1308
derivative =
_left
.IsHighPriorityNullableFor(context) ?
1317
Debug.Assert(
_left
is not null);
1320
if (_lower == 0 ||
_left
.IsNullable || !
_left
.IsNullableFor(context))
1324
derivative = builder.CreateConcat(
_left
.CreateDerivative(builder, elem, context), CreateLoopContinuation(builder));
1331
derivative = builder.CreateConcat(
_left
, CreateLoopContinuation(builder)).CreateDerivative(builder, elem, context);
1338
Debug.Assert(
_left
is not null && _right is not null);
1339
derivative = CreateAlternate(builder,
_left
.CreateDerivative(builder, elem, context), _right.CreateDerivative(builder, elem, context));
1388
Debug.Assert(
_left
is not null && _right is not null);
1390
result =
_left
.StripEffects(builder);
1394
Debug.Assert(
_left
is not null && _right is not null);
1395
Debug.Assert(
_left
._info.ContainsEffect && !_right._info.ContainsEffect);
1396
result = builder.CreateConcat(
_left
.StripEffects(builder), _right);
1400
Debug.Assert(
_left
is not null && _right is not null);
1406
SymbolicRegexNode<TSet> strippedLeft =
_left
.StripEffects(builder);
1415
Debug.Assert(
_left
is not null);
1416
result = builder.CreateDisableBacktrackingSimulation(
_left
.StripEffects(builder));
1420
Debug.Assert(
_left
is not null);
1421
result = builder.CreateLoop(
_left
.StripEffects(builder), IsLazy, _lower, _upper);
1473
Debug.Assert(
_left
is not null && _right is not null);
1478
_left
.StripAndMapEffects(builder, context, alternativesAndEffects, currentEffects);
1485
Debug.Assert(
_left
is not null && _right is not null);
1486
Debug.Assert(
_left
._info.ContainsEffect && !_right._info.ContainsEffect);
1490
_left
.StripAndMapEffects(builder, context, alternativesAndEffects, currentEffects);
1500
Debug.Assert(
_left
is not null && _right is not null);
1501
_left
.StripAndMapEffects(builder, context, alternativesAndEffects, currentEffects);
1509
Debug.Assert(
_left
is not null);
1516
_left
.StripAndMapEffects(builder, context, alternativesAndEffects, currentEffects);
1526
Debug.Assert(
_left
is not null);
1528
_left
.StripAndMapEffects(builder, context, alternativesAndEffects, currentEffects);
1564
Debug.Assert(
_left
is not null && _right is not null);
1565
Debug.Assert(
_left
.IsNullableFor(context) && _right.IsNullableFor(context));
1566
_left
.ApplyEffects(apply, context, arg);
1571
Debug.Assert(
_left
is not null);
1573
if (_lower != 0 || (_upper != 0 && !IsLazy &&
_left
.IsNullableFor(context)))
1575
Debug.Assert(
_left
.IsNullableFor(context));
1576
_left
.ApplyEffects(apply, context, arg);
1581
Debug.Assert(
_left
is not null && _right is not null);
1582
if (
_left
.IsNullableFor(context))
1585
_left
.ApplyEffects(apply, context, arg);
1604
Debug.Assert(
_left
is not null);
1605
_left
.ApplyEffects(apply, context, arg);
1671
Debug.Assert(
_left
is not null && _right is not null);
1673
_left
.ToStringHelper(sb);
1680
Debug.Assert(
_left
is not null && _right is not null);
1682
if (
_left
.Kind == SymbolicRegexNodeKind.Concat)
1684
_left
.ToStringHelper(sb);
1685
if (
_left
.Kind == SymbolicRegexNodeKind.Concat)
1696
Debug.Assert(
_left
is not null);
1703
ToStringGrouped(
_left
, sb);
1713
ToStringGrouped(
_left
, sb);
1722
ToStringGrouped(
_left
, sb);
1735
ToStringGrouped(
_left
, sb);
1755
Debug.Assert(
_left
is not null && _right is not null);
1762
_left
.ToStringHelper(sb);
1781
Debug.Assert(
_left
is not null);
1782
_left
.ToStringHelper(sb);
1881
Debug.Assert(
_left
is not null);
1882
_left
.CollectSets(builder, sets);
1886
Debug.Assert(
_left
is not null && _right is not null);
1887
_left
.CollectSets(builder, sets);
1896
Debug.Assert(conc.
_left
is not null && conc._right is not null);
1897
conc.
_left
.CollectSets(builder, sets);
1904
Debug.Assert(
_left
is not null);
1905
_left
.CollectSets(builder, sets);
1936
Debug.Assert(
_left
is not null);
1937
return builder.CreateLoop(
_left
.Reverse(builder), IsLazy, _lower, _upper);
1941
Debug.Assert(
_left
is not null && _right is not null);
1942
SymbolicRegexNode<TSet> rev =
_left
.Reverse(builder);
1946
Debug.Assert(rest.
_left
is not null && rest._right is not null);
1947
SymbolicRegexNode<TSet> rev1 = rest.
_left
.Reverse(builder);
1957
Debug.Assert(
_left
is not null && _right is not null);
1958
return CreateAlternate(builder,
_left
.Reverse(builder), _right.Reverse(builder));
1987
Debug.Assert(
_left
is not null);
1988
return builder.CreateDisableBacktrackingSimulation(
_left
.Reverse(builder));
2013
Debug.Assert(
_left
is not null && _right is not null);
2014
return
_left
.StartsWithLoop(upperBoundLowestValue) || (
_left
.IsNullable && _right.StartsWithLoop(upperBoundLowestValue));
2017
Debug.Assert(
_left
is not null && _right is not null);
2018
return
_left
.StartsWithLoop(upperBoundLowestValue) || _right.StartsWithLoop(upperBoundLowestValue);
2021
Debug.Assert(
_left
is not null);
2022
return
_left
.StartsWithLoop(upperBoundLowestValue);
2139
Debug.Assert(
_left
is not null);
2140
SymbolicRegexNode<TSet> body =
_left
.PruneAnchorsImpl(builder, prevKind, contWithWL, contWithNWL);
2141
return body ==
_left
?
2147
Debug.Assert(
_left
is not null && _right is not null);
2148
SymbolicRegexNode<TSet> left1 =
_left
.PruneAnchorsImpl(builder, prevKind, contWithWL, contWithNWL);
2149
SymbolicRegexNode<TSet> right1 =
_left
.IsNullable ? _right.PruneAnchorsImpl(builder, prevKind, contWithWL, contWithNWL) : _right;
2152
return left1 ==
_left
&& right1 == _right ?
2159
Debug.Assert(
_left
is not null && _right is not null);
2160
SymbolicRegexNode<TSet> left1 =
_left
.PruneAnchorsImpl(builder, prevKind, contWithWL, contWithNWL);
2164
return left1 ==
_left
&& right1 == _right ?
2171
Debug.Assert(
_left
is not null && _right is not null);
2172
SymbolicRegexNode<TSet> left1 =
_left
.PruneAnchorsImpl(builder, prevKind, contWithWL, contWithNWL);
2173
return left1 ==
_left
?
2179
Debug.Assert(
_left
is not null);
2180
SymbolicRegexNode<TSet> child =
_left
.PruneAnchorsImpl(builder, prevKind, contWithWL, contWithNWL);
2181
return child ==
_left
?
2213
Debug.Assert(
_left
is not null && _right is not null);
2214
if (
_left
.IsNullableFor(context))
2217
return
_left
.ResolveFixedLength(context);
2227
Debug.Assert(
_left
is not null && _right is not null);
2228
int leftLength =
_left
.ResolveFixedLength(context);
2245
Debug.Assert(
_left
is not null);
2247
Debug.Assert(
_left
._kind is not SymbolicRegexNodeKind.DisableBacktrackingSimulation);
2248
foreach (SymbolicRegexNode<TSet> element in
_left
.EnumerateAlternationBranches(builder))
2259
Debug.Assert(current.
_left
is not null && current._right is not null);
2260
Debug.Assert(current.
_left
._kind is not SymbolicRegexNodeKind.Alternate);
2263
yield return current.
_left
;
2309
Debug.Assert(
_left
is not null && _right is not null);
2311
return Sum(
_left
.CountSingletons(), _right.CountSingletons());
2314
Debug.Assert(
_left
is not null && _right is null);
2320
int bodyCount =
_left
.CountSingletons();
2334
if (ContainsNestedUnboundedLoop(
_left
))
2348
return Times(_lower + 1,
_left
.CountSingletons());
2354
return Times(_upper,
_left
.CountSingletons());
2358
Debug.Assert(
_left
is not null);
2359
return
_left
.CountSingletons();
2362
Debug.Assert(
_left
is null && _right is null);
2394
Debug.Assert(current.
_left
is not null && current._right is not null);
2396
stack.Push(current.
_left
);
2401
Debug.Assert(current.
_left
is not null);
2402
stack.Push(current.
_left
);