diff --git a/include/xo/reader2/DSyntaxStateMachine.hpp b/include/xo/reader2/DSyntaxStateMachine.hpp new file mode 100644 index 00000000..4aa35f4d --- /dev/null +++ b/include/xo/reader2/DSyntaxStateMachine.hpp @@ -0,0 +1,42 @@ +/** @file DSyntaxStateMachine.hpp + * + * @author Roland Conybeare, Jan 2026 + **/ + +#pragma once + +#include + +namespace xo { + namespace scm { + + /** @class DSyntaxStateMachine + * @brief static interface for implementing ASyntaxStateMachine + * + * Using CRTP to collect methods common to ASyntaxStateMachine + * implementations. + * + * Deliberately unusable through base class pointer. + * For runtime polymorphism use something like: + * @code + * Derived * d = ...; + * auto obj = with_facet::mkobj(d); + * // or + * obj(d) + * @endcode + **/ + template + class DSyntaxStateMachine { + friend Derived; + + /** arglist is DArray of obj **/ + void on_parsed_formal_arglist(this auto&& self, DArray * arglist, ParserStateMachine * p_psm) { + p_psm->illegal_parsed_formal_arglist( + + } + }; + + } /*namespace scm*/ +} /*namespace xo*/ + +/* end DSyntaxStateMachine.hpp */