diff --git a/StgSharp.RegularAnalysis/Text/RegexIR.cs b/StgSharp.RegularAnalysis/Text/RegexIR.cs index 0b1fc8f4..6a28274f 100644 --- a/StgSharp.RegularAnalysis/Text/RegexIR.cs +++ b/StgSharp.RegularAnalysis/Text/RegexIR.cs @@ -47,6 +47,8 @@ namespace StgSharp.RegularAnalysis.Text Pop = 1 << 7, Pack = 1 << 8, Find_Seq = 1 << 9, + Find_Set = 1 << 10, + Find_Complex = 1 << 11, Match = Match_Seq | Match_Set, Count = Count_Seq | Count_Set | Count_Complex, @@ -68,6 +70,27 @@ namespace StgSharp.RegularAnalysis.Text } + internal sealed class RegexFindComplexIR( + bool nearest, + int count + ) : RegexIR + { + + internal override RegexIRCommand Command => RegexIRCommand.Find_Complex; + + private bool IsNearest { get; } = nearest; + + private int CommandCount { get; } = count; + + internal override string AsCommand( + int lineNum + ) + { + return $"[{lineNum}]\t FIND_COMPLEX {(IsNearest ? "NEAREST" : "FURTHEST")} COUNT: {CommandCount}"; + } + + } + internal abstract class RegexIR {