C++ Mathematical Expression Toolkit (ExprTk) release
Loading...
Searching...
No Matches
exprtk::parser< T >::expression_generator< Type > Class Template Reference
Collaboration diagram for exprtk::parser< T >::expression_generator< Type >:
[legend]

Classes

struct  switch_nodes
struct  synthesize_binary_ext_expression
struct  synthesize_vob_expression
struct  synthesize_bov_expression
struct  synthesize_cob_expression
struct  synthesize_boc_expression
struct  synthesize_cocob_expression
struct  synthesize_coboc_expression
struct  synthesize_vov_expression
struct  synthesize_cov_expression
struct  synthesize_voc_expression
struct  synthesize_sf3ext_expression
struct  synthesize_sf4ext_expression
struct  synthesize_vovov_expression0
struct  synthesize_vovov_expression1
struct  synthesize_vovoc_expression0
struct  synthesize_vovoc_expression1
struct  synthesize_vocov_expression0
struct  synthesize_vocov_expression1
struct  synthesize_covov_expression0
struct  synthesize_covov_expression1
struct  synthesize_covoc_expression0
struct  synthesize_covoc_expression1
struct  synthesize_cocov_expression0
struct  synthesize_cocov_expression1
struct  synthesize_vococ_expression0
struct  synthesize_vococ_expression1
struct  synthesize_vovovov_expression0
struct  synthesize_vovovoc_expression0
struct  synthesize_vovocov_expression0
struct  synthesize_vocovov_expression0
struct  synthesize_covovov_expression0
struct  synthesize_covocov_expression0
struct  synthesize_vocovoc_expression0
struct  synthesize_covovoc_expression0
struct  synthesize_vococov_expression0
struct  synthesize_vovovov_expression1
struct  synthesize_vovovoc_expression1
struct  synthesize_vovocov_expression1
struct  synthesize_vocovov_expression1
struct  synthesize_covovov_expression1
struct  synthesize_covocov_expression1
struct  synthesize_vocovoc_expression1
struct  synthesize_covovoc_expression1
struct  synthesize_vococov_expression1
struct  synthesize_vovovov_expression2
struct  synthesize_vovovoc_expression2
struct  synthesize_vovocov_expression2
struct  synthesize_vocovov_expression2
struct  synthesize_covovov_expression2
struct  synthesize_covocov_expression2
struct  synthesize_vocovoc_expression2
struct  synthesize_covovoc_expression2
struct  synthesize_vococov_expression2
struct  synthesize_vovovov_expression3
struct  synthesize_vovovoc_expression3
struct  synthesize_vovocov_expression3
struct  synthesize_vocovov_expression3
struct  synthesize_covovov_expression3
struct  synthesize_covocov_expression3
struct  synthesize_vocovoc_expression3
struct  synthesize_covovoc_expression3
struct  synthesize_vococov_expression3
struct  synthesize_vovovov_expression4
struct  synthesize_vovovoc_expression4
struct  synthesize_vovocov_expression4
struct  synthesize_vocovov_expression4
struct  synthesize_covovov_expression4
struct  synthesize_covocov_expression4
struct  synthesize_vocovoc_expression4
struct  synthesize_covovoc_expression4
struct  synthesize_vococov_expression4

Public Types

typedef details::expression_node< Type > * expression_node_ptr
typedef expression_node_ptr(* synthesize_functor_t) (expression_generator< T > &, const details::operator_type &operation, expression_node_ptr(&branch)[2])
typedef std::map< std::string, synthesize_functor_t > synthesize_map_t
typedef exprtk::parser< Type > parser_t
typedef const Type & vtype
typedef const Type ctype

Public Member Functions

