begin regex ir opt

This commit is contained in:
Youmu Liu
2026-06-23 20:08:33 +08:00
parent 7e5e4d1f7a
commit 2b05d626c7
10 changed files with 210 additions and 194 deletions
@@ -37,7 +37,7 @@ using System.Threading.Tasks;
namespace StgSharp.RegularAnalysis.Text
{
public partial class RegexInterpreter
public partial class RegexAnalyzer
{
private AbstractSyntaxTree<RegexAstNode, RegexElementLabel> _tree = new();
@@ -45,7 +45,7 @@ namespace StgSharp.RegularAnalysis.Text
private Exception _interpreteException;
private string _source;
private RegexInterpreter() { }
private RegexAnalyzer() { }
internal AbstractSyntaxTree<RegexAstNode, RegexElementLabel> Tree
{
@@ -58,11 +58,11 @@ namespace StgSharp.RegularAnalysis.Text
}
}
public static RegexInterpreter Analyze(
public static RegexAnalyzer Analyze(
string regex
)
{
RegexInterpreter interpreter = new();
RegexAnalyzer interpreter = new();
interpreter._source = regex;
bool isSuccess;
try