#ifndef CTLL__ACTIONS__HPP #define CTLL__ACTIONS__HPP namespace ctll { struct empty_subject { }; struct empty_actions { // dummy operator so using Actions::operator() later will not give error template static constexpr auto apply(Action, InputSymbol, Subject subject) { return subject; } }; template struct identity: public Actions { using Actions::apply; // allow empty_subject to exists template constexpr static auto apply(Action, term, empty_subject) -> empty_subject { return {}; } template constexpr static auto apply(Action, epsilon, empty_subject) -> empty_subject { return {}; } }; template struct ignore_unknown: public Actions { using Actions::apply; // allow flow thru unknown actions template constexpr static auto apply(Action, term, Subject) -> Subject { return {}; } template constexpr static auto apply(Action, epsilon, Subject) -> Subject { return {}; } }; } #endif