add more rules for ir opt, fix wrong process to dot

This commit is contained in:
Youmu Liu
2026-07-03 18:05:10 +08:00
parent 8c504a67d7
commit 7edb94943d
13 changed files with 200 additions and 52 deletions
+5 -3
View File
@@ -40,19 +40,21 @@ namespace StgSharp
{
private static string[] regexSource = [
@"[.]*",
/*
@"http|https|ftp|ftps",
@"abc[0-9]x|abc[0-9]y|abd[0-9]x|abd[0-9]y|xyz",
@"get_name|get_value|get_type|set_name|set_value|set_type",
@"helix|hello|help|hero|hers|her",
@"a*.[abc]*(abcd|a(bc)c)+(?<name>abc{11,13})"
@"a*.[abc]*(abcd|a(bc)c)+(?<name>.*)234"
/**/
];
public static void Run()
{
foreach (string regex in regexSource)
{
TextRegexSource interpreterSource = RegexAnalyzer.Analyze(regex);
TextRegexSource interpreterSource = RegexAnalyzerFrontEnd.Analyze(regex);
AbstractSyntaxTree<RegexAstNode, RegexElementLabel> tree = interpreterSource.Ast;
Console.WriteLine($"result of \"{regex}\"");
TreeEnumerator<RegexAstNode, RegexElementLabel> enumerator = new(tree);