xo-reader2: handle parsed typedescr + use in DDefineSsm

This commit is contained in:
Roland Conybeare 2026-01-21 12:14:35 -05:00
commit 7d33440ecb
26 changed files with 231 additions and 37 deletions

View file

@ -22,6 +22,7 @@ namespace xo {
class DExpectSymbolSsm {
public:
using DArena = xo::mm::DArena;
using TypeDescr = xo::reflect::TypeDescr;
using ppindentinfo = xo::print::ppindentinfo;
public:
@ -57,8 +58,29 @@ namespace xo {
**/
std::string_view get_expect_str() const noexcept;
/** update state for this syntax after parsing a symbol @p sym;
* overall parser state in @p p_psm.
*
* NOTE:
* might not be obvious that this is unreachable.
* DExpectSymbolSsm converts a symbol token,
* and delivers it to parent ssm using this entry point.
* This method would only be called if consecutive
* DExpectSymbolSsm instances on parser stack;
* which scenario never occurs in Schematika syntax
**/
void on_parsed_symbol(std::string_view sym,
ParserStateMachine * p_psm);
/** update state for this syntax after parsing a type-description @p td
* in nested state machine.
* (provided to satisfy ASyntaxStateMachine api. not reachable)
**/
void on_parsed_typedescr(TypeDescr td,
ParserStateMachine * p_psm);
/** update state for this syntax on incoming token @p tk,
* overall parser state in @p p_psm
* overall parser state in @p p_psm.
**/
void on_def_token(const Token & tk,
ParserStateMachine * p_psm);
@ -75,21 +97,6 @@ namespace xo {
void on_colon_token(const Token & tk,
ParserStateMachine * p_psm);
/** update state for this syntax after parsing a symbol @p sym;
* overall parser state in @p p_psm.
*
* NOTE:
* might not be obvious that this is unreachable.
* DExpectSymbolSsm converts a symbol token,
* and delivers it to parent ssm using this entry point.
* This method would only be called if consecutive
* DExpectSymbolSsm instances on parser stack;
* which scenario never occurs in Schematika syntax
**/
void on_parsed_symbol(std::string_view sym,
ParserStateMachine * p_psm);
///@}
/** @defgroup scm-expectsymbol-printable-facet printable facet methods **/
///@{