few adit
This commit is contained in:
@@ -39,6 +39,8 @@ namespace Nitload.RegularAnalysis.Abstraction
|
||||
public interface IMixEvaluator<TElement, TValue>
|
||||
{
|
||||
|
||||
public Relation<TElement, TValue, IRelationEvaluator<TElement, TValue>>[] DownstreamPorts { get; }
|
||||
|
||||
TValue Evaluate(
|
||||
Span<Relation<TElement, TValue>> relations
|
||||
);
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="PropertyEvaluator"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using Nitload.RegularAnalysis.Abstraction;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Nitload.RegularAnalysis.PropertyRegex
|
||||
{
|
||||
internal abstract class PropertyEvaluator<T> : IRelationEvaluator<T, PropertyMatchState>
|
||||
{
|
||||
|
||||
public abstract PropertyMatchState Evaluate(
|
||||
ReadOnlySpan<T> sequence
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="PropertyMatchEngine"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using Nitload.RegularAnalysis.Abstraction;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Nitload.RegularAnalysis.PropertyRegex
|
||||
{
|
||||
public class PropertyMatchEngine<T>
|
||||
{
|
||||
|
||||
private readonly List<Mix<T, PropertyMatchState>> _nodes = [];
|
||||
private readonly List<Relation<T, PropertyMatchState, PropertyEvaluator<T>>> _relations = [];
|
||||
|
||||
}
|
||||
|
||||
public class FrozenPropertyMatchEngine<T>
|
||||
{
|
||||
|
||||
private readonly Mix<T, PropertyMatchState>[] _nodes;
|
||||
private readonly Relation<T, PropertyMatchState, PropertyEvaluator<T>>[] _relations;
|
||||
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="PropertyMatchEngine"
|
||||
// file="PropertyMatchState"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
@@ -11,7 +11,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Nitload.RegularAnalysis.AttributeRegex
|
||||
namespace Nitload.RegularAnalysis.PropertyRegex
|
||||
{
|
||||
internal class PropertyMatchEngine { }
|
||||
internal class PropertyMatchState { }
|
||||
}
|
||||
Reference in New Issue
Block a user