xo-reader: + on_expr_with_semicolon() [wip, utest not passing]
This commit is contained in:
parent
ac4ee7d6b8
commit
bc30b34bc2
11 changed files with 88 additions and 2 deletions
|
|
@ -81,6 +81,8 @@ namespace xo {
|
|||
|
||||
virtual void on_expr(ref::brw<Expression> expr,
|
||||
parserstatemachine * p_psm) override;
|
||||
virtual void on_expr_with_semicolon(ref::brw<Expression> expr,
|
||||
parserstatemachine * p_psm) override;
|
||||
virtual void on_symbol(const std::string & symbol_name,
|
||||
parserstatemachine * p_psm) override;
|
||||
virtual void on_typedescr(TypeDescr td,
|
||||
|
|
|
|||
|
|
@ -47,6 +47,12 @@ namespace xo {
|
|||
/** update exprstate in response to a successfully-parsed subexpression **/
|
||||
virtual void on_expr(ref::brw<Expression> expr,
|
||||
parserstatemachine * p_psm) override;
|
||||
/** update exprstate in response to a successfully-parsed subexpression,
|
||||
* that's terminated by semicolon ';'
|
||||
**/
|
||||
virtual void on_expr_with_semicolon(ref::brw<Expression> expr,
|
||||
parserstatemachine * p_psm) override;
|
||||
|
||||
|
||||
private:
|
||||
static std::unique_ptr<expect_expr_xs> make(bool allow_defs,
|
||||
|
|
|
|||
|
|
@ -107,6 +107,10 @@ namespace xo {
|
|||
virtual void on_expr(ref::brw<Expression> expr,
|
||||
parserstatemachine * p_psm);
|
||||
|
||||
/** update exprstate in response to a successfully-parsed subexpression, that ends with semicolon **/
|
||||
virtual void on_expr_with_semicolon(ref::brw<Expression> expr,
|
||||
parserstatemachine * p_psm);
|
||||
|
||||
/** update exprstate when expecting a symbol **/
|
||||
virtual void on_symbol(const std::string & symbol,
|
||||
parserstatemachine * p_psm);
|
||||
|
|
|
|||
|
|
@ -48,6 +48,8 @@ namespace xo {
|
|||
parserstatemachine * p_psm) override;
|
||||
virtual void on_expr(ref::brw<Expression> expr,
|
||||
parserstatemachine * p_psm) override;
|
||||
virtual void on_expr_with_semicolon(ref::brw<Expression> expr,
|
||||
parserstatemachine * p_psm) override;
|
||||
virtual void on_semicolon_token(const token_type & tk,
|
||||
parserstatemachine * p_psm) override;
|
||||
|
||||
|
|
|
|||
|
|
@ -45,10 +45,13 @@ namespace xo {
|
|||
|
||||
// ----- parsing outputs -----
|
||||
|
||||
void on_expr(ref::brw<Expression> expr);
|
||||
void on_expr_with_semicolon(ref::brw<Expression> expr);
|
||||
void on_symbol(const std::string & symbol);
|
||||
|
||||
// ---- parsing inputs -----
|
||||
|
||||
void on_semicolon_token(const token_type & tk);
|
||||
void on_leftbrace_token(const token_type & tk);
|
||||
void on_rightbrace_token(const token_type & tk);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue