xo-reader2 stack: expand symbol table to store typedefs

+ typedef utest
+ misc qol policy choices
This commit is contained in:
Roland Conybeare 2026-03-11 07:49:14 -05:00
commit 76af3ff3b5
42 changed files with 1050 additions and 110 deletions

View file

@ -48,6 +48,7 @@ namespace xo {
void illegal_type(obj<AType> type,
ParserStateMachine * p_psm)
{
// starting with c++23 can use "this auto&& self" instead
Derived & self = static_cast<Derived &>(*this);
p_psm->illegal_input_on_type(Derived::ssm_classname(),
@ -55,6 +56,18 @@ namespace xo {
self.get_expect_str());
}
/** Explicit error path **/
void illegal_parsed_symbol(std::string_view sym,
ParserStateMachine * p_psm)
{
// starting with c++23 can use "this auto&& self" instead
Derived & self = static_cast<Derived &>(*this);
p_psm->illegal_input_on_symbol(Derived::ssm_classname(),
sym,
self.get_expect_str());
}
/** Explicit error path **/
void illegal_quoted_literal(obj<AGCObject> lit,
ParserStateMachine * p_psm)
@ -78,12 +91,7 @@ namespace xo {
void on_parsed_symbol(std::string_view sym,
ParserStateMachine * p_psm)
{
// starting with c++23 can use "this auto&& self" instead
Derived & self = reinterpret_cast<Derived&>(*this);
p_psm->illegal_input_on_symbol(Derived::ssm_classname(),
sym,
self.get_expect_str());
this->illegal_parsed_symbol(sym, p_psm);
}
/** Default implementation for required SyntaxStateMachine facet method