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