discuss regex ir opt
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.RegularAnalysis.Abstraction;
|
||||
using StgSharp.RegularAnalysis.TextRegex;
|
||||
using StgSharp.RegularAnalysis.Text;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -44,7 +44,7 @@ namespace StgSharp
|
||||
@"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)"
|
||||
@"a*.[abc]*(abcd|a(bc)c)+(?<name>abc{11,13})"
|
||||
];
|
||||
|
||||
public static void Run()
|
||||
@@ -61,7 +61,7 @@ namespace StgSharp
|
||||
Console.Write(new string('|', enumerator.Depth));
|
||||
Console.WriteLine($"\t{node.Source.Value}\t{node.Source.Flag}");
|
||||
}
|
||||
List<RegexIR> ir = RegexInterpreter.GenerateIR(tree);
|
||||
List<RegexHIR> ir = RegexInterpreter.GenerateIR(tree);
|
||||
Console.WriteLine("-----IR-----");
|
||||
for (int i = 0; i < ir.Count; i++) {
|
||||
Console.WriteLine(ir[i].AsCommand(i));
|
||||
|
||||
Reference in New Issue
Block a user