void init_synthesize_map ()
void set_parser (parser_t &p)
void set_uom (unary_op_map_t &unary_op_map)
void set_bom (binary_op_map_t &binary_op_map)
void set_ibom (inv_binary_op_map_t &inv_binary_op_map)
void set_sf3m (sf3_map_t &sf3_map)
void set_sf4m (sf4_map_t &sf4_map)
void set_allocator (details::node_allocator &na)
void set_strength_reduction_state (const bool enabled)
bool strength_reduction_enabled () const
bool valid_operator (const details::operator_type &operation, binary_functor_t &bop)
bool valid_operator (const details::operator_type &operation, unary_functor_t &uop)
details::operator_type get_operator (const binary_functor_t &bop) const
expression_node_ptr operator() (const Type &v) const
expression_node_ptr operator() (const std::string &s) const
expression_node_ptr operator() (std::string &s, range_t &rp) const
expression_node_ptr operator() (const std::string &s, range_t &rp) const
expression_node_ptr operator() (expression_node_ptr branch, range_t &rp) const
bool unary_optimisable (const details::operator_type &operation) const
bool sf3_optimisable (const std::string &sf3id, trinary_functor_t &tfunc) const
bool sf4_optimisable (const std::string &sf4id, quaternary_functor_t &qfunc) const
bool sf3_optimisable (const std::string &sf3id, details::operator_type &operation) const
bool sf4_optimisable (const std::string &sf4id, details::operator_type &operation) const
expression_node_ptr operator() (const details::operator_type &operation, expression_node_ptr(&branch)[1])
bool is_assignment_operation (const details::operator_type &operation) const
bool valid_string_operation (const details::operator_type &operation) const
std::string to_str (const details::operator_type &operation) const
bool operation_optimisable (const details::operator_type &operation) const
std::string branch_to_id (expression_node_ptr branch) const
std::string branch_to_id (expression_node_ptr(&branch)[2]) const
bool cov_optimisable (const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
bool voc_optimisable (const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
bool vov_optimisable (const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
bool cob_optimisable (const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
bool boc_optimisable (const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
bool cocob_optimisable (const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
bool coboc_optimisable (const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
bool uvouv_optimisable (const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
bool vob_optimisable (const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
bool bov_optimisable (const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
bool binext_optimisable (const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
bool is_invalid_assignment_op (const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
bool is_constpow_operation (const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
bool is_invalid_break_continue_op (expression_node_ptr(&branch)[2]) const
bool is_invalid_string_op (const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
bool is_invalid_string_op (const details::operator_type &operation, expression_node_ptr(&branch)[3]) const
bool is_string_operation (const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
bool is_string_operation (const details::operator_type &operation, expression_node_ptr(&branch)[3]) const
bool is_shortcircuit_expression (const details::operator_type &operation) const
bool is_null_present (expression_node_ptr(&branch)[2]) const
bool is_vector_eqineq_logic_operation (const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
bool is_vector_arithmetic_operation (const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
expression_node_ptr operator() (const details::operator_type &operation, expression_node_ptr(&branch)[2])
expression_node_ptr operator() (const details::operator_type &operation, expression_node_ptr(&branch)[3])
expression_node_ptr operator() (const details::operator_type &operation, expression_node_ptr(&branch)[4])
expression_node_ptr operator() (const details::operator_type &operation, expression_node_ptr b0)
expression_node_ptr operator() (const details::operator_type &operation, expression_node_ptr &b0, expression_node_ptr &b1)
expression_node_ptr conditional (expression_node_ptr condition, expression_node_ptr consequent, expression_node_ptr alternative) const
expression_node_ptr conditional_string (expression_node_ptr condition, expression_node_ptr consequent, expression_node_ptr alternative) const
expression_node_ptr conditional_vector (expression_node_ptr condition, expression_node_ptr consequent, expression_node_ptr alternative) const
loop_runtime_check_ptr get_loop_runtime_check (const loop_runtime_check::loop_types loop_type) const
vector_access_runtime_check_ptr get_vector_access_runtime_check () const
expression_node_ptr while_loop (expression_node_ptr &condition, expression_node_ptr &branch, const bool break_continue_present=false) const
expression_node_ptr repeat_until_loop (expression_node_ptr &condition, expression_node_ptr &branch, const bool break_continue_present=false) const
expression_node_ptr for_loop (expression_node_ptr &initialiser, expression_node_ptr &condition, expression_node_ptr &incrementor, expression_node_ptr &loop_body, bool break_continue_present=false) const
template<typename Allocator, template< typename, typename > class Sequence>
expression_node_ptr const_optimise_switch (Sequence< expression_node_ptr, Allocator > &arg_list)
template<typename Allocator, template< typename, typename > class Sequence>
expression_node_ptr const_optimise_mswitch (Sequence< expression_node_ptr, Allocator > &arg_list)
template<typename Allocator, template< typename, typename > class Sequence>
expression_node_ptr switch_statement (Sequence< expression_node_ptr, Allocator > &arg_list, const bool default_statement_present)
template<typename Allocator, template< typename, typename > class Sequence>
expression_node_ptr multi_switch_statement (Sequence< expression_node_ptr, Allocator > &arg_list)
expression_node_ptr assert_call (expression_node_ptr &assert_condition, expression_node_ptr &assert_message, const assert_check::assert_context &context)
expression_node_ptr synthesize_uv_expression (const details::operator_type &operation, expression_node_ptr(&branch)[1])
expression_node_ptr synthesize_uvec_expression (const details::operator_type &operation, expression_node_ptr(&branch)[1])
expression_node_ptr synthesize_unary_expression (const details::operator_type &operation, expression_node_ptr(&branch)[1])
expression_node_ptr const_optimise_sf3 (const details::operator_type &operation, expression_node_ptr(&branch)[3])
expression_node_ptr varnode_optimise_sf3 (const details::operator_type &operation, expression_node_ptr(&branch)[3])
expression_node_ptr special_function (const details::operator_type &operation, expression_node_ptr(&branch)[3])
expression_node_ptr const_optimise_sf4 (const details::operator_type &operation, expression_node_ptr(&branch)[4])
expression_node_ptr varnode_optimise_sf4 (const details::operator_type &operation, expression_node_ptr(&branch)[4])
expression_node_ptr special_function (const details::operator_type &operation, expression_node_ptr(&branch)[4])
template<typename Allocator, template< typename, typename > class Sequence>
expression_node_ptr const_optimise_varargfunc (const details::operator_type &operation, Sequence< expression_node_ptr, Allocator > &arg_list)
bool special_one_parameter_vararg (const details::operator_type &operation) const
template<typename Allocator, template< typename, typename > class Sequence>
expression_node_ptr varnode_optimise_varargfunc (const details::operator_type &operation, Sequence< expression_node_ptr, Allocator > &arg_list)
template<typename Allocator, template< typename, typename > class Sequence>
expression_node_ptr vectorize_func (const details::operator_type &operation, Sequence< expression_node_ptr, Allocator > &arg_list)
template<typename Allocator, template< typename, typename > class Sequence>
expression_node_ptr vararg_function (const details::operator_type &operation, Sequence< expression_node_ptr, Allocator > &arg_list)
template<std::size_t N>
expression_node_ptr function (ifunction_t *f, expression_node_ptr(&b)[N])
expression_node_ptr function (ifunction_t *f)
expression_node_ptr vararg_function_call (ivararg_function_t *vaf, std::vector< expression_node_ptr > &arg_list)
expression_node_ptr generic_function_call (igeneric_function_t *gf, std::vector< expression_node_ptr > &arg_list, const std::size_t &param_seq_index=std::numeric_limits< std::size_t >::max())
expression_node_ptr string_function_call (igeneric_function_t *gf, std::vector< expression_node_ptr > &arg_list, const std::size_t &param_seq_index=std::numeric_limits< std::size_t >::max())
expression_node_ptr return_call (std::vector< expression_node_ptr > &arg_list)
expression_node_ptr return_envelope (expression_node_ptr body, results_context_t *rc, bool *&return_invoked)
expression_node_ptr vector_element (const std::string &symbol, vector_holder_ptr vector_base, expression_node_ptr vec_node, expression_node_ptr index)

Private Member Functions

template<std::size_t N, typename NodePtr>
bool is_constant_foldable (NodePtr(&b)[N]) const
template<typename NodePtr, typename Allocator, template< typename, typename > class Sequence>
bool is_constant_foldable (const Sequence< NodePtr, Allocator > &b) const
void lodge_assignment (symbol_type cst, expression_node_ptr node)
const void * base_ptr (expression_node_ptr node)
bool assign_immutable_symbol (expression_node_ptr node)
expression_node_ptr synthesize_assignment_expression (const details::operator_type &operation, expression_node_ptr(&branch)[2])
expression_node_ptr synthesize_assignment_operation_expression (const details::operator_type &operation, expression_node_ptr(&branch)[2])
expression_node_ptr synthesize_veceqineqlogic_operation_expression (const details::operator_type &operation, expression_node_ptr(&branch)[2])
expression_node_ptr synthesize_vecarithmetic_operation_expression (const details::operator_type &operation, expression_node_ptr(&branch)[2])
expression_node_ptr synthesize_swap_expression (expression_node_ptr(&branch)[2])
expression_node_ptr synthesize_shortcircuit_expression (const details::operator_type &operation, expression_node_ptr(&branch)[2])
template<typename TType, template< typename, typename > class IPowNode>
expression_node_ptr cardinal_pow_optimisation_impl (const TType &v, const unsigned int &p)
expression_node_ptr cardinal_pow_optimisation (const T &v, const T &c)
bool cardinal_pow_optimisable (const details::operator_type &operation, const T &c) const
expression_node_ptr cardinal_pow_optimisation (expression_node_ptr(&branch)[2])
bool synthesize_expression (const details::operator_type &operation, expression_node_ptr(&branch)[2], expression_node_ptr &result)
expression_node_ptr synthesize_uvouv_expression (const details::operator_type &operation, expression_node_ptr(&branch)[2])
template<typename T0, typename T1>
expression_node_ptr synthesize_str_xrox_expression_impl (const details::operator_type &opr, T0 s0, T1 s1, range_t rp0)
template<typename T0, typename T1>
expression_node_ptr synthesize_str_xoxr_expression_impl (const details::operator_type &opr, T0 s0, T1 s1, range_t rp1)
template<typename T0, typename T1>
expression_node_ptr synthesize_str_xroxr_expression_impl (const details::operator_type &opr, T0 s0, T1 s1, range_t rp0, range_t rp1)
template<typename T0, typename T1>
expression_node_ptr synthesize_sos_expression_impl (const details::operator_type &opr, T0 s0, T1 s1)
expression_node_ptr synthesize_sos_expression (const details::operator_type &opr, expression_node_ptr(&branch)[2])
expression_node_ptr synthesize_sros_expression (const details::operator_type &opr, expression_node_ptr(&branch)[2])
expression_node_ptr synthesize_sosr_expression (const details::operator_type &opr, expression_node_ptr(&branch)[2])
expression_node_ptr synthesize_socsr_expression (const details::operator_type &opr, expression_node_ptr(&branch)[2])
expression_node_ptr synthesize_srosr_expression (const details::operator_type &opr, expression_node_ptr(&branch)[2])
expression_node_ptr synthesize_socs_expression (const details::operator_type &opr, expression_node_ptr(&branch)[2])
expression_node_ptr synthesize_csos_expression (const details::operator_type &opr, expression_node_ptr(&branch)[2])
expression_node_ptr synthesize_csosr_expression (const details::operator_type &opr, expression_node_ptr(&branch)[2])
expression_node_ptr synthesize_srocs_expression (const details::operator_type &opr, expression_node_ptr(&branch)[2])
expression_node_ptr synthesize_srocsr_expression (const details::operator_type &opr, expression_node_ptr(&branch)[2])
expression_node_ptr synthesize_csocs_expression (const details::operator_type &opr, expression_node_ptr(&branch)[2])
expression_node_ptr synthesize_csocsr_expression (const details::operator_type &opr, expression_node_ptr(&branch)[2])
expression_node_ptr synthesize_csros_expression (const details::operator_type &opr, expression_node_ptr(&branch)[2])
expression_node_ptr synthesize_csrosr_expression (const details::operator_type &opr, expression_node_ptr(&branch)[2])
expression_node_ptr synthesize_csrocs_expression (const details::operator_type &opr, expression_node_ptr(&branch)[2])
expression_node_ptr synthesize_csrocsr_expression (const details::operator_type &opr, expression_node_ptr(&branch)[2])
expression_node_ptr synthesize_strogen_expression (const details::operator_type &opr, expression_node_ptr(&branch)[2])
expression_node_ptr synthesize_string_expression (const details::operator_type &opr, expression_node_ptr(&branch)[2])
expression_node_ptr synthesize_string_expression (const details::operator_type &opr, expression_node_ptr(&branch)[3])
expression_node_ptr synthesize_null_expression (const details::operator_type &operation, expression_node_ptr(&branch)[2])
template<typename NodeType, std::size_t N>
expression_node_ptr synthesize_expression (const details::operator_type &operation, expression_node_ptr(&branch)[N])
template<typename NodeType, std::size_t N>
expression_node_ptr synthesize_expression (F *f, expression_node_ptr(&branch)[N])

Private Attributes

bool strength_reduction_enabled_
details::node_allocator * node_allocator_
synthesize_map_t synthesize_map_
unary_op_map_t * unary_op_map_
binary_op_map_t * binary_op_map_
inv_binary_op_map_t * inv_binary_op_map_
sf3_map_t * sf3_map_
sf4_map_t * sf4_map_
parser_t * parser_

Detailed Description

template<typename T>
template<typename Type>
class exprtk::parser< T >::expression_generator< Type >

Definition at line 31871 of file exprtk.hpp.

Member Typedef Documentation

◆ ctype

template<typename T>
template<typename Type>
typedef const Type exprtk::parser< T >::expression_generator< Type >::ctype

Definition at line 31880 of file exprtk.hpp.

◆ expression_node_ptr

template<typename T>
template<typename Type>
typedef details::expression_node<Type>* exprtk::parser< T >::expression_generator< Type >::expression_node_ptr

Definition at line 31875 of file exprtk.hpp.

◆ parser_t

template<typename T>
template<typename Type>
typedef exprtk::parser<Type> exprtk::parser< T >::expression_generator< Type >::parser_t

Definition at line 31878 of file exprtk.hpp.

◆ synthesize_functor_t

template<typename T>
template<typename Type>
typedef expression_node_ptr(* exprtk::parser< T >::expression_generator< Type >::synthesize_functor_t) (expression_generator< T > &, const details::operator_type &operation, expression_node_ptr(&branch)[2])

Definition at line 31876 of file exprtk.hpp.

◆ synthesize_map_t

template<typename T>
template<typename Type>
typedef std::map<std::string,synthesize_functor_t> exprtk::parser< T >::expression_generator< Type >::synthesize_map_t

Definition at line 31877 of file exprtk.hpp.

◆ vtype

template<typename T>
template<typename Type>
typedef const Type& exprtk::parser< T >::expression_generator< Type >::vtype

Definition at line 31879 of file exprtk.hpp.

Member Function Documentation

◆ assert_call()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::assert_call ( expression_node_ptr & assert_condition,
expression_node_ptr & assert_message,
const assert_check::assert_context & context )
inline

Definition at line 33484 of file exprtk.hpp.

33487 {
33489
33491 (assert_condition, assert_message, parser_->assert_check_, context);
33492
33493 if (result && result->valid())
33494 {
33495 parser_->state_.activate_side_effect("assert_call()");
33496 return result;
33497 }
33498
33502
33503 return error_node();
33504 }
details::expression_node< Type > * expression_node_ptr
Definition exprtk.hpp:31875
details::node_allocator * node_allocator_
Definition exprtk.hpp:41924
static expression_node_ptr error_node()
Definition exprtk.hpp:25846
void free_node(NodeAllocator &, expression_node< T > *&node)
Definition exprtk.hpp:6173

References exprtk::parser< T >::error_node(), exprtk::details::free_node(), node_allocator_, parser_, and exprtk::details::expression_node< T >::valid().

Here is the call graph for this function:

◆ assign_immutable_symbol()

template<typename T>
template<typename Type>
bool exprtk::parser< T >::expression_generator< Type >::assign_immutable_symbol ( expression_node_ptr node)
inlineprivate

Definition at line 34595 of file exprtk.hpp.

34596 {
34598 const void* baseptr_addr = base_ptr(node);
34599
34600 exprtk_debug(("assign_immutable_symbol - base ptr addr: %p\n", baseptr_addr));
34601
34602 if (parser_->immutable_memory_map_.in_interval(baseptr_addr,interval))
34603 {
34604 typename immutable_symtok_map_t::iterator itr = parser_->immutable_symtok_map_.find(interval);
34605
34606 if (parser_->immutable_symtok_map_.end() != itr)
34607 {
34608 token_t& token = itr->second;
34611 token,
34612 "ERR275 - Symbol '" + token.value + "' cannot be assigned-to as it is immutable.",
34614 }
34615 else
34616 parser_->set_synthesis_error("Unable to assign symbol is immutable.");
34617
34618 return true;
34619 }
34620
34621 return false;
34622 }
const void * base_ptr(expression_node_ptr node)
Definition exprtk.hpp:34545
#define exprtk_debug(params)
Definition exprtk.hpp:64

References base_ptr(), exprtk::parser_error::e_parser, exprtk_debug, exprtk_error_location, exprtk::parser_error::make_error(), parser_, and exprtk::lexer::token::value.

Referenced by synthesize_assignment_expression(), and synthesize_assignment_operation_expression().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ base_ptr()

template<typename T>
template<typename Type>
const void * exprtk::parser< T >::expression_generator< Type >::base_ptr ( expression_node_ptr node)
inlineprivate

Definition at line 34545 of file exprtk.hpp.

34546 {
34547 if (node)
34548 {
34549 switch (node->type())
34550 {
34552 return reinterpret_cast<const void*>(&static_cast<variable_node_t*>(node)->ref());
34553
34555 return reinterpret_cast<const void*>(static_cast<vector_elem_node_t*>(node)->vec_holder().data());
34556
34558 return reinterpret_cast<const void*>(static_cast<vector_celem_node_t*>(node)->vec_holder().data());
34559
34561 return reinterpret_cast<const void*>(static_cast<vector_elem_rtc_node_t*>(node)->vec_holder().data());
34562
34564 return reinterpret_cast<const void*>(static_cast<vector_celem_rtc_node_t*>(node)->vec_holder().data());
34565
34567 return reinterpret_cast<const void*>(static_cast<rebasevector_elem_node_t*>(node)->vec_holder().data());
34568
34570 return reinterpret_cast<const void*>(static_cast<rebasevector_elem_rtc_node_t*>(node)->vec_holder().data());
34571
34573 return reinterpret_cast<const void*>(static_cast<rebasevector_celem_node_t*>(node)->vec_holder().data());
34574
34576 return reinterpret_cast<const void*>(static_cast<rebasevector_celem_rtc_node_t*>(node)->vec_holder().data());
34577
34579 return reinterpret_cast<const void*>(static_cast<vector_node_t*>(node)->vec_holder().data());
34580
34581 #ifndef exprtk_disable_string_capabilities
34583 return reinterpret_cast<const void*>((static_cast<stringvar_node_t*>(node)->base()));
34584
34586 return reinterpret_cast<const void*>((static_cast<string_range_node_t*>(node)->base()));
34587 #endif
34588 default : return reinterpret_cast<const void*>(0);
34589 }
34590 }
34591
34592 return reinterpret_cast<const void*>(0);
34593 }

References exprtk::details::expression_node< T >::e_rbveccelem, exprtk::details::expression_node< T >::e_rbveccelemrtc, exprtk::details::expression_node< T >::e_rbvecelem, exprtk::details::expression_node< T >::e_rbvecelemrtc, exprtk::details::expression_node< T >::e_stringvar, exprtk::details::expression_node< T >::e_stringvarrng, exprtk::details::expression_node< T >::e_variable, exprtk::details::expression_node< T >::e_veccelem, exprtk::details::expression_node< T >::e_veccelemrtc, exprtk::details::expression_node< T >::e_vecelem, exprtk::details::expression_node< T >::e_vecelemrtc, exprtk::details::expression_node< T >::e_vector, and exprtk::details::expression_node< T >::type().

Referenced by assign_immutable_symbol().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ binext_optimisable()

template<typename T>
template<typename Type>
bool exprtk::parser< T >::expression_generator< Type >::binext_optimisable ( const details::operator_type & operation,
expression_node_ptr(&) branch[2] ) const
inline

Definition at line 32417 of file exprtk.hpp.

32418 {
32420 return false;
32421 else
32422 return !details::is_constant_node(branch[0]) ||
32424 }
bool operation_optimisable(const details::operator_type &operation) const
Definition exprtk.hpp:32245
bool is_constant_node(const expression_node< T > *node)
Definition exprtk.hpp:5947

References exprtk::details::is_constant_node(), and operation_optimisable().

Referenced by operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ boc_optimisable()

template<typename T>
template<typename Type>
bool exprtk::parser< T >::expression_generator< Type >::boc_optimisable ( const details::operator_type & operation,
expression_node_ptr(&) branch[2] ) const
inline

Definition at line 32349 of file exprtk.hpp.

32350 {
32352 return false;
32353 else
32354 return !details::is_constant_node(branch[0]) &&
32356 }

References exprtk::details::is_constant_node(), and operation_optimisable().

Referenced by operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bov_optimisable()

template<typename T>
template<typename Type>
bool exprtk::parser< T >::expression_generator< Type >::bov_optimisable ( const details::operator_type & operation,
expression_node_ptr(&) branch[2] ) const
inline

Definition at line 32408 of file exprtk.hpp.

32409 {
32411 return false;
32412 else
32413 return !details::is_variable_node(branch[0]) &&
32415 }
bool is_variable_node(const expression_node< T > *node)
Definition exprtk.hpp:5827

References exprtk::details::is_variable_node(), and operation_optimisable().

Referenced by operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ branch_to_id() [1/2]

template<typename T>
template<typename Type>
std::string exprtk::parser< T >::expression_generator< Type >::branch_to_id ( expression_node_ptr branch) const
inline

Definition at line 32267 of file exprtk.hpp.

32268 {
32269 static const std::string null_str ("(null)" );
32270 static const std::string const_str ("(c)" );
32271 static const std::string var_str ("(v)" );
32272 static const std::string vov_str ("(vov)" );
32273 static const std::string cov_str ("(cov)" );
32274 static const std::string voc_str ("(voc)" );
32275 static const std::string str_str ("(s)" );
32276 static const std::string strrng_str ("(rngs)" );
32277 static const std::string cs_str ("(cs)" );
32278 static const std::string cstrrng_str("(crngs)");
32279
32281 return null_str;
32283 return const_str;
32285 return var_str;
32286 else if (details::is_vov_node(branch))
32287 return vov_str;
32288 else if (details::is_cov_node(branch))
32289 return cov_str;
32290 else if (details::is_voc_node(branch))
32291 return voc_str;
32293 return str_str;
32295 return cs_str;
32297 return strrng_str;
32299 return cstrrng_str;
32301 return "(" + dynamic_cast<details::T0oT1oT2_base_node<T>*>(branch)->type_id() + ")";
32303 return "(" + dynamic_cast<details::T0oT1oT2oT3_base_node<T>*>(branch)->type_id() + ")";
32304 else
32305 return "ERROR";
32306 }

References exprtk::details::is_const_string_node(), exprtk::details::is_const_string_range_node(), exprtk::details::is_constant_node(), exprtk::details::is_cov_node(), exprtk::details::is_null_node(), exprtk::details::is_string_node(), exprtk::details::is_string_range_node(), exprtk::details::is_t0ot1ot2_node(), exprtk::details::is_t0ot1ot2ot3_node(), exprtk::details::is_variable_node(), exprtk::details::is_voc_node(), and exprtk::details::is_vov_node().

Referenced by branch_to_id(), and synthesize_expression().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ branch_to_id() [2/2]

template<typename T>
template<typename Type>
std::string exprtk::parser< T >::expression_generator< Type >::branch_to_id ( expression_node_ptr(&) branch[2]) const
inline

Definition at line 32308 of file exprtk.hpp.

32309 {
32310 return branch_to_id(branch[0]) + std::string("o") + branch_to_id(branch[1]);
32311 }
std::string branch_to_id(expression_node_ptr branch) const
Definition exprtk.hpp:32267

References branch_to_id().

Here is the call graph for this function:

◆ cardinal_pow_optimisable()

template<typename T>
template<typename Type>
bool exprtk::parser< T >::expression_generator< Type >::cardinal_pow_optimisable ( const details::operator_type & operation,
const T & c ) const
inlineprivate

Definition at line 35365 of file exprtk.hpp.

35366 {
35368 }

References exprtk::details::numeric::abs(), exprtk::details::e_pow, and exprtk::details::numeric::is_integer().

Referenced by is_constpow_operation(), and exprtk::parser< T >::expression_generator< Type >::synthesize_voc_expression::process().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cardinal_pow_optimisation() [1/2]

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::cardinal_pow_optimisation ( const T & v,
const T & c )
inlineprivate

Definition at line 35344 of file exprtk.hpp.

35345 {
35346 const bool not_recipricol = (c >= T(0));
35347 const unsigned int p = static_cast<unsigned int>(details::numeric::to_int32(details::numeric::abs(c)));
35348
35349 if (0 == p)
35350 return node_allocator_->allocate_c<literal_node_t>(T(1));
35351 else if (std::equal_to<T>()(T(2),c))
35352 {
35353 return node_allocator_->
35355 }
35356 else
35357 {
35358 if (not_recipricol)
35360 else
35362 }
35363 }
expression_node_ptr cardinal_pow_optimisation_impl(const TType &v, const unsigned int &p)
Definition exprtk.hpp:35316
int to_int32(const T v)
Definition exprtk.hpp:1505

References exprtk::details::numeric::abs(), cardinal_pow_optimisation_impl(), node_allocator_, and exprtk::details::numeric::to_int32().

Referenced by operator()(), and exprtk::parser< T >::expression_generator< Type >::synthesize_voc_expression::process().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cardinal_pow_optimisation() [2/2]

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::cardinal_pow_optimisation ( expression_node_ptr(&) branch[2])
inlineprivate

Definition at line 35370 of file exprtk.hpp.

35371 {
35372 const Type c = static_cast<details::literal_node<Type>*>(branch[1])->value();
35373 const bool not_recipricol = (c >= T(0));
35374 const unsigned int p = static_cast<unsigned int>(details::numeric::to_int32(details::numeric::abs(c)));
35375
35376 node_allocator_->free(branch[1]);
35377
35378 if (0 == p)
35379 {
35381
35382 return node_allocator_->allocate_c<literal_node_t>(T(1));
35383 }
35384 else if (not_recipricol)
35386 else
35388 }
void free_all_nodes(NodeAllocator &node_allocator, expression_node< T > *(&b)[N])
Definition exprtk.hpp:6150

References exprtk::details::numeric::abs(), cardinal_pow_optimisation_impl(), exprtk::details::free_all_nodes(), node_allocator_, and exprtk::details::numeric::to_int32().

Here is the call graph for this function:

◆ cardinal_pow_optimisation_impl()

template<typename T>
template<typename Type>
template<typename TType, template< typename, typename > class IPowNode>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::cardinal_pow_optimisation_impl ( const TType & v,
const unsigned int & p )
inlineprivate

Definition at line 35316 of file exprtk.hpp.

35317 {
35318 switch (p)
35319 {
35320 #define case_stmt(cp) \
35321 case cp : return node_allocator_-> \
35322 allocate<IPowNode<T,details::numeric::fast_exp<T,cp> > >(v); \
35323
35324 case_stmt( 1) case_stmt( 2) case_stmt( 3) case_stmt( 4)
35325 case_stmt( 5) case_stmt( 6) case_stmt( 7) case_stmt( 8)
35326 case_stmt( 9) case_stmt(10) case_stmt(11) case_stmt(12)
35327 case_stmt(13) case_stmt(14) case_stmt(15) case_stmt(16)
35328 case_stmt(17) case_stmt(18) case_stmt(19) case_stmt(20)
35329 case_stmt(21) case_stmt(22) case_stmt(23) case_stmt(24)
35330 case_stmt(25) case_stmt(26) case_stmt(27) case_stmt(28)
35331 case_stmt(29) case_stmt(30) case_stmt(31) case_stmt(32)
35332 case_stmt(33) case_stmt(34) case_stmt(35) case_stmt(36)
35333 case_stmt(37) case_stmt(38) case_stmt(39) case_stmt(40)
35334 case_stmt(41) case_stmt(42) case_stmt(43) case_stmt(44)
35335 case_stmt(45) case_stmt(46) case_stmt(47) case_stmt(48)
35336 case_stmt(49) case_stmt(50) case_stmt(51) case_stmt(52)
35337 case_stmt(53) case_stmt(54) case_stmt(55) case_stmt(56)
35338 case_stmt(57) case_stmt(58) case_stmt(59) case_stmt(60)
35339 #undef case_stmt
35340 default : return error_node();
35341 }
35342 }
#define case_stmt(N)
Definition exprtk.hpp:33330

References case_stmt, and exprtk::parser< T >::error_node().

Referenced by cardinal_pow_optimisation(), and cardinal_pow_optimisation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cob_optimisable()

template<typename T>
template<typename Type>
bool exprtk::parser< T >::expression_generator< Type >::cob_optimisable ( const details::operator_type & operation,
expression_node_ptr(&) branch[2] ) const
inline

Definition at line 32340 of file exprtk.hpp.

32341 {
32343 return false;
32344 else
32345 return details::is_constant_node(branch[0]) &&
32347 }

References exprtk::details::is_constant_node(), and operation_optimisable().

Referenced by operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ coboc_optimisable()

template<typename T>
template<typename Type>
bool exprtk::parser< T >::expression_generator< Type >::coboc_optimisable ( const details::operator_type & operation,
expression_node_ptr(&) branch[2] ) const
inline

Definition at line 32374 of file exprtk.hpp.

32375 {
32376 if (
32381 )
32382 {
32385 }
32386 else
32387 return false;
32388 }
bool is_boc_node(const expression_node< T > *node)
Definition exprtk.hpp:19174

References exprtk::details::e_add, exprtk::details::e_div, exprtk::details::e_mul, exprtk::details::e_sub, exprtk::details::is_boc_node(), and exprtk::details::is_constant_node().

Referenced by operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cocob_optimisable()

template<typename T>
template<typename Type>
bool exprtk::parser< T >::expression_generator< Type >::cocob_optimisable ( const details::operator_type & operation,
expression_node_ptr(&) branch[2] ) const
inline

Definition at line 32358 of file exprtk.hpp.

32359 {
32360 if (
32365 )
32366 {
32369 }
32370 else
32371 return false;
32372 }
bool is_cob_node(const expression_node< T > *node)
Definition exprtk.hpp:19168

References exprtk::details::e_add, exprtk::details::e_div, exprtk::details::e_mul, exprtk::details::e_sub, exprtk::details::is_cob_node(), and exprtk::details::is_constant_node().

Referenced by operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ conditional()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::conditional ( expression_node_ptr condition,
expression_node_ptr consequent,
expression_node_ptr alternative ) const
inline

Definition at line 32818 of file exprtk.hpp.

32821 {
32822 if ((0 == condition) || (0 == consequent))
32823 {
32827
32829 ((0 == condition ) ? std::string("condition ") : "") +
32830 ((0 == consequent) ? std::string("consequent") : "") ;
32831
32834 parser_->current_state().token,
32835 "ERR257 - Invalid " + invalid_branches + " for conditional statement",
32837
32838 return error_node();
32839 }
32840 // Can the condition be immediately evaluated? if so optimise.
32842 {
32843 // True branch
32845 {
32848
32849 return consequent;
32850 }
32851 // False branch
32852 else
32853 {
32856
32857 if (alternative)
32858 return alternative;
32859 else
32860 return node_allocator_->allocate<details::null_node<T> >();
32861 }
32862 }
32863
32865 std::string node_name = "Unknown!";
32866
32867 if ((0 != consequent) && (0 != alternative))
32868 {
32870 node_name = "conditional_node_t";
32871 }
32872 else
32873 {
32875 node_name = "cons_conditional_node_t";
32876 }
32877
32878 if (result && result->valid())
32879 {
32880 return result;
32881 }
32882
32885 token_t(),
32886 "ERR258 - Failed to synthesize node: " + node_name,
32888
32890 return error_node();
32891 }
lexer::token token_t
Definition exprtk.hpp:22601

References exprtk::parser_error::e_parser, exprtk::parser< T >::error_node(), exprtk_error_location, exprtk::details::free_node(), exprtk::details::is_constant_node(), exprtk::details::is_true(), exprtk::parser_error::make_error(), node_allocator_, parser_, and exprtk::details::expression_node< T >::valid().

Here is the call graph for this function:

◆ conditional_string()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::conditional_string ( expression_node_ptr condition,
expression_node_ptr consequent,
expression_node_ptr alternative ) const
inline

Definition at line 32894 of file exprtk.hpp.

32897 {
32898 if ((0 == condition) || (0 == consequent))
32899 {
32903
32905 ((0 == condition ) ? std::string("condition ") : "") +
32906 ((0 == consequent) ? std::string("consequent") : "") ;
32907
32910 parser_->current_state().token,
32911 "ERR259 - Invalid " + invalid_branches + " for string conditional statement",
32913
32914 return error_node();
32915 }
32916 // Can the condition be immediately evaluated? if so optimise.
32918 {
32919 // True branch
32921 {
32924
32925 return consequent;
32926 }
32927 // False branch
32928 else
32929 {
32932
32933 if (alternative)
32934 return alternative;
32935 else
32936 return node_allocator_->
32938 }
32939 }
32940 else if ((0 != consequent) && (0 != alternative))
32941 {
32944
32945 if (result && result->valid())
32946 {
32947 return result;
32948 }
32949
32952 token_t(),
32953 "ERR260 - Failed to synthesize node: conditional_string_node_t",
32955
32957 }
32958
32959 return error_node();
32960 }

References exprtk::parser_error::e_parser, exprtk::parser< T >::error_node(), exprtk_error_location, exprtk::details::free_node(), exprtk::details::is_constant_node(), exprtk::details::is_true(), exprtk::parser_error::make_error(), node_allocator_, parser_, and exprtk::details::expression_node< T >::valid().

Here is the call graph for this function:

◆ conditional_vector()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::conditional_vector ( expression_node_ptr condition,
expression_node_ptr consequent,
expression_node_ptr alternative ) const
inline

Definition at line 32970 of file exprtk.hpp.

32973 {
32974 if ((0 == condition) || (0 == consequent))
32975 {
32979
32981 ((0 == condition ) ? std::string("condition ") : "") +
32982 ((0 == consequent) ? std::string("consequent") : "") ;
32983
32986 parser_->current_state().token,
32987 "ERR261 - Invalid " + invalid_branches + " for vector conditional statement",
32989
32990 return error_node();
32991 }
32992 // Can the condition be immediately evaluated? if so optimise.
32994 {
32995 // True branch
32997 {
33000
33001 return consequent;
33002 }
33003 // False branch
33004 else
33005 {
33008
33009 if (alternative)
33010 return alternative;
33011 else
33012 return node_allocator_->allocate<details::null_node<T> >();
33013
33014 }
33015 }
33016 else if ((0 != consequent) && (0 != alternative))
33017 {
33018 return node_allocator_->
33020 }
33021 else
33022 return error_node();
33023 }

References exprtk::parser_error::e_parser, exprtk::parser< T >::error_node(), exprtk_error_location, exprtk::details::free_node(), exprtk::details::is_constant_node(), exprtk::details::is_true(), exprtk::parser_error::make_error(), node_allocator_, and parser_.

Here is the call graph for this function:

◆ const_optimise_mswitch()

template<typename T>
template<typename Type>
template<typename Allocator, template< typename, typename > class Sequence>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::const_optimise_mswitch ( Sequence< expression_node_ptr, Allocator > & arg_list)
inline

Definition at line 33292 of file exprtk.hpp.

33293 {
33295
33296 for (std::size_t i = 0; i < (arg_list.size() / 2); ++i)
33297 {
33300
33302 {
33304 }
33305 }
33306
33307 if (0 == result)
33308 {
33309 const T zero = T(0);
33311 }
33312
33313 for (std::size_t i = 0; i < arg_list.size(); ++i)
33314 {
33316
33317 if (current_expr && (current_expr != result))
33318 {
33320 }
33321 }
33322
33323 return result;
33324 }

References exprtk::parser< T >::error_node(), exprtk::details::free_node(), exprtk::details::is_true(), and node_allocator_.

Referenced by multi_switch_statement().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ const_optimise_sf3()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::const_optimise_sf3 ( const details::operator_type & operation,
expression_node_ptr(&) branch[3] )
inline

Definition at line 33596 of file exprtk.hpp.

33598 {
33600
33601 switch (operation)
33602 {
33603 #define case_stmt(op) \
33604 case details::e_sf##op : temp_node = node_allocator_-> \
33605 allocate<details::sf3_node<Type,details::sf##op##_op<Type> > > \
33606 (operation, branch); \
33607 break; \
33608
33609 case_stmt(00) case_stmt(01) case_stmt(02) case_stmt(03)
33610 case_stmt(04) case_stmt(05) case_stmt(06) case_stmt(07)
33611 case_stmt(08) case_stmt(09) case_stmt(10) case_stmt(11)
33612 case_stmt(12) case_stmt(13) case_stmt(14) case_stmt(15)
33613 case_stmt(16) case_stmt(17) case_stmt(18) case_stmt(19)
33614 case_stmt(20) case_stmt(21) case_stmt(22) case_stmt(23)
33615 case_stmt(24) case_stmt(25) case_stmt(26) case_stmt(27)
33616 case_stmt(28) case_stmt(29) case_stmt(30) case_stmt(31)
33617 case_stmt(32) case_stmt(33) case_stmt(34) case_stmt(35)
33618 case_stmt(36) case_stmt(37) case_stmt(38) case_stmt(39)
33619 case_stmt(40) case_stmt(41) case_stmt(42) case_stmt(43)
33620 case_stmt(44) case_stmt(45) case_stmt(46) case_stmt(47)
33621 #undef case_stmt
33622 default : return error_node();
33623 }
33624
33626
33627 const T v = temp_node->value();
33628
33630
33631 return node_allocator_->allocate<literal_node_t>(v);
33632 }

References case_stmt, exprtk::parser< T >::error_node(), exprtk::details::free_node(), node_allocator_, and exprtk::details::expression_node< T >::value().

Referenced by special_function().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ const_optimise_sf4()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::const_optimise_sf4 ( const details::operator_type & operation,
expression_node_ptr(&) branch[4] )
inline

Definition at line 33701 of file exprtk.hpp.

33702 {
33704
33705 switch (operation)
33706 {
33707 #define case_stmt(op) \
33708 case details::e_sf##op : temp_node = node_allocator_-> \
33709 allocate<details::sf4_node<Type,details::sf##op##_op<Type> > > \
33710 (operation, branch); \
33711 break; \
33712
33713 case_stmt(48) case_stmt(49) case_stmt(50) case_stmt(51)
33714 case_stmt(52) case_stmt(53) case_stmt(54) case_stmt(55)
33715 case_stmt(56) case_stmt(57) case_stmt(58) case_stmt(59)
33716 case_stmt(60) case_stmt(61) case_stmt(62) case_stmt(63)
33717 case_stmt(64) case_stmt(65) case_stmt(66) case_stmt(67)
33718 case_stmt(68) case_stmt(69) case_stmt(70) case_stmt(71)
33719 case_stmt(72) case_stmt(73) case_stmt(74) case_stmt(75)
33720 case_stmt(76) case_stmt(77) case_stmt(78) case_stmt(79)
33721 case_stmt(80) case_stmt(81) case_stmt(82) case_stmt(83)
33722 case_stmt(84) case_stmt(85) case_stmt(86) case_stmt(87)
33723 case_stmt(88) case_stmt(89) case_stmt(90) case_stmt(91)
33724 case_stmt(92) case_stmt(93) case_stmt(94) case_stmt(95)
33725 case_stmt(96) case_stmt(97) case_stmt(98) case_stmt(99)
33726 #undef case_stmt
33727 default : return error_node();
33728 }
33729
33731
33732 const T v = temp_node->value();
33733
33735
33736 return node_allocator_->allocate<literal_node_t>(v);
33737 }

References case_stmt, exprtk::parser< T >::error_node(), exprtk::details::free_node(), node_allocator_, and exprtk::details::expression_node< T >::value().

Referenced by special_function().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ const_optimise_switch()

template<typename T>
template<typename Type>
template<typename Allocator, template< typename, typename > class Sequence>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::const_optimise_switch ( Sequence< expression_node_ptr, Allocator > & arg_list)
inline

Definition at line 33256 of file exprtk.hpp.

33257 {
33259
33260 for (std::size_t i = 0; i < (arg_list.size() / 2); ++i)
33261 {
33264
33265 if ((0 == result) && details::is_true(condition))
33266 {
33268 break;
33269 }
33270 }
33271
33272 if (0 == result)
33273 {
33274 result = arg_list.back();
33275 }
33276
33277 for (std::size_t i = 0; i < arg_list.size(); ++i)
33278 {
33280
33281 if (current_expr && (current_expr != result))
33282 {
33284 }
33285 }
33286
33287 return result;
33288 }

References exprtk::parser< T >::error_node(), exprtk::details::is_true(), and node_allocator_.

Referenced by switch_statement().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ const_optimise_varargfunc()

template<typename T>
template<typename Type>
template<typename Allocator, template< typename, typename > class Sequence>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::const_optimise_varargfunc ( const details::operator_type & operation,
Sequence< expression_node_ptr, Allocator > & arg_list )
inline

Definition at line 33808 of file exprtk.hpp.

33809 {
33811
33812 switch (operation)
33813 {
33814 #define case_stmt(op0, op1) \
33815 case op0 : temp_node = node_allocator_-> \
33816 allocate<details::vararg_node<Type,op1<Type> > > \
33817 (arg_list); \
33818 break; \
33819
33828 #undef case_stmt
33829 default : return error_node();
33830 }
33831
33832 const T v = temp_node->value();
33833
33835
33836 return node_allocator_->allocate<literal_node_t>(v);
33837 }

References case_stmt, exprtk::details::e_avg, exprtk::details::e_mand, exprtk::details::e_max, exprtk::details::e_min, exprtk::details::e_mor, exprtk::details::e_multi, exprtk::details::e_prod, exprtk::details::e_sum, exprtk::parser< T >::error_node(), exprtk::details::free_node(), node_allocator_, and exprtk::details::expression_node< T >::value().

Referenced by vararg_function().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cov_optimisable()

template<typename T>
template<typename Type>
bool exprtk::parser< T >::expression_generator< Type >::cov_optimisable ( const details::operator_type & operation,
expression_node_ptr(&) branch[2] ) const
inline

Definition at line 32313 of file exprtk.hpp.

32314 {
32316 return false;
32317 else
32318 return details::is_constant_node(branch[0]) &&
32320 }

References exprtk::details::is_constant_node(), exprtk::details::is_variable_node(), and operation_optimisable().

Referenced by operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ for_loop()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::for_loop ( expression_node_ptr & initialiser,
expression_node_ptr & condition,
expression_node_ptr & incrementor,
expression_node_ptr & loop_body,
bool break_continue_present = false ) const
inline

Definition at line 33161 of file exprtk.hpp.

33166 {
33167 if (
33169 !parser_->state_.return_stmt_present &&
33171 )
33172 {
33174
33176 {
33177 // Infinite loops are not allowed.
33178
33181 parser_->current_state().token,
33182 "ERR263 - Infinite loop condition without 'break' or 'return' not allowed in for-loop",
33184
33185 result = error_node();
33186 }
33187 else
33189
33194
33195 return result;
33196 }
33197 else if (details::is_null_node(condition) || (0 == condition))
33198 {
33202
33203 return loop_body;
33204 }
33205
33207
33209 {
33210 if (rtc)
33211 return node_allocator_->allocate<for_loop_rtc_node_t>
33212 (
33214 condition,
33216 loop_body,
33217 rtc
33218 );
33219 else
33220 return node_allocator_->allocate<for_loop_node_t>
33221 (
33223 condition,
33225 loop_body
33226 );
33227 }
33228 #ifndef exprtk_disable_break_continue
33229 else
33230 {
33231 if (rtc)
33232 return node_allocator_->allocate<for_loop_bc_rtc_node_t>
33233 (
33235 condition,
33237 loop_body,
33238 rtc
33239 );
33240 else
33241 return node_allocator_->allocate<for_loop_bc_node_t>
33242 (
33244 condition,
33246 loop_body
33247 );
33248 }
33249 #else
33250 return error_node();
33251 #endif
33252 }
loop_runtime_check_ptr get_loop_runtime_check(const loop_runtime_check::loop_types loop_type) const
Definition exprtk.hpp:33025

References exprtk::loop_runtime_check::e_for_loop, exprtk::parser_error::e_parser, exprtk::parser< T >::error_node(), exprtk_error_location, exprtk::details::free_node(), get_loop_runtime_check(), exprtk::details::is_constant_node(), exprtk::details::is_null_node(), exprtk::details::is_true(), exprtk::parser_error::make_error(), node_allocator_, and parser_.

Here is the call graph for this function:

◆ function() [1/2]

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::function ( ifunction_t * f)
inline

Definition at line 34033 of file exprtk.hpp.

34034 {
34036 return node_allocator_->allocate<function_N_node_t>(f);
34037 }

References node_allocator_.

◆ function() [2/2]

template<typename T>
template<typename Type>
template<std::size_t N>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::function ( ifunction_t * f,
expression_node_ptr(&) b[N] )
inline

Definition at line 33980 of file exprtk.hpp.

33981 {
33984
33985 if (0 == result)
33986 return error_node();
33987 else
33988 {
33989 // Can the function call be completely optimised?
33991 return result;
33992 else if (!all_nodes_valid(b))
33993 {
33995 std::fill_n(b, N, reinterpret_cast<expression_node_ptr>(0));
33996
33997 return error_node();
33998 }
33999 else if (N != f->param_count)
34000 {
34002 std::fill_n(b, N, reinterpret_cast<expression_node_ptr>(0));
34003
34004 return error_node();
34005 }
34006
34008
34009 if (!func_node_ptr->init_branches(b))
34010 {
34012 std::fill_n(b, N, reinterpret_cast<expression_node_ptr>(0));
34013
34014 return error_node();
34015 }
34016
34017 if (result && result->valid())
34018 {
34019 return result;
34020 }
34021
34024 token_t(),
34025 "ERR266 - Failed to synthesize node: function_N_node_t",
34027
34029 return error_node();
34030 }
34031 }
bool synthesize_expression(const details::operator_type &operation, expression_node_ptr(&branch)[2], expression_node_ptr &result)
Definition exprtk.hpp:36336

References exprtk::parser_error::e_synthesis, exprtk::parser< T >::error_node(), exprtk_error_location, exprtk::details::free_node(), exprtk::details::is_constant_node(), exprtk::parser_error::make_error(), node_allocator_, exprtk::ifunction< T >::param_count, parser_, synthesize_expression(), and exprtk::details::expression_node< T >::valid().

Here is the call graph for this function:

◆ generic_function_call()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::generic_function_call ( igeneric_function_t * gf,
std::vector< expression_node_ptr > & arg_list,
const std::size_t & param_seq_index = std::numeric_limits<std::size_t>::max() )
inline

Definition at line 34081 of file exprtk.hpp.

34084 {
34086 {
34088 return error_node();
34089 }
34090
34093
34095
34097 std::string node_name = "Unknown";
34098
34099 if (no_psi == param_seq_index)
34100 {
34102 node_name = "generic_function_node<igeneric_function_t>";
34103 }
34104 else
34105 {
34107 node_name = "multimode_genfunction_node<igeneric_function_t>";
34108 }
34109
34111
34113
34114 if (
34115 !arg_list.empty() &&
34116 !gf->has_side_effects() &&
34117 parser_->state_.type_check_enabled &&
34119 )
34120 {
34121 genfunc_node_ptr->init_branches();
34122
34123 const Type v = result->value();
34124
34126
34127 return node_allocator_->allocate<literal_node_t>(v);
34128 }
34129 else if (genfunc_node_ptr->init_branches())
34130 {
34131 if (result && result->valid())
34132 {
34133 parser_->state_.activate_side_effect("generic_function_call()");
34134 return result;
34135 }
34136
34139 token_t(),
34140 "ERR268 - Failed to synthesize node: " + node_name,
34142
34144 return error_node();
34145 }
34146 else
34147 {
34150
34151 return error_node();
34152 }
34153 }
bool is_constant_foldable(NodePtr(&b)[N]) const
Definition exprtk.hpp:34466

References exprtk::parser_error::e_synthesis, exprtk::parser< T >::error_node(), exprtk_error_location, exprtk::details::free_all_nodes(), exprtk::details::free_node(), exprtk::function_traits::has_side_effects(), is_constant_foldable(), exprtk::parser_error::make_error(), node_allocator_, parser_, exprtk::details::expression_node< T >::valid(), and exprtk::details::expression_node< T >::value().

Here is the call graph for this function:

◆ get_loop_runtime_check()

template<typename T>
template<typename Type>
loop_runtime_check_ptr exprtk::parser< T >::expression_generator< Type >::get_loop_runtime_check ( const loop_runtime_check::loop_types loop_type) const
inline

Definition at line 33025 of file exprtk.hpp.

33026 {
33027 if (
33028 parser_->loop_runtime_check_ &&
33029 (loop_type == (parser_->loop_runtime_check_->loop_set & loop_type))
33030 )
33031 {
33032 return parser_->loop_runtime_check_;
33033 }
33034
33035 return loop_runtime_check_ptr(0);
33036 }
loop_runtime_check * loop_runtime_check_ptr
Definition exprtk.hpp:2210

References parser_.

Referenced by for_loop(), repeat_until_loop(), and while_loop().

Here is the caller graph for this function:

◆ get_operator()

template<typename T>
template<typename Type>
details::operator_type exprtk::parser< T >::expression_generator< Type >::get_operator ( const binary_functor_t & bop) const
inline

Definition at line 32026 of file exprtk.hpp.

32027 {
32028 return (*inv_binary_op_map_).find(bop)->second;
32029 }

Referenced by exprtk::parser< T >::expression_generator< Type >::synthesize_covocov_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covocov_expression2::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covocov_expression3::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covocov_expression4::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covovoc_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covovoc_expression2::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covovoc_expression3::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covovoc_expression4::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covovov_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covovov_expression2::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covovov_expression3::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covovov_expression4::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vococov_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vococov_expression3::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocovoc_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocovoc_expression2::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocovoc_expression3::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocovoc_expression4::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocovov_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocovov_expression2::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocovov_expression3::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocovov_expression4::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovocov_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovocov_expression2::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovocov_expression3::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovocov_expression4::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovovoc_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovovoc_expression2::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovovoc_expression3::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovovoc_expression4::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovovov_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovovov_expression2::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovovov_expression3::process(), and exprtk::parser< T >::expression_generator< Type >::synthesize_vovovov_expression4::process().

Here is the caller graph for this function:

◆ get_vector_access_runtime_check()

template<typename T>
template<typename Type>
vector_access_runtime_check_ptr exprtk::parser< T >::expression_generator< Type >::get_vector_access_runtime_check ( ) const
inline

Definition at line 33038 of file exprtk.hpp.

33039 {
33040 return parser_->vector_access_runtime_check_;
33041 }

References parser_.

Referenced by vector_element().

Here is the caller graph for this function:

◆ init_synthesize_map()

template<typename T>
template<typename Type>
void exprtk::parser< T >::expression_generator< Type >::init_synthesize_map ( )
inline

Definition at line 31882 of file exprtk.hpp.

31883 {
31884 #ifndef exprtk_disable_enhanced_features
31888
31889 #define register_synthezier(S) \
31890 synthesize_map_[S ::node_type::id()] = S ::process; \
31891
31904
31914
31924
31933
31943
31952
31953 #undef register_synthezier
31954 #endif
31955 }
#define register_synthezier(S)
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition exprtk.hpp:36385
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition exprtk.hpp:36420
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition exprtk.hpp:36361

References exprtk::parser< T >::expression_generator< Type >::synthesize_cov_expression::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_voc_expression::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vov_expression::process(), register_synthezier, and synthesize_map_.

Here is the call graph for this function:

◆ is_assignment_operation()

template<typename T>
template<typename Type>
bool exprtk::parser< T >::expression_generator< Type >::is_assignment_operation ( const details::operator_type & operation) const
inline

Definition at line 32183 of file exprtk.hpp.

32184 {
32185 return (
32191 ) &&
32192 parser_->settings_.assignment_enabled(operation);
32193 }

References exprtk::details::e_addass, exprtk::details::e_divass, exprtk::details::e_modass, exprtk::details::e_mulass, exprtk::details::e_subass, and parser_.

Referenced by is_invalid_assignment_op(), and operator()().

Here is the caller graph for this function:

◆ is_constant_foldable() [1/2]

template<typename T>
template<typename Type>
template<typename NodePtr, typename Allocator, template< typename, typename > class Sequence>
bool exprtk::parser< T >::expression_generator< Type >::is_constant_foldable ( const Sequence< NodePtr, Allocator > & b) const
inlineprivate

Definition at line 34482 of file exprtk.hpp.

34483 {
34484 for (std::size_t i = 0; i < b.size(); ++i)
34485 {
34486 if (0 == b[i])
34487 return false;
34488 else if (!details::is_constant_node(b[i]))
34489 return false;
34490 }
34491
34492 return true;
34493 }

References exprtk::details::is_constant_node().

Here is the call graph for this function:

◆ is_constant_foldable() [2/2]

template<typename T>
template<typename Type>
template<std::size_t N, typename NodePtr>
bool exprtk::parser< T >::expression_generator< Type >::is_constant_foldable ( NodePtr(&) b[N]) const
inlineprivate

Definition at line 34466 of file exprtk.hpp.

34467 {
34468 for (std::size_t i = 0; i < N; ++i)
34469 {
34470 if (0 == b[i])
34471 return false;
34472 else if (!details::is_constant_node(b[i]))
34473 return false;
34474 }
34475
34476 return true;
34477 }

References exprtk::details::is_constant_node().

Referenced by generic_function_call(), multi_switch_statement(), special_function(), special_function(), string_function_call(), switch_statement(), synthesize_expression(), synthesize_expression(), vararg_function(), and vararg_function_call().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_constpow_operation()

template<typename T>
template<typename Type>
bool exprtk::parser< T >::expression_generator< Type >::is_constpow_operation ( const details::operator_type & operation,
expression_node_ptr(&) branch[2] ) const
inline

Definition at line 32455 of file exprtk.hpp.

32456 {
32457 if (
32463 )
32464 return false;
32465
32466 const Type c = static_cast<details::literal_node<Type>*>(branch[1])->value();
32467
32469 }
bool cardinal_pow_optimisable(const details::operator_type &operation, const T &c) const
Definition exprtk.hpp:35365

References cardinal_pow_optimisable(), exprtk::details::is_constant_node(), exprtk::details::is_generally_string_node(), exprtk::details::is_variable_node(), and exprtk::details::is_vector_node().

Referenced by operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_invalid_assignment_op()

template<typename T>
template<typename Type>
bool exprtk::parser< T >::expression_generator< Type >::is_invalid_assignment_op ( const details::operator_type & operation,
expression_node_ptr(&) branch[2] ) const
inline

Definition at line 32426 of file exprtk.hpp.

32427 {
32429 {
32431
32433 return !b1_is_genstring;
32434 else if (details::is_literal_node(branch[0]))
32435 return true;
32436 else
32437 return (
32448 )
32449 || b1_is_genstring;
32450 }
32451 else
32452 return false;
32453 }
bool is_assignment_operation(const details::operator_type &operation) const
Definition exprtk.hpp:32183
bool is_generally_string_node(const expression_node< T > *node)
Definition exprtk.hpp:19264

References is_assignment_operation(), exprtk::details::is_generally_string_node(), exprtk::details::is_literal_node(), exprtk::details::is_rebasevector_celem_node(), exprtk::details::is_rebasevector_celem_rtc_node(), exprtk::details::is_rebasevector_elem_node(), exprtk::details::is_rebasevector_elem_rtc_node(), exprtk::details::is_string_node(), exprtk::details::is_variable_node(), exprtk::details::is_vector_celem_node(), exprtk::details::is_vector_celem_rtc_node(), exprtk::details::is_vector_elem_node(), exprtk::details::is_vector_elem_rtc_node(), and exprtk::details::is_vector_node().

Referenced by operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_invalid_break_continue_op()

template<typename T>
template<typename Type>
bool exprtk::parser< T >::expression_generator< Type >::is_invalid_break_continue_op ( expression_node_ptr(&) branch[2]) const
inline

Definition at line 32471 of file exprtk.hpp.

32472 {
32473 return (
32478 );
32479 }

References exprtk::details::is_break_node(), and exprtk::details::is_continue_node().

Referenced by operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_invalid_string_op() [1/2]

template<typename T>
template<typename Type>
bool exprtk::parser< T >::expression_generator< Type >::is_invalid_string_op ( const details::operator_type & operation,
expression_node_ptr(&) branch[2] ) const
inline

Definition at line 32481 of file exprtk.hpp.

32482 {
32483 const bool b0_string = is_generally_string_node(branch[0]);
32484 const bool b1_string = is_generally_string_node(branch[1]);
32485
32486 bool result = false;
32487
32488 if (b0_string != b1_string)
32489 result = true;
32491 result = true;
32492
32493 if (result)
32494 {
32495 parser_->set_synthesis_error("Invalid string operation");
32496 }
32497
32498 return result;
32499 }
bool valid_string_operation(const details::operator_type &operation) const
Definition exprtk.hpp:32196

References parser_, and valid_string_operation().

Referenced by operator()(), and operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_invalid_string_op() [2/2]

template<typename T>
template<typename Type>
bool exprtk::parser< T >::expression_generator< Type >::is_invalid_string_op ( const details::operator_type & operation,
expression_node_ptr(&) branch[3] ) const
inline

Definition at line 32501 of file exprtk.hpp.

32502 {
32503 const bool b0_string = is_generally_string_node(branch[0]);
32504 const bool b1_string = is_generally_string_node(branch[1]);
32505 const bool b2_string = is_generally_string_node(branch[2]);
32506
32507 bool result = false;
32508
32509 if ((b0_string != b1_string) || (b1_string != b2_string))
32510 result = true;
32512 result = true;
32513
32514 if (result)
32515 {
32516 parser_->set_synthesis_error("Invalid string operation");
32517 }
32518
32519 return result;
32520 }

References exprtk::details::e_inrange, and parser_.

◆ is_null_present()

template<typename T>
template<typename Type>
bool exprtk::parser< T >::expression_generator< Type >::is_null_present ( expression_node_ptr(&) branch[2]) const
inline

Definition at line 32554 of file exprtk.hpp.

32555 {
32556 return (
32559 );
32560 }

References exprtk::details::is_null_node().

Referenced by operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_shortcircuit_expression()

template<typename T>
template<typename Type>
bool exprtk::parser< T >::expression_generator< Type >::is_shortcircuit_expression ( const details::operator_type & operation) const
inline

Definition at line 32540 of file exprtk.hpp.

32541 {
32542 return (
32545 );
32546 }

References exprtk::details::e_scand, and exprtk::details::e_scor.

Referenced by operator()().

Here is the caller graph for this function:

◆ is_string_operation() [1/2]

template<typename T>
template<typename Type>
bool exprtk::parser< T >::expression_generator< Type >::is_string_operation ( const details::operator_type & operation,
expression_node_ptr(&) branch[2] ) const
inline

Definition at line 32522 of file exprtk.hpp.

32523 {
32524 const bool b0_string = is_generally_string_node(branch[0]);
32525 const bool b1_string = is_generally_string_node(branch[1]);
32526
32528 }

References valid_string_operation().

Referenced by operator()(), and operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_string_operation() [2/2]

template<typename T>
template<typename Type>
bool exprtk::parser< T >::expression_generator< Type >::is_string_operation ( const details::operator_type & operation,
expression_node_ptr(&) branch[3] ) const
inline

Definition at line 32530 of file exprtk.hpp.

32531 {
32532 const bool b0_string = is_generally_string_node(branch[0]);
32533 const bool b1_string = is_generally_string_node(branch[1]);
32534 const bool b2_string = is_generally_string_node(branch[2]);
32535
32537 }

References exprtk::details::e_inrange.

◆ is_vector_arithmetic_operation()

template<typename T>
template<typename Type>
bool exprtk::parser< T >::expression_generator< Type >::is_vector_arithmetic_operation ( const details::operator_type & operation,
expression_node_ptr(&) branch[2] ) const
inline

Definition at line 32584 of file exprtk.hpp.

32585 {
32587 return false;
32588 else
32589 return (
32595 );
32596 }

References exprtk::details::e_add, exprtk::details::e_div, exprtk::details::e_mul, exprtk::details::e_pow, and exprtk::details::e_sub.

Referenced by operator()().

Here is the caller graph for this function:

◆ is_vector_eqineq_logic_operation()

template<typename T>
template<typename Type>
bool exprtk::parser< T >::expression_generator< Type >::is_vector_eqineq_logic_operation ( const details::operator_type & operation,
expression_node_ptr(&) branch[2] ) const
inline

Definition at line 32562 of file exprtk.hpp.

32563 {
32565 return false;
32566 else
32567 return (
32568 (details::e_lt == operation) ||
32570 (details::e_gt == operation) ||
32572 (details::e_eq == operation) ||
32573 (details::e_ne == operation) ||
32577 (details::e_or == operation) ||
32581 );
32582 }

References exprtk::details::e_and, exprtk::details::e_eq, exprtk::details::e_equal, exprtk::details::e_gt, exprtk::details::e_gte, exprtk::details::e_lt, exprtk::details::e_lte, exprtk::details::e_nand, exprtk::details::e_ne, exprtk::details::e_nor, exprtk::details::e_or, exprtk::details::e_xnor, and exprtk::details::e_xor.

Referenced by operator()().

Here is the caller graph for this function:

◆ lodge_assignment()

template<typename T>
template<typename Type>
void exprtk::parser< T >::expression_generator< Type >::lodge_assignment ( symbol_type cst,
expression_node_ptr node )
inlineprivate

Definition at line 34495 of file exprtk.hpp.

34496 {
34497 parser_->state_.activate_side_effect("lodge_assignment()");
34498
34499 if (!parser_->dec_.collect_assignments())
34500 return;
34501
34503
34504 switch (cst)
34505 {
34506 case e_st_variable : symbol_name = parser_->symtab_store_
34507 .get_variable_name(node);
34508 break;
34509
34510 #ifndef exprtk_disable_string_capabilities
34511 case e_st_string : symbol_name = parser_->symtab_store_
34512 .get_stringvar_name(node);
34513 break;
34514 #endif
34515
34516 case e_st_vector : {
34518
34519 vector_holder_t& vh = static_cast<vector_node_t*>(node)->vec_holder();
34520
34521 symbol_name = parser_->symtab_store_.get_vector_name(&vh);
34522 }
34523 break;
34524
34525 case e_st_vecelem : {
34527
34529
34530 symbol_name = parser_->symtab_store_.get_vector_name(&vh);
34531
34532 cst = e_st_vector;
34533 }
34534 break;
34535
34536 default : return;
34537 }
34538
34539 if (!symbol_name.empty())
34540 {
34541 parser_->dec_.add_assignment(symbol_name,cst);
34542 }
34543 }

References exprtk::parser< T >::e_st_string, exprtk::parser< T >::e_st_variable, exprtk::parser< T >::e_st_vecelem, exprtk::parser< T >::e_st_vector, and parser_.

Referenced by synthesize_assignment_expression(), and synthesize_assignment_operation_expression().

Here is the caller graph for this function:

◆ multi_switch_statement()

template<typename T>
template<typename Type>
template<typename Allocator, template< typename, typename > class Sequence>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::multi_switch_statement ( Sequence< expression_node_ptr, Allocator > & arg_list)
inline

Definition at line 33470 of file exprtk.hpp.

33471 {
33473 {
33475
33476 return error_node();
33477 }
33480 else
33482 }
expression_node_ptr const_optimise_mswitch(Sequence< expression_node_ptr, Allocator > &arg_list)
Definition exprtk.hpp:33292

References const_optimise_mswitch(), exprtk::parser< T >::error_node(), exprtk::details::free_all_nodes(), is_constant_foldable(), and node_allocator_.

Here is the call graph for this function:

◆ operation_optimisable()

template<typename T>
template<typename Type>
bool exprtk::parser< T >::expression_generator< Type >::operation_optimisable ( const details::operator_type & operation) const
inline

Definition at line 32245 of file exprtk.hpp.

32246 {
32247 return (details::e_add == operation) ||
32253 (details::e_lt == operation) ||
32255 (details::e_gt == operation) ||
32257 (details::e_eq == operation) ||
32258 (details::e_ne == operation) ||
32261 (details::e_or == operation) ||
32265 }

References exprtk::details::e_add, exprtk::details::e_and, exprtk::details::e_div, exprtk::details::e_eq, exprtk::details::e_gt, exprtk::details::e_gte, exprtk::details::e_lt, exprtk::details::e_lte, exprtk::details::e_mod, exprtk::details::e_mul, exprtk::details::e_nand, exprtk::details::e_ne, exprtk::details::e_nor, exprtk::details::e_or, exprtk::details::e_pow, exprtk::details::e_sub, exprtk::details::e_xnor, and exprtk::details::e_xor.

Referenced by binext_optimisable(), boc_optimisable(), bov_optimisable(), cob_optimisable(), cov_optimisable(), synthesize_expression(), uvouv_optimisable(), vob_optimisable(), voc_optimisable(), and vov_optimisable().

Here is the caller graph for this function:

◆ operator()() [1/11]

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::operator() ( const details::operator_type & operation,
expression_node_ptr & b0,
expression_node_ptr & b1 )
inline

Definition at line 32803 of file exprtk.hpp.

32804 {
32806
32807 if ((0 != b0) && (0 != b1))
32808 {
32809 expression_node_ptr branch[2] = { b0, b1 };
32811 b0 = branch[0];
32812 b1 = branch[1];
32813 }
32814
32815 return result;
32816 }
expression_node_ptr operator()(const Type &v) const
Definition exprtk.hpp:32031

References exprtk::parser< T >::error_node(), and operator()().

Here is the call graph for this function:

◆ operator()() [2/11]

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::operator() ( const details::operator_type & operation,
expression_node_ptr b0 )
inline

Definition at line 32797 of file exprtk.hpp.

32798 {
32799 expression_node_ptr branch[1] = { b0 };
32800 return (*this)(operation,branch);
32801 }

◆ operator()() [3/11]

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::operator() ( const details::operator_type & operation,
expression_node_ptr(&) branch[1] )
inline

Definition at line 32133 of file exprtk.hpp.

32134 {
32135 if (0 == branch[0])
32136 {
32137 return error_node();
32138 }
32139 else if (details::is_null_node(branch[0]))
32140 {
32141 return branch[0];
32142 }
32143 else if (details::is_break_node(branch[0]))
32144 {
32147 parser_->current_state().token,
32148 "ERR249 - Invalid use of break statement",
32150
32151 parser_->node_allocator_.free(branch[0]);
32152
32153 return error_node();
32154 }
32155 else if (details::is_continue_node(branch[0]))
32156 {
32159 parser_->current_state().token,
32160 "ERR250 - Invalid use of continue statement",
32162
32163 parser_->node_allocator_.free(branch[0]);
32164
32165 return error_node();
32166 }
32167 else if (details::is_constant_node(branch[0]))
32168 {
32170 }
32172 {
32174 }
32176 {
32178 }
32179 else
32181 }
expression_node_ptr synthesize_uvec_expression(const details::operator_type &operation, expression_node_ptr(&branch)[1])
Definition exprtk.hpp:33565
expression_node_ptr synthesize_uv_expression(const details::operator_type &operation, expression_node_ptr(&branch)[1])
Definition exprtk.hpp:33548
expression_node_ptr synthesize_unary_expression(const details::operator_type &operation, expression_node_ptr(&branch)[1])
Definition exprtk.hpp:33581
bool unary_optimisable(const details::operator_type &operation) const
Definition exprtk.hpp:32061

References exprtk::parser_error::e_syntax, exprtk::parser< T >::error_node(), exprtk_error_location, exprtk::details::is_break_node(), exprtk::details::is_constant_node(), exprtk::details::is_continue_node(), exprtk::details::is_ivector_node(), exprtk::details::is_null_node(), exprtk::details::is_variable_node(), exprtk::parser_error::make_error(), parser_, synthesize_expression(), synthesize_unary_expression(), synthesize_uv_expression(), synthesize_uvec_expression(), and unary_optimisable().

Here is the call graph for this function:

◆ operator()() [4/11]

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::operator() ( const details::operator_type & operation,
expression_node_ptr(&) branch[2] )
inline

Definition at line 32598 of file exprtk.hpp.

32599 {
32600 if ((0 == branch[0]) || (0 == branch[1]))
32601 {
32603
32606 parser_->current_state().token,
32607 "ERR251 - Invalid branches received for operator '" + details::to_str(operation) + "'",
32609
32610 return error_node();
32611 }
32613 {
32615
32618 parser_->current_state().token,
32619 "ERR252 - Invalid branch pair for string operator '" + details::to_str(operation) + "'",
32621
32622 return error_node();
32623 }
32625 {
32627
32630 parser_->current_state().token,
32631 "ERR253 - Invalid branch pair for assignment operator '" + details::to_str(operation) + "'",
32633
32634 return error_node();
32635 }
32637 {
32639
32642 parser_->current_state().token,
32643 "ERR254 - Invalid branch pair for break/continue operator '" + details::to_str(operation) + "'",
32645
32646 return error_node();
32647 }
32648 else if (details::e_assign == operation)
32649 {
32651 }
32652 else if (details::e_swap == operation)
32653 {
32655 }
32657 {
32659 }
32661 {
32663 }
32665 {
32667 }
32669 {
32671 }
32673 {
32675 }
32676 else if (is_null_present(branch))
32677 {
32679 }
32680 #ifndef exprtk_disable_cardinal_pow_optimisation
32682 {
32684 }
32685 #endif
32686
32688
32689 #ifndef exprtk_disable_enhanced_features
32691 {
32692 return result;
32693 }
32694 else
32695 #endif
32696
32697 {
32698 /*
32699 Possible reductions:
32700 1. c o cob -> cob
32701 2. cob o c -> cob
32702 3. c o boc -> boc
32703 4. boc o c -> boc
32704 */
32705 result = error_node();
32706
32708 {
32710 }
32711 else if (coboc_optimisable(operation, branch) && (0 == result))
32712 {
32714 }
32715
32716 if (result)
32717 return result;
32718 }
32719
32721 {
32723 }
32724 else if (vob_optimisable(operation, branch))
32725 {
32727 }
32728 else if (bov_optimisable(operation, branch))
32729 {
32731 }
32732 else if (cob_optimisable(operation, branch))
32733 {
32735 }
32736 else if (boc_optimisable(operation, branch))
32737 {
32739 }
32740 #ifndef exprtk_disable_enhanced_features
32741 else if (cov_optimisable(operation, branch))
32742 {
32744 }
32745 #endif
32747 {
32749 }
32750 else
32752 }
bool coboc_optimisable(const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
Definition exprtk.hpp:32374
bool boc_optimisable(const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
Definition exprtk.hpp:32349
bool cov_optimisable(const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
Definition exprtk.hpp:32313
expression_node_ptr synthesize_veceqineqlogic_operation_expression(const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition exprtk.hpp:34975
bool is_invalid_string_op(const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
Definition exprtk.hpp:32481
bool is_invalid_assignment_op(const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
Definition exprtk.hpp:32426
expression_node_ptr synthesize_swap_expression(expression_node_ptr(&branch)[2])
Definition exprtk.hpp:35153
bool is_null_present(expression_node_ptr(&branch)[2]) const
Definition exprtk.hpp:32554
bool is_vector_eqineq_logic_operation(const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
Definition exprtk.hpp:32562
bool binext_optimisable(const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
Definition exprtk.hpp:32417
expression_node_ptr synthesize_shortcircuit_expression(const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition exprtk.hpp:35235
expression_node_ptr synthesize_uvouv_expression(const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition exprtk.hpp:41129
bool is_string_operation(const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
Definition exprtk.hpp:32522
bool is_constpow_operation(const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
Definition exprtk.hpp:32455
bool is_vector_arithmetic_operation(const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
Definition exprtk.hpp:32584
bool is_invalid_break_continue_op(expression_node_ptr(&branch)[2]) const
Definition exprtk.hpp:32471
expression_node_ptr synthesize_string_expression(const details::operator_type &opr, expression_node_ptr(&branch)[2])
Definition exprtk.hpp:41533
expression_node_ptr synthesize_assignment_expression(const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition exprtk.hpp:34624
bool vob_optimisable(const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
Definition exprtk.hpp:32399
expression_node_ptr synthesize_null_expression(const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition exprtk.hpp:41739
expression_node_ptr synthesize_assignment_operation_expression(const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition exprtk.hpp:34703
expression_node_ptr synthesize_vecarithmetic_operation_expression(const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition exprtk.hpp:35067
bool cob_optimisable(const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
Definition exprtk.hpp:32340
expression_node_ptr cardinal_pow_optimisation(const T &v, const T &c)
Definition exprtk.hpp:35344
bool bov_optimisable(const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
Definition exprtk.hpp:32408
bool is_shortcircuit_expression(const details::operator_type &operation) const
Definition exprtk.hpp:32540
bool uvouv_optimisable(const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
Definition exprtk.hpp:32390
bool cocob_optimisable(const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
Definition exprtk.hpp:32358
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition exprtk.hpp:35408
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition exprtk.hpp:35857
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition exprtk.hpp:35633
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition exprtk.hpp:35719
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition exprtk.hpp:36181
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition exprtk.hpp:35976
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition exprtk.hpp:35558

References binext_optimisable(), boc_optimisable(), bov_optimisable(), cardinal_pow_optimisation(), cob_optimisable(), coboc_optimisable(), cocob_optimisable(), cov_optimisable(), exprtk::details::e_assign, exprtk::details::e_swap, exprtk::parser_error::e_syntax, exprtk::parser< T >::error_node(), exprtk_error_location, exprtk::details::free_all_nodes(), is_assignment_operation(), is_constpow_operation(), is_invalid_assignment_op(), is_invalid_break_continue_op(), is_invalid_string_op(), is_null_present(), is_shortcircuit_expression(), is_string_operation(), is_vector_arithmetic_operation(), is_vector_eqineq_logic_operation(), exprtk::parser_error::make_error(), node_allocator_, parser_, exprtk::parser< T >::expression_generator< Type >::synthesize_binary_ext_expression::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_boc_expression::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_bov_expression::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_cob_expression::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_coboc_expression::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_cocob_expression::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_cov_expression::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vob_expression::process(), synthesize_assignment_expression(), synthesize_assignment_operation_expression(), synthesize_expression(), synthesize_null_expression(), synthesize_shortcircuit_expression(), synthesize_string_expression(), synthesize_swap_expression(), synthesize_uvouv_expression(), synthesize_vecarithmetic_operation_expression(), synthesize_veceqineqlogic_operation_expression(), exprtk::details::to_str(), uvouv_optimisable(), and vob_optimisable().

Here is the call graph for this function:

◆ operator()() [5/11]

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::operator() ( const details::operator_type & operation,
expression_node_ptr(&) branch[3] )
inline

Definition at line 32754 of file exprtk.hpp.

32755 {
32756 if (
32757 (0 == branch[0]) ||
32758 (0 == branch[1]) ||
32759 (0 == branch[2])
32760 )
32761 {
32763
32766 parser_->current_state().token,
32767 "ERR255 - Invalid branches operator '" + details::to_str(operation) + "'",
32769
32770 return error_node();
32771 }
32773 {
32775
32778 parser_->current_state().token,
32779 "ERR256 - Invalid branches for string operator '" + details::to_str(operation) + "'",
32781
32782 return error_node();
32783 }
32785 {
32787 }
32788 else
32790 }

References exprtk::parser_error::e_syntax, exprtk::parser< T >::error_node(), exprtk_error_location, exprtk::details::free_all_nodes(), is_invalid_string_op(), is_string_operation(), exprtk::parser_error::make_error(), node_allocator_, parser_, synthesize_expression(), synthesize_string_expression(), and exprtk::details::to_str().

Here is the call graph for this function:

◆ operator()() [6/11]

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::operator() ( const details::operator_type & operation,
expression_node_ptr(&) branch[4] )
inline

Definition at line 32792 of file exprtk.hpp.

References synthesize_expression().

Here is the call graph for this function:

◆ operator()() [7/11]

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::operator() ( const std::string & s) const
inline

Definition at line 32037 of file exprtk.hpp.

32038 {
32039 return node_allocator_->allocate<string_literal_node_t>(s);
32040 }

References node_allocator_.

◆ operator()() [8/11]

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::operator() ( const std::string & s,
range_t & rp ) const
inline

Definition at line 32047 of file exprtk.hpp.

32048 {
32049 return node_allocator_->allocate_tt<const_string_range_node_t>(s,rp);
32050 }

References node_allocator_.

◆ operator()() [9/11]

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::operator() ( const Type & v) const
inline

Definition at line 32031 of file exprtk.hpp.

32032 {
32033 return node_allocator_->allocate<literal_node_t>(v);
32034 }

References node_allocator_.

Referenced by operator()().

Here is the caller graph for this function:

◆ operator()() [10/11]

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::operator() ( expression_node_ptr branch,
range_t & rp ) const
inline

Definition at line 32052 of file exprtk.hpp.

32053 {
32056 else
32057 return error_node();
32058 }

References exprtk::parser< T >::error_node(), and node_allocator_.

Here is the call graph for this function:

◆ operator()() [11/11]

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::operator() ( std::string & s,
range_t & rp ) const
inline

Definition at line 32042 of file exprtk.hpp.

32043 {
32044 return node_allocator_->allocate_rr<string_range_node_t>(s,rp);
32045 }

References node_allocator_.

◆ repeat_until_loop()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::repeat_until_loop ( expression_node_ptr & condition,
expression_node_ptr & branch,
const bool break_continue_present = false ) const
inline

Definition at line 33107 of file exprtk.hpp.

33110 {
33112 {
33113 if (
33116 )
33117 {
33119
33120 return branch;
33121 }
33122
33125
33126 return error_node();
33127 }
33129 {
33131
33132 return branch;
33133 }
33134
33136
33138 {
33139 if (rtc)
33141 (condition, branch, rtc);
33142 else
33144 (condition, branch);
33145 }
33146 #ifndef exprtk_disable_break_continue
33147 else
33148 {
33149 if (rtc)
33151 (condition, branch, rtc);
33152 else
33154 (condition, branch);
33155 }
33156 #else
33157 return error_node();
33158 #endif
33159 }

References exprtk::loop_runtime_check::e_repeat_until_loop, exprtk::parser< T >::error_node(), exprtk::details::free_node(), get_loop_runtime_check(), exprtk::details::is_constant_node(), exprtk::details::is_null_node(), exprtk::details::is_true(), and node_allocator_.

Here is the call graph for this function:

◆ return_call()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::return_call ( std::vector< expression_node_ptr > & arg_list)
inline

Definition at line 34231 of file exprtk.hpp.

34232 {
34234 {
34236 return error_node();
34237 }
34238
34240
34243
34244 alloc_type* return_node_ptr = static_cast<alloc_type*>(result);
34245
34247
34248 if (return_node_ptr->init_branches())
34249 {
34250 if (result && result->valid())
34251 {
34252 parser_->state_.activate_side_effect("return_call()");
34253 return result;
34254 }
34255
34258 token_t(),
34259 "ERR270 - Failed to synthesize node: return_node",
34261
34263 return error_node();
34264 }
34265 else
34266 {
34269
34270 return error_node();
34271 }
34272 }

References exprtk::parser_error::e_synthesis, exprtk::parser< T >::error_node(), exprtk_error_location, exprtk::details::free_all_nodes(), exprtk::details::free_node(), exprtk::parser_error::make_error(), node_allocator_, parser_, and exprtk::details::expression_node< T >::valid().

Here is the call graph for this function:

◆ return_envelope()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::return_envelope ( expression_node_ptr body,
results_context_t * rc,
bool *& return_invoked )
inline

Definition at line 34274 of file exprtk.hpp.

34277 {
34279
34282
34283 return_invoked = static_cast<alloc_type*>(result)->retinvk_ptr();
34284
34285 return result;
34286 }

References node_allocator_.

◆ set_allocator()

template<typename T>
template<typename Type>
void exprtk::parser< T >::expression_generator< Type >::set_allocator ( details::node_allocator & na)
inline

Definition at line 31987 of file exprtk.hpp.

31988 {
31990 }

References node_allocator_.

◆ set_bom()

template<typename T>
template<typename Type>
void exprtk::parser< T >::expression_generator< Type >::set_bom ( binary_op_map_t & binary_op_map)
inline

Definition at line 31967 of file exprtk.hpp.

31968 {
31970 }

References binary_op_map_.

◆ set_ibom()

template<typename T>
template<typename Type>
void exprtk::parser< T >::expression_generator< Type >::set_ibom ( inv_binary_op_map_t & inv_binary_op_map)
inline

Definition at line 31972 of file exprtk.hpp.

31973 {
31975 }
inv_binary_op_map_t * inv_binary_op_map_
Definition exprtk.hpp:41928

References inv_binary_op_map_.

◆ set_parser()

template<typename T>
template<typename Type>
void exprtk::parser< T >::expression_generator< Type >::set_parser ( parser_t & p)
inline

Definition at line 31957 of file exprtk.hpp.

31958 {
31959 parser_ = &p;
31960 }

References parser_.

◆ set_sf3m()

template<typename T>
template<typename Type>
void exprtk::parser< T >::expression_generator< Type >::set_sf3m ( sf3_map_t & sf3_map)
inline

Definition at line 31977 of file exprtk.hpp.

31978 {
31979 sf3_map_ = &sf3_map;
31980 }

References sf3_map_.

◆ set_sf4m()

template<typename T>
template<typename Type>
void exprtk::parser< T >::expression_generator< Type >::set_sf4m ( sf4_map_t & sf4_map)
inline

Definition at line 31982 of file exprtk.hpp.

31983 {
31984 sf4_map_ = &sf4_map;
31985 }

References sf4_map_.

◆ set_strength_reduction_state()

template<typename T>
template<typename Type>
void exprtk::parser< T >::expression_generator< Type >::set_strength_reduction_state ( const bool enabled)
inline

Definition at line 31992 of file exprtk.hpp.

References strength_reduction_enabled_.

◆ set_uom()

template<typename T>
template<typename Type>
void exprtk::parser< T >::expression_generator< Type >::set_uom ( unary_op_map_t & unary_op_map)
inline

Definition at line 31962 of file exprtk.hpp.

31963 {
31965 }

References unary_op_map_.

◆ sf3_optimisable() [1/2]

template<typename T>
template<typename Type>
bool exprtk::parser< T >::expression_generator< Type >::sf3_optimisable ( const std::string & sf3id,
details::operator_type & operation ) const
inline

Definition at line 32109 of file exprtk.hpp.

32110 {
32111 typename sf3_map_t::const_iterator itr = sf3_map_->find(sf3id);
32112
32113 if (sf3_map_->end() == itr)
32114 return false;
32115 else
32116 operation = itr->second.second;
32117
32118 return true;
32119 }

References sf3_map_.

◆ sf3_optimisable() [2/2]

template<typename T>
template<typename Type>
bool exprtk::parser< T >::expression_generator< Type >::sf3_optimisable ( const std::string & sf3id,
trinary_functor_t & tfunc ) const
inline

Definition at line 32085 of file exprtk.hpp.

32086 {
32087 typename sf3_map_t::const_iterator itr = sf3_map_->find(sf3id);
32088
32089 if (sf3_map_->end() == itr)
32090 return false;
32091 else
32092 tfunc = itr->second.first;
32093
32094 return true;
32095 }

References sf3_map_.

Referenced by exprtk::parser< T >::expression_generator< Type >::synthesize_sf3ext_expression::compile().

Here is the caller graph for this function:

◆ sf4_optimisable() [1/2]

template<typename T>
template<typename Type>
bool exprtk::parser< T >::expression_generator< Type >::sf4_optimisable ( const std::string & sf4id,
details::operator_type & operation ) const
inline

Definition at line 32121 of file exprtk.hpp.

32122 {
32123 typename sf4_map_t::const_iterator itr = sf4_map_->find(sf4id);
32124
32125 if (sf4_map_->end() == itr)
32126 return false;
32127 else
32128 operation = itr->second.second;
32129
32130 return true;
32131 }

References sf4_map_.

◆ sf4_optimisable() [2/2]

template<typename T>
template<typename Type>
bool exprtk::parser< T >::expression_generator< Type >::sf4_optimisable ( const std::string & sf4id,
quaternary_functor_t & qfunc ) const
inline

Definition at line 32097 of file exprtk.hpp.

32098 {
32099 typename sf4_map_t::const_iterator itr = sf4_map_->find(sf4id);
32100
32101 if (sf4_map_->end() == itr)
32102 return false;
32103 else
32104 qfunc = itr->second.first;
32105
32106 return true;
32107 }

References sf4_map_.

Referenced by exprtk::parser< T >::expression_generator< Type >::synthesize_sf4ext_expression::compile().

Here is the caller graph for this function:

◆ special_function() [1/2]

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::special_function ( const details::operator_type & operation,
expression_node_ptr(&) branch[3] )
inline

Definition at line 33666 of file exprtk.hpp.

33667 {
33668 if (!all_nodes_valid(branch))
33669 return error_node();
33670 else if (is_constant_foldable(branch))
33672 else if (all_nodes_variables(branch))
33674 else
33675 {
33676 switch (operation)
33677 {
33678 #define case_stmt(op) \
33679 case details::e_sf##op : return node_allocator_-> \
33680 allocate<details::sf3_node<Type,details::sf##op##_op<Type> > > \
33681 (operation, branch); \
33682
33683 case_stmt(00) case_stmt(01) case_stmt(02) case_stmt(03)
33684 case_stmt(04) case_stmt(05) case_stmt(06) case_stmt(07)
33685 case_stmt(08) case_stmt(09) case_stmt(10) case_stmt(11)
33686 case_stmt(12) case_stmt(13) case_stmt(14) case_stmt(15)
33687 case_stmt(16) case_stmt(17) case_stmt(18) case_stmt(19)
33688 case_stmt(20) case_stmt(21) case_stmt(22) case_stmt(23)
33689 case_stmt(24) case_stmt(25) case_stmt(26) case_stmt(27)
33690 case_stmt(28) case_stmt(29) case_stmt(30) case_stmt(31)
33691 case_stmt(32) case_stmt(33) case_stmt(34) case_stmt(35)
33692 case_stmt(36) case_stmt(37) case_stmt(38) case_stmt(39)
33693 case_stmt(40) case_stmt(41) case_stmt(42) case_stmt(43)
33694 case_stmt(44) case_stmt(45) case_stmt(46) case_stmt(47)
33695 #undef case_stmt
33696 default : return error_node();
33697 }
33698 }
33699 }
expression_node_ptr varnode_optimise_sf3(const details::operator_type &operation, expression_node_ptr(&branch)[3])
Definition exprtk.hpp:33634
expression_node_ptr const_optimise_sf3(const details::operator_type &operation, expression_node_ptr(&branch)[3])
Definition exprtk.hpp:33596

References case_stmt, const_optimise_sf3(), exprtk::parser< T >::error_node(), is_constant_foldable(), and varnode_optimise_sf3().

Referenced by exprtk::parser< T >::parse_special_function_impl< Type, NumberOfParameters >::process().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ special_function() [2/2]

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::special_function ( const details::operator_type & operation,
expression_node_ptr(&) branch[4] )
inline

Definition at line 33773 of file exprtk.hpp.

33774 {
33775 if (!all_nodes_valid(branch))
33776 return error_node();
33777 else if (is_constant_foldable(branch))
33779 else if (all_nodes_variables(branch))
33781 switch (operation)
33782 {
33783 #define case_stmt(op) \
33784 case details::e_sf##op : return node_allocator_-> \
33785 allocate<details::sf4_node<Type,details::sf##op##_op<Type> > > \
33786 (operation, branch); \
33787
33788 case_stmt(48) case_stmt(49) case_stmt(50) case_stmt(51)
33789 case_stmt(52) case_stmt(53) case_stmt(54) case_stmt(55)
33790 case_stmt(56) case_stmt(57) case_stmt(58) case_stmt(59)
33791 case_stmt(60) case_stmt(61) case_stmt(62) case_stmt(63)
33792 case_stmt(64) case_stmt(65) case_stmt(66) case_stmt(67)
33793 case_stmt(68) case_stmt(69) case_stmt(70) case_stmt(71)
33794 case_stmt(72) case_stmt(73) case_stmt(74) case_stmt(75)
33795 case_stmt(76) case_stmt(77) case_stmt(78) case_stmt(79)
33796 case_stmt(80) case_stmt(81) case_stmt(82) case_stmt(83)
33797 case_stmt(84) case_stmt(85) case_stmt(86) case_stmt(87)
33798 case_stmt(88) case_stmt(89) case_stmt(90) case_stmt(91)
33799 case_stmt(92) case_stmt(93) case_stmt(94) case_stmt(95)
33800 case_stmt(96) case_stmt(97) case_stmt(98) case_stmt(99)
33801 #undef case_stmt
33802 default : return error_node();
33803 }
33804 }
expression_node_ptr varnode_optimise_sf4(const details::operator_type &operation, expression_node_ptr(&branch)[4])
Definition exprtk.hpp:33739
expression_node_ptr const_optimise_sf4(const details::operator_type &operation, expression_node_ptr(&branch)[4])
Definition exprtk.hpp:33701

References case_stmt, const_optimise_sf4(), exprtk::parser< T >::error_node(), is_constant_foldable(), and varnode_optimise_sf4().

Here is the call graph for this function:

◆ special_one_parameter_vararg()

template<typename T>
template<typename Type>
bool exprtk::parser< T >::expression_generator< Type >::special_one_parameter_vararg ( const details::operator_type & operation) const
inline

Definition at line 33839 of file exprtk.hpp.

33840 {
33841 return (
33847 );
33848 }

References exprtk::details::e_avg, exprtk::details::e_max, exprtk::details::e_min, exprtk::details::e_prod, and exprtk::details::e_sum.

Referenced by vararg_function().

Here is the caller graph for this function:

◆ strength_reduction_enabled()

template<typename T>
template<typename Type>
bool exprtk::parser< T >::expression_generator< Type >::strength_reduction_enabled ( ) const
inline

Definition at line 31997 of file exprtk.hpp.

31998 {
32000 }

References strength_reduction_enabled_.

◆ string_function_call()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::string_function_call ( igeneric_function_t * gf,
std::vector< expression_node_ptr > & arg_list,
const std::size_t & param_seq_index = std::numeric_limits<std::size_t>::max() )
inline

Definition at line 34156 of file exprtk.hpp.

34159 {
34161 {
34163 return error_node();
34164 }
34165
34168
34170
34172 std::string node_name = "Unknown";
34173
34174 if (no_psi == param_seq_index)
34175 {
34177 node_name = "string_function_node<igeneric_function_t>";
34178 }
34179 else
34180 {
34182 node_name = "multimode_strfunction_node<igeneric_function_t>";
34183 }
34184
34186
34188
34189 if (
34190 !arg_list.empty() &&
34191 !gf->has_side_effects() &&
34193 )
34194 {
34195 strfunc_node_ptr->init_branches();
34196
34197 const Type v = result->value();
34198
34200
34201 return node_allocator_->allocate<literal_node_t>(v);
34202 }
34203 else if (strfunc_node_ptr->init_branches())
34204 {
34205 if (result && result->valid())
34206 {
34207 parser_->state_.activate_side_effect("string_function_call()");
34208 return result;
34209 }
34210
34213 token_t(),
34214 "ERR269 - Failed to synthesize node: " + node_name,
34216
34218 return error_node();
34219 }
34220 else
34221 {
34224
34225 return error_node();
34226 }
34227 }

References exprtk::parser_error::e_synthesis, exprtk::parser< T >::error_node(), exprtk_error_location, exprtk::details::free_all_nodes(), exprtk::details::free_node(), exprtk::function_traits::has_side_effects(), is_constant_foldable(), exprtk::parser_error::make_error(), node_allocator_, parser_, exprtk::details::expression_node< T >::valid(), and exprtk::details::expression_node< T >::value().

Here is the call graph for this function:

◆ switch_statement()

template<typename T>
template<typename Type>
template<typename Allocator, template< typename, typename > class Sequence>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::switch_statement ( Sequence< expression_node_ptr, Allocator > & arg_list,
const bool default_statement_present )
inline

Definition at line 33431 of file exprtk.hpp.

33432 {
33433 if (arg_list.empty())
33434 return error_node();
33435 else if (
33437 (!default_statement_present && (arg_list.size() < 2))
33438 )
33439 {
33441
33442 return error_node();
33443 }
33446
33447 switch ((arg_list.size() - 1) / 2)
33448 {
33449 #define case_stmt(N) \
33450 case N : \
33451 return node_allocator_-> \
33452 allocate<details::switch_n_node \
33453 <Type,typename switch_nodes::switch_impl_##N > >(arg_list); \
33454
33455 case_stmt(1)
33456 case_stmt(2)
33457 case_stmt(3)
33458 case_stmt(4)
33459 case_stmt(5)
33460 case_stmt(6)
33461 case_stmt(7)
33462 #undef case_stmt
33463
33465 }
33466 }
expression_node_ptr const_optimise_switch(Sequence< expression_node_ptr, Allocator > &arg_list)
Definition exprtk.hpp:33256

References case_stmt, const_optimise_switch(), exprtk::parser< T >::error_node(), exprtk::details::free_all_nodes(), is_constant_foldable(), and node_allocator_.

Here is the call graph for this function:

◆ synthesize_assignment_expression()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::synthesize_assignment_expression ( const details::operator_type & operation,
expression_node_ptr(&) branch[2] )
inlineprivate

Definition at line 34624 of file exprtk.hpp.

34625 {
34627 {
34628 return error_node();
34629 }
34630 else if (details::is_variable_node(branch[0]))
34631 {
34634 }
34636 {
34639 }
34641 {
34644 }
34646 {
34649 }
34651 {
34654 }
34656 {
34659 }
34660 #ifndef exprtk_disable_string_capabilities
34661 else if (details::is_string_node(branch[0]))
34662 {
34665 }
34667 {
34670 }
34671 #endif
34672 else if (details::is_vector_node(branch[0]))
34673 {
34675
34678 else
34680 }
34681 else if (details::is_literal_node(branch[0]))
34682 {
34685 parser_->current_state().token,
34686 "ERR276 - Cannot assign value to const variable",
34688
34689 return error_node();
34690 }
34691 else
34692 {
34695 parser_->current_state().token,
34696 "ERR277 - Invalid branches for assignment operator '" + details::to_str(operation) + "'",
34698
34699 return error_node();
34700 }
34701 }
void lodge_assignment(symbol_type cst, expression_node_ptr node)
Definition exprtk.hpp:34495
bool assign_immutable_symbol(expression_node_ptr node)
Definition exprtk.hpp:34595

References assign_immutable_symbol(), exprtk::parser< T >::e_st_string, exprtk::parser< T >::e_st_variable, exprtk::parser< T >::e_st_vecelem, exprtk::parser< T >::e_st_vector, exprtk::parser_error::e_syntax, exprtk::parser< T >::error_node(), exprtk_error_location, exprtk::details::is_ivector_node(), exprtk::details::is_literal_node(), exprtk::details::is_rebasevector_celem_node(), exprtk::details::is_rebasevector_elem_node(), exprtk::details::is_rebasevector_elem_rtc_node(), exprtk::details::is_string_node(), exprtk::details::is_string_range_node(), exprtk::details::is_variable_node(), exprtk::details::is_vector_celem_node(), exprtk::details::is_vector_celem_rtc_node(), exprtk::details::is_vector_elem_node(), exprtk::details::is_vector_elem_rtc_node(), exprtk::details::is_vector_node(), lodge_assignment(), exprtk::parser_error::make_error(), parser_, synthesize_expression(), and exprtk::details::to_str().

Referenced by operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ synthesize_assignment_operation_expression()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::synthesize_assignment_operation_expression ( const details::operator_type & operation,
expression_node_ptr(&) branch[2] )
inlineprivate

Definition at line 34703 of file exprtk.hpp.

34705 {
34707 {
34708 return error_node();
34709 }
34710
34712 std::string node_name = "Unknown";
34713
34715 {
34717
34718 switch (operation)
34719 {
34720 #define case_stmt(op0, op1) \
34721 case op0 : result = node_allocator_-> \
34722 template allocate_rrr<typename details::assignment_op_node<Type,op1<Type> > > \
34723 (operation, branch[0], branch[1]); \
34724 node_name = "assignment_op_node"; \
34725 break; \
34726
34732 #undef case_stmt
34733 default : return error_node();
34734 }
34735 }
34737 {
34739
34740 switch (operation)
34741 {
34742 #define case_stmt(op0, op1) \
34743 case op0 : result = node_allocator_-> \
34744 template allocate_rrr<typename details::assignment_vec_elem_op_node<Type,op1<Type> > > \
34745 (operation, branch[0], branch[1]); \
34746 node_name = "assignment_vec_elem_op_node"; \
34747 break; \
34748
34754 #undef case_stmt
34755 default : return error_node();
34756 }
34757 }
34759 {
34761
34762 switch (operation)
34763 {
34764 #define case_stmt(op0, op1) \
34765 case op0 : result = node_allocator_-> \
34766 template allocate_rrr<typename details::assignment_vec_elem_op_rtc_node<Type,op1<Type> > > \
34767 (operation, branch[0], branch[1]); \
34768 node_name = "assignment_vec_elem_op_rtc_node"; \
34769 break; \
34770
34776 #undef case_stmt
34777 default : return error_node();
34778 }
34779 }
34781 {
34783
34784 switch (operation)
34785 {
34786 #define case_stmt(op0, op1) \
34787 case op0 : result = node_allocator_-> \
34788 template allocate_rrr<typename details::assignment_vec_celem_op_rtc_node<Type,op1<Type> > > \
34789 (operation, branch[0], branch[1]); \
34790 node_name = "assignment_vec_celem_op_rtc_node"; \
34791 break; \
34792
34798 #undef case_stmt
34799 default : return error_node();
34800 }
34801 }
34803 {
34805
34806 switch (operation)
34807 {
34808 #define case_stmt(op0, op1) \
34809 case op0 : result = node_allocator_-> \
34810 template allocate_rrr<typename details::assignment_rebasevec_elem_op_node<Type,op1<Type> > > \
34811 (operation, branch[0], branch[1]); \
34812 node_name = "assignment_rebasevec_elem_op_node"; \
34813 break; \
34814
34820 #undef case_stmt
34821 default : return error_node();
34822 }
34823 }
34825 {
34827
34828 switch (operation)
34829 {
34830 #define case_stmt(op0, op1) \
34831 case op0 : result = node_allocator_-> \
34832 template allocate_rrr<typename details::assignment_rebasevec_celem_op_node<Type,op1<Type> > > \
34833 (operation, branch[0], branch[1]); \
34834 node_name = "assignment_rebasevec_celem_op_node"; \
34835 break; \
34836
34842 #undef case_stmt
34843 default : return error_node();
34844 }
34845 }
34847 {
34849
34850 switch (operation)
34851 {
34852 #define case_stmt(op0, op1) \
34853 case op0 : result = node_allocator_-> \
34854 template allocate_rrr<typename details::assignment_rebasevec_elem_op_rtc_node<Type,op1<Type> > > \
34855 (operation, branch[0], branch[1]); \
34856 node_name = "assignment_rebasevec_elem_op_rtc_node"; \
34857 break; \
34858
34864 #undef case_stmt
34865 default : return error_node();
34866 }
34867 }
34869 {
34871
34872 switch (operation)
34873 {
34874 #define case_stmt(op0, op1) \
34875 case op0 : result = node_allocator_-> \
34876 template allocate_rrr<typename details::assignment_rebasevec_celem_op_rtc_node<Type,op1<Type> > > \
34877 (operation, branch[0], branch[1]); \
34878 node_name = "assignment_rebasevec_celem_op_rtc_node"; \
34879 break; \
34880
34886 #undef case_stmt
34887 default : return error_node();
34888 }
34889 }
34890 else if (details::is_vector_node(branch[0]))
34891 {
34893
34895 {
34896 switch (operation)
34897 {
34898 #define case_stmt(op0, op1) \
34899 case op0 : result = node_allocator_-> \
34900 template allocate_rrr<typename details::assignment_vecvec_op_node<Type,op1<Type> > > \
34901 (operation, branch[0], branch[1]); \
34902 node_name = "assignment_rebasevec_celem_op_node"; \
34903 break; \
34904
34910 #undef case_stmt
34911 default : return error_node();
34912 }
34913 }
34914 else
34915 {
34916 switch (operation)
34917 {
34918 #define case_stmt(op0, op1) \
34919 case op0 : result = node_allocator_-> \
34920 template allocate_rrr<typename details::assignment_vec_op_node<Type,op1<Type> > > \
34921 (operation, branch[0], branch[1]); \
34922 node_name = "assignment_vec_op_node"; \
34923 break; \
34924
34930 #undef case_stmt
34931 default : return error_node();
34932 }
34933 }
34934 }
34935 #ifndef exprtk_disable_string_capabilities
34936 else if (
34939 )
34940 {
34942
34944
34946 node_name = "assignment_string_node<T,details::asn_addassignment>";
34947 }
34948 #endif
34949 else
34950 {
34953 parser_->current_state().token,
34954 "ERR278 - Invalid branches for assignment operator '" + details::to_str(operation) + "'",
34956
34957 return error_node();
34958 }
34959
34960 if (result && result->valid())
34961 {
34962 return result;
34963 }
34964
34967 token_t(),
34968 "ERR279 - Failed to synthesize node: " + node_name,
34970
34972 return error_node();
34973 }

References assign_immutable_symbol(), case_stmt, exprtk::details::e_addass, exprtk::details::e_divass, exprtk::details::e_modass, exprtk::details::e_mulass, exprtk::parser< T >::e_st_string, exprtk::parser< T >::e_st_variable, exprtk::parser< T >::e_st_vecelem, exprtk::parser< T >::e_st_vector, exprtk::details::e_subass, exprtk::parser_error::e_syntax, exprtk::parser_error::e_synthesis, exprtk::parser< T >::error_node(), exprtk_error_location, exprtk::details::free_node(), exprtk::details::is_ivector_node(), exprtk::details::is_rebasevector_celem_node(), exprtk::details::is_rebasevector_celem_rtc_node(), exprtk::details::is_rebasevector_elem_node(), exprtk::details::is_rebasevector_elem_rtc_node(), exprtk::details::is_string_node(), exprtk::details::is_variable_node(), exprtk::details::is_vector_celem_rtc_node(), exprtk::details::is_vector_elem_node(), exprtk::details::is_vector_elem_rtc_node(), exprtk::details::is_vector_node(), lodge_assignment(), exprtk::parser_error::make_error(), node_allocator_, parser_, synthesize_expression(), exprtk::details::to_str(), and exprtk::details::expression_node< T >::valid().

Referenced by operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ synthesize_csocs_expression()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::synthesize_csocs_expression ( const details::operator_type & opr,
expression_node_ptr(&) branch[2] )
inlineprivate

Definition at line 41412 of file exprtk.hpp.

41413 {
41414 const std::string s0 = static_cast<details::string_literal_node<Type>*>(branch[0])->str();
41415 const std::string s1 = static_cast<details::string_literal_node<Type>*>(branch[1])->str();
41416
41418
41419 if (details::e_add == opr)
41421 else if (details::e_in == opr)
41423 else if (details::e_like == opr)
41425 else if (details::e_ilike == opr)
41427 else
41428 {
41430
41431 const Type v = temp->value();
41432
41434
41435 result = node_allocator_->allocate<literal_node_t>(v);
41436 }
41437
41439
41440 return result;
41441 }
expression_node_ptr synthesize_sos_expression_impl(const details::operator_type &opr, T0 s0, T1 s1)
Definition exprtk.hpp:41271
static T process(const T &, const T &)
Definition exprtk.hpp:16007

References exprtk::details::e_add, exprtk::details::e_ilike, exprtk::details::e_in, exprtk::details::e_like, exprtk::parser< T >::error_node(), exprtk::details::free_all_nodes(), exprtk::details::free_node(), node_allocator_, exprtk::details::ilike_op< T >::process(), exprtk::details::in_op< T >::process(), exprtk::details::like_op< T >::process(), synthesize_sos_expression_impl(), and exprtk::details::expression_node< T >::value().

Referenced by synthesize_string_expression().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ synthesize_csocsr_expression()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::synthesize_csocsr_expression ( const details::operator_type & opr,
expression_node_ptr(&) branch[2] )
inlineprivate

Definition at line 41443 of file exprtk.hpp.

41444 {
41445 const std::string s0 = static_cast<details::string_literal_node<Type>* >(branch[0])->str ();
41448
41449 static_cast<details::const_string_range_node<Type>*>(branch[1])->range_ref().clear();
41450
41453
41455 }
expression_node_ptr synthesize_str_xoxr_expression_impl(const details::operator_type &opr, T0 s0, T1 s1, range_t rp1)
Definition exprtk.hpp:41235

References exprtk::details::free_node(), node_allocator_, and synthesize_str_xoxr_expression_impl().

Referenced by synthesize_string_expression().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ synthesize_csos_expression()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::synthesize_csos_expression ( const details::operator_type & opr,
expression_node_ptr(&) branch[2] )
inlineprivate

Definition at line 41358 of file exprtk.hpp.

References exprtk::details::free_node(), node_allocator_, and synthesize_sos_expression_impl().

Referenced by synthesize_string_expression().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ synthesize_csosr_expression()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::synthesize_csosr_expression ( const details::operator_type & opr,
expression_node_ptr(&) branch[2] )
inlineprivate

Definition at line 41368 of file exprtk.hpp.

References exprtk::details::free_node(), node_allocator_, and synthesize_str_xoxr_expression_impl().

Referenced by synthesize_string_expression().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ synthesize_csrocs_expression()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::synthesize_csrocs_expression ( const details::operator_type & opr,
expression_node_ptr(&) branch[2] )
inlineprivate

Definition at line 41486 of file exprtk.hpp.

41487 {
41488 const std::string s0 = static_cast<details::const_string_range_node<Type>*>(branch[0])->str ();
41489 const std::string s1 = static_cast<details::string_literal_node<Type>* >(branch[1])->str ();
41490 const range_t rp0 = static_cast<details::const_string_range_node<Type>*>(branch[0])->range();
41491
41492 static_cast<details::const_string_range_node<Type>*>(branch[0])->range_ref().clear();
41493
41495
41497 }
expression_node_ptr synthesize_str_xrox_expression_impl(const details::operator_type &opr, T0 s0, T1 s1, range_t rp0)
Definition exprtk.hpp:41217

References exprtk::details::free_all_nodes(), node_allocator_, and synthesize_str_xrox_expression_impl().

Referenced by synthesize_string_expression().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ synthesize_csrocsr_expression()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::synthesize_csrocsr_expression ( const details::operator_type & opr,
expression_node_ptr(&) branch[2] )
inlineprivate

Definition at line 41499 of file exprtk.hpp.

41500 {
41501 const std::string s0 = static_cast<details::const_string_range_node<Type>*>(branch[0])->str ();
41502 const std::string s1 = static_cast<details::const_string_range_node<Type>*>(branch[1])->str ();
41503 const range_t rp0 = static_cast<details::const_string_range_node<Type>*>(branch[0])->range();
41504 const range_t rp1 = static_cast<details::const_string_range_node<Type>*>(branch[1])->range();
41505
41506 static_cast<details::const_string_range_node<Type>*>(branch[0])->range_ref().clear();
41507 static_cast<details::const_string_range_node<Type>*>(branch[1])->range_ref().clear();
41508
41510
41512 }
expression_node_ptr synthesize_str_xroxr_expression_impl(const details::operator_type &opr, T0 s0, T1 s1, range_t rp0, range_t rp1)
Definition exprtk.hpp:41253

References exprtk::details::free_all_nodes(), node_allocator_, and synthesize_str_xroxr_expression_impl().

Referenced by synthesize_string_expression().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ synthesize_csros_expression()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::synthesize_csros_expression ( const details::operator_type & opr,
expression_node_ptr(&) branch[2] )
inlineprivate

Definition at line 41457 of file exprtk.hpp.

References exprtk::details::free_node(), node_allocator_, and synthesize_str_xrox_expression_impl().

Referenced by synthesize_string_expression().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ synthesize_csrosr_expression()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::synthesize_csrosr_expression ( const details::operator_type & opr,
expression_node_ptr(&) branch[2] )
inlineprivate

Definition at line 41470 of file exprtk.hpp.

41471 {
41472 const std::string s0 = static_cast<details::const_string_range_node<Type>*>(branch[0])->str ();
41473 std::string& s1 = static_cast<details::string_range_node<Type>* >(branch[1])->ref ();
41474 const range_t rp0 = static_cast<details::const_string_range_node<Type>*>(branch[0])->range();
41475 const range_t rp1 = static_cast<details::string_range_node<Type>* >(branch[1])->range();
41476
41477 static_cast<details::const_string_range_node<Type>*>(branch[0])->range_ref().clear();
41478 static_cast<details::string_range_node<Type>*> (branch[1])->range_ref().clear();
41479
41482
41484 }

References exprtk::details::free_node(), node_allocator_, and synthesize_str_xroxr_expression_impl().

Referenced by synthesize_string_expression().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ synthesize_expression() [1/3]

template<typename T>
template<typename Type>
bool exprtk::parser< T >::expression_generator< Type >::synthesize_expression ( const details::operator_type & operation,
expression_node_ptr(&) branch[2],
expression_node_ptr & result )
inlineprivate

Definition at line 36336 of file exprtk.hpp.

36339 {
36340 result = error_node();
36341
36343 return false;
36344
36346
36348
36349 if (synthesize_map_.end() != itr)
36350 {
36351 result = itr->second((*this), operation, branch);
36352
36353 return true;
36354 }
36355 else
36356 return false;
36357 }

References branch_to_id(), exprtk::parser< T >::error_node(), operation_optimisable(), and synthesize_map_.

Referenced by function(), operator()(), operator()(), operator()(), operator()(), synthesize_assignment_expression(), synthesize_assignment_operation_expression(), synthesize_shortcircuit_expression(), and synthesize_string_expression().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ synthesize_expression() [2/3]

template<typename T>
template<typename Type>
template<typename NodeType, std::size_t N>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::synthesize_expression ( const details::operator_type & operation,
expression_node_ptr(&) branch[N] )
inlineprivate

Definition at line 41836 of file exprtk.hpp.

41837 {
41838 if (
41839 (details::e_in == operation) ||
41842 )
41843 {
41845
41846 return error_node();
41847 }
41849 {
41851
41852 return error_node();
41853 }
41854 else if ((details::e_default != operation))
41855 {
41856 // Attempt simple constant folding optimisation.
41858
41860 {
41861 const Type v = expression_point->value();
41863
41864 return node_allocator_->allocate<literal_node_t>(v);
41865 }
41866
41867 if (expression_point && expression_point->valid())
41868 {
41869 return expression_point;
41870 }
41871
41874 token_t(),
41875 "ERR283 - Failed to synthesize node: NodeType",
41877
41879 }
41880
41881 return error_node();
41882 }

References exprtk::details::all_nodes_valid(), exprtk::details::e_default, exprtk::details::e_ilike, exprtk::details::e_in, exprtk::details::e_like, exprtk::parser_error::e_parser, exprtk::parser< T >::error_node(), exprtk_error_location, exprtk::details::free_node(), is_constant_foldable(), exprtk::parser_error::make_error(), node_allocator_, parser_, exprtk::details::expression_node< T >::valid(), and exprtk::details::expression_node< T >::value().

Here is the call graph for this function:

◆ synthesize_expression() [3/3]

template<typename T>
template<typename Type>
template<typename NodeType, std::size_t N>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::synthesize_expression ( F * f,
expression_node_ptr(&) branch[N] )
inlineprivate

Definition at line 41885 of file exprtk.hpp.

41886 {
41888 {
41890
41891 return error_node();
41892 }
41893
41895
41896 // Attempt simple constant folding optimisation.
41897
41900
41901 if (0 == func_node_ptr)
41902 {
41904
41905 return error_node();
41906 }
41907 else
41908 func_node_ptr->init_branches(branch);
41909
41910 if (is_constant_foldable<N>(branch) && !f->has_side_effects())
41911 {
41912 Type v = expression_point->value();
41914
41915 return node_allocator_->allocate<literal_node_t>(v);
41916 }
41917
41918 parser_->state_.activate_side_effect("synthesize_expression(function<NT,N>)");
41919
41920 return expression_point;
41921 }

References exprtk::details::all_nodes_valid(), exprtk::parser< T >::error_node(), exprtk::details::free_node(), exprtk::function_traits::has_side_effects(), is_constant_foldable(), node_allocator_, parser_, and exprtk::details::expression_node< T >::value().

Here is the call graph for this function:

◆ synthesize_null_expression()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::synthesize_null_expression ( const details::operator_type & operation,
expression_node_ptr(&) branch[2] )
inlineprivate

Definition at line 41739 of file exprtk.hpp.

41740 {
41741 /*
41742 Note: The following are the type promotion rules
41743 that relate to operations that include 'null':
41744 0. null ==/!= null --> true false
41745 1. null operation null --> null
41746 2. x ==/!= null --> true/false
41747 3. null ==/!= x --> true/false
41748 4. x operation null --> x
41749 5. null operation x --> x
41750 */
41751
41752 typedef typename details::null_eq_node<T> nulleq_node_t;
41753
41754 const bool b0_null = details::is_null_node(branch[0]);
41755 const bool b1_null = details::is_null_node(branch[1]);
41756
41757 if (b0_null && b1_null)
41758 {
41760
41761 if (details::e_eq == operation)
41762 result = node_allocator_->allocate_c<literal_node_t>(T(1));
41763 else if (details::e_ne == operation)
41764 result = node_allocator_->allocate_c<literal_node_t>(T(0));
41765
41766 if (result)
41767 {
41770
41771 return result;
41772 }
41773
41775
41776 return branch[0];
41777 }
41778 else if (details::e_eq == operation)
41779 {
41782
41784
41785 return result;
41786 }
41787 else if (details::e_ne == operation)
41788 {
41791
41793
41794 return result;
41795 }
41796 else if (b0_null)
41797 {
41799 branch[0] = branch[1];
41800 branch[1] = error_node();
41801 }
41802 else if (b1_null)
41803 {
41805 branch[1] = error_node();
41806 }
41807
41808 if (
41812 )
41813 {
41814 return branch[0];
41815 }
41816
41818
41819 if (
41827 )
41828 {
41829 return node_allocator_->allocate_c<literal_node_t>(T(0));
41830 }
41831
41832 return node_allocator_->allocate<details::null_node<Type> >();
41833 }
bool is_null_node(const expression_node< T > *node)
Definition exprtk.hpp:5957

References exprtk::details::e_add, exprtk::details::e_and, exprtk::details::e_div, exprtk::details::e_eq, exprtk::details::e_gt, exprtk::details::e_gte, exprtk::details::e_ilike, exprtk::details::e_in, exprtk::details::e_like, exprtk::details::e_lt, exprtk::details::e_lte, exprtk::details::e_mod, exprtk::details::e_mul, exprtk::details::e_nand, exprtk::details::e_ne, exprtk::details::e_nor, exprtk::details::e_or, exprtk::details::e_pow, exprtk::details::e_sub, exprtk::details::e_xnor, exprtk::details::e_xor, exprtk::parser< T >::error_node(), exprtk::details::free_node(), exprtk::details::is_null_node(), and node_allocator_.

Referenced by operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ synthesize_shortcircuit_expression()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::synthesize_shortcircuit_expression ( const details::operator_type & operation,
expression_node_ptr(&) branch[2] )
inlineprivate

Definition at line 35235 of file exprtk.hpp.

35236 {
35238
35240 {
35241 if (
35243 std::equal_to<T>()(T(0),branch[0]->value())
35244 )
35245 result = node_allocator_->allocate_c<literal_node_t>(T(0));
35246 else if (
35249 )
35250 result = node_allocator_->allocate_c<literal_node_t>(T(1));
35251 }
35252
35253 if (details::is_constant_node(branch[1]) && (0 == result))
35254 {
35255 if (
35257 std::equal_to<T>()(T(0),branch[1]->value())
35258 )
35259 result = node_allocator_->allocate_c<literal_node_t>(T(0));
35260 else if (
35263 )
35264 result = node_allocator_->allocate_c<literal_node_t>(T(1));
35265 }
35266
35267 if (result)
35268 {
35271
35272 return result;
35273 }
35274 else if (details::e_scand == operation)
35275 {
35277 }
35278 else if (details::e_scor == operation)
35279 {
35281 }
35282 else
35283 return error_node();
35284 }

References exprtk::details::e_scand, exprtk::details::e_scor, exprtk::parser< T >::error_node(), exprtk::details::free_node(), exprtk::details::is_constant_node(), node_allocator_, and synthesize_expression().

Referenced by operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ synthesize_socs_expression()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::synthesize_socs_expression ( const details::operator_type & opr,
expression_node_ptr(&) branch[2] )
inlineprivate

Definition at line 41348 of file exprtk.hpp.

References exprtk::details::free_node(), node_allocator_, and synthesize_sos_expression_impl().

Referenced by synthesize_string_expression().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ synthesize_socsr_expression()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::synthesize_socsr_expression ( const details::operator_type & opr,
expression_node_ptr(&) branch[2] )
inlineprivate

Definition at line 41319 of file exprtk.hpp.

References exprtk::details::free_node(), node_allocator_, and synthesize_str_xoxr_expression_impl().

Referenced by synthesize_string_expression().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ synthesize_sos_expression()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::synthesize_sos_expression ( const details::operator_type & opr,
expression_node_ptr(&) branch[2] )
inlineprivate

Definition at line 41285 of file exprtk.hpp.

41286 {
41287 std::string& s0 = static_cast<details::stringvar_node<Type>*>(branch[0])->ref();
41288 std::string& s1 = static_cast<details::stringvar_node<Type>*>(branch[1])->ref();
41289
41291 }

References synthesize_sos_expression_impl().

Referenced by synthesize_string_expression().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ synthesize_sos_expression_impl()

template<typename T>
template<typename Type>
template<typename T0, typename T1>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::synthesize_sos_expression_impl ( const details::operator_type & opr,
T0 s0,
T1 s1 )
inlineprivate

Definition at line 41271 of file exprtk.hpp.

41272 {
41273 switch (opr)
41274 {
41275 #define case_stmt(op0, op1) \
41276 case op0 : return node_allocator_-> \
41277 allocate_tt<typename details::sos_node<Type,T0,T1,op1<Type> >,T0,T1>(s0, s1); \
41278
41280 #undef case_stmt
41281 default : return error_node();
41282 }
41283 }

References exprtk::parser< T >::error_node(), and string_opr_switch_statements.

Referenced by synthesize_csocs_expression(), synthesize_csos_expression(), synthesize_socs_expression(), and synthesize_sos_expression().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ synthesize_sosr_expression()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::synthesize_sosr_expression ( const details::operator_type & opr,
expression_node_ptr(&) branch[2] )
inlineprivate

Definition at line 41306 of file exprtk.hpp.

41307 {
41308 std::string& s0 = static_cast<details::stringvar_node<Type>*> (branch[0])->ref ();
41309 std::string& s1 = static_cast<details::string_range_node<Type>*>(branch[1])->ref ();
41311
41312 static_cast<details::string_range_node<Type>*>(branch[1])->range_ref().clear();
41313
41315
41317 }

References exprtk::details::free_node(), node_allocator_, and synthesize_str_xoxr_expression_impl().

Referenced by synthesize_string_expression().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ synthesize_srocs_expression()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::synthesize_srocs_expression ( const details::operator_type & opr,
expression_node_ptr(&) branch[2] )
inlineprivate

Definition at line 41382 of file exprtk.hpp.

References exprtk::details::free_node(), node_allocator_, and synthesize_str_xrox_expression_impl().

Referenced by synthesize_string_expression().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ synthesize_srocsr_expression()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::synthesize_srocsr_expression ( const details::operator_type & opr,
expression_node_ptr(&) branch[2] )
inlineprivate

Definition at line 41396 of file exprtk.hpp.

References exprtk::details::free_node(), node_allocator_, and synthesize_str_xroxr_expression_impl().

Referenced by synthesize_string_expression().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ synthesize_sros_expression()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::synthesize_sros_expression ( const details::operator_type & opr,
expression_node_ptr(&) branch[2] )
inlineprivate

Definition at line 41293 of file exprtk.hpp.

41294 {
41295 std::string& s0 = static_cast<details::string_range_node<Type>*>(branch[0])->ref ();
41296 std::string& s1 = static_cast<details::stringvar_node<Type>*> (branch[1])->ref ();
41298
41299 static_cast<details::string_range_node<Type>*>(branch[0])->range_ref().clear();
41300
41302
41304 }

References exprtk::details::free_node(), node_allocator_, and synthesize_str_xrox_expression_impl().

Referenced by synthesize_string_expression().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ synthesize_srosr_expression()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::synthesize_srosr_expression ( const details::operator_type & opr,
expression_node_ptr(&) branch[2] )
inlineprivate

Definition at line 41332 of file exprtk.hpp.

41333 {
41334 std::string& s0 = static_cast<details::string_range_node<Type>*>(branch[0])->ref ();
41335 std::string& s1 = static_cast<details::string_range_node<Type>*>(branch[1])->ref ();
41338
41339 static_cast<details::string_range_node<Type>*>(branch[0])->range_ref().clear();
41340 static_cast<details::string_range_node<Type>*>(branch[1])->range_ref().clear();
41341
41344
41346 }

References exprtk::details::free_node(), node_allocator_, and synthesize_str_xroxr_expression_impl().

Referenced by synthesize_string_expression().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ synthesize_str_xoxr_expression_impl()

template<typename T>
template<typename Type>
template<typename T0, typename T1>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::synthesize_str_xoxr_expression_impl ( const details::operator_type & opr,
T0 s0,
T1 s1,
range_t rp1 )
inlineprivate

Definition at line 41235 of file exprtk.hpp.

41238 {
41239 switch (opr)
41240 {
41241 #define case_stmt(op0, op1) \
41242 case op0 : return node_allocator_-> \
41243 allocate_ttt<typename details::str_xoxr_node<Type,T0,T1,range_t,op1<Type> >,T0,T1> \
41244 (s0, s1, rp1); \
41245
41247 #undef case_stmt
41248 default : return error_node();
41249 }
41250 }

References exprtk::parser< T >::error_node(), and string_opr_switch_statements.

Referenced by synthesize_csocsr_expression(), synthesize_csosr_expression(), synthesize_socsr_expression(), and synthesize_sosr_expression().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ synthesize_str_xrox_expression_impl()

template<typename T>
template<typename Type>
template<typename T0, typename T1>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::synthesize_str_xrox_expression_impl ( const details::operator_type & opr,
T0 s0,
T1 s1,
range_t rp0 )
inlineprivate

Definition at line 41217 of file exprtk.hpp.

41220 {
41221 switch (opr)
41222 {
41223 #define case_stmt(op0, op1) \
41224 case op0 : return node_allocator_-> \
41225 allocate_ttt<typename details::str_xrox_node<Type,T0,T1,range_t,op1<Type> >,T0,T1> \
41226 (s0, s1, rp0); \
41227
41229 #undef case_stmt
41230 default : return error_node();
41231 }
41232 }

References exprtk::parser< T >::error_node(), and string_opr_switch_statements.

Referenced by synthesize_csrocs_expression(), synthesize_csros_expression(), synthesize_srocs_expression(), and synthesize_sros_expression().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ synthesize_str_xroxr_expression_impl()

template<typename T>
template<typename Type>
template<typename T0, typename T1>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::synthesize_str_xroxr_expression_impl ( const details::operator_type & opr,
T0 s0,
T1 s1,
range_t rp0,
range_t rp1 )
inlineprivate

Definition at line 41253 of file exprtk.hpp.

41256 {
41257 switch (opr)
41258 {
41259 #define case_stmt(op0, op1) \
41260 case op0 : return node_allocator_-> \
41261 allocate_tttt<typename details::str_xroxr_node<Type,T0,T1,range_t,op1<Type> >,T0,T1> \
41262 (s0, s1, rp0, rp1); \
41263
41265 #undef case_stmt
41266 default : return error_node();
41267 }
41268 }

References exprtk::parser< T >::error_node(), and string_opr_switch_statements.

Referenced by synthesize_csrocsr_expression(), synthesize_csrosr_expression(), synthesize_srocsr_expression(), and synthesize_srosr_expression().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ synthesize_string_expression() [1/2]

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::synthesize_string_expression ( const details::operator_type & opr,
expression_node_ptr(&) branch[2] )
inlineprivate

Definition at line 41533 of file exprtk.hpp.

41534 {
41535 if ((0 == branch[0]) || (0 == branch[1]))
41536 {
41538
41539 return error_node();
41540 }
41541
41542 const bool b0_is_s = details::is_string_node (branch[0]);
41546
41547 const bool b1_is_s = details::is_string_node (branch[1]);
41551
41559
41567
41568 if (details::e_add == opr)
41569 {
41570 if (!b0_is_cs || !b1_is_cs)
41571 {
41573 }
41574 }
41575
41576 if (b0_is_gen || b1_is_gen)
41577 {
41579 }
41580 else if (b0_is_s)
41581 {
41583 else if (b1_is_cs ) return synthesize_socs_expression (opr,branch);
41584 else if (b1_is_sr ) return synthesize_sosr_expression (opr,branch);
41586 }
41587 else if (b0_is_cs)
41588 {
41590 else if (b1_is_cs ) return synthesize_csocs_expression (opr,branch);
41591 else if (b1_is_sr ) return synthesize_csosr_expression (opr,branch);
41593 }
41594 else if (b0_is_sr)
41595 {
41597 else if (b1_is_sr ) return synthesize_srosr_expression (opr,branch);
41598 else if (b1_is_cs ) return synthesize_srocs_expression (opr,branch);
41600 }
41601 else if (b0_is_csr)
41602 {
41604 else if (b1_is_sr ) return synthesize_csrosr_expression (opr,branch);
41605 else if (b1_is_cs ) return synthesize_csrocs_expression (opr,branch);
41607 }
41608
41609 return error_node();
41610 }
expression_node_ptr synthesize_sosr_expression(const details::operator_type &opr, expression_node_ptr(&branch)[2])
Definition exprtk.hpp:41306
expression_node_ptr synthesize_srosr_expression(const details::operator_type &opr, expression_node_ptr(&branch)[2])
Definition exprtk.hpp:41332
expression_node_ptr synthesize_csros_expression(const details::operator_type &opr, expression_node_ptr(&branch)[2])
Definition exprtk.hpp:41457
expression_node_ptr synthesize_csosr_expression(const details::operator_type &opr, expression_node_ptr(&branch)[2])
Definition exprtk.hpp:41368
expression_node_ptr synthesize_csocs_expression(const details::operator_type &opr, expression_node_ptr(&branch)[2])
Definition exprtk.hpp:41412
expression_node_ptr synthesize_srocs_expression(const details::operator_type &opr, expression_node_ptr(&branch)[2])
Definition exprtk.hpp:41382
expression_node_ptr synthesize_csos_expression(const details::operator_type &opr, expression_node_ptr(&branch)[2])
Definition exprtk.hpp:41358
expression_node_ptr synthesize_srocsr_expression(const details::operator_type &opr, expression_node_ptr(&branch)[2])
Definition exprtk.hpp:41396
expression_node_ptr synthesize_sros_expression(const details::operator_type &opr, expression_node_ptr(&branch)[2])
Definition exprtk.hpp:41293
expression_node_ptr synthesize_csocsr_expression(const details::operator_type &opr, expression_node_ptr(&branch)[2])
Definition exprtk.hpp:41443
expression_node_ptr synthesize_csrocs_expression(const details::operator_type &opr, expression_node_ptr(&branch)[2])
Definition exprtk.hpp:41486
expression_node_ptr synthesize_socsr_expression(const details::operator_type &opr, expression_node_ptr(&branch)[2])
Definition exprtk.hpp:41319
expression_node_ptr synthesize_csrocsr_expression(const details::operator_type &opr, expression_node_ptr(&branch)[2])
Definition exprtk.hpp:41499
expression_node_ptr synthesize_strogen_expression(const details::operator_type &opr, expression_node_ptr(&branch)[2])
Definition exprtk.hpp:41514
expression_node_ptr synthesize_csrosr_expression(const details::operator_type &opr, expression_node_ptr(&branch)[2])
Definition exprtk.hpp:41470
expression_node_ptr synthesize_socs_expression(const details::operator_type &opr, expression_node_ptr(&branch)[2])
Definition exprtk.hpp:41348
expression_node_ptr synthesize_sos_expression(const details::operator_type &opr, expression_node_ptr(&branch)[2])
Definition exprtk.hpp:41285
bool is_string_ccondition_node(const expression_node< T > *node)
Definition exprtk.hpp:19246
bool is_string_assignment_node(const expression_node< T > *node)
Definition exprtk.hpp:19222
bool is_string_vararg_node(const expression_node< T > *node)
Definition exprtk.hpp:19252
bool is_string_node(const expression_node< T > *node)
Definition exprtk.hpp:19198
bool is_const_string_range_node(const expression_node< T > *node)
Definition exprtk.hpp:19216
bool is_string_condition_node(const expression_node< T > *node)
Definition exprtk.hpp:19240
bool is_string_function_node(const expression_node< T > *node)
Definition exprtk.hpp:19234
bool is_const_string_node(const expression_node< T > *node)
Definition exprtk.hpp:19210
bool is_genricstring_range_node(const expression_node< T > *node)
Definition exprtk.hpp:19258
bool is_string_concat_node(const expression_node< T > *node)
Definition exprtk.hpp:19228
bool is_string_range_node(const expression_node< T > *node)
Definition exprtk.hpp:19204

References exprtk::details::e_add, exprtk::parser< T >::error_node(), exprtk::details::free_all_nodes(), exprtk::details::is_const_string_node(), exprtk::details::is_const_string_range_node(), exprtk::details::is_genricstring_range_node(), exprtk::details::is_string_assignment_node(), exprtk::details::is_string_ccondition_node(), exprtk::details::is_string_concat_node(), exprtk::details::is_string_condition_node(), exprtk::details::is_string_function_node(), exprtk::details::is_string_node(), exprtk::details::is_string_range_node(), exprtk::details::is_string_vararg_node(), node_allocator_, synthesize_csocs_expression(), synthesize_csocsr_expression(), synthesize_csos_expression(), synthesize_csosr_expression(), synthesize_csrocs_expression(), synthesize_csrocsr_expression(), synthesize_csros_expression(), synthesize_csrosr_expression(), synthesize_expression(), synthesize_socs_expression(), synthesize_socsr_expression(), synthesize_sos_expression(), synthesize_sosr_expression(), synthesize_srocs_expression(), synthesize_srocsr_expression(), synthesize_sros_expression(), synthesize_srosr_expression(), and synthesize_strogen_expression().

Referenced by operator()(), and operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ synthesize_string_expression() [2/2]

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::synthesize_string_expression ( const details::operator_type & opr,
expression_node_ptr(&) branch[3] )
inlineprivate

Definition at line 41620 of file exprtk.hpp.

41621 {
41622 if (details::e_inrange != opr)
41623 return error_node();
41624 else if ((0 == branch[0]) || (0 == branch[1]) || (0 == branch[2]))
41625 {
41627
41628 return error_node();
41629 }
41630 else if (
41634 )
41635 {
41636 const std::string s0 = static_cast<details::string_literal_node<Type>*>(branch[0])->str();
41637 const std::string s1 = static_cast<details::string_literal_node<Type>*>(branch[1])->str();
41638 const std::string s2 = static_cast<details::string_literal_node<Type>*>(branch[2])->str();
41639
41640 const Type v = (((s0 <= s1) && (s1 <= s2)) ? Type(1) : Type(0));
41641
41643
41644 return node_allocator_->allocate_c<details::literal_node<Type> >(v);
41645 }
41646 else if (
41650 )
41651 {
41652 std::string& s0 = static_cast<details::stringvar_node<Type>*>(branch[0])->ref();
41653 std::string& s1 = static_cast<details::stringvar_node<Type>*>(branch[1])->ref();
41654 std::string& s2 = static_cast<details::stringvar_node<Type>*>(branch[2])->ref();
41655
41657
41658 return node_allocator_->allocate_type<inrange_t, std::string&, std::string&, std::string&>(s0, s1, s2);
41659 }
41660 else if (
41664 )
41665 {
41667 std::string& s1 = static_cast<details::stringvar_node<Type>* >(branch[1])->ref();
41669
41671
41674
41675 return node_allocator_->allocate_type<inrange_t, std::string, std::string&, std::string>(s0, s1, s2);
41676 }
41677 else if (
41681 )
41682 {
41683 std::string& s0 = static_cast<details::stringvar_node<Type>* >(branch[0])->ref();
41685 std::string& s2 = static_cast<details::stringvar_node<Type>* >(branch[2])->ref();
41686
41688
41690
41691 return node_allocator_->allocate_type<inrange_t, std::string&, std::string, std::string&>(s0, s1, s2);
41692 }
41693 else if (
41697 )
41698 {
41699 std::string& s0 = static_cast<details::stringvar_node<Type>* >(branch[0])->ref();
41700 std::string& s1 = static_cast<details::stringvar_node<Type>* >(branch[1])->ref();
41702
41704
41706
41707 return node_allocator_->allocate_type<inrange_t, std::string&, std::string&, std::string>(s0, s1, s2);
41708 }
41709 else if (
41713 )
41714 {
41716 std::string& s1 = static_cast<details::stringvar_node<Type>* >(branch[1])->ref();
41717 std::string& s2 = static_cast<details::stringvar_node<Type>* >(branch[2])->ref();
41718
41720
41722
41723 return node_allocator_->allocate_type<inrange_t, std::string, std::string&, std::string&>(s0, s1, s2);
41724 }
41725 else
41726 {
41728 return error_node();
41729 }
41730 }

References exprtk::details::e_inrange, exprtk::parser< T >::error_node(), exprtk::details::free_all_nodes(), exprtk::details::free_node(), exprtk::details::is_const_string_node(), exprtk::details::is_string_node(), and node_allocator_.

Here is the call graph for this function:

◆ synthesize_strogen_expression()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::synthesize_strogen_expression ( const details::operator_type & opr,
expression_node_ptr(&) branch[2] )
inlineprivate

Definition at line 41514 of file exprtk.hpp.

41515 {
41516 switch (opr)
41517 {
41518 #define case_stmt(op0, op1) \
41519 case op0 : return node_allocator_-> \
41520 allocate_ttt<typename details::str_sogens_node<Type,op1<Type> > > \
41521 (opr, branch[0], branch[1]); \
41522
41524 #undef case_stmt
41525 default : return error_node();
41526 }
41527 }

References exprtk::parser< T >::error_node(), and string_opr_switch_statements.

Referenced by synthesize_string_expression().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ synthesize_swap_expression()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::synthesize_swap_expression ( expression_node_ptr(&) branch[2])
inlineprivate

Definition at line 35153 of file exprtk.hpp.

35154 {
35157
35158 const bool v0_is_ivec = details::is_ivector_node (branch[0]);
35159 const bool v1_is_ivec = details::is_ivector_node (branch[1]);
35160
35161 #ifndef exprtk_disable_string_capabilities
35164 #endif
35165
35167 std::string node_name = "Unknown";
35168
35169 if (v0_is_ivar && v1_is_ivar)
35170 {
35172
35175
35176 if (
35177 (0 != (v0 = dynamic_cast<variable_node_ptr>(branch[0]))) &&
35178 (0 != (v1 = dynamic_cast<variable_node_ptr>(branch[1])))
35179 )
35180 {
35182 node_name = "swap_node";
35183 }
35184 else
35185 {
35187 node_name = "swap_generic_node";
35188 }
35189 }
35190 else if (v0_is_ivec && v1_is_ivec)
35191 {
35193 node_name = "swap_vecvec_node";
35194 }
35195 #ifndef exprtk_disable_string_capabilities
35196 else if (v0_is_str && v1_is_str)
35197 {
35199 {
35201 (branch[0], branch[1]);
35202 node_name = "swap_string_node";
35203 }
35204 else
35205 {
35207 (branch[0], branch[1]);
35208 node_name = "swap_genstrings_node";
35209 }
35210 }
35211 #endif
35212 else
35213 {
35214 parser_->set_synthesis_error("Only variables, strings, vectors or vector elements can be swapped");
35215 return error_node();
35216 }
35217
35218 if (result && result->valid())
35219 {
35220 parser_->state_.activate_side_effect("synthesize_swap_expression()");
35221 return result;
35222 }
35223
35226 token_t(),
35227 "ERR282 - Failed to synthesize node: " + node_name,
35229
35231 return error_node();
35232 }
bool is_ivector_node(const expression_node< T > *node)
Definition exprtk.hpp:5904
bool is_ivariable_node(const expression_node< T > *node)
Definition exprtk.hpp:5833

References exprtk::parser_error::e_synthesis, exprtk::parser< T >::error_node(), exprtk_error_location, exprtk::details::free_node(), exprtk::details::is_generally_string_node(), exprtk::details::is_ivariable_node(), exprtk::details::is_ivector_node(), exprtk::parser_error::make_error(), node_allocator_, parser_, and exprtk::details::expression_node< T >::valid().

Referenced by operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ synthesize_unary_expression()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::synthesize_unary_expression ( const details::operator_type & operation,
expression_node_ptr(&) branch[1] )
inline

Definition at line 33581 of file exprtk.hpp.

33583 {
33584 switch (operation)
33585 {
33586 #define case_stmt(op0, op1) \
33587 case op0 : return node_allocator_-> \
33588 allocate<typename details::unary_branch_node<Type,op1<Type> > >(branch[0]); \
33589
33591 #undef case_stmt
33592 default : return error_node();
33593 }
33594 }

References exprtk::parser< T >::error_node(), and unary_opr_switch_statements.

Referenced by operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ synthesize_uv_expression()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::synthesize_uv_expression ( const details::operator_type & operation,
expression_node_ptr(&) branch[1] )
inline

Definition at line 33548 of file exprtk.hpp.

33550 {
33551 T& v = static_cast<details::variable_node<T>*>(branch[0])->ref();
33552
33553 switch (operation)
33554 {
33555 #define case_stmt(op0, op1) \
33556 case op0 : return node_allocator_-> \
33557 allocate<typename details::unary_variable_node<Type,op1<Type> > >(v); \
33558
33560 #undef case_stmt
33561 default : return error_node();
33562 }
33563 }

References exprtk::parser< T >::error_node(), and unary_opr_switch_statements.

Referenced by operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ synthesize_uvec_expression()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::synthesize_uvec_expression ( const details::operator_type & operation,
expression_node_ptr(&) branch[1] )
inline

Definition at line 33565 of file exprtk.hpp.

33567 {
33568 switch (operation)
33569 {
33570 #define case_stmt(op0, op1) \
33571 case op0 : return node_allocator_-> \
33572 allocate<typename details::unary_vector_node<Type,op1<Type> > > \
33573 (operation, branch[0]); \
33574
33576 #undef case_stmt
33577 default : return error_node();
33578 }
33579 }

References exprtk::parser< T >::error_node(), and unary_opr_switch_statements.

Referenced by operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ synthesize_uvouv_expression()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::synthesize_uvouv_expression ( const details::operator_type & operation,
expression_node_ptr(&) branch[2] )
inlineprivate

Definition at line 41129 of file exprtk.hpp.

41130 {
41131 // Definition: uv o uv
41134 const Type& v0 = static_cast<details::uv_base_node<Type>*>(branch[0])->v();
41135 const Type& v1 = static_cast<details::uv_base_node<Type>*>(branch[1])->v();
41136 unary_functor_t u0 = reinterpret_cast<unary_functor_t> (0);
41137 unary_functor_t u1 = reinterpret_cast<unary_functor_t> (0);
41138 binary_functor_t f = reinterpret_cast<binary_functor_t>(0);
41139
41140 if (!valid_operator(o0,u0))
41141 return error_node();
41142 else if (!valid_operator(o1,u1))
41143 return error_node();
41144 else if (!valid_operator(operation,f))
41145 return error_node();
41146
41148
41149 if (
41150 (details::e_neg == o0) &&
41151 (details::e_neg == o1)
41152 )
41153 {
41154 switch (operation)
41155 {
41156 // (-v0 + -v1) --> -(v0 + v1)
41157 case details::e_add : result = (*this)(details::e_neg,
41159 allocate_rr<typename details::
41161 exprtk_debug(("(-v0 + -v1) --> -(v0 + v1)\n"));
41162 break;
41163
41164 // (-v0 - -v1) --> (v1 - v0)
41166 allocate_rr<typename details::
41168 exprtk_debug(("(-v0 - -v1) --> (v1 - v0)\n"));
41169 break;
41170
41171 // (-v0 * -v1) --> (v0 * v1)
41173 allocate_rr<typename details::
41175 exprtk_debug(("(-v0 * -v1) --> (v0 * v1)\n"));
41176 break;
41177
41178 // (-v0 / -v1) --> (v0 / v1)
41180 allocate_rr<typename details::
41182 exprtk_debug(("(-v0 / -v1) --> (v0 / v1)\n"));
41183 break;
41184
41185 default : break;
41186 }
41187 }
41188
41189 if (0 == result)
41190 {
41193 }
41194
41196 return result;
41197 }
bool valid_operator(const details::operator_type &operation, binary_functor_t &bop)
Definition exprtk.hpp:32002

References exprtk::details::e_add, exprtk::details::e_div, exprtk::details::e_mul, exprtk::details::e_neg, exprtk::details::e_sub, exprtk::parser< T >::error_node(), exprtk_debug, exprtk::details::free_all_nodes(), node_allocator_, and valid_operator().

Referenced by operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ synthesize_vecarithmetic_operation_expression()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::synthesize_vecarithmetic_operation_expression ( const details::operator_type & operation,
expression_node_ptr(&) branch[2] )
inlineprivate

Definition at line 35067 of file exprtk.hpp.

35069 {
35072
35073 #define vector_ops \
35074 case_stmt(details::e_add , details::add_op) \
35075 case_stmt(details::e_sub , details::sub_op) \
35076 case_stmt(details::e_mul , details::mul_op) \
35077 case_stmt(details::e_div , details::div_op) \
35078 case_stmt(details::e_mod , details::mod_op) \
35079
35081 std::string node_name = "Unknown";
35082
35083 if (is_b0_ivec && is_b1_ivec)
35084 {
35085 switch (operation)
35086 {
35087 #define case_stmt(op0, op1) \
35088 case op0 : result = node_allocator_-> \
35089 template allocate_rrr<typename details::vec_binop_vecvec_node<Type,op1<Type> > > \
35090 (operation, branch[0], branch[1]); \
35091 node_name = "vec_binop_vecvec_node"; \
35092 break; \
35093
35096 #undef case_stmt
35097 default : return error_node();
35098 }
35099 }
35100 else if (is_b0_ivec && !is_b1_ivec)
35101 {
35102 switch (operation)
35103 {
35104 #define case_stmt(op0, op1) \
35105 case op0 : result = node_allocator_-> \
35106 template allocate_rrr<typename details::vec_binop_vecval_node<Type,op1<Type> > > \
35107 (operation, branch[0], branch[1]); \
35108 node_name = "vec_binop_vecval_node(b0ivec,!b1ivec)"; \
35109 break; \
35110
35113 #undef case_stmt
35114 default : return error_node();
35115 }
35116 }
35117 else if (!is_b0_ivec && is_b1_ivec)
35118 {
35119 switch (operation)
35120 {
35121 #define case_stmt(op0, op1) \
35122 case op0 : result = node_allocator_-> \
35123 template allocate_rrr<typename details::vec_binop_valvec_node<Type,op1<Type> > > \
35124 (operation, branch[0], branch[1]); \
35125 node_name = "vec_binop_vecval_node(!b0ivec,b1ivec)"; \
35126 break; \
35127
35129 #undef case_stmt
35130 default : return error_node();
35131 }
35132 }
35133 else
35134 return error_node();
35135
35136 if (result && result->valid())
35137 {
35138 return result;
35139 }
35140
35143 token_t(),
35144 "ERR281 - Failed to synthesize node: " + node_name,
35146
35148 return error_node();
35149
35150 #undef vector_ops
35151 }

References case_stmt, exprtk::details::e_pow, exprtk::parser_error::e_synthesis, exprtk::parser< T >::error_node(), exprtk_error_location, exprtk::details::free_node(), exprtk::details::is_ivector_node(), exprtk::parser_error::make_error(), node_allocator_, parser_, exprtk::details::expression_node< T >::valid(), and vector_ops.

Referenced by operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ synthesize_veceqineqlogic_operation_expression()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::synthesize_veceqineqlogic_operation_expression ( const details::operator_type & operation,
expression_node_ptr(&) branch[2] )
inlineprivate

Definition at line 34975 of file exprtk.hpp.

34977 {
34980
34981 #define batch_eqineq_logic_case \
34982 case_stmt(details::e_lt , details::lt_op ) \
34983 case_stmt(details::e_lte , details::lte_op ) \
34984 case_stmt(details::e_gt , details::gt_op ) \
34985 case_stmt(details::e_gte , details::gte_op ) \
34986 case_stmt(details::e_eq , details::eq_op ) \
34987 case_stmt(details::e_ne , details::ne_op ) \
34988 case_stmt(details::e_equal , details::equal_op) \
34989 case_stmt(details::e_and , details::and_op ) \
34990 case_stmt(details::e_nand , details::nand_op ) \
34991 case_stmt(details::e_or , details::or_op ) \
34992 case_stmt(details::e_nor , details::nor_op ) \
34993 case_stmt(details::e_xor , details::xor_op ) \
34994 case_stmt(details::e_xnor , details::xnor_op ) \
34995
34997 std::string node_name = "Unknown";
34998
34999 if (is_b0_ivec && is_b1_ivec)
35000 {
35001 switch (operation)
35002 {
35003 #define case_stmt(op0, op1) \
35004 case op0 : result = node_allocator_-> \
35005 template allocate_rrr<typename details::vec_binop_vecvec_node<Type,op1<Type> > > \
35006 (operation, branch[0], branch[1]); \
35007 node_name = "vec_binop_vecvec_node"; \
35008 break; \
35009
35011 #undef case_stmt
35012 default : return error_node();
35013 }
35014 }
35015 else if (is_b0_ivec && !is_b1_ivec)
35016 {
35017 switch (operation)
35018 {
35019 #define case_stmt(op0, op1) \
35020 case op0 : result = node_allocator_-> \
35021 template allocate_rrr<typename details::vec_binop_vecval_node<Type,op1<Type> > > \
35022 (operation, branch[0], branch[1]); \
35023 node_name = "vec_binop_vecval_node"; \
35024 break; \
35025
35027 #undef case_stmt
35028 default : return error_node();
35029 }
35030 }
35031 else if (!is_b0_ivec && is_b1_ivec)
35032 {
35033 switch (operation)
35034 {
35035 #define case_stmt(op0, op1) \
35036 case op0 : result = node_allocator_-> \
35037 template allocate_rrr<typename details::vec_binop_valvec_node<Type,op1<Type> > > \
35038 (operation, branch[0], branch[1]); \
35039 node_name = "vec_binop_valvec_node"; \
35040 break; \
35041
35043 #undef case_stmt
35044 default : return error_node();
35045 }
35046 }
35047 else
35048 return error_node();
35049
35050 if (result && result->valid())
35051 {
35052 return result;
35053 }
35054
35057 token_t(),
35058 "ERR280 - Failed to synthesize node: " + node_name,
35060
35062 return error_node();
35063
35064 #undef batch_eqineq_logic_case
35065 }

References batch_eqineq_logic_case, exprtk::parser_error::e_synthesis, exprtk::parser< T >::error_node(), exprtk_error_location, exprtk::details::free_node(), exprtk::details::is_ivector_node(), exprtk::parser_error::make_error(), node_allocator_, parser_, and exprtk::details::expression_node< T >::valid().

Referenced by operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ to_str()

template<typename T>
template<typename Type>
std::string exprtk::parser< T >::expression_generator< Type >::to_str ( const details::operator_type & operation) const
inline

Definition at line 32219 of file exprtk.hpp.

32220 {
32221 switch (operation)
32222 {
32223 case details::e_add : return "+" ;
32224 case details::e_sub : return "-" ;
32225 case details::e_mul : return "*" ;
32226 case details::e_div : return "/" ;
32227 case details::e_mod : return "%" ;
32228 case details::e_pow : return "^" ;
32229 case details::e_lt : return "<" ;
32230 case details::e_lte : return "<=" ;
32231 case details::e_gt : return ">" ;
32232 case details::e_gte : return ">=" ;
32233 case details::e_eq : return "==" ;
32234 case details::e_ne : return "!=" ;
32235 case details::e_and : return "and" ;
32236 case details::e_nand : return "nand" ;
32237 case details::e_or : return "or" ;
32238 case details::e_nor : return "nor" ;
32239 case details::e_xor : return "xor" ;
32240 case details::e_xnor : return "xnor" ;
32241 default : return "UNKNOWN";
32242 }
32243 }

References exprtk::details::e_add, exprtk::details::e_and, exprtk::details::e_div, exprtk::details::e_eq, exprtk::details::e_gt, exprtk::details::e_gte, exprtk::details::e_lt, exprtk::details::e_lte, exprtk::details::e_mod, exprtk::details::e_mul, exprtk::details::e_nand, exprtk::details::e_ne, exprtk::details::e_nor, exprtk::details::e_or, exprtk::details::e_pow, exprtk::details::e_sub, exprtk::details::e_xnor, and exprtk::details::e_xor.

Referenced by exprtk::parser< T >::expression_generator< Type >::synthesize_sf4ext_expression::compile_left(), exprtk::parser< T >::expression_generator< Type >::synthesize_sf4ext_expression::compile_right(), exprtk::parser< T >::expression_generator< Type >::synthesize_cocov_expression1::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_covoc_expression0::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_covoc_expression1::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_covocov_expression0::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_covocov_expression1::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_covocov_expression2::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_covocov_expression3::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_covocov_expression4::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_covov_expression0::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_covov_expression1::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_covovoc_expression0::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_covovoc_expression1::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_covovoc_expression2::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_covovoc_expression3::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_covovoc_expression4::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_covovov_expression0::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_covovov_expression1::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_covovov_expression2::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_covovov_expression3::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_covovov_expression4::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_vococ_expression0::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_vococov_expression0::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_vococov_expression1::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_vococov_expression3::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocov_expression0::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocov_expression1::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocovoc_expression0::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocovoc_expression1::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocovoc_expression2::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocovoc_expression3::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocovoc_expression4::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocovov_expression0::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocovov_expression1::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocovov_expression2::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocovov_expression3::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocovov_expression4::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovoc_expression0::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovoc_expression1::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovocov_expression0::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovocov_expression1::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovocov_expression2::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovocov_expression3::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovocov_expression4::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovov_expression0::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovov_expression1::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovovoc_expression0::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovovoc_expression1::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovovoc_expression2::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovovoc_expression3::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovovoc_expression4::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovovov_expression0::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovovov_expression1::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovovov_expression2::id(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovovov_expression3::id(), and exprtk::parser< T >::expression_generator< Type >::synthesize_vovovov_expression4::id().

Here is the caller graph for this function:

◆ unary_optimisable()

template<typename T>
template<typename Type>
bool exprtk::parser< T >::expression_generator< Type >::unary_optimisable ( const details::operator_type & operation) const
inline

Definition at line 32061 of file exprtk.hpp.

References exprtk::details::e_abs, exprtk::details::e_acos, exprtk::details::e_acosh, exprtk::details::e_asin, exprtk::details::e_asinh, exprtk::details::e_atan, exprtk::details::e_atanh, exprtk::details::e_ceil, exprtk::details::e_cos, exprtk::details::e_cosh, exprtk::details::e_cot, exprtk::details::e_csc, exprtk::details::e_d2g, exprtk::details::e_d2r, exprtk::details::e_erf, exprtk::details::e_erfc, exprtk::details::e_exp, exprtk::details::e_expm1, exprtk::details::e_floor, exprtk::details::e_frac, exprtk::details::e_g2d, exprtk::details::e_log, exprtk::details::e_log10, exprtk::details::e_log1p, exprtk::details::e_log2, exprtk::details::e_ncdf, exprtk::details::e_neg, exprtk::details::e_notl, exprtk::details::e_pos, exprtk::details::e_r2d, exprtk::details::e_round, exprtk::details::e_sec, exprtk::details::e_sgn, exprtk::details::e_sin, exprtk::details::e_sinc, exprtk::details::e_sinh, exprtk::details::e_sqrt, exprtk::details::e_tan, exprtk::details::e_tanh, and exprtk::details::e_trunc.

Referenced by operator()().

Here is the caller graph for this function:

◆ uvouv_optimisable()

template<typename T>
template<typename Type>
bool exprtk::parser< T >::expression_generator< Type >::uvouv_optimisable ( const details::operator_type & operation,
expression_node_ptr(&) branch[2] ) const
inline

Definition at line 32390 of file exprtk.hpp.

32391 {
32393 return false;
32394 else
32395 return details::is_uv_node(branch[0]) &&
32397 }
bool is_uv_node(const expression_node< T > *node)
Definition exprtk.hpp:19192

References exprtk::details::is_uv_node(), and operation_optimisable().

Referenced by operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ valid_operator() [1/2]

template<typename T>
template<typename Type>
bool exprtk::parser< T >::expression_generator< Type >::valid_operator ( const details::operator_type & operation,
binary_functor_t & bop )
inline

Definition at line 32002 of file exprtk.hpp.

32003 {
32005
32006 if (binary_op_map_->end() == bop_itr)
32007 return false;
32008
32009 bop = bop_itr->second;
32010
32011 return true;
32012 }

References binary_op_map_.

Referenced by exprtk::parser< T >::expression_generator< Type >::synthesize_cocov_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covoc_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covoc_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covocov_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covocov_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covocov_expression2::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covocov_expression3::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covocov_expression4::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covov_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covov_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covovoc_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covovoc_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covovoc_expression2::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covovoc_expression3::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covovoc_expression4::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covovov_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covovov_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covovov_expression2::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covovov_expression3::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covovov_expression4::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vococ_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vococov_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vococov_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vococov_expression3::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocov_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocov_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocovoc_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocovoc_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocovoc_expression2::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocovoc_expression3::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocovoc_expression4::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocovov_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocovov_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocovov_expression2::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocovov_expression3::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocovov_expression4::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovoc_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovoc_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovocov_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovocov_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovocov_expression2::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovocov_expression3::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovocov_expression4::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovov_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovov_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovovoc_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovovoc_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovovoc_expression2::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovovoc_expression3::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovovoc_expression4::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovovov_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovovov_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovovov_expression2::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovovov_expression3::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovovov_expression4::process(), and synthesize_uvouv_expression().

Here is the caller graph for this function:

◆ valid_operator() [2/2]

template<typename T>
template<typename Type>
bool exprtk::parser< T >::expression_generator< Type >::valid_operator ( const details::operator_type & operation,
unary_functor_t & uop )
inline

Definition at line 32014 of file exprtk.hpp.

32015 {
32017
32018 if ((*unary_op_map_).end() == uop_itr)
32019 return false;
32020
32021 uop = uop_itr->second;
32022
32023 return true;
32024 }

References unary_op_map_.

◆ valid_string_operation()

template<typename T>
template<typename Type>
bool exprtk::parser< T >::expression_generator< Type >::valid_string_operation ( const details::operator_type & operation) const
inline

Definition at line 32196 of file exprtk.hpp.

32197 {
32198 return (details::e_add == operation) ||
32199 (details::e_lt == operation) ||
32201 (details::e_gt == operation) ||
32203 (details::e_eq == operation) ||
32204 (details::e_ne == operation) ||
32205 (details::e_in == operation) ||
32211 }

References exprtk::details::e_add, exprtk::details::e_addass, exprtk::details::e_assign, exprtk::details::e_eq, exprtk::details::e_gt, exprtk::details::e_gte, exprtk::details::e_ilike, exprtk::details::e_in, exprtk::details::e_like, exprtk::details::e_lt, exprtk::details::e_lte, exprtk::details::e_ne, and exprtk::details::e_swap.

Referenced by is_invalid_string_op(), and is_string_operation().

Here is the caller graph for this function:

◆ vararg_function()

template<typename T>
template<typename Type>
template<typename Allocator, template< typename, typename > class Sequence>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::vararg_function ( const details::operator_type & operation,
Sequence< expression_node_ptr, Allocator > & arg_list )
inline

Definition at line 33902 of file exprtk.hpp.

33904 {
33906 {
33908
33909 return error_node();
33910 }
33913 else if ((1 == arg_list.size()) && details::is_ivector_node(arg_list[0]))
33915 else if ((1 == arg_list.size()) && special_one_parameter_vararg(operation))
33916 return arg_list[0];
33917 else if (all_nodes_variables(arg_list))
33919
33920 #ifndef exprtk_disable_string_capabilities
33922 {
33925 if (result && result->valid())
33926 {
33927 return result;
33928 }
33929
33932 token_t(),
33933 "ERR264 - Failed to synthesize node: str_vararg_node<vararg_multi_op>",
33935
33937 }
33938 else
33939 #endif
33940 {
33942
33943 switch (operation)
33944 {
33945 #define case_stmt(op0, op1) \
33946 case op0 : result = node_allocator_-> \
33947 allocate<details::vararg_node<Type,op1<Type> > >(arg_list); \
33948 break; \
33949
33958 #undef case_stmt
33959 default : return error_node();
33960 }
33961
33962 if (result && result->valid())
33963 {
33964 return result;
33965 }
33966
33969 token_t(),
33970 "ERR265 - Failed to synthesize node: vararg_node",
33972
33974 }
33975
33976 return error_node();
33977 }
bool special_one_parameter_vararg(const details::operator_type &operation) const
Definition exprtk.hpp:33839
expression_node_ptr const_optimise_varargfunc(const details::operator_type &operation, Sequence< expression_node_ptr, Allocator > &arg_list)
Definition exprtk.hpp:33808
expression_node_ptr varnode_optimise_varargfunc(const details::operator_type &operation, Sequence< expression_node_ptr, Allocator > &arg_list)
Definition exprtk.hpp:33852
expression_node_ptr vectorize_func(const details::operator_type &operation, Sequence< expression_node_ptr, Allocator > &arg_list)
Definition exprtk.hpp:33876

References case_stmt, const_optimise_varargfunc(), exprtk::details::e_avg, exprtk::details::e_mand, exprtk::details::e_max, exprtk::details::e_min, exprtk::details::e_mor, exprtk::details::e_multi, exprtk::details::e_prod, exprtk::details::e_smulti, exprtk::details::e_sum, exprtk::parser_error::e_synthesis, exprtk::parser< T >::error_node(), exprtk_error_location, exprtk::details::free_all_nodes(), exprtk::details::free_node(), is_constant_foldable(), exprtk::details::is_ivector_node(), exprtk::parser_error::make_error(), node_allocator_, parser_, special_one_parameter_vararg(), exprtk::details::expression_node< T >::valid(), varnode_optimise_varargfunc(), and vectorize_func().

Here is the call graph for this function:

◆ vararg_function_call()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::vararg_function_call ( ivararg_function_t * vaf,
std::vector< expression_node_ptr > & arg_list )
inline

Definition at line 34039 of file exprtk.hpp.

34041 {
34043 {
34045
34046 return error_node();
34047 }
34048
34050
34052
34053 if (
34054 !arg_list.empty() &&
34055 !vaf->has_side_effects() &&
34057 )
34058 {
34059 const Type v = result->value();
34061 result = node_allocator_->allocate<literal_node_t>(v);
34062 }
34063
34064 parser_->state_.activate_side_effect("vararg_function_call()");
34065
34066 if (result && result->valid())
34067 {
34068 return result;
34069 }
34070
34073 token_t(),
34074 "ERR267 - Failed to synthesize node: vararg_function_node<ivararg_function_t>",
34076
34078 return error_node();
34079 }

References exprtk::parser_error::e_synthesis, exprtk::parser< T >::error_node(), exprtk_error_location, exprtk::details::free_all_nodes(), exprtk::details::free_node(), exprtk::function_traits::has_side_effects(), is_constant_foldable(), exprtk::parser_error::make_error(), node_allocator_, parser_, exprtk::details::expression_node< T >::valid(), and exprtk::details::expression_node< T >::value().

Here is the call graph for this function:

◆ varnode_optimise_sf3()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::varnode_optimise_sf3 ( const details::operator_type & operation,
expression_node_ptr(&) branch[3] )
inline

Definition at line 33634 of file exprtk.hpp.

33635 {
33637
33638 const Type& v0 = static_cast<variable_ptr>(branch[0])->ref();
33639 const Type& v1 = static_cast<variable_ptr>(branch[1])->ref();
33640 const Type& v2 = static_cast<variable_ptr>(branch[2])->ref();
33641
33642 switch (operation)
33643 {
33644 #define case_stmt(op) \
33645 case details::e_sf##op : return node_allocator_-> \
33646 allocate_rrr<details::sf3_var_node<Type,details::sf##op##_op<Type> > > \
33647 (v0, v1, v2); \
33648
33649 case_stmt(00) case_stmt(01) case_stmt(02) case_stmt(03)
33650 case_stmt(04) case_stmt(05) case_stmt(06) case_stmt(07)
33651 case_stmt(08) case_stmt(09) case_stmt(10) case_stmt(11)
33652 case_stmt(12) case_stmt(13) case_stmt(14) case_stmt(15)
33653 case_stmt(16) case_stmt(17) case_stmt(18) case_stmt(19)
33654 case_stmt(20) case_stmt(21) case_stmt(22) case_stmt(23)
33655 case_stmt(24) case_stmt(25) case_stmt(26) case_stmt(27)
33656 case_stmt(28) case_stmt(29) case_stmt(30) case_stmt(31)
33657 case_stmt(32) case_stmt(33) case_stmt(34) case_stmt(35)
33658 case_stmt(36) case_stmt(37) case_stmt(38) case_stmt(39)
33659 case_stmt(40) case_stmt(41) case_stmt(42) case_stmt(43)
33660 case_stmt(44) case_stmt(45) case_stmt(46) case_stmt(47)
33661 #undef case_stmt
33662 default : return error_node();
33663 }
33664 }

References case_stmt, and exprtk::parser< T >::error_node().

Referenced by special_function().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ varnode_optimise_sf4()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::varnode_optimise_sf4 ( const details::operator_type & operation,
expression_node_ptr(&) branch[4] )
inline

Definition at line 33739 of file exprtk.hpp.

33740 {
33742
33743 const Type& v0 = static_cast<variable_ptr>(branch[0])->ref();
33744 const Type& v1 = static_cast<variable_ptr>(branch[1])->ref();
33745 const Type& v2 = static_cast<variable_ptr>(branch[2])->ref();
33746 const Type& v3 = static_cast<variable_ptr>(branch[3])->ref();
33747
33748 switch (operation)
33749 {
33750 #define case_stmt(op) \
33751 case details::e_sf##op : return node_allocator_-> \
33752 allocate_rrrr<details::sf4_var_node<Type,details::sf##op##_op<Type> > > \
33753 (v0, v1, v2, v3); \
33754
33755 case_stmt(48) case_stmt(49) case_stmt(50) case_stmt(51)
33756 case_stmt(52) case_stmt(53) case_stmt(54) case_stmt(55)
33757 case_stmt(56) case_stmt(57) case_stmt(58) case_stmt(59)
33758 case_stmt(60) case_stmt(61) case_stmt(62) case_stmt(63)
33759 case_stmt(64) case_stmt(65) case_stmt(66) case_stmt(67)
33760 case_stmt(68) case_stmt(69) case_stmt(70) case_stmt(71)
33761 case_stmt(72) case_stmt(73) case_stmt(74) case_stmt(75)
33762 case_stmt(76) case_stmt(77) case_stmt(78) case_stmt(79)
33763 case_stmt(80) case_stmt(81) case_stmt(82) case_stmt(83)
33764 case_stmt(84) case_stmt(85) case_stmt(86) case_stmt(87)
33765 case_stmt(88) case_stmt(89) case_stmt(90) case_stmt(91)
33766 case_stmt(92) case_stmt(93) case_stmt(94) case_stmt(95)
33767 case_stmt(96) case_stmt(97) case_stmt(98) case_stmt(99)
33768 #undef case_stmt
33769 default : return error_node();
33770 }
33771 }

References case_stmt, and exprtk::parser< T >::error_node().

Referenced by special_function().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ varnode_optimise_varargfunc()

template<typename T>
template<typename Type>
template<typename Allocator, template< typename, typename > class Sequence>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::varnode_optimise_varargfunc ( const details::operator_type & operation,
Sequence< expression_node_ptr, Allocator > & arg_list )
inline

Definition at line 33852 of file exprtk.hpp.

33854 {
33855 switch (operation)
33856 {
33857 #define case_stmt(op0, op1) \
33858 case op0 : return node_allocator_-> \
33859 allocate<details::vararg_varnode<Type,op1<Type> > >(arg_list); \
33860
33869 #undef case_stmt
33870 default : return error_node();
33871 }
33872 }

References case_stmt, exprtk::details::e_avg, exprtk::details::e_mand, exprtk::details::e_max, exprtk::details::e_min, exprtk::details::e_mor, exprtk::details::e_multi, exprtk::details::e_prod, exprtk::details::e_sum, and exprtk::parser< T >::error_node().

Referenced by vararg_function().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vector_element()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::vector_element ( const std::string & symbol,
vector_holder_ptr vector_base,
expression_node_ptr vec_node,
expression_node_ptr index )
inline

Definition at line 34301 of file exprtk.hpp.

34305 {
34307 std::string node_name = "Unknown";
34308
34310 {
34311 const std::size_t vec_index = static_cast<std::size_t>(details::numeric::to_int64(index->value()));
34312
34314
34315 if (vec_index >= vector_base->size())
34316 {
34319 token_t(),
34320 "ERR271 - Index of " + details::to_str(vec_index) + " out of range for "
34321 "vector '" + symbol + "' of size " + details::to_str(vector_base->size()),
34323
34325
34326 return error_node();
34327 }
34328
34329 if (vector_base->rebaseable())
34330 {
34332
34333 result = (rtc) ?
34336
34337 node_name = (rtc) ?
34338 "rebasevector_elem_rtc_node_t" :
34339 "rebasevector_elem_node_t" ;
34340
34341 if (result && result->valid())
34342 {
34343 return result;
34344 }
34345
34348 token_t(),
34349 "ERR272 - Failed to synthesize node: " + node_name + " for vector: " + symbol,
34351
34353 return error_node();
34354 }
34356 {
34358
34359 result = (rtc) ?
34362
34363 node_name = (rtc) ?
34364 "vector_elem_rtc_node_t" :
34365 "vector_elem_node_t" ;
34366
34367 if (result && result->valid())
34368 {
34369 return result;
34370 }
34371
34374 token_t(),
34375 "ERR273 - Failed to synthesize node: " + node_name + " for vector: " + symbol,
34377
34379 return error_node();
34380 }
34381
34382 const scope_element& se = parser_->sem_.get_element(symbol,vec_index);
34383
34384 if (se.index == vec_index)
34385 {
34386 result = se.var_node;
34388 }
34389 else
34390 {
34392 nse.name = symbol;
34393 nse.active = true;
34394 nse.ref_count = 1;
34396 nse.index = vec_index;
34397 nse.depth = parser_->state_.scope_depth;
34398 nse.data = 0;
34399 nse.var_node = node_allocator_->allocate<variable_node_t>((*(*vector_base)[vec_index]));
34400
34401 if (!parser_->sem_.add_element(nse))
34402 {
34403 parser_->set_synthesis_error("Failed to add new local vector element to SEM [1]");
34404
34405 parser_->sem_.free_element(nse);
34406
34407 result = error_node();
34408 }
34409
34410 assert(parser_->sem_.total_local_symb_size_bytes() <= parser_->settings().max_total_local_symbol_size_bytes());
34411
34413
34414 exprtk_debug(("vector_element() - INFO - Added new local vector element: %s\n", nse.name.c_str()));
34415
34416 parser_->state_.activate_side_effect("vector_element()");
34417
34418 result = nse.var_node;
34419 node_name = "variable_node_t";
34420 }
34421 }
34422 else
34423 {
34425
34426 if (vector_base->rebaseable())
34427 {
34428 result = (rtc) ?
34431
34432 node_name = (rtc) ?
34433 "rebasevector_elem_rtc_node_t" :
34434 "rebasevector_elem_node_t" ;
34435 }
34436 else
34437 {
34438 result = rtc ?
34441
34442 node_name = (rtc) ?
34443 "vector_elem_rtc_node_t" :
34444 "vector_elem_node_t" ;
34445 }
34446 }
34447
34448 if (result && result->valid())
34449 {
34450 return result;
34451 }
34452
34455 token_t(),
34456 "ERR274 - Failed to synthesize node: " + node_name,
34458
34460 return error_node();
34461 }
vector_access_runtime_check_ptr get_vector_access_runtime_check() const
Definition exprtk.hpp:33038
_int64_t to_int64(const T v)
Definition exprtk.hpp:1512

References exprtk::parser< T >::scope_element::active, exprtk::parser< T >::scope_element::data, exprtk::parser< T >::scope_element::depth, exprtk::parser_error::e_parser, exprtk::parser_error::e_synthesis, exprtk::parser< T >::scope_element::e_vecelem, exprtk::parser< T >::error_node(), exprtk_debug, exprtk_error_location, exprtk::details::free_node(), get_vector_access_runtime_check(), exprtk::parser< T >::scope_element::index, exprtk::details::is_constant_node(), exprtk::details::is_ivector_node(), exprtk::details::is_vector_node(), exprtk::parser_error::make_error(), exprtk::parser< T >::scope_element::name, node_allocator_, parser_, exprtk::details::vector_holder< Type >::rebaseable(), exprtk::parser< T >::scope_element::ref_count, exprtk::details::vector_holder< Type >::size(), exprtk::details::numeric::to_int64(), exprtk::details::to_str(), exprtk::parser< T >::scope_element::type, exprtk::details::expression_node< T >::valid(), exprtk::details::expression_node< T >::value(), and exprtk::parser< T >::scope_element::var_node.

Here is the call graph for this function:

◆ vectorize_func()

template<typename T>
template<typename Type>
template<typename Allocator, template< typename, typename > class Sequence>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::vectorize_func ( const details::operator_type & operation,
Sequence< expression_node_ptr, Allocator > & arg_list )
inline

Definition at line 33876 of file exprtk.hpp.

33878 {
33879 if (1 == arg_list.size())
33880 {
33881 switch (operation)
33882 {
33883 #define case_stmt(op0, op1) \
33884 case op0 : return node_allocator_-> \
33885 allocate<details::vectorize_node<Type,op1<Type> > >(arg_list[0]); \
33886
33892 #undef case_stmt
33893 default : return error_node();
33894 }
33895 }
33896 else
33897 return error_node();
33898 }

References case_stmt, exprtk::details::e_avg, exprtk::details::e_max, exprtk::details::e_min, exprtk::details::e_prod, exprtk::details::e_sum, and exprtk::parser< T >::error_node().

Referenced by vararg_function().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vob_optimisable()

template<typename T>
template<typename Type>
bool exprtk::parser< T >::expression_generator< Type >::vob_optimisable ( const details::operator_type & operation,
expression_node_ptr(&) branch[2] ) const
inline

Definition at line 32399 of file exprtk.hpp.

32400 {
32402 return false;
32403 else
32404 return details::is_variable_node(branch[0]) &&
32406 }

References exprtk::details::is_variable_node(), and operation_optimisable().

Referenced by operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ voc_optimisable()

template<typename T>
template<typename Type>
bool exprtk::parser< T >::expression_generator< Type >::voc_optimisable ( const details::operator_type & operation,
expression_node_ptr(&) branch[2] ) const
inline

Definition at line 32322 of file exprtk.hpp.

32323 {
32325 return false;
32326 else
32327 return details::is_variable_node(branch[0]) &&
32329 }

References exprtk::details::is_constant_node(), exprtk::details::is_variable_node(), and operation_optimisable().

Here is the call graph for this function:

◆ vov_optimisable()

template<typename T>
template<typename Type>
bool exprtk::parser< T >::expression_generator< Type >::vov_optimisable ( const details::operator_type & operation,
expression_node_ptr(&) branch[2] ) const
inline

Definition at line 32331 of file exprtk.hpp.

32332 {
32334 return false;
32335 else
32336 return details::is_variable_node(branch[0]) &&
32338 }

References exprtk::details::is_variable_node(), and operation_optimisable().

Here is the call graph for this function:

◆ while_loop()

template<typename T>
template<typename Type>
expression_node_ptr exprtk::parser< T >::expression_generator< Type >::while_loop ( expression_node_ptr & condition,
expression_node_ptr & branch,
const bool break_continue_present = false ) const
inline

Definition at line 33043 of file exprtk.hpp.

33046 {
33047 if (
33049 !parser_->state_.return_stmt_present &&
33051 )
33052 {
33055 {
33056 // Infinite loops are not allowed.
33057
33060 parser_->current_state().token,
33061 "ERR262 - Infinite loop condition without 'break' or 'return' not allowed in while-loops",
33063
33064 result = error_node();
33065 }
33066 else
33068
33071
33072 return result;
33073 }
33075 {
33077
33078 return branch;
33079 }
33080
33082
33084 {
33085 if (rtc)
33086 return node_allocator_->allocate<while_loop_rtc_node_t>
33087 (condition, branch, rtc);
33088 else
33089 return node_allocator_->allocate<while_loop_node_t>
33090 (condition, branch);
33091 }
33092 #ifndef exprtk_disable_break_continue
33093 else
33094 {
33095 if (rtc)
33097 (condition, branch, rtc);
33098 else
33099 return node_allocator_->allocate<while_loop_bc_node_t>
33100 (condition, branch);
33101 }
33102 #else
33103 return error_node();
33104 #endif
33105 }

References exprtk::parser_error::e_parser, exprtk::loop_runtime_check::e_while_loop, exprtk::parser< T >::error_node(), exprtk_error_location, exprtk::details::free_node(), get_loop_runtime_check(), exprtk::details::is_constant_node(), exprtk::details::is_null_node(), exprtk::details::is_true(), exprtk::parser_error::make_error(), node_allocator_, and parser_.

Here is the call graph for this function:

Member Data Documentation

◆ binary_op_map_

template<typename T>
template<typename Type>
binary_op_map_t* exprtk::parser< T >::expression_generator< Type >::binary_op_map_
private

Definition at line 41927 of file exprtk.hpp.

Referenced by set_bom(), and valid_operator().

◆ inv_binary_op_map_

template<typename T>
template<typename Type>
inv_binary_op_map_t* exprtk::parser< T >::expression_generator< Type >::inv_binary_op_map_
private

Definition at line 41928 of file exprtk.hpp.

Referenced by set_ibom().

◆ node_allocator_

template<typename T>
template<typename Type>
details::node_allocator* exprtk::parser< T >::expression_generator< Type >::node_allocator_
private

Definition at line 41924 of file exprtk.hpp.

Referenced by assert_call(), cardinal_pow_optimisation(), cardinal_pow_optimisation(), conditional(), conditional_string(), conditional_vector(), const_optimise_mswitch(), const_optimise_sf3(), const_optimise_sf4(), const_optimise_switch(), const_optimise_varargfunc(), for_loop(), function(), function(), generic_function_call(), multi_switch_statement(), operator()(), operator()(), operator()(), operator()(), operator()(), operator()(), operator()(), exprtk::parser< T >::expression_generator< Type >::synthesize_binary_ext_expression::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_boc_expression::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_bov_expression::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_cob_expression::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_coboc_expression::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_cocob_expression::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_cocov_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_cov_expression::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covoc_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covoc_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covocov_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covocov_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covocov_expression2::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covocov_expression3::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covocov_expression4::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covov_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covov_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covovoc_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covovoc_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covovoc_expression2::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covovoc_expression3::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covovoc_expression4::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covovov_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covovov_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covovov_expression2::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covovov_expression3::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covovov_expression4::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vob_expression::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_voc_expression::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vococ_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vococov_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vococov_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vococov_expression3::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocov_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocov_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocovoc_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocovoc_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocovoc_expression2::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocovoc_expression3::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocovoc_expression4::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocovov_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocovov_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocovov_expression2::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocovov_expression3::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocovov_expression4::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovoc_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovoc_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovocov_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovocov_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovocov_expression2::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovocov_expression3::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovocov_expression4::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovov_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovov_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovovoc_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovovoc_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovovoc_expression2::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovovoc_expression3::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovovoc_expression4::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovovov_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovovov_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovovov_expression2::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovovov_expression3::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovovov_expression4::process(), repeat_until_loop(), return_call(), return_envelope(), set_allocator(), string_function_call(), switch_statement(), synthesize_assignment_operation_expression(), synthesize_csocs_expression(), synthesize_csocsr_expression(), synthesize_csos_expression(), synthesize_csosr_expression(), synthesize_csrocs_expression(), synthesize_csrocsr_expression(), synthesize_csros_expression(), synthesize_csrosr_expression(), synthesize_expression(), synthesize_expression(), synthesize_null_expression(), synthesize_shortcircuit_expression(), synthesize_socs_expression(), synthesize_socsr_expression(), synthesize_sosr_expression(), synthesize_srocs_expression(), synthesize_srocsr_expression(), synthesize_sros_expression(), synthesize_srosr_expression(), synthesize_string_expression(), synthesize_string_expression(), synthesize_swap_expression(), synthesize_uvouv_expression(), synthesize_vecarithmetic_operation_expression(), synthesize_veceqineqlogic_operation_expression(), vararg_function(), vararg_function_call(), vector_element(), and while_loop().

◆ parser_

template<typename T>
template<typename Type>
parser_t* exprtk::parser< T >::expression_generator< Type >::parser_
private

Definition at line 41931 of file exprtk.hpp.

Referenced by assert_call(), assign_immutable_symbol(), conditional(), conditional_string(), conditional_vector(), for_loop(), function(), generic_function_call(), get_loop_runtime_check(), get_vector_access_runtime_check(), is_assignment_operation(), is_invalid_string_op(), is_invalid_string_op(), lodge_assignment(), operator()(), operator()(), operator()(), exprtk::parser< T >::expression_generator< Type >::synthesize_binary_ext_expression::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_cocov_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covoc_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covoc_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covocov_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covov_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covov_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covovoc_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_covovov_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vococ_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vococov_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocov_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocov_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocovoc_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vocovov_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovoc_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovoc_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovocov_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovov_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovov_expression1::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovovoc_expression0::process(), exprtk::parser< T >::expression_generator< Type >::synthesize_vovovov_expression0::process(), return_call(), set_parser(), string_function_call(), synthesize_assignment_expression(), synthesize_assignment_operation_expression(), synthesize_expression(), synthesize_expression(), synthesize_swap_expression(), synthesize_vecarithmetic_operation_expression(), synthesize_veceqineqlogic_operation_expression(), vararg_function(), vararg_function_call(), vector_element(), and while_loop().

◆ sf3_map_

template<typename T>
template<typename Type>
sf3_map_t* exprtk::parser< T >::expression_generator< Type >::sf3_map_
private

Definition at line 41929 of file exprtk.hpp.

Referenced by set_sf3m(), sf3_optimisable(), and sf3_optimisable().

◆ sf4_map_

template<typename T>
template<typename Type>
sf4_map_t* exprtk::parser< T >::expression_generator< Type >::sf4_map_
private

Definition at line 41930 of file exprtk.hpp.

Referenced by set_sf4m(), sf4_optimisable(), and sf4_optimisable().

◆ strength_reduction_enabled_

template<typename T>
template<typename Type>
bool exprtk::parser< T >::expression_generator< Type >::strength_reduction_enabled_
private

Definition at line 41923 of file exprtk.hpp.

Referenced by set_strength_reduction_state(), and strength_reduction_enabled().

◆ synthesize_map_

template<typename T>
template<typename Type>
synthesize_map_t exprtk::parser< T >::expression_generator< Type >::synthesize_map_
private

Definition at line 41925 of file exprtk.hpp.

Referenced by init_synthesize_map(), and synthesize_expression().

◆ unary_op_map_

template<typename T>
template<typename Type>
unary_op_map_t* exprtk::parser< T >::expression_generator< Type >::unary_op_map_
private

Definition at line 41926 of file exprtk.hpp.

Referenced by set_uom(), and valid_operator().


The documentation for this class was generated from the following file: