xo-reader2 stack: refactor for ssm file location
This commit is contained in:
parent
aca798467a
commit
f0d4e58010
11 changed files with 423 additions and 8 deletions
62
include/xo/reader2/define/IPrintable_DDefineSsm.hpp
Normal file
62
include/xo/reader2/define/IPrintable_DDefineSsm.hpp
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
/** @file IPrintable_DDefineSsm.hpp
|
||||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/IPrintable_DDefineSsm.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
* [iface_facet_repr.hpp.j2]
|
||||
* 3. idl for facet methods
|
||||
* [idl/IPrintable_DDefineSsm.json5]
|
||||
**/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Printable.hpp"
|
||||
#include <xo/printable2/Printable.hpp>
|
||||
#include <xo/printable2/detail/IPrintable_Xfer.hpp>
|
||||
#include "DDefineSsm.hpp"
|
||||
|
||||
namespace xo { namespace scm { class IPrintable_DDefineSsm; } }
|
||||
|
||||
namespace xo {
|
||||
namespace facet {
|
||||
template <>
|
||||
struct FacetImplementation<xo::print::APrintable,
|
||||
xo::scm::DDefineSsm>
|
||||
{
|
||||
using ImplType = xo::print::IPrintable_Xfer
|
||||
<xo::scm::DDefineSsm,
|
||||
xo::scm::IPrintable_DDefineSsm>;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
/** @class IPrintable_DDefineSsm
|
||||
**/
|
||||
class IPrintable_DDefineSsm {
|
||||
public:
|
||||
/** @defgroup scm-printable-ddefinessm-type-traits **/
|
||||
///@{
|
||||
using ppindentinfo = xo::print::APrintable::ppindentinfo;
|
||||
using Copaque = xo::print::APrintable::Copaque;
|
||||
using Opaque = xo::print::APrintable::Opaque;
|
||||
///@}
|
||||
/** @defgroup scm-printable-ddefinessm-methods **/
|
||||
///@{
|
||||
// const methods
|
||||
/** Pretty-printing support for this object.
|
||||
See [xo-indentlog/xo/indentlog/pretty.hpp] **/
|
||||
static bool pretty(const DDefineSsm & self, const ppindentinfo & ppii);
|
||||
|
||||
// non-const methods
|
||||
///@}
|
||||
};
|
||||
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end */
|
||||
87
include/xo/reader2/define/ISyntaxStateMachine_DDefineSsm.hpp
Normal file
87
include/xo/reader2/define/ISyntaxStateMachine_DDefineSsm.hpp
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
/** @file ISyntaxStateMachine_DDefineSsm.hpp
|
||||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/ISyntaxStateMachine_DDefineSsm.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
* [iface_facet_repr.hpp.j2]
|
||||
* 3. idl for facet methods
|
||||
* [idl/ISyntaxStateMachine_DDefineSsm.json5]
|
||||
**/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "SyntaxStateMachine.hpp"
|
||||
#include "SyntaxStateMachine.hpp"
|
||||
#include "ssm/ISyntaxStateMachine_Xfer.hpp"
|
||||
#include "DDefineSsm.hpp"
|
||||
|
||||
namespace xo { namespace scm { class ISyntaxStateMachine_DDefineSsm; } }
|
||||
|
||||
namespace xo {
|
||||
namespace facet {
|
||||
template <>
|
||||
struct FacetImplementation<xo::scm::ASyntaxStateMachine,
|
||||
xo::scm::DDefineSsm>
|
||||
{
|
||||
using ImplType = xo::scm::ISyntaxStateMachine_Xfer
|
||||
<xo::scm::DDefineSsm,
|
||||
xo::scm::ISyntaxStateMachine_DDefineSsm>;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
/** @class ISyntaxStateMachine_DDefineSsm
|
||||
**/
|
||||
class ISyntaxStateMachine_DDefineSsm {
|
||||
public:
|
||||
/** @defgroup scm-syntaxstatemachine-ddefinessm-type-traits **/
|
||||
///@{
|
||||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using ACollector = xo::scm::ASyntaxStateMachine::ACollector;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
///@}
|
||||
/** @defgroup scm-syntaxstatemachine-ddefinessm-methods **/
|
||||
///@{
|
||||
// const methods
|
||||
/** identify a type of syntax state machine **/
|
||||
static syntaxstatetype ssm_type(const DDefineSsm & self) noexcept;
|
||||
/** text describing expected/allowed input to this ssm in current state **/
|
||||
static std::string_view get_expect_str(const DDefineSsm & self) noexcept;
|
||||
|
||||
// non-const methods
|
||||
/** operate state machine for incoming token @p tk **/
|
||||
static void on_token(DDefineSsm & self, const Token & tk, ParserStateMachine * p_psm);
|
||||
/** update stat machine for incoming parsed symbol @p sym **/
|
||||
static void on_parsed_symbol(DDefineSsm & self, std::string_view sym, ParserStateMachine * p_psm);
|
||||
/** operate state machine for incoming type description @p td **/
|
||||
static void on_parsed_typedescr(DDefineSsm & self, TypeDescr td, ParserStateMachine * p_psm);
|
||||
/** update state machine for type emitted by nested ssm **/
|
||||
static void on_parsed_type(DDefineSsm & self, obj<AType> type, ParserStateMachine * p_psm);
|
||||
/** operate state machine for formal emitted by nested ssm **/
|
||||
static void on_parsed_formal(DDefineSsm & 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(DDefineSsm & 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(DDefineSsm & self, DArray * arglist, ParserStateMachine * p_psm);
|
||||
/** update state machine for nested parsed expression @p expr **/
|
||||
static void on_parsed_expression(DDefineSsm & 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(DDefineSsm & self, obj<AExpression> expr, const Token & tk, ParserStateMachine * p_psm);
|
||||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DDefineSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: move immediate children to to-space and sub forwarding pointer **/
|
||||
static void forward_children(DDefineSsm & self, obj<ACollector> gc);
|
||||
///@}
|
||||
};
|
||||
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end */
|
||||
62
include/xo/reader2/quote/IPrintable_DQuoteSsm.hpp
Normal file
62
include/xo/reader2/quote/IPrintable_DQuoteSsm.hpp
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
/** @file IPrintable_DQuoteSsm.hpp
|
||||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/IPrintable_DQuoteSsm.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
* [iface_facet_repr.hpp.j2]
|
||||
* 3. idl for facet methods
|
||||
* [idl/IPrintable_DQuoteSsm.json5]
|
||||
**/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Printable.hpp"
|
||||
#include <xo/printable2/Printable.hpp>
|
||||
#include <xo/printable2/detail/IPrintable_Xfer.hpp>
|
||||
#include "DQuoteSsm.hpp"
|
||||
|
||||
namespace xo { namespace scm { class IPrintable_DQuoteSsm; } }
|
||||
|
||||
namespace xo {
|
||||
namespace facet {
|
||||
template <>
|
||||
struct FacetImplementation<xo::print::APrintable,
|
||||
xo::scm::DQuoteSsm>
|
||||
{
|
||||
using ImplType = xo::print::IPrintable_Xfer
|
||||
<xo::scm::DQuoteSsm,
|
||||
xo::scm::IPrintable_DQuoteSsm>;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
/** @class IPrintable_DQuoteSsm
|
||||
**/
|
||||
class IPrintable_DQuoteSsm {
|
||||
public:
|
||||
/** @defgroup scm-printable-dquotessm-type-traits **/
|
||||
///@{
|
||||
using ppindentinfo = xo::print::APrintable::ppindentinfo;
|
||||
using Copaque = xo::print::APrintable::Copaque;
|
||||
using Opaque = xo::print::APrintable::Opaque;
|
||||
///@}
|
||||
/** @defgroup scm-printable-dquotessm-methods **/
|
||||
///@{
|
||||
// const methods
|
||||
/** Pretty-printing support for this object.
|
||||
See [xo-indentlog/xo/indentlog/pretty.hpp] **/
|
||||
static bool pretty(const DQuoteSsm & self, const ppindentinfo & ppii);
|
||||
|
||||
// non-const methods
|
||||
///@}
|
||||
};
|
||||
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end */
|
||||
87
include/xo/reader2/quote/ISyntaxStateMachine_DQuoteSsm.hpp
Normal file
87
include/xo/reader2/quote/ISyntaxStateMachine_DQuoteSsm.hpp
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
/** @file ISyntaxStateMachine_DQuoteSsm.hpp
|
||||
*
|
||||
* Generated automagically from ingredients:
|
||||
* 1. code generator:
|
||||
* [xo-facet/codegen/genfacet]
|
||||
* arguments:
|
||||
* --input [idl/ISyntaxStateMachine_DQuoteSsm.json5]
|
||||
* 2. jinja2 template for abstract facet .hpp file:
|
||||
* [iface_facet_repr.hpp.j2]
|
||||
* 3. idl for facet methods
|
||||
* [idl/ISyntaxStateMachine_DQuoteSsm.json5]
|
||||
**/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "SyntaxStateMachine.hpp"
|
||||
#include "SyntaxStateMachine.hpp"
|
||||
#include "ssm/ISyntaxStateMachine_Xfer.hpp"
|
||||
#include "DQuoteSsm.hpp"
|
||||
|
||||
namespace xo { namespace scm { class ISyntaxStateMachine_DQuoteSsm; } }
|
||||
|
||||
namespace xo {
|
||||
namespace facet {
|
||||
template <>
|
||||
struct FacetImplementation<xo::scm::ASyntaxStateMachine,
|
||||
xo::scm::DQuoteSsm>
|
||||
{
|
||||
using ImplType = xo::scm::ISyntaxStateMachine_Xfer
|
||||
<xo::scm::DQuoteSsm,
|
||||
xo::scm::ISyntaxStateMachine_DQuoteSsm>;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
/** @class ISyntaxStateMachine_DQuoteSsm
|
||||
**/
|
||||
class ISyntaxStateMachine_DQuoteSsm {
|
||||
public:
|
||||
/** @defgroup scm-syntaxstatemachine-dquotessm-type-traits **/
|
||||
///@{
|
||||
using TypeDescr = xo::scm::ASyntaxStateMachine::TypeDescr;
|
||||
using ACollector = xo::scm::ASyntaxStateMachine::ACollector;
|
||||
using AGCObject = xo::scm::ASyntaxStateMachine::AGCObject;
|
||||
using Copaque = xo::scm::ASyntaxStateMachine::Copaque;
|
||||
using Opaque = xo::scm::ASyntaxStateMachine::Opaque;
|
||||
///@}
|
||||
/** @defgroup scm-syntaxstatemachine-dquotessm-methods **/
|
||||
///@{
|
||||
// const methods
|
||||
/** identify a type of syntax state machine **/
|
||||
static syntaxstatetype ssm_type(const DQuoteSsm & self) noexcept;
|
||||
/** text describing expected/allowed input to this ssm in current state **/
|
||||
static std::string_view get_expect_str(const DQuoteSsm & self) noexcept;
|
||||
|
||||
// non-const methods
|
||||
/** operate state machine for incoming token @p tk **/
|
||||
static void on_token(DQuoteSsm & self, const Token & tk, ParserStateMachine * p_psm);
|
||||
/** update stat machine for incoming parsed symbol @p sym **/
|
||||
static void on_parsed_symbol(DQuoteSsm & self, std::string_view sym, ParserStateMachine * p_psm);
|
||||
/** operate state machine for incoming type description @p td **/
|
||||
static void on_parsed_typedescr(DQuoteSsm & self, TypeDescr td, ParserStateMachine * p_psm);
|
||||
/** update state machine for type emitted by nested ssm **/
|
||||
static void on_parsed_type(DQuoteSsm & self, obj<AType> type, ParserStateMachine * p_psm);
|
||||
/** operate state machine for formal emitted by nested ssm **/
|
||||
static void on_parsed_formal(DQuoteSsm & 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(DQuoteSsm & 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(DQuoteSsm & self, DArray * arglist, ParserStateMachine * p_psm);
|
||||
/** update state machine for nested parsed expression @p expr **/
|
||||
static void on_parsed_expression(DQuoteSsm & 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(DQuoteSsm & self, obj<AExpression> expr, const Token & tk, ParserStateMachine * p_psm);
|
||||
/** update state machine for nested quoted literal @p lit **/
|
||||
static void on_quoted_literal(DQuoteSsm & self, obj<AGCObject> lit, ParserStateMachine * p_psm);
|
||||
/** gc support: move immediate children to to-space and sub forwarding pointer **/
|
||||
static void forward_children(DQuoteSsm & self, obj<ACollector> gc);
|
||||
///@}
|
||||
};
|
||||
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end */
|
||||
Loading…
Add table
Add a link
Reference in a new issue