Classes | Static Public Attributes | List of all members
BT::Grammar::Real Struct Reference

#include <any_types.hpp>

Inheritance diagram for BT::Grammar::Real:
Inheritance graph
[legend]

Classes

struct  invalid_suffix
 

Static Public Attributes

static constexpr auto rule
 
static constexpr auto value
 

Detailed Description

Definition at line 95 of file any_types.hpp.

Member Data Documentation

◆ rule

constexpr auto BT::Grammar::Real::rule
staticconstexpr
Initial value:
= [] {
auto integer_part = dsl::sign + dsl::digits<>;
auto fraction = dsl::period >> dsl::digits<>;
auto exponent = (dsl::lit_c<'e'> / dsl::lit_c<'E'>) >> (dsl::sign + dsl::digits<>);
auto suffix_error =
.error<invalid_suffix>;
auto real_part = (fraction >> dsl::if_(exponent) | exponent) >> suffix_error;
auto real_number = dsl::token(integer_part + real_part);
return dsl::capture(real_number);
}()

Definition at line 102 of file any_types.hpp.

◆ value

constexpr auto BT::Grammar::Real::value
staticconstexpr
Initial value:
=
lexy::as_string<std::string> |
lexy::callback<BT::Any>([](std::string&& str) { return BT::Any(std::stod(str)); })

Definition at line 116 of file any_types.hpp.


The documentation for this struct was generated from the following file:
lexyd::peek_not
constexpr auto peek_not(Rule)
Checks if at this reader position, the rule would not match.
Definition: peek.hpp:173
lexyd::token
constexpr auto token(Rule)
Turns the arbitrary rule into a token by matching it without producing any values.
Definition: dsl/token.hpp:215
BT::Any
Definition: safe_any.hpp:36
lexyd::ascii::alpha_underscore
constexpr auto alpha_underscore
Definition: ascii.hpp:226
lexyd::ascii::alpha
constexpr auto alpha
Definition: ascii.hpp:201
lexyd::if_
constexpr auto if_(Branch)
If the branch condition matches, matches the branch then.
Definition: if.hpp:37
lexyd::capture
constexpr auto capture(Token)
Captures whatever the token matches as a lexeme; does not include trailing whitespace.
Definition: capture.hpp:127
lexyd::sign
constexpr auto sign
Matches a plus or minus sign or nothing, producing +1 or -1.
Definition: sign.hpp:43


behaviortree_cpp_v4
Author(s): Davide Faconti
autogenerated on Fri Dec 13 2024 03:19:18