|
// <auto-generated/>
#nullable enable
#pragma warning disable CS0162 // Unreachable code
#pragma warning disable CS0164 // Unreferenced label
#pragma warning disable CS0219 // Variable assigned but never used
namespace BuildActionTelemetryTable
{
partial class Program
{
/// <remarks>
/// Pattern:<br/>
/// <code>(?<=[I])(?=[A-Z]) &\r\n(?<=[A-Z])(?=[A-Z][a-z]) |\r\n(?<=[^A-Z])(?=[A-Z]) |\r\n(?<=[A-Za-z])(?=[^A-Za-z])</code><br/>
/// Options:<br/>
/// <code>RegexOptions.IgnorePatternWhitespace</code><br/>
/// Explanation:<br/>
/// <code>
/// ○ Match with 3 alternative expressions, atomically.<br/>
/// ○ Match a sequence of expressions.<br/>
/// ○ Zero-width positive lookbehind.<br/>
/// ○ Match 'I' right-to-left.<br/>
/// ○ Zero-width positive lookahead.<br/>
/// ○ Match a character in the set [A-Z].<br/>
/// ○ Match '&'.<br/>
/// ○ Zero-width positive lookbehind.<br/>
/// ○ Match a character in the set [A-Z] right-to-left.<br/>
/// ○ Zero-width positive lookahead.<br/>
/// ○ Match a character in the set [A-Z].<br/>
/// ○ Match a character in the set [a-z].<br/>
/// ○ Match a sequence of expressions.<br/>
/// ○ Zero-width positive lookbehind.<br/>
/// ○ Match a character in the set [^A-Z] right-to-left.<br/>
/// ○ Zero-width positive lookahead.<br/>
/// ○ Match a character in the set [A-Z].<br/>
/// ○ Match a sequence of expressions.<br/>
/// ○ Zero-width positive lookbehind.<br/>
/// ○ Match a character in the set [A-Za-z] right-to-left.<br/>
/// ○ Zero-width positive lookahead.<br/>
/// ○ Match a character in the set [^A-Za-z].<br/>
/// </code>
/// </remarks>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "9.0.12.41916")]
private static partial global::System.Text.RegularExpressions.Regex ChangeOfCaseRegex() => global::System.Text.RegularExpressions.Generated.ChangeOfCaseRegex_0.Instance;
}
}
namespace System.Text.RegularExpressions.Generated
{
using System;
using System.Buffers;
using System.CodeDom.Compiler;
using System.Collections;
using System.ComponentModel;
using System.Globalization;
using System.Runtime.CompilerServices;
using System.Text.RegularExpressions;
using System.Threading;
/// <summary>Custom <see cref="Regex"/>-derived type for the ChangeOfCaseRegex method.</summary>
[GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "9.0.12.41916")]
file sealed class ChangeOfCaseRegex_0 : Regex
{
/// <summary>Cached, thread-safe singleton instance.</summary>
internal static readonly ChangeOfCaseRegex_0 Instance = new();
/// <summary>Initializes the instance.</summary>
private ChangeOfCaseRegex_0()
{
base.pattern = "(?<=[I])(?=[A-Z]) &\r\n(?<=[A-Z])(?=[A-Z][a-z]) |\r\n(?<=[^A-Z])(?=[A-Z]) |\r\n(?<=[A-Za-z])(?=[^A-Za-z])";
base.roptions = RegexOptions.IgnorePatternWhitespace;
ValidateMatchTimeout(Utilities.s_defaultTimeout);
base.internalMatchTimeout = Utilities.s_defaultTimeout;
base.factory = new RunnerFactory();
base.capsize = 1;
}
/// <summary>Provides a factory for creating <see cref="RegexRunner"/> instances to be used by methods on <see cref="Regex"/>.</summary>
private sealed class RunnerFactory : RegexRunnerFactory
{
/// <summary>Creates an instance of a <see cref="RegexRunner"/> used by methods on <see cref="Regex"/>.</summary>
protected override RegexRunner CreateInstance() => new Runner();
/// <summary>Provides the runner that contains the custom logic implementing the specified regular expression.</summary>
private sealed class Runner : RegexRunner
{
/// <summary>Scan the <paramref name="inputSpan"/> starting from base.runtextstart for the next match.</summary>
/// <param name="inputSpan">The text being scanned by the regular expression.</param>
protected override void Scan(ReadOnlySpan<char> inputSpan)
{
// Search until we can't find a valid starting position, we find a match, or we reach the end of the input.
while (!TryMatchAtCurrentPosition(inputSpan) &&
base.runtextpos != inputSpan.Length)
{
base.runtextpos++;
if (Utilities.s_hasTimeout)
{
base.CheckTimeout();
}
}
}
/// <summary>Determine whether <paramref name="inputSpan"/> at base.runtextpos is a match for the regular expression.</summary>
/// <param name="inputSpan">The text being scanned by the regular expression.</param>
/// <returns>true if the regular expression matches at the current position; otherwise, false.</returns>
private bool TryMatchAtCurrentPosition(ReadOnlySpan<char> inputSpan)
{
int pos = base.runtextpos;
int matchStart = pos;
ReadOnlySpan<char> slice = inputSpan.Slice(pos);
// Match with 3 alternative expressions, atomically.
{
int alternation_starting_pos = pos;
// Branch 0
{
// Zero-width positive lookbehind.
{
slice = inputSpan.Slice(pos);
int positivelookbehind_starting_pos = pos;
if (Utilities.s_hasTimeout)
{
base.CheckTimeout();
}
// Match 'I' right-to-left.
if ((uint)(pos - 1) >= inputSpan.Length || inputSpan[pos - 1] != 'I')
{
goto AlternationBranch;
}
pos--;
pos = positivelookbehind_starting_pos;
slice = inputSpan.Slice(pos);
}
// Zero-width positive lookahead.
{
slice = inputSpan.Slice(pos);
int positivelookahead_starting_pos = pos;
if (Utilities.s_hasTimeout)
{
base.CheckTimeout();
}
// Match a character in the set [A-Z].
if (slice.IsEmpty || !char.IsAsciiLetterUpper(slice[0]))
{
goto AlternationBranch;
}
pos = positivelookahead_starting_pos;
slice = inputSpan.Slice(pos);
}
// Match '&'.
if (slice.IsEmpty || slice[0] != '&')
{
goto AlternationBranch;
}
pos++;
slice = inputSpan.Slice(pos);
// Zero-width positive lookbehind.
{
slice = inputSpan.Slice(pos);
int positivelookbehind_starting_pos1 = pos;
if (Utilities.s_hasTimeout)
{
base.CheckTimeout();
}
// Match a character in the set [A-Z] right-to-left.
if ((uint)(pos - 1) >= inputSpan.Length || !char.IsAsciiLetterUpper(inputSpan[pos - 1]))
{
goto AlternationBranch;
}
pos--;
pos = positivelookbehind_starting_pos1;
slice = inputSpan.Slice(pos);
}
// Zero-width positive lookahead.
{
slice = inputSpan.Slice(pos);
int positivelookahead_starting_pos1 = pos;
if (Utilities.s_hasTimeout)
{
base.CheckTimeout();
}
if ((uint)slice.Length < 2 ||
!char.IsAsciiLetterUpper(slice[0]) || // Match a character in the set [A-Z].
!char.IsAsciiLetterLower(slice[1])) // Match a character in the set [a-z].
{
goto AlternationBranch;
}
pos = positivelookahead_starting_pos1;
slice = inputSpan.Slice(pos);
}
goto AlternationMatch;
AlternationBranch:
pos = alternation_starting_pos;
slice = inputSpan.Slice(pos);
}
// Branch 1
{
// Zero-width positive lookbehind.
{
slice = inputSpan.Slice(pos);
int positivelookbehind_starting_pos2 = pos;
if (Utilities.s_hasTimeout)
{
base.CheckTimeout();
}
// Match a character in the set [^A-Z] right-to-left.
if ((uint)(pos - 1) >= inputSpan.Length || char.IsAsciiLetterUpper(inputSpan[pos - 1]))
{
goto AlternationBranch1;
}
pos--;
pos = positivelookbehind_starting_pos2;
slice = inputSpan.Slice(pos);
}
// Zero-width positive lookahead.
{
slice = inputSpan.Slice(pos);
int positivelookahead_starting_pos2 = pos;
if (Utilities.s_hasTimeout)
{
base.CheckTimeout();
}
// Match a character in the set [A-Z].
if (slice.IsEmpty || !char.IsAsciiLetterUpper(slice[0]))
{
goto AlternationBranch1;
}
pos = positivelookahead_starting_pos2;
slice = inputSpan.Slice(pos);
}
goto AlternationMatch;
AlternationBranch1:
pos = alternation_starting_pos;
slice = inputSpan.Slice(pos);
}
// Branch 2
{
// Zero-width positive lookbehind.
{
slice = inputSpan.Slice(pos);
int positivelookbehind_starting_pos3 = pos;
if (Utilities.s_hasTimeout)
{
base.CheckTimeout();
}
// Match a character in the set [A-Za-z] right-to-left.
if ((uint)(pos - 1) >= inputSpan.Length || !char.IsAsciiLetter(inputSpan[pos - 1]))
{
return false; // The input didn't match.
}
pos--;
pos = positivelookbehind_starting_pos3;
slice = inputSpan.Slice(pos);
}
// Zero-width positive lookahead.
{
slice = inputSpan.Slice(pos);
int positivelookahead_starting_pos3 = pos;
if (Utilities.s_hasTimeout)
{
base.CheckTimeout();
}
// Match a character in the set [^A-Za-z].
if (slice.IsEmpty || char.IsAsciiLetter(slice[0]))
{
return false; // The input didn't match.
}
pos = positivelookahead_starting_pos3;
slice = inputSpan.Slice(pos);
}
}
AlternationMatch:;
}
// The input matched.
base.runtextpos = pos;
base.Capture(0, matchStart, pos);
return true;
}
}
}
}
/// <summary>Helper methods used by generated <see cref="Regex"/>-derived implementations.</summary>
[GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "9.0.12.41916")]
file static class Utilities
{
/// <summary>Default timeout value set in <see cref="AppContext"/>, or <see cref="Regex.InfiniteMatchTimeout"/> if none was set.</summary>
internal static readonly TimeSpan s_defaultTimeout = AppContext.GetData("REGEX_DEFAULT_MATCH_TIMEOUT") is TimeSpan timeout ? timeout : Regex.InfiniteMatchTimeout;
/// <summary>Whether <see cref="s_defaultTimeout"/> is non-infinite.</summary>
internal static readonly bool s_hasTimeout = s_defaultTimeout != Regex.InfiniteMatchTimeout;
}
}
|