1 write to _left
System.Text.RegularExpressions (1)
System\Text\RegularExpressions\Symbolic\SymbolicRegexNode.cs (1)
65
_left
= left;
244 references to _left
System.Text.RegularExpressions (244)
System\Text\RegularExpressions\Symbolic\SymbolicRegexBuilder.cs (8)
244
Debug.Assert(node.
_left
is not null);
248
return SymbolicRegexNode<TSet>.CreateLoop(this, node.
_left
, 0, 1, isLazy);
328
Debug.Assert(node.
_left
is not null);
329
return builder.CreateLoop(Transform(node.
_left
, builder, setTransformer), node.IsLazy, node._lower, node._upper);
332
Debug.Assert(node.
_left
is not null && node._right is not null);
334
Transform(node.
_left
, builder, setTransformer),
356
Debug.Assert(node.
_left
is not null);
357
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 (233)
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));
1379
Debug.Assert(
_left
is not null && _right is not null);
1381
return
_left
.StripEffects(builder);
1384
Debug.Assert(
_left
is not null && _right is not null);
1385
Debug.Assert(
_left
._info.ContainsEffect && !_right._info.ContainsEffect);
1386
return builder.CreateConcat(
_left
.StripEffects(builder), _right);
1389
Debug.Assert(
_left
is not null && _right is not null);
1398
Debug.Assert(
_left
is not null);
1399
return builder.CreateDisableBacktrackingSimulation(
_left
.StripEffects(builder));
1402
Debug.Assert(
_left
is not null);
1403
return builder.CreateLoop(
_left
.StripEffects(builder), IsLazy, _lower, _upper);
1451
Debug.Assert(
_left
is not null && _right is not null);
1456
_left
.StripAndMapEffects(builder, context, alternativesAndEffects, currentEffects);
1463
Debug.Assert(
_left
is not null && _right is not null);
1464
Debug.Assert(
_left
._info.ContainsEffect && !_right._info.ContainsEffect);
1468
_left
.StripAndMapEffects(builder, context, alternativesAndEffects, currentEffects);
1478
Debug.Assert(
_left
is not null && _right is not null);
1479
_left
.StripAndMapEffects(builder, context, alternativesAndEffects, currentEffects);
1487
Debug.Assert(
_left
is not null);
1494
_left
.StripAndMapEffects(builder, context, alternativesAndEffects, currentEffects);
1504
Debug.Assert(
_left
is not null);
1506
_left
.StripAndMapEffects(builder, context, alternativesAndEffects, currentEffects);
1542
Debug.Assert(
_left
is not null && _right is not null);
1543
Debug.Assert(
_left
.IsNullableFor(context) && _right.IsNullableFor(context));
1544
_left
.ApplyEffects(apply, context, arg);
1549
Debug.Assert(
_left
is not null);
1551
if (_lower != 0 || (_upper != 0 && !IsLazy &&
_left
.IsNullableFor(context)))
1553
Debug.Assert(
_left
.IsNullableFor(context));
1554
_left
.ApplyEffects(apply, context, arg);
1559
Debug.Assert(
_left
is not null && _right is not null);
1560
if (
_left
.IsNullableFor(context))
1563
_left
.ApplyEffects(apply, context, arg);
1582
Debug.Assert(
_left
is not null);
1583
_left
.ApplyEffects(apply, context, arg);
1649
Debug.Assert(
_left
is not null && _right is not null);
1651
_left
.ToStringHelper(sb);
1658
Debug.Assert(
_left
is not null && _right is not null);
1660
if (
_left
.Kind == SymbolicRegexNodeKind.Concat)
1662
_left
.ToStringHelper(sb);
1663
if (
_left
.Kind == SymbolicRegexNodeKind.Concat)
1674
Debug.Assert(
_left
is not null);
1681
ToStringGrouped(
_left
, sb);
1691
ToStringGrouped(
_left
, sb);
1700
ToStringGrouped(
_left
, sb);
1713
ToStringGrouped(
_left
, sb);
1733
Debug.Assert(
_left
is not null && _right is not null);
1740
_left
.ToStringHelper(sb);
1759
Debug.Assert(
_left
is not null);
1760
_left
.ToStringHelper(sb);
1859
Debug.Assert(
_left
is not null);
1860
_left
.CollectSets(builder, sets);
1864
Debug.Assert(
_left
is not null && _right is not null);
1865
_left
.CollectSets(builder, sets);
1874
Debug.Assert(conc.
_left
is not null && conc._right is not null);
1875
conc.
_left
.CollectSets(builder, sets);
1882
Debug.Assert(
_left
is not null);
1883
_left
.CollectSets(builder, sets);
1914
Debug.Assert(
_left
is not null);
1915
return builder.CreateLoop(
_left
.Reverse(builder), IsLazy, _lower, _upper);
1919
Debug.Assert(
_left
is not null && _right is not null);
1920
SymbolicRegexNode<TSet> rev =
_left
.Reverse(builder);
1924
Debug.Assert(rest.
_left
is not null && rest._right is not null);
1925
SymbolicRegexNode<TSet> rev1 = rest.
_left
.Reverse(builder);
1935
Debug.Assert(
_left
is not null && _right is not null);
1936
return CreateAlternate(builder,
_left
.Reverse(builder), _right.Reverse(builder));
1965
Debug.Assert(
_left
is not null);
1966
return builder.CreateDisableBacktrackingSimulation(
_left
.Reverse(builder));
1991
Debug.Assert(
_left
is not null && _right is not null);
1992
return
_left
.StartsWithLoop(upperBoundLowestValue) || (
_left
.IsNullable && _right.StartsWithLoop(upperBoundLowestValue));
1995
Debug.Assert(
_left
is not null && _right is not null);
1996
return
_left
.StartsWithLoop(upperBoundLowestValue) || _right.StartsWithLoop(upperBoundLowestValue);
1999
Debug.Assert(
_left
is not null);
2000
return
_left
.StartsWithLoop(upperBoundLowestValue);
2117
Debug.Assert(
_left
is not null);
2118
SymbolicRegexNode<TSet> body =
_left
.PruneAnchorsImpl(builder, prevKind, contWithWL, contWithNWL);
2119
return body ==
_left
?
2125
Debug.Assert(
_left
is not null && _right is not null);
2126
SymbolicRegexNode<TSet> left1 =
_left
.PruneAnchorsImpl(builder, prevKind, contWithWL, contWithNWL);
2127
SymbolicRegexNode<TSet> right1 =
_left
.IsNullable ? _right.PruneAnchorsImpl(builder, prevKind, contWithWL, contWithNWL) : _right;
2130
return left1 ==
_left
&& right1 == _right ?
2137
Debug.Assert(
_left
is not null && _right is not null);
2138
SymbolicRegexNode<TSet> left1 =
_left
.PruneAnchorsImpl(builder, prevKind, contWithWL, contWithNWL);
2142
return left1 ==
_left
&& right1 == _right ?
2149
Debug.Assert(
_left
is not null && _right is not null);
2150
SymbolicRegexNode<TSet> left1 =
_left
.PruneAnchorsImpl(builder, prevKind, contWithWL, contWithNWL);
2151
return left1 ==
_left
?
2157
Debug.Assert(
_left
is not null);
2158
SymbolicRegexNode<TSet> child =
_left
.PruneAnchorsImpl(builder, prevKind, contWithWL, contWithNWL);
2159
return child ==
_left
?
2191
Debug.Assert(
_left
is not null && _right is not null);
2192
if (
_left
.IsNullableFor(context))
2195
return
_left
.ResolveFixedLength(context);
2205
Debug.Assert(
_left
is not null && _right is not null);
2206
int leftLength =
_left
.ResolveFixedLength(context);
2223
Debug.Assert(
_left
is not null);
2225
Debug.Assert(
_left
._kind is not SymbolicRegexNodeKind.DisableBacktrackingSimulation);
2226
foreach (SymbolicRegexNode<TSet> element in
_left
.EnumerateAlternationBranches(builder))
2237
Debug.Assert(current.
_left
is not null && current._right is not null);
2238
Debug.Assert(current.
_left
._kind is not SymbolicRegexNodeKind.Alternate);
2241
yield return current.
_left
;
2287
Debug.Assert(
_left
is not null && _right is not null);
2289
return Sum(
_left
.CountSingletons(), _right.CountSingletons());
2292
Debug.Assert(
_left
is not null && _right is null);
2299
return
_left
.CountSingletons();
2308
return Times(_lower + 1,
_left
.CountSingletons());
2314
return Times(_upper,
_left
.CountSingletons());
2318
Debug.Assert(
_left
is not null);
2319
return
_left
.CountSingletons();
2322
Debug.Assert(
_left
is null && _right is null);