use rule table instead a single jump funcfor state machine
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// file="RegularExpression.StateMachine"
|
||||
// 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
|
||||
@@ -41,9 +41,49 @@ namespace StgSharp.RegularAnalysis
|
||||
|
||||
private readonly RegularExpressionState _state;
|
||||
|
||||
private class RegularExpressionState : ISimpleStateMachine<, RegularExpressionCases, RegularExpressionStateContext> { }
|
||||
private class RegularExpressionState : ISimpleStateMachine<RegularExpressionStateNode, int, RegularExpressionStateContext>
|
||||
{
|
||||
|
||||
private enum RegularExpressionCases { }
|
||||
public ref readonly RegularExpressionStateNode this[
|
||||
int label
|
||||
] => throw new NotImplementedException();
|
||||
|
||||
public ref readonly RegularExpressionStateNode GetCurrentStateNode()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool TryMoveNext(
|
||||
RegularExpressionStateContext ctx
|
||||
)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private struct RegularExpressionStateNode : ISimpleStateMachineNode<int, RegularExpressionStateContext>
|
||||
{
|
||||
|
||||
public ICollection<int> AvailableStateLabels => throw new NotImplementedException();
|
||||
|
||||
public SimpleStateMachineNodeTransition<int, RegularExpressionStateContext>
|
||||
Transition => throw new NotImplementedException();
|
||||
|
||||
public bool TryTransaction(
|
||||
RegularExpressionStateContext context,
|
||||
out int label
|
||||
)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private class RegularExpressionStateContext : StateContext
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user