13 public int Type {
get;
private set; }
15 public string Str {
get;
private set; }
17 public char Ch {
get;
private set; }
19 public int M {
get;
private set; }
21 public int N {
get;
private set; }
149 if (next !=
null && next.
Type == 25)
180 node.MakeLoopAtomic();
197 int num =
node.ChildCount();
198 for (
int i = 1;
i < num;
i++)
239 return next.Type == 32;
330 if ((uint)(
type2 - 3) <= 2
u || (uint)(
type2 - 43) <= 2
u)
338 if ((uint)(
type3 - 6) <= 2
u)
355 num = (regexNode.M = ((2147483646 / regexNode.M < num) ?
int.MaxValue : (regexNode.M * num)));
359 num2 = (regexNode.N = ((2147483646 / regexNode.N <
num2) ?
int.MaxValue : (regexNode.N *
num2)));
362 if (num ==
int.MaxValue)
370 if ((uint)(
type4 - 9) <= 2
u)
445 for (
int i = 1;
i <
list.Count;
i++)
552 node.Ch =
node.Str[^1];
588 regexNode6.Next =
this;
634 regexNode7.Type = 11;
680 while (num <
list.Count)
700 regexNode2.Next =
this;
718 regexNode3.Type = 12;
723 regexNode3.Str = ((regexNode.Type == 9) ?
$"{regexNode3.Str}{regexNode.Ch}" : (regexNode3.Str +
regexNode.Str));
727 regexNode3.Str = ((regexNode.Type == 9) ?
$"{regexNode.Ch}{regexNode3.Str}" : (regexNode.Str +
regexNode3.Str));
754 while (num <
list.Count)
892 regexNode.M = regexNode2.M + 1;
893 regexNode.N = ((regexNode2.N ==
int.MaxValue) ?
int.MaxValue : (regexNode2.N + 1));
916 regexNode.N = ((regexNode2.N ==
int.MaxValue) ?
int.MaxValue : (regexNode.N +
regexNode2.N));
949 for (
int i = 0;
i < list.Count - 1;
i++)
957 if (
node.Type == 28 ||
node.Type == 25)
997 int num =
node.ChildCount();
998 for (
int j = 0;
j < num;
j++)
1005 node.MakeLoopAtomic();
1014 while (
node.Type == 28)
1018 if (
node.Type == 25)
1020 int num =
node.ChildCount();
1072 for (
int i = 0;
i < num;
i++)
1165 if (
node.Ch ==
'\n')
1171 if (
node.Ch ==
'\n')
1228 else if (
type != 12)
1311 if (!(
node.Str ==
"\0\0\n\0\u0002\u0004\u0005\u0003\u0001\u0006\t\u0013\0") && !(
node.Str ==
"\0\0\u0001\t"))
1317 if (!(
node.Str ==
"\u0001\0\n\0\u0002\u0004\u0005\u0003\u0001\u0006\t\u0013\0") && !(
node.Str ==
"\0\0\u0001\ufff7"))
1323 if (!(
node.Str ==
"\0\n\00:A[_`a{İı") && !(
node.Str ==
"\0\u0002\00:"))
1329 if (!(
node.Str ==
"\u0001\n\00:A[_`a{İı") && !(
node.Str ==
"\0\0\u0001\ufff7"))
1358 return node.Str.Length;
1376 for (
int j = 1;
j <
num3;
j++)
1390 for (
int i = 0;
i <
num2;
i++)
1394 return (
int)
Math.
Min(2147483647
L, num);
1408 if (
min == 0 &&
max == 0)
1412 if (
min == 1 &&
max == 1)
1417 if ((uint)(
type - 9) <= 2
u)
1429 newChild.Next =
this;
1431 newChild.Next =
this;
1448 newChild.Next =
this;
1450 newChild.Next =
this;
1456 newChild.Next =
this;
void Add(TKey key, TValue value)
static byte Min(byte val1, byte val2)
static bool IsSingletonInverse(string set)
static bool IsECMAWordChar(char ch)
static bool CharInClass(char ch, string set, ref int[] asciiResultCache)
static char SingletonChar(string set)
static bool IsEmpty(string charClass)
static bool IsSingleton(string set)
static bool MayOverlap(string set1, string set2)
static bool IsWordChar(char ch)
static RegexCharClass Parse(string charClass)
static bool IsMergeable(string charClass)
void ReplaceChild(int index, RegexNode newChild)
RegexNode FinalOptimize()
static void EliminateEndingBacktracking(RegexNode node, uint maxDepth)
RegexNode(int type, RegexOptions options, string str)
RegexNode(int type, RegexOptions options, int m)
RegexNode(int type, RegexOptions options, int m, int n)
RegexNode ReplaceNodeIfUnnecessary(int emptyTypeIfNoChildren)
static RegexNode FindLastExpressionInLoopForAutoAtomic(RegexNode node, uint maxDepth)
static bool CanBeMadeAtomic(RegexNode node, RegexNode subsequent, uint maxDepth)
RegexNode(int type, RegexOptions options, char ch)
void ReduceConcatenationWithAutoAtomic()
RegexNode MakeQuantifier(bool lazy, int min, int max)
void AddChild(RegexNode newChild)
RegexNode ReduceAlternation()
RegexNode ReduceConcatenation()
void MakeRep(int type, int min, int max)
RegexNode(int type, RegexOptions options)
void ReduceConcatenationWithAdjacentLoops()
void InsertChild(int index, RegexNode newChild)
void ReduceConcatenationWithAdjacentStrings()