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