regex interpreter now can build partial correct AST (i forget groups), but in bad shape. building an optimizer.
This commit is contained in:
@@ -43,6 +43,11 @@ namespace StgSharp.RegularAnalysis.Abstraction
|
||||
|
||||
private TNode _root;
|
||||
|
||||
public HashSet<TNode> AllNodes
|
||||
{
|
||||
get { return _allToken; }
|
||||
}
|
||||
|
||||
public int Count
|
||||
{
|
||||
get { return _allToken.Count; }
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace StgSharp.RegularAnalysis.Abstraction
|
||||
public int OperatorInDepthCount
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get => _operators.Count - _depthMarks.Peek().OperandPos;
|
||||
get => _operators.Count - _depthMarks.Peek().OperatorPos;
|
||||
}
|
||||
|
||||
public int Depth
|
||||
|
||||
@@ -53,6 +53,8 @@ namespace StgSharp.RegularAnalysis.Abstraction
|
||||
|
||||
TNode Right { get; set; }
|
||||
|
||||
TNode Parent { get; set; }
|
||||
|
||||
static abstract TNode Empty { get; }
|
||||
|
||||
Token<TLabel> Source { get; }
|
||||
|
||||
Reference in New Issue
Block a user