xo-interpreter: handle litersl strings. Broken memory model.

This commit is contained in:
Roland Conybeare 2025-11-29 20:19:33 -05:00
commit cf846b2f8d
16 changed files with 234 additions and 32 deletions

View file

@ -68,6 +68,9 @@ namespace xo {
virtual void on_f64_token(const token_type & tk,
parserstatemachine * p_psm) override;
virtual void on_string_token(const token_type & tk,
parserstatemachine * p_psm) final override;
/** update exprstate in response to a successfully-parsed subexpression **/
virtual void on_expr(bp<Expression> expr,
parserstatemachine * p_psm) override;

View file

@ -59,6 +59,8 @@ namespace xo {
parserstatemachine * p_psm) override;
virtual void on_f64_token(const token_type & tk,
parserstatemachine * p_psm) override;
virtual void on_string_token(const token_type & tk,
parserstatemachine * p_psm) final override;
// ----- victory methods -----

View file

@ -218,6 +218,10 @@ namespace xo {
virtual void on_f64_token(const token_type & tk,
parserstatemachine * p_psm);
/** handle incoming string-literal token **/
virtual void on_string_token(const token_type & tk,
parserstatemachine * p_psm);
protected:
/** throw exception when next token is inconsistent with
* parsing state