refactor regular automata

This commit is contained in:
IlyaShurupov 2024-02-08 10:52:28 +03:00 committed by Ilya Shurupov
parent b883f0029c
commit 2ebf650381
2 changed files with 37 additions and 55 deletions

View file

@ -10,6 +10,13 @@ namespace tp {
template <typename tAlphabetType, typename tStateType>
class ContextFreeAutomata {
struct Action {
enum Type { SHIFT, REDUCE, TRAP } type = TRAP;
ualni num = 0; // state to shift (shift action) or pop count (reduce action)
};
Buffer2D<Action> mTable;
public:
ContextFreeAutomata() = default;