You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[InlineData(@"\n|\n\r|\r\n",@"(?>\n|\r\n)")]// Without re-reduce: (?>\n(?:)|\r\n) — shared prefix \n leaves Concat(\n, Empty) in branch; re-reduce collapses it
481
-
[InlineData(@"[ab]+c[ab]+|[ab]+",@"(?>(?>[ab]+)(?:c(?>[ab]+))?)")]// Without re-reduce: (?>[ab]+c[ab]+|[ab]+) — quantified set prefix [ab]+ not extracted until re-reduce
[InlineData("ab|a|ac|d","(?>ab?|d)")]// Without re-reduce: (?>a(?>b?)|d) — same redundant Atomic removal, within a larger Alternate
484
-
[InlineData("a?b|a??b","(?>a?(?>b))")]// Without re-reduce: (?>a?(?>[b])) — greedy/lazy branches merge after atomic promotion; re-reduce converts single-char [b] to b
485
-
[InlineData("[ab]?c|[ab]??c","(?>[ab]?(?>c))")]// Without re-reduce: (?>[ab]?(?>[c])) — same single-char class simplification with set loop prefix
478
+
// FinalReduce: post-FinalOptimize re-reduction. Each case shows the equivalent tree without this pass.
[InlineData(@"\n|\n\r|\r\n",@"(?>\n|\r\n)")]// Without FinalReduce: (?>\n(?:)|\r\n) — shared prefix \n leaves Concat(\n, Empty) in branch; FinalReduce collapses it
481
+
[InlineData(@"[ab]+c[ab]+|[ab]+",@"(?>(?>[ab]+)(?:c(?>[ab]+))?)")]// Without FinalReduce: (?>[ab]+c[ab]+|[ab]+) — quantified set prefix [ab]+ not extracted until FinalReduce
[InlineData("ab|a|ac|d","(?>ab?|d)")]// Without FinalReduce: (?>a(?>b?)|d) — same redundant Atomic removal, within a larger Alternate
484
+
[InlineData("a?b|a??b","(?>a?(?>b))")]// Without FinalReduce: (?>a?(?>[b])) — greedy/lazy branches merge after atomic promotion; FinalReduce converts single-char [b] to b
485
+
[InlineData("[ab]?c|[ab]??c","(?>[ab]?(?>c))")]// Without FinalReduce: (?>[ab]?(?>[c])) — same single-char class simplification with set loop prefix
0 commit comments