xo-reader2 stack: progress towards recognizing function calls [WIP]
This commit is contained in:
parent
add1b018ac
commit
00dc45db9f
9 changed files with 234 additions and 37 deletions
|
|
@ -27,11 +27,11 @@ namespace xo {
|
|||
|
||||
static DExpectExprSsm * make(DArena & parser_mm,
|
||||
bool allow_defs,
|
||||
bool cxl_on_rightparen);
|
||||
bool cxl_on_rightbrace);
|
||||
|
||||
static void start(DArena & parser_mm,
|
||||
bool allow_defs,
|
||||
bool cxl_on_rightparen,
|
||||
bool cxl_on_rightbrace,
|
||||
ParserStateMachine * p_psm);
|
||||
static void start(ParserStateMachine * p_psm);
|
||||
|
||||
|
|
|
|||
|
|
@ -87,6 +87,12 @@ namespace xo {
|
|||
void on_leftparen_token(const Token & tk,
|
||||
ParserStateMachine * p_psm);
|
||||
|
||||
/** update ssm state for incoming rightparen token @p tk
|
||||
* with overall parser state in @p p_psm
|
||||
**/
|
||||
void on_rightparen_token(const Token & tk,
|
||||
ParserStateMachine * p_psm);
|
||||
|
||||
///@}
|
||||
/** @defgroup scm-parenssm-ssm-facet syntaxstatemachine facet methods **/
|
||||
///@{
|
||||
|
|
@ -101,6 +107,12 @@ namespace xo {
|
|||
void on_token(const Token & tk,
|
||||
ParserStateMachine * p_psm);
|
||||
|
||||
/** update ssm for expression @p expr (emitted by nested ssm),
|
||||
* with overall parser state in @p p_psm
|
||||
**/
|
||||
void on_parsed_expression(obj<AExpression> expr,
|
||||
ParserStateMachine * p_psm);
|
||||
|
||||
///@}
|
||||
/** @defgroup scm-parenssm-printable-facet printable facet methods **/
|
||||
///@{
|
||||
|
|
|
|||
|
|
@ -100,6 +100,8 @@ namespace xo {
|
|||
obj<AExpression> lhs,
|
||||
optype op);
|
||||
|
||||
static void start(DArena & parser_mm,
|
||||
ParserStateMachine * p_psm);
|
||||
static void start(DArena & parser_mm,
|
||||
obj<AExpression> lhs,
|
||||
ParserStateMachine * p_psm);
|
||||
|
|
@ -132,21 +134,9 @@ namespace xo {
|
|||
/** @defgroup scm-progressssm-methods general methods **/
|
||||
///@{
|
||||
|
||||
/** token belongs to surrounding syntax,
|
||||
* -> lock in current progress
|
||||
**/
|
||||
void on_completing_token(const Token & tk,
|
||||
ParserStateMachine * p_psm);
|
||||
|
||||
///@}
|
||||
/** @defgroup scm-progressssm-ssm-facet syntaxstatemachine facet methods **/
|
||||
/// @{
|
||||
|
||||
/** operate state machine for this syntax on incoming token @p tk
|
||||
* with overall parser state in @p p_psm
|
||||
**/
|
||||
void on_token(const Token & tk,
|
||||
ParserStateMachine * p_psm);
|
||||
/** handle leftparen token @p tk. Overall parser state in @p p_psm **/
|
||||
void on_leftparen_token(const Token & tk,
|
||||
ParserStateMachine * p_psm);
|
||||
|
||||
void on_symbol_token(const Token & tk,
|
||||
ParserStateMachine * p_psm);
|
||||
|
|
@ -168,6 +158,25 @@ namespace xo {
|
|||
ParserStateMachine * p_psm);
|
||||
void on_rightbrace_token(const Token & tk,
|
||||
ParserStateMachine * p_psm);
|
||||
|
||||
/** token belongs to surrounding syntax,
|
||||
* -> lock in current progress
|
||||
**/
|
||||
void on_completing_token(const Token & tk,
|
||||
ParserStateMachine * p_psm);
|
||||
|
||||
///@}
|
||||
/** @defgroup scm-progressssm-ssm-facet syntaxstatemachine facet methods **/
|
||||
/// @{
|
||||
|
||||
/** operate state machine for this syntax on incoming token @p tk
|
||||
* with overall parser state in @p p_psm
|
||||
**/
|
||||
void on_token(const Token & tk,
|
||||
ParserStateMachine * p_psm);
|
||||
|
||||
void on_parsed_expression(obj<AExpression> expr,
|
||||
ParserStateMachine * p_psm);
|
||||
void on_parsed_expression_with_token(obj<AExpression> expr,
|
||||
const Token & tk,
|
||||
ParserStateMachine * p_psm);
|
||||
|
|
|
|||
12
xo-reader2/include/xo/reader2/ProgressSsm.hpp
Normal file
12
xo-reader2/include/xo/reader2/ProgressSsm.hpp
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
/** @file ProgressSsm.hpp
|
||||
*
|
||||
* @author Roland Conybeare, Feb 2026
|
||||
**/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "DProgressSsm.hpp"
|
||||
#include "ssm/ISyntaxStateMachine_DProgressSsm.hpp"
|
||||
#include "ssm/IPrintable_DProgressSsm.hpp"
|
||||
|
||||
/* end ProgressSsm.hpp */
|
||||
Loading…
Add table
Add a link
Reference in a new issue