Helps streamline DX1Collector in xo-gc/. Want both forward and verify entry points for the same representation.
88 lines
No EOL
4.5 KiB
C++
88 lines
No EOL
4.5 KiB
C++
/** @file ISyntaxStateMachine_DExpectSymbolSsm.hpp
|
|
*
|
|
* Generated automagically from ingredients:
|
|
* 1. code generator:
|
|
* [xo-facet/codegen/genfacet]
|
|
* arguments:
|
|
* --input [idl/ISyntaxStateMachine_DExpectSymbolSsm.json5]
|
|
* 2. jinja2 template for abstract facet .hpp file:
|
|
* [iface_facet_repr.hpp.j2]
|
|
* 3. idl for facet methods
|
|
* [idl/ISyntaxStateMachine_DExpectSymbolSsm.json5]
|
|
**/
|
|
|
|
#pragma once
|
|
|
|
#include "SyntaxStateMachine.hpp"
|
|
#include "SyntaxStateMachine.hpp"
|
|
#include "ssm/ISyntaxStateMachine_Xfer.hpp"
|
|
#include "DExpectSymbolSsm.hpp"
|
|
|
|
namespace xo { namespace scm { class ISyntaxStateMachine_DExpectSymbolSsm; } }
|
|
|
|
namespace xo {
|
|
namespace facet {
|
|
template <>
|
|
struct FacetImplementation<xo::scm::ASyntaxStateMachine,
|
|
xo::scm::DExpectSymbolSsm>
|
|
{
|
|
using ImplType = xo::scm::ISyntaxStateMachine_Xfer
|
|
<xo::scm::DExpectSymbolSsm,
|
|
xo::scm::ISyntaxStateMachine_DExpectSymbolSsm>;
|
|
};
|
|
}
|
|
}
|
|
|
|
namespace xo {
|
|
namespace scm {
|
|
/** @class ISyntaxStateMachine_DExpectSymbolSsm
|
|
**/
|
|
class ISyntaxStateMachine_DExpectSymbolSsm {
|
|
public:
|
|
/** @defgroup scm-syntaxstatemachine-dexpectsymbolssm-type-traits **/
|
|
///@{
|
|
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
|
using AGCObjectVisitor = xo::scm::ASyntaxStateMachine::AGCObjectVisitor;
|
|
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
|
using VisitReason = xo::scm::ASyntaxStateMachine::VisitReason;
|
|
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
|
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
|
///@}
|
|
/** @defgroup scm-syntaxstatemachine-dexpectsymbolssm-methods **/
|
|
///@{
|
|
// const methods
|
|
/** identify a type of syntax state machine **/
|
|
static syntaxstatetype ssm_type(const DExpectSymbolSsm & self) noexcept;
|
|
/** text describing expected/allowed input to this ssm in current state **/
|
|
static std::string_view get_expect_str(const DExpectSymbolSsm & self) noexcept;
|
|
|
|
// non-const methods
|
|
/** operate state machine for incoming token @p tk **/
|
|
static void on_token(DExpectSymbolSsm & self, const Token & tk, ParserStateMachine * p_psm);
|
|
/** update stat machine for incoming parsed symbol @p sym **/
|
|
static void on_parsed_symbol(DExpectSymbolSsm & self, std::string_view sym, ParserStateMachine * p_psm);
|
|
/** operate state machine for incoming type description @p td **/
|
|
static void on_parsed_typedescr(DExpectSymbolSsm & self, TypeDescr td, ParserStateMachine * p_psm);
|
|
/** update state machine for type emitted by nested ssm **/
|
|
static void on_parsed_type(DExpectSymbolSsm & self, obj<AType> type, ParserStateMachine * p_psm);
|
|
/** operate state machine for formal emitted by nested ssm **/
|
|
static void on_parsed_formal(DExpectSymbolSsm & self, const DUniqueString * param_name, TypeDescr param_type, ParserStateMachine * p_psm);
|
|
/** operate state machine for formal emitted by nested ssm **/
|
|
static void on_parsed_formal_with_token(DExpectSymbolSsm & self, const DUniqueString * param_name, TypeDescr param_type, const Token & tk, ParserStateMachine * p_psm);
|
|
/** consume formal arglist emitted by nested ssm **/
|
|
static void on_parsed_formal_arglist(DExpectSymbolSsm & self, DArray * arglist, ParserStateMachine * p_psm);
|
|
/** update state machine for nested parsed expression @p expr **/
|
|
static void on_parsed_expression(DExpectSymbolSsm & self, obj<AExpression> expr, ParserStateMachine * p_psm);
|
|
/** update state machine @p p_psm for incoming parsed expression @p expr followed by token @p tk **/
|
|
static void on_parsed_expression_with_token(DExpectSymbolSsm & self, obj<AExpression> expr, const Token & tk, ParserStateMachine * p_psm);
|
|
/** update state machine for nested quoted literal @p lit **/
|
|
static void on_quoted_literal(DExpectSymbolSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
|
/** gc support: visit immediate gc-aware child pointers with @p gc. Call gc.visit_child() for each **/
|
|
static void visit_gco_children(DExpectSymbolSsm & self, VisitReason reason, obj<AGCObjectVisitor> gc);
|
|
///@}
|
|
};
|
|
|
|
} /*namespace scm*/
|
|
} /*namespace xo*/
|
|
|
|
/* end */ |