Classes | Namespaces | Macros | Typedefs | Variables
subgrammar.hpp File Reference
#include <lexy/action/base.hpp>
#include <lexy/dsl/base.hpp>
Include dependency graph for subgrammar.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  lexyd::_subg< Production, T >
 
struct  lexy::_subgrammar< Production, Handler, State, Reader >
 
struct  lexyd::_subg< Production, T >::p< NextParser >
 

Namespaces

 lexy
 
 lexyd
 

Macros

#define LEXY_DECLARE_SUBGRAMMAR(Production)
 
#define LEXY_DEFINE_SUBGRAMMAR(Production)
 
#define LEXY_INSTANTIATE_SUBGRAMMAR(Production, ...)
 

Typedefs

template<typename Production , typename Action >
using lexy::_subgrammar_for = _subgrammar< Production, typename Action::handler, typename Action::state, lexy::input_reader< typename Action::input > >
 

Variables

template<typename Production , typename T >
constexpr auto lexyd::subgrammar = _subg<Production, T>{}
 

Macro Definition Documentation

◆ LEXY_DECLARE_SUBGRAMMAR

#define LEXY_DECLARE_SUBGRAMMAR (   Production)
Value:
namespace lexy \
{ \
template <typename Handler, typename State, typename Reader> \
struct _subgrammar<Production, Handler, State, Reader> \
{ \
template <typename T> \
static bool parse(_detail::lazy_init<T>& value, \
_detail::parse_context_control_block<Handler, State>* control_block, \
Reader& reader); \
}; \
}

Definition at line 20 of file subgrammar.hpp.

◆ LEXY_DEFINE_SUBGRAMMAR

#define LEXY_DEFINE_SUBGRAMMAR (   Production)
Value:
template <typename Handler, typename State, typename Reader> \
template <typename T> \
bool ::lexy::_subgrammar<Production, Handler, State, Reader>:: \
Reader& reader) \
{ \
lexy::_pc<Handler, State, Production> context(control_block); \
auto success = ::lexy::_do_action(context, reader); \
value = LEXY_MOV(context.value); \
return success; \
}

Definition at line 33 of file subgrammar.hpp.

◆ LEXY_INSTANTIATE_SUBGRAMMAR

#define LEXY_INSTANTIATE_SUBGRAMMAR (   Production,
  ... 
)
Value:
template bool ::lexy::_subgrammar_for<Production, __VA_ARGS__> \
::parse<::lexy::_production_value_type<typename __VA_ARGS__::handler, \
typename __VA_ARGS__::state, Production>> \
typename __VA_ARGS__::handler, typename __VA_ARGS__::state, Production>>&, \
::lexy::_detail::parse_context_control_block<typename __VA_ARGS__::handler, \
typename __VA_ARGS__::state>*, \

Definition at line 47 of file subgrammar.hpp.

LEXY_MOV
#define LEXY_MOV(...)
Definition: config.hpp:21
magic_enum::detail::value
constexpr E value(std::size_t i) noexcept
Definition: magic_enum.hpp:664
lexy
Definition: any_ref.hpp:12
lexy::_detail::parse_context_control_block
Definition: action/base.hpp:66
lexy::parse
constexpr auto parse(const Input &input, const ErrorCallback &callback)
Parses the production into a value, invoking the callback on error.
Definition: parse.hpp:171
lexy::_detail::lazy_init
Definition: lazy_init.hpp:97
lexy::_production_value_type
typename Handler::template value_callback< Production, State >::return_type _production_value_type
Definition: action/base.hpp:113
lexy::_detail::cp_error::success
@ success
lexy::_do_action
constexpr auto _do_action(_pc< Handler, State, Production > &context, Reader &reader)
Definition: action/base.hpp:201
lexy::input_reader
decltype(LEXY_DECLVAL(Input).reader()) input_reader
Definition: input/base.hpp:92


behaviortree_cpp_v4
Author(s): Davide Faconti
autogenerated on Fri Jun 28 2024 02:20:08