xo-reader2: + DExpectFormalArglistSsm [WIP]
This commit is contained in:
parent
fdf2cc8439
commit
254d7c179d
18 changed files with 899 additions and 8 deletions
|
|
@ -33,6 +33,10 @@ set(SELF_SRCS
|
|||
ISyntaxStateMachine_DLambdaSsm.cpp
|
||||
IPrintable_DLambdaSsm.cpp
|
||||
|
||||
DExpectFormalArglistSsm.cpp
|
||||
ISyntaxStateMachine_DExpectFormalArglistSsm.cpp
|
||||
IPrintable_DExpectFormalArglistSsm.cpp
|
||||
|
||||
DExpectSymbolSsm.cpp
|
||||
ISyntaxStateMachine_DExpectSymbolSsm.cpp
|
||||
IPrintable_DExpectSymbolSsm.cpp
|
||||
|
|
|
|||
227
src/reader2/DExpectFormalArglistSsm.cpp
Normal file
227
src/reader2/DExpectFormalArglistSsm.cpp
Normal file
|
|
@ -0,0 +1,227 @@
|
|||
/* @file DExpectFormalArglistSsm.cpp
|
||||
*
|
||||
* @author Roland Conybeare, Jan 2026
|
||||
*/
|
||||
|
||||
#include "DExpectFormalArglistSsm.hpp"
|
||||
#include "ssm/ISyntaxStateMachine_DExpectFormalArglistSsm.hpp"
|
||||
#include <xo/alloc2/arena/IAllocator_DArena.hpp>
|
||||
|
||||
#ifdef NOT_YET
|
||||
#include "parserstatemachine.hpp"
|
||||
#include "exprstatestack.hpp"
|
||||
#include "expect_formal_xs.hpp"
|
||||
#include "expect_symbol_xs.hpp"
|
||||
#include "xo/expression/Variable.hpp"
|
||||
#include "xo/indentlog/print/vector.hpp"
|
||||
#endif
|
||||
|
||||
namespace xo {
|
||||
using xo::mm::AAllocator;
|
||||
using xo::print::ppindentinfo;
|
||||
using xo::reflect::typeseq;
|
||||
|
||||
namespace scm {
|
||||
const char *
|
||||
formalarglstatetype_descr(formalarglstatetype x) {
|
||||
switch (x) {
|
||||
case formalarglstatetype::invalid:
|
||||
return "invalid";
|
||||
case formalarglstatetype::argl_0:
|
||||
return "argl_0";
|
||||
case formalarglstatetype::argl_1a:
|
||||
return "argl_1a";
|
||||
case formalarglstatetype::argl_1b:
|
||||
return "argl_1b";
|
||||
case formalarglstatetype::n_formalarglstatetype:
|
||||
break;
|
||||
}
|
||||
|
||||
return "?formalarglstatetype";
|
||||
}
|
||||
|
||||
DExpectFormalArglistSsm::DExpectFormalArglistSsm(DArray * argl) : argl_{argl}
|
||||
{}
|
||||
|
||||
DExpectFormalArglistSsm *
|
||||
DExpectFormalArglistSsm::_make(DArena & arena)
|
||||
{
|
||||
obj<AAllocator,DArena> mm(&arena);
|
||||
|
||||
/* out-of-order so argl follows ssm in arena,
|
||||
* consistent with any subsequent arglist realloc.
|
||||
* Not a load-bearing choice however
|
||||
*/
|
||||
|
||||
void * mem = arena.alloc(typeseq::id<DExpectFormalArglistSsm>(),
|
||||
sizeof(DExpectFormalArglistSsm));
|
||||
|
||||
|
||||
/* allocate room for 8 arguments (during parsing)
|
||||
* will re-alloc to expand as needed
|
||||
*/
|
||||
DArray * argl = DArray::empty(mm, 8);
|
||||
|
||||
return new (mem) DExpectFormalArglistSsm(argl);
|
||||
}
|
||||
|
||||
obj<ASyntaxStateMachine,DExpectFormalArglistSsm>
|
||||
DExpectFormalArglistSsm::make(DArena & arena)
|
||||
{
|
||||
obj<ASyntaxStateMachine,DExpectFormalArglistSsm> retval(_make(arena));
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
void
|
||||
DExpectFormalArglistSsm::start(ParserStateMachine * p_psm)
|
||||
{
|
||||
p_psm->push_ssm(DExpectFormalArglistSsm::make(p_psm->parser_alloc()));
|
||||
}
|
||||
|
||||
syntaxstatetype
|
||||
DExpectFormalArglistSsm::ssm_type() const noexcept {
|
||||
return syntaxstatetype::expect_formal_arglist;
|
||||
}
|
||||
|
||||
std::string_view
|
||||
DExpectFormalArglistSsm::get_expect_str() const {
|
||||
switch (fastate_) {
|
||||
case formalarglstatetype::invalid:
|
||||
case formalarglstatetype::n_formalarglstatetype:
|
||||
assert(false); // impossible
|
||||
break;
|
||||
case formalarglstatetype::argl_0:
|
||||
return "leftparen";
|
||||
case formalarglstatetype::argl_1a:
|
||||
return "formal-name";
|
||||
case formalarglstatetype::argl_1b:
|
||||
return "comma|rightparen";
|
||||
}
|
||||
|
||||
return "?expect";
|
||||
}
|
||||
|
||||
void
|
||||
DExpectFormalArglistSsm::on_token(const Token & tk,
|
||||
ParserStateMachine * p_psm)
|
||||
{
|
||||
p_psm->illegal_input_on_token("DExpectFormalArglistSsm::on_token",
|
||||
tk,
|
||||
this->get_expect_str());
|
||||
}
|
||||
|
||||
void
|
||||
DExpectFormalArglistSsm::on_parsed_symbol(std::string_view sym,
|
||||
ParserStateMachine * p_psm)
|
||||
{
|
||||
p_psm->illegal_input_on_symbol("DExpectFormalArglistSsm::on_parsed_symbol",
|
||||
sym,
|
||||
this->get_expect_str());
|
||||
}
|
||||
|
||||
void
|
||||
DExpectFormalArglistSsm::on_parsed_typedescr(TypeDescr td,
|
||||
ParserStateMachine * p_psm)
|
||||
{
|
||||
p_psm->illegal_input_on_typedescr("DExpectFormalArglistSsm::on_parsed_typedescr",
|
||||
td,
|
||||
this->get_expect_str());
|
||||
}
|
||||
|
||||
void
|
||||
DExpectFormalArglistSsm::on_parsed_expression(obj<AExpression> expr,
|
||||
ParserStateMachine * p_psm)
|
||||
{
|
||||
p_psm->illegal_parsed_expression("DExpectFormalArglistSsm::on_parsed_expression",
|
||||
expr,
|
||||
this->get_expect_str());
|
||||
}
|
||||
|
||||
void
|
||||
DExpectFormalArglistSsm::on_parsed_expression_with_semicolon(obj<AExpression> expr,
|
||||
ParserStateMachine * p_psm)
|
||||
{
|
||||
p_psm->illegal_parsed_expression("DExpectFormalArglistSsm::on_parsed_expression_with_semicolon",
|
||||
expr,
|
||||
this->get_expect_str());
|
||||
}
|
||||
|
||||
#ifdef NOT_YET
|
||||
expect_formal_arglist_xs::expect_formal_arglist_xs()
|
||||
: exprstate(exprstatetype::expect_formal_arglist),
|
||||
farglxs_type_{formalarglstatetype::argl_0}
|
||||
{}
|
||||
|
||||
void
|
||||
expect_formal_arglist_xs::on_leftparen_token(const token_type & tk,
|
||||
parserstatemachine * p_psm)
|
||||
{
|
||||
if (farglxs_type_ == formalarglstatetype::argl_0) {
|
||||
this->farglxs_type_ = formalarglstatetype::argl_1a;
|
||||
/* TODO: refactor to have setup method on each exprstate */
|
||||
expect_formal_xs::start(p_psm);
|
||||
} else {
|
||||
exprstate::on_leftparen_token(tk, p_psm);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
expect_formal_arglist_xs::on_formal(const rp<Variable> & formal,
|
||||
parserstatemachine * p_psm)
|
||||
{
|
||||
if (farglxs_type_ == formalarglstatetype::argl_1a) {
|
||||
this->farglxs_type_ = formalarglstatetype::argl_1b;
|
||||
this->argl_.push_back(formal);
|
||||
} else {
|
||||
exprstate::on_formal(formal, p_psm);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
expect_formal_arglist_xs::on_comma_token(const token_type & tk,
|
||||
parserstatemachine * p_psm)
|
||||
{
|
||||
if (farglxs_type_ == formalarglstatetype::argl_1b) {
|
||||
this->farglxs_type_ = formalarglstatetype::argl_1a;
|
||||
expect_formal_xs::start(p_psm);
|
||||
} else {
|
||||
exprstate::on_comma_token(tk, p_psm);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
expect_formal_arglist_xs::on_rightparen_token(const token_type & tk,
|
||||
parserstatemachine * p_psm)
|
||||
{
|
||||
if (farglxs_type_ == formalarglstatetype::argl_1b) {
|
||||
std::unique_ptr<exprstate> self = p_psm->pop_exprstate();
|
||||
|
||||
p_psm->top_exprstate().on_formal_arglist(this->argl_, p_psm);
|
||||
} else {
|
||||
exprstate::on_rightparen_token(tk, p_psm);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
expect_formal_arglist_xs::print(std::ostream & os) const {
|
||||
os << "<expect_formal_arglist_xs"
|
||||
<< xtag("type", farglxs_type_);
|
||||
os << xtag("farglxs_type", farglxs_type_);
|
||||
os << xtag("argl", argl_);
|
||||
os << ">";
|
||||
}
|
||||
#endif
|
||||
|
||||
bool
|
||||
DExpectFormalArglistSsm::pretty(const ppindentinfo & ppii) const
|
||||
{
|
||||
return ppii.pps()->pretty_struct(ppii,
|
||||
"DExpectFormalArglistSsm");
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
|
||||
/* end DExpectFormalArglistSsm.cpp */
|
||||
|
|
@ -4,10 +4,12 @@
|
|||
**/
|
||||
|
||||
#include "DExprSeqState.hpp"
|
||||
#include "DDefineSsm.hpp"
|
||||
#include "ssm/ISyntaxStateMachine_DExprSeqState.hpp"
|
||||
#include <xo/reader2/DProgressSsm.hpp>
|
||||
#include <xo/reader2/DIfElseSsm.hpp>
|
||||
#include "DDefineSsm.hpp"
|
||||
#include "DLambdaSsm.hpp"
|
||||
#include "DProgressSsm.hpp"
|
||||
#include "DIfElseSsm.hpp"
|
||||
|
||||
#include <xo/expression2/DConstant.hpp>
|
||||
#include <xo/expression2/detail/IExpression_DConstant.hpp>
|
||||
#include <xo/object2/DString.hpp>
|
||||
|
|
@ -121,6 +123,10 @@ namespace xo {
|
|||
this->on_def_token(tk, p_psm);
|
||||
return;
|
||||
|
||||
case tokentype::tk_lambda:
|
||||
this->on_lambda_token(tk, p_psm);
|
||||
return;
|
||||
|
||||
case tokentype::tk_if:
|
||||
this->on_if_token(tk, p_psm);
|
||||
return;
|
||||
|
|
@ -177,7 +183,6 @@ namespace xo {
|
|||
case tokentype::tk_cmpeq:
|
||||
case tokentype::tk_cmpne:
|
||||
case tokentype::tk_type:
|
||||
case tokentype::tk_lambda:
|
||||
case tokentype::tk_then:
|
||||
case tokentype::tk_else:
|
||||
case tokentype::tk_let:
|
||||
|
|
@ -241,6 +246,29 @@ namespace xo {
|
|||
*/
|
||||
}
|
||||
|
||||
void
|
||||
DExprSeqState::on_lambda_token(const Token & tk,
|
||||
ParserStateMachine * p_psm)
|
||||
{
|
||||
(void)tk;
|
||||
|
||||
switch (seqtype_) {
|
||||
case exprseqtype::toplevel_interactive:
|
||||
DLambdaSsm::start(p_psm);
|
||||
return;
|
||||
case exprseqtype::toplevel_batch:
|
||||
/* lambda not allowed at top-level in batch mode */
|
||||
break;
|
||||
case exprseqtype::N:
|
||||
assert(false); // unreachable
|
||||
break;
|
||||
}
|
||||
|
||||
p_psm->illegal_input_on_token("DExprSeqState::on_lambda_token",
|
||||
tk,
|
||||
this->get_expect_str());
|
||||
}
|
||||
|
||||
void
|
||||
DExprSeqState::on_if_token(const Token & tk,
|
||||
ParserStateMachine * p_psm)
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
#include "DLambdaSsm.hpp"
|
||||
#include "ssm/ISyntaxStateMachine_DLambdaSsm.hpp"
|
||||
#include "DExpectFormalArglistSsm.hpp"
|
||||
#include "ssm/ISyntaxStateMachine_DExpectFormalArglistSsm.hpp"
|
||||
#include "ParserStateMachine.hpp"
|
||||
#include "syntaxstatetype.hpp"
|
||||
#include <xo/printable2/Printable.hpp>
|
||||
|
|
@ -25,6 +27,7 @@
|
|||
|
||||
namespace xo {
|
||||
using xo::print::APrintable;
|
||||
using xo::mm::AAllocator;
|
||||
using xo::facet::FacetRegistry;
|
||||
using xo::reflect::typeseq;
|
||||
|
||||
|
|
@ -117,11 +120,77 @@ namespace xo {
|
|||
DLambdaSsm::on_token(const Token & tk,
|
||||
ParserStateMachine * p_psm)
|
||||
{
|
||||
switch (tk.tk_type()) {
|
||||
case tokentype::tk_lambda:
|
||||
this->on_lambda_token(tk, p_psm);
|
||||
return;
|
||||
|
||||
// all the not-yet-handled cases
|
||||
case tokentype::tk_def:
|
||||
case tokentype::tk_if:
|
||||
case tokentype::tk_symbol:
|
||||
case tokentype::tk_colon:
|
||||
case tokentype::tk_singleassign:
|
||||
case tokentype::tk_string:
|
||||
case tokentype::tk_f64:
|
||||
case tokentype::tk_i64:
|
||||
case tokentype::tk_bool:
|
||||
case tokentype::tk_semicolon:
|
||||
case tokentype::tk_invalid:
|
||||
case tokentype::tk_leftparen:
|
||||
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:
|
||||
case tokentype::tk_lessequal:
|
||||
case tokentype::tk_greatequal:
|
||||
case tokentype::tk_dot:
|
||||
case tokentype::tk_comma:
|
||||
case tokentype::tk_doublecolon:
|
||||
case tokentype::tk_assign:
|
||||
case tokentype::tk_yields:
|
||||
case tokentype::tk_plus:
|
||||
case tokentype::tk_minus:
|
||||
case tokentype::tk_star:
|
||||
case tokentype::tk_slash:
|
||||
case tokentype::tk_cmpeq:
|
||||
case tokentype::tk_cmpne:
|
||||
case tokentype::tk_type:
|
||||
case tokentype::tk_then:
|
||||
case tokentype::tk_else:
|
||||
case tokentype::tk_let:
|
||||
case tokentype::tk_in:
|
||||
case tokentype::tk_end:
|
||||
case tokentype::N:
|
||||
break;
|
||||
}
|
||||
|
||||
p_psm->illegal_input_on_token("DLambdaSsm::on_token",
|
||||
tk,
|
||||
this->get_expect_str());
|
||||
}
|
||||
|
||||
void
|
||||
DLambdaSsm::on_lambda_token(const Token & tk,
|
||||
ParserStateMachine * p_psm)
|
||||
{
|
||||
if (lmstate_ == lambdastatetype::lm_0) {
|
||||
this->lmstate_ = lambdastatetype::lm_1;
|
||||
|
||||
DExpectFormalArglistSsm::start(p_psm);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
p_psm->illegal_input_on_token("DLambdaSsm::on_lambda_token",
|
||||
tk,
|
||||
this->get_expect_str());
|
||||
}
|
||||
|
||||
|
||||
#ifdef NOT_YET
|
||||
void
|
||||
lambda_xs::on_lambda_token(const token_type & tk,
|
||||
|
|
@ -386,8 +455,8 @@ namespace xo {
|
|||
DLambdaSsm::pretty(const ppindentinfo & ppii) const
|
||||
{
|
||||
obj<APrintable> body
|
||||
= FacetRegistry::instance().variant<APrintable,
|
||||
AExpression>(body_);
|
||||
= FacetRegistry::instance().try_variant<APrintable,
|
||||
AExpression>(body_);
|
||||
|
||||
if (body) {
|
||||
return ppii.pps()->pretty_struct
|
||||
|
|
|
|||
28
src/reader2/IPrintable_DExpectFormalArglistSsm.cpp
Normal file
28
src/reader2/IPrintable_DExpectFormalArglistSsm.cpp
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/** @file IPrintable_DExpectFormalArglistSsm.cpp
|
||||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/IPrintable_DExpectFormalArglistSsm.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
* [iface_facet_any.hpp.j2]
|
||||
* 3. idl for facet methods
|
||||
* [idl/IPrintable_DExpectFormalArglistSsm.json5]
|
||||
**/
|
||||
|
||||
#include "ssm/IPrintable_DExpectFormalArglistSsm.hpp"
|
||||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
auto
|
||||
IPrintable_DExpectFormalArglistSsm::pretty(const DExpectFormalArglistSsm & self, const ppindentinfo & ppii) -> bool
|
||||
{
|
||||
return self.pretty(ppii);
|
||||
}
|
||||
|
||||
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end IPrintable_DExpectFormalArglistSsm.cpp */
|
||||
59
src/reader2/ISyntaxStateMachine_DExpectFormalArglistSsm.cpp
Normal file
59
src/reader2/ISyntaxStateMachine_DExpectFormalArglistSsm.cpp
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
/** @file ISyntaxStateMachine_DExpectFormalArglistSsm.cpp
|
||||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [/home/roland/proj/xo-umbrella2-claude1/xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/ISyntaxStateMachine_DExpectFormalArglistSsm.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
* [iface_facet_any.hpp.j2]
|
||||
* 3. idl for facet methods
|
||||
* [idl/ISyntaxStateMachine_DExpectFormalArglistSsm.json5]
|
||||
**/
|
||||
|
||||
#include "ssm/ISyntaxStateMachine_DExpectFormalArglistSsm.hpp"
|
||||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
auto
|
||||
ISyntaxStateMachine_DExpectFormalArglistSsm::ssm_type(const DExpectFormalArglistSsm & self) noexcept -> syntaxstatetype
|
||||
{
|
||||
return self.ssm_type();
|
||||
}
|
||||
|
||||
auto
|
||||
ISyntaxStateMachine_DExpectFormalArglistSsm::get_expect_str(const DExpectFormalArglistSsm & self) noexcept -> std::string_view
|
||||
{
|
||||
return self.get_expect_str();
|
||||
}
|
||||
|
||||
auto
|
||||
ISyntaxStateMachine_DExpectFormalArglistSsm::on_token(DExpectFormalArglistSsm & self, const Token & tk, ParserStateMachine * p_psm) -> void
|
||||
{
|
||||
self.on_token(tk, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DExpectFormalArglistSsm::on_parsed_symbol(DExpectFormalArglistSsm & self, std::string_view sym, ParserStateMachine * p_psm) -> void
|
||||
{
|
||||
self.on_parsed_symbol(sym, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DExpectFormalArglistSsm::on_parsed_typedescr(DExpectFormalArglistSsm & self, TypeDescr td, ParserStateMachine * p_psm) -> void
|
||||
{
|
||||
self.on_parsed_typedescr(td, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DExpectFormalArglistSsm::on_parsed_expression(DExpectFormalArglistSsm & self, obj<AExpression> expr, ParserStateMachine * p_psm) -> void
|
||||
{
|
||||
self.on_parsed_expression(expr, p_psm);
|
||||
}
|
||||
auto
|
||||
ISyntaxStateMachine_DExpectFormalArglistSsm::on_parsed_expression_with_semicolon(DExpectFormalArglistSsm & self, obj<AExpression> expr, ParserStateMachine * p_psm) -> void
|
||||
{
|
||||
self.on_parsed_expression_with_semicolon(expr, p_psm);
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end ISyntaxStateMachine_DExpectFormalArglistSsm.cpp */
|
||||
|
|
@ -11,9 +11,15 @@
|
|||
#include <xo/reader2/ssm/ISyntaxStateMachine_DDefineSsm.hpp>
|
||||
#include <xo/reader2/ssm/IPrintable_DDefineSsm.hpp>
|
||||
|
||||
#include <xo/reader2/ssm/ISyntaxStateMachine_DLambdaSsm.hpp>
|
||||
#include <xo/reader2/ssm/IPrintable_DLambdaSsm.hpp>
|
||||
|
||||
#include <xo/reader2/ssm/ISyntaxStateMachine_DIfElseSsm.hpp>
|
||||
#include <xo/reader2/ssm/IPrintable_DIfElseSsm.hpp>
|
||||
|
||||
#include <xo/reader2/ssm/ISyntaxStateMachine_DExpectFormalArglistSsm.hpp>
|
||||
#include <xo/reader2/ssm/IPrintable_DExpectFormalArglistSsm.hpp>
|
||||
|
||||
#include <xo/reader2/ssm/ISyntaxStateMachine_DExpectSymbolSsm.hpp>
|
||||
#include <xo/reader2/ssm/IPrintable_DExpectSymbolSsm.hpp>
|
||||
|
||||
|
|
@ -48,9 +54,15 @@ namespace xo {
|
|||
FacetRegistry::register_impl<ASyntaxStateMachine, DDefineSsm>();
|
||||
FacetRegistry::register_impl<APrintable, DDefineSsm>();
|
||||
|
||||
FacetRegistry::register_impl<ASyntaxStateMachine, DLambdaSsm>();
|
||||
FacetRegistry::register_impl<APrintable, DLambdaSsm>();
|
||||
|
||||
FacetRegistry::register_impl<ASyntaxStateMachine, DIfElseSsm>();
|
||||
FacetRegistry::register_impl<APrintable, DIfElseSsm>();
|
||||
|
||||
FacetRegistry::register_impl<ASyntaxStateMachine, DExpectFormalArglistSsm>();
|
||||
FacetRegistry::register_impl<APrintable, DExpectFormalArglistSsm>();
|
||||
|
||||
FacetRegistry::register_impl<ASyntaxStateMachine, DExpectSymbolSsm>();
|
||||
FacetRegistry::register_impl<APrintable, DExpectSymbolSsm>();
|
||||
|
||||
|
|
@ -65,11 +77,14 @@ namespace xo {
|
|||
|
||||
log && log(xtag("DExprSeqState.tseq", typeseq::id<DExprSeqState>()));
|
||||
log && log(xtag("DDefineSsm.tseq", typeseq::id<DDefineSsm>()));
|
||||
log && log(xtag("DLambdaSsm.tseq", typeseq::id<DLambdaSsm>()));
|
||||
log && log(xtag("DIfElseSsm.tseq", typeseq::id<DIfElseSsm>()));
|
||||
log && log(xtag("DExpectFormalArglistSsm.tseq", typeseq::id<DExpectFormalArglistSsm>()));
|
||||
log && log(xtag("DExpectSymbolSsm.tseq", typeseq::id<DExpectSymbolSsm>()));
|
||||
log && log(xtag("DExpectTypeSsm.tseq", typeseq::id<DExpectTypeSsm>()));
|
||||
log && log(xtag("DExpectExprSsm.tseq", typeseq::id<DExpectExprSsm>()));
|
||||
log && log(xtag("DProgressSsm.tseq", typeseq::id<DProgressSsm>()));
|
||||
log && log(xtag("ASyntaxStateMachine.tseq", typeseq::id<ASyntaxStateMachine>()));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ namespace xo {
|
|||
break;
|
||||
case syntaxstatetype::expect_toplevel_expression_sequence:
|
||||
return "expect-toplevel-expression-sequence";
|
||||
case syntaxstatetype::expect_formal_arglist:
|
||||
return "expect-formal-arglist";
|
||||
case syntaxstatetype::expect_symbol:
|
||||
return "expect-symbol";
|
||||
case syntaxstatetype::expect_type:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue