|
// <auto-generated/>
#nullable enable
#pragma warning disable
namespace Microsoft.Build.Shared
{
partial class CanonicalError
{
/// <remarks>
/// Pattern:<br/>
/// <code>^\s*(((?<ORIGIN>(((\d+>)?[a-zA-Z]?:[^:]*)|([^:]*))):)|())(?<SUBCATEGORY>(()|([^:]*? )))(?<CATEGORY>(error|warning))( \s*(?<CODE>[^: ]*))?\s*:(?<TEXT>.*)$</code><br/>
/// Options:<br/>
/// <code>RegexOptions.IgnoreCase</code><br/>
/// Explanation:<br/>
/// <code>
/// ○ Match if at the beginning of the string.<br/>
/// ○ Match a whitespace character greedily any number of times.<br/>
/// ○ 1st capture group.<br/>
/// ○ Match with 2 alternative expressions.<br/>
/// ○ 2nd capture group.<br/>
/// ○ "ORIGIN" capture group.<br/>
/// ○ 3rd capture group.<br/>
/// ○ Match with 2 alternative expressions.<br/>
/// ○ 4th capture group.<br/>
/// ○ Optional (greedy).<br/>
/// ○ 5th capture group.<br/>
/// ○ Match a Unicode digit atomically at least once.<br/>
/// ○ Match '>'.<br/>
/// ○ Match a character in the set [A-Za-z\u212A] atomically, optionally.<br/>
/// ○ Match ':'.<br/>
/// ○ Match a character other than ':' atomically any number of times.<br/>
/// ○ 6th capture group.<br/>
/// ○ Match a character other than ':' atomically any number of times.<br/>
/// ○ Match ':'.<br/>
/// ○ 7th capture group.<br/>
/// ○ Match an empty string.<br/>
/// ○ "SUBCATEGORY" capture group.<br/>
/// ○ 8th capture group.<br/>
/// ○ Match with 2 alternative expressions.<br/>
/// ○ 9th capture group.<br/>
/// ○ Match an empty string.<br/>
/// ○ 10th capture group.<br/>
/// ○ Match a character other than ':' lazily any number of times.<br/>
/// ○ Match ' '.<br/>
/// ○ "CATEGORY" capture group.<br/>
/// ○ 11th capture group.<br/>
/// ○ Match with 2 alternative expressions.<br/>
/// ○ Match a sequence of expressions.<br/>
/// ○ Match a character in the set [Ee].<br/>
/// ○ Match a character in the set [Rr] exactly 2 times.<br/>
/// ○ Match a character in the set [Oo].<br/>
/// ○ Match a character in the set [Rr].<br/>
/// ○ Match a sequence of expressions.<br/>
/// ○ Match a character in the set [Ww].<br/>
/// ○ Match a character in the set [Aa].<br/>
/// ○ Match a character in the set [Rr].<br/>
/// ○ Match a character in the set [Nn].<br/>
/// ○ Match a character in the set [Ii].<br/>
/// ○ Match a character in the set [Nn].<br/>
/// ○ Match a character in the set [Gg].<br/>
/// ○ Optional (greedy).<br/>
/// ○ 12th capture group.<br/>
/// ○ Match ' '.<br/>
/// ○ Match a whitespace character greedily any number of times.<br/>
/// ○ "CODE" capture group.<br/>
/// ○ Match a character in the set [^ :] greedily any number of times.<br/>
/// ○ Match a whitespace character atomically any number of times.<br/>
/// ○ Match ':'.<br/>
/// ○ "TEXT" capture group.<br/>
/// ○ Match a character other than '\n' greedily any number of times.<br/>
/// ○ Match if at the end of the string or if before an ending newline.<br/>
/// </code>
/// </remarks>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "11.0.14.27024")]
private static partial global::System.Text.RegularExpressions.Regex OriginCategoryCodeTextExpression => global::System.Text.RegularExpressions.Generated.OriginCategoryCodeTextExpression_0.Instance;
}
}
namespace Microsoft.Build.Shared
{
partial class CanonicalError
{
/// <remarks>
/// Pattern:<br/>
/// <code>^\s*(?<ORIGIN>(?<FILENAME>.*):(?<LOCATION>(?<LINE>[0-9]*):(?<COLUMN>[0-9]*))):(?<CATEGORY> error| warning):(?<TEXT>.*)</code><br/>
/// Options:<br/>
/// <code>RegexOptions.IgnoreCase</code><br/>
/// Explanation:<br/>
/// <code>
/// ○ Match if at the beginning of the string.<br/>
/// ○ Match a whitespace character greedily any number of times.<br/>
/// ○ "ORIGIN" capture group.<br/>
/// ○ "FILENAME" capture group.<br/>
/// ○ Match a character other than '\n' greedily any number of times.<br/>
/// ○ Match ':'.<br/>
/// ○ "LOCATION" capture group.<br/>
/// ○ "LINE" capture group.<br/>
/// ○ Match a character in the set [0-9] atomically any number of times.<br/>
/// ○ Match ':'.<br/>
/// ○ "COLUMN" capture group.<br/>
/// ○ Match a character in the set [0-9] atomically any number of times.<br/>
/// ○ Match ':'.<br/>
/// ○ "CATEGORY" capture group.<br/>
/// ○ Match ' '.<br/>
/// ○ Match with 2 alternative expressions.<br/>
/// ○ Match a sequence of expressions.<br/>
/// ○ Match a character in the set [Ee].<br/>
/// ○ Match a character in the set [Rr] exactly 2 times.<br/>
/// ○ Match a character in the set [Oo].<br/>
/// ○ Match a character in the set [Rr].<br/>
/// ○ Match a sequence of expressions.<br/>
/// ○ Match a character in the set [Ww].<br/>
/// ○ Match a character in the set [Aa].<br/>
/// ○ Match a character in the set [Rr].<br/>
/// ○ Match a character in the set [Nn].<br/>
/// ○ Match a character in the set [Ii].<br/>
/// ○ Match a character in the set [Nn].<br/>
/// ○ Match a character in the set [Gg].<br/>
/// ○ Match ':'.<br/>
/// ○ "TEXT" capture group.<br/>
/// ○ Match a character other than '\n' atomically any number of times.<br/>
/// </code>
/// </remarks>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "11.0.14.27024")]
private static partial global::System.Text.RegularExpressions.Regex OriginCategoryCodeTextExpression2 => global::System.Text.RegularExpressions.Generated.OriginCategoryCodeTextExpression2_1.Instance;
}
}
namespace Microsoft.Build.Shared
{
partial class CanonicalError
{
/// <remarks>
/// Pattern:<br/>
/// <code>^(\d+>)?(?<FILENAME>.*)\((?<LOCATION>[\,,0-9,-]*)\)\s*$</code><br/>
/// Options:<br/>
/// <code>RegexOptions.IgnoreCase</code><br/>
/// Explanation:<br/>
/// <code>
/// ○ Match if at the beginning of the string.<br/>
/// ○ Optional (greedy).<br/>
/// ○ 1st capture group.<br/>
/// ○ Match a Unicode digit atomically at least once.<br/>
/// ○ Match '>'.<br/>
/// ○ "FILENAME" capture group.<br/>
/// ○ Match a character other than '\n' greedily any number of times.<br/>
/// ○ Match '('.<br/>
/// ○ "LOCATION" capture group.<br/>
/// ○ Match a character in the set [,\-0-9] atomically any number of times.<br/>
/// ○ Match ')'.<br/>
/// ○ Match a whitespace character greedily any number of times.<br/>
/// ○ Match if at the end of the string or if before an ending newline.<br/>
/// </code>
/// </remarks>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "11.0.14.27024")]
private static partial global::System.Text.RegularExpressions.Regex FilenameLocationFromOrigin => global::System.Text.RegularExpressions.Generated.FilenameLocationFromOrigin_2.Instance;
}
}
namespace Microsoft.Build.Shared
{
partial class CanonicalError
{
/// <remarks>
/// Pattern:<br/>
/// <code>^(?<LINE>[0-9]*)$</code><br/>
/// Options:<br/>
/// <code>RegexOptions.IgnoreCase</code><br/>
/// Explanation:<br/>
/// <code>
/// ○ Match if at the beginning of the string.<br/>
/// ○ "LINE" capture group.<br/>
/// ○ Match a character in the set [0-9] atomically any number of times.<br/>
/// ○ Match if at the end of the string or if before an ending newline.<br/>
/// </code>
/// </remarks>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "11.0.14.27024")]
private static partial global::System.Text.RegularExpressions.Regex LineFromLocation => global::System.Text.RegularExpressions.Generated.LineFromLocation_3.Instance;
}
}
namespace Microsoft.Build.Shared
{
partial class CanonicalError
{
/// <remarks>
/// Pattern:<br/>
/// <code>^(?<LINE>[0-9]*)-(?<ENDLINE>[0-9]*)$</code><br/>
/// Options:<br/>
/// <code>RegexOptions.IgnoreCase</code><br/>
/// Explanation:<br/>
/// <code>
/// ○ Match if at the beginning of the string.<br/>
/// ○ "LINE" capture group.<br/>
/// ○ Match a character in the set [0-9] atomically any number of times.<br/>
/// ○ Match '-'.<br/>
/// ○ "ENDLINE" capture group.<br/>
/// ○ Match a character in the set [0-9] atomically any number of times.<br/>
/// ○ Match if at the end of the string or if before an ending newline.<br/>
/// </code>
/// </remarks>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "11.0.14.27024")]
private static partial global::System.Text.RegularExpressions.Regex LineLineFromLocation => global::System.Text.RegularExpressions.Generated.LineLineFromLocation_4.Instance;
}
}
namespace Microsoft.Build.Shared
{
partial class CanonicalError
{
/// <remarks>
/// Pattern:<br/>
/// <code>^(?<LINE>[0-9]*),(?<COLUMN>[0-9]*)$</code><br/>
/// Options:<br/>
/// <code>RegexOptions.IgnoreCase</code><br/>
/// Explanation:<br/>
/// <code>
/// ○ Match if at the beginning of the string.<br/>
/// ○ "LINE" capture group.<br/>
/// ○ Match a character in the set [0-9] atomically any number of times.<br/>
/// ○ Match ','.<br/>
/// ○ "COLUMN" capture group.<br/>
/// ○ Match a character in the set [0-9] atomically any number of times.<br/>
/// ○ Match if at the end of the string or if before an ending newline.<br/>
/// </code>
/// </remarks>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "11.0.14.27024")]
private static partial global::System.Text.RegularExpressions.Regex LineColFromLocation => global::System.Text.RegularExpressions.Generated.LineColFromLocation_5.Instance;
}
}
namespace Microsoft.Build.Shared
{
partial class CanonicalError
{
/// <remarks>
/// Pattern:<br/>
/// <code>^(?<LINE>[0-9]*),(?<COLUMN>[0-9]*)-(?<ENDCOLUMN>[0-9]*)$</code><br/>
/// Options:<br/>
/// <code>RegexOptions.IgnoreCase</code><br/>
/// Explanation:<br/>
/// <code>
/// ○ Match if at the beginning of the string.<br/>
/// ○ "LINE" capture group.<br/>
/// ○ Match a character in the set [0-9] atomically any number of times.<br/>
/// ○ Match ','.<br/>
/// ○ "COLUMN" capture group.<br/>
/// ○ Match a character in the set [0-9] atomically any number of times.<br/>
/// ○ Match '-'.<br/>
/// ○ "ENDCOLUMN" capture group.<br/>
/// ○ Match a character in the set [0-9] atomically any number of times.<br/>
/// ○ Match if at the end of the string or if before an ending newline.<br/>
/// </code>
/// </remarks>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "11.0.14.27024")]
private static partial global::System.Text.RegularExpressions.Regex LineColColFromLocation => global::System.Text.RegularExpressions.Generated.LineColColFromLocation_6.Instance;
}
}
namespace Microsoft.Build.Shared
{
partial class CanonicalError
{
/// <remarks>
/// Pattern:<br/>
/// <code>^(?<LINE>[0-9]*),(?<COLUMN>[0-9]*),(?<ENDLINE>[0-9]*),(?<ENDCOLUMN>[0-9]*)$</code><br/>
/// Options:<br/>
/// <code>RegexOptions.IgnoreCase</code><br/>
/// Explanation:<br/>
/// <code>
/// ○ Match if at the beginning of the string.<br/>
/// ○ "LINE" capture group.<br/>
/// ○ Match a character in the set [0-9] atomically any number of times.<br/>
/// ○ Match ','.<br/>
/// ○ "COLUMN" capture group.<br/>
/// ○ Match a character in the set [0-9] atomically any number of times.<br/>
/// ○ Match ','.<br/>
/// ○ "ENDLINE" capture group.<br/>
/// ○ Match a character in the set [0-9] atomically any number of times.<br/>
/// ○ Match ','.<br/>
/// ○ "ENDCOLUMN" capture group.<br/>
/// ○ Match a character in the set [0-9] atomically any number of times.<br/>
/// ○ Match if at the end of the string or if before an ending newline.<br/>
/// </code>
/// </remarks>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "11.0.14.27024")]
private static partial global::System.Text.RegularExpressions.Regex LineColLineColFromLocation => global::System.Text.RegularExpressions.Generated.LineColLineColFromLocation_7.Instance;
}
}
namespace Microsoft.Build.Tasks.Deployment.Bootstrapper
{
partial class BuildMessage
{
/// <remarks>
/// Pattern:<br/>
/// <code>\d+$</code><br/>
/// Explanation:<br/>
/// <code>
/// ○ Match a Unicode digit atomically at least once.<br/>
/// ○ Match if at the end of the string or if before an ending newline.<br/>
/// </code>
/// </remarks>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "11.0.14.27024")]
private static partial global::System.Text.RegularExpressions.Regex MsbuildMessageCodePattern => global::System.Text.RegularExpressions.Generated.MsbuildMessageCodePattern_8.Instance;
}
}
namespace Microsoft.Build.Tasks
{
partial class FindInvalidProjectReferences
{
/// <remarks>
/// Pattern:<br/>
/// <code>(?<PLATFORMIDENTITY>^[^,]*),\s*Version=(?<PLATFORMVERSION>.*)</code><br/>
/// Options:<br/>
/// <code>RegexOptions.IgnoreCase</code><br/>
/// Explanation:<br/>
/// <code>
/// ○ "PLATFORMIDENTITY" capture group.<br/>
/// ○ Match if at the beginning of the string.<br/>
/// ○ Match a character other than ',' atomically any number of times.<br/>
/// ○ Match ','.<br/>
/// ○ Match a whitespace character atomically any number of times.<br/>
/// ○ Match a character in the set [Vv].<br/>
/// ○ Match a character in the set [Ee].<br/>
/// ○ Match a character in the set [Rr].<br/>
/// ○ Match a character in the set [Ss].<br/>
/// ○ Match a character in the set [Ii].<br/>
/// ○ Match a character in the set [Oo].<br/>
/// ○ Match a character in the set [Nn].<br/>
/// ○ Match '='.<br/>
/// ○ "PLATFORMVERSION" capture group.<br/>
/// ○ Match a character other than '\n' atomically any number of times.<br/>
/// </code>
/// </remarks>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "11.0.14.27024")]
private static partial global::System.Text.RegularExpressions.Regex PlatformMonikerRegex => global::System.Text.RegularExpressions.Generated.PlatformMonikerRegex_9.Instance;
}
}
namespace Microsoft.Build.Tasks.Deployment.ManifestUtilities
{
partial class AssemblyIdentity
{
/// <remarks>
/// Pattern:<br/>
/// <code>^(?<name>[^,]*)(, Version=(?<version>[^,]*))?(, Culture=(?<culture>[^,]*))?(, PublicKeyToken=(?<pkt>[^,]*))?(, ProcessorArchitecture=(?<pa>[^,]*))?(, Type=(?<type>[^,]*))?</code><br/>
/// Explanation:<br/>
/// <code>
/// ○ Match if at the beginning of the string.<br/>
/// ○ "name" capture group.<br/>
/// ○ Match a character other than ',' greedily any number of times.<br/>
/// ○ Optional (greedy).<br/>
/// ○ 1st capture group.<br/>
/// ○ Match the string ", Version=".<br/>
/// ○ "version" capture group.<br/>
/// ○ Match a character other than ',' greedily any number of times.<br/>
/// ○ Optional (greedy).<br/>
/// ○ 2nd capture group.<br/>
/// ○ Match the string ", Culture=".<br/>
/// ○ "culture" capture group.<br/>
/// ○ Match a character other than ',' greedily any number of times.<br/>
/// ○ Optional (greedy).<br/>
/// ○ 3rd capture group.<br/>
/// ○ Match the string ", PublicKeyToken=".<br/>
/// ○ "pkt" capture group.<br/>
/// ○ Match a character other than ',' greedily any number of times.<br/>
/// ○ Optional (greedy).<br/>
/// ○ 4th capture group.<br/>
/// ○ Match the string ", ProcessorArchitecture=".<br/>
/// ○ "pa" capture group.<br/>
/// ○ Match a character other than ',' greedily any number of times.<br/>
/// ○ Optional (greedy).<br/>
/// ○ 5th capture group.<br/>
/// ○ Match the string ", Type=".<br/>
/// ○ "type" capture group.<br/>
/// ○ Match a character other than ',' atomically any number of times.<br/>
/// </code>
/// </remarks>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "11.0.14.27024")]
private static partial global::System.Text.RegularExpressions.Regex AssemblyNameRegex => global::System.Text.RegularExpressions.Generated.AssemblyNameRegex_10.Instance;
}
}
namespace Microsoft.Build.Tasks
{
partial class NativeMethods
{
partial class AssemblyCacheEnum
{
/// <remarks>
/// Pattern:<br/>
/// <code>^([.\d]+)_([^_]*)_([a-fA-F\d]{16})$</code><br/>
/// Options:<br/>
/// <code>RegexOptions.CultureInvariant</code><br/>
/// Explanation:<br/>
/// <code>
/// ○ Match if at the beginning of the string.<br/>
/// ○ 1st capture group.<br/>
/// ○ Match a character in the set [.\d] atomically at least once.<br/>
/// ○ Match '_'.<br/>
/// ○ 2nd capture group.<br/>
/// ○ Match a character other than '_' atomically any number of times.<br/>
/// ○ Match '_'.<br/>
/// ○ 3rd capture group.<br/>
/// ○ Match a character in the set [A-Fa-f\d] exactly 16 times.<br/>
/// ○ Match if at the end of the string or if before an ending newline.<br/>
/// </code>
/// </remarks>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "11.0.14.27024")]
private static partial global::System.Text.RegularExpressions.Regex AssemblyVersionRegex => global::System.Text.RegularExpressions.Generated.AssemblyVersionRegex_11.Instance;
}
}
}
namespace Microsoft.Build.Tasks
{
partial class ResolveSDKReference
{
/// <remarks>
/// Pattern:<br/>
/// <code>(?<SDKSIMPLENAME>^[^,]*),\s*Version=(?<SDKVERSION>.*)</code><br/>
/// Options:<br/>
/// <code>RegexOptions.IgnoreCase</code><br/>
/// Explanation:<br/>
/// <code>
/// ○ "SDKSIMPLENAME" capture group.<br/>
/// ○ Match if at the beginning of the string.<br/>
/// ○ Match a character other than ',' atomically any number of times.<br/>
/// ○ Match ','.<br/>
/// ○ Match a whitespace character atomically any number of times.<br/>
/// ○ Match a character in the set [Vv].<br/>
/// ○ Match a character in the set [Ee].<br/>
/// ○ Match a character in the set [Rr].<br/>
/// ○ Match a character in the set [Ss].<br/>
/// ○ Match a character in the set [Ii].<br/>
/// ○ Match a character in the set [Oo].<br/>
/// ○ Match a character in the set [Nn].<br/>
/// ○ Match '='.<br/>
/// ○ "SDKVERSION" capture group.<br/>
/// ○ Match a character other than '\n' atomically any number of times.<br/>
/// </code>
/// </remarks>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "11.0.14.27024")]
private static partial global::System.Text.RegularExpressions.Regex SdkReferenceFormatRegex => global::System.Text.RegularExpressions.Generated.SdkReferenceFormatRegex_12.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 OriginCategoryCodeTextExpression method.</summary>
[GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "11.0.14.27024")]
[SkipLocalsInit]
file sealed class OriginCategoryCodeTextExpression_0 : Regex
{
/// <summary>Cached, thread-safe singleton instance.</summary>
internal static readonly OriginCategoryCodeTextExpression_0 Instance = new();
/// <summary>Initializes the instance.</summary>
private OriginCategoryCodeTextExpression_0()
{
base.pattern = "^\\s*(((?<ORIGIN>(((\\d+>)?[a-zA-Z]?:[^:]*)|([^:]*))):)|())(?<SUBCATEGORY>(()|([^:]*? )))(?<CATEGORY>(error|warning))( \\s*(?<CODE>[^: ]*))?\\s*:(?<TEXT>.*)$";
base.roptions = RegexOptions.IgnoreCase;
ValidateMatchTimeout(Utilities.s_defaultTimeout);
base.internalMatchTimeout = Utilities.s_defaultTimeout;
base.factory = new RunnerFactory();
base.CapNames = new Hashtable { { "0", 0 } , { "1", 1 } , { "10", 10 } , { "11", 11 } , { "12", 12 } , { "2", 2 } , { "3", 3 } , { "4", 4 } , { "5", 5 } , { "6", 6 } , { "7", 7 } , { "8", 8 } , { "9", 9 } , { "CATEGORY", 15 } , { "CODE", 16 } , { "ORIGIN", 13 } , { "SUBCATEGORY", 14 } , { "TEXT", 17 } };
base.capslist = new string[] {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "ORIGIN", "SUBCATEGORY", "CATEGORY", "CODE", "TEXT" };
base.capsize = 18;
}
/// <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)
{
// The pattern is anchored. Validate the current position and try to match at it only.
if (TryFindNextPossibleStartingPosition(inputSpan) && !TryMatchAtCurrentPosition(inputSpan))
{
base.runtextpos = inputSpan.Length;
}
}
/// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a match could possibly start.</summary>
/// <param name="inputSpan">The text being scanned by the regular expression.</param>
/// <returns>true if a possible match was found; false if no more matches are possible.</returns>
private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
{
int pos = base.runtextpos;
// Any possible match is at least 6 characters.
if (pos <= inputSpan.Length - 6)
{
// The pattern leads with a beginning (\A) anchor.
if (pos == 0)
{
return true;
}
}
// No match found.
base.runtextpos = inputSpan.Length;
return false;
}
/// <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;
char ch;
int alternation_branch = 0;
int alternation_branch1 = 0;
int alternation_branch2 = 0;
int alternation_starting_capturepos = 0;
int alternation_starting_capturepos1 = 0;
int alternation_starting_capturepos2 = 0;
int alternation_starting_pos = 0;
int alternation_starting_pos1 = 0;
int alternation_starting_pos2 = 0;
int capture_starting_pos = 0;
int capture_starting_pos1 = 0;
int capture_starting_pos10 = 0;
int capture_starting_pos11 = 0;
int capture_starting_pos12 = 0;
int capture_starting_pos13 = 0;
int capture_starting_pos16 = 0;
int capture_starting_pos2 = 0;
int capture_starting_pos3 = 0;
int capture_starting_pos4 = 0;
int capture_starting_pos6 = 0;
int capture_starting_pos7 = 0;
int capture_starting_pos8 = 0;
int capture_starting_pos9 = 0;
int charloop_capture_pos = 0;
int charloop_capture_pos1 = 0;
int charloop_starting_pos = 0, charloop_ending_pos = 0;
int charloop_starting_pos1 = 0, charloop_ending_pos1 = 0;
int charloop_starting_pos2 = 0, charloop_ending_pos2 = 0;
int charloop_starting_pos3 = 0, charloop_ending_pos3 = 0;
int lazyloop_capturepos = 0;
int lazyloop_pos = 0;
int loop_iteration = 0;
int loop_iteration1 = 0;
int stackpos = 0;
int startingStackpos = 0;
ReadOnlySpan<char> slice = inputSpan.Slice(pos);
// Match if at the beginning of the string.
if (pos != 0)
{
UncaptureUntil(0);
return false; // The input didn't match.
}
// Match a whitespace character greedily any number of times.
//{
charloop_starting_pos = pos;
int iteration = 0;
while ((uint)iteration < (uint)slice.Length && char.IsWhiteSpace(slice[iteration]))
{
iteration++;
}
slice = slice.Slice(iteration);
pos += iteration;
charloop_ending_pos = pos;
goto CharLoopEnd;
CharLoopBacktrack:
UncaptureUntil(charloop_capture_pos);
if (Utilities.s_hasTimeout)
{
base.CheckTimeout();
}
if (charloop_starting_pos >= charloop_ending_pos)
{
UncaptureUntil(0);
return false; // The input didn't match.
}
pos = --charloop_ending_pos;
slice = inputSpan.Slice(pos);
CharLoopEnd:
charloop_capture_pos = base.Crawlpos();
//}
// 1st capture group.
//{
capture_starting_pos = pos;
// Match with 2 alternative expressions.
//{
alternation_starting_pos = pos;
alternation_starting_capturepos = base.Crawlpos();
// Branch 0
//{
// 2nd capture group.
//{
capture_starting_pos1 = pos;
// "ORIGIN" capture group.
//{
capture_starting_pos2 = pos;
// 3rd capture group.
//{
capture_starting_pos3 = pos;
// Match with 2 alternative expressions.
//{
alternation_starting_pos1 = pos;
alternation_starting_capturepos1 = base.Crawlpos();
// Branch 0
//{
// 4th capture group.
{
capture_starting_pos4 = pos;
// Optional (greedy).
{
startingStackpos = stackpos;
loop_iteration = 0;
LoopBody:
Utilities.StackPush(ref base.runstack!, ref stackpos, base.Crawlpos(), pos);
loop_iteration++;
// 5th capture group.
{
int capture_starting_pos5 = pos;
// Match a Unicode digit atomically at least once.
{
int iteration1 = 0;
while ((uint)iteration1 < (uint)slice.Length && char.IsDigit(slice[iteration1]))
{
iteration1++;
}
if (iteration1 == 0)
{
goto LoopIterationNoMatch;
}
slice = slice.Slice(iteration1);
pos += iteration1;
}
// Match '>'.
if (slice.IsEmpty || slice[0] != '>')
{
goto LoopIterationNoMatch;
}
pos++;
slice = inputSpan.Slice(pos);
base.Capture(5, capture_starting_pos5, pos);
}
// The loop has an upper bound of 1. Continue iterating greedily if it hasn't yet been reached.
if (loop_iteration == 0)
{
goto LoopBody;
}
goto LoopEnd;
// The loop iteration failed. Put state back to the way it was before the iteration.
LoopIterationNoMatch:
if (--loop_iteration < 0)
{
// Unable to match the remainder of the expression after exhausting the loop.
goto AlternationBranch1;
}
pos = base.runstack![--stackpos];
UncaptureUntil(base.runstack![--stackpos]);
slice = inputSpan.Slice(pos);
LoopEnd:
stackpos = startingStackpos; // Ensure any remaining backtracking state is removed.
}
// Match a character in the set [A-Za-z\u212A] atomically, optionally.
{
if (!slice.IsEmpty && ((ch = slice[0]) < 128 ? char.IsAsciiLetter(ch) : RegexRunner.CharInClass((char)ch, "\0\u0006\0A[a{KÅ")))
{
slice = slice.Slice(1);
pos++;
}
}
// Match ':'.
if (slice.IsEmpty || slice[0] != ':')
{
goto AlternationBranch1;
}
// Match a character other than ':' atomically any number of times.
{
int iteration2 = slice.Slice(1).IndexOf(':');
if (iteration2 < 0)
{
iteration2 = slice.Length - 1;
}
slice = slice.Slice(iteration2);
pos += iteration2;
}
pos++;
slice = inputSpan.Slice(pos);
base.Capture(4, capture_starting_pos4, pos);
}
alternation_branch1 = 0;
goto AlternationMatch1;
AlternationBranch1:
pos = alternation_starting_pos1;
slice = inputSpan.Slice(pos);
UncaptureUntil(alternation_starting_capturepos1);
//}
// Branch 1
//{
// 6th capture group.
{
capture_starting_pos6 = pos;
// Match a character other than ':' atomically any number of times.
{
int iteration3 = slice.IndexOf(':');
if (iteration3 < 0)
{
iteration3 = slice.Length;
}
slice = slice.Slice(iteration3);
pos += iteration3;
}
base.Capture(6, capture_starting_pos6, pos);
}
alternation_branch1 = 1;
goto AlternationMatch1;
//}
AlternationBacktrack1:
if (Utilities.s_hasTimeout)
{
base.CheckTimeout();
}
switch (alternation_branch1)
{
case 0:
goto AlternationBranch1;
case 1:
goto AlternationBranch;
}
AlternationMatch1:;
//}
base.Capture(3, capture_starting_pos3, pos);
goto CaptureSkipBacktrack;
CaptureBacktrack:
goto AlternationBacktrack1;
CaptureSkipBacktrack:;
//}
base.Capture(13, capture_starting_pos2, pos);
goto CaptureSkipBacktrack1;
CaptureBacktrack1:
goto CaptureBacktrack;
CaptureSkipBacktrack1:;
//}
// Match ':'.
if (slice.IsEmpty || slice[0] != ':')
{
goto CaptureBacktrack1;
}
pos++;
slice = inputSpan.Slice(pos);
base.Capture(2, capture_starting_pos1, pos);
goto CaptureSkipBacktrack2;
CaptureBacktrack2:
goto CaptureBacktrack1;
CaptureSkipBacktrack2:;
//}
alternation_branch = 0;
goto AlternationMatch;
AlternationBranch:
pos = alternation_starting_pos;
slice = inputSpan.Slice(pos);
UncaptureUntil(alternation_starting_capturepos);
//}
// Branch 1
//{
// 7th capture group.
{
capture_starting_pos7 = pos;
base.Capture(7, capture_starting_pos7, pos);
}
alternation_branch = 1;
goto AlternationMatch;
//}
AlternationBacktrack:
if (Utilities.s_hasTimeout)
{
base.CheckTimeout();
}
switch (alternation_branch)
{
case 0:
goto CaptureBacktrack2;
case 1:
goto CharLoopBacktrack;
}
AlternationMatch:;
//}
base.Capture(1, capture_starting_pos, pos);
goto CaptureSkipBacktrack3;
CaptureBacktrack3:
goto AlternationBacktrack;
CaptureSkipBacktrack3:;
//}
// "SUBCATEGORY" capture group.
//{
capture_starting_pos8 = pos;
// 8th capture group.
//{
capture_starting_pos9 = pos;
// Match with 2 alternative expressions.
//{
alternation_starting_pos2 = pos;
alternation_starting_capturepos2 = base.Crawlpos();
// Branch 0
//{
// 9th capture group.
{
capture_starting_pos10 = pos;
base.Capture(9, capture_starting_pos10, pos);
}
alternation_branch2 = 0;
goto AlternationMatch2;
AlternationBranch2:
pos = alternation_starting_pos2;
slice = inputSpan.Slice(pos);
UncaptureUntil(alternation_starting_capturepos2);
//}
// Branch 1
//{
// 10th capture group.
//{
capture_starting_pos11 = pos;
// Match a character other than ':' lazily any number of times.
//{
lazyloop_pos = pos;
goto LazyLoopEnd;
LazyLoopBacktrack:
UncaptureUntil(lazyloop_capturepos);
if (Utilities.s_hasTimeout)
{
base.CheckTimeout();
}
pos = lazyloop_pos;
slice = inputSpan.Slice(pos);
if (slice.IsEmpty || slice[0] == ':')
{
goto CaptureBacktrack3;
}
pos++;
slice = inputSpan.Slice(pos);
lazyloop_pos = slice.IndexOfAny(':', ' ');
if ((uint)lazyloop_pos >= (uint)slice.Length || slice[lazyloop_pos] == ':')
{
goto CaptureBacktrack3;
}
pos += lazyloop_pos;
slice = inputSpan.Slice(pos);
lazyloop_pos = pos;
LazyLoopEnd:
lazyloop_capturepos = base.Crawlpos();
//}
// Match ' '.
if (slice.IsEmpty || slice[0] != ' ')
{
goto LazyLoopBacktrack;
}
pos++;
slice = inputSpan.Slice(pos);
base.Capture(10, capture_starting_pos11, pos);
goto CaptureSkipBacktrack4;
CaptureBacktrack4:
goto LazyLoopBacktrack;
CaptureSkipBacktrack4:;
//}
alternation_branch2 = 1;
goto AlternationMatch2;
//}
AlternationBacktrack2:
if (Utilities.s_hasTimeout)
{
base.CheckTimeout();
}
switch (alternation_branch2)
{
case 0:
goto AlternationBranch2;
case 1:
goto CaptureBacktrack4;
}
AlternationMatch2:;
//}
base.Capture(8, capture_starting_pos9, pos);
goto CaptureSkipBacktrack5;
CaptureBacktrack5:
goto AlternationBacktrack2;
CaptureSkipBacktrack5:;
//}
base.Capture(14, capture_starting_pos8, pos);
goto CaptureSkipBacktrack6;
CaptureBacktrack6:
goto CaptureBacktrack5;
CaptureSkipBacktrack6:;
//}
// "CATEGORY" capture group.
//{
capture_starting_pos12 = pos;
// 11th capture group.
//{
capture_starting_pos13 = pos;
// Match with 2 alternative expressions.
//{
if (slice.IsEmpty)
{
goto CaptureBacktrack6;
}
switch (slice[0])
{
case 'E' or 'e':
if ((uint)slice.Length < 5 ||
!slice.Slice(1).StartsWith("rror", StringComparison.OrdinalIgnoreCase)) // Match the string "rror" (ordinal case-insensitive)
{
goto CaptureBacktrack6;
}
pos += 5;
slice = inputSpan.Slice(pos);
break;
case 'W' or 'w':
if ((uint)slice.Length < 7 ||
!slice.Slice(1).StartsWith("arning", StringComparison.OrdinalIgnoreCase)) // Match the string "arning" (ordinal case-insensitive)
{
goto CaptureBacktrack6;
}
pos += 7;
slice = inputSpan.Slice(pos);
break;
default:
goto CaptureBacktrack6;
}
//}
base.Capture(11, capture_starting_pos13, pos);
//}
base.Capture(15, capture_starting_pos12, pos);
//}
// Optional (greedy).
//{
loop_iteration1 = 0;
LoopBody1:
Utilities.StackPush(ref base.runstack!, ref stackpos, base.Crawlpos(), pos);
loop_iteration1++;
// 12th capture group.
//{
int capture_starting_pos14 = pos;
// Match ' '.
if (slice.IsEmpty || slice[0] != ' ')
{
goto LoopIterationNoMatch1;
}
// Match a whitespace character greedily any number of times.
//{
pos++;
slice = inputSpan.Slice(pos);
charloop_starting_pos1 = pos;
int iteration4 = 0;
while ((uint)iteration4 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration4]))
{
iteration4++;
}
slice = slice.Slice(iteration4);
pos += iteration4;
charloop_ending_pos1 = pos;
goto CharLoopEnd1;
CharLoopBacktrack1:
UncaptureUntil(base.runstack![--stackpos]);
Utilities.StackPop(base.runstack!, ref stackpos, out charloop_ending_pos1, out charloop_starting_pos1);
if (Utilities.s_hasTimeout)
{
base.CheckTimeout();
}
if (charloop_starting_pos1 >= charloop_ending_pos1)
{
goto LoopIterationNoMatch1;
}
pos = --charloop_ending_pos1;
slice = inputSpan.Slice(pos);
CharLoopEnd1:
Utilities.StackPush(ref base.runstack!, ref stackpos, charloop_starting_pos1, charloop_ending_pos1, base.Crawlpos());
//}
// "CODE" capture group.
//{
int capture_starting_pos15 = pos;
// Match a character in the set [^ :] greedily any number of times.
//{
charloop_starting_pos2 = pos;
int iteration5 = slice.IndexOfAny(' ', ':');
if (iteration5 < 0)
{
iteration5 = slice.Length;
}
slice = slice.Slice(iteration5);
pos += iteration5;
charloop_ending_pos2 = pos;
goto CharLoopEnd2;
CharLoopBacktrack2:
UncaptureUntil(base.runstack![--stackpos]);
Utilities.StackPop(base.runstack!, ref stackpos, out charloop_ending_pos2, out charloop_starting_pos2);
if (Utilities.s_hasTimeout)
{
base.CheckTimeout();
}
if (charloop_starting_pos2 >= charloop_ending_pos2)
{
goto CharLoopBacktrack1;
}
pos = --charloop_ending_pos2;
slice = inputSpan.Slice(pos);
CharLoopEnd2:
Utilities.StackPush(ref base.runstack!, ref stackpos, charloop_starting_pos2, charloop_ending_pos2, base.Crawlpos());
//}
base.Capture(16, capture_starting_pos15, pos);
Utilities.StackPush(ref base.runstack!, ref stackpos, capture_starting_pos15);
goto CaptureSkipBacktrack7;
CaptureBacktrack7:
capture_starting_pos15 = base.runstack![--stackpos];
goto CharLoopBacktrack2;
CaptureSkipBacktrack7:;
//}
base.Capture(12, capture_starting_pos14, pos);
Utilities.StackPush(ref base.runstack!, ref stackpos, capture_starting_pos14);
goto CaptureSkipBacktrack8;
CaptureBacktrack8:
capture_starting_pos14 = base.runstack![--stackpos];
goto CaptureBacktrack7;
CaptureSkipBacktrack8:;
//}
// The loop has an upper bound of 1. Continue iterating greedily if it hasn't yet been reached.
if (loop_iteration1 == 0)
{
goto LoopBody1;
}
goto LoopEnd1;
// The loop iteration failed. Put state back to the way it was before the iteration.
LoopIterationNoMatch1:
if (--loop_iteration1 < 0)
{
// Unable to match the remainder of the expression after exhausting the loop.
goto CaptureBacktrack6;
}
pos = base.runstack![--stackpos];
UncaptureUntil(base.runstack![--stackpos]);
slice = inputSpan.Slice(pos);
goto LoopEnd1;
LoopBacktrack:
if (Utilities.s_hasTimeout)
{
base.CheckTimeout();
}
if (loop_iteration1 == 0)
{
// No iterations of the loop remain to backtrack into. Fail the loop.
goto CaptureBacktrack6;
}
goto CaptureBacktrack8;
LoopEnd1:;
//}
// Match a whitespace character atomically any number of times.
{
int iteration6 = 0;
while ((uint)iteration6 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration6]))
{
iteration6++;
}
slice = slice.Slice(iteration6);
pos += iteration6;
}
// Match ':'.
if (slice.IsEmpty || slice[0] != ':')
{
goto LoopBacktrack;
}
// "TEXT" capture group.
//{
pos++;
slice = inputSpan.Slice(pos);
capture_starting_pos16 = pos;
// Match a character other than '\n' greedily any number of times.
//{
charloop_starting_pos3 = pos;
int iteration7 = slice.IndexOf('\n');
if (iteration7 < 0)
{
iteration7 = slice.Length;
}
slice = slice.Slice(iteration7);
pos += iteration7;
charloop_ending_pos3 = pos;
goto CharLoopEnd3;
CharLoopBacktrack3:
UncaptureUntil(charloop_capture_pos1);
if (Utilities.s_hasTimeout)
{
base.CheckTimeout();
}
if (charloop_starting_pos3 >= charloop_ending_pos3)
{
goto LoopBacktrack;
}
pos = --charloop_ending_pos3;
slice = inputSpan.Slice(pos);
CharLoopEnd3:
charloop_capture_pos1 = base.Crawlpos();
//}
base.Capture(17, capture_starting_pos16, pos);
goto CaptureSkipBacktrack9;
CaptureBacktrack9:
goto CharLoopBacktrack3;
CaptureSkipBacktrack9:;
//}
// Match if at the end of the string or if before an ending newline.
if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n'))
{
goto CaptureBacktrack9;
}
// The input matched.
base.runtextpos = pos;
base.Capture(0, matchStart, pos);
return true;
// <summary>Undo captures until it reaches the specified capture position.</summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
void UncaptureUntil(int capturePosition)
{
while (base.Crawlpos() > capturePosition)
{
base.Uncapture();
}
}
}
}
}
}
/// <summary>Custom <see cref="Regex"/>-derived type for the OriginCategoryCodeTextExpression2 method.</summary>
[GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "11.0.14.27024")]
[SkipLocalsInit]
file sealed class OriginCategoryCodeTextExpression2_1 : Regex
{
/// <summary>Cached, thread-safe singleton instance.</summary>
internal static readonly OriginCategoryCodeTextExpression2_1 Instance = new();
/// <summary>Initializes the instance.</summary>
private OriginCategoryCodeTextExpression2_1()
{
base.pattern = "^\\s*(?<ORIGIN>(?<FILENAME>.*):(?<LOCATION>(?<LINE>[0-9]*):(?<COLUMN>[0-9]*))):(?<CATEGORY> error| warning):(?<TEXT>.*)";
base.roptions = RegexOptions.IgnoreCase;
ValidateMatchTimeout(Utilities.s_defaultTimeout);
base.internalMatchTimeout = Utilities.s_defaultTimeout;
base.factory = new RunnerFactory();
base.CapNames = new Hashtable { { "0", 0 } , { "CATEGORY", 6 } , { "COLUMN", 5 } , { "FILENAME", 2 } , { "LINE", 4 } , { "LOCATION", 3 } , { "ORIGIN", 1 } , { "TEXT", 7 } };
base.capslist = new string[] {"0", "ORIGIN", "FILENAME", "LOCATION", "LINE", "COLUMN", "CATEGORY", "TEXT" };
base.capsize = 8;
}
/// <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)
{
// The pattern is anchored. Validate the current position and try to match at it only.
if (TryFindNextPossibleStartingPosition(inputSpan) && !TryMatchAtCurrentPosition(inputSpan))
{
base.runtextpos = inputSpan.Length;
}
}
/// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a match could possibly start.</summary>
/// <param name="inputSpan">The text being scanned by the regular expression.</param>
/// <returns>true if a possible match was found; false if no more matches are possible.</returns>
private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
{
int pos = base.runtextpos;
// Any possible match is at least 10 characters.
if (pos <= inputSpan.Length - 10)
{
// The pattern leads with a beginning (\A) anchor.
if (pos == 0)
{
return true;
}
}
// No match found.
base.runtextpos = inputSpan.Length;
return false;
}
/// <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;
int capture_starting_pos = 0;
int capture_starting_pos1 = 0;
int capture_starting_pos2 = 0;
int capture_starting_pos3 = 0;
int capture_starting_pos4 = 0;
int capture_starting_pos5 = 0;
int capture_starting_pos6 = 0;
int charloop_capture_pos = 0;
int charloop_capture_pos1 = 0;
int charloop_starting_pos = 0, charloop_ending_pos = 0;
int charloop_starting_pos1 = 0, charloop_ending_pos1 = 0;
ReadOnlySpan<char> slice = inputSpan.Slice(pos);
// Match if at the beginning of the string.
if (pos != 0)
{
UncaptureUntil(0);
return false; // The input didn't match.
}
// Match a whitespace character greedily any number of times.
//{
charloop_starting_pos = pos;
int iteration = 0;
while ((uint)iteration < (uint)slice.Length && char.IsWhiteSpace(slice[iteration]))
{
iteration++;
}
slice = slice.Slice(iteration);
pos += iteration;
charloop_ending_pos = pos;
goto CharLoopEnd;
CharLoopBacktrack:
UncaptureUntil(charloop_capture_pos);
if (Utilities.s_hasTimeout)
{
base.CheckTimeout();
}
if (charloop_starting_pos >= charloop_ending_pos)
{
UncaptureUntil(0);
return false; // The input didn't match.
}
pos = --charloop_ending_pos;
slice = inputSpan.Slice(pos);
CharLoopEnd:
charloop_capture_pos = base.Crawlpos();
//}
// "ORIGIN" capture group.
//{
capture_starting_pos = pos;
// "FILENAME" capture group.
//{
capture_starting_pos1 = pos;
// Match a character other than '\n' greedily any number of times.
//{
charloop_starting_pos1 = pos;
int iteration1 = slice.IndexOf('\n');
if (iteration1 < 0)
{
iteration1 = slice.Length;
}
slice = slice.Slice(iteration1);
pos += iteration1;
charloop_ending_pos1 = pos;
goto CharLoopEnd1;
CharLoopBacktrack1:
UncaptureUntil(charloop_capture_pos1);
if (Utilities.s_hasTimeout)
{
base.CheckTimeout();
}
if (charloop_starting_pos1 >= charloop_ending_pos1 ||
(charloop_ending_pos1 = inputSpan.Slice(charloop_starting_pos1, charloop_ending_pos1 - charloop_starting_pos1).LastIndexOf(':')) < 0)
{
goto CharLoopBacktrack;
}
charloop_ending_pos1 += charloop_starting_pos1;
pos = charloop_ending_pos1;
slice = inputSpan.Slice(pos);
CharLoopEnd1:
charloop_capture_pos1 = base.Crawlpos();
//}
base.Capture(2, capture_starting_pos1, pos);
goto CaptureSkipBacktrack;
CaptureBacktrack:
goto CharLoopBacktrack1;
CaptureSkipBacktrack:;
//}
// Match ':'.
if (slice.IsEmpty || slice[0] != ':')
{
goto CaptureBacktrack;
}
// "LOCATION" capture group.
{
pos++;
slice = inputSpan.Slice(pos);
capture_starting_pos2 = pos;
// "LINE" capture group.
{
capture_starting_pos3 = pos;
// Match a character in the set [0-9] atomically any number of times.
{
int iteration2 = slice.IndexOfAnyExceptInRange('0', '9');
if (iteration2 < 0)
{
iteration2 = slice.Length;
}
slice = slice.Slice(iteration2);
pos += iteration2;
}
base.Capture(4, capture_starting_pos3, pos);
}
// Match ':'.
if (slice.IsEmpty || slice[0] != ':')
{
goto CaptureBacktrack;
}
// "COLUMN" capture group.
{
pos++;
slice = inputSpan.Slice(pos);
capture_starting_pos4 = pos;
// Match a character in the set [0-9] atomically any number of times.
{
int iteration3 = slice.IndexOfAnyExceptInRange('0', '9');
if (iteration3 < 0)
{
iteration3 = slice.Length;
}
slice = slice.Slice(iteration3);
pos += iteration3;
}
base.Capture(5, capture_starting_pos4, pos);
}
base.Capture(3, capture_starting_pos2, pos);
}
base.Capture(1, capture_starting_pos, pos);
goto CaptureSkipBacktrack1;
CaptureBacktrack1:
goto CaptureBacktrack;
CaptureSkipBacktrack1:;
//}
// Match ':'.
if (slice.IsEmpty || slice[0] != ':')
{
goto CaptureBacktrack1;
}
// "CATEGORY" capture group.
//{
pos++;
slice = inputSpan.Slice(pos);
capture_starting_pos5 = pos;
// Match ' '.
if (slice.IsEmpty || slice[0] != ' ')
{
goto CaptureBacktrack1;
}
// Match with 2 alternative expressions.
//{
if ((uint)slice.Length < 2)
{
goto CaptureBacktrack1;
}
switch (slice[1])
{
case 'E' or 'e':
if ((uint)slice.Length < 6 ||
!slice.Slice(2).StartsWith("rror", StringComparison.OrdinalIgnoreCase)) // Match the string "rror" (ordinal case-insensitive)
{
goto CaptureBacktrack1;
}
pos += 6;
slice = inputSpan.Slice(pos);
break;
case 'W' or 'w':
if ((uint)slice.Length < 8 ||
!slice.Slice(2).StartsWith("arning", StringComparison.OrdinalIgnoreCase)) // Match the string "arning" (ordinal case-insensitive)
{
goto CaptureBacktrack1;
}
pos += 8;
slice = inputSpan.Slice(pos);
break;
default:
goto CaptureBacktrack1;
}
//}
base.Capture(6, capture_starting_pos5, pos);
//}
// Match ':'.
if (slice.IsEmpty || slice[0] != ':')
{
goto CaptureBacktrack1;
}
// "TEXT" capture group.
{
pos++;
slice = inputSpan.Slice(pos);
capture_starting_pos6 = pos;
// Match a character other than '\n' atomically any number of times.
{
int iteration4 = slice.IndexOf('\n');
if (iteration4 < 0)
{
iteration4 = slice.Length;
}
slice = slice.Slice(iteration4);
pos += iteration4;
}
base.Capture(7, capture_starting_pos6, pos);
}
// The input matched.
base.runtextpos = pos;
base.Capture(0, matchStart, pos);
return true;
// <summary>Undo captures until it reaches the specified capture position.</summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
void UncaptureUntil(int capturePosition)
{
while (base.Crawlpos() > capturePosition)
{
base.Uncapture();
}
}
}
}
}
}
/// <summary>Custom <see cref="Regex"/>-derived type for the FilenameLocationFromOrigin method.</summary>
[GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "11.0.14.27024")]
[SkipLocalsInit]
file sealed class FilenameLocationFromOrigin_2 : Regex
{
/// <summary>Cached, thread-safe singleton instance.</summary>
internal static readonly FilenameLocationFromOrigin_2 Instance = new();
/// <summary>Initializes the instance.</summary>
private FilenameLocationFromOrigin_2()
{
base.pattern = "^(\\d+>)?(?<FILENAME>.*)\\((?<LOCATION>[\\,,0-9,-]*)\\)\\s*$";
base.roptions = RegexOptions.IgnoreCase;
ValidateMatchTimeout(Utilities.s_defaultTimeout);
base.internalMatchTimeout = Utilities.s_defaultTimeout;
base.factory = new RunnerFactory();
base.CapNames = new Hashtable { { "0", 0 } , { "1", 1 } , { "FILENAME", 2 } , { "LOCATION", 3 } };
base.capslist = new string[] {"0", "1", "FILENAME", "LOCATION" };
base.capsize = 4;
}
/// <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)
{
// The pattern is anchored. Validate the current position and try to match at it only.
if (TryFindNextPossibleStartingPosition(inputSpan) && !TryMatchAtCurrentPosition(inputSpan))
{
base.runtextpos = inputSpan.Length;
}
}
/// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a match could possibly start.</summary>
/// <param name="inputSpan">The text being scanned by the regular expression.</param>
/// <returns>true if a possible match was found; false if no more matches are possible.</returns>
private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
{
int pos = base.runtextpos;
// Any possible match is at least 2 characters.
if (pos <= inputSpan.Length - 2)
{
// The pattern leads with a beginning (\A) anchor.
if (pos == 0)
{
return true;
}
}
// No match found.
base.runtextpos = inputSpan.Length;
return false;
}
/// <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;
int capture_starting_pos1 = 0;
int capture_starting_pos2 = 0;
int charloop_capture_pos = 0;
int charloop_capture_pos1 = 0;
int charloop_starting_pos = 0, charloop_ending_pos = 0;
int charloop_starting_pos1 = 0, charloop_ending_pos1 = 0;
int loop_iteration = 0;
int stackpos = 0;
ReadOnlySpan<char> slice = inputSpan.Slice(pos);
// Match if at the beginning of the string.
if (pos != 0)
{
UncaptureUntil(0);
return false; // The input didn't match.
}
// Optional (greedy).
//{
loop_iteration = 0;
LoopBody:
Utilities.StackPush(ref base.runstack!, ref stackpos, base.Crawlpos(), pos);
loop_iteration++;
// 1st capture group.
{
int capture_starting_pos = pos;
// Match a Unicode digit atomically at least once.
{
int iteration = 0;
while ((uint)iteration < (uint)slice.Length && char.IsDigit(slice[iteration]))
{
iteration++;
}
if (iteration == 0)
{
goto LoopIterationNoMatch;
}
slice = slice.Slice(iteration);
pos += iteration;
}
// Match '>'.
if (slice.IsEmpty || slice[0] != '>')
{
goto LoopIterationNoMatch;
}
pos++;
slice = inputSpan.Slice(pos);
base.Capture(1, capture_starting_pos, pos);
}
// The loop has an upper bound of 1. Continue iterating greedily if it hasn't yet been reached.
if (loop_iteration == 0)
{
goto LoopBody;
}
goto LoopEnd;
// The loop iteration failed. Put state back to the way it was before the iteration.
LoopIterationNoMatch:
if (--loop_iteration < 0)
{
// Unable to match the remainder of the expression after exhausting the loop.
UncaptureUntil(0);
return false; // The input didn't match.
}
pos = base.runstack![--stackpos];
UncaptureUntil(base.runstack![--stackpos]);
slice = inputSpan.Slice(pos);
LoopEnd:;
//}
// "FILENAME" capture group.
//{
capture_starting_pos1 = pos;
// Match a character other than '\n' greedily any number of times.
//{
charloop_starting_pos = pos;
int iteration1 = slice.IndexOf('\n');
if (iteration1 < 0)
{
iteration1 = slice.Length;
}
slice = slice.Slice(iteration1);
pos += iteration1;
charloop_ending_pos = pos;
goto CharLoopEnd;
CharLoopBacktrack:
UncaptureUntil(charloop_capture_pos);
if (Utilities.s_hasTimeout)
{
base.CheckTimeout();
}
if (charloop_starting_pos >= charloop_ending_pos ||
(charloop_ending_pos = inputSpan.Slice(charloop_starting_pos, charloop_ending_pos - charloop_starting_pos).LastIndexOf('(')) < 0)
{
goto LoopIterationNoMatch;
}
charloop_ending_pos += charloop_starting_pos;
pos = charloop_ending_pos;
slice = inputSpan.Slice(pos);
CharLoopEnd:
charloop_capture_pos = base.Crawlpos();
//}
base.Capture(2, capture_starting_pos1, pos);
goto CaptureSkipBacktrack;
CaptureBacktrack:
goto CharLoopBacktrack;
CaptureSkipBacktrack:;
//}
// Match '('.
if (slice.IsEmpty || slice[0] != '(')
{
goto CaptureBacktrack;
}
// "LOCATION" capture group.
{
pos++;
slice = inputSpan.Slice(pos);
capture_starting_pos2 = pos;
// Match a character in the set [,\-0-9] atomically any number of times.
{
int iteration2 = slice.IndexOfAnyExcept(Utilities.s_ascii_30FF030000000000000000);
if (iteration2 < 0)
{
iteration2 = slice.Length;
}
slice = slice.Slice(iteration2);
pos += iteration2;
}
base.Capture(3, capture_starting_pos2, pos);
}
// Match ')'.
if (slice.IsEmpty || slice[0] != ')')
{
goto CaptureBacktrack;
}
// Match a whitespace character greedily any number of times.
//{
pos++;
slice = inputSpan.Slice(pos);
charloop_starting_pos1 = pos;
int iteration3 = 0;
while ((uint)iteration3 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration3]))
{
iteration3++;
}
slice = slice.Slice(iteration3);
pos += iteration3;
charloop_ending_pos1 = pos;
goto CharLoopEnd1;
CharLoopBacktrack1:
UncaptureUntil(charloop_capture_pos1);
if (Utilities.s_hasTimeout)
{
base.CheckTimeout();
}
if (charloop_starting_pos1 >= charloop_ending_pos1)
{
goto CaptureBacktrack;
}
pos = --charloop_ending_pos1;
slice = inputSpan.Slice(pos);
CharLoopEnd1:
charloop_capture_pos1 = base.Crawlpos();
//}
// Match if at the end of the string or if before an ending newline.
if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n'))
{
goto CharLoopBacktrack1;
}
// The input matched.
base.runtextpos = pos;
base.Capture(0, matchStart, pos);
return true;
// <summary>Undo captures until it reaches the specified capture position.</summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
void UncaptureUntil(int capturePosition)
{
while (base.Crawlpos() > capturePosition)
{
base.Uncapture();
}
}
}
}
}
}
/// <summary>Custom <see cref="Regex"/>-derived type for the LineFromLocation method.</summary>
[GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "11.0.14.27024")]
[SkipLocalsInit]
file sealed class LineFromLocation_3 : Regex
{
/// <summary>Cached, thread-safe singleton instance.</summary>
internal static readonly LineFromLocation_3 Instance = new();
/// <summary>Initializes the instance.</summary>
private LineFromLocation_3()
{
base.pattern = "^(?<LINE>[0-9]*)$";
base.roptions = RegexOptions.IgnoreCase;
ValidateMatchTimeout(Utilities.s_defaultTimeout);
base.internalMatchTimeout = Utilities.s_defaultTimeout;
base.factory = new RunnerFactory();
base.CapNames = new Hashtable { { "0", 0 } , { "LINE", 1 } };
base.capslist = new string[] {"0", "LINE" };
base.capsize = 2;
}
/// <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)
{
// The pattern is anchored. Validate the current position and try to match at it only.
if (TryFindNextPossibleStartingPosition(inputSpan) && !TryMatchAtCurrentPosition(inputSpan))
{
base.runtextpos = inputSpan.Length;
}
}
/// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a match could possibly start.</summary>
/// <param name="inputSpan">The text being scanned by the regular expression.</param>
/// <returns>true if a possible match was found; false if no more matches are possible.</returns>
private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
{
int pos = base.runtextpos;
// The pattern leads with a beginning (\A) anchor.
if (pos == 0)
{
return true;
}
// No match found.
base.runtextpos = inputSpan.Length;
return false;
}
/// <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;
int capture_starting_pos = 0;
ReadOnlySpan<char> slice = inputSpan.Slice(pos);
// Match if at the beginning of the string.
if (pos != 0)
{
UncaptureUntil(0);
return false; // The input didn't match.
}
// "LINE" capture group.
{
capture_starting_pos = pos;
// Match a character in the set [0-9] atomically any number of times.
{
int iteration = slice.IndexOfAnyExceptInRange('0', '9');
if (iteration < 0)
{
iteration = slice.Length;
}
slice = slice.Slice(iteration);
pos += iteration;
}
base.Capture(1, capture_starting_pos, pos);
}
// Match if at the end of the string or if before an ending newline.
if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n'))
{
UncaptureUntil(0);
return false; // The input didn't match.
}
// The input matched.
base.runtextpos = pos;
base.Capture(0, matchStart, pos);
return true;
// <summary>Undo captures until it reaches the specified capture position.</summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
void UncaptureUntil(int capturePosition)
{
while (base.Crawlpos() > capturePosition)
{
base.Uncapture();
}
}
}
}
}
}
/// <summary>Custom <see cref="Regex"/>-derived type for the LineLineFromLocation method.</summary>
[GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "11.0.14.27024")]
[SkipLocalsInit]
file sealed class LineLineFromLocation_4 : Regex
{
/// <summary>Cached, thread-safe singleton instance.</summary>
internal static readonly LineLineFromLocation_4 Instance = new();
/// <summary>Initializes the instance.</summary>
private LineLineFromLocation_4()
{
base.pattern = "^(?<LINE>[0-9]*)-(?<ENDLINE>[0-9]*)$";
base.roptions = RegexOptions.IgnoreCase;
ValidateMatchTimeout(Utilities.s_defaultTimeout);
base.internalMatchTimeout = Utilities.s_defaultTimeout;
base.factory = new RunnerFactory();
base.CapNames = new Hashtable { { "0", 0 } , { "ENDLINE", 2 } , { "LINE", 1 } };
base.capslist = new string[] {"0", "LINE", "ENDLINE" };
base.capsize = 3;
}
/// <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)
{
// The pattern is anchored. Validate the current position and try to match at it only.
if (TryFindNextPossibleStartingPosition(inputSpan) && !TryMatchAtCurrentPosition(inputSpan))
{
base.runtextpos = inputSpan.Length;
}
}
/// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a match could possibly start.</summary>
/// <param name="inputSpan">The text being scanned by the regular expression.</param>
/// <returns>true if a possible match was found; false if no more matches are possible.</returns>
private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
{
int pos = base.runtextpos;
// Empty matches aren't possible.
if ((uint)pos < (uint)inputSpan.Length)
{
// The pattern leads with a beginning (\A) anchor.
if (pos == 0)
{
return true;
}
}
// No match found.
base.runtextpos = inputSpan.Length;
return false;
}
/// <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;
int capture_starting_pos = 0;
int capture_starting_pos1 = 0;
ReadOnlySpan<char> slice = inputSpan.Slice(pos);
// Match if at the beginning of the string.
if (pos != 0)
{
UncaptureUntil(0);
return false; // The input didn't match.
}
// "LINE" capture group.
{
capture_starting_pos = pos;
// Match a character in the set [0-9] atomically any number of times.
{
int iteration = slice.IndexOfAnyExceptInRange('0', '9');
if (iteration < 0)
{
iteration = slice.Length;
}
slice = slice.Slice(iteration);
pos += iteration;
}
base.Capture(1, capture_starting_pos, pos);
}
// Match '-'.
if (slice.IsEmpty || slice[0] != '-')
{
UncaptureUntil(0);
return false; // The input didn't match.
}
// "ENDLINE" capture group.
{
pos++;
slice = inputSpan.Slice(pos);
capture_starting_pos1 = pos;
// Match a character in the set [0-9] atomically any number of times.
{
int iteration1 = slice.IndexOfAnyExceptInRange('0', '9');
if (iteration1 < 0)
{
iteration1 = slice.Length;
}
slice = slice.Slice(iteration1);
pos += iteration1;
}
base.Capture(2, capture_starting_pos1, pos);
}
// Match if at the end of the string or if before an ending newline.
if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n'))
{
UncaptureUntil(0);
return false; // The input didn't match.
}
// The input matched.
base.runtextpos = pos;
base.Capture(0, matchStart, pos);
return true;
// <summary>Undo captures until it reaches the specified capture position.</summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
void UncaptureUntil(int capturePosition)
{
while (base.Crawlpos() > capturePosition)
{
base.Uncapture();
}
}
}
}
}
}
/// <summary>Custom <see cref="Regex"/>-derived type for the LineColFromLocation method.</summary>
[GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "11.0.14.27024")]
[SkipLocalsInit]
file sealed class LineColFromLocation_5 : Regex
{
/// <summary>Cached, thread-safe singleton instance.</summary>
internal static readonly LineColFromLocation_5 Instance = new();
/// <summary>Initializes the instance.</summary>
private LineColFromLocation_5()
{
base.pattern = "^(?<LINE>[0-9]*),(?<COLUMN>[0-9]*)$";
base.roptions = RegexOptions.IgnoreCase;
ValidateMatchTimeout(Utilities.s_defaultTimeout);
base.internalMatchTimeout = Utilities.s_defaultTimeout;
base.factory = new RunnerFactory();
base.CapNames = new Hashtable { { "0", 0 } , { "COLUMN", 2 } , { "LINE", 1 } };
base.capslist = new string[] {"0", "LINE", "COLUMN" };
base.capsize = 3;
}
/// <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)
{
// The pattern is anchored. Validate the current position and try to match at it only.
if (TryFindNextPossibleStartingPosition(inputSpan) && !TryMatchAtCurrentPosition(inputSpan))
{
base.runtextpos = inputSpan.Length;
}
}
/// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a match could possibly start.</summary>
/// <param name="inputSpan">The text being scanned by the regular expression.</param>
/// <returns>true if a possible match was found; false if no more matches are possible.</returns>
private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
{
int pos = base.runtextpos;
// Empty matches aren't possible.
if ((uint)pos < (uint)inputSpan.Length)
{
// The pattern leads with a beginning (\A) anchor.
if (pos == 0)
{
return true;
}
}
// No match found.
base.runtextpos = inputSpan.Length;
return false;
}
/// <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;
int capture_starting_pos = 0;
int capture_starting_pos1 = 0;
ReadOnlySpan<char> slice = inputSpan.Slice(pos);
// Match if at the beginning of the string.
if (pos != 0)
{
UncaptureUntil(0);
return false; // The input didn't match.
}
// "LINE" capture group.
{
capture_starting_pos = pos;
// Match a character in the set [0-9] atomically any number of times.
{
int iteration = slice.IndexOfAnyExceptInRange('0', '9');
if (iteration < 0)
{
iteration = slice.Length;
}
slice = slice.Slice(iteration);
pos += iteration;
}
base.Capture(1, capture_starting_pos, pos);
}
// Match ','.
if (slice.IsEmpty || slice[0] != ',')
{
UncaptureUntil(0);
return false; // The input didn't match.
}
// "COLUMN" capture group.
{
pos++;
slice = inputSpan.Slice(pos);
capture_starting_pos1 = pos;
// Match a character in the set [0-9] atomically any number of times.
{
int iteration1 = slice.IndexOfAnyExceptInRange('0', '9');
if (iteration1 < 0)
{
iteration1 = slice.Length;
}
slice = slice.Slice(iteration1);
pos += iteration1;
}
base.Capture(2, capture_starting_pos1, pos);
}
// Match if at the end of the string or if before an ending newline.
if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n'))
{
UncaptureUntil(0);
return false; // The input didn't match.
}
// The input matched.
base.runtextpos = pos;
base.Capture(0, matchStart, pos);
return true;
// <summary>Undo captures until it reaches the specified capture position.</summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
void UncaptureUntil(int capturePosition)
{
while (base.Crawlpos() > capturePosition)
{
base.Uncapture();
}
}
}
}
}
}
/// <summary>Custom <see cref="Regex"/>-derived type for the LineColColFromLocation method.</summary>
[GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "11.0.14.27024")]
[SkipLocalsInit]
file sealed class LineColColFromLocation_6 : Regex
{
/// <summary>Cached, thread-safe singleton instance.</summary>
internal static readonly LineColColFromLocation_6 Instance = new();
/// <summary>Initializes the instance.</summary>
private LineColColFromLocation_6()
{
base.pattern = "^(?<LINE>[0-9]*),(?<COLUMN>[0-9]*)-(?<ENDCOLUMN>[0-9]*)$";
base.roptions = RegexOptions.IgnoreCase;
ValidateMatchTimeout(Utilities.s_defaultTimeout);
base.internalMatchTimeout = Utilities.s_defaultTimeout;
base.factory = new RunnerFactory();
base.CapNames = new Hashtable { { "0", 0 } , { "COLUMN", 2 } , { "ENDCOLUMN", 3 } , { "LINE", 1 } };
base.capslist = new string[] {"0", "LINE", "COLUMN", "ENDCOLUMN" };
base.capsize = 4;
}
/// <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)
{
// The pattern is anchored. Validate the current position and try to match at it only.
if (TryFindNextPossibleStartingPosition(inputSpan) && !TryMatchAtCurrentPosition(inputSpan))
{
base.runtextpos = inputSpan.Length;
}
}
/// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a match could possibly start.</summary>
/// <param name="inputSpan">The text being scanned by the regular expression.</param>
/// <returns>true if a possible match was found; false if no more matches are possible.</returns>
private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
{
int pos = base.runtextpos;
// Any possible match is at least 2 characters.
if (pos <= inputSpan.Length - 2)
{
// The pattern leads with a beginning (\A) anchor.
if (pos == 0)
{
return true;
}
}
// No match found.
base.runtextpos = inputSpan.Length;
return false;
}
/// <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;
int capture_starting_pos = 0;
int capture_starting_pos1 = 0;
int capture_starting_pos2 = 0;
ReadOnlySpan<char> slice = inputSpan.Slice(pos);
// Match if at the beginning of the string.
if (pos != 0)
{
UncaptureUntil(0);
return false; // The input didn't match.
}
// "LINE" capture group.
{
capture_starting_pos = pos;
// Match a character in the set [0-9] atomically any number of times.
{
int iteration = slice.IndexOfAnyExceptInRange('0', '9');
if (iteration < 0)
{
iteration = slice.Length;
}
slice = slice.Slice(iteration);
pos += iteration;
}
base.Capture(1, capture_starting_pos, pos);
}
// Match ','.
if (slice.IsEmpty || slice[0] != ',')
{
UncaptureUntil(0);
return false; // The input didn't match.
}
// "COLUMN" capture group.
{
pos++;
slice = inputSpan.Slice(pos);
capture_starting_pos1 = pos;
// Match a character in the set [0-9] atomically any number of times.
{
int iteration1 = slice.IndexOfAnyExceptInRange('0', '9');
if (iteration1 < 0)
{
iteration1 = slice.Length;
}
slice = slice.Slice(iteration1);
pos += iteration1;
}
base.Capture(2, capture_starting_pos1, pos);
}
// Match '-'.
if (slice.IsEmpty || slice[0] != '-')
{
UncaptureUntil(0);
return false; // The input didn't match.
}
// "ENDCOLUMN" capture group.
{
pos++;
slice = inputSpan.Slice(pos);
capture_starting_pos2 = pos;
// Match a character in the set [0-9] atomically any number of times.
{
int iteration2 = slice.IndexOfAnyExceptInRange('0', '9');
if (iteration2 < 0)
{
iteration2 = slice.Length;
}
slice = slice.Slice(iteration2);
pos += iteration2;
}
base.Capture(3, capture_starting_pos2, pos);
}
// Match if at the end of the string or if before an ending newline.
if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n'))
{
UncaptureUntil(0);
return false; // The input didn't match.
}
// The input matched.
base.runtextpos = pos;
base.Capture(0, matchStart, pos);
return true;
// <summary>Undo captures until it reaches the specified capture position.</summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
void UncaptureUntil(int capturePosition)
{
while (base.Crawlpos() > capturePosition)
{
base.Uncapture();
}
}
}
}
}
}
/// <summary>Custom <see cref="Regex"/>-derived type for the LineColLineColFromLocation method.</summary>
[GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "11.0.14.27024")]
[SkipLocalsInit]
file sealed class LineColLineColFromLocation_7 : Regex
{
/// <summary>Cached, thread-safe singleton instance.</summary>
internal static readonly LineColLineColFromLocation_7 Instance = new();
/// <summary>Initializes the instance.</summary>
private LineColLineColFromLocation_7()
{
base.pattern = "^(?<LINE>[0-9]*),(?<COLUMN>[0-9]*),(?<ENDLINE>[0-9]*),(?<ENDCOLUMN>[0-9]*)$";
base.roptions = RegexOptions.IgnoreCase;
ValidateMatchTimeout(Utilities.s_defaultTimeout);
base.internalMatchTimeout = Utilities.s_defaultTimeout;
base.factory = new RunnerFactory();
base.CapNames = new Hashtable { { "0", 0 } , { "COLUMN", 2 } , { "ENDCOLUMN", 4 } , { "ENDLINE", 3 } , { "LINE", 1 } };
base.capslist = new string[] {"0", "LINE", "COLUMN", "ENDLINE", "ENDCOLUMN" };
base.capsize = 5;
}
/// <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)
{
// The pattern is anchored. Validate the current position and try to match at it only.
if (TryFindNextPossibleStartingPosition(inputSpan) && !TryMatchAtCurrentPosition(inputSpan))
{
base.runtextpos = inputSpan.Length;
}
}
/// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a match could possibly start.</summary>
/// <param name="inputSpan">The text being scanned by the regular expression.</param>
/// <returns>true if a possible match was found; false if no more matches are possible.</returns>
private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
{
int pos = base.runtextpos;
// Any possible match is at least 3 characters.
if (pos <= inputSpan.Length - 3)
{
// The pattern leads with a beginning (\A) anchor.
if (pos == 0)
{
return true;
}
}
// No match found.
base.runtextpos = inputSpan.Length;
return false;
}
/// <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;
int capture_starting_pos = 0;
int capture_starting_pos1 = 0;
int capture_starting_pos2 = 0;
int capture_starting_pos3 = 0;
ReadOnlySpan<char> slice = inputSpan.Slice(pos);
// Match if at the beginning of the string.
if (pos != 0)
{
UncaptureUntil(0);
return false; // The input didn't match.
}
// "LINE" capture group.
{
capture_starting_pos = pos;
// Match a character in the set [0-9] atomically any number of times.
{
int iteration = slice.IndexOfAnyExceptInRange('0', '9');
if (iteration < 0)
{
iteration = slice.Length;
}
slice = slice.Slice(iteration);
pos += iteration;
}
base.Capture(1, capture_starting_pos, pos);
}
// Match ','.
if (slice.IsEmpty || slice[0] != ',')
{
UncaptureUntil(0);
return false; // The input didn't match.
}
// "COLUMN" capture group.
{
pos++;
slice = inputSpan.Slice(pos);
capture_starting_pos1 = pos;
// Match a character in the set [0-9] atomically any number of times.
{
int iteration1 = slice.IndexOfAnyExceptInRange('0', '9');
if (iteration1 < 0)
{
iteration1 = slice.Length;
}
slice = slice.Slice(iteration1);
pos += iteration1;
}
base.Capture(2, capture_starting_pos1, pos);
}
// Match ','.
if (slice.IsEmpty || slice[0] != ',')
{
UncaptureUntil(0);
return false; // The input didn't match.
}
// "ENDLINE" capture group.
{
pos++;
slice = inputSpan.Slice(pos);
capture_starting_pos2 = pos;
// Match a character in the set [0-9] atomically any number of times.
{
int iteration2 = slice.IndexOfAnyExceptInRange('0', '9');
if (iteration2 < 0)
{
iteration2 = slice.Length;
}
slice = slice.Slice(iteration2);
pos += iteration2;
}
base.Capture(3, capture_starting_pos2, pos);
}
// Match ','.
if (slice.IsEmpty || slice[0] != ',')
{
UncaptureUntil(0);
return false; // The input didn't match.
}
// "ENDCOLUMN" capture group.
{
pos++;
slice = inputSpan.Slice(pos);
capture_starting_pos3 = pos;
// Match a character in the set [0-9] atomically any number of times.
{
int iteration3 = slice.IndexOfAnyExceptInRange('0', '9');
if (iteration3 < 0)
{
iteration3 = slice.Length;
}
slice = slice.Slice(iteration3);
pos += iteration3;
}
base.Capture(4, capture_starting_pos3, pos);
}
// Match if at the end of the string or if before an ending newline.
if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n'))
{
UncaptureUntil(0);
return false; // The input didn't match.
}
// The input matched.
base.runtextpos = pos;
base.Capture(0, matchStart, pos);
return true;
// <summary>Undo captures until it reaches the specified capture position.</summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
void UncaptureUntil(int capturePosition)
{
while (base.Crawlpos() > capturePosition)
{
base.Uncapture();
}
}
}
}
}
}
/// <summary>Custom <see cref="Regex"/>-derived type for the MsbuildMessageCodePattern method.</summary>
[GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "11.0.14.27024")]
[SkipLocalsInit]
file sealed class MsbuildMessageCodePattern_8 : Regex
{
/// <summary>Cached, thread-safe singleton instance.</summary>
internal static readonly MsbuildMessageCodePattern_8 Instance = new();
/// <summary>Initializes the instance.</summary>
private MsbuildMessageCodePattern_8()
{
base.pattern = "\\d+$";
base.roptions = RegexOptions.None;
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 (TryFindNextPossibleStartingPosition(inputSpan) &&
!TryMatchAtCurrentPosition(inputSpan) &&
base.runtextpos != inputSpan.Length)
{
base.runtextpos++;
if (Utilities.s_hasTimeout)
{
base.CheckTimeout();
}
}
}
/// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a match could possibly start.</summary>
/// <param name="inputSpan">The text being scanned by the regular expression.</param>
/// <returns>true if a possible match was found; false if no more matches are possible.</returns>
private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
{
int pos = base.runtextpos;
// Empty matches aren't possible.
if ((uint)pos < (uint)inputSpan.Length)
{
// The pattern begins with a Unicode digit.
// Find the next occurrence. If it can't be found, there's no match.
int i = inputSpan.Slice(pos).IndexOfAnyDigit();
if (i >= 0)
{
base.runtextpos = pos + i;
return true;
}
}
// No match found.
base.runtextpos = inputSpan.Length;
return false;
}
/// <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 a Unicode digit atomically at least once.
{
int iteration = 0;
while ((uint)iteration < (uint)slice.Length && char.IsDigit(slice[iteration]))
{
iteration++;
}
if (iteration == 0)
{
return false; // The input didn't match.
}
slice = slice.Slice(iteration);
pos += iteration;
}
// Advance the next matching position.
if (base.runtextpos < pos)
{
base.runtextpos = pos;
}
// Match if at the end of the string or if before an ending newline.
if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n'))
{
return false; // The input didn't match.
}
// The input matched.
base.runtextpos = pos;
base.Capture(0, matchStart, pos);
return true;
}
}
}
}
/// <summary>Custom <see cref="Regex"/>-derived type for the PlatformMonikerRegex method.</summary>
[GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "11.0.14.27024")]
[SkipLocalsInit]
file sealed class PlatformMonikerRegex_9 : Regex
{
/// <summary>Cached, thread-safe singleton instance.</summary>
internal static readonly PlatformMonikerRegex_9 Instance = new();
/// <summary>Initializes the instance.</summary>
private PlatformMonikerRegex_9()
{
base.pattern = "(?<PLATFORMIDENTITY>^[^,]*),\\s*Version=(?<PLATFORMVERSION>.*)";
base.roptions = RegexOptions.IgnoreCase;
ValidateMatchTimeout(Utilities.s_defaultTimeout);
base.internalMatchTimeout = Utilities.s_defaultTimeout;
base.factory = new RunnerFactory();
base.CapNames = new Hashtable { { "0", 0 } , { "PLATFORMIDENTITY", 1 } , { "PLATFORMVERSION", 2 } };
base.capslist = new string[] {"0", "PLATFORMIDENTITY", "PLATFORMVERSION" };
base.capsize = 3;
}
/// <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)
{
// The pattern is anchored. Validate the current position and try to match at it only.
if (TryFindNextPossibleStartingPosition(inputSpan) && !TryMatchAtCurrentPosition(inputSpan))
{
base.runtextpos = inputSpan.Length;
}
}
/// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a match could possibly start.</summary>
/// <param name="inputSpan">The text being scanned by the regular expression.</param>
/// <returns>true if a possible match was found; false if no more matches are possible.</returns>
private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
{
int pos = base.runtextpos;
// Any possible match is at least 9 characters.
if (pos <= inputSpan.Length - 9)
{
// The pattern leads with a beginning (\A) anchor.
if (pos == 0)
{
return true;
}
}
// No match found.
base.runtextpos = inputSpan.Length;
return false;
}
/// <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;
int capture_starting_pos = 0;
int capture_starting_pos1 = 0;
ReadOnlySpan<char> slice = inputSpan.Slice(pos);
// "PLATFORMIDENTITY" capture group.
{
capture_starting_pos = pos;
// Match if at the beginning of the string.
if (pos != 0)
{
UncaptureUntil(0);
return false; // The input didn't match.
}
// Match a character other than ',' atomically any number of times.
{
int iteration = slice.IndexOf(',');
if (iteration < 0)
{
iteration = slice.Length;
}
slice = slice.Slice(iteration);
pos += iteration;
}
base.Capture(1, capture_starting_pos, pos);
}
// Match ','.
if (slice.IsEmpty || slice[0] != ',')
{
UncaptureUntil(0);
return false; // The input didn't match.
}
// Match a whitespace character atomically any number of times.
{
int iteration1 = 1;
while ((uint)iteration1 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration1]))
{
iteration1++;
}
slice = slice.Slice(iteration1);
pos += iteration1;
}
if ((uint)slice.Length < 8 ||
!slice.StartsWith("version", StringComparison.OrdinalIgnoreCase) || // Match the string "version" (ordinal case-insensitive)
slice[7] != '=') // Match '='.
{
UncaptureUntil(0);
return false; // The input didn't match.
}
// "PLATFORMVERSION" capture group.
{
pos += 8;
slice = inputSpan.Slice(pos);
capture_starting_pos1 = pos;
// Match a character other than '\n' atomically any number of times.
{
int iteration2 = slice.IndexOf('\n');
if (iteration2 < 0)
{
iteration2 = slice.Length;
}
slice = slice.Slice(iteration2);
pos += iteration2;
}
base.Capture(2, capture_starting_pos1, pos);
}
// The input matched.
base.runtextpos = pos;
base.Capture(0, matchStart, pos);
return true;
// <summary>Undo captures until it reaches the specified capture position.</summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
void UncaptureUntil(int capturePosition)
{
while (base.Crawlpos() > capturePosition)
{
base.Uncapture();
}
}
}
}
}
}
/// <summary>Custom <see cref="Regex"/>-derived type for the AssemblyNameRegex method.</summary>
[GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "11.0.14.27024")]
[SkipLocalsInit]
file sealed class AssemblyNameRegex_10 : Regex
{
/// <summary>Cached, thread-safe singleton instance.</summary>
internal static readonly AssemblyNameRegex_10 Instance = new();
/// <summary>Initializes the instance.</summary>
private AssemblyNameRegex_10()
{
base.pattern = "^(?<name>[^,]*)(, Version=(?<version>[^,]*))?(, Culture=(?<culture>[^,]*))?(, PublicKeyToken=(?<pkt>[^,]*))?(, ProcessorArchitecture=(?<pa>[^,]*))?(, Type=(?<type>[^,]*))?";
base.roptions = RegexOptions.None;
ValidateMatchTimeout(Utilities.s_defaultTimeout);
base.internalMatchTimeout = Utilities.s_defaultTimeout;
base.factory = new RunnerFactory();
base.CapNames = new Hashtable { { "0", 0 } , { "1", 1 } , { "2", 2 } , { "3", 3 } , { "4", 4 } , { "5", 5 } , { "culture", 8 } , { "name", 6 } , { "pa", 10 } , { "pkt", 9 } , { "type", 11 } , { "version", 7 } };
base.capslist = new string[] {"0", "1", "2", "3", "4", "5", "name", "version", "culture", "pkt", "pa", "type" };
base.capsize = 12;
}
/// <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)
{
// The pattern is anchored. Validate the current position and try to match at it only.
if (TryFindNextPossibleStartingPosition(inputSpan) && !TryMatchAtCurrentPosition(inputSpan))
{
base.runtextpos = inputSpan.Length;
}
}
/// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a match could possibly start.</summary>
/// <param name="inputSpan">The text being scanned by the regular expression.</param>
/// <returns>true if a possible match was found; false if no more matches are possible.</returns>
private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
{
int pos = base.runtextpos;
// The pattern leads with a beginning (\A) anchor.
if (pos == 0)
{
return true;
}
// No match found.
base.runtextpos = inputSpan.Length;
return false;
}
/// <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;
int capture_starting_pos = 0;
int charloop_capture_pos = 0;
int charloop_starting_pos = 0, charloop_ending_pos = 0;
int charloop_starting_pos1 = 0, charloop_ending_pos1 = 0;
int charloop_starting_pos2 = 0, charloop_ending_pos2 = 0;
int charloop_starting_pos3 = 0, charloop_ending_pos3 = 0;
int charloop_starting_pos4 = 0, charloop_ending_pos4 = 0;
int loop_iteration = 0;
int loop_iteration1 = 0;
int loop_iteration2 = 0;
int loop_iteration3 = 0;
int loop_iteration4 = 0;
int stackpos = 0;
int startingStackpos = 0;
ReadOnlySpan<char> slice = inputSpan.Slice(pos);
// Match if at the beginning of the string.
if (pos != 0)
{
UncaptureUntil(0);
return false; // The input didn't match.
}
// "name" capture group.
//{
capture_starting_pos = pos;
// Match a character other than ',' greedily any number of times.
//{
charloop_starting_pos = pos;
int iteration = slice.IndexOf(',');
if (iteration < 0)
{
iteration = slice.Length;
}
slice = slice.Slice(iteration);
pos += iteration;
charloop_ending_pos = pos;
goto CharLoopEnd;
CharLoopBacktrack:
UncaptureUntil(charloop_capture_pos);
if (Utilities.s_hasTimeout)
{
base.CheckTimeout();
}
if (charloop_starting_pos >= charloop_ending_pos)
{
UncaptureUntil(0);
return false; // The input didn't match.
}
pos = --charloop_ending_pos;
slice = inputSpan.Slice(pos);
CharLoopEnd:
charloop_capture_pos = base.Crawlpos();
//}
base.Capture(6, capture_starting_pos, pos);
goto CaptureSkipBacktrack;
CaptureBacktrack:
goto CharLoopBacktrack;
CaptureSkipBacktrack:;
//}
// Optional (greedy).
//{
loop_iteration = 0;
LoopBody:
Utilities.StackPush(ref base.runstack!, ref stackpos, base.Crawlpos(), pos);
loop_iteration++;
// 1st capture group.
//{
int capture_starting_pos1 = pos;
// Match the string ", Version=".
if (!slice.StartsWith(", Version="))
{
goto LoopIterationNoMatch;
}
// "version" capture group.
//{
pos += 10;
slice = inputSpan.Slice(pos);
int capture_starting_pos2 = pos;
// Match a character other than ',' greedily any number of times.
//{
charloop_starting_pos1 = pos;
int iteration1 = slice.IndexOf(',');
if (iteration1 < 0)
{
iteration1 = slice.Length;
}
slice = slice.Slice(iteration1);
pos += iteration1;
charloop_ending_pos1 = pos;
goto CharLoopEnd1;
CharLoopBacktrack1:
UncaptureUntil(base.runstack![--stackpos]);
Utilities.StackPop(base.runstack!, ref stackpos, out charloop_ending_pos1, out charloop_starting_pos1);
if (Utilities.s_hasTimeout)
{
base.CheckTimeout();
}
if (charloop_starting_pos1 >= charloop_ending_pos1)
{
goto LoopIterationNoMatch;
}
pos = --charloop_ending_pos1;
slice = inputSpan.Slice(pos);
CharLoopEnd1:
Utilities.StackPush(ref base.runstack!, ref stackpos, charloop_starting_pos1, charloop_ending_pos1, base.Crawlpos());
//}
base.Capture(7, capture_starting_pos2, pos);
Utilities.StackPush(ref base.runstack!, ref stackpos, capture_starting_pos2);
goto CaptureSkipBacktrack1;
CaptureBacktrack1:
capture_starting_pos2 = base.runstack![--stackpos];
goto CharLoopBacktrack1;
CaptureSkipBacktrack1:;
//}
base.Capture(1, capture_starting_pos1, pos);
Utilities.StackPush(ref base.runstack!, ref stackpos, capture_starting_pos1);
goto CaptureSkipBacktrack2;
CaptureBacktrack2:
capture_starting_pos1 = base.runstack![--stackpos];
goto CaptureBacktrack1;
CaptureSkipBacktrack2:;
//}
// The loop has an upper bound of 1. Continue iterating greedily if it hasn't yet been reached.
if (loop_iteration == 0)
{
goto LoopBody;
}
goto LoopEnd;
// The loop iteration failed. Put state back to the way it was before the iteration.
LoopIterationNoMatch:
if (--loop_iteration < 0)
{
// Unable to match the remainder of the expression after exhausting the loop.
goto CaptureBacktrack;
}
pos = base.runstack![--stackpos];
UncaptureUntil(base.runstack![--stackpos]);
slice = inputSpan.Slice(pos);
goto LoopEnd;
LoopBacktrack:
if (Utilities.s_hasTimeout)
{
base.CheckTimeout();
}
if (loop_iteration == 0)
{
// No iterations of the loop remain to backtrack into. Fail the loop.
goto CaptureBacktrack;
}
goto CaptureBacktrack2;
LoopEnd:;
//}
// Optional (greedy).
//{
loop_iteration1 = 0;
LoopBody1:
Utilities.StackPush(ref base.runstack!, ref stackpos, base.Crawlpos(), pos);
loop_iteration1++;
// 2nd capture group.
//{
int capture_starting_pos3 = pos;
// Match the string ", Culture=".
if (!slice.StartsWith(", Culture="))
{
goto LoopIterationNoMatch1;
}
// "culture" capture group.
//{
pos += 10;
slice = inputSpan.Slice(pos);
int capture_starting_pos4 = pos;
// Match a character other than ',' greedily any number of times.
//{
charloop_starting_pos2 = pos;
int iteration2 = slice.IndexOf(',');
if (iteration2 < 0)
{
iteration2 = slice.Length;
}
slice = slice.Slice(iteration2);
pos += iteration2;
charloop_ending_pos2 = pos;
goto CharLoopEnd2;
CharLoopBacktrack2:
UncaptureUntil(base.runstack![--stackpos]);
Utilities.StackPop(base.runstack!, ref stackpos, out charloop_ending_pos2, out charloop_starting_pos2);
if (Utilities.s_hasTimeout)
{
base.CheckTimeout();
}
if (charloop_starting_pos2 >= charloop_ending_pos2)
{
goto LoopIterationNoMatch1;
}
pos = --charloop_ending_pos2;
slice = inputSpan.Slice(pos);
CharLoopEnd2:
Utilities.StackPush(ref base.runstack!, ref stackpos, charloop_starting_pos2, charloop_ending_pos2, base.Crawlpos());
//}
base.Capture(8, capture_starting_pos4, pos);
Utilities.StackPush(ref base.runstack!, ref stackpos, capture_starting_pos4);
goto CaptureSkipBacktrack3;
CaptureBacktrack3:
capture_starting_pos4 = base.runstack![--stackpos];
goto CharLoopBacktrack2;
CaptureSkipBacktrack3:;
//}
base.Capture(2, capture_starting_pos3, pos);
Utilities.StackPush(ref base.runstack!, ref stackpos, capture_starting_pos3);
goto CaptureSkipBacktrack4;
CaptureBacktrack4:
capture_starting_pos3 = base.runstack![--stackpos];
goto CaptureBacktrack3;
CaptureSkipBacktrack4:;
//}
// The loop has an upper bound of 1. Continue iterating greedily if it hasn't yet been reached.
if (loop_iteration1 == 0)
{
goto LoopBody1;
}
goto LoopEnd1;
// The loop iteration failed. Put state back to the way it was before the iteration.
LoopIterationNoMatch1:
if (--loop_iteration1 < 0)
{
// Unable to match the remainder of the expression after exhausting the loop.
goto LoopBacktrack;
}
pos = base.runstack![--stackpos];
UncaptureUntil(base.runstack![--stackpos]);
slice = inputSpan.Slice(pos);
goto LoopEnd1;
LoopBacktrack1:
if (Utilities.s_hasTimeout)
{
base.CheckTimeout();
}
if (loop_iteration1 == 0)
{
// No iterations of the loop remain to backtrack into. Fail the loop.
goto LoopBacktrack;
}
goto CaptureBacktrack4;
LoopEnd1:;
//}
// Optional (greedy).
//{
loop_iteration2 = 0;
LoopBody2:
Utilities.StackPush(ref base.runstack!, ref stackpos, base.Crawlpos(), pos);
loop_iteration2++;
// 3rd capture group.
//{
int capture_starting_pos5 = pos;
// Match the string ", PublicKeyToken=".
if (!slice.StartsWith(", PublicKeyToken="))
{
goto LoopIterationNoMatch2;
}
// "pkt" capture group.
//{
pos += 17;
slice = inputSpan.Slice(pos);
int capture_starting_pos6 = pos;
// Match a character other than ',' greedily any number of times.
//{
charloop_starting_pos3 = pos;
int iteration3 = slice.IndexOf(',');
if (iteration3 < 0)
{
iteration3 = slice.Length;
}
slice = slice.Slice(iteration3);
pos += iteration3;
charloop_ending_pos3 = pos;
goto CharLoopEnd3;
CharLoopBacktrack3:
UncaptureUntil(base.runstack![--stackpos]);
Utilities.StackPop(base.runstack!, ref stackpos, out charloop_ending_pos3, out charloop_starting_pos3);
if (Utilities.s_hasTimeout)
{
base.CheckTimeout();
}
if (charloop_starting_pos3 >= charloop_ending_pos3)
{
goto LoopIterationNoMatch2;
}
pos = --charloop_ending_pos3;
slice = inputSpan.Slice(pos);
CharLoopEnd3:
Utilities.StackPush(ref base.runstack!, ref stackpos, charloop_starting_pos3, charloop_ending_pos3, base.Crawlpos());
//}
base.Capture(9, capture_starting_pos6, pos);
Utilities.StackPush(ref base.runstack!, ref stackpos, capture_starting_pos6);
goto CaptureSkipBacktrack5;
CaptureBacktrack5:
capture_starting_pos6 = base.runstack![--stackpos];
goto CharLoopBacktrack3;
CaptureSkipBacktrack5:;
//}
base.Capture(3, capture_starting_pos5, pos);
Utilities.StackPush(ref base.runstack!, ref stackpos, capture_starting_pos5);
goto CaptureSkipBacktrack6;
CaptureBacktrack6:
capture_starting_pos5 = base.runstack![--stackpos];
goto CaptureBacktrack5;
CaptureSkipBacktrack6:;
//}
// The loop has an upper bound of 1. Continue iterating greedily if it hasn't yet been reached.
if (loop_iteration2 == 0)
{
goto LoopBody2;
}
goto LoopEnd2;
// The loop iteration failed. Put state back to the way it was before the iteration.
LoopIterationNoMatch2:
if (--loop_iteration2 < 0)
{
// Unable to match the remainder of the expression after exhausting the loop.
goto LoopBacktrack1;
}
pos = base.runstack![--stackpos];
UncaptureUntil(base.runstack![--stackpos]);
slice = inputSpan.Slice(pos);
goto LoopEnd2;
LoopBacktrack2:
if (Utilities.s_hasTimeout)
{
base.CheckTimeout();
}
if (loop_iteration2 == 0)
{
// No iterations of the loop remain to backtrack into. Fail the loop.
goto LoopBacktrack1;
}
goto CaptureBacktrack6;
LoopEnd2:;
//}
// Optional (greedy).
//{
loop_iteration3 = 0;
LoopBody3:
Utilities.StackPush(ref base.runstack!, ref stackpos, base.Crawlpos(), pos);
loop_iteration3++;
// 4th capture group.
//{
int capture_starting_pos7 = pos;
// Match the string ", ProcessorArchitecture=".
if (!slice.StartsWith(", ProcessorArchitecture="))
{
goto LoopIterationNoMatch3;
}
// "pa" capture group.
//{
pos += 24;
slice = inputSpan.Slice(pos);
int capture_starting_pos8 = pos;
// Match a character other than ',' greedily any number of times.
//{
charloop_starting_pos4 = pos;
int iteration4 = slice.IndexOf(',');
if (iteration4 < 0)
{
iteration4 = slice.Length;
}
slice = slice.Slice(iteration4);
pos += iteration4;
charloop_ending_pos4 = pos;
goto CharLoopEnd4;
CharLoopBacktrack4:
UncaptureUntil(base.runstack![--stackpos]);
Utilities.StackPop(base.runstack!, ref stackpos, out charloop_ending_pos4, out charloop_starting_pos4);
if (Utilities.s_hasTimeout)
{
base.CheckTimeout();
}
if (charloop_starting_pos4 >= charloop_ending_pos4)
{
goto LoopIterationNoMatch3;
}
pos = --charloop_ending_pos4;
slice = inputSpan.Slice(pos);
CharLoopEnd4:
Utilities.StackPush(ref base.runstack!, ref stackpos, charloop_starting_pos4, charloop_ending_pos4, base.Crawlpos());
//}
base.Capture(10, capture_starting_pos8, pos);
Utilities.StackPush(ref base.runstack!, ref stackpos, capture_starting_pos8);
goto CaptureSkipBacktrack7;
CaptureBacktrack7:
capture_starting_pos8 = base.runstack![--stackpos];
goto CharLoopBacktrack4;
CaptureSkipBacktrack7:;
//}
base.Capture(4, capture_starting_pos7, pos);
Utilities.StackPush(ref base.runstack!, ref stackpos, capture_starting_pos7);
goto CaptureSkipBacktrack8;
CaptureBacktrack8:
capture_starting_pos7 = base.runstack![--stackpos];
goto CaptureBacktrack7;
CaptureSkipBacktrack8:;
//}
// The loop has an upper bound of 1. Continue iterating greedily if it hasn't yet been reached.
if (loop_iteration3 == 0)
{
goto LoopBody3;
}
goto LoopEnd3;
// The loop iteration failed. Put state back to the way it was before the iteration.
LoopIterationNoMatch3:
if (--loop_iteration3 < 0)
{
// Unable to match the remainder of the expression after exhausting the loop.
goto LoopBacktrack2;
}
pos = base.runstack![--stackpos];
UncaptureUntil(base.runstack![--stackpos]);
slice = inputSpan.Slice(pos);
goto LoopEnd3;
LoopBacktrack3:
if (Utilities.s_hasTimeout)
{
base.CheckTimeout();
}
if (loop_iteration3 == 0)
{
// No iterations of the loop remain to backtrack into. Fail the loop.
goto LoopBacktrack2;
}
goto CaptureBacktrack8;
LoopEnd3:;
//}
// Optional (greedy).
{
startingStackpos = stackpos;
loop_iteration4 = 0;
LoopBody4:
Utilities.StackPush(ref base.runstack!, ref stackpos, base.Crawlpos(), pos);
loop_iteration4++;
// 5th capture group.
{
int capture_starting_pos9 = pos;
// Match the string ", Type=".
if (!slice.StartsWith(", Type="))
{
goto LoopIterationNoMatch4;
}
// "type" capture group.
{
pos += 7;
slice = inputSpan.Slice(pos);
int capture_starting_pos10 = pos;
// Match a character other than ',' atomically any number of times.
{
int iteration5 = slice.IndexOf(',');
if (iteration5 < 0)
{
iteration5 = slice.Length;
}
slice = slice.Slice(iteration5);
pos += iteration5;
}
base.Capture(11, capture_starting_pos10, pos);
}
base.Capture(5, capture_starting_pos9, pos);
}
// The loop has an upper bound of 1. Continue iterating greedily if it hasn't yet been reached.
if (loop_iteration4 == 0)
{
goto LoopBody4;
}
goto LoopEnd4;
// The loop iteration failed. Put state back to the way it was before the iteration.
LoopIterationNoMatch4:
if (--loop_iteration4 < 0)
{
// Unable to match the remainder of the expression after exhausting the loop.
goto LoopBacktrack3;
}
pos = base.runstack![--stackpos];
UncaptureUntil(base.runstack![--stackpos]);
slice = inputSpan.Slice(pos);
LoopEnd4:
stackpos = startingStackpos; // Ensure any remaining backtracking state is removed.
}
// The input matched.
base.runtextpos = pos;
base.Capture(0, matchStart, pos);
return true;
// <summary>Undo captures until it reaches the specified capture position.</summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
void UncaptureUntil(int capturePosition)
{
while (base.Crawlpos() > capturePosition)
{
base.Uncapture();
}
}
}
}
}
}
/// <summary>Custom <see cref="Regex"/>-derived type for the AssemblyVersionRegex method.</summary>
[GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "11.0.14.27024")]
[SkipLocalsInit]
file sealed class AssemblyVersionRegex_11 : Regex
{
/// <summary>Cached, thread-safe singleton instance.</summary>
internal static readonly AssemblyVersionRegex_11 Instance = new();
/// <summary>Initializes the instance.</summary>
private AssemblyVersionRegex_11()
{
base.pattern = "^([.\\d]+)_([^_]*)_([a-fA-F\\d]{16})$";
base.roptions = RegexOptions.CultureInvariant;
ValidateMatchTimeout(Utilities.s_defaultTimeout);
base.internalMatchTimeout = Utilities.s_defaultTimeout;
base.factory = new RunnerFactory();
base.capsize = 4;
}
/// <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)
{
// The pattern is anchored. Validate the current position and try to match at it only.
if (TryFindNextPossibleStartingPosition(inputSpan) && !TryMatchAtCurrentPosition(inputSpan))
{
base.runtextpos = inputSpan.Length;
}
}
/// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a match could possibly start.</summary>
/// <param name="inputSpan">The text being scanned by the regular expression.</param>
/// <returns>true if a possible match was found; false if no more matches are possible.</returns>
private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
{
int pos = base.runtextpos;
// Any possible match is at least 19 characters.
if (pos <= inputSpan.Length - 19)
{
// The pattern leads with a beginning (\A) anchor.
if (pos == 0)
{
return true;
}
}
// No match found.
base.runtextpos = inputSpan.Length;
return false;
}
/// <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;
char ch;
int capture_starting_pos = 0;
int capture_starting_pos1 = 0;
int capture_starting_pos2 = 0;
ReadOnlySpan<char> slice = inputSpan.Slice(pos);
// Match if at the beginning of the string.
if (pos != 0)
{
UncaptureUntil(0);
return false; // The input didn't match.
}
// 1st capture group.
{
capture_starting_pos = pos;
// Match a character in the set [.\d] atomically at least once.
{
int iteration = 0;
while ((uint)iteration < (uint)slice.Length && ((ch = slice[iteration]) < 128 ? ("\0\0䀀Ͽ\0\0\0\0"[ch >> 4] & (1 << (ch & 0xF))) != 0 : RegexRunner.CharInClass((char)ch, "\0\u0002\u0001./\t")))
{
iteration++;
}
if (iteration == 0)
{
UncaptureUntil(0);
return false; // The input didn't match.
}
slice = slice.Slice(iteration);
pos += iteration;
}
base.Capture(1, capture_starting_pos, pos);
}
// Match '_'.
if (slice.IsEmpty || slice[0] != '_')
{
UncaptureUntil(0);
return false; // The input didn't match.
}
// 2nd capture group.
{
pos++;
slice = inputSpan.Slice(pos);
capture_starting_pos1 = pos;
// Match a character other than '_' atomically any number of times.
{
int iteration1 = slice.IndexOf('_');
if (iteration1 < 0)
{
iteration1 = slice.Length;
}
slice = slice.Slice(iteration1);
pos += iteration1;
}
base.Capture(2, capture_starting_pos1, pos);
}
// Match '_'.
if (slice.IsEmpty || slice[0] != '_')
{
UncaptureUntil(0);
return false; // The input didn't match.
}
// 3rd capture group.
{
pos++;
slice = inputSpan.Slice(pos);
capture_starting_pos2 = pos;
// Match a character in the set [A-Fa-f\d] exactly 16 times.
{
if ((uint)slice.Length < 16)
{
UncaptureUntil(0);
return false; // The input didn't match.
}
ReadOnlySpan<char> repeaterSlice = slice.Slice(0, 16);
for (int i = 0; i < repeaterSlice.Length; i++)
{
if (((ch = repeaterSlice[i]) < 128 ? !char.IsAsciiHexDigit(ch) : !RegexRunner.CharInClass((char)ch, "\0\u0004\u0001AGag\t")))
{
UncaptureUntil(0);
return false; // The input didn't match.
}
}
}
pos += 16;
slice = inputSpan.Slice(pos);
base.Capture(3, capture_starting_pos2, pos);
}
// Match if at the end of the string or if before an ending newline.
if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n'))
{
UncaptureUntil(0);
return false; // The input didn't match.
}
// The input matched.
base.runtextpos = pos;
base.Capture(0, matchStart, pos);
return true;
// <summary>Undo captures until it reaches the specified capture position.</summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
void UncaptureUntil(int capturePosition)
{
while (base.Crawlpos() > capturePosition)
{
base.Uncapture();
}
}
}
}
}
}
/// <summary>Custom <see cref="Regex"/>-derived type for the SdkReferenceFormatRegex method.</summary>
[GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "11.0.14.27024")]
[SkipLocalsInit]
file sealed class SdkReferenceFormatRegex_12 : Regex
{
/// <summary>Cached, thread-safe singleton instance.</summary>
internal static readonly SdkReferenceFormatRegex_12 Instance = new();
/// <summary>Initializes the instance.</summary>
private SdkReferenceFormatRegex_12()
{
base.pattern = "(?<SDKSIMPLENAME>^[^,]*),\\s*Version=(?<SDKVERSION>.*)";
base.roptions = RegexOptions.IgnoreCase;
ValidateMatchTimeout(Utilities.s_defaultTimeout);
base.internalMatchTimeout = Utilities.s_defaultTimeout;
base.factory = new RunnerFactory();
base.CapNames = new Hashtable { { "0", 0 } , { "SDKSIMPLENAME", 1 } , { "SDKVERSION", 2 } };
base.capslist = new string[] {"0", "SDKSIMPLENAME", "SDKVERSION" };
base.capsize = 3;
}
/// <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)
{
// The pattern is anchored. Validate the current position and try to match at it only.
if (TryFindNextPossibleStartingPosition(inputSpan) && !TryMatchAtCurrentPosition(inputSpan))
{
base.runtextpos = inputSpan.Length;
}
}
/// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a match could possibly start.</summary>
/// <param name="inputSpan">The text being scanned by the regular expression.</param>
/// <returns>true if a possible match was found; false if no more matches are possible.</returns>
private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
{
int pos = base.runtextpos;
// Any possible match is at least 9 characters.
if (pos <= inputSpan.Length - 9)
{
// The pattern leads with a beginning (\A) anchor.
if (pos == 0)
{
return true;
}
}
// No match found.
base.runtextpos = inputSpan.Length;
return false;
}
/// <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;
int capture_starting_pos = 0;
int capture_starting_pos1 = 0;
ReadOnlySpan<char> slice = inputSpan.Slice(pos);
// "SDKSIMPLENAME" capture group.
{
capture_starting_pos = pos;
// Match if at the beginning of the string.
if (pos != 0)
{
UncaptureUntil(0);
return false; // The input didn't match.
}
// Match a character other than ',' atomically any number of times.
{
int iteration = slice.IndexOf(',');
if (iteration < 0)
{
iteration = slice.Length;
}
slice = slice.Slice(iteration);
pos += iteration;
}
base.Capture(1, capture_starting_pos, pos);
}
// Match ','.
if (slice.IsEmpty || slice[0] != ',')
{
UncaptureUntil(0);
return false; // The input didn't match.
}
// Match a whitespace character atomically any number of times.
{
int iteration1 = 1;
while ((uint)iteration1 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration1]))
{
iteration1++;
}
slice = slice.Slice(iteration1);
pos += iteration1;
}
if ((uint)slice.Length < 8 ||
!slice.StartsWith("version", StringComparison.OrdinalIgnoreCase) || // Match the string "version" (ordinal case-insensitive)
slice[7] != '=') // Match '='.
{
UncaptureUntil(0);
return false; // The input didn't match.
}
// "SDKVERSION" capture group.
{
pos += 8;
slice = inputSpan.Slice(pos);
capture_starting_pos1 = pos;
// Match a character other than '\n' atomically any number of times.
{
int iteration2 = slice.IndexOf('\n');
if (iteration2 < 0)
{
iteration2 = slice.Length;
}
slice = slice.Slice(iteration2);
pos += iteration2;
}
base.Capture(2, capture_starting_pos1, pos);
}
// The input matched.
base.runtextpos = pos;
base.Capture(0, matchStart, pos);
return true;
// <summary>Undo captures until it reaches the specified capture position.</summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
void UncaptureUntil(int capturePosition)
{
while (base.Crawlpos() > capturePosition)
{
base.Uncapture();
}
}
}
}
}
}
/// <summary>Helper methods used by generated <see cref="Regex"/>-derived implementations.</summary>
[GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "11.0.14.27024")]
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;
/// <summary>Finds the next index of any character that matches a Unicode digit.</summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static int IndexOfAnyDigit(this ReadOnlySpan<char> span)
{
int i = span.IndexOfAnyExcept(Utilities.s_asciiExceptDigits);
if ((uint)i < (uint)span.Length)
{
if (char.IsAscii(span[i]))
{
return i;
}
do
{
if (char.IsDigit(span[i]))
{
return i;
}
i++;
}
while ((uint)i < (uint)span.Length);
}
return -1;
}
/// <summary>Pops 2 values from the backtracking stack.</summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static void StackPop(int[] stack, ref int pos, out int arg0, out int arg1)
{
arg0 = stack[--pos];
arg1 = stack[--pos];
}
/// <summary>Pushes 1 value onto the backtracking stack.</summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static void StackPush(ref int[] stack, ref int pos, int arg0)
{
// If there's space available for the value, store it.
int[] s = stack;
int p = pos;
if ((uint)p < (uint)s.Length)
{
s[p] = arg0;
pos++;
return;
}
// Otherwise, resize the stack to make room and try again.
WithResize(ref stack, ref pos, arg0);
// <summary>Resize the backtracking stack array and push 1 value onto the stack.</summary>
[MethodImpl(MethodImplOptions.NoInlining)]
static void WithResize(ref int[] stack, ref int pos, int arg0)
{
Array.Resize(ref stack, (pos + 0) * 2);
StackPush(ref stack, ref pos, arg0);
}
}
/// <summary>Pushes 2 values onto the backtracking stack.</summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static void StackPush(ref int[] stack, ref int pos, int arg0, int arg1)
{
// If there's space available for all 2 values, store them.
int[] s = stack;
int p = pos;
if ((uint)(p + 1) < (uint)s.Length)
{
s[p] = arg0;
s[p + 1] = arg1;
pos += 2;
return;
}
// Otherwise, resize the stack to make room and try again.
WithResize(ref stack, ref pos, arg0, arg1);
// <summary>Resize the backtracking stack array and push 2 values onto the stack.</summary>
[MethodImpl(MethodImplOptions.NoInlining)]
static void WithResize(ref int[] stack, ref int pos, int arg0, int arg1)
{
Array.Resize(ref stack, (pos + 1) * 2);
StackPush(ref stack, ref pos, arg0, arg1);
}
}
/// <summary>Pushes 3 values onto the backtracking stack.</summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static void StackPush(ref int[] stack, ref int pos, int arg0, int arg1, int arg2)
{
// If there's space available for all 3 values, store them.
int[] s = stack;
int p = pos;
if ((uint)(p + 2) < (uint)s.Length)
{
s[p] = arg0;
s[p + 1] = arg1;
s[p + 2] = arg2;
pos += 3;
return;
}
// Otherwise, resize the stack to make room and try again.
WithResize(ref stack, ref pos, arg0, arg1, arg2);
// <summary>Resize the backtracking stack array and push 3 values onto the stack.</summary>
[MethodImpl(MethodImplOptions.NoInlining)]
static void WithResize(ref int[] stack, ref int pos, int arg0, int arg1, int arg2)
{
Array.Resize(ref stack, (pos + 2) * 2);
StackPush(ref stack, ref pos, arg0, arg1, arg2);
}
}
/// <summary>Supports searching for characters in or not in "\0\u0001\u0002\u0003\u0004\u0005\u0006\a\b\t\n\v\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u007f".</summary>
internal static readonly SearchValues<char> s_asciiExceptDigits = SearchValues.Create("\0\u0001\u0002\u0003\u0004\u0005\u0006\a\b\t\n\v\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u007f");
/// <summary>Supports searching for characters in or not in ",-0123456789".</summary>
internal static readonly SearchValues<char> s_ascii_30FF030000000000000000 = SearchValues.Create(",-0123456789");
}
}
|