refactor regular automata
This commit is contained in:
parent
a9a810c197
commit
e6d77c639b
2 changed files with 37 additions and 55 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue