xo-reader2 xo-expression2: + DSequenceSsm ++ utest
This commit is contained in:
parent
334057613e
commit
15f779d2f8
64 changed files with 514 additions and 154 deletions
|
|
@ -29,6 +29,10 @@ set(SELF_SRCS
|
|||
ISyntaxStateMachine_DIfElseSsm.cpp
|
||||
IPrintable_DIfElseSsm.cpp
|
||||
|
||||
DSequenceSsm.cpp
|
||||
ISyntaxStateMachine_DSequenceSsm.cpp
|
||||
IPrintable_DSequenceSsm.cpp
|
||||
|
||||
DLambdaSsm.cpp
|
||||
ISyntaxStateMachine_DLambdaSsm.cpp
|
||||
IPrintable_DLambdaSsm.cpp
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
#include "SyntaxStateMachine.hpp"
|
||||
#include "ssm/ISyntaxStateMachine_DExpectExprSsm.hpp"
|
||||
#include "ssm/ISyntaxStateMachine_DProgressSsm.hpp"
|
||||
#include "DSequenceSsm.hpp"
|
||||
#include "syntaxstatetype.hpp"
|
||||
#include <xo/expression2/DConstant.hpp>
|
||||
#include <xo/expression2/detail/IExpression_DConstant.hpp>
|
||||
|
|
@ -114,6 +115,10 @@ namespace xo {
|
|||
scope log(XO_DEBUG(p_psm->debug_flag()), xtag("tk", tk));
|
||||
|
||||
switch (tk.tk_type()) {
|
||||
case tokentype::tk_leftbrace:
|
||||
this->on_leftbrace_token(tk, p_psm);
|
||||
return;
|
||||
|
||||
case tokentype::tk_symbol:
|
||||
this->on_symbol_token(tk, p_psm);
|
||||
return;
|
||||
|
|
@ -148,7 +153,6 @@ namespace xo {
|
|||
case tokentype::tk_rightparen:
|
||||
case tokentype::tk_leftbracket:
|
||||
case tokentype::tk_rightbracket:
|
||||
case tokentype::tk_leftbrace:
|
||||
case tokentype::tk_rightbrace:
|
||||
case tokentype::tk_leftangle:
|
||||
case tokentype::tk_rightangle:
|
||||
|
|
@ -179,6 +183,15 @@ namespace xo {
|
|||
Super::on_token(tk, p_psm);
|
||||
}
|
||||
|
||||
void
|
||||
DExpectExprSsm::on_leftbrace_token(const Token & tk,
|
||||
ParserStateMachine * p_psm)
|
||||
{
|
||||
(void)tk;
|
||||
|
||||
DSequenceSsm::start(p_psm);
|
||||
}
|
||||
|
||||
void
|
||||
DExpectExprSsm::on_symbol_token(const Token & tk,
|
||||
ParserStateMachine * p_psm)
|
||||
|
|
@ -377,7 +390,8 @@ namespace xo {
|
|||
(ppii,
|
||||
"DExpectExprSsm",
|
||||
refrtag("allow_defs", allow_defs_),
|
||||
refrtag("cxl_on_rightbrace", cxl_on_rightbrace_)
|
||||
refrtag("cxl_on_rightbrace", cxl_on_rightbrace_),
|
||||
refrtag("expect", this->get_expect_str())
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -412,16 +426,6 @@ namespace xo {
|
|||
paren_xs::start(p_psm);
|
||||
}
|
||||
|
||||
void
|
||||
expect_expr_xs::on_leftbrace_token(const token_type & /*tk*/,
|
||||
parserstatemachine * p_psm)
|
||||
{
|
||||
scope log(XO_DEBUG(p_psm->debug_flag()));
|
||||
|
||||
/* push lparen_0 to remember to look for subsequent rightparen. */
|
||||
sequence_xs::start(p_psm);
|
||||
}
|
||||
|
||||
void
|
||||
expect_expr_xs::on_rightbrace_token(const token_type & tk,
|
||||
parserstatemachine * p_psm)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/** @file lambda_xs.cpp
|
||||
/** @file DLambdaSsm.cpp
|
||||
*
|
||||
* @author Roland Conybeare, Jan 2026
|
||||
**/
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
/* @file DSequenceSsm.cpp */
|
||||
|
||||
#include "DSequenceSsm.hpp"
|
||||
#include "ssm/ISyntaxStateMachine_DSequenceSsm.hpp"
|
||||
#include "DExpectExprSsm.hpp"
|
||||
|
||||
#ifdef NOT_YET
|
||||
#include "expect_expr_xs.hpp"
|
||||
|
|
@ -11,31 +13,67 @@
|
|||
#endif
|
||||
|
||||
namespace xo {
|
||||
using xo::scm::DefineExpr;
|
||||
#ifdef NOT_YET
|
||||
using xo::scm::DDefineExpr;
|
||||
#endif
|
||||
using xo::facet::typeseq;
|
||||
|
||||
namespace scm {
|
||||
#ifdef NOT_YET
|
||||
std::unique_ptr<sequence_xs>
|
||||
sequence_xs::make() {
|
||||
return std::make_unique<sequence_xs>(sequence_xs());
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
sequence_xs::start(parserstatemachine * p_psm) {
|
||||
p_psm->push_exprstate(sequence_xs::make());
|
||||
DSequenceSsm::start(ParserStateMachine * p_psm)
|
||||
{
|
||||
p_psm->push_ssm(DSequenceSsm::make(p_psm->parser_alloc(),
|
||||
p_psm->expr_alloc()));
|
||||
/* want to accept anything that starts an expression,
|
||||
* except that } ends it
|
||||
* except that rightbrace '}' ends it
|
||||
*/
|
||||
expect_expr_xs::start(true /*allow_defs*/,
|
||||
DExpectExprSsm::start(p_psm->parser_alloc(),
|
||||
true /*allow_defs*/,
|
||||
true /*cxl_on_rightbrace*/,
|
||||
p_psm);
|
||||
}
|
||||
|
||||
obj<ASyntaxStateMachine,DSequenceSsm>
|
||||
DSequenceSsm::make(DArena & mm,
|
||||
obj<AAllocator> expr_mm)
|
||||
{
|
||||
return obj<ASyntaxStateMachine,DSequenceSsm>(_make(mm, expr_mm));
|
||||
}
|
||||
|
||||
DSequenceSsm *
|
||||
DSequenceSsm::_make(DArena & mm,
|
||||
obj<AAllocator> expr_mm)
|
||||
{
|
||||
void * mem = mm.alloc(typeseq::id<DSequenceSsm>(),
|
||||
sizeof(DSequenceSsm));
|
||||
|
||||
DSequenceExpr * seq_expr = DSequenceExpr::_make_empty(expr_mm);
|
||||
|
||||
return new (mem) DSequenceSsm(seq_expr);
|
||||
}
|
||||
|
||||
DSequenceSsm::DSequenceSsm(DSequenceExpr * seq_expr) : seq_expr_{seq_expr}
|
||||
{}
|
||||
|
||||
#ifdef NOT_YET
|
||||
sequence_xs::sequence_xs()
|
||||
: exprstate(exprstatetype::sequenceexpr)
|
||||
{}
|
||||
#endif
|
||||
|
||||
syntaxstatetype
|
||||
DSequenceSsm::ssm_type() const noexcept
|
||||
{
|
||||
return syntaxstatetype::sequence;
|
||||
}
|
||||
|
||||
std::string_view
|
||||
DSequenceSsm::get_expect_str() const noexcept
|
||||
{
|
||||
return "expr|semicolon|rightbrace";
|
||||
}
|
||||
|
||||
#ifdef NOT_YET
|
||||
void
|
||||
sequence_xs::on_expr(bp<Expression> expr,
|
||||
parserstatemachine * p_psm)
|
||||
|
|
@ -122,12 +160,16 @@ namespace xo {
|
|||
sequence_xs::print(std::ostream & os) const {
|
||||
os << "<sequence_xs" << xtag("expr_v.size", expr_v_.size()) << ">";
|
||||
}
|
||||
#endif
|
||||
|
||||
bool
|
||||
sequence_xs::pretty_print(const xo::print::ppindentinfo & ppii) const
|
||||
DSequenceSsm::pretty(const xo::print::ppindentinfo & ppii) const
|
||||
{
|
||||
return ppii.pps()->pretty_struct(ppii, "sequence_xs",
|
||||
xrefrtag("expr_v.size", expr_v_.size()));
|
||||
return ppii.pps()->pretty_struct
|
||||
(ppii,
|
||||
"SequenceSsm",
|
||||
xrefrtag("seq_expr.size", seq_expr_->size()),
|
||||
xrefrtag("expect", this->get_expect_str()));
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/IPrintable_DDefineSsm.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
|
|
@ -25,4 +25,4 @@ namespace xo {
|
|||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end IPrintable_DDefineSsm.cpp */
|
||||
/* end IPrintable_DDefineSsm.cpp */
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/IPrintable_DExpectExprSsm.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
|
|
@ -25,4 +25,4 @@ namespace xo {
|
|||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end IPrintable_DExpectExprSsm.cpp */
|
||||
/* end IPrintable_DExpectExprSsm.cpp */
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/IPrintable_DExpectFormalArgSsm.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
|
|
@ -25,4 +25,4 @@ namespace xo {
|
|||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end IPrintable_DExpectFormalArgSsm.cpp */
|
||||
/* end IPrintable_DExpectFormalArgSsm.cpp */
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/IPrintable_DExpectFormalArglistSsm.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
|
|
@ -25,4 +25,4 @@ namespace xo {
|
|||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end IPrintable_DExpectFormalArglistSsm.cpp */
|
||||
/* end IPrintable_DExpectFormalArglistSsm.cpp */
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/IPrintable_DExpectSymbolSsm.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
|
|
@ -25,4 +25,4 @@ namespace xo {
|
|||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end IPrintable_DExpectSymbolSsm.cpp */
|
||||
/* end IPrintable_DExpectSymbolSsm.cpp */
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/IPrintable_DExpectTypeSsm.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
|
|
@ -25,4 +25,4 @@ namespace xo {
|
|||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end IPrintable_DExpectTypeSsm.cpp */
|
||||
/* end IPrintable_DExpectTypeSsm.cpp */
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/IPrintable_DExprSeqState.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
|
|
@ -25,4 +25,4 @@ namespace xo {
|
|||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end IPrintable_DExprSeqState.cpp */
|
||||
/* end IPrintable_DExprSeqState.cpp */
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/IPrintable_DIfElseSsm.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
|
|
@ -25,4 +25,4 @@ namespace xo {
|
|||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end IPrintable_DIfElseSsm.cpp */
|
||||
/* end IPrintable_DIfElseSsm.cpp */
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/IPrintable_DLambdaSsm.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
|
|
@ -25,4 +25,4 @@ namespace xo {
|
|||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end IPrintable_DLambdaSsm.cpp */
|
||||
/* end IPrintable_DLambdaSsm.cpp */
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/IPrintable_DProgressSsm.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
|
|
@ -25,4 +25,4 @@ namespace xo {
|
|||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end IPrintable_DProgressSsm.cpp */
|
||||
/* end IPrintable_DProgressSsm.cpp */
|
||||
|
|
|
|||
28
src/reader2/IPrintable_DSequenceSsm.cpp
Normal file
28
src/reader2/IPrintable_DSequenceSsm.cpp
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/** @file IPrintable_DSequenceSsm.cpp
|
||||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/IPrintable_DSequenceSsm.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
* [iface_facet_any.hpp.j2]
|
||||
* 3. idl for facet methods
|
||||
* [idl/IPrintable_DSequenceSsm.json5]
|
||||
**/
|
||||
|
||||
#include "ssm/IPrintable_DSequenceSsm.hpp"
|
||||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
auto
|
||||
IPrintable_DSequenceSsm::pretty(const DSequenceSsm & self, const ppindentinfo & ppii) -> bool
|
||||
{
|
||||
return self.pretty(ppii);
|
||||
}
|
||||
|
||||
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end IPrintable_DSequenceSsm.cpp */
|
||||
|
|
@ -80,4 +80,4 @@ ISyntaxStateMachine_Any::on_parsed_expression_with_semicolon(Opaque, obj<AExpres
|
|||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end ISyntaxStateMachine_Any.cpp */
|
||||
/* end ISyntaxStateMachine_Any.cpp */
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/ISyntaxStateMachine_DDefineSsm.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
|
|
@ -66,4 +66,4 @@ namespace xo {
|
|||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end ISyntaxStateMachine_DDefineSsm.cpp */
|
||||
/* end ISyntaxStateMachine_DDefineSsm.cpp */
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/ISyntaxStateMachine_DExpectExprSsm.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
|
|
@ -66,4 +66,4 @@ namespace xo {
|
|||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end ISyntaxStateMachine_DExpectExprSsm.cpp */
|
||||
/* end ISyntaxStateMachine_DExpectExprSsm.cpp */
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/ISyntaxStateMachine_DExpectFormalArgSsm.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
|
|
@ -66,4 +66,4 @@ namespace xo {
|
|||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end ISyntaxStateMachine_DExpectFormalArgSsm.cpp */
|
||||
/* end ISyntaxStateMachine_DExpectFormalArgSsm.cpp */
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/ISyntaxStateMachine_DExpectFormalArglistSsm.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
|
|
@ -66,4 +66,4 @@ namespace xo {
|
|||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end ISyntaxStateMachine_DExpectFormalArglistSsm.cpp */
|
||||
/* end ISyntaxStateMachine_DExpectFormalArglistSsm.cpp */
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/ISyntaxStateMachine_DExpectSymbolSsm.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
|
|
@ -66,4 +66,4 @@ namespace xo {
|
|||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end ISyntaxStateMachine_DExpectSymbolSsm.cpp */
|
||||
/* end ISyntaxStateMachine_DExpectSymbolSsm.cpp */
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/ISyntaxStateMachine_DExpectTypeSsm.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
|
|
@ -66,4 +66,4 @@ namespace xo {
|
|||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end ISyntaxStateMachine_DExpectTypeSsm.cpp */
|
||||
/* end ISyntaxStateMachine_DExpectTypeSsm.cpp */
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/ISyntaxStateMachine_DExprSeqState.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
|
|
@ -66,4 +66,4 @@ namespace xo {
|
|||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end ISyntaxStateMachine_DExprSeqState.cpp */
|
||||
/* end ISyntaxStateMachine_DExprSeqState.cpp */
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/ISyntaxStateMachine_DIfElseSsm.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
|
|
@ -66,4 +66,4 @@ namespace xo {
|
|||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end ISyntaxStateMachine_DIfElseSsm.cpp */
|
||||
/* end ISyntaxStateMachine_DIfElseSsm.cpp */
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/ISyntaxStateMachine_DLambdaSsm.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
|
|
@ -66,4 +66,4 @@ namespace xo {
|
|||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end ISyntaxStateMachine_DLambdaSsm.cpp */
|
||||
/* end ISyntaxStateMachine_DLambdaSsm.cpp */
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/ISyntaxStateMachine_DProgressSsm.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
|
|
@ -66,4 +66,4 @@ namespace xo {
|
|||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end ISyntaxStateMachine_DProgressSsm.cpp */
|
||||
/* end ISyntaxStateMachine_DProgressSsm.cpp */
|
||||
|
|
|
|||
69
src/reader2/ISyntaxStateMachine_DSequenceSsm.cpp
Normal file
69
src/reader2/ISyntaxStateMachine_DSequenceSsm.cpp
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
/** @file ISyntaxStateMachine_DSequenceSsm.cpp
|
||||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/ISyntaxStateMachine_DSequenceSsm.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
* [iface_facet_any.hpp.j2]
|
||||
* 3. idl for facet methods
|
||||
* [idl/ISyntaxStateMachine_DSequenceSsm.json5]
|
||||
**/
|
||||
|
||||
#include "ssm/ISyntaxStateMachine_DSequenceSsm.hpp"
|
||||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
auto
|
||||
ISyntaxStateMachine_DSequenceSsm::ssm_type(const DSequenceSsm & self) noexcept -> syntaxstatetype
|
||||
{
|
||||
return self.ssm_type();
|
||||
}
|
||||
|
||||
auto
|
||||
ISyntaxStateMachine_DSequenceSsm::get_expect_str(const DSequenceSsm & self) noexcept -> std::string_view
|
||||
{
|
||||
return self.get_expect_str();
|
||||
}
|
||||
|
||||
auto
|
||||
ISyntaxStateMachine_DSequenceSsm::on_token(DSequenceSsm & self, const Token & tk, ParserStateMachine * p_psm) -> void
|
||||
{
|
||||
self.on_token(tk, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DSequenceSsm::on_parsed_symbol(DSequenceSsm & self, std::string_view sym, ParserStateMachine * p_psm) -> void
|
||||
{
|
||||
self.on_parsed_symbol(sym, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DSequenceSsm::on_parsed_typedescr(DSequenceSsm & self, TypeDescr td, ParserStateMachine * p_psm) -> void
|
||||
{
|
||||
self.on_parsed_typedescr(td, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DSequenceSsm::on_parsed_formal(DSequenceSsm & self, const DUniqueString * param_name, TypeDescr param_type, ParserStateMachine * p_psm) -> void
|
||||
{
|
||||
self.on_parsed_formal(param_name, param_type, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DSequenceSsm::on_parsed_formal_arglist(DSequenceSsm & self, DArray * arglist, ParserStateMachine * p_psm) -> void
|
||||
{
|
||||
self.on_parsed_formal_arglist(arglist, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DSequenceSsm::on_parsed_expression(DSequenceSsm & self, obj<AExpression> expr, ParserStateMachine * p_psm) -> void
|
||||
{
|
||||
self.on_parsed_expression(expr, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DSequenceSsm::on_parsed_expression_with_semicolon(DSequenceSsm & self, obj<AExpression> expr, ParserStateMachine * p_psm) -> void
|
||||
{
|
||||
self.on_parsed_expression_with_semicolon(expr, p_psm);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end ISyntaxStateMachine_DSequenceSsm.cpp */
|
||||
|
|
@ -17,6 +17,8 @@
|
|||
#include <xo/reader2/ssm/ISyntaxStateMachine_DIfElseSsm.hpp>
|
||||
#include <xo/reader2/ssm/IPrintable_DIfElseSsm.hpp>
|
||||
|
||||
#include <xo/reader2/ssm/IPrintable_DSequenceSsm.hpp>
|
||||
|
||||
#include <xo/reader2/ssm/ISyntaxStateMachine_DExpectFormalArglistSsm.hpp>
|
||||
#include <xo/reader2/ssm/IPrintable_DExpectFormalArglistSsm.hpp>
|
||||
|
||||
|
|
@ -63,6 +65,8 @@ namespace xo {
|
|||
FacetRegistry::register_impl<ASyntaxStateMachine, DIfElseSsm>();
|
||||
FacetRegistry::register_impl<APrintable, DIfElseSsm>();
|
||||
|
||||
FacetRegistry::register_impl<APrintable, DSequenceSsm>();
|
||||
|
||||
FacetRegistry::register_impl<ASyntaxStateMachine, DExpectFormalArglistSsm>();
|
||||
FacetRegistry::register_impl<APrintable, DExpectFormalArglistSsm>();
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,16 @@ namespace xo {
|
|||
switch (x) {
|
||||
case syntaxstatetype::invalid:
|
||||
break;
|
||||
case syntaxstatetype::defexpr:
|
||||
return "defexpr";
|
||||
case syntaxstatetype::lambdaexpr:
|
||||
return "lambdaexpr";
|
||||
case syntaxstatetype::ifelseexpr:
|
||||
return "ifelseexpr";
|
||||
case syntaxstatetype::sequence:
|
||||
return "sequence";
|
||||
case syntaxstatetype::progress:
|
||||
return "progress";
|
||||
case syntaxstatetype::expect_toplevel_expression_sequence:
|
||||
return "expect-toplevel-expression-sequence";
|
||||
case syntaxstatetype::expect_formal_arglist:
|
||||
|
|
@ -25,14 +35,6 @@ namespace xo {
|
|||
return "expect-type";
|
||||
case syntaxstatetype::expect_rhs_expression:
|
||||
return "expect-rhs-expression";
|
||||
case syntaxstatetype::defexpr:
|
||||
return "defexpr";
|
||||
case syntaxstatetype::lambdaexpr:
|
||||
return "lambdaexpr";
|
||||
case syntaxstatetype::ifelseexpr:
|
||||
return "ifelseexpr";
|
||||
case syntaxstatetype::progress:
|
||||
return "progress";
|
||||
case syntaxstatetype::N:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue