ngra string regex use ir as jit engine as well
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
// -----------------------------------------------------------------------
|
||||
// file="TestRegexAnalyse"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
// AuthorGroup: Nitload
|
||||
// Copyright (c) Nitload. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -42,7 +42,9 @@ namespace StgSharp
|
||||
@"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" ];
|
||||
@"helix|hello|help|hero|hers|her",
|
||||
@"http|https|ftp|ftps"
|
||||
];
|
||||
|
||||
public static void Run()
|
||||
{
|
||||
@@ -51,7 +53,7 @@ namespace StgSharp
|
||||
RegexInterpreter interpreter = RegexInterpreter.Analyze(regex);
|
||||
AbstractSyntaxTree<RegexAstNode, RegexElementLabel> tree = interpreter.Tree;
|
||||
Console.WriteLine($"result of \"{regex}\"");
|
||||
TreeEnumerator<RegexAstNode, RegexElementLabel> enumerator = new TreeEnumerator<RegexAstNode, RegexElementLabel>(tree);
|
||||
TreeEnumerator<RegexAstNode, RegexElementLabel> enumerator = new(tree);
|
||||
while (enumerator.MoveNext())
|
||||
{
|
||||
RegexAstNode node = enumerator.Current;
|
||||
|
||||
Reference in New Issue
Block a user