34 #ifndef INCLUDE_EXPRTK_HPP
35 #define INCLUDE_EXPRTK_HPP
61 #define exprtk_disable_caseinsensitivity
63 #ifdef exprtk_enable_debugging
64 #define exprtk_debug(params) printf params
66 #define exprtk_debug(params) (void)0
69 #define exprtk_error_location \
70 "exprtk.hpp:" + details::to_str(__LINE__) \
72 #if __cplusplus >= 201103L
73 #define exprtk_override override
74 #define exprtk_final final
75 #define exprtk_delete = delete
77 #define exprtk_override
82 #if __cplusplus >= 201603L
83 #define exprtk_fallthrough [[fallthrough]];
85 #define exprtk_fallthrough
101 return (
' ' == c) || (
'\n' == c) ||
102 (
'\r' == c) || (
'\t' == c) ||
103 (
'\b' == c) || (
'\v' == c) ||
109 return (
'+' == c) || (
'-' == c) ||
110 (
'*' == c) || (
'/' == c) ||
111 (
'^' == c) || (
'<' == c) ||
112 (
'>' == c) || (
'=' == c) ||
113 (
',' == c) || (
'!' == c) ||
114 (
'(' == c) || (
')' == c) ||
115 (
'[' == c) || (
']' == c) ||
116 (
'{' == c) || (
'}' == c) ||
117 (
'%' == c) || (
':' == c) ||
118 (
'?' == c) || (
'&' == c) ||
119 (
'|' == c) || (
';' == c) ;
124 return ((
'a' <= c) && (c <=
'z')) ||
125 ((
'A' <= c) && (c <=
'Z')) ;
130 return (
'0' <= c) && (c <=
'9');
140 return (
'(' == c) || (
'[' == c) || (
'{' == c);
145 return (
')' == c) || (
']' == c) || (
'}' == c);
155 return (
'+' == c) || (
'-' == c);
173 return std::isprint(
static_cast<uchar_t>(c)) ||
177 #ifndef exprtk_disable_caseinsensitivity
180 for (std::size_t i = 0; i < s.size(); ++i)
182 s[i] =
static_cast<std::string::value_type
>(std::tolower(s[i]));
188 return std::tolower(c1) == std::tolower(c2);
191 inline bool imatch(
const std::string& s1,
const std::string& s2)
193 if (s1.size() == s2.size())
195 for (std::size_t i = 0; i < s1.size(); ++i)
197 if (std::tolower(s1[i]) != std::tolower(s2[i]))
211 inline bool operator() (
const std::string& s1,
const std::string& s2)
const
213 const std::size_t length =
std::min(s1.size(),s2.size());
215 for (std::size_t i = 0; i < length; ++i)
217 const char_t c1 =
static_cast<char_t>(std::tolower(s1[i]));
218 const char_t c2 =
static_cast<char_t>(std::tolower(s2[i]));
226 return s1.size() < s2.size();
239 inline bool imatch(
const std::string& s1,
const std::string& s2)
246 inline bool operator() (
const std::string& s1,
const std::string& s2)
const
256 return (4 == symbol.size()) &&
257 (
'$' == symbol[0]) &&
270 return s[s.size() - 1];
276 return std::string(
"0");
280 const int sign = (i < 0) ? -1 : 1;
284 result +=
'0' +
static_cast<char_t>(sign * (i % 10));
292 std::reverse(result.begin(), result.end());
299 return to_str(
static_cast<int>(i));
304 return ((
'0' <= digit) && (digit <=
'9')) ||
305 ((
'A' <= digit) && (digit <=
'F')) ||
306 ((
'a' <= digit) && (digit <=
'f')) ;
311 if ((
'0' <= h) && (h <=
'9'))
314 return static_cast<uchar_t>(std::toupper(h) -
'A');
317 template <
typename Iterator>
323 (end == (itr + 1)) ||
324 (end == (itr + 2)) ||
325 (end == (itr + 3)) ||
327 (
'X' != std::toupper(*(itr + 1))) ||
343 typedef std::string::iterator str_itr_t;
345 str_itr_t itr1 = s.begin();
346 str_itr_t itr2 = s.begin();
347 str_itr_t end = s.end ();
349 std::size_t removal_count = 0;
365 else if (
'a' == (*itr1)) { (*itr2++) =
'\a'; ++itr1; ++removal_count; }
366 else if (
'b' == (*itr1)) { (*itr2++) =
'\b'; ++itr1; ++removal_count; }
367 else if (
'f' == (*itr1)) { (*itr2++) =
'\f'; ++itr1; ++removal_count; }
368 else if (
'n' == (*itr1)) { (*itr2++) =
'\n'; ++itr1; ++removal_count; }
369 else if (
'r' == (*itr1)) { (*itr2++) =
'\r'; ++itr1; ++removal_count; }
370 else if (
't' == (*itr1)) { (*itr2++) =
'\t'; ++itr1; ++removal_count; }
371 else if (
'v' == (*itr1)) { (*itr2++) =
'\v'; ++itr1; ++removal_count; }
372 else if (
'0' == (*itr1)) { (*itr2++) =
'\0'; ++itr1; ++removal_count; }
375 (*itr2++) = (*itr1++);
382 (*itr2++) = (*itr1++);
385 if ((removal_count > s.size()) || (0 == removal_count))
388 s.resize(s.size() - removal_count);
399 data_.reserve(initial_size);
410 data_ += std::string(s);
414 inline operator std::string ()
const
431 "break",
"case",
"continue",
"default",
"false",
"for",
432 "if",
"else",
"ilike",
"in",
"like",
"and",
"nand",
"nor",
433 "not",
"null",
"or",
"repeat",
"return",
"shl",
"shr",
434 "swap",
"switch",
"true",
"until",
"var",
"while",
"xnor",
442 "abs",
"acos",
"acosh",
"and",
"asin",
"asinh",
"atan",
443 "atanh",
"atan2",
"avg",
"break",
"case",
"ceil",
"clamp",
444 "continue",
"cos",
"cosh",
"cot",
"csc",
"default",
445 "deg2grad",
"deg2rad",
"equal",
"erf",
"erfc",
"exp",
446 "expm1",
"false",
"floor",
"for",
"frac",
"grad2deg",
447 "hypot",
"iclamp",
"if",
"else",
"ilike",
"in",
"inrange",
448 "like",
"log",
"log10",
"log2",
"logn",
"log1p",
"mand",
449 "max",
"min",
"mod",
"mor",
"mul",
"ncdf",
"nand",
"nor",
450 "not",
"not_equal",
"null",
"or",
"pow",
"rad2deg",
451 "repeat",
"return",
"root",
"round",
"roundn",
"sec",
"sgn",
452 "shl",
"shr",
"sin",
"sinc",
"sinh",
"sqrt",
"sum",
"swap",
453 "switch",
"tan",
"tanh",
"true",
"trunc",
"until",
"var",
454 "while",
"xnor",
"xor",
"&",
"|"
461 "abs",
"acos",
"acosh",
"asin",
"asinh",
"atan",
"atanh",
462 "atan2",
"avg",
"ceil",
"clamp",
"cos",
"cosh",
"cot",
463 "csc",
"equal",
"erf",
"erfc",
"exp",
"expm1",
"floor",
464 "frac",
"hypot",
"iclamp",
"like",
"log",
"log10",
"log2",
465 "logn",
"log1p",
"mand",
"max",
"min",
"mod",
"mor",
"mul",
466 "ncdf",
"pow",
"root",
"round",
"roundn",
"sec",
"sgn",
467 "sin",
"sinc",
"sinh",
"sqrt",
"sum",
"swap",
"tan",
"tanh",
468 "trunc",
"not_equal",
"inrange",
"deg2grad",
"deg2rad",
469 "rad2deg",
"grad2deg"
476 "and",
"nand",
"nor",
"not",
"or",
"xnor",
"xor",
"&",
"|"
483 "if",
"switch",
"for",
"while",
"repeat",
"return"
490 "+",
"-",
"*",
"/",
"%",
"^"
589 return (std::tolower(c0) == std::tolower(c1));
593 template <
typename Iterator,
typename Compare>
595 const Iterator pattern_end ,
596 const Iterator data_begin ,
597 const Iterator data_end ,
598 const typename std::iterator_traits<Iterator>::value_type& zero_or_more,
599 const typename std::iterator_traits<Iterator>::value_type& exactly_one )
601 typedef typename std::iterator_traits<Iterator>::value_type type;
603 const Iterator null_itr(0);
605 Iterator p_itr = pattern_begin;
606 Iterator d_itr = data_begin;
607 Iterator np_itr = null_itr;
608 Iterator nd_itr = null_itr;
612 if (p_itr != pattern_end)
614 const type c = *(p_itr);
616 if ((data_end != d_itr) && (Compare::cmp(c,*(d_itr)) || (exactly_one == c)))
622 else if (zero_or_more == c)
624 while ((pattern_end != p_itr) && (zero_or_more == *(p_itr)))
629 const type d = *(p_itr);
631 while ((data_end != d_itr) && !(Compare::cmp(d,*(d_itr)) || (exactly_one == d)))
643 else if (data_end == d_itr)
646 if ((data_end == d_itr) || (null_itr == nd_itr))
657 const std::string& str)
659 return match_impl<char_cptr,cs_match>
662 wild_card.data() + wild_card.size(),
664 str.data() + str.size(),
670 const std::string& str)
672 return match_impl<char_cptr,cis_match>
675 wild_card.data() + wild_card.size(),
677 str.data() + str.size(),
683 const std::string& str,
684 std::size_t& diff_index,
689 return (
"Z" == pattern);
691 else if (
'*' == pattern[0])
694 typedef std::string::const_iterator itr_t;
696 itr_t p_itr = pattern.begin();
697 itr_t s_itr = str .begin();
699 const itr_t p_end = pattern.end();
700 const itr_t s_end = str .end();
702 while ((s_end != s_itr) && (p_end != p_itr))
706 const char_t target =
static_cast<char_t>(std::toupper(*(p_itr - 1)));
710 diff_index =
static_cast<std::size_t
>(std::distance(str.begin(),s_itr));
711 diff_value =
static_cast<char_t>(std::toupper(*p_itr));
718 while (s_itr != s_end)
720 if (target != std::toupper(*s_itr))
730 std::toupper(*p_itr) != std::toupper(*s_itr)
733 diff_index =
static_cast<std::size_t
>(std::distance(str.begin(),s_itr));
734 diff_value =
static_cast<char_t>(std::toupper(*p_itr));
758 for (std::size_t i = 0; i <
size; ++i)
765 #define pod_set_zero_value(T) \
767 struct set_zero_value_impl<T> \
769 static inline void process(T* base_ptr, const std::size_t size) \
770 { std::memset(base_ptr, 0x00, size * sizeof(T)); } \
777 #ifdef pod_set_zero_value
778 #undef pod_set_zero_value
796 1.0E+001, 1.0E+002, 1.0E+003, 1.0E+004,
797 1.0E+005, 1.0E+006, 1.0E+007, 1.0E+008,
798 1.0E+009, 1.0E+010, 1.0E+011, 1.0E+012,
799 1.0E+013, 1.0E+014, 1.0E+015, 1.0E+016
808 static const double e = 2.71828182845904523536028747135266249775724709369996;
809 static const double pi = 3.14159265358979323846264338327950288419716939937510;
810 static const double pi_2 = 1.57079632679489661923132169163975144209858469968755;
811 static const double pi_4 = 0.78539816339744830961566084581987572104929234984378;
812 static const double pi_180 = 0.01745329251994329576923690768488612713442871888542;
813 static const double _1_pi = 0.31830988618379067153776752674502872406891929148091;
814 static const double _2_pi = 0.63661977236758134307553505349005744813783858296183;
815 static const double _180_pi = 57.29577951308232087679815481410517033240547246656443;
816 static const double log2 = 0.69314718055994530941723212145817656807550013436026;
817 static const double sqrt2 = 1.41421356237309504880168872420969807856967187537695;
826 template <
typename T>
833 #define exprtk_register_real_type_tag(T) \
834 template <> struct number_type<T> \
835 { typedef real_type_tag type; number_type() {} }; \
837 #define exprtk_register_int_type_tag(T) \
838 template <> struct number_type<T> \
839 { typedef int_type_tag type; number_type() {} }; \
852 #undef exprtk_register_real_type_tag
853 #undef exprtk_register_int_type_tag
855 template <
typename T>
856 struct epsilon_type {};
858 #define exprtk_define_epsilon_type(Type, Epsilon) \
859 template <> struct epsilon_type<Type> \
861 static inline Type value() \
863 const Type epsilon = static_cast<Type>(Epsilon); \
872 #undef exprtk_define_epsilon_type
874 template <
typename T>
877 return std::not_equal_to<T>()(v,v);
880 template <
typename T>
883 return static_cast<int>(v);
886 template <
typename T>
892 template <
typename T>
898 template <
typename T>
901 return std::not_equal_to<T>()(T(0),v);
904 template <
typename T>
907 return std::equal_to<T>()(T(0),v);
910 template <
typename T>
913 return ((v < T(0)) ? -v : v);
916 template <
typename T>
919 return std::min<T>(v0,v1);
922 template <
typename T>
925 return std::max<T>(v0,v1);
928 template <
typename T>
941 template <
typename T>
944 return (v0 == v1) ? 1 : 0;
947 template <
typename T>
952 return v + (T(0.5) * v * v);
954 return std::exp(v) - T(1);
957 template <
typename T>
960 return T(std::exp<double>(v)) - T(1);
963 template <
typename T>
978 template <
typename T>
981 return (v0 != v1) ? 1 : 0;
984 template <
typename T>
987 return std::fmod(v0,v1);
990 template <
typename T>
996 template <
typename T>
1002 template <
typename T>
1005 return std::pow(
static_cast<double>(v0),
static_cast<double>(v1));
1008 template <
typename T>
1011 return std::log(v0) / std::log(v1);
1014 template <
typename T>
1017 return static_cast<T
>(logn_impl<double>(
static_cast<double>(v0),
static_cast<double>(v1),
real_type_tag()));
1020 template <
typename T>
1027 return std::log(T(1) + v);
1030 return (T(-0.5) * v + T(1)) * v;
1033 return std::numeric_limits<T>::quiet_NaN();
1036 template <
typename T>
1041 return std::log(T(1) + v);
1044 return std::numeric_limits<T>::quiet_NaN();
1047 template <
typename T>
1051 return std::numeric_limits<T>::quiet_NaN();
1053 const std::size_t n =
static_cast<std::size_t
>(v1);
1055 if ((v0 < T(0)) && (0 == (n % 2)))
1056 return std::numeric_limits<T>::quiet_NaN();
1061 template <
typename T>
1064 return root_impl<double>(
static_cast<double>(v0),
static_cast<double>(v1),
real_type_tag());
1067 template <
typename T>
1070 return ((v < T(0)) ? std::ceil(v - T(0.5)) : std::floor(v + T(0.5)));
1073 template <
typename T>
1076 const int index = std::max<int>(0, std::min<int>(
pow10_size - 1,
static_cast<int>(std::floor(v1))));
1077 const T p10 = T(
pow10[index]);
1080 return T(std::ceil ((v0 * p10) - T(0.5)) / p10);
1082 return T(std::floor((v0 * p10) + T(0.5)) / p10);
1085 template <
typename T>
1091 template <
typename T>
1094 return std::sqrt((v0 * v0) + (v1 * v1));
1097 template <
typename T>
1100 return static_cast<T
>(std::sqrt(
static_cast<double>((v0 * v0) + (v1 * v1))));
1103 template <
typename T>
1109 template <
typename T>
1115 template <
typename T>
1118 return v0 * (T(1) /
std::pow(T(2),
static_cast<T
>(
static_cast<int>(v1))));
1121 template <
typename T>
1127 template <
typename T>
1130 return v0 *
std::pow(T(2),
static_cast<T
>(
static_cast<int>(v1)));
1133 template <
typename T>
1139 template <
typename T>
1142 if (v > T(0))
return T(+1);
1143 else if (v < T(0))
return T(-1);
1147 template <
typename T>
1150 if (v > T(0))
return T(+1);
1151 else if (v < T(0))
return T(-1);
1155 template <
typename T>
1161 template <
typename T>
1167 template <
typename T>
1173 template <
typename T>
1179 template <
typename T>
1185 template <
typename T>
1191 template <
typename T>
1197 template <
typename T>
1203 template <
typename T>
1209 template <
typename T>
1215 template <
typename T>
1221 if ((v0_true && v1_true) || (!v0_true && !v1_true))
1227 template <
typename T>
1233 if ((v0_true && v1_true) || (!v0_true && !v1_true))
1239 #if (defined(_MSC_VER) && (_MSC_VER >= 1900)) || !defined(_MSC_VER)
1240 #define exprtk_define_erf(TT, impl) \
1241 inline TT erf_impl(const TT v) { return impl(v); } \
1246 #undef exprtk_define_erf
1249 template <
typename T>
1252 #if defined(_MSC_VER) && (_MSC_VER < 1900)
1254 static const T c[] =
1256 T( 1.26551223), T(1.00002368),
1257 T( 0.37409196), T(0.09678418),
1258 T(-0.18628806), T(0.27886807),
1259 T(-1.13520398), T(1.48851587),
1260 T(-0.82215223), T(0.17087277)
1265 const T result = T(1) -
t * std::exp((-v * v) -
1266 c[0] +
t * (c[1] +
t *
1267 (c[2] +
t * (c[3] +
t *
1268 (c[4] +
t * (c[5] +
t *
1269 (c[6] +
t * (c[7] +
t *
1270 (c[8] +
t * (c[9]))))))))));
1272 return (v >= T(0)) ? result : -result;
1278 template <
typename T>
1284 #if (defined(_MSC_VER) && (_MSC_VER >= 1900)) || !defined(_MSC_VER)
1285 #define exprtk_define_erfc(TT, impl) \
1286 inline TT erfc_impl(const TT v) { return impl(v); } \
1291 #undef exprtk_define_erfc
1294 template <
typename T>
1297 #if defined(_MSC_VER) && (_MSC_VER < 1900)
1304 template <
typename T>
1310 template <
typename T>
1313 const T cnd = T(0.5) * (T(1) +
1316 return (v < T(0)) ? (T(1) - cnd) : cnd;
1319 template <
typename T>
1325 template <
typename T>
1328 if (std::abs(v) >= std::numeric_limits<T>::epsilon())
1329 return(std::sin(v) / v);
1334 template <
typename T>
1368 template <
typename T>
inline T
notl_impl(
const T v,
real_type_tag) {
return (std::not_equal_to<T>()(T(0),v) ? T(0) : T(1)); }
1406 template <
typename T>
1409 return std::equal_to<T>()(T(0),std::fmod(v,T(1)));
1412 template <
typename T>
1419 template <
typename Type>
1427 template <
typename T>
1434 template <
typename T>
1441 template <
typename T>
1448 template <
typename T>
1452 return is_nan_impl(v, num_type);
1455 template <
typename T>
1456 inline T
min(
const T v0,
const T v1)
1462 template <
typename T>
1463 inline T
max(
const T v0,
const T v1)
1469 template <
typename T>
1476 template <
typename T>
1483 template <
typename T>
1490 template <
typename T>
1491 inline T
pow(
const T v0,
const T v1)
1497 template <
typename T>
1498 inline T
logn(
const T v0,
const T v1)
1504 template <
typename T>
1505 inline T
root(
const T v0,
const T v1)
1511 template <
typename T>
1518 template <
typename T>
1525 template <
typename T>
1532 template <
typename T>
1533 inline T
shr(
const T v0,
const T v1)
1539 template <
typename T>
1540 inline T
shl(
const T v0,
const T v1)
1546 template <
typename T>
1553 template <
typename T>
1560 template <
typename T>
1564 return or_impl(v0, v1, num_type);
1567 template <
typename T>
1574 template <
typename T>
1581 template <
typename T>
1588 template <
typename T>
1595 template <
typename T,
unsigned int N>
1625 template <
typename T>
struct fast_exp<T, 4> {
static inline T
result(
const T v) { T v_2 = v * v;
return v_2 * v_2; } };
1626 template <
typename T>
struct fast_exp<T, 3> {
static inline T
result(
const T v) {
return v * v * v; } };
1627 template <
typename T>
struct fast_exp<T, 2> {
static inline T
result(
const T v) {
return v * v; } };
1628 template <
typename T>
struct fast_exp<T, 1> {
static inline T
result(
const T v) {
return v; } };
1629 template <
typename T>
struct fast_exp<T, 0> {
static inline T
result(
const T ) {
return T(1); } };
1631 #define exprtk_define_unary_function(FunctionName) \
1632 template <typename T> \
1633 inline T FunctionName (const T v) \
1635 const typename details::number_type<T>::type num_type; \
1636 return FunctionName##_impl(v,num_type); \
1679 #undef exprtk_define_unary_function
1682 template <
typename T>
1685 static const double fract10[] =
1688 1.0E+001, 1.0E+002, 1.0E+003, 1.0E+004, 1.0E+005, 1.0E+006, 1.0E+007, 1.0E+008, 1.0E+009, 1.0E+010,
1689 1.0E+011, 1.0E+012, 1.0E+013, 1.0E+014, 1.0E+015, 1.0E+016, 1.0E+017, 1.0E+018, 1.0E+019, 1.0E+020,
1690 1.0E+021, 1.0E+022, 1.0E+023, 1.0E+024, 1.0E+025, 1.0E+026, 1.0E+027, 1.0E+028, 1.0E+029, 1.0E+030,
1691 1.0E+031, 1.0E+032, 1.0E+033, 1.0E+034, 1.0E+035, 1.0E+036, 1.0E+037, 1.0E+038, 1.0E+039, 1.0E+040,
1692 1.0E+041, 1.0E+042, 1.0E+043, 1.0E+044, 1.0E+045, 1.0E+046, 1.0E+047, 1.0E+048, 1.0E+049, 1.0E+050,
1693 1.0E+051, 1.0E+052, 1.0E+053, 1.0E+054, 1.0E+055, 1.0E+056, 1.0E+057, 1.0E+058, 1.0E+059, 1.0E+060,
1694 1.0E+061, 1.0E+062, 1.0E+063, 1.0E+064, 1.0E+065, 1.0E+066, 1.0E+067, 1.0E+068, 1.0E+069, 1.0E+070,
1695 1.0E+071, 1.0E+072, 1.0E+073, 1.0E+074, 1.0E+075, 1.0E+076, 1.0E+077, 1.0E+078, 1.0E+079, 1.0E+080,
1696 1.0E+081, 1.0E+082, 1.0E+083, 1.0E+084, 1.0E+085, 1.0E+086, 1.0E+087, 1.0E+088, 1.0E+089, 1.0E+090,
1697 1.0E+091, 1.0E+092, 1.0E+093, 1.0E+094, 1.0E+095, 1.0E+096, 1.0E+097, 1.0E+098, 1.0E+099, 1.0E+100,
1698 1.0E+101, 1.0E+102, 1.0E+103, 1.0E+104, 1.0E+105, 1.0E+106, 1.0E+107, 1.0E+108, 1.0E+109, 1.0E+110,
1699 1.0E+111, 1.0E+112, 1.0E+113, 1.0E+114, 1.0E+115, 1.0E+116, 1.0E+117, 1.0E+118, 1.0E+119, 1.0E+120,
1700 1.0E+121, 1.0E+122, 1.0E+123, 1.0E+124, 1.0E+125, 1.0E+126, 1.0E+127, 1.0E+128, 1.0E+129, 1.0E+130,
1701 1.0E+131, 1.0E+132, 1.0E+133, 1.0E+134, 1.0E+135, 1.0E+136, 1.0E+137, 1.0E+138, 1.0E+139, 1.0E+140,
1702 1.0E+141, 1.0E+142, 1.0E+143, 1.0E+144, 1.0E+145, 1.0E+146, 1.0E+147, 1.0E+148, 1.0E+149, 1.0E+150,
1703 1.0E+151, 1.0E+152, 1.0E+153, 1.0E+154, 1.0E+155, 1.0E+156, 1.0E+157, 1.0E+158, 1.0E+159, 1.0E+160,
1704 1.0E+161, 1.0E+162, 1.0E+163, 1.0E+164, 1.0E+165, 1.0E+166, 1.0E+167, 1.0E+168, 1.0E+169, 1.0E+170,
1705 1.0E+171, 1.0E+172, 1.0E+173, 1.0E+174, 1.0E+175, 1.0E+176, 1.0E+177, 1.0E+178, 1.0E+179, 1.0E+180,
1706 1.0E+181, 1.0E+182, 1.0E+183, 1.0E+184, 1.0E+185, 1.0E+186, 1.0E+187, 1.0E+188, 1.0E+189, 1.0E+190,
1707 1.0E+191, 1.0E+192, 1.0E+193, 1.0E+194, 1.0E+195, 1.0E+196, 1.0E+197, 1.0E+198, 1.0E+199, 1.0E+200,
1708 1.0E+201, 1.0E+202, 1.0E+203, 1.0E+204, 1.0E+205, 1.0E+206, 1.0E+207, 1.0E+208, 1.0E+209, 1.0E+210,
1709 1.0E+211, 1.0E+212, 1.0E+213, 1.0E+214, 1.0E+215, 1.0E+216, 1.0E+217, 1.0E+218, 1.0E+219, 1.0E+220,
1710 1.0E+221, 1.0E+222, 1.0E+223, 1.0E+224, 1.0E+225, 1.0E+226, 1.0E+227, 1.0E+228, 1.0E+229, 1.0E+230,
1711 1.0E+231, 1.0E+232, 1.0E+233, 1.0E+234, 1.0E+235, 1.0E+236, 1.0E+237, 1.0E+238, 1.0E+239, 1.0E+240,
1712 1.0E+241, 1.0E+242, 1.0E+243, 1.0E+244, 1.0E+245, 1.0E+246, 1.0E+247, 1.0E+248, 1.0E+249, 1.0E+250,
1713 1.0E+251, 1.0E+252, 1.0E+253, 1.0E+254, 1.0E+255, 1.0E+256, 1.0E+257, 1.0E+258, 1.0E+259, 1.0E+260,
1714 1.0E+261, 1.0E+262, 1.0E+263, 1.0E+264, 1.0E+265, 1.0E+266, 1.0E+267, 1.0E+268, 1.0E+269, 1.0E+270,
1715 1.0E+271, 1.0E+272, 1.0E+273, 1.0E+274, 1.0E+275, 1.0E+276, 1.0E+277, 1.0E+278, 1.0E+279, 1.0E+280,
1716 1.0E+281, 1.0E+282, 1.0E+283, 1.0E+284, 1.0E+285, 1.0E+286, 1.0E+287, 1.0E+288, 1.0E+289, 1.0E+290,
1717 1.0E+291, 1.0E+292, 1.0E+293, 1.0E+294, 1.0E+295, 1.0E+296, 1.0E+297, 1.0E+298, 1.0E+299, 1.0E+300,
1718 1.0E+301, 1.0E+302, 1.0E+303, 1.0E+304, 1.0E+305, 1.0E+306, 1.0E+307, 1.0E+308
1721 static const int fract10_size =
static_cast<int>(
sizeof(fract10) /
sizeof(
double));
1723 const int e = std::abs(exponent);
1725 if (exponent >= std::numeric_limits<T>::min_exponent10)
1727 if (
e < fract10_size)
1730 return T(d * fract10[
e]);
1732 return T(d / fract10[
e]);
1735 return T(d *
std::pow(10.0, 10.0 * exponent));
1739 d /= T(fract10[ -std::numeric_limits<T>::min_exponent10]);
1740 return T(d / fract10[-exponent + std::numeric_limits<T>::min_exponent10]);
1744 template <
typename Iterator,
typename T>
1750 const bool negative = (
'-' == (*itr));
1752 if (negative || (
'+' == (*itr)))
1760 while ((end != itr) && (zero == (*itr))) ++itr;
1762 bool return_result =
true;
1763 unsigned int digit = 0;
1764 const std::size_t length =
static_cast<std::size_t
>(std::distance(itr,end));
1770 #ifdef exprtk_use_lut
1772 #define exprtk_process_digit \
1773 if ((digit = details::digit_table[(int)*itr++]) < 10) \
1774 result = result * 10 + (digit); \
1777 return_result = false; \
1780 exprtk_fallthrough \
1784 #define exprtk_process_digit \
1785 if ((digit = (*itr++ - zero)) < 10) \
1786 result = result * T(10) + digit; \
1789 return_result = false; \
1792 exprtk_fallthrough \
1799 case 1 :
if ((digit = (*itr - zero))>= 10)
1802 return_result =
false;
1805 #undef exprtk_process_digit
1809 return_result =
false;
1811 if (length && return_result)
1813 result = result * 10 +
static_cast<T
>(digit);
1817 result = negative ? -result : result;
1818 return return_result;
1821 template <
typename Iterator,
typename T>
1822 static inline bool parse_nan(Iterator& itr,
const Iterator end, T&
t)
1824 typedef typename std::iterator_traits<Iterator>::value_type type;
1826 static const std::size_t nan_length = 3;
1828 if (std::distance(itr,end) !=
static_cast<int>(nan_length))
1831 if (
static_cast<type
>(
'n') == (*itr))
1834 (
static_cast<type
>(
'a') != *(itr + 1)) ||
1835 (
static_cast<type
>(
'n') != *(itr + 2))
1842 (
static_cast<type
>(
'A') != *(itr + 1)) ||
1843 (
static_cast<type
>(
'N') != *(itr + 2))
1849 t = std::numeric_limits<T>::quiet_NaN();
1854 template <
typename Iterator,
typename T>
1855 static inline bool parse_inf(Iterator& itr,
const Iterator end, T&
t,
const bool negative)
1857 static const char_t inf_uc[] =
"INFINITY";
1858 static const char_t inf_lc[] =
"infinity";
1859 static const std::size_t inf_length = 8;
1861 const std::size_t length =
static_cast<std::size_t
>(std::distance(itr,end));
1863 if ((3 != length) && (inf_length != length))
1866 char_cptr inf_itr = (
'i' == (*itr)) ? inf_lc : inf_uc;
1870 if (*inf_itr ==
static_cast<char_t>(*itr))
1881 t = -std::numeric_limits<T>::infinity();
1883 t = std::numeric_limits<T>::infinity();
1888 template <
typename T>
1891 using namespace details::numeric;
1892 return (numeric_info<T>::min_exp <= exponent) && (exponent <= numeric_info<T>::max_exp);
1895 template <
typename Iterator,
typename T>
1898 if (end == itr_external)
return false;
1900 Iterator itr = itr_external;
1904 const bool negative = (
'-' == (*itr));
1906 if (negative ||
'+' == (*itr))
1912 bool instate =
false;
1916 #define parse_digit_1(d) \
1917 if ((digit = (*itr - zero)) < 10) \
1918 { d = d * T(10) + digit; } \
1921 if (end == ++itr) break; \
1923 #define parse_digit_2(d) \
1924 if ((digit = (*itr - zero)) < 10) \
1925 { d = d * T(10) + digit; } \
1932 const Iterator curr = itr;
1934 while ((end != itr) && (zero == (*itr))) ++itr;
1944 if (curr != itr) instate =
true;
1953 const Iterator curr = ++itr;
1968 const int frac_exponent =
static_cast<int>(-std::distance(curr, itr));
1976 #undef parse_digit_1
1977 #undef parse_digit_2
1982 typename std::iterator_traits<Iterator>::value_type c = (*itr);
1984 if ((
'e' == c) || (
'E' == c))
2001 if ((
'f' == c) || (
'F' == c) || (
'l' == c) || (
'L' == c))
2007 else if ((
'I' <= (*itr)) && ((*itr) <=
'n'))
2009 if ((
'i' == (*itr)) || (
'I' == (*itr)))
2013 else if ((
'n' == (*itr)) || (
'N' == (*itr)))
2023 else if ((
'I' <= (*itr)) && ((*itr) <=
'n'))
2025 if ((
'i' == (*itr)) || (
'I' == (*itr)))
2029 else if ((
'n' == (*itr)) || (
'N' == (*itr)))
2042 if ((end != itr) || (!instate))
2049 t =
static_cast<T
>((negative) ? -d : d);
2053 template <
typename T>
2064 template <
typename T>
2091 e_repeat_until_loop = 4,
2098 e_iteration_count = 1,
2105 : loop_set(e_invalid)
2106 , max_loop_iterations(0)
2125 throw std::runtime_error(
"ExprTk Loop runtime violation.");
2149 throw std::runtime_error(
"ExprTk runtime vector access violation.");
2150 #if !defined(_MSC_VER) && !defined(__NVCOMPILER)
2180 e_err_number = 3, e_err_string = 4, e_err_sfunc = 5,
2181 e_eof = 6, e_number = 7, e_symbol = 8,
2187 e_eq =
'=', e_rbracket =
')', e_lbracket =
'(',
2188 e_rsqrbracket =
']', e_lsqrbracket =
'[', e_rcrlbracket =
'}',
2189 e_lcrlbracket =
'{', e_comma =
',',
e_add =
'+',
2198 , position(std::numeric_limits<std::size_t>::
max())
2208 template <
typename Iterator>
2210 const Iterator begin,
const Iterator end,
2211 const Iterator base_begin = Iterator(0))
2214 value.assign(begin,end);
2216 position =
static_cast<std::size_t
>(std::distance(base_begin,begin));
2220 template <
typename Iterator>
2221 inline token&
set_symbol(
const Iterator begin,
const Iterator end,
const Iterator base_begin = Iterator(0))
2224 value.assign(begin,end);
2226 position =
static_cast<std::size_t
>(std::distance(base_begin,begin));
2230 template <
typename Iterator>
2231 inline token&
set_numeric(
const Iterator begin,
const Iterator end,
const Iterator base_begin = Iterator(0))
2234 value.assign(begin,end);
2236 position =
static_cast<std::size_t
>(std::distance(base_begin,begin));
2240 template <
typename Iterator>
2241 inline token&
set_string(
const Iterator begin,
const Iterator end,
const Iterator base_begin = Iterator(0))
2244 value.assign(begin,end);
2246 position =
static_cast<std::size_t
>(std::distance(base_begin,begin));
2258 template <
typename Iterator>
2260 const Iterator begin,
const Iterator end,
2261 const Iterator base_begin = Iterator(0))
2265 (e_err_symbol == et) ||
2266 (e_err_number == et) ||
2267 (e_err_string == et) ||
2276 value.assign(begin,end);
2279 position =
static_cast<std::size_t
>(std::distance(base_begin,begin));
2288 case e_none :
return "NONE";
2289 case e_error :
return "ERROR";
2290 case e_err_symbol :
return "ERROR_SYMBOL";
2291 case e_err_number :
return "ERROR_NUMBER";
2292 case e_err_string :
return "ERROR_STRING";
2293 case e_eof :
return "EOF";
2294 case e_number :
return "NUMBER";
2295 case e_symbol :
return "SYMBOL";
2296 case e_string :
return "STRING";
2303 case e_shr :
return ">>";
2304 case e_shl :
return "<<";
2305 case e_lte :
return "<=";
2306 case e_ne :
return "!=";
2307 case e_gte :
return ">=";
2308 case e_lt :
return "<";
2309 case e_gt :
return ">";
2310 case e_eq :
return "=";
2311 case e_rbracket :
return ")";
2312 case e_lbracket :
return "(";
2313 case e_rsqrbracket :
return "]";
2314 case e_lsqrbracket :
return "[";
2315 case e_rcrlbracket :
return "}";
2316 case e_lcrlbracket :
return "{";
2317 case e_comma :
return ",";
2318 case e_add :
return "+";
2319 case e_sub :
return "-";
2320 case e_div :
return "/";
2321 case e_mul :
return "*";
2322 case e_mod :
return "%";
2323 case e_pow :
return "^";
2324 case e_colon :
return ":";
2325 case e_ternary :
return "?";
2326 case e_swap :
return "<=>";
2327 default :
return "UNKNOWN";
2335 (e_err_symbol == type) ||
2336 (e_err_number == type) ||
2337 (e_err_string == type) ||
2338 (e_err_sfunc == type)
2369 token_list_.clear();
2370 token_itr_ = token_list_.end();
2371 store_token_itr_ = token_list_.end();
2376 base_itr_ = str.data();
2377 s_itr_ = str.data();
2378 s_end_ = str.data() + str.size();
2380 eof_token_.set_operator(token_t::e_eof,s_end_,s_end_,base_itr_);
2381 token_list_.clear();
2383 while (!is_end(s_itr_))
2387 if (!token_list_.empty() && token_list_.back().is_error())
2396 return token_list_.empty();
2401 return token_list_.size();
2406 token_itr_ = token_list_.begin();
2407 store_token_itr_ = token_list_.begin();
2412 store_token_itr_ = token_itr_;
2417 token_itr_ = store_token_itr_;
2422 if (token_list_.end() != token_itr_)
2424 return *token_itr_++;
2432 if (token_list_.end() != token_itr_)
2442 if (index < token_list_.size())
2443 return token_list_[index];
2450 if (index < token_list_.size())
2451 return token_list_[index];
2458 return (token_list_.end() == token_itr_);
2464 !token_list_.empty() &&
2465 (token_list_.end() != token_itr_)
2471 token_itr_ = token_list_.insert(token_itr_,
t);
2475 inline std::string
substr(
const std::size_t& begin,
const std::size_t& end)
const
2477 const details::char_cptr begin_itr = ((base_itr_ + begin) < s_end_) ? (base_itr_ + begin) : s_end_;
2478 const details::char_cptr end_itr = ((base_itr_ + end ) < s_end_) ? (base_itr_ + end ) : s_end_;
2480 return std::string(begin_itr,end_itr);
2487 else if (token_list_.begin() != token_itr_)
2488 return std::string(base_itr_ + (token_itr_ - 1)->position, s_end_);
2490 return std::string(base_itr_ + token_itr_->position, s_end_);
2497 return (s_end_ == itr);
2500 #ifndef exprtk_disable_comments
2503 const char_t c0 = *(itr + 0);
2504 const char_t c1 = *(itr + 1);
2508 else if (!is_end(itr + 1))
2510 if ((
'/' == c0) && (
'/' == c1))
return true;
2511 if ((
'/' == c0) && (
'*' == c1))
return true;
2532 #ifndef exprtk_disable_comments
2539 static inline bool comment_start(
const char_t c0,
const char_t c1,
int& mode,
int& incr)
2542 if (
'#' == c0) { mode = 1; incr = 1; }
2545 if (
'/' == c1) { mode = 1; incr = 2; }
2546 else if (
'*' == c1) { mode = 2; incr = 2; }
2551 static inline bool comment_end(
const char_t c0,
const char_t c1,
int& mode)
2554 ((1 == mode) && (
'\n' == c0)) ||
2555 ((2 == mode) && (
'*' == c0) && (
'/' == c1))
2571 else if (!test::comment_start(*s_itr_, *(s_itr_ + 1), mode, increment))
2576 s_itr_ += increment;
2578 while (!is_end(s_itr_))
2580 if ((1 == mode) && test::comment_end(*s_itr_, 0, mode))
2588 if (!is_end((s_itr_ + 1)) && test::comment_end(*s_itr_, *(s_itr_ + 1), mode))
2602 token_list_.push_back(
t);
2609 const char_t c = *s_itr_;
2616 else if (is_comment_start(s_itr_))
2638 scan_special_function();
2641 #ifndef exprtk_disable_string_capabilities
2651 t.set_symbol(s_itr_, s_itr_ + 1, base_itr_);
2652 token_list_.push_back(
t);
2660 token_list_.push_back(
t);
2669 const char_t c0 = s_itr_[0];
2671 if (!is_end(s_itr_ + 1))
2673 const char_t c1 = s_itr_[1];
2675 if (!is_end(s_itr_ + 2))
2677 const char_t c2 = s_itr_[2];
2679 if ((c0 ==
'<') && (c1 ==
'=') && (c2 ==
'>'))
2682 token_list_.push_back(
t);
2704 if (token_t::e_none != ttype)
2706 t.set_operator(ttype, s_itr_, s_itr_ + 2, base_itr_);
2707 token_list_.push_back(
t);
2718 t.set_operator(token_t::e_eof, s_itr_, s_itr_ + 1, base_itr_);
2720 t.set_symbol(s_itr_, s_itr_ + 1, base_itr_);
2722 t.set_symbol(s_itr_, s_itr_ + 1, base_itr_);
2726 token_list_.push_back(
t);
2734 while (!is_end(s_itr_))
2738 if (
'.' != (*s_itr_))
2746 (s_itr_ != initial_itr) &&
2747 !is_end(s_itr_ + 1) &&
2749 (
'_' != (*(s_itr_ + 1)))
2758 t.set_symbol(initial_itr, s_itr_, base_itr_);
2759 token_list_.push_back(
t);
2784 bool dot_found =
false;
2785 bool e_found =
false;
2786 bool post_e_sign_found =
false;
2787 bool post_e_digit_found =
false;
2790 while (!is_end(s_itr_))
2792 if (
'.' == (*s_itr_))
2796 t.set_error(token::e_err_number, initial_itr, s_itr_, base_itr_);
2797 token_list_.push_back(
t);
2807 else if (
'e' == std::tolower(*s_itr_))
2809 const char_t& c = *(s_itr_ + 1);
2811 if (is_end(s_itr_ + 1))
2813 t.set_error(token::e_err_number, initial_itr, s_itr_, base_itr_);
2814 token_list_.push_back(
t);
2824 t.set_error(token::e_err_number, initial_itr, s_itr_, base_itr_);
2825 token_list_.push_back(
t);
2837 if (post_e_sign_found)
2839 t.set_error(token::e_err_number, initial_itr, s_itr_, base_itr_);
2840 token_list_.push_back(
t);
2845 post_e_sign_found =
true;
2852 post_e_digit_found =
true;
2863 t.set_numeric(initial_itr, s_itr_, base_itr_);
2864 token_list_.push_back(
t);
2875 if (std::distance(s_itr_,s_end_) < 11)
2879 initial_itr,
std::min(initial_itr + 11, s_end_),
2881 token_list_.push_back(
t);
2887 !((
'$' == *s_itr_) &&
2895 initial_itr,
std::min(initial_itr + 4, s_end_),
2897 token_list_.push_back(
t);
2904 t.set_symbol(initial_itr, s_itr_, base_itr_);
2905 token_list_.push_back(
t);
2910 #ifndef exprtk_disable_string_capabilities
2916 if (std::distance(s_itr_,s_end_) < 2)
2918 t.set_error(token::e_err_string, s_itr_, s_end_, base_itr_);
2919 token_list_.push_back(
t);
2926 bool escaped_found =
false;
2927 bool escaped =
false;
2929 while (!is_end(s_itr_))
2933 t.set_error(token::e_err_string, initial_itr, s_itr_, base_itr_);
2934 token_list_.push_back(
t);
2938 else if (!escaped && (
'\\' == *s_itr_))
2940 escaped_found =
true;
2948 if (
'\'' == *s_itr_)
2954 !is_end(s_itr_) && (
'0' == *(s_itr_)) &&
2955 ((s_itr_ + 4) <= s_end_)
2958 const bool x_separator = (
'X' == std::toupper(*(s_itr_ + 1)));
2963 if (!(x_separator && both_digits))
2965 t.set_error(token::e_err_string, initial_itr, s_itr_, base_itr_);
2966 token_list_.push_back(
t);
2982 t.set_error(token::e_err_string, initial_itr, s_itr_, base_itr_);
2983 token_list_.push_back(
t);
2989 t.set_string(initial_itr, s_itr_, base_itr_);
2992 std::string parsed_string(initial_itr,s_itr_);
2996 t.set_error(token::e_err_string, initial_itr, s_itr_, base_itr_);
2997 token_list_.push_back(
t);
3004 static_cast<std::size_t
>(std::distance(base_itr_,initial_itr)));
3007 token_list_.push_back(
t);
3053 throw std::invalid_argument(
"token_scanner() - Invalid stride value");
3059 if (g.token_list_.size() >= stride_)
3061 for (std::size_t i = 0; i < (g.token_list_.size() - stride_ + 1); ++i)
3069 const token& t0 = g.token_list_[i];
3071 if (!
operator()(t0))
3080 const token& t0 = g.token_list_[i ];
3081 const token& t1 = g.token_list_[i + 1];
3083 if (!
operator()(t0, t1))
3092 const token& t0 = g.token_list_[i ];
3093 const token& t1 = g.token_list_[i + 1];
3094 const token& t2 = g.token_list_[i + 2];
3096 if (!
operator()(t0, t1, t2))
3105 const token& t0 = g.token_list_[i ];
3106 const token& t1 = g.token_list_[i + 1];
3107 const token& t2 = g.token_list_[i + 2];
3108 const token& t3 = g.token_list_[i + 3];
3110 if (!
operator()(t0, t1, t2, t3))
3120 return (g.token_list_.size() - stride_ + 1);
3154 std::size_t changes = 0;
3156 for (std::size_t i = 0; i < g.token_list_.size(); ++i)
3158 if (modify(g.token_list_[i])) changes++;
3176 throw std::invalid_argument(
"token_inserter() - Invalid stride value");
3182 if (g.token_list_.empty())
3184 else if (g.token_list_.size() < stride_)
3187 std::size_t changes = 0;
3189 typedef std::pair<std::size_t, token> insert_t;
3190 std::vector<insert_t> insert_list;
3191 insert_list.reserve(10000);
3193 for (std::size_t i = 0; i < (g.token_list_.size() - stride_ + 1); ++i)
3195 int insert_index = -1;
3200 case 1 : insert_index = insert(g.token_list_[i],
t);
3203 case 2 : insert_index = insert(g.token_list_[i], g.token_list_[i + 1],
t);
3206 case 3 : insert_index = insert(g.token_list_[i], g.token_list_[i + 1], g.token_list_[i + 2],
t);
3209 case 4 : insert_index = insert(g.token_list_[i], g.token_list_[i + 1], g.token_list_[i + 2], g.token_list_[i + 3],
t);
3212 case 5 : insert_index = insert(g.token_list_[i], g.token_list_[i + 1], g.token_list_[i + 2], g.token_list_[i + 3], g.token_list_[i + 4],
t);
3216 if ((insert_index >= 0) && (insert_index <= (
static_cast<int>(stride_) + 1)))
3218 insert_list.push_back(insert_t(i,
t));
3223 if (!insert_list.empty())
3227 std::size_t insert_index = 0;
3229 for (std::size_t i = 0; i < g.token_list_.size(); ++i)
3231 token_list.push_back(g.token_list_[i]);
3234 (insert_index < insert_list.size()) &&
3235 (insert_list[insert_index].first == i)
3238 token_list.push_back(insert_list[insert_index].second);
3243 std::swap(g.token_list_,token_list);
3249 #define token_inserter_empty_body \
3269 #undef token_inserter_empty_body
3273 const std::size_t stride_;
3286 if (g.token_list_.empty())
3291 case 2 :
return process_stride_2(g);
3292 case 3 :
return process_stride_3(g);
3307 std::size_t changes = 0;
3310 token_list.reserve(10000);
3312 for (
int i = 0; i < static_cast<int>(g.
token_list_.size() - 1); ++i)
3318 if (!join(g[i], g[i + 1],
t))
3320 token_list.push_back(g[i]);
3324 token_list.push_back(
t);
3330 if (
static_cast<std::size_t
>(i) >= (g.
token_list_.size() - 1))
3337 assert(token_list.size() <= g.
token_list_.size());
3349 std::size_t changes = 0;
3352 token_list.reserve(10000);
3354 for (
int i = 0; i < static_cast<int>(g.
token_list_.size() - 2); ++i)
3360 if (!join(g[i], g[i + 1], g[i + 2],
t))
3362 token_list.push_back(g[i]);
3366 token_list.push_back(
t);
3372 if (
static_cast<std::size_t
>(i) >= (g.
token_list_.size() - 2))
3380 assert(token_list.size() <= g.
token_list_.size());
3398 printf(
"Token[%02d] @ %03d %6s --> '%s'\n",
3399 static_cast<int>(i),
3400 static_cast<int>(
t.position),
3401 t.to_str(
t.type).c_str(),
3418 ignore_set_.insert(symbol);
3425 new_token.value =
"*";
3426 new_token.position = t1.position;
3430 if (ignore_set_.end() != ignore_set_.find(t0.value))
3434 else if (!t0.value.empty() && (
'$' == t0.value[0]))
3442 if (ignore_set_.end() != ignore_set_.find(t1.value))
3460 return (match) ? 1 : -1;
3483 t.position = t0.position;
3492 t.position = t0.position;
3501 t.position = t0.position;
3510 t.position = t0.position;
3519 t.position = t0.position;
3528 t.position = t0.position;
3537 t.position = t0.position;
3546 t.position = t0.position;
3555 t.position = t0.position;
3564 t.position = t0.position;
3573 t.position = t0.position;
3582 t.position = t0.position;
3591 t.position = t0.position;
3600 t.position = t0.position;
3613 t.position = t0.position;
3635 t.position = t0.position;
3648 using lexer::token_scanner::operator();
3657 if (!stack_.empty())
3660 t.value = stack_.top().first;
3661 t.position = stack_.top().second;
3673 return error_token_;
3679 stack_ = std::stack<std::pair<char,std::size_t> >();
3681 error_token_.clear();
3707 else if (c != stack_.top().first)
3725 std::stack<std::pair<char,std::size_t> >
stack_;
3729 template <
typename T>
3734 using lexer::token_scanner::operator();
3743 return error_list_.empty();
3748 error_list_.clear();
3754 if (token::e_number ==
t.type)
3760 error_list_.push_back(current_index_);
3771 return error_list_.size();
3776 if (i < error_list_.size())
3777 return error_list_[i];
3784 error_list_.clear();
3801 bool remove(
const std::string& target_symbol)
3803 const replace_map_t::iterator itr = replace_map_.find(target_symbol);
3805 if (replace_map_.end() == itr)
3808 replace_map_.erase(itr);
3814 const std::string& replace_symbol,
3817 const replace_map_t::iterator itr = replace_map_.find(target_symbol);
3819 if (replace_map_.end() != itr)
3824 replace_map_[target_symbol] = std::make_pair(replace_symbol,token_type);
3831 replace_map_.clear();
3840 if (replace_map_.empty())
3843 const replace_map_t::iterator itr = replace_map_.find(
t.value);
3845 if (replace_map_.end() != itr)
3847 t.value = itr->second.first;
3848 t.type = itr->second.second;
3864 typedef std::pair<lexer::token::token_type,lexer::token::token_type>
token_pair_t;
3869 using lexer::token_scanner::operator();
3901 return error_list_.empty();
3906 const set_t::value_type p = std::make_pair(t0.type,t1.type);
3908 if (invalid_bracket_check(t0.type,t1.type))
3910 error_list_.push_back(std::make_pair(t0,t1));
3912 else if (invalid_comb_.find(p) != invalid_comb_.end())
3914 error_list_.push_back(std::make_pair(t0,t1));
3922 return error_list_.size();
3925 std::pair<lexer::token,lexer::token>
error(
const std::size_t index)
3927 if (index < error_list_.size())
3929 return error_list_[index];
3934 return std::make_pair(error_token,error_token);
3940 error_list_.clear();
3947 invalid_comb_.insert(std::make_pair(base,
t));
3977 default :
return false;
3997 default :
return true ;
4011 default :
return true ;
4021 default :
return false;
4038 typedef std::set<token_triplet_t>
set_t;
4042 using lexer::token_scanner::operator();
4068 return error_list_.empty();
4073 const set_t::value_type p = std::make_pair(t0.type,std::make_pair(t1.type,t2.type));
4075 if (invalid_comb_.find(p) != invalid_comb_.end())
4077 error_list_.push_back(std::make_pair(t0,t1));
4085 return error_list_.size();
4088 std::pair<lexer::token,lexer::token>
error(
const std::size_t index)
4090 if (index < error_list_.size())
4092 return error_list_[index];
4097 return std::make_pair(error_token,error_token);
4103 error_list_.clear();
4110 invalid_comb_.insert(std::make_pair(t0,std::make_pair(t1,t2)));
4113 set_t invalid_comb_;
4114 std::vector<std::pair<lexer::token,lexer::token> > error_list_;
4121 if (token_scanner_list.end() != std::find(token_scanner_list.begin(),
4122 token_scanner_list.end (),
4128 token_scanner_list.push_back(scanner);
4135 if (token_modifier_list.end() != std::find(token_modifier_list.begin(),
4136 token_modifier_list.end (),
4142 token_modifier_list.push_back(modifier);
4149 if (token_joiner_list.end() != std::find(token_joiner_list.begin(),
4150 token_joiner_list.end (),
4156 token_joiner_list.push_back(joiner);
4163 if (token_inserter_list.end() != std::find(token_inserter_list.begin(),
4164 token_inserter_list.end (),
4170 token_inserter_list.push_back(inserter);
4179 for (std::size_t i = 0; i < token_modifier_list.size(); ++i)
4188 error_token_modifier = token_modifier_list[i];
4201 for (std::size_t i = 0; i < token_joiner_list.size(); ++i)
4210 error_token_joiner = token_joiner_list[i];
4223 for (std::size_t i = 0; i < token_inserter_list.size(); ++i)
4232 error_token_inserter = token_inserter_list[i];
4245 for (std::size_t i = 0; i < token_scanner_list.size(); ++i)
4254 error_token_scanner = token_scanner_list[i];
4282 inline bool init(
const std::string& str)
4284 if (!lexer_.process(str))
4309 store_current_token_ = current_token_;
4315 current_token_ = store_current_token_;
4320 current_token_ = lexer_.next_token();
4325 return current_token_;
4330 return lexer_.peek_next_token();
4341 if (e_advance == mode)
4349 if (current_token().type != ttype)
4354 advance_token(mode);
4360 const std::string&
value,
4364 (current_token().type != ttype) ||
4371 advance_token(mode);
4384 advance_token(mode);
4391 switch (current_token().type)
4399 default :
return false;
4402 advance_token(mode);
4409 switch (current_token().type)
4417 default :
return false;
4420 advance_token(mode);
4427 switch (current_token().type)
4429 case token_t::e_lbracket :
4430 case token_t::e_lcrlbracket :
4431 case token_t::e_lsqrbracket :
break;
4432 default :
return false;
4435 advance_token(mode);
4442 switch (current_token().type)
4444 case token_t::e_rbracket :
4445 case token_t::e_rcrlbracket :
4446 case token_t::e_rsqrbracket :
break;
4447 default :
return false;
4450 advance_token(mode);
4457 return token_is(
"for" , mode) ||
4458 token_is(
"while" , mode) ||
4459 token_is(
"repeat", mode) ;
4464 return (lexer_.peek_next_token().type == ttype);
4480 template <
typename T>
4497 : base_size_(vv.base_size_)
4509 if (!data_ref_.empty())
4511 for (std::size_t i = 0; i < data_ref_.size(); ++i)
4513 (*data_ref_[i]) =
data;
4535 assert(index < size_);
4536 return data_[index];
4541 assert(index < size_);
4542 return data_[index];
4547 data_ref_.push_back(data_ref);
4548 exprtk_debug((
"vector_view::set_ref() - data_ref: %p data_ref_.size(): %lu\n",
4549 reinterpret_cast<void*
>(data_ref),
4556 std::remove(data_ref_.begin(), data_ref_.end(), data_ref),
4558 exprtk_debug((
"vector_view::remove_ref() - data_ref: %p data_ref_.size(): %lu\n",
4559 reinterpret_cast<void*
>(data_ref),
4565 if ((new_size > 0) && (new_size <= base_size_))
4568 exprtk_debug((
"vector_view::set_size() - data_: %p size: %lu\n",
4569 reinterpret_cast<void*
>(data_),
4574 exprtk_debug((
"vector_view::set_size() - error invalid new_size: %lu base_size: %lu\n",
4588 template <
typename T>
4590 const std::size_t
size,
const std::size_t offset = 0)
4595 template <
typename T>
4597 const std::size_t
size,
const std::size_t offset = 0)
4602 template <
typename T>
class results_context;
4604 template <
typename T>
4635 : parameter_list_(pl)
4640 return parameter_list_.empty();
4645 return parameter_list_.size();
4650 return parameter_list_[index];
4655 return parameter_list_[index];
4660 return parameter_list_[0];
4665 return parameter_list_[0];
4670 return parameter_list_.back();
4675 return parameter_list_.back();
4685 template <
typename ViewType>
4721 return static_cast<value_t*
>(data_ + ts_.size);
4726 return static_cast<value_t*
>(data_ + ts_.size);
4769 template <
typename IntType>
4775 i =
static_cast<IntType
>(v_);
4780 template <
typename UIntType>
4788 u =
static_cast<UIntType
>(v_);
4797 template <
typename StringView>
4798 inline std::string
to_str(
const StringView& view)
4800 return std::string(view.begin(),view.size());
4803 #ifndef exprtk_disable_return_statement
4811 template <
typename T>
4822 : results_available_(false)
4827 if (results_available_)
4828 return parameter_list_.size();
4835 return parameter_list_[index];
4840 return parameter_list_[index];
4846 (index < parameter_list_.size()) &&
4847 (parameter_list_[index].type == type_store_t::e_scalar)
4850 const scalar_t scalar(parameter_list_[index]);
4858 template <
typename OutputIterator>
4859 inline bool get_vector(
const std::size_t& index, OutputIterator out_itr)
const
4862 (index < parameter_list_.size()) &&
4863 (parameter_list_[index].type == type_store_t::e_vector)
4866 const vector_t vector(parameter_list_[index]);
4867 for (std::size_t i = 0; i < vector.
size(); ++i)
4869 *(out_itr++) = vector[i];
4878 inline bool get_vector(
const std::size_t& index, std::vector<T>& out)
const
4880 return get_vector(index,std::back_inserter(out));
4883 inline bool get_string(
const std::size_t& index, std::string& out)
const
4886 (index < parameter_list_.size()) &&
4887 (parameter_list_[index].type == type_store_t::e_string)
4890 const string_t str(parameter_list_[index]);
4902 results_available_ =
false;
4911 results_available_ =
true;
4917 #ifndef exprtk_disable_return_statement
5001 case e_add :
return "+" ;
5002 case e_sub :
return "-" ;
5003 case e_mul :
return "*" ;
5004 case e_div :
return "/" ;
5005 case e_mod :
return "%" ;
5006 case e_pow :
return "^" ;
5013 case e_lt :
return "<" ;
5014 case e_lte :
return "<=" ;
5015 case e_eq :
return "==" ;
5017 case e_ne :
return "!=" ;
5019 case e_gte :
return ">=" ;
5020 case e_gt :
return ">" ;
5021 case e_and :
return "and" ;
5022 case e_or :
return "or" ;
5023 case e_xor :
return "xor" ;
5024 case e_nand :
return "nand";
5025 case e_nor :
return "nor" ;
5026 case e_xnor :
return "xnor";
5027 default :
return "N/A" ;
5042 namespace loop_unroll
5045 #ifndef exprtk_disable_superscalar_unroll
5055 : batch_size(loop_batch_size )
5056 , remainder (vsize % batch_size)
5057 , upper_bound(static_cast<int>(vsize - (remainder ? loop_batch_size : 0)))
5066 #ifdef exprtk_enable_debugging
5067 inline void dump_ptr(
const std::string& s,
const void* ptr,
const std::size_t
size = 0)
5073 static_cast<unsigned int>(
size)));
5078 template <
typename T>
5079 inline void dump_vector(
const std::string& vec_name,
const T*
data,
const std::size_t
size)
5081 printf(
"----- %s (%p) -----\n",
5083 static_cast<const void*
>(
data));
5085 for (std::size_t i = 0; i <
size; ++i)
5087 printf(
"%8.3f\t",
data[i]);
5090 printf(
"---------------------\n");
5093 inline void dump_ptr(
const std::string&,
const void*) {}
5094 inline void dump_ptr(
const std::string&,
const void*,
const std::size_t) {}
5095 template <
typename T>
5096 inline void dump_vector(
const std::string&,
const T*,
const std::size_t) {}
5099 template <
typename T>
5134 if (
data && destruct && (0 == ref_count))
5136 dump_ptr(
"~vec_data_store::control_block() data",
data);
5212 control_block::destroy(control_block_);
5219 const std::size_t final_size = min_size(control_block_, vds.
control_block_);
5222 control_block_->size = final_size;
5224 if (control_block_->destruct || (0 == control_block_->data))
5226 control_block::destroy(control_block_);
5238 return control_block_->data;
5243 return control_block_->data;
5248 return control_block_->size;
5253 return control_block_->data;
5258 #ifdef exprtk_enable_debugging
5262 (control_block_->destruct ?
'T' :
'F')));
5264 for (std::size_t i = 0; i <
size(); ++i)
5286 const std::size_t size0 = cb0->
size;
5287 const std::size_t size1 = cb1->
size;
5292 return (size0) ? size0 : size1;
5302 template <
typename T>
5307 case e_abs :
return numeric::abs (arg);
5308 case e_acos :
return numeric::acos (arg);
5309 case e_acosh :
return numeric::acosh(arg);
5310 case e_asin :
return numeric::asin (arg);
5311 case e_asinh :
return numeric::asinh(arg);
5312 case e_atan :
return numeric::atan (arg);
5313 case e_atanh :
return numeric::atanh(arg);
5314 case e_ceil :
return numeric::ceil (arg);
5315 case e_cos :
return numeric::cos (arg);
5316 case e_cosh :
return numeric::cosh (arg);
5317 case e_exp :
return numeric::exp (arg);
5318 case e_expm1 :
return numeric::expm1(arg);
5319 case e_floor :
return numeric::floor(arg);
5320 case e_log :
return numeric::log (arg);
5321 case e_log10 :
return numeric::log10(arg);
5323 case e_log1p :
return numeric::log1p(arg);
5324 case e_neg :
return numeric::neg (arg);
5325 case e_pos :
return numeric::pos (arg);
5326 case e_round :
return numeric::round(arg);
5327 case e_sin :
return numeric::sin (arg);
5328 case e_sinc :
return numeric::sinc (arg);
5329 case e_sinh :
return numeric::sinh (arg);
5330 case e_sqrt :
return numeric::sqrt (arg);
5331 case e_tan :
return numeric::tan (arg);
5332 case e_tanh :
return numeric::tanh (arg);
5333 case e_cot :
return numeric::cot (arg);
5334 case e_sec :
return numeric::sec (arg);
5335 case e_csc :
return numeric::csc (arg);
5336 case e_r2d :
return numeric::r2d (arg);
5337 case e_d2r :
return numeric::d2r (arg);
5338 case e_d2g :
return numeric::d2g (arg);
5339 case e_g2d :
return numeric::g2d (arg);
5340 case e_notl :
return numeric::notl (arg);
5341 case e_sgn :
return numeric::sgn (arg);
5342 case e_erf :
return numeric::erf (arg);
5343 case e_erfc :
return numeric::erfc (arg);
5344 case e_ncdf :
return numeric::ncdf (arg);
5345 case e_frac :
return numeric::frac (arg);
5346 case e_trunc :
return numeric::trunc(arg);
5348 default :
exprtk_debug((
"numeric::details::process_impl<T> - Invalid unary operation.\n"));
5349 return std::numeric_limits<T>::quiet_NaN();
5353 template <
typename T>
5358 case e_add :
return (arg0 + arg1);
5359 case e_sub :
return (arg0 - arg1);
5360 case e_mul :
return (arg0 * arg1);
5361 case e_div :
return (arg0 / arg1);
5362 case e_mod :
return modulus<T>(arg0,arg1);
5363 case e_pow :
return pow<T>(arg0,arg1);
5364 case e_atan2 :
return atan2<T>(arg0,arg1);
5365 case e_min :
return std::min<T>(arg0,arg1);
5366 case e_max :
return std::max<T>(arg0,arg1);
5367 case e_logn :
return logn<T>(arg0,arg1);
5368 case e_lt :
return (arg0 < arg1) ? T(1) : T(0);
5369 case e_lte :
return (arg0 <= arg1) ? T(1) : T(0);
5370 case e_eq :
return std::equal_to<T>()(arg0,arg1) ? T(1) : T(0);
5371 case e_ne :
return std::not_equal_to<T>()(arg0,arg1) ? T(1) : T(0);
5372 case e_gte :
return (arg0 >= arg1) ? T(1) : T(0);
5373 case e_gt :
return (arg0 > arg1) ? T(1) : T(0);
5374 case e_and :
return and_opr <T>(arg0,arg1);
5375 case e_nand :
return nand_opr<T>(arg0,arg1);
5376 case e_or :
return or_opr <T>(arg0,arg1);
5377 case e_nor :
return nor_opr <T>(arg0,arg1);
5378 case e_xor :
return xor_opr <T>(arg0,arg1);
5379 case e_xnor :
return xnor_opr<T>(arg0,arg1);
5380 case e_root :
return root <T>(arg0,arg1);
5381 case e_roundn :
return roundn <T>(arg0,arg1);
5382 case e_equal :
return equal <T>(arg0,arg1);
5383 case e_nequal :
return nequal <T>(arg0,arg1);
5384 case e_hypot :
return hypot <T>(arg0,arg1);
5385 case e_shr :
return shr <T>(arg0,arg1);
5386 case e_shl :
return shl <T>(arg0,arg1);
5388 default :
exprtk_debug((
"numeric::details::process_impl<T> - Invalid binary operation.\n"));
5389 return std::numeric_limits<T>::quiet_NaN();
5393 template <
typename T>
5398 case e_add :
return (arg0 + arg1);
5399 case e_sub :
return (arg0 - arg1);
5400 case e_mul :
return (arg0 * arg1);
5401 case e_div :
return (arg0 / arg1);
5402 case e_mod :
return arg0 % arg1;
5403 case e_pow :
return pow<T>(arg0,arg1);
5404 case e_min :
return std::min<T>(arg0,arg1);
5405 case e_max :
return std::max<T>(arg0,arg1);
5406 case e_logn :
return logn<T>(arg0,arg1);
5407 case e_lt :
return (arg0 < arg1) ? T(1) : T(0);
5408 case e_lte :
return (arg0 <= arg1) ? T(1) : T(0);
5409 case e_eq :
return (arg0 == arg1) ? T(1) : T(0);
5410 case e_ne :
return (arg0 != arg1) ? T(1) : T(0);
5411 case e_gte :
return (arg0 >= arg1) ? T(1) : T(0);
5412 case e_gt :
return (arg0 > arg1) ? T(1) : T(0);
5413 case e_and :
return ((arg0 != T(0)) && (arg1 != T(0))) ? T(1) : T(0);
5414 case e_nand :
return ((arg0 != T(0)) && (arg1 != T(0))) ? T(0) : T(1);
5415 case e_or :
return ((arg0 != T(0)) || (arg1 != T(0))) ? T(1) : T(0);
5416 case e_nor :
return ((arg0 != T(0)) || (arg1 != T(0))) ? T(0) : T(1);
5417 case e_xor :
return arg0 ^ arg1;
5418 case e_xnor :
return !(arg0 ^ arg1);
5419 case e_root :
return root<T>(arg0,arg1);
5420 case e_equal :
return arg0 == arg1;
5421 case e_nequal :
return arg0 != arg1;
5422 case e_hypot :
return hypot<T>(arg0,arg1);
5423 case e_shr :
return arg0 >> arg1;
5424 case e_shl :
return arg0 << arg1;
5426 default :
exprtk_debug((
"numeric::details::process_impl<IntType> - Invalid binary operation.\n"));
5427 return std::numeric_limits<T>::quiet_NaN();
5432 template <
typename T>
5438 template <
typename T>
5445 template <
typename Node>
5459 template <
typename Node>
5460 struct node_depth_base;
5462 template <
typename T>
5473 e_for , e_switch , e_mswitch , e_return ,
5521 return std::numeric_limits<T>::quiet_NaN();
5540 template <
typename T>
5545 return std::not_equal_to<double>()(0.0,v);
5550 return std::not_equal_to<long double>()(0.0L,v);
5555 return std::not_equal_to<float>()(0.0f,v);
5558 template <
typename T>
5561 return std::not_equal_to<T>()(T(0),node->
value());
5564 template <
typename T>
5567 return std::not_equal_to<T>()(T(0),node.first->value());
5570 template <
typename T>
5573 return std::equal_to<T>()(T(0),node->
value());
5576 template <
typename T>
5579 return std::equal_to<T>()(T(0),node.first->value());
5582 template <
typename T>
5588 template <
typename T>
5594 template <
typename T>
5600 template <
typename T>
5606 template <
typename T>
5612 template <
typename T>
5629 template <
typename T>
5635 template <
typename T>
5641 template <
typename T>
5647 template <
typename T>
5653 template <
typename T>
5659 template <
typename T>
5665 template <
typename T>
5671 template <
typename T>
5677 template <
typename T>
5683 template <
typename T>
5688 switch (node->
type())
5701 default :
return false;
5708 template <
typename T>
5718 template <
typename T>
5724 template <
typename T>
5730 template <
typename T>
5736 template <
typename T>
5742 template <
typename T>
5748 template <
typename T>
5754 template <
typename T>
class unary_node;
5756 template <
typename T>
5767 template <
typename T>
5770 return (0 != node) &&
5775 template <std::
size_t N,
typename T>
5778 for (std::size_t i = 0; i < N; ++i)
5780 if (0 == b[i])
return false;
5786 template <
typename T,
5788 template <
typename,
typename>
class Sequence>
5791 for (std::size_t i = 0; i < b.size(); ++i)
5793 if (0 == b[i])
return false;
5799 template <std::
size_t N,
typename T>
5802 for (std::size_t i = 0; i < N; ++i)
5813 template <
typename T,
5815 template <
typename,
typename>
class Sequence>
5818 for (std::size_t i = 0; i < b.size(); ++i)
5829 template <
typename Node>
5842 std::vector<node_pp_t> node_delete_list;
5843 node_delete_list.reserve(1000);
5845 collect_nodes(
root, node_delete_list);
5847 for (std::size_t i = 0; i < node_delete_list.size(); ++i)
5850 exprtk_debug((
"ncd::delete_nodes() - deleting: %p\n",
reinterpret_cast<void*
>(node)));
5860 std::deque<node_ptr_t> node_list;
5861 node_list.push_back(
root);
5862 node_delete_list.push_back(&
root);
5865 child_node_delete_list.reserve(1000);
5867 while (!node_list.empty())
5869 node_list.front()->collect_nodes(child_node_delete_list);
5871 if (!child_node_delete_list.empty())
5873 for (std::size_t i = 0; i < child_node_delete_list.size(); ++i)
5875 node_pp_t& node = child_node_delete_list[i];
5879 exprtk_debug((
"ncd::collect_nodes() - null node encountered.\n"));
5882 node_list.push_back(*node);
5885 node_delete_list.insert(
5886 node_delete_list.end(),
5887 child_node_delete_list.begin(), child_node_delete_list.end());
5889 child_node_delete_list.clear();
5892 node_list.pop_front();
5895 std::reverse(node_delete_list.begin(), node_delete_list.end());
5899 template <
typename NodeAllocator,
typename T, std::
size_t N>
5902 for (std::size_t i = 0; i < N; ++i)
5908 template <
typename NodeAllocator,
5911 template <
typename,
typename>
class Sequence>
5914 for (std::size_t i = 0; i < b.size(); ++i)
5922 template <
typename NodeAllocator,
typename T>
5931 ::delete_nodes(node);
5934 template <
typename T>
5940 ::delete_nodes(node);
5944 template <
typename Node>
5964 depth = 1 + (node ? node->node_depth() : 0);
5975 depth = 1 + (branch.first ? branch.first->node_depth() : 0);
5982 template <std::
size_t N>
5989 for (std::size_t i = 0; i < N; ++i)
5991 if (branch[i].first)
5993 depth =
std::max(depth,branch[i].first->node_depth());
6004 template <
typename BranchType>
6007 return std::max(compute_node_depth(n0), compute_node_depth(n1));
6010 template <
typename BranchType>
6011 std::size_t
max_node_depth(
const BranchType& n0,
const BranchType& n1,
const BranchType& n2)
const
6013 return std::max(compute_node_depth(n0),
6014 std::max(compute_node_depth(n1), compute_node_depth(n2)));
6017 template <
typename BranchType>
6019 const BranchType& n2,
const BranchType& n3)
const
6022 std::max(compute_node_depth(n0), compute_node_depth(n1)),
6023 std::max(compute_node_depth(n2), compute_node_depth(n3)));
6026 template <
typename BranchType>
6031 depth = 1 + max_node_depth(n0, n1);
6038 template <
typename BranchType>
6040 const BranchType& n2)
const
6044 depth = 1 + max_node_depth(n0, n1, n2);
6051 template <
typename BranchType>
6053 const BranchType& n2,
const BranchType& n3)
const
6057 depth = 1 + max_node_depth(n0, n1, n2, n3);
6064 template <
typename Allocator,
6065 template <
typename,
typename>
class Sequence>
6070 for (std::size_t i = 0; i < branch_list.size(); ++i)
6074 depth =
std::max(depth, compute_node_depth(branch_list[i]));
6083 template <
typename Allocator,
6084 template <
typename,
typename>
class Sequence>
6089 for (std::size_t i = 0; i < branch_list.size(); ++i)
6091 if (branch_list[i].first)
6093 depth =
std::max(depth, compute_node_depth(branch_list[i].first));
6106 template <
typename NodeSequence>
6108 const bool deletable,
6109 NodeSequence& delete_node_list)
const
6111 if ((0 != node) && deletable)
6113 delete_node_list.push_back(
const_cast<node_ptr_t*
>(&node));
6117 template <
typename NodeSequence>
6119 NodeSequence& delete_node_list)
const
6121 collect(branch.first, branch.second, delete_node_list);
6124 template <
typename NodeSequence>
6126 NodeSequence& delete_node_list)
const
6131 template <std::
size_t N,
typename NodeSequence>
6133 NodeSequence& delete_node_list)
const
6135 for (std::size_t i = 0; i < N; ++i)
6137 collect(branch[i].first, branch[i].second, delete_node_list);
6141 template <
typename Allocator,
6142 template <
typename,
typename>
class Sequence,
6143 typename NodeSequence>
6144 void collect(
const Sequence<nb_pair_t, Allocator>& branch,
6145 NodeSequence& delete_node_list)
const
6147 for (std::size_t i = 0; i < branch.size(); ++i)
6149 collect(branch[i].first, branch[i].second, delete_node_list);
6153 template <
typename Allocator,
6154 template <
typename,
typename>
class Sequence,
6155 typename NodeSequence>
6156 void collect(
const Sequence<node_ptr_t, Allocator>& branch_list,
6157 NodeSequence& delete_node_list)
const
6159 for (std::size_t i = 0; i < branch_list.size(); ++i)
6161 collect(branch_list[i],
branch_deletable(branch_list[i]), delete_node_list);
6165 template <
typename Boolean,
6166 typename AllocatorT,
6167 typename AllocatorB,
6168 template <
typename,
typename>
class Sequence,
6169 typename NodeSequence>
6170 void collect(
const Sequence<node_ptr_t, AllocatorT>& branch_list,
6171 const Sequence<Boolean, AllocatorB>& branch_deletable_list,
6172 NodeSequence& delete_node_list)
const
6174 for (std::size_t i = 0; i < branch_list.size(); ++i)
6176 collect(branch_list[i], branch_deletable_list[i], delete_node_list);
6181 template <
typename Type>
6200 return value_at(index);
6205 return vector_size();
6210 return vector_base_size();
6254 assert(index < size_);
6265 return vector_size();
6277 template <
typename Allocator,
6278 template <
typename,
typename>
class Sequence>
6293 assert(index < sequence_.size());
6294 return (&sequence_[index]);
6299 return sequence_.size();
6304 return vector_size();
6322 : vec_view_(vec_view)
6324 assert(vec_view_.size() > 0);
6329 vec_view_.set_ref(ref);
6334 vec_view_.remove_ref(ref);
6351 assert(index < vec_view_.size());
6352 return (&vec_view_[index]);
6357 return vec_view_.size();
6362 return vec_view_.base_size();
6379 const std::size_t& vec_size)
6382 , vec_view_holder_(*vec_view_holder.rebaseable_instance())
6385 assert(size_ <= vector_base_size());
6395 assert(index < vector_size());
6401 return vec_view_holder_.size();
6406 return vec_view_holder_.base_size();
6416 return &vec_view_holder_;
6425 const std::size_t size_;
6434 : vector_holder_base_(new(buffer)array_vector_impl(vec,vec_size))
6438 : vector_holder_base_(new(buffer)array_vector_impl(vds.
data(),vds.
size()))
6441 template <
typename Allocator>
6443 : vector_holder_base_(new(buffer)sequence_vector_impl<Allocator,std::vector>(vec))
6447 : vector_holder_base_(new(buffer)vector_view_impl(vec))
6451 : vector_holder_base_(new(buffer)resizable_vector_impl(vec_holder, vds.
data(), vds.
size()))
6456 return (*vector_holder_base_)[index];
6461 return vector_holder_base_->size();
6466 return vector_holder_base_->base_size();
6471 return vector_holder_base_->data();
6478 vector_holder_base_->set_ref(ref);
6486 vector_holder_base_->remove_ref(ref);
6492 return vector_holder_base_->rebaseable();
6497 return vector_holder_base_->rebaseable_instance();
6509 template <
typename T>
6516 return std::numeric_limits<T>::quiet_NaN();
6525 template <
typename T, std::
size_t N>
6528 const std::size_t& index)
6530 if (b && (index < N))
6536 template <
typename T>
6545 template <std::
size_t N,
typename T>
6570 template <
typename T>
6571 class null_eq_node
exprtk_final :
public expression_node<T>
6579 : equality_(equality)
6587 const T v = branch_.first->value();
6591 return equality_ ? T(1) : T(0);
6593 return equality_ ? T(0) : T(1);
6603 return branch_.first;
6608 return branch_.first;
6627 template <
typename T>
6659 template <
typename T>
6662 template <
typename T>
6665 template <
typename T>
6680 #ifndef exprtk_disable_string_capabilities
6681 template <
typename T>
6691 virtual std::string
str ()
const = 0;
6695 virtual std::size_t
size()
const = 0;
6698 template <
typename T>
6711 rp_.n0_c = std::make_pair<bool,std::size_t>(
true, 0);
6712 rp_.n1_c = std::make_pair<bool,std::size_t>(
true, v.size());
6713 rp_.cache.first = rp_.n0_c.second;
6714 rp_.cache.second = rp_.n1_c.second;
6719 return std::numeric_limits<T>::quiet_NaN();
6739 return value_.data();
6744 return value_.size();
6767 template <
typename T>
6784 return numeric::process<T>
6785 (operation_,branch_.first->value());
6800 return branch_.first;
6805 return branch_.first && branch_.first->valid();
6810 branch_.second =
false;
6829 template <
typename T>
6842 init_branches<2>(branch_, branch0, branch1);
6848 return numeric::process<T>
6851 branch_[0].first->value(),
6852 branch_[1].first->value()
6869 return branch_[index].first;
6875 branch_[0].first && branch_[0].first->valid() &&
6876 branch_[1].first && branch_[1].first->valid() ;
6895 template <
typename T,
typename Operation>
6905 init_branches<2>(branch_, branch0, branch1);
6911 const T arg0 = branch_[0].first->value();
6912 const T arg1 = branch_[1].first->value();
6923 return Operation::operation();
6929 return branch_[index].first;
6935 branch_[0].first && branch_[0].first->valid() &&
6936 branch_[1].first && branch_[1].first->valid() ;
6951 branch_t branch_[2];
6954 template <
typename T>
6968 init_branches<3>(branch_, branch0, branch1, branch2);
6974 const T arg0 = branch_[0].first->value();
6975 const T arg1 = branch_[1].first->value();
6976 const T arg2 = branch_[2].first->value();
6980 case e_inrange :
return (arg1 < arg0) ? T(0) : ((arg1 > arg2) ? T(0) : T(1));
6982 case e_clamp :
return (arg1 < arg0) ? arg0 : (arg1 > arg2 ? arg2 : arg1);
6984 case e_iclamp :
if ((arg1 <= arg0) || (arg1 >= arg2))
6987 return ((T(2) * arg1 <= (arg2 + arg0)) ? arg0 : arg2);
6989 default :
exprtk_debug((
"trinary_node::value() - Error: Invalid operation\n"));
6990 return std::numeric_limits<T>::quiet_NaN();
7002 branch_[0].first && branch_[0].first->valid() &&
7003 branch_[1].first && branch_[1].first->valid() &&
7004 branch_[2].first && branch_[2].first->valid() ;
7023 template <
typename T>
7038 init_branches<4>(branch_, branch0, branch1, branch2, branch3);
7043 return std::numeric_limits<T>::quiet_NaN();
7064 branch_[0].first && branch_[0].first->valid() &&
7065 branch_[1].first && branch_[1].first->valid() &&
7066 branch_[2].first && branch_[2].first->valid() &&
7067 branch_[3].first && branch_[3].first->valid() ;
7076 template <
typename T>
7097 return consequent_.first->value();
7099 return alternative_.first->value();
7110 condition_ .first && condition_ .first->valid() &&
7111 consequent_ .first && consequent_ .first->valid() &&
7112 alternative_.first && alternative_.first->valid() ;
7125 (condition_, consequent_, alternative_);
7135 template <
typename T>
7155 return consequent_.first->value();
7157 return std::numeric_limits<T>::quiet_NaN();
7168 condition_ .first && condition_ .first->valid() &&
7169 consequent_.first && consequent_.first->valid() ;
7186 branch_t condition_;
7187 branch_t consequent_;
7190 #ifndef exprtk_disable_break_continue
7191 template <
typename T>
7205 template <
typename T>
7220 const T result = return_.first ?
7221 return_.first->value() :
7222 std::numeric_limits<T>::quiet_NaN();
7226 #if !defined(_MSC_VER) && !defined(__NVCOMPILER)
7227 return std::numeric_limits<T>::quiet_NaN();
7251 template <
typename T>
7259 #if !defined(_MSC_VER) && !defined(__NVCOMPILER)
7260 return std::numeric_limits<T>::quiet_NaN();
7275 : iteration_count_(0)
7277 , max_loop_iterations_(loop_runtime_check_->max_loop_iterations)
7278 , loop_type_(lp_typ)
7280 assert(loop_runtime_check_);
7285 iteration_count_ = initial_value;
7291 (0 == loop_runtime_check_) ||
7292 ((++iteration_count_ <= max_loop_iterations_) && loop_runtime_check_->check())
7299 ctxt.
loop = loop_type_;
7302 loop_runtime_check_->handle_runtime_violation(ctxt);
7313 template <
typename T>
7335 result = loop_body_.first->value();
7349 condition_.first && condition_.first->
valid() &&
7350 loop_body_.first && loop_body_.first->valid() ;
7370 template <
typename T>
7386 assert(parent_t::valid());
7398 result = parent_t::loop_body_.first->value();
7405 template <
typename T>
7427 result = loop_body_.first->value();
7429 while (
is_false(condition_.first));
7442 condition_.first && condition_.first->
valid() &&
7443 loop_body_.first && loop_body_.first->valid() ;
7463 template <
typename T>
7479 assert(parent_t::valid());
7490 result = parent_t::loop_body_.first->value();
7498 template <
typename T>
7522 if (initialiser_.first)
7523 initialiser_.first->value();
7525 if (incrementor_.first)
7529 result = loop_body_.first->value();
7530 incrementor_.first->value();
7537 result = loop_body_.first->value();
7551 return condition_.first && loop_body_.first;
7565 (initialiser_, condition_, incrementor_, loop_body_);
7576 template <
typename T>
7591 :
parent_t(initialiser, condition, incrementor, loop_body)
7594 assert(parent_t::valid());
7603 if (parent_t::initialiser_.first)
7604 parent_t::initialiser_.first->value();
7606 if (parent_t::incrementor_.first)
7610 result = parent_t::loop_body_.first->value();
7611 parent_t::incrementor_.first->value();
7618 result = parent_t::loop_body_.first->value();
7626 #ifndef exprtk_disable_break_continue
7627 template <
typename T>
7639 assert(parent_t::valid());
7646 while (
is_true(parent_t::condition_))
7650 result = parent_t::loop_body_.first->value();
7664 template <
typename T>
7666 :
public while_loop_bc_node<T>
7667 ,
public loop_runtime_checker
7680 assert(parent_t::valid());
7693 result = parent_t::loop_body_.first->value();
7707 template <
typename T>
7719 assert(parent_t::valid());
7730 result = parent_t::loop_body_.first->value();
7739 while (
is_false(parent_t::condition_.first));
7745 template <
typename T>
7747 :
public repeat_until_loop_bc_node<T>
7748 ,
public loop_runtime_checker
7761 assert(parent_t::valid());
7774 result = parent_t::loop_body_.first->value();
7789 template <
typename T>
7801 :
parent_t(initialiser, condition, incrementor, loop_body)
7803 assert(parent_t::valid());
7810 if (parent_t::initialiser_.first)
7811 parent_t::initialiser_.first->value();
7813 if (parent_t::incrementor_.first)
7815 while (
is_true(parent_t::condition_))
7819 result = parent_t::loop_body_.first->value();
7828 parent_t::incrementor_.first->value();
7833 while (
is_true(parent_t::condition_))
7837 result = parent_t::loop_body_.first->value();
7852 template <
typename T>
7854 :
public for_loop_bc_node<T>
7855 ,
public loop_runtime_checker
7867 :
parent_t(initialiser, condition, incrementor, loop_body)
7870 assert(parent_t::valid());
7879 if (parent_t::initialiser_.first)
7880 parent_t::initialiser_.first->value();
7882 if (parent_t::incrementor_.first)
7888 result = parent_t::loop_body_.first->value();
7897 parent_t::incrementor_.first->value();
7906 result = parent_t::loop_body_.first->value();
7922 template <
typename T>
7930 template <
typename Allocator,
7931 template <
typename,
typename>
class Sequence>
7932 explicit switch_node(
const Sequence<expression_ptr,Allocator>& arg_list)
7934 if (1 != (arg_list.size() & 1))
7937 arg_list_.resize(arg_list.size());
7939 for (std::size_t i = 0; i < arg_list.size(); ++i)
7941 if (arg_list[i] && arg_list[i]->valid())
7957 const std::size_t upper_bound = (arg_list_.size() - 1);
7959 for (std::size_t i = 0; i < upper_bound; i += 2)
7966 return consequent->
value();
7970 return arg_list_[upper_bound].first->value();
7980 return !arg_list_.empty();
7998 template <
typename T,
typename Switch_N>
8005 template <
typename Allocator,
8006 template <
typename,
typename>
class Sequence>
8017 template <
typename T>
8018 class multi_switch_node
exprtk_final :
public expression_node<T>
8025 template <
typename Allocator,
8026 template <
typename,
typename>
class Sequence>
8029 if (0 != (arg_list.size() & 1))
8032 arg_list_.resize(arg_list.size());
8034 for (std::size_t i = 0; i < arg_list.size(); ++i)
8036 if (arg_list[i] && arg_list[i]->valid())
8052 const std::size_t upper_bound = (arg_list_.size() - 1);
8056 for (std::size_t i = 0; i < upper_bound; i += 2)
8063 result = consequent->
value();
8077 return !arg_list_.empty() && (0 == (arg_list_.size() % 2));
8095 template <
typename T>
8104 virtual const T&
ref()
const = 0;
8107 template <
typename T>
8117 : value_(&null_value)
8124 inline bool operator <(
const variable_node<T>& v)
const
8154 template <
typename T>
8155 T variable_node<T>::null_value = T(std::numeric_limits<T>::quiet_NaN());
8157 template <
typename T>
8166 , n0_c (std::make_pair(false,0))
8167 , n1_c (std::make_pair(false,0))
8168 , cache(std::make_pair(0,0))
8175 n0_c = std::make_pair(
false,0);
8176 n1_c = std::make_pair(
false,0);
8177 cache = std::make_pair(0,0);
8182 if (n0_e.first && n0_e.second)
8195 if (n1_e.first && n1_e.second)
8211 return ( n0_c.first && n1_c.first) &&
8212 (!n0_e.first && !n1_e.first);
8217 return ( n0_e.first && n1_e.first) &&
8218 (!n0_c.first && !n1_c.first);
8221 bool operator() (std::size_t& r0, std::size_t& r1,
8226 else if (n0_e.first)
8235 else if (n1_e.first)
8253 #ifndef exprtk_enable_range_runtime_checks
8256 return range_runtime_check(r0, r1,
size);
8262 return (n1_c.second - n0_c.second);
8267 return (cache.second - cache.first);
8270 std::pair<bool,expression_node_ptr>
n0_e;
8271 std::pair<bool,expression_node_ptr>
n1_e;
8276 #ifdef exprtk_enable_range_runtime_checks
8277 bool range_runtime_check(
const std::size_t r0,
8278 const std::size_t r1,
8279 const std::size_t
size)
const
8283 throw std::runtime_error(
"range error: (r0 < 0) || (r0 > size)");
8291 throw std::runtime_error(
"range error: (r1 < 0) || (r1 > size)");
8302 template <
typename T>
8303 class string_base_node;
8305 template <
typename T>
8328 template <
typename T>
8339 virtual std::size_t
size ()
const = 0;
8354 template <
typename T>
8356 :
public expression_node <T>
8357 ,
public vector_interface<T>
8367 : vector_holder_(vh)
8368 , vds_((*vector_holder_).
size(),(*vector_holder_)[0])
8370 vector_holder_->set_ref(&vds_.ref());
8374 : vector_holder_(vh)
8381 vector_holder_->remove_ref(&vds_.ref());
8386 return vds().data()[0];
8406 return vector_holder_;
8411 return vec_holder().size();
8416 return vec_holder().base_size();
8431 return (*vector_holder_);
8436 return (*vector_holder_);
8445 template <
typename T>
8455 : vector_holder_(vh)
8465 assert(vector_holder_);
8466 return static_cast<T
>(vector_holder_->size());
8476 return vector_holder_ && vector_holder_->size();
8481 return vector_holder_;
8486 vector_holder_t* vector_holder_;
8489 template <
typename T>
8491 :
public expression_node<T>
8492 ,
public ivariable <T>
8504 : vector_holder_(vec_holder)
8505 , vector_base_((*vec_holder)[0])
8514 return *access_vector();
8519 return *access_vector();
8524 return *access_vector();
8537 vector_node_.first &&
8538 index_.first->valid() &&
8539 vector_node_.first->valid();
8544 return (*vector_holder_);
8556 (vector_node_, index_);
8563 vector_node_.first->value();
8573 template <
typename T>
8586 const std::size_t index,
8589 , vector_holder_(vec_holder)
8590 , vector_base_((*vec_holder)[0])
8598 return *access_vector();
8603 return *access_vector();
8608 return *access_vector();
8620 vector_node_.first &&
8621 vector_node_.first->valid();
8626 return (*vector_holder_);
8643 vector_node_.first->value();
8644 return (vector_base_ + index_);
8653 template <
typename T>
8669 : vector_holder_(vec_holder)
8670 , vector_base_((*vec_holder)[0])
8671 , vec_rt_chk_(vec_rt_chk)
8672 , max_vector_index_(vector_holder_->
size() - 1)
8681 return *access_vector();
8686 return *access_vector();
8691 return *access_vector();
8704 vector_node_.first &&
8705 index_.first->valid() &&
8706 vector_node_.first->valid();
8711 return (*vector_holder_);
8723 (vector_node_, index_);
8731 vector_node_.first->value();
8733 if (index <= max_vector_index_)
8735 return (vector_holder_->data() + index);
8738 assert(vec_rt_chk_);
8741 context.
base_ptr =
reinterpret_cast<void*
>(vector_base_);
8742 context.
end_ptr =
reinterpret_cast<void*
>(vector_base_ + vector_holder_->size());
8743 context.
access_ptr =
reinterpret_cast<void*
>(vector_base_ + index);
8746 return vec_rt_chk_->handle_runtime_violation(context) ?
8751 vector_holder_ptr vector_holder_;
8753 branch_t vector_node_;
8759 template <
typename T>
8772 const std::size_t index,
8776 , max_vector_index_(vec_holder->
size() - 1)
8777 , vector_holder_(vec_holder)
8778 , vector_base_((*vec_holder)[0])
8779 , vec_rt_chk_(vec_rt_chk)
8787 return *access_vector();
8792 return *access_vector();
8797 return *access_vector();
8809 vector_node_.first &&
8810 vector_node_.first->valid();
8815 return (*vector_holder_);
8832 vector_node_.first->value();
8834 if (index_ <= max_vector_index_)
8836 return (vector_holder_->data() + index_);
8839 assert(vec_rt_chk_);
8842 context.
base_ptr =
reinterpret_cast<void*
>(vector_base_);
8843 context.
end_ptr =
reinterpret_cast<void*
>(vector_base_ + vector_holder_->size());
8844 context.
access_ptr =
reinterpret_cast<void*
>(vector_base_ + index_);
8847 return vec_rt_chk_->handle_runtime_violation(context) ?
8852 const std::size_t index_;
8853 const std::size_t max_vector_index_;
8854 vector_holder_ptr vector_holder_;
8856 branch_t vector_node_;
8860 template <
typename T>
8862 :
public expression_node<T>
8863 ,
public ivariable <T>
8876 : vector_holder_(vec_holder)
8885 return *access_vector();
8890 return *access_vector();
8895 return *access_vector();
8908 vector_node_.first &&
8909 index_.first->valid() &&
8910 vector_node_.first->valid();
8915 return (*vector_holder_);
8927 (vector_node_, index_);
8934 vector_node_.first->value();
8938 vector_holder_ptr vector_holder_;
8939 branch_t vector_node_;
8943 template <
typename T>
8945 :
public expression_node<T>
8946 ,
public ivariable <T>
8956 const std::size_t index,
8959 , vector_holder_(vec_holder)
8967 vector_node_.first->value();
8973 return *(vector_holder_->data() + index_);
8978 return *(vector_holder_->data() + index_);
8990 vector_node_.first &&
8991 vector_node_.first->valid();
8996 return (*vector_holder_);
9011 const std::size_t index_;
9012 vector_holder_ptr vector_holder_;
9013 branch_t vector_node_;
9016 template <
typename T>
9018 :
public expression_node<T>
9019 ,
public ivariable <T>
9032 : vector_holder_(vec_holder)
9033 , vec_rt_chk_(vec_rt_chk)
9042 return *access_vector();
9047 return *access_vector();
9052 return *access_vector();
9065 vector_node_.first &&
9066 index_.first->valid() &&
9067 vector_node_.first->valid();
9072 return (*vector_holder_);
9084 (vector_node_, index_);
9091 vector_node_.first->value();
9094 if (index <= (vector_holder_->size() - 1))
9096 return (vector_holder_->data() + index);
9099 assert(vec_rt_chk_);
9102 context.
base_ptr =
reinterpret_cast<void*
>(vector_holder_->data());
9103 context.
end_ptr =
reinterpret_cast<void*
>(vector_holder_->data() + vector_holder_->size());
9104 context.
access_ptr =
reinterpret_cast<void*
>(vector_holder_->data() + index);
9107 return vec_rt_chk_->handle_runtime_violation(context) ?
9109 vector_holder_->data() ;
9112 vector_holder_ptr vector_holder_;
9113 branch_t vector_node_;
9118 template <
typename T>
9120 :
public expression_node<T>
9121 ,
public ivariable <T>
9131 const std::size_t index,
9135 , vector_holder_(vec_holder)
9136 , vector_base_((*vec_holder)[0])
9137 , vec_rt_chk_(vec_rt_chk)
9145 return *access_vector();
9150 return *access_vector();
9155 return *access_vector();
9167 vector_node_.first &&
9168 vector_node_.first->valid();
9173 return (*vector_holder_);
9190 vector_node_.first->value();
9192 if (index_ <= vector_holder_->
size() - 1)
9194 return (vector_holder_->data() + index_);
9197 assert(vec_rt_chk_);
9200 context.
base_ptr =
reinterpret_cast<void*
>(vector_base_);
9201 context.
end_ptr =
reinterpret_cast<void*
>(vector_base_ + vector_holder_->size());
9202 context.
access_ptr =
reinterpret_cast<void*
>(vector_base_ + index_);
9205 return vec_rt_chk_->handle_runtime_violation(context) ?
9210 const std::size_t index_;
9211 vector_holder_ptr vector_holder_;
9213 branch_t vector_node_;
9217 template <
typename T>
9218 class vector_assignment_node
exprtk_final :
public expression_node<T>
9225 const std::size_t&
size,
9226 const std::vector<expression_ptr>& initialiser_list,
9227 const bool single_value_initialse)
9228 : vector_base_(vector_base)
9229 , initialiser_list_(initialiser_list)
9231 , single_value_initialse_(single_value_initialse)
9232 , zero_value_initialse_(false)
9233 , const_nonzero_literal_value_initialse_(false)
9234 , single_initialiser_value_(T(0))
9236 if (single_value_initialse_)
9238 if (initialiser_list_.empty())
9239 zero_value_initialse_ =
true;
9241 (initialiser_list_.size() == 1) &&
9243 (T(0) == initialiser_list_[0]->
value())
9246 zero_value_initialse_ =
true;
9250 assert(initialiser_list_.size() == 1);
9254 const_nonzero_literal_value_initialse_ =
true;
9255 single_initialiser_value_ = initialiser_list_[0]->value();
9256 assert(T(0) != single_initialiser_value_);
9264 if (single_value_initialse_)
9266 if (zero_value_initialse_)
9270 else if (const_nonzero_literal_value_initialse_)
9272 for (std::size_t i = 0; i < size_; ++i)
9274 *(vector_base_ + i) = single_initialiser_value_;
9279 for (std::size_t i = 0; i < size_; ++i)
9281 *(vector_base_ + i) = initialiser_list_[0]->
value();
9287 const std::size_t initialiser_list_size = initialiser_list_.size();
9289 for (std::size_t i = 0; i < initialiser_list_size; ++i)
9291 *(vector_base_ + i) = initialiser_list_[i]->
value();
9294 if (initialiser_list_size < size_)
9297 vector_base_ + initialiser_list_size,
9298 (size_ - initialiser_list_size));
9302 return *(vector_base_);
9312 return vector_base_;
9330 mutable T* vector_base_;
9339 template <
typename T>
9354 std::swap(var0_->ref(),var1_->ref());
9355 return var1_->ref();
9369 template <
typename T>
9385 std::swap(var0_->ref(),var1_->ref());
9386 return var1_->ref();
9400 template <
typename T>
9418 , initialised_ (false)
9426 vec0_node_ptr_ = vi->
vec();
9437 vec1_node_ptr_ = vi->
vec();
9441 if (vec0_node_ptr_ && vec1_node_ptr_)
9443 initialised_ =
size() <= base_size();
9454 T* vec0 = vec0_node_ptr_->vds().data();
9455 T* vec1 = vec1_node_ptr_->vds().data();
9457 assert(
size() <= base_size());
9458 const std::size_t n =
size();
9460 for (std::size_t i = 0; i < n; ++i)
9462 std::swap(vec0[i],vec1[i]);
9465 return vec1_node_ptr_->value();
9470 return vec0_node_ptr_;
9475 return vec0_node_ptr_;
9491 vec0_node_ptr_->vec_holder().size(),
9492 vec1_node_ptr_->vec_holder().size());
9498 vec0_node_ptr_->vec_holder().base_size(),
9499 vec1_node_ptr_->vec_holder().base_size());
9520 #ifndef exprtk_disable_string_capabilities
9521 template <
typename T>
9534 : value_(&null_value)
9540 rp_.n0_c = std::make_pair<bool,std::size_t>(
true,0);
9541 rp_.n1_c = std::make_pair<bool,std::size_t>(
true,v.size());
9542 rp_.cache.first = rp_.n0_c.second;
9543 rp_.cache.second = rp_.n1_c.second;
9546 inline bool operator <(
const stringvar_node<T>& v)
const
9553 rp_.n1_c.second = (*value_).size();
9554 rp_.cache.second = rp_.n1_c.second;
9556 return std::numeric_limits<T>::quiet_NaN();
9566 return &(*value_)[0];
9571 return ref().size();
9579 const std::string&
ref()
const
9602 rp_.n0_c = std::make_pair<bool,std::size_t>(
true,0);
9603 rp_.n1_c = std::make_pair<bool,std::size_t>(
true,value_->size() - 1);
9604 rp_.cache.first = rp_.n0_c.second;
9605 rp_.cache.second = rp_.n1_c.second;
9614 template <
typename T>
9615 std::string stringvar_node<T>::null_value = std::string(
"");
9617 template <
typename T>
9627 static std::string null_value;
9639 inline bool operator <(
const string_range_node<T>& v)
const
9646 return std::numeric_limits<T>::quiet_NaN();
9656 return &(*value_)[0];
9661 return ref().size();
9669 inline virtual std::string&
ref()
9674 inline virtual const std::string&
ref()
const
9696 std::string* value_;
9700 template <
typename T>
9701 std::string string_range_node<T>::null_value = std::string(
"");
9703 template <
typename T>
9705 :
public expression_node <T>
9706 ,
public string_base_node<T>
9707 ,
public range_interface <T>
9725 return std::numeric_limits<T>::quiet_NaN();
9735 return value_.data();
9740 return value_.size();
9768 const std::string value_;
9772 template <
typename T>
9790 : initialised_(false)
9793 , base_range_(brange)
9795 range_.n0_c = std::make_pair<bool,std::size_t>(
true,0);
9796 range_.n1_c = std::make_pair<bool,std::size_t>(
true,0);
9797 range_.cache.first = range_.n0_c.second;
9798 range_.cache.second = range_.n1_c.second;
9804 str_base_ptr_ =
dynamic_cast<str_base_ptr>(branch_.first);
9806 if (0 == str_base_ptr_)
9809 str_range_ptr_ =
dynamic_cast<irange_ptr>(branch_.first);
9811 if (0 == str_range_ptr_)
9815 initialised_ = (str_base_ptr_ && str_range_ptr_);
9826 branch_.first->value();
9828 std::size_t str_r0 = 0;
9829 std::size_t str_r1 = 0;
9834 const range_t& range = str_range_ptr_->range_ref();
9836 const std::size_t base_str_size = str_base_ptr_->size();
9839 range (str_r0, str_r1, base_str_size ) &&
9840 base_range_(r0 , r1 , base_str_size - str_r0)
9843 const std::size_t
size = r1 - r0;
9845 range_.n1_c.second =
size;
9846 range_.cache.second = range_.n1_c.second;
9848 value_.assign(str_base_ptr_->base() + str_r0 + r0,
size);
9851 return std::numeric_limits<T>::quiet_NaN();
9866 return value_.size();
9886 return initialised_ && branch_.first;
9910 template <
typename T>
9931 , initialised_(false)
9932 , str0_base_ptr_ (0)
9933 , str1_base_ptr_ (0)
9934 , str0_range_ptr_(0)
9935 , str1_range_ptr_(0)
9937 range_.n0_c = std::make_pair<bool,std::size_t>(
true,0);
9938 range_.n1_c = std::make_pair<bool,std::size_t>(
true,0);
9940 range_.cache.first = range_.n0_c.second;
9941 range_.cache.second = range_.n1_c.second;
9945 str0_base_ptr_ =
dynamic_cast<str_base_ptr>(branch(0));
9947 if (0 == str0_base_ptr_)
9950 str0_range_ptr_ =
dynamic_cast<irange_ptr>(branch(0));
9952 if (0 == str0_range_ptr_)
9958 str1_base_ptr_ =
dynamic_cast<str_base_ptr>(branch(1));
9960 if (0 == str1_base_ptr_)
9963 str1_range_ptr_ =
dynamic_cast<irange_ptr>(branch(1));
9965 if (0 == str1_range_ptr_)
9969 initialised_ = str0_base_ptr_ &&
9982 std::size_t str0_r0 = 0;
9983 std::size_t str0_r1 = 0;
9985 std::size_t str1_r0 = 0;
9986 std::size_t str1_r1 = 0;
9988 const range_t& range0 = str0_range_ptr_->range_ref();
9989 const range_t& range1 = str1_range_ptr_->range_ref();
9992 range0(str0_r0, str0_r1, str0_base_ptr_->size()) &&
9993 range1(str1_r0, str1_r1, str1_base_ptr_->size())
9996 const std::size_t size0 = (str0_r1 - str0_r0);
9997 const std::size_t size1 = (str1_r1 - str1_r0);
9999 value_.assign(str0_base_ptr_->base() + str0_r0, size0);
10000 value_.append(str1_base_ptr_->base() + str1_r0, size1);
10002 range_.
n1_c.second = value_.size();
10003 range_.cache.second = range_.n1_c.second;
10006 return std::numeric_limits<T>::quiet_NaN();
10021 return value_.size();
10052 mutable std::string value_;
10055 template <
typename T>
10075 , initialised_(false)
10076 , str0_node_ptr_(0)
10077 , str1_node_ptr_(0)
10089 initialised_ = (str0_node_ptr_ && str1_node_ptr_);
10095 branch(0)->value();
10096 branch(1)->value();
10098 std::swap(str0_node_ptr_->ref(), str1_node_ptr_->ref());
10100 return std::numeric_limits<T>::quiet_NaN();
10105 return str0_node_ptr_->str();
10110 return str0_node_ptr_->base();
10115 return str0_node_ptr_->size();
10120 return str0_node_ptr_->range_ref();
10125 return str0_node_ptr_->range_ref();
10145 template <
typename T>
10162 , str0_base_ptr_ (0)
10163 , str1_base_ptr_ (0)
10164 , str0_range_ptr_(0)
10165 , str1_range_ptr_(0)
10166 , initialised_(false)
10170 str0_base_ptr_ =
dynamic_cast<str_base_ptr>(branch(0));
10172 if (0 == str0_base_ptr_)
10180 str0_range_ptr_ = &(range->
range_ref());
10185 str1_base_ptr_ =
dynamic_cast<str_base_ptr>(branch(1));
10187 if (0 == str1_base_ptr_)
10195 str1_range_ptr_ = &(range->
range_ref());
10198 initialised_ = str0_base_ptr_ &&
10208 branch(0)->value();
10209 branch(1)->value();
10211 std::size_t str0_r0 = 0;
10212 std::size_t str0_r1 = 0;
10214 std::size_t str1_r0 = 0;
10215 std::size_t str1_r1 = 0;
10217 const range_t& range0 = (*str0_range_ptr_);
10218 const range_t& range1 = (*str1_range_ptr_);
10221 range0(str0_r0, str0_r1, str0_base_ptr_->size()) &&
10222 range1(str1_r0, str1_r1, str1_base_ptr_->size())
10225 const std::size_t size0 = range0.
cache_size();
10226 const std::size_t size1 = range1.
cache_size();
10227 const std::size_t max_size =
std::min(size0,size1);
10235 while (s0 < upper_bound)
10237 #define exprtk_loop(N) \
10238 std::swap(s0[N], s1[N]); \
10242 #ifndef exprtk_disable_superscalar_unroll
10259 #define case_stmt(N) \
10260 case N : { std::swap(s0[i], s1[i]); ++i; } \
10261 exprtk_fallthrough \
10263 #ifndef exprtk_disable_superscalar_unroll
10280 return std::numeric_limits<T>::quiet_NaN();
10305 template <
typename T>
10313 : value_(&null_value)
10322 return T((*value_).size());
10335 template <
typename T>
10336 const std::string stringvar_size_node<T>::null_value = std::string(
"");
10338 template <
typename T>
10354 str_base_ptr_ =
dynamic_cast<str_base_ptr>(branch_.first);
10362 branch_.first->value();
10363 return T(str_base_ptr_->size());
10373 return str_base_ptr_;
10389 str_base_ptr str_base_ptr_;
10404 template <
typename T,
typename AssignmentProcess = asn_assignment>
10406 :
public binary_node <T>
10407 ,
public string_base_node<T>
10408 ,
public range_interface <T>
10426 , initialised_(false)
10427 , str0_base_ptr_ (0)
10428 , str1_base_ptr_ (0)
10429 , str0_node_ptr_ (0)
10430 , str1_range_ptr_(0)
10435 str0_base_ptr_ =
dynamic_cast<str_base_ptr>(branch(0));
10440 str1_base_ptr_ =
dynamic_cast<str_base_ptr>(branch(1));
10442 if (0 == str1_base_ptr_)
10450 str1_range_ptr_ = &(range->
range_ref());
10453 initialised_ = str0_base_ptr_ &&
10463 branch(1)->value();
10465 std::size_t r0 = 0;
10466 std::size_t r1 = 0;
10468 const range_t& range = (*str1_range_ptr_);
10470 if (range(r0, r1, str1_base_ptr_->size()))
10472 AssignmentProcess::execute(
10473 str0_node_ptr_->ref(),
10474 str1_base_ptr_->base() + r0, (r1 - r0));
10476 branch(0)->value();
10479 return std::numeric_limits<T>::quiet_NaN();
10484 return str0_node_ptr_->str();
10489 return str0_node_ptr_->base();
10494 return str0_node_ptr_->size();
10499 return str0_node_ptr_->range_ref();
10504 return str0_node_ptr_->range_ref();
10520 str_base_ptr str0_base_ptr_;
10521 str_base_ptr str1_base_ptr_;
10522 strvar_node_ptr str0_node_ptr_;
10523 range_ptr str1_range_ptr_;
10526 template <
typename T,
typename AssignmentProcess = asn_assignment>
10528 :
public binary_node <T>
10529 ,
public string_base_node<T>
10530 ,
public range_interface <T>
10549 , initialised_(false)
10550 , str0_base_ptr_ (0)
10551 , str1_base_ptr_ (0)
10552 , str0_rng_node_ptr_(0)
10553 , str0_range_ptr_ (0)
10554 , str1_range_ptr_ (0)
10559 str0_base_ptr_ =
dynamic_cast<str_base_ptr>(branch(0));
10565 str0_range_ptr_ = &(range->
range_ref());
10570 str1_base_ptr_ =
dynamic_cast<str_base_ptr>(branch(1));
10572 if (0 == str1_base_ptr_)
10580 str1_range_ptr_ = &(range->
range_ref());
10583 initialised_ = str0_base_ptr_ &&
10585 str0_rng_node_ptr_ &&
10594 branch(0)->value();
10595 branch(1)->value();
10597 std::size_t s0_r0 = 0;
10598 std::size_t s0_r1 = 0;
10600 std::size_t s1_r0 = 0;
10601 std::size_t s1_r1 = 0;
10603 const range_t& range0 = (*str0_range_ptr_);
10604 const range_t& range1 = (*str1_range_ptr_);
10607 range0(s0_r0, s0_r1, str0_base_ptr_->size()) &&
10608 range1(s1_r0, s1_r1, str1_base_ptr_->size())
10611 const std::size_t
size =
std::min((s0_r1 - s0_r0), (s1_r1 - s1_r0));
10614 str1_base_ptr_->base() + s1_r0,
10615 str1_base_ptr_->base() + s1_r0 +
size,
10616 const_cast<char_ptr>(base() + s0_r0));
10619 return std::numeric_limits<T>::quiet_NaN();
10624 return str0_base_ptr_->str();
10629 return str0_base_ptr_->base();
10634 return str0_base_ptr_->size();
10639 return str0_rng_node_ptr_->range_ref();
10644 return str0_rng_node_ptr_->range_ref();
10660 str_base_ptr str0_base_ptr_;
10661 str_base_ptr str1_base_ptr_;
10667 template <
typename T>
10686 , initialised_(false)
10687 , str0_base_ptr_ (0)
10688 , str1_base_ptr_ (0)
10689 , str0_range_ptr_(0)
10690 , str1_range_ptr_(0)
10691 , condition_ (condition )
10692 , consequent_ (consequent )
10693 , alternative_(alternative)
10695 range_.n0_c = std::make_pair<bool,std::size_t>(
true,0);
10696 range_.n1_c = std::make_pair<bool,std::size_t>(
true,0);
10698 range_.cache.first = range_.n0_c.second;
10699 range_.cache.second = range_.n1_c.second;
10705 if (0 == str0_base_ptr_)
10710 if (0 == str0_range_ptr_)
10718 if (0 == str1_base_ptr_)
10723 if (0 == str1_range_ptr_)
10727 initialised_ = str0_base_ptr_ &&
10737 std::size_t r0 = 0;
10738 std::size_t r1 = 0;
10742 consequent_->value();
10744 const range_t& range = str0_range_ptr_->range_ref();
10746 if (range(r0, r1, str0_base_ptr_->size()))
10748 const std::size_t
size = (r1 - r0);
10750 value_.assign(str0_base_ptr_->base() + r0,
size);
10752 range_.n1_c.second = value_.size();
10753 range_.cache.second = range_.n1_c.second;
10760 alternative_->value();
10762 const range_t& range = str1_range_ptr_->range_ref();
10764 if (range(r0, r1, str1_base_ptr_->size()))
10766 const std::size_t
size = (r1 - r0);
10768 value_.assign(str1_base_ptr_->base() + r0,
size);
10770 range_.n1_c.second = value_.size();
10771 range_.cache.second = range_.n1_c.second;
10777 return std::numeric_limits<T>::quiet_NaN();
10792 return value_.size();
10814 condition_ && condition_ ->valid() &&
10815 consequent_ && consequent_ ->valid() &&
10816 alternative_&& alternative_->valid() ;
10822 str_base_ptr str0_base_ptr_;
10823 str_base_ptr str1_base_ptr_;
10824 irange_ptr str0_range_ptr_;
10825 irange_ptr str1_range_ptr_;
10826 mutable range_t range_;
10827 mutable std::string value_;
10834 template <
typename T>
10854 , initialised_(false)
10855 , str0_base_ptr_ (0)
10856 , str0_range_ptr_(0)
10857 , condition_ (condition )
10858 , consequent_(consequent)
10860 range_.n0_c = std::make_pair<bool,std::size_t>(
true,0);
10861 range_.n1_c = std::make_pair<bool,std::size_t>(
true,0);
10863 range_.cache.first = range_.n0_c.second;
10864 range_.cache.second = range_.n1_c.second;
10868 str0_base_ptr_ =
dynamic_cast<str_base_ptr>(branch(0));
10870 if (0 == str0_base_ptr_)
10873 str0_range_ptr_ =
dynamic_cast<irange_ptr>(branch(0));
10875 if (0 == str0_range_ptr_)
10879 initialised_ = str0_base_ptr_ && str0_range_ptr_ ;
10887 consequent_->value();
10889 const range_t& range = str0_range_ptr_->range_ref();
10891 std::size_t r0 = 0;
10892 std::size_t r1 = 0;
10894 if (range(r0, r1, str0_base_ptr_->size()))
10896 const std::size_t
size = (r1 - r0);
10898 value_.assign(str0_base_ptr_->base() + r0,
size);
10900 range_.n1_c.second = value_.size();
10901 range_.cache.second = range_.n1_c.second;
10907 return std::numeric_limits<T>::quiet_NaN();
10922 return value_.size();
10944 condition_ && condition_ ->valid() &&
10945 consequent_ && consequent_ ->valid() ;
10951 str_base_ptr str0_base_ptr_;
10952 irange_ptr str0_range_ptr_;
10953 mutable range_t range_;
10954 mutable std::string value_;
10956 expression_ptr condition_;
10957 expression_ptr consequent_;
10960 template <
typename T,
typename VarArgFunction>
10962 :
public expression_node <T>
10963 ,
public string_base_node<T>
10964 ,
public range_interface <T>
10976 template <
typename Allocator,
10977 template <
typename,
typename>
class Sequence>
10979 : initialised_(false)
10980 , str_base_ptr_ (0)
10981 , str_range_ptr_(0)
10985 if (0 == final_node_.first)
10990 str_base_ptr_ =
dynamic_cast<str_base_ptr>(final_node_.first);
10992 if (0 == str_base_ptr_)
10995 str_range_ptr_ =
dynamic_cast<irange_ptr>(final_node_.first);
10997 if (0 == str_range_ptr_)
11000 if (arg_list.size() > 1)
11002 const std::size_t arg_list_size = arg_list.size() - 1;
11004 arg_list_.resize(arg_list_size);
11006 for (std::size_t i = 0; i < arg_list_size; ++i)
11008 if (arg_list[i] && arg_list[i]->valid())
11019 initialised_ =
true;
11022 initialised_ &= str_base_ptr_ && str_range_ptr_;
11028 if (!arg_list_.empty())
11033 final_node_.first->value();
11035 return std::numeric_limits<T>::quiet_NaN();
11040 return str_base_ptr_->str();
11045 return str_base_ptr_->base();
11050 return str_base_ptr_->size();
11055 return str_range_ptr_->range_ref();
11060 return str_range_ptr_->range_ref();
11072 final_node_.first && final_node_.first->valid();
11094 std::vector<branch_t> arg_list_;
11098 template <
typename T, std::
size_t N>
11105 template <
typename T, std::
size_t N>
11106 inline T
axnb(
const T a,
const T
x,
const T b)
11112 template <
typename T>
11123 #define define_sfop3(NN, OP0, OP1) \
11124 template <typename T> \
11125 struct sf##NN##_op : public sf_base<T> \
11127 typedef typename sf_base<T>::Type const Type; \
11128 static inline T process(Type x, Type y, Type z) \
11132 static inline std::string id() \
11187 #define define_sfop4(NN, OP0, OP1) \
11188 template <typename T> \
11189 struct sf##NN##_op : public sf_base<T> \
11191 typedef typename sf_base<T>::Type const Type; \
11192 static inline T process(Type x, Type y, Type z, Type w) \
11196 static inline std::string id() \
11319 #undef define_sfop3
11320 #undef define_sfop4
11322 template <
typename T,
typename SpecialFunction>
11330 expression_ptr branch0,
11331 expression_ptr branch1,
11332 expression_ptr branch2)
11346 template <
typename T,
typename SpecialFunction>
11347 class sf4_node
exprtk_final :
public quaternary_node<T>
11372 template <
typename T,
typename SpecialFunction>
11373 class sf3_var_node
exprtk_final :
public expression_node<T>
11405 template <
typename T,
typename SpecialFunction>
11440 template <
typename T,
typename VarArgFunction>
11448 template <
typename Allocator,
11449 template <
typename,
typename>
class Sequence>
11451 : initialised_(false)
11453 arg_list_.resize(arg_list.size());
11455 for (std::size_t i = 0; i < arg_list.size(); ++i)
11457 if (arg_list[i] && arg_list[i]->valid())
11468 initialised_ = (arg_list_.size() == arg_list.size());
11484 return initialised_;
11499 std::vector<branch_t> arg_list_;
11503 template <
typename T,
typename VarArgFunction>
11504 class vararg_varnode
exprtk_final :
public expression_node<T>
11510 template <
typename Allocator,
11511 template <
typename,
typename>
class Sequence>
11513 : initialised_(false)
11515 arg_list_.resize(arg_list.size());
11517 for (std::size_t i = 0; i < arg_list.size(); ++i)
11521 variable_node<T>* var_node_ptr =
static_cast<variable_node<T>*
>(arg_list[i]);
11522 arg_list_[i] = (&var_node_ptr->ref());
11531 initialised_ = (arg_list.size() == arg_list_.size());
11547 return initialised_;
11556 template <
typename T,
typename VecFunction>
11588 return ivec_ptr_ && v_.first && v_.first->valid();
11607 template <
typename T>
11623 var_node_ptr_ =
static_cast<variable_node<T>*
>(branch(0));
11629 T& result = var_node_ptr_->ref();
11630 result = branch(1)->value();
11645 template <
typename T>
11661 vec_node_ptr_ =
static_cast<vector_elem_node<T>*
>(branch(0));
11669 T& result = vec_node_ptr_->ref();
11670 result = branch(1)->value();
11685 template <
typename T>
11701 vec_node_ptr_ =
static_cast<vector_elem_rtc_node<T>*
>(branch(0));
11709 T& result = vec_node_ptr_->ref();
11710 result = branch(1)->value();
11725 template <
typename T>
11737 , rbvec_node_ptr_(0)
11741 rbvec_node_ptr_ =
static_cast<rebasevector_elem_node<T>*
>(branch(0));
11749 T& result = rbvec_node_ptr_->ref();
11750 result = branch(1)->value();
11765 template <
typename T>
11777 , rbvec_node_ptr_(0)
11781 rbvec_node_ptr_ =
static_cast<rebasevector_elem_rtc_node<T>*
>(branch(0));
11789 T& result = rbvec_node_ptr_->ref();
11790 result = branch(1)->value();
11805 template <
typename T>
11817 , rbvec_node_ptr_(0)
11821 rbvec_node_ptr_ =
static_cast<rebasevector_celem_node<T>*
>(branch(0));
11829 T& result = rbvec_node_ptr_->ref();
11830 result = branch(1)->value();
11845 template <
typename T>
11867 vds() = vec_node_ptr_->vds();
11875 const T v = branch(1)->value();
11877 T* vec = vds().data();
11882 while (vec < upper_bound)
11884 #define exprtk_loop(N) \
11889 #ifndef exprtk_disable_superscalar_unroll
11903 #define case_stmt(N) \
11904 case N : *vec++ = v; \
11905 exprtk_fallthrough \
11907 #ifndef exprtk_disable_superscalar_unroll
11916 case 1 : *vec++ = v;
11922 return vec_node_ptr_->value();
11927 return vec_node_ptr_;
11932 return vec_node_ptr_;
11944 (vds().size() <= vec_node_ptr_->vec_holder().base_size()) &&
11950 return vec_node_ptr_->vec_holder().size();
11955 return vec_node_ptr_->vec_holder().base_size();
11974 template <
typename T>
11991 , vec0_node_ptr_(0)
11992 , vec1_node_ptr_(0)
11993 , initialised_(false)
11994 , src_is_ivec_(false)
11999 vds() = vec0_node_ptr_->vds();
12005 vds_t::match_sizes(vds(),vec1_node_ptr_->vds());
12013 vec1_node_ptr_ = vi->
vec();
12018 src_is_ivec_ =
true;
12021 vds_t::match_sizes(vds(),vi->
vds());
12028 (
size() <= base_size()) &&
12029 (vds_.size() <= base_size()) &&
12037 branch(1)->value();
12040 return vec0_node_ptr_->value();
12042 T* vec0 = vec0_node_ptr_->vds().data();
12043 T* vec1 = vec1_node_ptr_->vds().data();
12048 while (vec0 < upper_bound)
12050 #define exprtk_loop(N) \
12051 vec0[N] = vec1[N]; \
12055 #ifndef exprtk_disable_superscalar_unroll
12070 #define case_stmt(N,fall_through) \
12071 case N : *vec0++ = *vec1++; \
12074 #ifndef exprtk_disable_superscalar_unroll
12089 return vec0_node_ptr_->value();
12094 return vec0_node_ptr_;
12099 return vec0_node_ptr_;
12109 return initialised_;
12115 vec0_node_ptr_->vec_holder().size(),
12116 vec1_node_ptr_->vec_holder().size());
12122 vec0_node_ptr_->vec_holder().base_size(),
12123 vec1_node_ptr_->vec_holder().base_size());
12145 template <
typename T,
typename Operation>
12161 var_node_ptr_ =
static_cast<variable_node<T>*
>(branch(0));
12169 T& v = var_node_ptr_->ref();
12182 variable_node<T>* var_node_ptr_;
12185 template <
typename T,
typename Operation>
12186 class assignment_vec_elem_op_node
exprtk_final :
public binary_node<T>
12201 vec_node_ptr_ =
static_cast<vector_elem_node<T>*
>(branch(0));
12209 T& v = vec_node_ptr_->ref();
12222 vector_elem_node<T>* vec_node_ptr_;
12225 template <
typename T,
typename Operation>
12226 class assignment_vec_elem_op_rtc_node
exprtk_final :
public binary_node<T>
12241 vec_node_ptr_ =
static_cast<vector_elem_rtc_node<T>*
>(branch(0));
12249 T& v = vec_node_ptr_->ref();
12262 vector_elem_rtc_node<T>* vec_node_ptr_;
12265 template <
typename T,
typename Operation>
12266 class assignment_vec_celem_op_rtc_node
exprtk_final :
public binary_node<T>
12281 vec_node_ptr_ =
static_cast<vector_celem_rtc_node<T>*
>(branch(0));
12289 T& v = vec_node_ptr_->ref();
12305 template <
typename T,
typename Operation>
12317 , rbvec_node_ptr_(0)
12321 rbvec_node_ptr_ =
static_cast<rebasevector_elem_node<T>*
>(branch(0));
12329 T& v = rbvec_node_ptr_->ref();
12342 rebasevector_elem_node<T>* rbvec_node_ptr_;
12345 template <
typename T,
typename Operation>
12346 class assignment_rebasevec_celem_op_node
exprtk_final :
public binary_node<T>
12357 , rbvec_node_ptr_(0)
12361 rbvec_node_ptr_ =
static_cast<rebasevector_celem_node<T>*
>(branch(0));
12369 T& v = rbvec_node_ptr_->ref();
12382 rebasevector_celem_node<T>* rbvec_node_ptr_;
12385 template <
typename T,
typename Operation>
12386 class assignment_rebasevec_elem_op_rtc_node
exprtk_final :
public binary_node<T>
12397 , rbvec_node_ptr_(0)
12401 rbvec_node_ptr_ =
static_cast<rebasevector_elem_rtc_node<T>*
>(branch(0));
12409 T& v = rbvec_node_ptr_->ref();
12422 rebasevector_elem_rtc_node<T>* rbvec_node_ptr_;
12425 template <
typename T,
typename Operation>
12426 class assignment_rebasevec_celem_op_rtc_node
exprtk_final :
public binary_node<T>
12437 , rbvec_node_ptr_(0)
12441 rbvec_node_ptr_ =
static_cast<rebasevector_celem_rtc_node<T>*
>(branch(0));
12449 T& v = rbvec_node_ptr_->ref();
12465 template <
typename T,
typename Operation>
12487 vds() = vec_node_ptr_->vds();
12495 const T v = branch(1)->value();
12497 T* vec = vds().data();
12502 while (vec < upper_bound)
12504 #define exprtk_loop(N) \
12505 Operation::assign(vec[N],v); \
12509 #ifndef exprtk_disable_superscalar_unroll
12523 #define case_stmt(N,fall_through) \
12524 case N : Operation::assign(*vec++,v); \
12527 #ifndef exprtk_disable_superscalar_unroll
12542 return vec_node_ptr_->value();
12547 return vec_node_ptr_;
12552 return vec_node_ptr_;
12564 (
size() <= base_size()) &&
12570 return vec_node_ptr_->vec_holder().size();
12575 return vec_node_ptr_->vec_holder().base_size();
12599 template <
typename T,
typename Operation>
12601 :
public binary_node <T>
12602 ,
public vector_interface<T>
12616 , vec0_node_ptr_(0)
12617 , vec1_node_ptr_(0)
12618 , initialised_(false)
12623 vds() = vec0_node_ptr_->vds();
12629 vec1_node_ptr_->vds() = vds();
12637 vec1_node_ptr_ = vi->
vec();
12638 vec1_node_ptr_->vds() = vi->
vds();
12641 vds_t::match_sizes(vds(),vec1_node_ptr_->vds());
12647 (
size() <= base_size()) &&
12655 branch(0)->value();
12656 branch(1)->value();
12658 T* vec0 = vec0_node_ptr_->vds().data();
12659 const T* vec1 = vec1_node_ptr_->vds().data();
12664 while (vec0 < upper_bound)
12666 #define exprtk_loop(N) \
12667 vec0[N] = Operation::process(vec0[N], vec1[N]); \
12671 #ifndef exprtk_disable_superscalar_unroll
12688 #define case_stmt(N,fall_through) \
12689 case N : { vec0[i] = Operation::process(vec0[i], vec1[i]); ++i; } \
12692 #ifndef exprtk_disable_superscalar_unroll
12707 return vec0_node_ptr_->value();
12712 return vec0_node_ptr_;
12717 return vec0_node_ptr_;
12727 return initialised_;
12733 vec0_node_ptr_->vec_holder().size(),
12734 vec1_node_ptr_->vec_holder().size());
12740 vec0_node_ptr_->vec_holder().base_size(),
12741 vec1_node_ptr_->vec_holder().base_size());
12767 template <
typename T>
12776 , temp_vec_node_(0)
12781 delete temp_vec_node_;
12789 template <
typename T>
12798 return result_ctxt;
12801 template <
typename T>
12822 return result_ctxt;
12825 template <
typename T,
typename Operation>
12827 :
public binary_node <T>
12828 ,
public vector_interface<T>
12845 , vec0_node_ptr_(0)
12846 , vec1_node_ptr_(0)
12847 , initialised_(false)
12849 bool v0_is_ivec =
false;
12850 bool v1_is_ivec =
false;
12862 vec0_node_ptr_ = vi->
vec();
12877 vec1_node_ptr_ = vi->
vec();
12882 if (vec0_node_ptr_ && vec1_node_ptr_)
12889 vds_ =
vds_t(vec0_node_ptr_->vds());
12893 vds_ =
vds_t(vec1_node_ptr_->vds());
12903 (
size() <= base_size()) &&
12912 memory_context_.clear();
12917 branch(0)->value();
12918 branch(1)->value();
12920 const T* vec0 = vec0_node_ptr_->vds().data();
12921 const T* vec1 = vec1_node_ptr_->vds().data();
12922 T* vec2 = vds().data();
12927 while (vec2 < upper_bound)
12929 #define exprtk_loop(N) \
12930 vec2[N] = Operation::process(vec0[N], vec1[N]); \
12934 #ifndef exprtk_disable_superscalar_unroll
12952 #define case_stmt(N) \
12953 case N : { vec2[i] = Operation::process(vec0[i], vec1[i]); ++i; } \
12954 exprtk_fallthrough \
12956 #ifndef exprtk_disable_superscalar_unroll
12972 return (vds().
data())[0];
12977 return memory_context_.temp_vec_node_;
12982 return memory_context_.temp_vec_node_;
12992 return initialised_;
12998 vec0_node_ptr_->vec_holder().size(),
12999 vec1_node_ptr_->vec_holder().size());
13005 vec0_node_ptr_->vec_holder().base_size(),
13006 vec1_node_ptr_->vec_holder().base_size());
13028 template <
typename T,
typename Operation>
13048 , vec0_node_ptr_(0)
13050 bool v0_is_ivec =
false;
13062 vec0_node_ptr_ = vi->
vec();
13067 if (vec0_node_ptr_)
13070 vds() = vec0_node_ptr_->vds();
13072 vds() =
vds_t(vec0_node_ptr_->base_size());
13082 memory_context_.clear();
13087 branch(0)->value();
13088 const T v = branch(1)->value();
13090 const T* vec0 = vec0_node_ptr_->vds().data();
13091 T* vec1 = vds().data();
13096 while (vec0 < upper_bound)
13098 #define exprtk_loop(N) \
13099 vec1[N] = Operation::process(vec0[N], v); \
13103 #ifndef exprtk_disable_superscalar_unroll
13120 #define case_stmt(N,fall_through) \
13121 case N : { vec1[i] = Operation::process(vec0[i], v); ++i; } \
13124 #ifndef exprtk_disable_superscalar_unroll
13139 return (vds().
data())[0];
13144 return memory_context_.temp_vec_node_;
13149 return memory_context_.temp_vec_node_;
13161 (
size() <= base_size()) &&
13167 return vec0_node_ptr_->size();
13172 return vec0_node_ptr_->vec_holder().base_size();
13187 vector_node_ptr vec0_node_ptr_;
13189 memory_context memory_context_;
13192 template <
typename T,
typename Operation>
13194 :
public binary_node <T>
13195 ,
public vector_interface<T>
13212 , vec1_node_ptr_(0)
13214 bool v1_is_ivec =
false;
13226 vec1_node_ptr_ = vi->
vec();
13231 if (vec1_node_ptr_)
13234 vds() = vec1_node_ptr_->vds();
13236 vds() =
vds_t(vec1_node_ptr_->base_size());
13246 memory_context_.clear();
13251 const T v = branch(0)->value();
13252 branch(1)->value();
13254 T* vec0 = vds().data();
13255 const T* vec1 = vec1_node_ptr_->vds().data();
13260 while (vec0 < upper_bound)
13262 #define exprtk_loop(N) \
13263 vec0[N] = Operation::process(v, vec1[N]); \
13267 #ifndef exprtk_disable_superscalar_unroll
13284 #define case_stmt(N,fall_through) \
13285 case N : { vec0[i] = Operation::process(v, vec1[i]); ++i; } \
13288 #ifndef exprtk_disable_superscalar_unroll
13303 return (vds().
data())[0];
13308 return memory_context_.temp_vec_node_;
13313 return memory_context_.temp_vec_node_;
13325 (
size() <= base_size()) &&
13326 (vds_.size() <= base_size()) &&
13332 return vec1_node_ptr_->vec_holder().size();
13337 return vec1_node_ptr_->vec_holder().base_size();
13352 vector_node_ptr vec1_node_ptr_;
13354 memory_context memory_context_;
13357 template <
typename T,
typename Operation>
13359 :
public unary_node <T>
13360 ,
public vector_interface<T>
13375 , vec0_node_ptr_(0)
13377 bool vec0_is_ivec =
false;
13389 vec0_node_ptr_ = vi->
vec();
13390 vec0_is_ivec =
true;
13394 if (vec0_node_ptr_)
13397 vds_ = vec0_node_ptr_->vds();
13399 vds_ =
vds_t(vec0_node_ptr_->base_size());
13409 memory_context_.clear();
13416 const T* vec0 = vec0_node_ptr_->vds().data();
13417 T* vec1 = vds().data();
13422 while (vec0 < upper_bound)
13424 #define exprtk_loop(N) \
13425 vec1[N] = Operation::process(vec0[N]); \
13429 #ifndef exprtk_disable_superscalar_unroll
13446 #define case_stmt(N) \
13447 case N : { vec1[i] = Operation::process(vec0[i]); ++i; } \
13448 exprtk_fallthrough \
13450 #ifndef exprtk_disable_superscalar_unroll
13466 return (vds().
data())[0];
13471 return memory_context_.temp_vec_node_;
13476 return memory_context_.temp_vec_node_;
13491 return vec0_node_ptr_->vec_holder().size();
13496 return vec0_node_ptr_->vec_holder().base_size();
13511 vector_node_ptr vec0_node_ptr_;
13513 memory_context memory_context_;
13516 template <
typename T>
13518 :
public expression_node <T>
13519 ,
public vector_interface<T>
13535 : consequent_node_ptr_ (0)
13536 , alternative_node_ptr_(0)
13537 , temp_vec_node_ (0)
13539 , result_vec_size_ (0)
13540 , initialised_ (false)
13552 consequent_node_ptr_ = ivec_ptr->
vec();
13562 alternative_node_ptr_ = ivec_ptr->
vec();
13566 if (consequent_node_ptr_ && alternative_node_ptr_)
13568 const std::size_t vec_size =
13569 std::max(consequent_node_ptr_ ->vec_holder().base_size(),
13570 alternative_node_ptr_->vec_holder().base_size());
13572 vds_ =
vds_t(vec_size);
13574 consequent_node_ptr_ ->vec_holder(),
13575 alternative_node_ptr_->vec_holder(),
13578 initialised_ = (vec_size > 0);
13581 assert(initialised_);
13586 memory_context_.clear();
13592 T* source_vector = 0;
13593 T* result_vector = vds().data();
13597 result = consequent_.first->value();
13598 source_vector = consequent_node_ptr_->vds().data();
13599 result_vec_size_ = consequent_node_ptr_->size();
13603 result = alternative_.first->value();
13604 source_vector = alternative_node_ptr_->vds().data();
13605 result_vec_size_ = alternative_node_ptr_->size();
13608 for (std::size_t i = 0; i < result_vec_size_; ++i)
13610 result_vector[i] = source_vector[i];
13618 return memory_context_.temp_vec_node_;
13623 return memory_context_.temp_vec_node_;
13635 condition_ .first && condition_ .first->valid() &&
13636 consequent_ .first && consequent_ .first->valid() &&
13637 alternative_.first && alternative_.first->valid() &&
13638 size() <= base_size();
13643 return result_vec_size_;
13649 consequent_node_ptr_ ->vec_holder().base_size(),
13650 alternative_node_ptr_->vec_holder().base_size());
13673 (condition_, consequent_, alternative_);
13678 branch_t condition_;
13679 branch_t consequent_;
13680 branch_t alternative_;
13691 template <
typename T>
13710 std::not_equal_to<T>()
13711 (T(0),branch(0)->
value()) &&
13712 std::not_equal_to<T>()
13713 (T(0),branch(1)->
value())
13718 template <
typename T>
13737 std::not_equal_to<T>()
13738 (T(0),branch(0)->
value()) ||
13739 std::not_equal_to<T>()
13740 (T(0),branch(1)->
value())
13745 template <
typename T,
typename IFunction, std::
size_t N>
13746 class function_N_node
exprtk_final :
public expression_node<T>
13756 : function_((N == func->param_count) ? func : reinterpret_cast<
ifunction*>(0))
13757 , parameter_count_(func->param_count)
13758 , initialised_(false)
13761 template <std::
size_t NumBranches>
13766 #pragma warning(push)
13767 #pragma warning(disable: 4127)
13770 if (N != NumBranches)
13775 for (std::size_t i = 0; i < NumBranches; ++i)
13777 if (b[i] && b[i]->valid())
13783 initialised_ = function_;
13785 return initialised_;
13788 #pragma warning(pop)
13792 inline bool operator <(
const function_N_node<T,IFunction,N>& fn)
const
13794 return this < (&fn);
13801 #pragma warning(push)
13802 #pragma warning(disable: 4127)
13810 #pragma warning(pop)
13821 return initialised_;
13834 template <
typename T_, std::
size_t BranchCount>
13839 for (std::size_t i = 0; i < BranchCount; ++i)
13841 v[i] = b[i].first->value();
13846 template <
typename T_>
13851 v[0] = b[0].first->value();
13852 v[1] = b[1].first->value();
13853 v[2] = b[2].first->value();
13854 v[3] = b[3].first->value();
13855 v[4] = b[4].first->value();
13856 v[5] = b[5].first->value();
13860 template <
typename T_>
13865 v[0] = b[0].first->value();
13866 v[1] = b[1].first->value();
13867 v[2] = b[2].first->value();
13868 v[3] = b[3].first->value();
13869 v[4] = b[4].first->value();
13873 template <
typename T_>
13878 v[0] = b[0].first->value();
13879 v[1] = b[1].first->value();
13880 v[2] = b[2].first->value();
13881 v[3] = b[3].first->value();
13885 template <
typename T_>
13890 v[0] = b[0].first->value();
13891 v[1] = b[1].first->value();
13892 v[2] = b[2].first->value();
13896 template <
typename T_>
13901 v[0] = b[0].first->value();
13902 v[1] = b[1].first->value();
13906 template <
typename T_>
13911 v[0] = b[0].first->value();
13915 template <
typename T_, std::
size_t ParamCount>
13918 template <
typename T_>
13922 {
return f(v[0],v[1],v[2],v[3],v[4],v[5],v[6],v[7],v[8],v[9],v[10],v[11],v[12],v[13],v[14],v[15],v[16],v[17],v[18],v[19]); }
13925 template <
typename T_>
13929 {
return f(v[0],v[1],v[2],v[3],v[4],v[5],v[6],v[7],v[8],v[9],v[10],v[11],v[12],v[13],v[14],v[15],v[16],v[17],v[18]); }
13932 template <
typename T_>
13936 {
return f(v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7], v[8], v[9], v[10], v[11], v[12], v[13], v[14], v[15], v[16], v[17]); }
13939 template <
typename T_>
13943 {
return f(v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7], v[8], v[9], v[10], v[11], v[12], v[13], v[14], v[15], v[16]); }
13946 template <
typename T_>
13950 {
return f(v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7], v[8], v[9], v[10], v[11], v[12], v[13], v[14], v[15]); }
13953 template <
typename T_>
13957 {
return f(v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7], v[8], v[9], v[10], v[11], v[12], v[13], v[14]); }
13960 template <
typename T_>
13964 {
return f(v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7], v[8], v[9], v[10], v[11], v[12], v[13]); }
13967 template <
typename T_>
13971 {
return f(v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7], v[8], v[9], v[10], v[11], v[12]); }
13974 template <
typename T_>
13978 {
return f(v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7], v[8], v[9], v[10], v[11]); }
13981 template <
typename T_>
13985 {
return f(v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7], v[8], v[9], v[10]); }
13988 template <
typename T_>
13992 {
return f(v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7], v[8], v[9]); }
13995 template <
typename T_>
13999 {
return f(v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7], v[8]); }
14002 template <
typename T_>
14006 {
return f(v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7]); }
14009 template <
typename T_>
14013 {
return f(v[0], v[1], v[2], v[3], v[4], v[5], v[6]); }
14016 template <
typename T_>
14020 {
return f(v[0], v[1], v[2], v[3], v[4], v[5]); }
14023 template <
typename T_>
14027 {
return f(v[0], v[1], v[2], v[3], v[4]); }
14030 template <
typename T_>
14034 {
return f(v[0], v[1], v[2], v[3]); }
14037 template <
typename T_>
14041 {
return f(v[0], v[1], v[2]); }
14044 template <
typename T_>
14048 {
return f(v[0], v[1]); }
14051 template <
typename T_>
14055 {
return f(v[0]); }
14066 template <
typename T,
typename IFunction>
14075 : function_((0 == func->param_count) ? func : reinterpret_cast<
ifunction*>(0))
14080 inline bool operator <(
const function_N_node<T,IFunction,0>& fn)
const
14082 return this < (&fn);
14087 return (*function_)();
14105 template <
typename T,
typename VarArgFunction>
14106 class vararg_function_node
exprtk_final :
public expression_node<T>
14113 const std::vector<expression_ptr>& arg_list)
14115 , arg_list_(arg_list)
14117 value_list_.resize(arg_list.size(),std::numeric_limits<T>::quiet_NaN());
14121 inline bool operator <(
const vararg_function_node<T,VarArgFunction>& fn)
const
14123 return this < (&fn);
14128 populate_value_list();
14129 return (*function_)(value_list_);
14144 for (std::size_t i = 0; i < arg_list_.size(); ++i)
14148 node_delete_list.push_back(&arg_list_[i]);
14162 for (std::size_t i = 0; i < arg_list_.size(); ++i)
14164 value_list_[i] = arg_list_[i]->value();
14173 template <
typename T,
typename GenericFunction>
14197 GenericFunction* func =
reinterpret_cast<GenericFunction*
>(0))
14199 , arg_list_(arg_list)
14204 for (std::size_t i = 0; i < vv_list_.size(); ++i)
14207 if (vv && typestore_list_[i].vec_data)
14209 vv->
remove_ref(&typestore_list_[i].vec_data);
14210 typestore_list_[i].vec_data = 0;
14227 expr_as_vec1_store_.resize(arg_list_.size(), T(0) );
14228 typestore_list_ .resize(arg_list_.size(),
type_store_t() );
14231 vv_list_ .resize(arg_list_.size(),
vecview_t(0));
14233 for (std::size_t i = 0; i < arg_list_.size(); ++i)
14237 if (0 == arg_list_[i])
14248 ts.
type = type_store_t::e_vector;
14251 vi->
vec()->vec_holder().rebaseable() &&
14252 vi->
vec()->vec_holder().rebaseable_instance()
14255 vv_list_[i] = vi->
vec()->vec_holder().rebaseable_instance();
14256 vv_list_[i]->set_ref(&ts.
vec_data);
14259 #ifndef exprtk_disable_string_capabilities
14269 ts.
type = type_store_t::e_string;
14271 range_list_[i].data = ts.
data;
14272 range_list_[i].size = ts.
size;
14273 range_list_[i].type_size =
sizeof(char);
14274 range_list_[i].str_node = sbn;
14290 range_list_[i].range =
reinterpret_cast<range_t*
>(0);
14294 range_list_[i].range = &(ri->
range_ref());
14295 range_param_list_.push_back(i);
14307 ts.
data = &var->ref();
14308 ts.
type = type_store_t::e_scalar;
14313 ts.
data =
reinterpret_cast<void*
>(&expr_as_vec1_store_[i]);
14314 ts.
type = type_store_t::e_scalar;
14325 return this < (&fn);
14330 if (populate_value_list())
14332 typedef typename GenericFunction::parameter_list_t parameter_list_t;
14334 return (*function_)(parameter_list_t(typestore_list_));
14337 return std::numeric_limits<T>::quiet_NaN();
14354 for (std::size_t i = 0; i < branch_.size(); ++i)
14356 expr_as_vec1_store_[i] = branch_[i].first->value();
14359 if (!range_param_list_.empty())
14361 assert(range_param_list_.size() <= branch_.size());
14363 for (std::size_t i = 0; i < range_param_list_.size(); ++i)
14365 const std::size_t index = range_param_list_[i];
14369 std::size_t r0 = 0;
14370 std::size_t r1 = 0;
14372 const std::size_t data_size =
14373 #ifndef exprtk_disable_string_capabilities
14379 if (!rp(r0, r1, data_size))
14387 #ifndef exprtk_disable_string_capabilities
14388 if (ts.
type == type_store_t::e_string)
14412 #ifndef exprtk_disable_string_capabilities
14413 template <
typename T,
typename StringFunction>
14424 const std::vector<typename gen_function_t::expression_ptr>& arg_list)
14427 range_.n0_c = std::make_pair<bool,std::size_t>(
true,0);
14428 range_.n1_c = std::make_pair<bool,std::size_t>(
true,0);
14429 range_.cache.first = range_.n0_c.second;
14430 range_.cache.second = range_.n1_c.second;
14436 return this < (&fn);
14441 if (gen_function_t::populate_value_list())
14443 typedef typename StringFunction::parameter_list_t parameter_list_t;
14446 (*gen_function_t::function_)
14449 parameter_list_t(gen_function_t::typestore_list_)
14452 range_.n1_c.second = ret_string_.size();
14453 range_.cache.second = range_.n1_c.second;
14458 return std::numeric_limits<T>::quiet_NaN();
14468 return gen_function_t::function_;
14473 return ret_string_;
14478 return &ret_string_[0];
14483 return ret_string_.size();
14503 template <
typename T,
typename GenericFunction>
14512 const std::size_t& param_seq_index,
14513 const std::vector<typename gen_function_t::expression_ptr>& arg_list)
14515 , param_seq_index_(param_seq_index)
14520 assert(gen_function_t::valid());
14522 if (gen_function_t::populate_value_list())
14524 typedef typename GenericFunction::parameter_list_t parameter_list_t;
14527 (*gen_function_t::function_)
14530 parameter_list_t(gen_function_t::typestore_list_)
14534 return std::numeric_limits<T>::quiet_NaN();
14547 #ifndef exprtk_disable_string_capabilities
14548 template <
typename T,
typename StringFunction>
14557 const std::size_t& param_seq_index,
14558 const std::vector<typename str_function_t::expression_ptr>& arg_list)
14560 , param_seq_index_(param_seq_index)
14565 if (str_function_t::populate_value_list())
14567 typedef typename StringFunction::parameter_list_t parameter_list_t;
14570 (*str_function_t::function_)
14573 str_function_t::ret_string_,
14574 parameter_list_t(str_function_t::typestore_list_)
14577 str_function_t::range_.n1_c.second = str_function_t::ret_string_.size();
14578 str_function_t::range_.cache.second = str_function_t::range_.n1_c.second;
14583 return std::numeric_limits<T>::quiet_NaN();
14599 template <
typename T>
14612 return std::numeric_limits<T>::quiet_NaN();
14616 #ifndef exprtk_disable_return_statement
14617 template <
typename T>
14618 class return_node
exprtk_final :
public generic_function_node<T,null_igenfunc<T> >
14627 return_node(
const std::vector<typename gen_function_t::expression_ptr>& arg_list,
14630 , results_context_(&rc)
14636 (0 != results_context_) &&
14637 gen_function_t::populate_value_list()
14643 assign(parameter_list_t(gen_function_t::typestore_list_));
14648 return std::numeric_limits<T>::quiet_NaN();
14658 return results_context_;
14666 template <
typename T>
14676 : results_context_(&rc )
14677 , return_invoked_ (false)
14687 return_invoked_ =
false;
14688 results_context_->clear();
14690 return body_.first->value();
14694 return_invoked_ =
true;
14696 return std::numeric_limits<T>::quiet_NaN();
14707 return results_context_ && body_.first;
14712 return &return_invoked_;
14727 results_context_t* results_context_;
14733 #define exprtk_define_unary_op(OpName) \
14734 template <typename T> \
14735 struct OpName##_op \
14737 typedef typename functor_t<T>::Type Type; \
14738 typedef typename expression_node<T>::node_type node_t; \
14740 static inline T process(Type v) \
14742 return numeric:: OpName (v); \
14745 static inline node_t type() \
14747 return expression_node<T>::e_##OpName; \
14750 static inline details::operator_type operation() \
14752 return details::e_##OpName; \
14796 #undef exprtk_define_unary_op
14798 template <
typename T>
14810 template <
typename T>
14813 typedef typename opr_base<T>::Type
Type;
14823 template <
typename T>
14826 typedef typename opr_base<T>::Type
Type;
14836 template <
typename T>
14839 typedef typename opr_base<T>::Type
Type;
14849 template <
typename T>
14852 typedef typename opr_base<T>::Type
Type;
14862 template <
typename T>
14865 typedef typename opr_base<T>::Type
Type;
14874 template <
typename T>
14877 typedef typename opr_base<T>::Type
Type;
14886 template <
typename T>
14889 typedef typename opr_base<T>::Type
Type;
14892 static inline T
process(
const std::string& t1,
const std::string& t2) {
return ((t1 < t2) ? T(1) : T(0)); }
14897 template <
typename T>
14900 typedef typename opr_base<T>::Type
Type;
14903 static inline T
process(
const std::string& t1,
const std::string& t2) {
return ((t1 <= t2) ? T(1) : T(0)); }
14908 template <
typename T>
14911 typedef typename opr_base<T>::Type
Type;
14914 static inline T
process(
const std::string& t1,
const std::string& t2) {
return ((t1 > t2) ? T(1) : T(0)); }
14919 template <
typename T>
14922 typedef typename opr_base<T>::Type
Type;
14925 static inline T
process(
const std::string& t1,
const std::string& t2) {
return ((t1 >= t2) ? T(1) : T(0)); }
14930 template <
typename T>
14933 typedef typename opr_base<T>::Type
Type;
14934 static inline T
process(
Type t1,
Type t2) {
return (std::equal_to<T>()(t1,t2) ? T(1) : T(0)); }
14935 static inline T
process(
const std::string& t1,
const std::string& t2) {
return ((t1 == t2) ? T(1) : T(0)); }
14940 template <
typename T>
14943 typedef typename opr_base<T>::Type
Type;
14946 static inline T
process(
const std::string& t1,
const std::string& t2) {
return ((t1 == t2) ? T(1) : T(0)); }
14951 template <
typename T>
14954 typedef typename opr_base<T>::Type
Type;
14956 static inline T
process(
Type t1,
Type t2) {
return (std::not_equal_to<T>()(t1,t2) ? T(1) : T(0)); }
14957 static inline T
process(
const std::string& t1,
const std::string& t2) {
return ((t1 != t2) ? T(1) : T(0)); }
14962 template <
typename T>
14965 typedef typename opr_base<T>::Type
Type;
14972 template <
typename T>
14975 typedef typename opr_base<T>::Type
Type;
14982 template <
typename T>
14985 typedef typename opr_base<T>::Type
Type;
14992 template <
typename T>
14995 typedef typename opr_base<T>::Type
Type;
15002 template <
typename T>
15005 typedef typename opr_base<T>::Type
Type;
15012 template <
typename T>
15015 typedef typename opr_base<T>::Type
Type;
15022 template <
typename T>
15025 typedef typename opr_base<T>::Type
Type;
15027 static inline T
process(
const T&,
const T&) {
return std::numeric_limits<T>::quiet_NaN(); }
15028 static inline T
process(
const std::string& t1,
const std::string& t2) {
return ((std::string::npos != t2.find(t1)) ? T(1) : T(0)); }
15033 template <
typename T>
15036 typedef typename opr_base<T>::Type
Type;
15038 static inline T
process(
const T&,
const T&) {
return std::numeric_limits<T>::quiet_NaN(); }
15044 template <
typename T>
15047 typedef typename opr_base<T>::Type
Type;
15049 static inline T
process(
const T&,
const T&) {
return std::numeric_limits<T>::quiet_NaN(); }
15055 template <
typename T>
15058 typedef typename opr_base<T>::Type
Type;
15060 static inline T
process(
const T& t0,
const T& t1,
const T& t2) {
return ((t0 <= t1) && (t1 <= t2)) ? T(1) : T(0); }
15061 static inline T
process(
const std::string& t0,
const std::string& t1,
const std::string& t2)
15063 return ((t0 <= t1) && (t1 <= t2)) ? T(1) : T(0);
15069 template <
typename T>
15075 template <
typename T>
15078 return n.first->value();
15081 template <
typename T>
15087 template <
typename T>
15093 template <
typename T>
15094 struct vararg_add_op
exprtk_final :
public opr_base<T>
15096 typedef typename opr_base<T>::Type
Type;
15098 template <
typename Type,
15099 typename Allocator,
15100 template <
typename,
typename>
class Sequence>
15101 static inline T
process(
const Sequence<Type,Allocator>& arg_list)
15103 switch (arg_list.size())
15105 case 0 :
return T(0);
15106 case 1 :
return process_1(arg_list);
15107 case 2 :
return process_2(arg_list);
15108 case 3 :
return process_3(arg_list);
15109 case 4 :
return process_4(arg_list);
15110 case 5 :
return process_5(arg_list);
15115 for (std::size_t i = 0; i < arg_list.size(); ++i)
15117 result +=
value(arg_list[i]);
15125 template <
typename Sequence>
15128 return value(arg_list[0]);
15131 template <
typename Sequence>
15134 return value(arg_list[0]) +
value(arg_list[1]);
15137 template <
typename Sequence>
15140 return value(arg_list[0]) +
value(arg_list[1]) +
15141 value(arg_list[2]) ;
15144 template <
typename Sequence>
15147 return value(arg_list[0]) +
value(arg_list[1]) +
15151 template <
typename Sequence>
15154 return value(arg_list[0]) +
value(arg_list[1]) +
15156 value(arg_list[4]) ;
15160 template <
typename T>
15161 struct vararg_mul_op
exprtk_final :
public opr_base<T>
15163 typedef typename opr_base<T>::Type
Type;
15165 template <
typename Type,
15166 typename Allocator,
15167 template <
typename,
typename>
class Sequence>
15168 static inline T
process(
const Sequence<Type,Allocator>& arg_list)
15170 switch (arg_list.size())
15172 case 0 :
return T(0);
15173 case 1 :
return process_1(arg_list);
15174 case 2 :
return process_2(arg_list);
15175 case 3 :
return process_3(arg_list);
15176 case 4 :
return process_4(arg_list);
15177 case 5 :
return process_5(arg_list);
15180 T result = T(
value(arg_list[0]));
15182 for (std::size_t i = 1; i < arg_list.size(); ++i)
15184 result *=
value(arg_list[i]);
15192 template <
typename Sequence>
15195 return value(arg_list[0]);
15198 template <
typename Sequence>
15201 return value(arg_list[0]) *
value(arg_list[1]);
15204 template <
typename Sequence>
15207 return value(arg_list[0]) *
value(arg_list[1]) *
15208 value(arg_list[2]) ;
15211 template <
typename Sequence>
15214 return value(arg_list[0]) *
value(arg_list[1]) *
15218 template <
typename Sequence>
15221 return value(arg_list[0]) *
value(arg_list[1]) *
15223 value(arg_list[4]) ;
15227 template <
typename T>
15228 struct vararg_avg_op
exprtk_final :
public opr_base<T>
15230 typedef typename opr_base<T>::Type
Type;
15232 template <
typename Type,
15233 typename Allocator,
15234 template <
typename,
typename>
class Sequence>
15235 static inline T
process(
const Sequence<Type,Allocator>& arg_list)
15237 switch (arg_list.size())
15239 case 0 :
return T(0);
15240 case 1 :
return process_1(arg_list);
15241 case 2 :
return process_2(arg_list);
15242 case 3 :
return process_3(arg_list);
15243 case 4 :
return process_4(arg_list);
15244 case 5 :
return process_5(arg_list);
15249 template <
typename Sequence>
15252 return value(arg_list[0]);
15255 template <
typename Sequence>
15258 return (
value(arg_list[0]) +
value(arg_list[1])) / T(2);
15261 template <
typename Sequence>
15264 return (
value(arg_list[0]) +
value(arg_list[1]) +
value(arg_list[2])) / T(3);
15267 template <
typename Sequence>
15270 return (
value(arg_list[0]) +
value(arg_list[1]) +
15271 value(arg_list[2]) +
value(arg_list[3])) / T(4);
15274 template <
typename Sequence>
15277 return (
value(arg_list[0]) +
value(arg_list[1]) +
15279 value(arg_list[4])) / T(5);
15283 template <
typename T>
15284 struct vararg_min_op
exprtk_final :
public opr_base<T>
15286 typedef typename opr_base<T>::Type
Type;
15288 template <
typename Type,
15289 typename Allocator,
15290 template <
typename,
typename>
class Sequence>
15291 static inline T
process(
const Sequence<Type,Allocator>& arg_list)
15293 switch (arg_list.size())
15295 case 0 :
return T(0);
15296 case 1 :
return process_1(arg_list);
15297 case 2 :
return process_2(arg_list);
15298 case 3 :
return process_3(arg_list);
15299 case 4 :
return process_4(arg_list);
15300 case 5 :
return process_5(arg_list);
15303 T result = T(
value(arg_list[0]));
15305 for (std::size_t i = 1; i < arg_list.size(); ++i)
15307 const T v =
value(arg_list[i]);
15318 template <
typename Sequence>
15321 return value(arg_list[0]);
15324 template <
typename Sequence>
15327 return std::min<T>(
value(arg_list[0]),
value(arg_list[1]));
15330 template <
typename Sequence>
15333 return std::min<T>(std::min<T>(
value(arg_list[0]),
value(arg_list[1])),
value(arg_list[2]));
15336 template <
typename Sequence>
15339 return std::min<T>(
15340 std::min<T>(
value(arg_list[0]),
value(arg_list[1])),
15341 std::min<T>(
value(arg_list[2]),
value(arg_list[3])));
15344 template <
typename Sequence>
15347 return std::min<T>(
15348 std::min<T>(std::min<T>(
value(arg_list[0]),
value(arg_list[1])),
15349 std::min<T>(
value(arg_list[2]),
value(arg_list[3]))),
15350 value(arg_list[4]));
15354 template <
typename T>
15355 struct vararg_max_op
exprtk_final :
public opr_base<T>
15357 typedef typename opr_base<T>::Type
Type;
15359 template <
typename Type,
15360 typename Allocator,
15361 template <
typename,
typename>
class Sequence>
15362 static inline T
process(
const Sequence<Type,Allocator>& arg_list)
15364 switch (arg_list.size())
15366 case 0 :
return T(0);
15367 case 1 :
return process_1(arg_list);
15368 case 2 :
return process_2(arg_list);
15369 case 3 :
return process_3(arg_list);
15370 case 4 :
return process_4(arg_list);
15371 case 5 :
return process_5(arg_list);
15374 T result = T(
value(arg_list[0]));
15376 for (std::size_t i = 1; i < arg_list.size(); ++i)
15378 const T v =
value(arg_list[i]);
15389 template <
typename Sequence>
15392 return value(arg_list[0]);
15395 template <
typename Sequence>
15398 return std::max<T>(
value(arg_list[0]),
value(arg_list[1]));
15401 template <
typename Sequence>
15404 return std::max<T>(std::max<T>(
value(arg_list[0]),
value(arg_list[1])),
value(arg_list[2]));
15407 template <
typename Sequence>
15410 return std::max<T>(
15411 std::max<T>(
value(arg_list[0]),
value(arg_list[1])),
15412 std::max<T>(
value(arg_list[2]),
value(arg_list[3])));
15415 template <
typename Sequence>
15418 return std::max<T>(
15419 std::max<T>(std::max<T>(
value(arg_list[0]),
value(arg_list[1])),
15420 std::max<T>(
value(arg_list[2]),
value(arg_list[3]))),
15421 value(arg_list[4]));
15425 template <
typename T>
15426 struct vararg_mand_op
exprtk_final :
public opr_base<T>
15428 typedef typename opr_base<T>::Type
Type;
15430 template <
typename Type,
15431 typename Allocator,
15432 template <
typename,
typename>
class Sequence>
15433 static inline T
process(
const Sequence<Type,Allocator>& arg_list)
15435 switch (arg_list.size())
15437 case 1 :
return process_1(arg_list);
15438 case 2 :
return process_2(arg_list);
15439 case 3 :
return process_3(arg_list);
15440 case 4 :
return process_4(arg_list);
15441 case 5 :
return process_5(arg_list);
15444 for (std::size_t i = 0; i < arg_list.size(); ++i)
15446 if (std::equal_to<T>()(T(0),
value(arg_list[i])))
15455 template <
typename Sequence>
15458 return std::not_equal_to<T>()
15459 (T(0),
value(arg_list[0])) ? T(1) : T(0);
15462 template <
typename Sequence>
15466 std::not_equal_to<T>()(T(0),
value(arg_list[0])) &&
15467 std::not_equal_to<T>()(T(0),
value(arg_list[1]))
15471 template <
typename Sequence>
15475 std::not_equal_to<T>()(T(0),
value(arg_list[0])) &&
15476 std::not_equal_to<T>()(T(0),
value(arg_list[1])) &&
15477 std::not_equal_to<T>()(T(0),
value(arg_list[2]))
15481 template <
typename Sequence>
15485 std::not_equal_to<T>()(T(0),
value(arg_list[0])) &&
15486 std::not_equal_to<T>()(T(0),
value(arg_list[1])) &&
15487 std::not_equal_to<T>()(T(0),
value(arg_list[2])) &&
15488 std::not_equal_to<T>()(T(0),
value(arg_list[3]))
15492 template <
typename Sequence>
15496 std::not_equal_to<T>()(T(0),
value(arg_list[0])) &&
15497 std::not_equal_to<T>()(T(0),
value(arg_list[1])) &&
15498 std::not_equal_to<T>()(T(0),
value(arg_list[2])) &&
15499 std::not_equal_to<T>()(T(0),
value(arg_list[3])) &&
15500 std::not_equal_to<T>()(T(0),
value(arg_list[4]))
15505 template <
typename T>
15506 struct vararg_mor_op
exprtk_final :
public opr_base<T>
15508 typedef typename opr_base<T>::Type
Type;
15510 template <
typename Type,
15511 typename Allocator,
15512 template <
typename,
typename>
class Sequence>
15513 static inline T
process(
const Sequence<Type,Allocator>& arg_list)
15515 switch (arg_list.size())
15517 case 1 :
return process_1(arg_list);
15518 case 2 :
return process_2(arg_list);
15519 case 3 :
return process_3(arg_list);
15520 case 4 :
return process_4(arg_list);
15521 case 5 :
return process_5(arg_list);
15524 for (std::size_t i = 0; i < arg_list.size(); ++i)
15526 if (std::not_equal_to<T>()(T(0),
value(arg_list[i])))
15535 template <
typename Sequence>
15538 return std::not_equal_to<T>()
15539 (T(0),
value(arg_list[0])) ? T(1) : T(0);
15542 template <
typename Sequence>
15546 std::not_equal_to<T>()(T(0),
value(arg_list[0])) ||
15547 std::not_equal_to<T>()(T(0),
value(arg_list[1]))
15551 template <
typename Sequence>
15555 std::not_equal_to<T>()(T(0),
value(arg_list[0])) ||
15556 std::not_equal_to<T>()(T(0),
value(arg_list[1])) ||
15557 std::not_equal_to<T>()(T(0),
value(arg_list[2]))
15561 template <
typename Sequence>
15565 std::not_equal_to<T>()(T(0),
value(arg_list[0])) ||
15566 std::not_equal_to<T>()(T(0),
value(arg_list[1])) ||
15567 std::not_equal_to<T>()(T(0),
value(arg_list[2])) ||
15568 std::not_equal_to<T>()(T(0),
value(arg_list[3]))
15572 template <
typename Sequence>
15576 std::not_equal_to<T>()(T(0),
value(arg_list[0])) ||
15577 std::not_equal_to<T>()(T(0),
value(arg_list[1])) ||
15578 std::not_equal_to<T>()(T(0),
value(arg_list[2])) ||
15579 std::not_equal_to<T>()(T(0),
value(arg_list[3])) ||
15580 std::not_equal_to<T>()(T(0),
value(arg_list[4]))
15585 template <
typename T>
15586 struct vararg_multi_op
exprtk_final :
public opr_base<T>
15588 typedef typename opr_base<T>::Type
Type;
15590 template <
typename Type,
15591 typename Allocator,
15592 template <
typename,
typename>
class Sequence>
15593 static inline T
process(
const Sequence<Type,Allocator>& arg_list)
15595 switch (arg_list.size())
15597 case 0 :
return std::numeric_limits<T>::quiet_NaN();
15598 case 1 :
return process_1(arg_list);
15599 case 2 :
return process_2(arg_list);
15600 case 3 :
return process_3(arg_list);
15601 case 4 :
return process_4(arg_list);
15602 case 5 :
return process_5(arg_list);
15603 case 6 :
return process_6(arg_list);
15604 case 7 :
return process_7(arg_list);
15605 case 8 :
return process_8(arg_list);
15608 for (std::size_t i = 0; i < (arg_list.size() - 1); ++i)
15610 value(arg_list[i]);
15612 return value(arg_list.back());
15617 template <
typename Sequence>
15620 return value(arg_list[0]);
15623 template <
typename Sequence>
15626 value(arg_list[0]);
15627 return value(arg_list[1]);
15630 template <
typename Sequence>
15633 value(arg_list[0]);
15634 value(arg_list[1]);
15635 return value(arg_list[2]);
15638 template <
typename Sequence>
15641 value(arg_list[0]);
15642 value(arg_list[1]);
15643 value(arg_list[2]);
15644 return value(arg_list[3]);
15647 template <
typename Sequence>
15650 value(arg_list[0]);
15651 value(arg_list[1]);
15652 value(arg_list[2]);
15653 value(arg_list[3]);
15654 return value(arg_list[4]);
15657 template <
typename Sequence>
15660 value(arg_list[0]);
15661 value(arg_list[1]);
15662 value(arg_list[2]);
15663 value(arg_list[3]);
15664 value(arg_list[4]);
15665 return value(arg_list[5]);
15668 template <
typename Sequence>
15671 value(arg_list[0]);
15672 value(arg_list[1]);
15673 value(arg_list[2]);
15674 value(arg_list[3]);
15675 value(arg_list[4]);
15676 value(arg_list[5]);
15677 return value(arg_list[6]);
15680 template <
typename Sequence>
15683 value(arg_list[0]);
15684 value(arg_list[1]);
15685 value(arg_list[2]);
15686 value(arg_list[3]);
15687 value(arg_list[4]);
15688 value(arg_list[5]);
15689 value(arg_list[6]);
15690 return value(arg_list[7]);
15694 template <
typename T>
15701 const T* vec = v->
vec()->vds().data();
15702 const std::size_t vec_size = v->
size();
15706 if (vec_size <=
static_cast<std::size_t
>(lud.
batch_size))
15713 #define case_stmt(N,fall_through) \
15714 case N : result += vec[i++]; \
15717 #ifndef exprtk_disable_superscalar_unroll
15736 T(0), T(0), T(0), T(0), T(0), T(0), T(0), T(0),
15737 T(0), T(0), T(0), T(0), T(0), T(0), T(0), T(0)
15742 while (vec < upper_bound)
15744 #define exprtk_loop(N) \
15749 #ifndef exprtk_disable_superscalar_unroll
15765 #define case_stmt(N,fall_through) \
15766 case N : r[0] += vec[i++]; \
15769 #ifndef exprtk_disable_superscalar_unroll
15784 return (r[ 0] + r[ 1] + r[ 2] + r[ 3])
15785 #ifndef exprtk_disable_superscalar_unroll
15786 + (r[ 4] + r[ 5] + r[ 6] + r[ 7])
15787 + (r[ 8] + r[ 9] + r[10] + r[11])
15788 + (r[12] + r[13] + r[14] + r[15])
15794 template <
typename T>
15801 const T* vec = v->
vec()->vds().data();
15802 const std::size_t vec_size = v->
vec()->size();
15806 if (vec_size <=
static_cast<std::size_t
>(lud.
batch_size))
15813 #define case_stmt(N,fall_through) \
15814 case N : result *= vec[i++]; \
15817 #ifndef exprtk_disable_superscalar_unroll
15835 T(1), T(1), T(1), T(1), T(1), T(1), T(1), T(1),
15836 T(1), T(1), T(1), T(1), T(1), T(1), T(1), T(1)
15841 while (vec < upper_bound)
15843 #define exprtk_loop(N) \
15848 #ifndef exprtk_disable_superscalar_unroll
15864 #define case_stmt(N,fall_through) \
15865 case N : r[0] *= vec[i++]; \
15868 #ifndef exprtk_disable_superscalar_unroll
15883 return (r[ 0] * r[ 1] * r[ 2] * r[ 3])
15884 #ifndef exprtk_disable_superscalar_unroll
15885 + (r[ 4] * r[ 5] * r[ 6] * r[ 7])
15886 + (r[ 8] * r[ 9] * r[10] * r[11])
15887 + (r[12] * r[13] * r[14] * r[15])
15893 template <
typename T>
15900 const T vec_size = T(v->
vec()->size());
15905 template <
typename T>
15912 const T* vec = v->
vec()->vds().data();
15913 const std::size_t vec_size = v->
vec()->size();
15917 for (std::size_t i = 1; i < vec_size; ++i)
15919 const T v_i = vec[i];
15929 template <
typename T>
15936 const T* vec = v->
vec()->vds().data();
15937 const std::size_t vec_size = v->
vec()->size();
15941 for (std::size_t i = 1; i < vec_size; ++i)
15943 const T v_i = vec[i];
15953 template <
typename T>
15966 virtual const T&
v0()
const = 0;
15968 virtual const T&
v1()
const = 0;
15971 template <
typename T>
15984 virtual const T
c()
const = 0;
15986 virtual const T&
v()
const = 0;
15989 template <
typename T>
16002 virtual const T
c()
const = 0;
16004 virtual const T&
v()
const = 0;
16007 template <
typename T>
16015 virtual const T&
v()
const = 0;
16018 template <
typename T>
16026 virtual const T&
v()
const = 0;
16029 template <
typename T>
16042 virtual const T
c()
const = 0;
16049 template <
typename T>
16062 virtual const T
c()
const = 0;
16069 template <
typename T>
16082 virtual const T&
v()
const = 0;
16085 template <
typename T>
16099 template <
typename T>
16113 template <
typename T>
16124 template <
typename T>
16135 template <
typename T,
typename Operation>
16154 return Operation::type();
16159 return Operation::operation();
16175 template <
typename T>
16197 return f_(u0_(v0_),u1_(v1_));
16242 template <
typename T,
typename Operation>
16263 return Operation::type();
16268 return branch_.first && branch_.first->valid();
16273 return Operation::operation();
16278 return branch_.first;
16283 branch_.second =
false;
16304 template <
typename T>
struct is_const {
enum {result = 0}; };
16308 template <
typename T>
struct is_ref {
enum {result = 0}; };
16309 template <
typename T>
struct is_ref<T&> {
enum {result = 1}; };
16312 template <std::
size_t State>
16318 #define exprtk_crtype(Type) \
16319 param_to_str<is_const_ref< Type >::result>::result() \
16321 template <
typename T>
16332 return bf1(bf0(t0,t1),t2);
16335 template <
typename T0,
typename T1,
typename T2>
16336 static inline std::string
id()
16350 return bf0(t0,bf1(t1,t2));
16353 template <
typename T0,
typename T1,
typename T2>
16354 static inline std::string
id()
16364 template <
typename T>
16373 const T& t2,
const T& t3,
16377 return bf1(bf0(t0,t1),bf2(t2,t3));
16380 template <
typename T0,
typename T1,
typename T2,
typename T3>
16381 static inline std::string
id()
16394 const T& t2,
const T& t3,
16398 return bf0(t0,bf1(t1,bf2(t2,t3)));
16400 template <
typename T0,
typename T1,
typename T2,
typename T3>
16401 static inline std::string
id()
16414 const T& t2,
const T& t3,
16418 return bf0(t0,bf2(bf1(t1,t2),t3));
16421 template <
typename T0,
typename T1,
typename T2,
typename T3>
16422 static inline std::string
id()
16435 const T& t2,
const T& t3,
16439 return bf2(bf1(bf0(t0,t1),t2),t3);
16442 template <
typename T0,
typename T1,
typename T2,
typename T3>
16443 static inline std::string
id()
16456 const T& t2,
const T& t3,
16460 return bf2(bf0(t0,bf1(t1,t2)),t3);
16463 template <
typename T0,
typename T1,
typename T2,
typename T3>
16464 static inline std::string
id()
16475 #undef exprtk_crtype
16477 template <
typename T,
typename T0,
typename T1>
16479 template <
typename T,
typename T0,
typename T1>
16482 #define synthesis_node_type_define(T0_, T1_, v_) \
16483 template <typename T, typename T0, typename T1> \
16484 struct nodetype_T0oT1<T,T0_,T1_> { static const typename expression_node<T>::node_type result; }; \
16485 template <typename T, typename T0, typename T1> \
16486 const typename expression_node<T>::node_type nodetype_T0oT1<T,T0_,T1_>::result = expression_node<T>:: v_; \
16497 #undef synthesis_node_type_define
16499 template <
typename T,
typename T0,
typename T1,
typename T2>
16501 template <
typename T,
typename T0,
typename T1,
typename T2>
16504 #define synthesis_node_type_define(T0_, T1_, T2_, v_) \
16505 template <typename T, typename T0, typename T1, typename T2> \
16506 struct nodetype_T0oT1oT2<T,T0_,T1_,T2_> { static const typename expression_node<T>::node_type result; }; \
16507 template <typename T, typename T0, typename T1, typename T2> \
16508 const typename expression_node<T>::node_type nodetype_T0oT1oT2<T,T0_,T1_,T2_>::result = expression_node<T>:: v_; \
16519 #undef synthesis_node_type_define
16521 template <
typename T,
typename T0,
typename T1,
typename T2,
typename T3>
16523 template <
typename T,
typename T0,
typename T1,
typename T2,
typename T3>
16526 #define synthesis_node_type_define(T0_, T1_, T2_, T3_, v_) \
16527 template <typename T, typename T0, typename T1, typename T2, typename T3> \
16528 struct nodetype_T0oT1oT2oT3<T,T0_,T1_,T2_,T3_> { static const typename expression_node<T>::node_type result; }; \
16529 template <typename T, typename T0, typename T1, typename T2, typename T3> \
16530 const typename expression_node<T>::node_type nodetype_T0oT1oT2oT3<T,T0_,T1_,T2_,T3_>::result = expression_node<T>:: v_; \
16548 #undef synthesis_node_type_define
16550 template <
typename T,
typename T0,
typename T1>
16579 return f_(t0_,t1_);
16597 template <
typename Allocator>
16603 .template allocate_type<node_type, T0, T1, bfunc_t&>
16610 T0oT1<T,T0,T1>&
operator=(
const T0oT1<T,T0,T1>&) {
return (*
this); }
16617 template <
typename T,
typename T0,
typename T1,
typename T2,
typename ProcessMode>
16682 static inline std::string
id()
16684 return process_mode_t::template id<T0,T1,T2>();
16687 template <
typename Allocator>
16691 .template allocate_type<node_type, T0, T1, T2, bfunc_t, bfunc_t>
16692 (p0, p1, p2, p3, p4);
16707 template <
typename T,
typename T0_,
typename T1_,
typename T2_,
typename T3_,
typename ProcessMode>
16777 static inline std::string
id()
16779 return process_mode_t::template id<T0, T1, T2, T3>();
16782 template <
typename Allocator>
16788 .template allocate_type<node_type, T0, T1, T2, T3, bfunc_t, bfunc_t>
16789 (p0, p1, p2, p3, p4, p5, p6);
16806 template <
typename T,
typename T0,
typename T1,
typename T2>
16836 return f_(t0_, t1_, t2_);
16864 static inline std::string
id()
16869 template <
typename Allocator>
16873 .template allocate_type<node_type, T0, T1, T2, tfunc_t>
16888 template <
typename T,
typename T0,
typename T1,
typename T2>
16903 template <
typename T,
typename T0,
typename T1,
typename T2,
typename SF3Operation>
16953 static inline std::string
id()
16955 return SF3Operation::id();
16958 template <
typename Allocator>
16962 .template allocate_type<node_type, T0, T1, T2>
16976 template <
typename T>
16986 default :
return false;
16990 template <
typename T,
typename T0,
typename T1,
typename T2,
typename T3>
16991 class T0oT1oT2oT3_sf4
exprtk_final :
public T0oT1oT2_base_node<T>
17021 return f_(t0_, t1_, t2_, t3_);
17054 static inline std::string
id()
17059 template <
typename Allocator>
17063 .template allocate_type<node_type, T0, T1, T2, T3, qfunc_t>
17064 (p0, p1, p2, p3, p4);
17079 template <
typename T,
typename T0,
typename T1,
typename T2,
typename T3,
typename SF4Operation>
17085 typedef T0oT1oT2oT3_sf4ext<T, T0, T1, T2, T3, SF4Operation>
node_type;
17130 static inline std::string
id()
17132 return SF4Operation::id();
17135 template <
typename Allocator>
17139 .template allocate_type<node_type, T0, T1, T2, T3>
17154 template <
typename T>
17168 default :
return false;
17172 template <
typename T,
typename T0,
typename T1>
17178 template <
typename T,
typename T0,
typename T1,
typename T2>
17181 typedef details::T0oT1oT2<T, T0, T1, T2, typename T0oT1oT2process<T>::mode0>
type0;
17182 typedef details::T0oT1oT2<T, T0, T1, T2, typename T0oT1oT2process<T>::mode1>
type1;
17187 template <
typename T,
typename T0,
typename T1,
typename T2,
typename T3>
17190 typedef details::T0oT1oT2oT3<T, T0, T1, T2, T3, typename T0oT1oT20T3process<T>::mode0>
type0;
17191 typedef details::T0oT1oT2oT3<T, T0, T1, T2, T3, typename T0oT1oT20T3process<T>::mode1>
type1;
17192 typedef details::T0oT1oT2oT3<T, T0, T1, T2, T3, typename T0oT1oT20T3process<T>::mode2>
type2;
17193 typedef details::T0oT1oT2oT3<T, T0, T1, T2, T3, typename T0oT1oT20T3process<T>::mode3>
type3;
17194 typedef details::T0oT1oT2oT3<T, T0, T1, T2, T3, typename T0oT1oT20T3process<T>::mode4>
type4;
17195 typedef details::T0oT1oT2oT3_sf4<T, T0, T1, T2, T3>
sf4_type;
17198 template <
typename T,
typename Operation>
17219 return Operation::type();
17224 return Operation::operation();
17248 template <
typename T,
typename Operation>
17269 return Operation::type();
17274 return Operation::operation();
17298 template <
typename T,
typename Operation>
17319 return Operation::operation();
17343 template <
typename T,
typename Operation>
17372 return branch_.first && branch_.first->valid();
17377 return branch_.first;
17399 template <
typename T,
typename Operation>
17428 return branch_.first && branch_.first->valid();
17433 return branch_.first;
17455 template <
typename T,
typename Operation>
17479 return Operation::operation();
17489 (*
const_cast<T*
>(&c_)) = new_c;
17494 return branch_.first && branch_.first->valid();
17499 return branch_.first;
17504 branch_.second =
false;
17505 return branch_.first;
17527 template <
typename T,
typename Operation>
17551 return Operation::operation();
17561 (*
const_cast<T*
>(&c_)) = new_c;
17566 return branch_.first && branch_.first->valid();
17571 return branch_.first;
17576 branch_.second =
false;
17577 return branch_.first;
17599 #ifndef exprtk_disable_string_capabilities
17600 template <
typename T,
typename SType0,
typename SType1,
typename Operation>
17621 return Operation::type();
17626 return Operation::operation();
17650 template <
typename T,
typename SType0,
typename SType1,
typename RangePack,
typename Operation>
17657 typedef str_xrox_node<T,SType0,SType1,RangePack,Operation>
node_type;
17673 std::size_t r0 = 0;
17674 std::size_t r1 = 0;
17676 if (rp0_(r0, r1, s0_.size()))
17684 return Operation::type();
17689 return Operation::operation();
17714 template <
typename T,
typename SType0,
typename SType1,
typename RangePack,
typename Operation>
17721 typedef str_xoxr_node<T,SType0,SType1,RangePack,Operation>
node_type;
17737 std::size_t r0 = 0;
17738 std::size_t r1 = 0;
17740 if (rp1_(r0, r1, s1_.size()))
17745 s1_.substr(r0, (r1 - r0) + 1)
17754 return Operation::type();
17759 return Operation::operation();
17784 template <
typename T,
typename SType0,
typename SType1,
typename RangePack,
typename Operation>
17791 typedef str_xroxr_node<T,SType0,SType1,RangePack,Operation>
node_type;
17809 std::size_t r0_0 = 0;
17810 std::size_t r0_1 = 0;
17811 std::size_t r1_0 = 0;
17812 std::size_t r1_1 = 0;
17815 rp0_(r0_0, r1_0, s0_.size()) &&
17816 rp1_(r0_1, r1_1, s1_.size())
17821 s0_.substr(r0_0, (r1_0 - r0_0) + 1),
17822 s1_.substr(r0_1, (r1_1 - r0_1) + 1)
17831 return Operation::type();
17836 return Operation::operation();
17862 template <
typename T,
typename Operation>
17880 , str0_base_ptr_ (0)
17881 , str1_base_ptr_ (0)
17882 , str0_range_ptr_(0)
17883 , str1_range_ptr_(0)
17884 , initialised_ (false)
17888 str0_base_ptr_ =
dynamic_cast<str_base_ptr>(branch(0));
17890 if (0 == str0_base_ptr_)
17898 str0_range_ptr_ = &(range->
range_ref());
17903 str1_base_ptr_ =
dynamic_cast<str_base_ptr>(branch(1));
17905 if (0 == str1_base_ptr_)
17913 str1_range_ptr_ = &(range->
range_ref());
17927 branch(0)->value();
17928 branch(1)->value();
17930 std::size_t str0_r0 = 0;
17931 std::size_t str0_r1 = 0;
17933 std::size_t str1_r0 = 0;
17934 std::size_t str1_r1 = 0;
17936 const range_t& range0 = (*str0_range_ptr_);
17937 const range_t& range1 = (*str1_range_ptr_);
17940 range0(str0_r0, str0_r1, str0_base_ptr_->size()) &&
17941 range1(str1_r0, str1_r1, str1_base_ptr_->size())
17946 str0_base_ptr_->str().substr(str0_r0,(str0_r1 - str0_r0)),
17947 str1_base_ptr_->str().substr(str1_r0,(str1_r1 - str1_r0))
17951 return std::numeric_limits<T>::quiet_NaN();
17956 return Operation::type();
17961 return initialised_;
17976 template <
typename T,
typename SType0,
typename SType1,
typename SType2,
typename Operation>
17983 typedef sosos_node<T, SType0, SType1, SType2, Operation>
node_type;
17999 return Operation::type();
18004 return Operation::operation();
18035 template <
typename T,
typename PowOp>
18049 return PowOp::result(v_);
18065 template <
typename T,
typename PowOp>
18082 return PowOp::result(branch_.first->value());
18092 return branch_.first && branch_.first->valid();
18113 template <
typename T,
typename PowOp>
18127 return (T(1) / PowOp::result(v_));
18143 template <
typename T,
typename PowOp>
18160 return (T(1) / PowOp::result(branch_.first->value()));
18170 return branch_.first && branch_.first->valid();
18191 template <
typename T>
18197 template <
typename T>
18203 template <
typename T>
18209 template <
typename T>
18215 template <
typename T>
18221 template <
typename T>
18227 template <
typename T>
18233 template <
typename T>
18239 template <
typename T>
18245 template <
typename T>
18251 template <
typename T>
18257 template <
typename T>
18263 template <
typename T>
18269 template <
typename T>
18275 template <
typename T>
18281 template <
typename T>
18287 template <
typename T>
18293 template <
typename T>
18299 template <
typename T>
18305 template <
typename T>
18310 switch (node->
type())
18323 default :
return false;
18334 template <
typename ResultNode,
typename OpType,
typename ExprNode>
18338 allocate<ResultNode>(operation, branch[0]);
18343 template <
typename ResultNode,
typename OpType,
typename ExprNode>
18347 allocate<ResultNode>(operation, branch[0], branch[1]);
18352 template <
typename ResultNode,
typename OpType,
typename ExprNode>
18356 allocate<ResultNode>(operation, branch[0], branch[1], branch[2]);
18361 template <
typename ResultNode,
typename OpType,
typename ExprNode>
18365 allocate<ResultNode>(operation, branch[0], branch[1], branch[2], branch[3]);
18370 template <
typename ResultNode,
typename OpType,
typename ExprNode>
18374 allocate<ResultNode>(operation, branch[0],branch[1], branch[2], branch[3], branch[4]);
18379 template <
typename ResultNode,
typename OpType,
typename ExprNode>
18383 allocate<ResultNode>(operation, branch[0], branch[1], branch[2], branch[3], branch[4], branch[5]);
18388 template <
typename node_type>
18391 return (
new node_type());
18394 template <
typename node_type,
18396 typename Allocator,
18397 template <
typename,
typename>
class Sequence>
18401 result = (
new node_type(seq));
18406 template <
typename node_type,
typename T1>
18410 result = (
new node_type(t1));
18415 template <
typename node_type,
typename T1>
18419 result = (
new node_type(t1));
18424 template <
typename node_type,
18425 typename T1,
typename T2>
18429 result = (
new node_type(t1, t2));
18434 template <
typename node_type,
18435 typename T1,
typename T2>
18439 result = (
new node_type(t1, t2));
18444 template <
typename node_type,
18445 typename T1,
typename T2>
18449 result = (
new node_type(t1, t2));
18454 template <
typename node_type,
18455 typename T1,
typename T2>
18459 result = (
new node_type(t1, t2));
18464 template <
typename node_type,
18465 typename T1,
typename T2>
18469 result = (
new node_type(t1, t2));
18474 template <
typename node_type,
18475 typename T1,
typename T2,
typename T3>
18479 result = (
new node_type(t1, t2, t3));
18484 template <
typename node_type,
18485 typename T1,
typename T2,
typename T3,
typename T4>
18489 result = (
new node_type(t1, t2, t3, t4));
18494 template <
typename node_type,
18495 typename T1,
typename T2,
typename T3>
18499 result = (
new node_type(t1, t2, t3));
18504 template <
typename node_type,
18505 typename T1,
typename T2,
typename T3,
typename T4>
18509 result = (
new node_type(t1, t2, t3, t4));
18514 template <
typename node_type,
18515 typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
18519 result = (
new node_type(t1, t2, t3, t4, t5));
18524 template <
typename node_type,
18525 typename T1,
typename T2,
typename T3>
18527 const T3& t3)
const
18530 result = (
new node_type(t1, t2, t3));
18535 template <
typename node_type,
18536 typename T1,
typename T2,
18537 typename T3,
typename T4>
18539 const T3& t3,
const T4& t4)
const
18542 result = (
new node_type(t1, t2, t3, t4));
18547 template <
typename node_type,
18548 typename T1,
typename T2,
18549 typename T3,
typename T4,
typename T5>
18551 const T3& t3,
const T4& t4,
18552 const T5& t5)
const
18555 result = (
new node_type(t1, t2, t3, t4, t5));
18560 template <
typename node_type,
18561 typename T1,
typename T2,
18562 typename T3,
typename T4,
typename T5,
typename T6>
18564 const T3& t3,
const T4& t4,
18565 const T5& t5,
const T6& t6)
const
18568 result = (
new node_type(t1, t2, t3, t4, t5, t6));
18573 template <
typename node_type,
18574 typename T1,
typename T2,
18575 typename T3,
typename T4,
18576 typename T5,
typename T6,
typename T7>
18578 const T3& t3,
const T4& t4,
18579 const T5& t5,
const T6& t6,
18580 const T7& t7)
const
18583 result = (
new node_type(t1, t2, t3, t4, t5, t6, t7));
18588 template <
typename node_type,
18589 typename T1,
typename T2,
18590 typename T3,
typename T4,
18591 typename T5,
typename T6,
18592 typename T7,
typename T8>
18594 const T3& t3,
const T4& t4,
18595 const T5& t5,
const T6& t6,
18596 const T7& t7,
const T8& t8)
const
18599 result = (
new node_type(t1, t2, t3, t4, t5, t6, t7, t8));
18604 template <
typename node_type,
18605 typename T1,
typename T2,
18606 typename T3,
typename T4,
18607 typename T5,
typename T6,
18608 typename T7,
typename T8,
typename T9>
18610 const T3& t3,
const T4& t4,
18611 const T5& t5,
const T6& t6,
18612 const T7& t7,
const T8& t8,
18613 const T9& t9)
const
18616 result = (
new node_type(t1, t2, t3, t4, t5, t6, t7, t8, t9));
18621 template <
typename node_type,
18622 typename T1,
typename T2,
18623 typename T3,
typename T4,
18624 typename T5,
typename T6,
18625 typename T7,
typename T8,
18626 typename T9,
typename T10>
18628 const T3& t3,
const T4& t4,
18629 const T5& t5,
const T6& t6,
18630 const T7& t7,
const T8& t8,
18631 const T9& t9,
const T10& t10)
const
18634 result = (
new node_type(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10));
18639 template <
typename node_type,
18640 typename T1,
typename T2,
typename T3>
18644 result = (
new node_type(t1, t2, t3));
18649 template <
typename node_type,
18650 typename T1,
typename T2,
18651 typename T3,
typename T4>
18653 T3 t3, T4 t4)
const
18656 result = (
new node_type(t1, t2, t3, t4));
18661 template <
typename node_type,
18662 typename T1,
typename T2,
18663 typename T3,
typename T4,
18670 result = (
new node_type(t1, t2, t3, t4, t5));
18675 template <
typename node_type,
18676 typename T1,
typename T2,
18677 typename T3,
typename T4,
18678 typename T5,
typename T6>
18681 T5 t5, T6 t6)
const
18684 result = (
new node_type(t1, t2, t3, t4, t5, t6));
18689 template <
typename node_type,
18690 typename T1,
typename T2,
18691 typename T3,
typename T4,
18692 typename T5,
typename T6,
typename T7>
18699 result = (
new node_type(t1, t2, t3, t4, t5, t6, t7));
18704 template <
typename T>
18707 exprtk_debug((
"node_allocator::free() - deleting expression_node "
18708 "type: %03d addr: %p\n",
18709 static_cast<int>(
e->type()),
18710 reinterpret_cast<void*
>(
e)));
18718 #define register_op(Symbol, Type, Args) \
18719 m.insert(std::make_pair(std::string(Symbol),details::base_operation_t(Type,Args))); \
18783 : allow_zero_parameters_(false)
18784 , has_side_effects_(true)
18786 , max_num_args_(std::numeric_limits<std::size_t>::
max())
18791 return allow_zero_parameters_;
18796 return has_side_effects_;
18801 return min_num_args_;
18806 return max_num_args_;
18817 template <
typename FunctionType>
18820 func.allow_zero_parameters() =
true;
18822 if (0 != func.min_num_args())
18824 func.min_num_args() = 0;
18828 template <
typename FunctionType>
18831 func.allow_zero_parameters() =
false;
18834 template <
typename FunctionType>
18837 func.has_side_effects() =
true;
18840 template <
typename FunctionType>
18843 func.has_side_effects() =
false;
18846 template <
typename FunctionType>
18849 func.min_num_args() = num_args;
18851 if ((0 != func.min_num_args()) && func.allow_zero_parameters())
18852 func.allow_zero_parameters() =
false;
18855 template <
typename FunctionType>
18858 func.max_num_args() = num_args;
18861 template <
typename T>
18873 #define empty_method_body(N) \
18875 exprtk_debug(("ifunction::operator() - Operator(" #N ") has not been overridden\n")); \
18876 return std::numeric_limits<T>::quiet_NaN(); \
18879 inline virtual T operator() ()
18882 inline virtual T operator() (
const T&)
18885 inline virtual T operator() (
const T&,
const T&)
18912 inline virtual T operator() (
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
18916 inline virtual T operator() (
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
18920 inline virtual T operator() (
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
18924 inline virtual T operator() (
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
18928 inline virtual T operator() (
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
18932 inline virtual T operator() (
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
18936 inline virtual T operator() (
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
18940 inline virtual T operator() (
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
18944 inline virtual T operator() (
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
18948 inline virtual T operator() (
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
const T&,
18952 #undef empty_method_body
18954 std::size_t param_count;
18957 template <
typename T>
18965 inline virtual T operator() (
const std::vector<T>&)
18967 exprtk_debug((
"ivararg_function::operator() - Operator has not been overridden\n"));
18968 return std::numeric_limits<T>::quiet_NaN();
18972 template <
typename T>
18981 e_rtrn_overload = 2
18989 : parameter_sequence(param_seq)
18990 , rtrn_type(rtr_type)
18996 #define igeneric_function_empty_body(N) \
18998 exprtk_debug(("igeneric_function::operator() - Operator(" #N ") has not been overridden\n")); \
18999 return std::numeric_limits<T>::quiet_NaN(); \
19003 inline virtual T operator() (parameter_list_t)
19007 inline virtual T operator() (std::
string&, parameter_list_t)
19011 inline virtual T operator() (
const std::
size_t&, parameter_list_t)
19015 inline virtual T operator() (
const std::
size_t&, std::
string&, parameter_list_t)
19018 #undef igeneric_function_empty_body
19020 std::string parameter_sequence;
19024 #ifndef exprtk_disable_string_capabilities
19025 template <
typename T>
19034 , string_varnode_(svn)
19039 return !name_.empty() && (0 != string_varnode_);
19044 assert(string_varnode_);
19050 assert(string_varnode_);
19051 string_varnode_->rebase(s);
19061 template <
typename T>
class parser;
19064 template <
typename T>
19076 typedef T (*ff00_functor)();
19077 typedef T (*ff01_functor)(T);
19078 typedef T (*ff02_functor)(T, T);
19079 typedef T (*ff03_functor)(T, T, T);
19080 typedef T (*ff04_functor)(T, T, T, T);
19081 typedef T (*ff05_functor)(T, T, T, T, T);
19082 typedef T (*ff06_functor)(T, T, T, T, T, T);
19083 typedef T (*ff07_functor)(T, T, T, T, T, T, T);
19084 typedef T (*ff08_functor)(T, T, T, T, T, T, T, T);
19085 typedef T (*ff09_functor)(T, T, T, T, T, T, T, T, T);
19086 typedef T (*ff10_functor)(T, T, T, T, T, T, T, T, T, T);
19087 typedef T (*ff11_functor)(T, T, T, T, T, T, T, T, T, T, T);
19088 typedef T (*ff12_functor)(T, T, T, T, T, T, T, T, T, T, T, T);
19089 typedef T (*ff13_functor)(T, T, T, T, T, T, T, T, T, T, T, T, T);
19090 typedef T (*ff14_functor)(T, T, T, T, T, T, T, T, T, T, T, T, T, T);
19091 typedef T (*ff15_functor)(T, T, T, T, T, T, T, T, T, T, T, T, T, T, T);
19121 {
return f(v0, v1); }
19131 {
return f(v0, v1, v2); }
19141 {
return f(v0, v1, v2, v3); }
19150 inline T operator() (
const T& v0,
const T& v1,
const T& v2,
const T& v3,
const T& v4)
exprtk_override
19151 {
return f(v0, v1, v2, v3, v4); }
19160 inline T operator() (
const T& v0,
const T& v1,
const T& v2,
const T& v3,
const T& v4,
const T& v5)
exprtk_override
19161 {
return f(v0, v1, v2, v3, v4, v5); }
19170 inline T operator() (
const T& v0,
const T& v1,
const T& v2,
const T& v3,
const T& v4,
19172 {
return f(v0, v1, v2, v3, v4, v5, v6); }
19181 inline T operator() (
const T& v0,
const T& v1,
const T& v2,
const T& v3,
const T& v4,
19183 {
return f(v0, v1, v2, v3, v4, v5, v6, v7); }
19192 inline T operator() (
const T& v0,
const T& v1,
const T& v2,
const T& v3,
const T& v4,
19194 {
return f(v0, v1, v2, v3, v4, v5, v6, v7, v8); }
19203 inline T operator() (
const T& v0,
const T& v1,
const T& v2,
const T& v3,
const T& v4,
19204 const T& v5,
const T& v6,
const T& v7,
const T& v8,
const T& v9)
exprtk_override
19205 {
return f(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9); }
19214 inline T operator() (
const T& v0,
const T& v1,
const T& v2,
const T& v3,
const T& v4,
19215 const T& v5,
const T& v6,
const T& v7,
const T& v8,
const T& v9,
const T& v10)
exprtk_override
19216 {
return f(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10); }
19225 inline T operator() (
const T& v00,
const T& v01,
const T& v02,
const T& v03,
const T& v04,
19226 const T& v05,
const T& v06,
const T& v07,
const T& v08,
const T& v09,
19228 {
return f(v00, v01, v02, v03, v04, v05, v06, v07, v08, v09, v10, v11); }
19237 inline T operator() (
const T& v00,
const T& v01,
const T& v02,
const T& v03,
const T& v04,
19238 const T& v05,
const T& v06,
const T& v07,
const T& v08,
const T& v09,
19240 {
return f(v00, v01, v02, v03, v04, v05, v06, v07, v08, v09, v10, v11, v12); }
19249 inline T operator() (
const T& v00,
const T& v01,
const T& v02,
const T& v03,
const T& v04,
19250 const T& v05,
const T& v06,
const T& v07,
const T& v08,
const T& v09,
19251 const T& v10,
const T& v11,
const T& v12,
const T& v13)
exprtk_override
19252 {
return f(v00, v01, v02, v03, v04, v05, v06, v07, v08, v09, v10, v11, v12, v13); }
19261 inline T operator() (
const T& v00,
const T& v01,
const T& v02,
const T& v03,
const T& v04,
19262 const T& v05,
const T& v06,
const T& v07,
const T& v08,
const T& v09,
19263 const T& v10,
const T& v11,
const T& v12,
const T& v13,
const T& v14)
exprtk_override
19264 {
return f(v00, v01, v02, v03, v04, v05, v06, v07, v08, v09, v10, v11, v12, v13, v14); }
19268 template <
typename Type,
typename RawType>
19277 #ifndef exprtk_disable_string_capabilities
19284 typedef std::map<std::string,type_pair_t,details::ilesscompare>
type_map_t;
19288 enum { lut_size = 256 };
19299 #define exprtk_define_process(Type) \
19300 static inline void process(std::pair<bool,Type*>& n) \
19307 #ifndef exprtk_disable_string_capabilities
19311 #undef exprtk_define_process
19313 template <
typename DeleteType>
19314 static inline void process(std::pair<bool,DeleteType*>&)
19320 if (symbol_name.empty())
19322 else if (map.end() != map.find(symbol_name))
19328 template <
typename PtrType>
19332 return std::string();
19336 while (map.end() != itr)
19338 if (itr->second.second == ptr)
19346 return std::string();
19351 if (symbol_name.empty())
19357 if (map.end() == itr)
19360 return (*itr).second.first;
19364 template <
typename Tie,
typename RType>
19365 inline bool add_impl(
const std::string& symbol_name, RType
t,
const bool is_const)
19367 if (symbol_name.size() > 1)
19378 const tm_itr_t itr = map.find(symbol_name);
19380 if (map.end() == itr)
19382 map[symbol_name] = Tie::make(
t,is_const);
19391 static inline std::pair<bool,vector_t*>
make(std::pair<T*,std::size_t> v,
const bool is_const =
false)
19393 return std::make_pair(is_const,
new vector_t(v.first, v.second));
19399 template <
typename Allocator>
19400 static inline std::pair<bool,vector_t*>
make(std::vector<T,Allocator>& v,
const bool is_const =
false)
19402 return std::make_pair(is_const,
new vector_t(v));
19410 return std::make_pair(is_const,
new vector_t(v));
19416 template <
typename Allocator>
19417 static inline std::pair<bool,vector_t*>
make(std::deque<T,Allocator>& v,
const bool is_const =
false)
19419 return std::make_pair(is_const,
new vector_t(v));
19423 template <std::
size_t v_size>
19424 inline bool add(
const std::string& symbol_name, T (&v)[v_size],
const bool is_const =
false)
19426 return add_impl<tie_array,std::pair<T*,std::size_t> >
19427 (symbol_name, std::make_pair(v,v_size), is_const);
19430 inline bool add(
const std::string& symbol_name, T* v,
const std::size_t v_size,
const bool is_const =
false)
19432 return add_impl<tie_array,std::pair<T*,std::size_t> >
19433 (symbol_name, std::make_pair(v,v_size), is_const);
19436 template <
typename Allocator>
19437 inline bool add(
const std::string& symbol_name, std::vector<T,Allocator>& v,
const bool is_const =
false)
19439 return add_impl<tie_stdvec,std::vector<T,Allocator>&>
19440 (symbol_name, v, is_const);
19445 return add_impl<tie_vecview,exprtk::vector_view<T>&>
19446 (symbol_name, v, is_const);
19449 template <
typename Allocator>
19450 inline bool add(
const std::string& symbol_name, std::deque<T,Allocator>& v,
const bool is_const =
false)
19452 return add_impl<tie_stddeq,std::deque<T,Allocator>&>
19453 (symbol_name, v, is_const);
19456 inline bool add(
const std::string& symbol_name, RawType& t_,
const bool is_const =
false)
19460 static inline std::pair<bool,variable_node_t*> make(T&
t,
const bool is_constant =
false)
19465 #ifndef exprtk_disable_string_capabilities
19466 static inline std::pair<bool,stringvar_node_t*> make(std::string&
t,
const bool is_constant =
false)
19472 static inline std::pair<bool,function_t*> make(
function_t&
t,
const bool is_constant =
false)
19474 return std::make_pair(is_constant,&
t);
19477 static inline std::pair<bool,vararg_function_t*> make(
vararg_function_t&
t,
const bool is_constant =
false)
19479 return std::make_pair(is_constant,&
t);
19482 static inline std::pair<bool,generic_function_t*> make(
generic_function_t&
t,
const bool is_constant =
false)
19484 return std::make_pair(is_constant,&
t);
19488 const tm_itr_t itr = map.find(symbol_name);
19490 if (map.end() == itr)
19492 map[symbol_name] = tie::make(t_,is_const);
19503 if (map.end() == itr)
19504 return reinterpret_cast<type_ptr>(0);
19506 return itr->second.second;
19509 template <
typename TType,
typename TRawType,
typename PtrType>
19512 static inline bool test(
const PtrType,
const void*)
19518 template <
typename TType,
typename TRawType>
19523 exprtk_debug((
"ptr_match::test() - %p <--> %p\n",
reinterpret_cast<const void*
>(&(p->ref())), ptr));
19524 return (&(p->ref()) == ptr);
19532 while (map.end() != itr)
19534 type_ptr ret_ptr = itr->second.second;
19547 inline bool remove(
const std::string& symbol_name,
const bool delete_node =
true)
19549 const tm_itr_t itr = map.find(symbol_name);
19551 if (map.end() != itr)
19571 static inline double set(
double) {
return (0.0); }
19572 static inline double set(
long double) {
return (0.0); }
19573 static inline float set(
float) {
return (0.0f); }
19574 static inline std::string set(std::string) {
return std::string(
""); }
19577 static RawType null_type = init_type::set(RawType());
19581 if (map.end() == itr)
19584 return itr->second.second->ref();
19587 inline void clear(
const bool delete_node =
true)
19609 template <
typename Allocator,
19610 template <
typename,
typename>
class Sequence>
19611 inline std::size_t
get_list(Sequence<std::pair<std::string,RawType>,Allocator>& list)
const
19613 std::size_t count = 0;
19622 list.push_back(std::make_pair((*itr).first,itr->second.second->ref()));
19631 template <
typename Allocator,
19632 template <
typename,
typename>
class Sequence>
19633 inline std::size_t
get_list(Sequence<std::string,Allocator>& vlist)
const
19635 std::size_t count = 0;
19644 vlist.push_back((*itr).first);
19658 #ifndef exprtk_disable_string_capabilities
19669 static const std::size_t lut_size = 256;
19683 #ifndef exprtk_disable_string_capabilities
19702 for (std::size_t i = 0; i < free_function_list_.size(); ++i)
19704 delete free_function_list_[i];
19710 return (reserved_symbol_table_.end() != reserved_symbol_table_.find(symbol));
19721 sd =
reinterpret_cast<st_data*
>(0);
19733 , mutability_(e_mutable)
19739 , mutability_(e_mutable)
19744 if (data_ && (0 == ref_count))
19746 st_data::destroy(data_);
19755 template <
typename SymTab>
19777 mutability_ = mutability;
19790 control_block_->set_mutability(mutability);
19797 control_block::destroy(control_block_,
this);
19810 control_block::destroy(control_block_,
reinterpret_cast<symbol_table<T>*
>(0));
19826 return valid() ? control_block_->mutability_ :
e_unknown;
19831 local_data().variable_store.clear(delete_node);
19836 local_data().function_store.clear();
19841 #ifndef exprtk_disable_string_capabilities
19842 local_data().stringvar_store.clear();
19848 local_data().vector_store.clear();
19853 local_data().local_symbol_list_.clear();
19858 if (!valid())
return;
19859 clear_variables ();
19860 clear_functions ();
19863 clear_local_constants();
19869 return local_data().variable_store.size;
19874 #ifndef exprtk_disable_string_capabilities
19878 return local_data().stringvar_store.size;
19887 return local_data().function_store.size;
19895 return local_data().vector_store.size;
19904 else if (!valid_symbol(variable_name))
19907 return local_data().variable_store.get(variable_name);
19915 return local_data().variable_store.get_from_varptr(
19916 reinterpret_cast<const void*
>(&var_ref));
19919 #ifndef exprtk_disable_string_capabilities
19924 else if (!valid_symbol(string_name))
19927 return local_data().stringvar_store.get(string_name);
19934 return null_stringvar_base;
19935 else if (!valid_symbol(string_name))
19936 return null_stringvar_base;
19938 stringvar_ptr stringvar = local_data().stringvar_store.get(string_name);
19940 if (0 == stringvar)
19942 return null_stringvar_base;
19953 else if (!valid_symbol(function_name))
19956 return local_data().function_store.get(function_name);
19963 else if (!valid_symbol(vararg_function_name))
19966 return local_data().vararg_function_store.get(vararg_function_name);
19973 else if (!valid_symbol(function_name))
19976 return local_data().generic_function_store.get(function_name);
19983 else if (!valid_symbol(function_name))
19986 return local_data().string_function_store.get(function_name);
19993 else if (!valid_symbol(function_name))
19996 return local_data().overload_function_store.get(function_name);
20005 else if (!valid_symbol(vector_name))
20008 return local_data().vector_store.get(vector_name);
20013 static T null_var = T(0);
20016 else if (!valid_symbol(symbol_name))
20019 return local_data().variable_store.type_ref(symbol_name);
20022 #ifndef exprtk_disable_string_capabilities
20025 static std::string null_stringvar;
20027 return null_stringvar;
20028 else if (!valid_symbol(symbol_name))
20029 return null_stringvar;
20031 return local_data().stringvar_store.type_ref(symbol_name);
20039 else if (!valid_symbol(symbol_name))
20042 return local_data().variable_store.is_constant(symbol_name);
20045 #ifndef exprtk_disable_string_capabilities
20050 else if (!valid_symbol(symbol_name))
20052 else if (!local_data().stringvar_store.symbol_exists(symbol_name))
20055 return local_data().stringvar_store.is_constant(symbol_name);
20063 else if (!valid_symbol(variable_name))
20065 else if (symbol_exists(variable_name))
20068 local_data().local_symbol_list_.push_back(
value);
20069 T&
t = local_data().local_symbol_list_.back();
20071 return add_variable(variable_name,
t);
20074 #ifndef exprtk_disable_string_capabilities
20079 else if (!valid_symbol(stringvar_name))
20081 else if (symbol_exists(stringvar_name))
20084 local_data().local_stringvar_list_.push_back(
value);
20085 std::string& s = local_data().local_stringvar_list_.back();
20087 return add_stringvar(stringvar_name,s);
20091 inline bool add_variable(
const std::string& variable_name, T&
t,
const bool is_constant =
false)
20095 else if (!valid_symbol(variable_name))
20097 else if (symbol_exists(variable_name))
20100 return local_data().variable_store.add(variable_name,
t, is_constant);
20107 else if (!valid_symbol(constant_name))
20109 else if (symbol_exists(constant_name))
20112 local_data().local_symbol_list_.push_back(
value);
20113 T&
t = local_data().local_symbol_list_.back();
20115 return add_variable(constant_name,
t,
true);
20118 #ifndef exprtk_disable_string_capabilities
20119 inline bool add_stringvar(
const std::string& stringvar_name, std::string& s,
const bool is_constant =
false)
20123 else if (!valid_symbol(stringvar_name))
20125 else if (symbol_exists(stringvar_name))
20128 return local_data().stringvar_store.add(stringvar_name, s, is_constant);
20136 else if (!valid_symbol(function_name))
20138 else if (symbol_exists(function_name))
20141 return local_data().function_store.add(function_name,
function);
20148 else if (!valid_symbol(vararg_function_name))
20150 else if (symbol_exists(vararg_function_name))
20153 return local_data().vararg_function_store.add(vararg_function_name,vararg_function);
20160 else if (!valid_symbol(function_name))
20162 else if (symbol_exists(function_name))
20166 switch (
function.rtrn_type)
20168 case generic_function_t::e_rtrn_scalar :
20169 return (std::string::npos ==
function.parameter_sequence.find_first_not_of(
"STVZ*?|")) ?
20170 local_data().generic_function_store.add(function_name,
function) :
false;
20172 case generic_function_t::e_rtrn_string :
20173 return (std::string::npos ==
function.parameter_sequence.find_first_not_of(
"STVZ*?|")) ?
20174 local_data().string_function_store.add(function_name,
function) :
false;
20176 case generic_function_t::e_rtrn_overload :
20177 return (std::string::npos ==
function.parameter_sequence.find_first_not_of(
"STVZ*?|:")) ?
20178 local_data().overload_function_store.add(function_name,
function) :
false;
20185 #define exprtk_define_freefunction(NN) \
20186 inline bool add_function(const std::string& function_name, ff##NN##_functor function) \
20189 { return false; } \
20190 if (!valid_symbol(function_name)) \
20191 { return false; } \
20192 if (symbol_exists(function_name)) \
20193 { return false; } \
20195 exprtk::ifunction<T>* ifunc = new freefunc##NN(function); \
20197 local_data().free_function_list_.push_back(ifunc); \
20199 return add_function(function_name,(*local_data().free_function_list_.back())); \
20211 #undef exprtk_define_freefunction
20213 inline bool add_reserved_function(
const std::string& function_name,
function_t&
function)
20217 else if (!valid_symbol(function_name,
false))
20219 else if (symbol_exists(function_name,
false))
20222 return local_data().function_store.add(function_name,
function);
20229 else if (!valid_symbol(vararg_function_name,
false))
20231 else if (symbol_exists(vararg_function_name,
false))
20234 return local_data().vararg_function_store.add(vararg_function_name,vararg_function);
20241 else if (!valid_symbol(function_name,
false))
20243 else if (symbol_exists(function_name,
false))
20247 switch (
function.rtrn_type)
20249 case generic_function_t::e_rtrn_scalar :
20250 return (std::string::npos ==
function.parameter_sequence.find_first_not_of(
"STVZ*?|")) ?
20251 local_data().generic_function_store.add(function_name,
function) :
false;
20253 case generic_function_t::e_rtrn_string :
20254 return (std::string::npos ==
function.parameter_sequence.find_first_not_of(
"STVZ*?|")) ?
20255 local_data().string_function_store.add(function_name,
function) :
false;
20257 case generic_function_t::e_rtrn_overload :
20258 return (std::string::npos ==
function.parameter_sequence.find_first_not_of(
"STVZ*?|:")) ?
20259 local_data().overload_function_store.add(function_name,
function) :
false;
20266 template <std::
size_t N>
20271 else if (!valid_symbol(vector_name))
20273 else if (symbol_exists(vector_name))
20276 return local_data().vector_store.add(vector_name,v);
20279 inline bool add_vector(
const std::string& vector_name, T* v,
const std::size_t& v_size)
20283 else if (!valid_symbol(vector_name))
20285 else if (symbol_exists(vector_name))
20287 else if (0 == v_size)
20290 return local_data().vector_store.add(vector_name, v, v_size);
20293 template <
typename Allocator>
20294 inline bool add_vector(
const std::string& vector_name, std::vector<T,Allocator>& v)
20298 else if (!valid_symbol(vector_name))
20300 else if (symbol_exists(vector_name))
20302 else if (0 == v.size())
20305 return local_data().vector_store.add(vector_name,v);
20312 else if (!valid_symbol(vector_name))
20314 else if (symbol_exists(vector_name))
20316 else if (0 == v.
size())
20319 return local_data().vector_store.add(vector_name,v);
20327 return local_data().variable_store.remove(variable_name, delete_node);
20330 #ifndef exprtk_disable_string_capabilities
20336 return local_data().stringvar_store.remove(string_name);
20345 return local_data().function_store.remove(function_name);
20353 return local_data().vararg_function_store.remove(vararg_function_name);
20361 return local_data().vector_store.remove(vector_name);
20366 return add_pi () &&
20374 static const T local_pi = details::numeric::details::const_pi_impl<T>(num_type);
20375 return add_constant(
"pi",local_pi);
20381 return add_constant(
"epsilon",local_epsilon);
20386 static const T local_infinity = std::numeric_limits<T>::infinity();
20387 return add_constant(
"inf",local_infinity);
20390 template <
typename Package>
20393 return package.register_package(*
this);
20396 template <
typename Allocator,
20397 template <
typename,
typename>
class Sequence>
20403 return local_data().variable_store.get_list(vlist);
20406 template <
typename Allocator,
20407 template <
typename,
typename>
class Sequence>
20413 return local_data().variable_store.get_list(vlist);
20416 #ifndef exprtk_disable_string_capabilities
20417 template <
typename Allocator,
20418 template <
typename,
typename>
class Sequence>
20424 return local_data().stringvar_store.get_list(svlist);
20427 template <
typename Allocator,
20428 template <
typename,
typename>
class Sequence>
20434 return local_data().stringvar_store.get_list(svlist);
20438 template <
typename Allocator,
20439 template <
typename,
typename>
class Sequence>
20445 return local_data().vector_store.get_list(vec_list);
20448 template <
typename Allocator,
20449 template <
typename,
typename>
class Sequence>
20455 std::vector<std::string> function_names;
20456 std::size_t count = 0;
20458 count += local_data().function_store .get_list(function_names);
20459 count += local_data().vararg_function_store .get_list(function_names);
20460 count += local_data().generic_function_store .get_list(function_names);
20461 count += local_data().string_function_store .get_list(function_names);
20462 count += local_data().overload_function_store.get_list(function_names);
20464 std::set<std::string> function_set;
20466 for (std::size_t i = 0; i < function_names.size(); ++i)
20468 function_set.insert(function_names[i]);
20471 std::copy(function_set.begin(),function_set.end(),
20472 std::back_inserter(function_list));
20477 inline bool symbol_exists(
const std::string& symbol_name,
const bool check_reserved_symb =
true)
const
20486 else if (local_data().variable_store.symbol_exists(symbol_name))
20488 #ifndef exprtk_disable_string_capabilities
20489 else if (local_data().stringvar_store.symbol_exists(symbol_name))
20492 else if (local_data().vector_store.symbol_exists(symbol_name))
20494 else if (local_data().function_store.symbol_exists(symbol_name))
20507 return local_data().variable_store.symbol_exists(variable_name);
20510 #ifndef exprtk_disable_string_capabilities
20516 return local_data().stringvar_store.symbol_exists(stringvar_name);
20523 else if (!valid_symbol(symbol_name))
20525 else if (!local_data().stringvar_store.symbol_exists(symbol_name))
20529 local_data().stringvar_store.symbol_exists(symbol_name) ||
20530 local_data().stringvar_store.is_constant (symbol_name)
20540 return local_data().function_store.symbol_exists(function_name);
20548 return local_data().vararg_function_store.symbol_exists(vararg_function_name);
20556 return local_data().vector_store.symbol_exists(vector_name);
20561 return local_data().variable_store.entity_name(ptr);
20566 return local_data().vector_store.entity_name(ptr);
20569 #ifndef exprtk_disable_string_capabilities
20572 return local_data().stringvar_store.entity_name(ptr);
20577 return local_data().stringvar_store.entity_name(ptr);
20584 return control_block_ && control_block_->data_;
20590 std::vector<std::string> name_list;
20594 if (!name_list.empty())
20596 for (std::size_t i = 0; i < name_list.size(); ++i)
20599 add_function(name_list[i],ifunc);
20605 std::vector<std::string> name_list;
20609 if (!name_list.empty())
20611 for (std::size_t i = 0; i < name_list.size(); ++i)
20614 add_function(name_list[i],ivafunc);
20620 std::vector<std::string> name_list;
20624 if (!name_list.empty())
20626 for (std::size_t i = 0; i < name_list.size(); ++i)
20629 add_function(name_list[i],ifunc);
20635 std::vector<std::string> name_list;
20639 if (!name_list.empty())
20641 for (std::size_t i = 0; i < name_list.size(); ++i)
20644 add_function(name_list[i],ifunc);
20650 std::vector<std::string> name_list;
20654 if (!name_list.empty())
20656 for (std::size_t i = 0; i < name_list.size(); ++i)
20659 add_function(name_list[i],ifunc);
20667 std::vector<std::string> name_list;
20671 if (!name_list.empty())
20673 for (std::size_t i = 0; i < name_list.size(); ++i)
20676 add_variable(name_list[i], variable);
20683 std::vector<std::string> name_list;
20687 if (!name_list.empty())
20689 for (std::size_t i = 0; i < name_list.size(); ++i)
20692 add_vector(name_list[i], vecholder.
data(), vecholder.
size());
20699 inline bool valid_symbol(
const std::string& symbol,
const bool check_reserved_symb =
true)
const
20701 if (symbol.empty())
20705 else if (symbol.size() > 1)
20707 for (std::size_t i = 1; i < symbol.size(); ++i)
20714 if ((i < (symbol.size() - 1)) && (
'.' == symbol[i]))
20722 return (check_reserved_symb) ? (!local_data().is_reserved_symbol(symbol)) :
true;
20727 if (symbol.empty())
20731 else if (symbol.size() > 1)
20733 for (std::size_t i = 1; i < symbol.size(); ++i)
20740 if ((i < (symbol.size() - 1)) && (
'.' == symbol[i]))
20755 return *(control_block_->data_);
20760 return *(control_block_->data_);
20768 template <
typename T>
20771 template <
typename T>
20819 , retinv_null(false)
20820 , return_invoked(&retinv_null)
20827 , retinv_null(false)
20828 , return_invoked(&retinv_null)
20838 if (!local_data_list.empty())
20840 for (std::size_t i = 0; i < local_data_list.size(); ++i)
20842 switch (local_data_list[i].type)
20844 case e_expr :
delete reinterpret_cast<expression_ptr>(local_data_list[i].pointer);
20847 case e_vecholder :
delete reinterpret_cast<vector_holder_ptr>(local_data_list[i].pointer);
20850 case e_data :
delete reinterpret_cast<T*
>(local_data_list[i].pointer);
20853 case e_vecdata :
delete []
reinterpret_cast<T*
>(local_data_list[i].pointer);
20856 case e_string :
delete reinterpret_cast<std::string*
>(local_data_list[i].pointer);
20896 bool* return_invoked;
20904 : control_block_(0)
20906 set_expression(
new details::null_node<T>());
20910 : control_block_ (
e.control_block_ )
20911 , symbol_table_list_(
e.symbol_table_list_)
20913 control_block_->ref_count++;
20917 : control_block_(0)
20919 set_expression(
new details::null_node<T>());
20927 if (control_block_)
20930 (0 != control_block_->ref_count) &&
20931 (0 == --control_block_->ref_count)
20934 delete control_block_;
20937 control_block_ = 0;
20940 control_block_ =
e.control_block_;
20941 control_block_->ref_count++;
20942 symbol_table_list_ =
e.symbol_table_list_;
20950 return (
this == &
e);
20956 (0 == control_block_ ) ||
20957 (0 == control_block_->expr)
20964 control_block::destroy(control_block_);
20971 control_block::destroy(control_block_);
20976 assert(control_block_ );
20977 assert(control_block_->expr);
20979 return control_block_->expr->value();
20982 inline T operator() ()
const
20987 inline operator T()
const
20992 inline operator bool()
const
20999 for (std::size_t i = 0; i < symbol_table_list_.size(); ++i)
21001 if (&st == &symbol_table_list_[i])
21007 symbol_table_list_.push_back(st);
21012 return symbol_table_list_[index];
21017 return symbol_table_list_[index];
21024 if (control_block_->results)
21025 return (*control_block_->results);
21029 return null_results;
21035 return (*control_block_->return_invoked);
21042 return symbol_table_list_;
21049 if (control_block_)
21051 if (0 == --control_block_->ref_count)
21053 delete control_block_;
21057 control_block_ = control_block::create(expr);
21065 if (control_block_)
21068 local_data_list.push_back(
21070 data_pack(
reinterpret_cast<void*
>(expr),
21071 control_block::e_expr));
21080 if (control_block_)
21083 local_data_list.push_back(
21085 data_pack(
reinterpret_cast<void*
>(vec_holder),
21086 control_block::e_vecholder));
21095 if (control_block_)
21101 case 0 : dt = control_block::e_data;
break;
21102 case 1 : dt = control_block::e_vecdata;
break;
21103 case 2 : dt = control_block::e_string;
break;
21107 local_data_list.push_back(
21109 data_pack(
reinterpret_cast<void*
>(
data), dt,
size));
21116 if (control_block_)
21118 return control_block_->local_data_list;
21123 return null_local_data_list;
21129 if (control_block_ && rc)
21131 control_block_->results = rc;
21137 if (control_block_)
21139 control_block_->return_invoked = retinvk_ptr;
21149 template <
typename TT>
21153 template <
typename T>
21189 template <
typename T>
21195 namespace parser_error
21228 const std::string& diagnostic =
"",
21229 const std::string& src_location =
"")
21234 t.diagnostic = diagnostic;
21235 t.src_location = src_location;
21242 const std::string& diagnostic =
"",
21243 const std::string& src_location =
"")
21248 t.diagnostic = diagnostic;
21249 t.src_location = src_location;
21258 case e_unknown :
return std::string(
"Unknown Error");
21259 case e_syntax :
return std::string(
"Syntax Error" );
21260 case e_token :
return std::string(
"Token Error" );
21261 case e_numeric :
return std::string(
"Numeric Error");
21262 case e_symtab :
return std::string(
"Symbol Error" );
21263 case e_lexer :
return std::string(
"Lexer Error" );
21264 case e_helper :
return std::string(
"Helper Error" );
21265 case e_parser :
return std::string(
"Parser Error" );
21266 default :
return std::string(
"Unknown Error");
21281 std::size_t error_line_start = 0;
21287 if ((
'\n' == c) || (
'\r' == c))
21289 error_line_start = i + 1;
21299 next_nl_position - error_line_start);
21303 for (std::size_t i = 0; i < next_nl_position; ++i)
21314 printf(
"Position: %02d Type: [%s] Msg: %s\n",
21323 template <
typename Parser>
21326 p.state_.type_check_enabled =
false;
21330 template <
typename T>
21364 #ifndef exprtk_disable_break_continue
21385 #ifndef exprtk_disable_string_capabilities
21428 typedef std::map<std::string,std::pair<trinary_functor_t ,operator_t> >
sf3_map_t;
21429 typedef std::map<std::string,std::pair<quaternary_functor_t,operator_t> >
sf4_map_t;
21432 typedef std::multimap<std::string,details::base_operation_t,details::ilesscompare>
base_ops_map_t;
21477 #ifndef exprtk_disable_string_capabilities
21483 ,
size (std::numeric_limits<std::size_t>::
max())
21484 , index(std::numeric_limits<std::size_t>::
max())
21485 , depth(std::numeric_limits<std::size_t>::
max())
21493 #ifndef exprtk_disable_string_capabilities
21504 else if (depth < se.
depth)
21506 else if (depth > se.
depth)
21508 else if (index < se.
index)
21510 else if (index > se.
index)
21513 return (name < se.
name);
21529 #ifndef exprtk_disable_string_capabilities
21545 #ifndef exprtk_disable_string_capabilities
21560 , input_param_cnt_(0)
21565 return element_.size();
21570 return element_.empty();
21575 if (index < element_.size())
21576 return element_[index];
21578 return null_element_;
21584 const std::size_t current_depth = parser_.state_.scope_depth;
21586 for (std::size_t i = 0; i < element_.size(); ++i)
21590 if (se.
depth > current_depth)
21594 (se.
index == index)
21599 return null_element_;
21605 const std::size_t current_depth = parser_.state_.scope_depth;
21607 for (std::size_t i = 0; i < element_.size(); ++i)
21611 if (se.
depth > current_depth)
21615 (se.
index == index) &&
21621 return null_element_;
21626 for (std::size_t i = 0; i < element_.size(); ++i)
21641 element_.push_back(se);
21642 std::sort(element_.begin(),element_.end());
21650 static_cast<int>(parser_.state_.scope_depth)));
21652 for (std::size_t i = 0; i < element_.size(); ++i)
21659 static_cast<int>(i),
21673 case scope_element::e_variable :
delete reinterpret_cast<T*
>(se.
data);
21677 case scope_element::e_vector :
delete[]
reinterpret_cast<T*
>(se.
data);
21681 case scope_element::e_vecelem :
delete se.
var_node;
21684 #ifndef exprtk_disable_string_capabilities
21685 case scope_element::e_string :
delete reinterpret_cast<std::string*
>(se.
data);
21698 for (std::size_t i = 0; i < element_.size(); ++i)
21700 free_element(element_[i]);
21705 input_param_cnt_ = 0;
21710 return ++input_param_cnt_;
21715 for (std::size_t i = 0; i < element_.size(); ++i)
21727 if (&(vn->ref()) == (&v))
21739 for (std::size_t i = 0; i < element_.size(); ++i)
21753 return "neo-vector";
21776 parser_.state_.scope_depth++;
21777 #ifdef exprtk_enable_debugging
21778 const std::string depth(2 * parser_.state_.scope_depth,
'-');
21781 static_cast<int>(parser_.state_.scope_depth)));
21787 parser_.sem_.deactivate(parser_.state_.scope_depth);
21788 parser_.state_.scope_depth--;
21789 #ifdef exprtk_enable_debugging
21790 const std::string depth(2 * parser_.state_.scope_depth,
'-');
21793 static_cast<int>(parser_.state_.scope_depth)));
21805 template <
typename T_>
21808 static inline bool is_within(
const T_& v,
const T_& begin,
const T_& end)
21810 assert(begin <= end);
21811 return (begin <= v) && (v < end);
21814 static inline bool is_less(
const T_& v,
const T_& begin)
21816 return (v < begin);
21830 template <
typename T_>
21833 static inline bool is_within(
const T_& v,
const T_& begin,
const T_& end)
21835 assert(begin <= end);
21836 return (begin <= v) && (v <= end);
21839 static inline bool is_less(
const T_& v,
const T_& begin)
21841 return (v < begin);
21855 template <
typename IntervalPointType,
21856 typename RangePolicy = halfopen_range_policy<IntervalPointType> >
21868 return interval_map_.size();
21873 interval_map_.clear();
21879 interval_map_.lower_bound(point):
21880 interval_map_.upper_bound(point);
21882 for (; itr != interval_map_.end(); ++itr)
21887 if (RangePolicy::is_within(point, begin, end))
21892 else if (RangePolicy::is_greater(point, end))
21904 return in_interval(point,interval);
21909 if ((end <= begin) || in_interval(begin) || in_interval(end))
21914 interval_map_[end] = std::make_pair(begin, end);
21921 return add_interval(interval.first, interval.second);
21937 , limit_exceeded_(false)
21939 if (++parser_.state_.stack_depth > parser_.settings_.max_stack_depth_)
21941 limit_exceeded_ =
true;
21944 "ERR000 - Current stack depth " +
details::to_str(parser_.state_.stack_depth) +
21945 " exceeds maximum allowed stack depth of " +
details::to_str(parser_.settings_.max_stack_depth_),
21952 assert(parser_.state_.stack_depth > 0);
21953 parser_.state_.stack_depth--;
21958 return limit_exceeded_;
21977 #ifndef exprtk_disable_string_capabilities
22006 #ifndef exprtk_disable_string_capabilities
22021 return symtab_list_.empty();
22026 symtab_list_.clear();
22033 for (std::size_t i = 0; i < symtab_list_.size(); ++i)
22035 if (symtab_list_[i].valid())
22045 if (!symtab_list_.empty())
22046 return symtab_list_[0].valid_symbol(symbol);
22053 if (!symtab_list_.empty())
22054 return symtab_list_[0].valid_function(symbol);
22062 if (!valid_symbol(variable_name))
22065 for (std::size_t i = 0; i < symtab_list_.size(); ++i)
22067 if (!symtab_list_[i].valid())
22073 .variable_store.get(variable_name);
22086 if (!valid_symbol(variable_name))
22091 for (std::size_t i = 0; i < symtab_list_.size(); ++i)
22093 if (!symtab_list_[i].valid())
22096 result = local_data(i)
22097 .variable_store.get(variable_name);
22109 for (std::size_t i = 0; i < symtab_list_.size(); ++i)
22111 if (!symtab_list_[i].valid())
22114 result = local_data(i).variable_store
22115 .get_from_varptr(
reinterpret_cast<const void*
>(&var_ref));
22123 #ifndef exprtk_disable_string_capabilities
22128 if (!valid_symbol(string_name))
22131 for (std::size_t i = 0; i < symtab_list_.size(); ++i)
22133 if (!symtab_list_[i].valid())
22138 result.
str_var = local_data(i).stringvar_store.get(string_name);
22152 if (!valid_symbol(string_name))
22157 for (std::size_t i = 0; i < symtab_list_.size(); ++i)
22159 if (!symtab_list_[i].valid())
22162 result = local_data(i)
22163 .stringvar_store.get(string_name);
22174 if (!valid_function_name(function_name))
22179 for (std::size_t i = 0; i < symtab_list_.size(); ++i)
22181 if (!symtab_list_[i].valid())
22184 result = local_data(i)
22185 .function_store.get(function_name);
22195 if (!valid_function_name(vararg_function_name))
22200 for (std::size_t i = 0; i < symtab_list_.size(); ++i)
22202 if (!symtab_list_[i].valid())
22205 result = local_data(i)
22206 .vararg_function_store.get(vararg_function_name);
22216 if (!valid_function_name(function_name))
22221 for (std::size_t i = 0; i < symtab_list_.size(); ++i)
22223 if (!symtab_list_[i].valid())
22226 result = local_data(i)
22227 .generic_function_store.get(function_name);
22237 if (!valid_function_name(function_name))
22242 for (std::size_t i = 0; i < symtab_list_.size(); ++i)
22244 if (!symtab_list_[i].valid())
22248 local_data(i).string_function_store.get(function_name);
22258 if (!valid_function_name(function_name))
22263 for (std::size_t i = 0; i < symtab_list_.size(); ++i)
22265 if (!symtab_list_[i].valid())
22269 local_data(i).overload_function_store.get(function_name);
22280 if (!valid_symbol(vector_name))
22283 for (std::size_t i = 0; i < symtab_list_.size(); ++i)
22285 if (!symtab_list_[i].valid())
22290 result.
vector_holder = local_data(i).vector_store.get(vector_name);
22304 if (!valid_symbol(vector_name))
22309 for (std::size_t i = 0; i < symtab_list_.size(); ++i)
22311 if (!symtab_list_[i].valid())
22316 result = local_data(i).vector_store.get(vector_name);
22329 if (!valid_symbol(symbol_name))
22332 for (std::size_t i = 0; i < symtab_list_.size(); ++i)
22334 if (!symtab_list_[i].valid())
22339 if (local_data(i).variable_store.is_constant(symbol_name))
22348 #ifndef exprtk_disable_string_capabilities
22351 if (!valid_symbol(symbol_name))
22354 for (std::size_t i = 0; i < symtab_list_.size(); ++i)
22356 if (!symtab_list_[i].valid())
22358 else if (!local_data(i).stringvar_store.symbol_exists(symbol_name))
22360 else if (local_data(i).stringvar_store.is_constant(symbol_name))
22370 for (std::size_t i = 0; i < symtab_list_.size(); ++i)
22372 if (!symtab_list_[i].valid())
22377 if (symtab_list_[i].symbol_exists(symbol))
22388 for (std::size_t i = 0; i < symtab_list_.size(); ++i)
22390 if (!symtab_list_[i].valid())
22393 symtab_list_[i].local_data().variable_store
22394 .symbol_exists(variable_name)
22402 #ifndef exprtk_disable_string_capabilities
22405 for (std::size_t i = 0; i < symtab_list_.size(); ++i)
22407 if (!symtab_list_[i].valid())
22410 symtab_list_[i].local_data().stringvar_store
22411 .symbol_exists(stringvar_name)
22421 for (std::size_t i = 0; i < symtab_list_.size(); ++i)
22423 if (!symtab_list_[i].valid())
22426 symtab_list_[i].local_data().stringvar_store
22427 .symbol_exists(symbol_name)
22431 local_data(i).stringvar_store.symbol_exists(symbol_name) ||
22432 local_data(i).stringvar_store.is_constant (symbol_name)
22444 for (std::size_t i = 0; i < symtab_list_.size(); ++i)
22446 if (!symtab_list_[i].valid())
22449 local_data(i).vararg_function_store
22450 .symbol_exists(function_name)
22460 for (std::size_t i = 0; i < symtab_list_.size(); ++i)
22462 if (!symtab_list_[i].valid())
22465 local_data(i).vararg_function_store
22466 .symbol_exists(vararg_function_name)
22476 for (std::size_t i = 0; i < symtab_list_.size(); ++i)
22478 if (!symtab_list_[i].valid())
22481 local_data(i).vector_store
22482 .symbol_exists(vector_name)
22492 return local_data().variable_store.entity_name(ptr);
22497 return local_data().vector_store.entity_name(ptr);
22500 #ifndef exprtk_disable_string_capabilities
22503 return local_data().stringvar_store.entity_name(ptr);
22508 return local_data().stringvar_store.entity_name(ptr);
22514 return symtab_list_[index].local_data();
22519 return symtab_list_[index].local_data();
22524 return symtab_list_[index];
22531 : type_check_enabled(true)
22538 parsing_return_stmt =
false;
22539 parsing_break_stmt =
false;
22540 return_stmt_present =
false;
22541 side_effect_present =
false;
22544 parsing_loop_stmt_count = 0;
22547 #ifndef exprtk_enable_debugging
22550 void activate_side_effect(
const std::string& source)
22553 if (!side_effect_present)
22555 side_effect_present =
true;
22557 exprtk_debug((
"activate_side_effect() - caller: %s\n", source.c_str()));
22578 e_usr_unknown_type = 0,
22579 e_usr_variable_type = 1,
22580 e_usr_constant_type = 2
22585 e_usrmode_default = 0,
22586 e_usrmode_extended = 1
22601 std::string& error_message)
22603 if (e_usrmode_default != mode)
22606 st = e_usr_variable_type;
22607 default_value = T(0);
22608 error_message.clear();
22624 e_ct_variables = 1,
22625 e_ct_functions = 2,
22626 e_ct_assignments = 4
22637 e_st_local_variable = 6,
22638 e_st_local_vector = 7,
22639 e_st_local_string = 8
22650 : options_(options)
22651 , collect_variables_ ((options_ & e_ct_variables ) == e_ct_variables )
22652 , collect_functions_ ((options_ & e_ct_functions ) == e_ct_functions )
22653 , collect_assignments_((options_ & e_ct_assignments) == e_ct_assignments)
22654 , return_present_ (false)
22655 , final_stmt_return_(false)
22658 template <
typename Allocator,
22659 template <
typename,
typename>
class Sequence>
22660 inline std::size_t
symbols(Sequence<symbol_t,Allocator>& symbols_list)
22662 if (!collect_variables_ && !collect_functions_)
22664 else if (symbol_name_list_.empty())
22667 for (std::size_t i = 0; i < symbol_name_list_.size(); ++i)
22672 std::sort(symbol_name_list_.begin(), symbol_name_list_.end());
22676 symbol_name_list_.begin(),
22677 symbol_name_list_.end (),
22678 std::back_inserter(symbols_list)
22681 return symbols_list.size();
22684 template <
typename Allocator,
22685 template <
typename,
typename>
class Sequence>
22688 if (!collect_assignments_)
22690 else if (assignment_name_list_.empty())
22693 for (std::size_t i = 0; i < assignment_name_list_.size(); ++i)
22698 std::sort(assignment_name_list_.begin(),assignment_name_list_.end());
22702 assignment_name_list_.begin(),
22703 assignment_name_list_.end (),
22704 std::back_inserter(assignment_list)
22707 return assignment_list.size();
22712 symbol_name_list_ .clear();
22713 assignment_name_list_.clear();
22714 retparam_list_ .clear();
22715 return_present_ =
false;
22716 final_stmt_return_ =
false;
22721 return collect_variables_;
22726 return collect_functions_;
22731 return collect_assignments_;
22736 return return_present_;
22741 return final_stmt_return_;
22748 return retparam_list_;
22757 case e_st_variable :
22760 case e_st_local_variable :
22761 case e_st_local_vector :
22762 case e_st_local_string :
if (collect_variables_)
22764 .push_back(std::make_pair(symbol, st));
22767 case e_st_function :
if (collect_functions_)
22769 .push_back(std::make_pair(symbol, st));
22780 case e_st_variable :
22782 case e_st_string :
if (collect_assignments_)
22783 assignment_name_list_
22784 .push_back(std::make_pair(symbol, st));
22818 e_numeric_check = 4,
22819 e_bracket_check = 8,
22820 e_sequence_check = 16,
22821 e_commutative_check = 32,
22822 e_strength_reduction = 64,
22823 e_disable_vardef = 128,
22824 e_collect_vars = 256,
22825 e_collect_funcs = 512,
22826 e_collect_assings = 1024,
22827 e_disable_usr_on_rsrvd = 2048,
22828 e_disable_zero_return = 4096
22853 e_ctrl_unknown = 0,
22864 e_logic_unknown = 0,
22872 e_arith_unknown = 0,
22879 e_assign_unknown = 0,
22886 e_ineq_unknown = 0,
22892 static const std::size_t default_compile_all_opts =
22898 e_commutative_check +
22899 e_strength_reduction;
22902 : max_stack_depth_(400)
22903 , max_node_depth_(10000)
22904 , max_local_vector_size_(2000000000)
22906 load_compile_options(compile_options);
22911 disabled_func_set_.clear();
22917 disabled_ctrl_set_.clear();
22923 disabled_logic_set_.clear();
22929 disabled_arithmetic_set_.clear();
22935 disabled_assignment_set_.clear();
22941 disabled_inequality_set_.clear();
22947 disable_vardef_ =
false;
22953 enable_commutative_check_ =
true;
22959 enable_strength_reduction_ =
true;
22967 std::insert_iterator<disabled_entity_set_t>
22968 (disabled_func_set_, disabled_func_set_.begin()));
22976 std::insert_iterator<disabled_entity_set_t>
22977 (disabled_ctrl_set_, disabled_ctrl_set_.begin()));
22985 std::insert_iterator<disabled_entity_set_t>
22986 (disabled_logic_set_, disabled_logic_set_.begin()));
22994 std::insert_iterator<disabled_entity_set_t>
22995 (disabled_arithmetic_set_, disabled_arithmetic_set_.begin()));
23003 std::insert_iterator<disabled_entity_set_t>
23004 (disabled_assignment_set_, disabled_assignment_set_.begin()));
23012 std::insert_iterator<disabled_entity_set_t>
23013 (disabled_inequality_set_, disabled_inequality_set_.begin()));
23019 disable_vardef_ =
true;
23025 enable_commutative_check_ =
false;
23031 enable_strength_reduction_ =
false;
23051 if (disabled_func_set_.empty())
23054 return (disabled_func_set_.end() == disabled_func_set_.find(function_name));
23059 if (disabled_ctrl_set_.empty())
23062 return (disabled_ctrl_set_.end() == disabled_ctrl_set_.find(control_struct));
23067 if (disabled_logic_set_.empty())
23070 return (disabled_logic_set_.end() == disabled_logic_set_.find(logic_operation));
23075 if (disabled_logic_set_.empty())
23078 return disabled_arithmetic_set_.end() == disabled_arithmetic_set_
23079 .find(arith_opr_to_string(arithmetic_operation));
23084 if (disabled_assignment_set_.empty())
23087 return disabled_assignment_set_.end() == disabled_assignment_set_
23088 .find(assign_opr_to_string(assignment));
23093 if (disabled_inequality_set_.empty())
23096 return disabled_inequality_set_.end() == disabled_inequality_set_
23097 .find(inequality_opr_to_string(inequality));
23102 if (disabled_func_set_.empty())
23105 return (disabled_func_set_.end() != disabled_func_set_.find(function_name));
23110 if (disabled_ctrl_set_.empty())
23113 return (disabled_ctrl_set_.end() != disabled_ctrl_set_.find(control_struct));
23118 if (disabled_logic_set_.empty())
23121 return (disabled_logic_set_.end() != disabled_logic_set_.find(logic_operation));
23126 if (disabled_assignment_set_.empty())
23129 return disabled_assignment_set_.end() != disabled_assignment_set_
23130 .find(assign_opr_to_string(assignment_operation));
23135 if (disabled_logic_set_.empty())
23138 return disabled_logic_set_.end() != disabled_logic_set_
23139 .find(logic_opr_to_string(logic_operation));
23144 if (disabled_arithmetic_set_.empty())
23147 return disabled_arithmetic_set_.end() != disabled_arithmetic_set_
23148 .find(arith_opr_to_string(arithmetic_operation));
23153 if (disabled_inequality_set_.empty())
23156 return disabled_inequality_set_.end() != disabled_inequality_set_
23157 .find(inequality_opr_to_string(inequality));
23163 (e_bf_unknown != bf) &&
23176 (e_ctrl_unknown != ctrl_struct) &&
23189 (e_logic_unknown != logic) &&
23202 (e_arith_unknown != arithmetic) &&
23215 (e_assign_unknown != assignment) &&
23228 (e_ineq_unknown != inequality) &&
23241 (e_bf_unknown != bf) &&
23247 if (disabled_func_set_.end() != itr)
23249 disabled_func_set_.erase(itr);
23259 (e_ctrl_unknown != ctrl_struct) &&
23265 if (disabled_ctrl_set_.end() != itr)
23267 disabled_ctrl_set_.erase(itr);
23277 (e_logic_unknown != logic) &&
23283 if (disabled_logic_set_.end() != itr)
23285 disabled_logic_set_.erase(itr);
23295 (e_arith_unknown != arithmetic) &&
23301 if (disabled_arithmetic_set_.end() != itr)
23303 disabled_arithmetic_set_.erase(itr);
23313 (e_assign_unknown != assignment) &&
23319 if (disabled_assignment_set_.end() != itr)
23321 disabled_assignment_set_.erase(itr);
23331 (e_ineq_unknown != inequality) &&
23337 if (disabled_inequality_set_.end() != itr)
23339 disabled_inequality_set_.erase(itr);
23348 max_stack_depth_ = max_stack_depth;
23353 max_node_depth_ = max_node_depth;
23358 max_local_vector_size_ = max_local_vector_size;
23363 return max_stack_depth_;
23368 return max_node_depth_;
23373 return max_local_vector_size_;
23380 enable_replacer_ = (compile_options & e_replacer ) == e_replacer;
23381 enable_joiner_ = (compile_options & e_joiner ) == e_joiner;
23382 enable_numeric_check_ = (compile_options & e_numeric_check ) == e_numeric_check;
23383 enable_bracket_check_ = (compile_options & e_bracket_check ) == e_bracket_check;
23384 enable_sequence_check_ = (compile_options & e_sequence_check ) == e_sequence_check;
23385 enable_commutative_check_ = (compile_options & e_commutative_check ) == e_commutative_check;
23386 enable_strength_reduction_ = (compile_options & e_strength_reduction ) == e_strength_reduction;
23387 enable_collect_vars_ = (compile_options & e_collect_vars ) == e_collect_vars;
23388 enable_collect_funcs_ = (compile_options & e_collect_funcs ) == e_collect_funcs;
23389 enable_collect_assings_ = (compile_options & e_collect_assings ) == e_collect_assings;
23390 disable_vardef_ = (compile_options & e_disable_vardef ) == e_disable_vardef;
23391 disable_rsrvd_sym_usr_ = (compile_options & e_disable_usr_on_rsrvd) == e_disable_usr_on_rsrvd;
23392 disable_zero_return_ = (compile_options & e_disable_zero_return ) == e_disable_zero_return;
23405 default :
return "" ;
23419 default :
return "" ;
23435 default :
return "" ;
23450 default :
return "" ;
23485 : settings_(settings)
23486 , resolve_unknown_symbol_(false)
23487 , results_context_(0)
23490 #pragma warning(push)
23491 #pragma warning (disable:4355)
23495 #pragma warning(pop)
23497 , operator_joiner_2_(2)
23498 , operator_joiner_3_(3)
23499 , loop_runtime_check_(0)
23500 , vector_access_runtime_check_(0)
23501 , compilation_check_ptr_(0)
23503 init_precompilation();
23506 load_unary_operations_map (unary_op_map_ );
23507 load_binary_operations_map (binary_op_map_ );
23508 load_inv_binary_operations_map(inv_binary_op_map_);
23509 load_sf3_map (sf3_map_ );
23510 load_sf4_map (sf4_map_ );
23512 expression_generator_.init_synthesize_map();
23513 expression_generator_.set_parser(*
this);
23514 expression_generator_.set_uom (unary_op_map_ );
23515 expression_generator_.set_bom (binary_op_map_ );
23516 expression_generator_.set_ibom(inv_binary_op_map_);
23517 expression_generator_.set_sf3m(sf3_map_ );
23518 expression_generator_.set_sf4m(sf4_map_ );
23519 expression_generator_.set_strength_reduction_state(settings_.strength_reduction_enabled());
23527 dec_.collect_variables() =
23528 settings_.collect_variables_enabled();
23530 dec_.collect_functions() =
23531 settings_.collect_functions_enabled();
23533 dec_.collect_assignments() =
23534 settings_.collect_assignments_enabled();
23536 if (settings_.replacer_enabled())
23538 symbol_replacer_.clear();
23541 helper_assembly_.token_modifier_list.clear();
23542 helper_assembly_.register_modifier(&symbol_replacer_);
23545 if (settings_.commutative_check_enabled())
23552 helper_assembly_.token_inserter_list.clear();
23553 helper_assembly_.register_inserter(&commutative_inserter_);
23556 if (settings_.joiner_enabled())
23558 helper_assembly_.token_joiner_list.clear();
23559 helper_assembly_.register_joiner(&operator_joiner_2_);
23560 helper_assembly_.register_joiner(&operator_joiner_3_);
23564 settings_.numeric_check_enabled () ||
23565 settings_.bracket_check_enabled () ||
23566 settings_.sequence_check_enabled()
23569 helper_assembly_.token_scanner_list.clear();
23571 if (settings_.numeric_check_enabled())
23573 helper_assembly_.register_scanner(&numeric_checker_);
23576 if (settings_.bracket_check_enabled())
23578 helper_assembly_.register_scanner(&bracket_checker_);
23581 if (settings_.sequence_check_enabled())
23583 helper_assembly_.register_scanner(&sequence_validator_ );
23584 helper_assembly_.register_scanner(&sequence_validator_3tkns_);
23592 error_list_ .clear();
23593 brkcnt_list_ .clear();
23594 synthesis_error_ .clear();
23595 immutable_memory_map_.reset();
23596 immutable_symtok_map_.clear();
23597 current_state_stack_ .clear();
23602 expression_generator_.set_allocator(node_allocator_);
23604 if (expression_string.empty())
23608 "ERR001 - Empty expression!",
23614 if (!init(expression_string))
23616 process_lexer_errors();
23620 if (lexer().empty())
23624 "ERR002 - Empty expression!",
23630 if (halt_compilation_check())
23635 if (!run_assemblies())
23640 if (halt_compilation_check())
23654 if ((0 !=
e) && (token_t::e_eof == current_token().type))
23656 bool* retinvk_ptr = 0;
23658 if (state_.return_stmt_present)
23660 dec_.return_present_ =
true;
23662 e = expression_generator_
23663 .return_envelope(
e, results_context_, retinvk_ptr);
23669 register_local_vars(expr);
23670 register_return_results(expr);
23676 if (error_list_.empty())
23681 "ERR003 - Invalid expression encountered",
23708 for (std::size_t i = 0; i < lexer().size(); ++i)
23710 if (lexer()[i].is_error())
23712 std::string diagnostic =
"ERR004 - ";
23714 switch (lexer()[i].type)
23731 default : diagnostic +=
"Unknown compiler error";
23737 diagnostic +
": " + lexer()[i].
value,
23745 if (settings_.commutative_check_enabled())
23747 helper_assembly_.run_inserters(lexer());
23750 if (settings_.joiner_enabled())
23752 helper_assembly_.run_joiners(lexer());
23755 if (settings_.replacer_enabled())
23757 helper_assembly_.run_modifiers(lexer());
23761 settings_.numeric_check_enabled () ||
23762 settings_.bracket_check_enabled () ||
23763 settings_.sequence_check_enabled()
23766 if (!helper_assembly_.run_scanners(lexer()))
23768 if (helper_assembly_.error_token_scanner)
23770 lexer::helper::bracket_checker* bracket_checker_ptr = 0;
23771 lexer::helper::numeric_checker<T>* numeric_checker_ptr = 0;
23772 lexer::helper::sequence_validator* sequence_validator_ptr = 0;
23773 lexer::helper::sequence_validator_3tokens* sequence_validator3_ptr = 0;
23775 if (0 != (bracket_checker_ptr =
dynamic_cast<lexer::helper::bracket_checker*
>(helper_assembly_.error_token_scanner)))
23779 bracket_checker_ptr->error_token(),
23780 "ERR005 - Mismatched brackets: '" + bracket_checker_ptr->error_token().value +
"'",
23783 else if (0 != (numeric_checker_ptr =
dynamic_cast<lexer::helper::numeric_checker<T>*
>(helper_assembly_.error_token_scanner)))
23785 for (std::size_t i = 0; i < numeric_checker_ptr->error_count(); ++i)
23787 lexer::token error_token = lexer()[numeric_checker_ptr->error_index(i)];
23792 "ERR006 - Invalid numeric token: '" + error_token.
value +
"'",
23796 if (numeric_checker_ptr->error_count())
23798 numeric_checker_ptr->clear_errors();
23801 else if (0 != (sequence_validator_ptr =
dynamic_cast<lexer::helper::sequence_validator*
>(helper_assembly_.error_token_scanner)))
23803 for (std::size_t i = 0; i < sequence_validator_ptr->error_count(); ++i)
23805 std::pair<lexer::token,lexer::token> error_token = sequence_validator_ptr->error(i);
23810 "ERR007 - Invalid token sequence: '" +
23811 error_token.first.value +
"' and '" +
23812 error_token.second.value +
"'",
23816 if (sequence_validator_ptr->error_count())
23818 sequence_validator_ptr->clear_errors();
23821 else if (0 != (sequence_validator3_ptr =
dynamic_cast<lexer::helper::sequence_validator_3tokens*
>(helper_assembly_.error_token_scanner)))
23823 for (std::size_t i = 0; i < sequence_validator3_ptr->error_count(); ++i)
23825 std::pair<lexer::token,lexer::token> error_token = sequence_validator3_ptr->error(i);
23830 "ERR008 - Invalid token sequence: '" +
23831 error_token.first.value +
"' and '" +
23832 error_token.second.value +
"'",
23836 if (sequence_validator3_ptr->error_count())
23838 sequence_validator3_ptr->clear_errors();
23857 if (index < error_list_.size())
23858 return error_list_[index];
23860 throw std::invalid_argument(
"parser::get_error() - Invalid error index specified");
23865 if (!error_list_.empty())
23867 return error_list_[0].diagnostic;
23870 return std::string(
"No Error");
23875 return error_list_.size();
23885 if (!settings_.replacer_enabled())
23895 if (!settings_.replacer_enabled())
23900 return symbol_replacer_.remove(symbol);
23905 resolve_unknown_symbol_ =
true;
23908 unknown_symbol_resolver_ = usr;
23910 unknown_symbol_resolver_ = &default_usr_;
23915 enable_unknown_symbol_resolver(&usr);
23920 resolve_unknown_symbol_ =
false;
23921 unknown_symbol_resolver_ = &default_usr_;
23926 loop_runtime_check_ = &lrtchk;
23931 vector_access_runtime_check_ = &vartchk;
23936 compilation_check_ptr_ = &compchk;
23958 const std::size_t length = symbol.size();
23966 return settings_.function_enabled(symbol) &&
23967 (base_ops_map_.end() != base_ops_map_.find(symbol));
23972 static const std::string s_sum =
"sum" ;
23973 static const std::string s_mul =
"mul" ;
23974 static const std::string s_avg =
"avg" ;
23975 static const std::string s_min =
"min" ;
23976 static const std::string s_max =
"max" ;
23977 static const std::string s_mand =
"mand";
23978 static const std::string s_mor =
"mor" ;
23979 static const std::string s_multi =
"~" ;
23980 static const std::string s_mswitch =
"[*]" ;
23994 settings_.function_enabled(symbol);
23999 return settings_.logic_disabled(operation);
24004 return settings_.arithmetic_disabled(operation);
24009 return settings_.assignment_disabled(operation);
24014 return settings_.inequality_disabled(operation);
24017 #ifdef exprtk_enable_debugging
24018 inline void next_token()
24020 const std::string ct_str = current_token().value;
24021 const std::size_t ct_pos = current_token().position;
24022 parser_helper::next_token();
24023 const std::string depth(2 * state_.scope_depth,
' ');
24025 "prev[%s | %04d] --> curr[%s | %04d] stack_level: %3d\n",
24028 static_cast<unsigned int>(ct_pos),
24029 current_token().
value.c_str(),
24030 static_cast<unsigned int>(current_token().position),
24031 static_cast<unsigned int>(state_.stack_depth)));
24037 std::vector<expression_node_ptr> arg_list;
24038 std::vector<bool> side_effect_list;
24047 state_.side_effect_present =
false;
24049 begin_token = current_token();
24055 if (error_list_.empty())
24060 "ERR009 - Invalid expression encountered",
24064 return error_node();
24068 arg_list.push_back(arg);
24070 side_effect_list.push_back(state_.side_effect_present);
24072 end_token = current_token();
24074 const std::string sub_expr = construct_subexpr(begin_token, end_token);
24077 static_cast<int>(arg_list.size() - 1),
24078 sub_expr.c_str()));
24080 exprtk_debug((
"parse_corpus(%02d) - Side effect present: %s\n",
24081 static_cast<int>(arg_list.size() - 1),
24082 state_.side_effect_present ?
"true" :
"false"));
24084 exprtk_debug((
"-------------------------------------------------\n"));
24087 if (token_is(token_t::e_eof,prsrhlpr_t::e_hold))
24089 if (lexer().finished())
24097 !arg_list.empty() &&
24101 dec_.final_stmt_return_ =
true;
24113 std::string result = lexer().substr(begin_token.
position,end_token.
position);
24115 for (std::size_t i = 0; i < result.size(); ++i)
24153 current_state_stack_.push_back(current_state);
24158 if (!current_state_stack_.empty())
24160 current_state_stack_.pop_back();
24166 return (!current_state_stack_.empty()) ?
24167 current_state_stack_.back() :
24175 if (compilation_check_ptr_ && !compilation_check_ptr_->continue_compilation(context))
24177 const std::string error_message =
24183 "ERR010 - Internal compilation check failed." + error_message,
24194 if (halt_compilation_check())
24196 return error_node();
24203 return error_node();
24210 return error_node();
24213 bool break_loop =
false;
24219 current_state.
reset();
24221 switch (current_token().type)
24243 if (token_t::e_symbol == current_token().type)
24245 static const std::string s_and =
"and" ;
24246 static const std::string s_nand =
"nand" ;
24247 static const std::string s_or =
"or" ;
24248 static const std::string s_nor =
"nor" ;
24249 static const std::string s_xor =
"xor" ;
24250 static const std::string s_xnor =
"xnor" ;
24251 static const std::string s_in =
"in" ;
24252 static const std::string s_like =
"like" ;
24253 static const std::string s_ilike =
"ilike";
24254 static const std::string s_and1 =
"&" ;
24255 static const std::string s_or1 =
"|" ;
24256 static const std::string s_not =
"not" ;
24265 #ifndef exprtk_disable_sc_andor
24284 #ifndef exprtk_disable_sc_andor
24335 else if (current_state.
left < precedence)
24345 if (is_invalid_logic_operation(current_state.
operation))
24355 return error_node();
24357 else if (is_invalid_arithmetic_operation(current_state.
operation))
24367 return error_node();
24369 else if (is_invalid_inequality_operation(current_state.
operation))
24379 return error_node();
24381 else if (is_invalid_assignment_operation(current_state.
operation))
24391 return error_node();
24394 if (0 != (right_branch = parse_expression(current_state.
right)))
24402 free_node(node_allocator_, right_branch);
24407 "ERR015 - Return statements cannot be part of sub-expressions",
24410 return error_node();
24413 push_current_state(current_state);
24415 new_expression = expression_generator_
24422 pop_current_state();
24425 if (0 == new_expression)
24427 if (error_list_.empty())
24432 !synthesis_error_.empty() ?
24434 "ERR016 - General parsing error at token: '" + prev_token.
value +
"'",
24439 free_node(node_allocator_, right_branch);
24441 return error_node();
24446 token_is(token_t::e_ternary,prsrhlpr_t::e_hold) &&
24447 (e_level00 == precedence)
24450 expression = parse_ternary_conditional_statement(new_expression);
24465 " exceeds maximum allowed expression depth of " +
details::to_str(
static_cast<int>(settings_.max_node_depth_)),
24470 return error_node();
24479 typedef details::unary_branch_node<T,details::neg_op<T> > ubn_t;
24480 ubn_t* n =
dynamic_cast<ubn_t*
>(node);
24494 typedef details::unary_variable_node<T,details::neg_op<T> > uvn_t;
24496 uvn_t* n =
dynamic_cast<uvn_t*
>(node);
24500 const T& v = n->v();
24504 (0 != (return_node = symtab_store_.get_variable(v))) ||
24505 (0 != (return_node = sem_ .get_variable(v)))
24509 node = return_node;
24518 "ERR018 - Failed to find variable node in symbol table",
24548 free_node(parser_.node_allocator_, expression_);
24562 template <
typename Type, std::
size_t N>
24583 for (std::size_t i = 0; i < N; ++i)
24585 free_node(parser_.node_allocator_, p_[i]);
24600 template <
typename Type>
24613 if (delete_ptr && !deq_.empty())
24615 for (std::size_t i = 0; i < deq_.size(); ++i)
24617 free_node(parser_.node_allocator_,deq_[i]);
24634 template <
typename Type>
24647 if (delete_ptr && !vec_.empty())
24649 for (std::size_t i = 0; i < vec_.size(); ++i)
24651 free_node(parser_.node_allocator_,vec_[i]);
24684 , original_value_(bb)
24689 b = b || original_value_;
24715 switch (function->param_count)
24717 case 0 : func_node = parse_function_call_0 (
function,function_name);
break;
24718 case 1 : func_node = parse_function_call< 1>(
function,function_name);
break;
24719 case 2 : func_node = parse_function_call< 2>(
function,function_name);
break;
24720 case 3 : func_node = parse_function_call< 3>(
function,function_name);
break;
24721 case 4 : func_node = parse_function_call< 4>(
function,function_name);
break;
24722 case 5 : func_node = parse_function_call< 5>(
function,function_name);
break;
24723 case 6 : func_node = parse_function_call< 6>(
function,function_name);
break;
24724 case 7 : func_node = parse_function_call< 7>(
function,function_name);
break;
24725 case 8 : func_node = parse_function_call< 8>(
function,function_name);
break;
24726 case 9 : func_node = parse_function_call< 9>(
function,function_name);
break;
24727 case 10 : func_node = parse_function_call<10>(
function,function_name);
break;
24728 case 11 : func_node = parse_function_call<11>(
function,function_name);
break;
24729 case 12 : func_node = parse_function_call<12>(
function,function_name);
break;
24730 case 13 : func_node = parse_function_call<13>(
function,function_name);
break;
24731 case 14 : func_node = parse_function_call<14>(
function,function_name);
break;
24732 case 15 : func_node = parse_function_call<15>(
function,function_name);
break;
24733 case 16 : func_node = parse_function_call<16>(
function,function_name);
break;
24734 case 17 : func_node = parse_function_call<17>(
function,function_name);
break;
24735 case 18 : func_node = parse_function_call<18>(
function,function_name);
break;
24736 case 19 : func_node = parse_function_call<19>(
function,function_name);
break;
24737 case 20 : func_node = parse_function_call<20>(
function,function_name);
break;
24742 "ERR019 - Invalid number of parameters for function: '" + function_name +
"'",
24745 return error_node();
24756 "ERR020 - Failed to generate call to function: '" + function_name +
"'",
24759 return error_node();
24763 template <std::
size_t NumberofParameters>
24767 #pragma warning(push)
24768 #pragma warning(disable: 4127)
24770 if (0 == NumberofParameters)
24775 "ERR021 - Expecting ifunction '" + function_name +
"' to have non-zero parameter count",
24778 return error_node();
24781 #pragma warning(pop)
24793 if (!token_is(token_t::e_lbracket))
24798 "ERR022 - Expecting argument list for function: '" + function_name +
"'",
24801 return error_node();
24804 for (
int i = 0; i < static_cast<int>(NumberofParameters); ++i)
24806 branch[i] = parse_expression();
24808 if (0 == branch[i])
24813 "ERR023 - Failed to parse argument " +
details::to_str(i) +
" for function: '" + function_name +
"'",
24816 return error_node();
24818 else if (i <
static_cast<int>(NumberofParameters - 1))
24820 if (!token_is(token_t::e_comma))
24825 "ERR024 - Invalid number of arguments for function: '" + function_name +
"'",
24828 return error_node();
24833 if (!token_is(token_t::e_rbracket))
24838 "ERR025 - Invalid number of arguments for function: '" + function_name +
"'",
24841 return error_node();
24844 result = expression_generator_.function(
function,branch);
24855 state_.side_effect_present =
function->has_side_effects();
24860 token_is(token_t::e_lbracket) &&
24861 !token_is(token_t::e_rbracket)
24867 "ERR026 - Expecting '()' to proceed call to function: '" + function_name +
"'",
24872 return error_node();
24878 template <std::
size_t MaxNumberofParameters>
24881 std::fill_n(param_list, MaxNumberofParameters,
reinterpret_cast<expression_node_ptr>(0));
24887 if (!token_is(token_t::e_lbracket))
24892 "ERR027 - Expected a '(' at start of function call to '" + function_name +
24893 "', instead got: '" + current_token().
value +
"'",
24899 if (token_is(token_t::e_rbracket, e_hold))
24904 "ERR028 - Expected at least one input parameter for function call '" + function_name +
"'",
24910 std::size_t param_index = 0;
24912 for (; param_index < MaxNumberofParameters; ++param_index)
24914 param_list[param_index] = parse_expression();
24916 if (0 == param_list[param_index])
24918 else if (token_is(token_t::e_rbracket))
24923 else if (token_is(token_t::e_comma))
24930 "ERR029 - Expected a ',' between function input parameters, instead got: '" + current_token().
value +
"'",
24942 "ERR030 - Invalid number of input parameters passed to function '" + function_name +
"'",
24948 return (param_index + 1);
24953 typedef std::pair<base_ops_map_t::iterator,base_ops_map_t::iterator> map_range_t;
24955 const std::string operation_name = current_token().
value;
24956 const token_t diagnostic_token = current_token();
24958 map_range_t itr_range = base_ops_map_.equal_range(operation_name);
24960 if (0 == std::distance(itr_range.first,itr_range.second))
24965 "ERR031 - No entry found for base operation: " + operation_name,
24968 return error_node();
24971 static const std::size_t MaxNumberofParameters = 4;
24974 const std::size_t parameter_count = parse_base_function_call(param_list, operation_name);
24976 if ((parameter_count > 0) && (parameter_count <= MaxNumberofParameters))
24978 for (base_ops_map_t::iterator itr = itr_range.first; itr != itr_range.second; ++itr)
24982 if (operation.
num_params == parameter_count)
24984 switch (parameter_count)
24986 #define base_opr_case(N) \
24988 expression_node_ptr pl##N[N] = {0}; \
24989 std::copy(param_list, param_list + N, pl##N); \
24990 lodge_symbol(operation_name, e_st_function); \
24991 return expression_generator_(operation.type, pl##N); \
24998 #undef base_opr_case
25004 for (std::size_t i = 0; i < MaxNumberofParameters; ++i)
25006 free_node(node_allocator_, param_list[i]);
25012 "ERR032 - Invalid number of input parameters for call to function: '" + operation_name +
"'",
25015 return error_node();
25025 bool result =
true;
25027 if (!token_is(token_t::e_comma))
25032 "ERR033 - Expected ',' between if-statement condition and consequent",
25037 else if (0 == (consequent = parse_expression()))
25042 "ERR034 - Failed to parse consequent for if-statement",
25047 else if (!token_is(token_t::e_comma))
25052 "ERR035 - Expected ',' between if-statement consequent and alternative",
25057 else if (0 == (alternative = parse_expression()))
25062 "ERR036 - Failed to parse alternative for if-statement",
25067 else if (!token_is(token_t::e_rbracket))
25072 "ERR037 - Expected ')' at the end of if-statement",
25078 #ifndef exprtk_disable_string_capabilities
25084 if (consq_is_str || alter_is_str)
25086 if (consq_is_str && alter_is_str)
25089 expression_generator_
25090 .conditional_string(condition, consequent, alternative);
25092 if (result_node && result_node->
valid())
25094 return result_node;
25100 "ERR038 - Failed to synthesize node: conditional_string",
25103 free_node(node_allocator_, result_node);
25104 return error_node();
25110 "ERR039 - Return types of if-statement differ: string/non-string",
25123 if (consq_is_vec || alter_is_vec)
25125 if (consq_is_vec && alter_is_vec)
25127 return expression_generator_
25128 .conditional_vector(condition, consequent, alternative);
25134 "ERR040 - Return types of if-statement differ: vector/non-vector",
25143 free_node(node_allocator_, condition );
25144 free_node(node_allocator_, consequent );
25145 free_node(node_allocator_, alternative);
25147 return error_node();
25150 return expression_generator_
25151 .conditional(condition, consequent, alternative);
25159 bool result =
true;
25161 if (token_is(token_t::e_lcrlbracket,prsrhlpr_t::e_hold))
25163 if (0 == (consequent = parse_multi_sequence(
"if-statement-01")))
25168 "ERR041 - Failed to parse body of consequent for if-statement",
25175 !settings_.commutative_check_enabled() &&
25176 !token_is(
"else",prsrhlpr_t::e_hold) &&
25177 !token_is_loop(prsrhlpr_t::e_hold) &&
25178 !token_is_arithmetic_opr(prsrhlpr_t::e_hold) &&
25179 !token_is_right_bracket (prsrhlpr_t::e_hold) &&
25180 !token_is_ineq_opr (prsrhlpr_t::e_hold) &&
25181 !token_is(token_t::e_ternary,prsrhlpr_t::e_hold) &&
25182 !token_is(token_t::e_eof)
25188 "ERR042 - Expected ';' at the end of the consequent for if-statement (1)",
25197 settings_.commutative_check_enabled() &&
25204 if (0 != (consequent = parse_expression()))
25206 if (!token_is(token_t::e_eof))
25211 "ERR043 - Expected ';' at the end of the consequent for if-statement (2)",
25222 "ERR044 - Failed to parse body of consequent for if-statement",
25235 if (token_is(token_t::e_lcrlbracket,prsrhlpr_t::e_hold))
25237 if (0 == (alternative = parse_multi_sequence(
"else-statement-01")))
25242 "ERR045 - Failed to parse body of the 'else' for if-statement",
25250 if (0 == (alternative = parse_conditional_statement()))
25255 "ERR046 - Failed to parse body of if-else statement",
25261 else if (0 != (alternative = parse_expression()))
25264 !token_is(token_t::e_ternary,prsrhlpr_t::e_hold) &&
25265 !token_is(token_t::e_eof)
25271 "ERR047 - Expected ';' at the end of the 'else-if' for the if-statement",
25282 "ERR048 - Failed to parse body of the 'else' for if-statement",
25290 #ifndef exprtk_disable_string_capabilities
25296 if (consq_is_str || alter_is_str)
25298 if (consq_is_str && alter_is_str)
25300 return expression_generator_
25301 .conditional_string(condition, consequent, alternative);
25307 "ERR049 - Return types of if-statement differ: string/non-string",
25320 if (consq_is_vec || alter_is_vec)
25322 if (consq_is_vec && alter_is_vec)
25324 return expression_generator_
25325 .conditional_vector(condition, consequent, alternative);
25331 "ERR050 - Return types of if-statement differ: vector/non-vector",
25340 free_node(node_allocator_, condition );
25341 free_node(node_allocator_, consequent );
25342 free_node(node_allocator_, alternative);
25344 return error_node();
25347 return expression_generator_
25348 .conditional(condition, consequent, alternative);
25357 if (!token_is(token_t::e_lbracket))
25362 "ERR051 - Expected '(' at start of if-statement, instead got: '" + current_token().
value +
"'",
25365 return error_node();
25367 else if (0 == (condition = parse_expression()))
25372 "ERR052 - Failed to parse condition for if-statement",
25375 return error_node();
25377 else if (token_is(token_t::e_comma,prsrhlpr_t::e_hold))
25380 return parse_conditional_statement_01(condition);
25382 else if (token_is(token_t::e_rbracket))
25400 return parse_conditional_statement_02(condition);
25406 "ERR053 - Invalid if-statement",
25411 return error_node();
25420 bool result =
true;
25422 if (0 == condition)
25427 "ERR054 - Encountered invalid condition branch for ternary if-statement",
25430 return error_node();
25432 else if (!token_is(token_t::e_ternary))
25437 "ERR055 - Expected '?' after condition of ternary if-statement",
25442 else if (0 == (consequent = parse_expression()))
25447 "ERR056 - Failed to parse consequent for ternary if-statement",
25452 else if (!token_is(token_t::e_colon))
25457 "ERR057 - Expected ':' between ternary if-statement consequent and alternative",
25462 else if (0 == (alternative = parse_expression()))
25467 "ERR058 - Failed to parse alternative for ternary if-statement",
25473 #ifndef exprtk_disable_string_capabilities
25479 if (consq_is_str || alter_is_str)
25481 if (consq_is_str && alter_is_str)
25483 return expression_generator_
25484 .conditional_string(condition, consequent, alternative);
25490 "ERR059 - Return types of ternary differ: string/non-string",
25503 if (consq_is_vec || alter_is_vec)
25505 if (consq_is_vec && alter_is_vec)
25507 return expression_generator_
25508 .conditional_vector(condition, consequent, alternative);
25514 "ERR060 - Return types of ternary differ: vector/non-vector",
25523 free_node(node_allocator_, condition );
25524 free_node(node_allocator_, consequent );
25525 free_node(node_allocator_, alternative);
25527 return error_node();
25530 return expression_generator_
25531 .conditional(condition, consequent, alternative);
25536 if (settings_.logic_disabled(
"not"))
25541 "ERR061 - Invalid or disabled logic operation 'not'",
25544 return error_node();
25547 return parse_base_operation();
25552 assert(!brkcnt_list_.empty());
25553 brkcnt_list_.pop_front();
25563 bool result =
true;
25567 if (!token_is(token_t::e_lbracket))
25572 "ERR062 - Expected '(' at start of while-loop condition statement",
25575 return error_node();
25577 else if (0 == (condition = parse_expression()))
25582 "ERR063 - Failed to parse condition for while-loop",
25585 return error_node();
25587 else if (!token_is(token_t::e_rbracket))
25592 "ERR064 - Expected ')' at end of while-loop condition statement",
25598 brkcnt_list_.push_front(
false);
25604 if (0 == (branch = parse_multi_sequence(
"while-loop",
true)))
25609 "ERR065 - Failed to parse body of while-loop"));
25612 else if (0 == (result_node = expression_generator_.while_loop(condition,
25614 brkcnt_list_.front())))
25619 "ERR066 - Failed to synthesize while-loop",
25626 handle_brkcnt_scope_exit();
25631 free_node(node_allocator_, condition );
25632 free_node(node_allocator_, result_node);
25634 return error_node();
25637 if (result_node && result_node->
valid())
25639 return result_node;
25645 "ERR067 - Failed to synthesize 'valid' while-loop",
25648 free_node(node_allocator_, result_node);
25650 return error_node();
25660 std::vector<expression_node_ptr> arg_list;
25661 std::vector<bool> side_effect_list;
25665 brkcnt_list_.push_front(
false);
25670 branch = node_allocator_.allocate<details::null_node<T> >();
25684 state_.side_effect_present =
false;
25689 return error_node();
25692 arg_list.push_back(arg);
25693 side_effect_list.push_back(state_.side_effect_present);
25702 const bool is_next_until = peek_token_is(token_t::e_symbol) &&
25703 peek_token_is(
"until");
25705 if (!token_is(separator) && is_next_until)
25710 "ERR068 - Expected '" +
token_t::to_str(separator) +
"' in body of repeat until loop",
25713 return error_node();
25723 branch = simplify(arg_list,side_effect_list);
25732 "ERR069 - Failed to parse body of repeat until loop",
25735 return error_node();
25739 if (!token_is(token_t::e_lbracket))
25744 "ERR070 - Expected '(' before condition statement of repeat until loop",
25748 return error_node();
25750 else if (0 == (condition = parse_expression()))
25755 "ERR071 - Failed to parse condition for repeat until loop",
25759 return error_node();
25761 else if (!token_is(token_t::e_rbracket))
25766 "ERR072 - Expected ')' after condition of repeat until loop",
25772 return error_node();
25776 expression_generator_
25777 .repeat_until_loop(
25780 brkcnt_list_.front());
25782 if (0 == result_node)
25787 "ERR073 - Failed to synthesize repeat until loop",
25792 return error_node();
25795 handle_brkcnt_scope_exit();
25797 if (result_node && result_node->
valid())
25799 return result_node;
25805 "ERR074 - Failed to synthesize 'valid' repeat until loop",
25808 free_node(node_allocator_, result_node);
25810 return error_node();
25821 bool result =
true;
25827 if (!token_is(token_t::e_lbracket))
25832 "ERR075 - Expected '(' at start of for-loop",
25835 return error_node();
25838 if (!token_is(token_t::e_eof))
25841 !token_is(token_t::e_symbol,prsrhlpr_t::e_hold) &&
25847 if (!token_is(token_t::e_symbol,prsrhlpr_t::e_hold))
25852 "ERR076 - Expected a variable at the start of initialiser section of for-loop",
25855 return error_node();
25862 "ERR077 - Expected variable assignment of initialiser section of for-loop",
25865 return error_node();
25868 const std::string loop_counter_symbol = current_token().value;
25870 se = &sem_.get_element(loop_counter_symbol);
25872 if ((se->
name == loop_counter_symbol) && se->
active)
25877 "ERR078 - For-loop variable '" + loop_counter_symbol+
"' is being shadowed by a previous declaration",
25880 return error_node();
25882 else if (!symtab_store_.is_variable(loop_counter_symbol))
25886 (se->
name == loop_counter_symbol) &&
25887 (se->
type == scope_element::e_variable)
25896 nse.
name = loop_counter_symbol;
25899 nse.
type = scope_element::e_variable;
25900 nse.
depth = state_.scope_depth;
25901 nse.
data =
new T(T(0));
25904 if (!sem_.add_element(nse))
25909 "ERR079 - Failed to add new local variable '" + loop_counter_symbol +
"' to SEM",
25912 sem_.free_element(nse);
25918 exprtk_debug((
"parse_for_loop() - INFO - Added new local variable: %s\n", nse.
name.c_str()));
25920 state_.activate_side_effect(
"parse_for_loop()");
25926 if (0 == (initialiser = parse_expression()))
25931 "ERR080 - Failed to parse initialiser of for-loop",
25936 else if (!token_is(token_t::e_eof))
25941 "ERR081 - Expected ';' after initialiser of for-loop",
25948 if (!token_is(token_t::e_eof))
25950 if (0 == (condition = parse_expression()))
25955 "ERR082 - Failed to parse condition of for-loop",
25960 else if (!token_is(token_t::e_eof))
25965 "ERR083 - Expected ';' after condition section of for-loop",
25972 if (!token_is(token_t::e_rbracket))
25974 if (0 == (incrementor = parse_expression()))
25979 "ERR084 - Failed to parse incrementor of for-loop",
25984 else if (!token_is(token_t::e_rbracket))
25989 "ERR085 - Expected ')' after incrementor section of for-loop",
25998 brkcnt_list_.push_front(
false);
26002 if (0 == (loop_body = parse_multi_sequence(
"for-loop",
true)))
26007 "ERR086 - Failed to parse body of for-loop",
26021 free_node(node_allocator_, initialiser);
26022 free_node(node_allocator_, condition );
26023 free_node(node_allocator_, incrementor);
26024 free_node(node_allocator_, loop_body );
26025 return error_node();
26029 expression_generator_.for_loop(initialiser,
26033 brkcnt_list_.front());
26034 handle_brkcnt_scope_exit();
26036 if (result_node && result_node->
valid())
26038 return result_node;
26044 "ERR087 - Failed to synthesize 'valid' for-loop",
26047 free_node(node_allocator_, result_node);
26049 return error_node();
26054 std::vector<expression_node_ptr> arg_list;
26062 "ERR088 - Expected keyword 'switch'",
26065 return error_node();
26072 if (!token_is(token_t::e_lcrlbracket))
26077 "ERR089 - Expected '{' for call to switch statement",
26080 return error_node();
26095 if (0 == condition)
26096 return error_node();
26097 else if (!token_is(token_t::e_colon))
26102 "ERR090 - Expected ':' for case of switch statement",
26107 return error_node();
26111 (token_is(token_t::e_lcrlbracket,prsrhlpr_t::e_hold)) ?
26112 parse_multi_sequence(
"switch-consequent") :
26113 parse_expression();
26115 if (0 == consequent)
26119 return error_node();
26121 else if (!token_is(token_t::e_eof))
26126 "ERR091 - Expected ';' at end of case for switch statement",
26129 free_node(node_allocator_, condition );
26130 free_node(node_allocator_, consequent);
26132 return error_node();
26138 free_node(node_allocator_, condition );
26139 free_node(node_allocator_, consequent);
26143 arg_list.push_back(condition );
26144 arg_list.push_back(consequent);
26150 if (0 != default_statement)
26155 "ERR092 - Multiple default cases for switch statement",
26158 return error_node();
26163 if (!token_is(token_t::e_colon))
26168 "ERR093 - Expected ':' for default of switch statement",
26171 return error_node();
26174 default_statement =
26175 (token_is(token_t::e_lcrlbracket,prsrhlpr_t::e_hold)) ?
26176 parse_multi_sequence(
"switch-default"):
26177 parse_expression();
26179 if (0 == default_statement)
26180 return error_node();
26181 else if (!token_is(token_t::e_eof))
26186 "ERR094 - Expected ';' at end of default for switch statement",
26189 return error_node();
26192 else if (token_is(token_t::e_rcrlbracket))
26199 "ERR095 - Expected '}' at end of switch statement",
26202 return error_node();
26206 const bool default_statement_present = (0 != default_statement);
26208 if (default_statement_present)
26210 arg_list.push_back(default_statement);
26214 arg_list.push_back(node_allocator_.allocate_c<
literal_node_t>(std::numeric_limits<T>::quiet_NaN()));
26217 result = expression_generator_.switch_statement(arg_list, (0 != default_statement));
26227 std::vector<expression_node_ptr> arg_list;
26234 "ERR096 - Expected token '[*]'",
26237 return error_node();
26244 if (!token_is(token_t::e_lcrlbracket))
26249 "ERR097 - Expected '{' for call to [*] statement",
26252 return error_node();
26262 "ERR098 - Expected a 'case' statement for multi-switch",
26265 return error_node();
26272 if (0 == condition)
26273 return error_node();
26275 if (!token_is(token_t::e_colon))
26280 "ERR099 - Expected ':' for case of [*] statement",
26283 return error_node();
26287 (token_is(token_t::e_lcrlbracket,prsrhlpr_t::e_hold)) ?
26288 parse_multi_sequence(
"multi-switch-consequent") :
26289 parse_expression();
26291 if (0 == consequent)
26292 return error_node();
26294 if (!token_is(token_t::e_eof))
26299 "ERR100 - Expected ';' at end of case for [*] statement",
26302 return error_node();
26308 free_node(node_allocator_, condition );
26309 free_node(node_allocator_, consequent);
26313 arg_list.push_back(condition );
26314 arg_list.push_back(consequent);
26317 if (token_is(token_t::e_rcrlbracket,prsrhlpr_t::e_hold))
26323 if (!token_is(token_t::e_rcrlbracket))
26328 "ERR101 - Expected '}' at end of [*] statement",
26331 return error_node();
26334 const expression_node_ptr result = expression_generator_.multi_switch_statement(arg_list);
26343 std::vector<expression_node_ptr> arg_list;
26346 const std::string symbol = current_token().value;
26351 return parse_multi_sequence();
26355 return parse_multi_switch_statement();
26369 "ERR102 - Unsupported built-in vararg function: " + symbol,
26372 return error_node();
26377 lodge_symbol(symbol, e_st_function);
26381 if (!token_is(token_t::e_lbracket))
26386 "ERR103 - Expected '(' for call to vararg function: " + symbol,
26389 return error_node();
26392 if (token_is(token_t::e_rbracket))
26397 "ERR104 - vararg function: " + symbol +
26398 " requires at least one input parameter",
26401 return error_node();
26409 return error_node();
26411 arg_list.push_back(arg);
26413 if (token_is(token_t::e_rbracket))
26415 else if (!token_is(token_t::e_comma))
26420 "ERR105 - Expected ',' for call to vararg function: " + symbol,
26423 return error_node();
26427 const expression_node_ptr result = expression_generator_.vararg_function(opt_type,arg_list);
26433 #ifndef exprtk_disable_string_capabilities
26436 if (!token_is(token_t::e_lsqrbracket))
26441 "ERR106 - Expected '[' as start of string range definition",
26446 return error_node();
26448 else if (token_is(token_t::e_rsqrbracket))
26450 return node_allocator_.allocate<details::string_size_node<T> >(
expression);
26455 if (!parse_range(rp,
true))
26459 return error_node();
26469 "ERR107 - Failed to generate string range node",
26478 if (result && result->
valid())
26486 "ERR108 - Failed to synthesize node: string_range_node",
26491 return error_node();
26494 inline expression_node_ptr parse_string_range_statement(expression_node_ptr&)
26496 return error_node();
26503 const std::size_t max_rangesize_parses = 100;
26510 (i++ < max_rangesize_parses) &&
26511 error_list_.empty() &&
26513 token_is(token_t::e_lsqrbracket,prsrhlpr_t::e_hold)
26527 error_list_.empty() &&
26532 settings_.commutative_check_enabled() &&
26534 peek_token_is(token_t::e_lsqrbracket)
26538 token_is(token_t::e_lsqrbracket);
26540 else if (token_is(token_t::e_lsqrbracket,prsrhlpr_t::e_hold))
26542 token_is(token_t::e_lsqrbracket);
26545 token_is(token_t::e_rbracket,prsrhlpr_t::e_hold) &&
26546 peek_token_is(token_t::e_lsqrbracket)
26549 token_is(token_t::e_rbracket );
26550 token_is(token_t::e_lsqrbracket);
26560 const std::string vector_name = sem_.get_vector_name(vec.
data());
26575 template <
typename Allocator1,
26576 typename Allocator2,
26577 template <
typename,
typename>
class Sequence>
26579 Sequence<bool,Allocator2>& side_effect_list,
26580 const bool specialise_on_final_type =
false)
26582 if (expression_list.empty())
26583 return error_node();
26584 else if (1 == expression_list.size())
26585 return expression_list[0];
26587 Sequence<expression_node_ptr,Allocator1> tmp_expression_list;
26589 bool return_node_present =
false;
26591 for (std::size_t i = 0; i < (expression_list.size() - 1); ++i)
26601 tmp_expression_list.push_back(expression_list[i]);
26606 for (std::size_t j = i + 1; j < expression_list.size(); ++j)
26608 free_node(node_allocator_,expression_list[j]);
26611 return_node_present =
true;
26618 !side_effect_list[i]
26621 free_node(node_allocator_,expression_list[i]);
26625 tmp_expression_list.push_back(expression_list[i]);
26628 if (!return_node_present)
26630 tmp_expression_list.push_back(expression_list.back());
26633 expression_list.swap(tmp_expression_list);
26635 if (tmp_expression_list.size() > expression_list.size())
26637 exprtk_debug((
"simplify() - Reduced subexpressions from %d to %d\n",
26638 static_cast<int>(tmp_expression_list.size()),
26639 static_cast<int>(expression_list .size())));
26643 return_node_present ||
26644 side_effect_list.back() ||
26645 (expression_list.size() > 1)
26647 state_.activate_side_effect(
"simplify()");
26649 if (1 == expression_list.size())
26650 return expression_list[0];
26652 return expression_generator_.vararg_function(
details::e_smulti,expression_list);
26654 return expression_generator_.vararg_function(
details::e_multi,expression_list);
26658 const bool enforce_crlbrackets =
false)
26664 if (!token_is(open_bracket))
26666 if (!enforce_crlbrackets && token_is(token_t::e_lbracket))
26668 open_bracket = token_t::e_lbracket;
26669 close_bracket = token_t::e_rbracket;
26670 separator = token_t::e_comma;
26677 "ERR109 - Expected '" +
token_t::to_str(open_bracket) +
"' for call to multi-sequence" +
26678 ((!source.empty()) ? std::string(
" section of " + source):
""),
26681 return error_node();
26684 else if (token_is(close_bracket))
26686 return node_allocator_.allocate<details::null_node<T> >();
26689 std::vector<expression_node_ptr> arg_list;
26690 std::vector<bool> side_effect_list;
26702 state_.side_effect_present =
false;
26707 return error_node();
26710 arg_list.push_back(arg);
26711 side_effect_list.push_back(state_.side_effect_present);
26714 if (token_is(close_bracket))
26717 const bool is_next_close = peek_token_is(close_bracket);
26719 if (!token_is(separator) && is_next_close)
26724 "ERR110 - Expected '" +
details::to_str(separator) +
"' for call to multi-sequence section of " + source,
26727 return error_node();
26730 if (token_is(close_bracket))
26734 result = simplify(arg_list, side_effect_list, source.empty());
26753 if (!skip_lsqr && !token_is(token_t::e_lsqrbracket))
26758 "ERR111 - Expected '[' for start of range",
26764 if (token_is(token_t::e_colon))
26766 rp.
n0_c.first =
true;
26767 rp.
n0_c.second = 0;
26768 rp.
cache.first = 0;
26779 "ERR112 - Failed parse begin section of range",
26786 const T r0_value = r0->
value();
26788 if (r0_value >= T(0))
26790 rp.
n0_c.first =
true;
26797 if (r0_value < T(0))
26802 "ERR113 - Range lower bound less than zero! Constraint: r0 >= 0",
26810 rp.
n0_e.first =
true;
26811 rp.
n0_e.second = r0;
26814 if (!token_is(token_t::e_colon))
26819 "ERR114 - Expected ':' for break in range",
26828 if (token_is(token_t::e_rsqrbracket))
26830 rp.
n1_c.first =
true;
26842 "ERR115 - Failed parse end section of range",
26851 const T r1_value = r1->
value();
26853 if (r1_value >= T(0))
26855 rp.
n1_c.first =
true;
26862 if (r1_value < T(0))
26867 "ERR116 - Range upper bound less than zero! Constraint: r1 >= 0",
26877 rp.
n1_e.first =
true;
26878 rp.
n1_e.second = r1;
26881 if (!token_is(token_t::e_rsqrbracket))
26886 "ERR117 - Expected ']' for start of range",
26897 std::size_t r0 = 0;
26898 std::size_t r1 = 0;
26900 bool rp_result =
false;
26904 rp_result = rp(r0, r1);
26906 catch (std::runtime_error&)
26909 if (!rp_result || (r0 > r1))
26914 "ERR118 - Invalid range, Constraint: r0 <= r1",
26927 dec_.add_symbol(symbol,st);
26930 #ifndef exprtk_disable_string_capabilities
26933 const std::string symbol = current_token().
value;
26935 typedef details::stringvar_node<T>* strvar_node_t;
26938 strvar_node_t const_str_node =
static_cast<strvar_node_t
>(0);
26942 if (scope_element::e_string == se.
type)
26946 lodge_symbol(symbol, e_st_local_string);
26951 str_ctxt_t str_ctx = symtab_store_.get_string_context(symbol);
26953 if ((0 == str_ctx.str_var) || !symtab_store_.is_conststr_stringvar(symbol))
26958 "ERR119 - Unknown string symbol",
26961 return error_node();
26964 assert(str_ctx.str_var != 0);
26965 assert(str_ctx.symbol_table != 0);
26967 result = str_ctx.str_var;
26969 if (symtab_store_.is_constant_string(symbol))
26971 const_str_node =
static_cast<strvar_node_t
>(result);
26972 result = expression_generator_(const_str_node->str());
26974 else if (symbol_table_t::e_immutable == str_ctx.symbol_table->mutability())
26976 lodge_immutable_symbol(
26978 make_memory_range(str_ctx.str_var->base(), str_ctx.str_var->size()));
26981 lodge_symbol(symbol, e_st_string);
26984 if (peek_token_is(token_t::e_lsqrbracket))
26988 if (peek_token_is(token_t::e_rsqrbracket))
26993 if (const_str_node)
26997 return expression_generator_(T(const_str_node->size()));
27000 return node_allocator_.allocate<details::stringvar_size_node<T> >
27001 (
static_cast<details::stringvar_node<T>*
>(result)->ref());
27006 if (!parse_range(rp))
27010 return error_node();
27012 else if (const_str_node)
27015 result = expression_generator_(const_str_node->ref(),rp);
27018 result = expression_generator_(
static_cast<details::stringvar_node<T>*
>
27019 (result)->ref(), rp);
27030 inline expression_node_ptr parse_string()
27032 return error_node();
27036 #ifndef exprtk_disable_string_capabilities
27039 const std::string const_str = current_token().
value;
27042 if (peek_token_is(token_t::e_lsqrbracket))
27046 if (peek_token_is(token_t::e_rsqrbracket))
27053 return expression_generator_(T(const_str.size()));
27058 if (!parse_range(rp))
27063 return error_node();
27070 rp.
n1_c.second = const_str.size() - 1;
27075 (rp.
n0_c.first && (rp.
n0_c.second >= const_str.size())) ||
27076 (rp.
n1_c.first && (rp.
n1_c.second >= const_str.size()))
27082 "ERR120 - Overflow in range for string: '" + const_str +
"'[" +
27089 return error_node();
27092 result = expression_generator_(const_str,rp);
27103 inline expression_node_ptr parse_const_string()
27105 return error_node();
27113 if (0 == (index_expr = parse_expression()))
27118 "ERR121 - Failed to parse index for vector: '" + vector_name +
"'",
27121 return error_node();
27123 else if (!token_is(token_t::e_rsqrbracket))
27128 "ERR122 - Expected ']' for index of vector: '" + vector_name +
"'",
27133 return error_node();
27141 const std::string vector_name = current_token().
value;
27145 const scope_element& se = sem_.get_active_element(vector_name);
27149 (se.
depth > state_.scope_depth) ||
27150 (scope_element::e_vector != se.
type)
27154 vec_ctxt_t vec_ctx = symtab_store_.get_vector_context(vector_name);
27156 if (0 == vec_ctx.vector_holder)
27161 "ERR123 - Symbol '" + vector_name +
" not a vector",
27164 return error_node();
27167 assert(0 != vec_ctx.vector_holder);
27168 assert(0 != vec_ctx.symbol_table );
27172 if (symbol_table_t::e_immutable == vec_ctx.symbol_table->mutability())
27174 lodge_immutable_symbol(
27176 make_memory_range(vec->
data(), vec->
size()));
27188 if (!token_is(token_t::e_lsqrbracket))
27192 else if (token_is(token_t::e_rsqrbracket))
27196 expression_generator_(T(vec->
size()));
27205 return synthesize_vector_element(vector_name, vec, vec_node, index_expr);
27208 return error_node();
27220 const std::size_t vec_size = vec->
size();
27222 if (index >= vec_size)
27232 free_node(node_allocator_, index_expr);
27234 return error_node();
27238 return expression_generator_.vector_element(vector_name, vec, vec_node, index_expr);
27243 std::vector<expression_node_ptr> arg_list;
27251 if (token_is(token_t::e_lbracket))
27253 if (token_is(token_t::e_rbracket))
27260 "ERR125 - Zero parameter call to vararg function: "
27261 + vararg_function_name +
" not allowed",
27264 return error_node();
27274 return error_node();
27276 arg_list.push_back(arg);
27278 if (token_is(token_t::e_rbracket))
27280 else if (!token_is(token_t::e_comma))
27285 "ERR126 - Expected ',' for call to vararg function: "
27286 + vararg_function_name,
27289 return error_node();
27299 "ERR127 - Zero parameter call to vararg function: "
27300 + vararg_function_name +
" not allowed",
27303 return error_node();
27306 if (arg_list.size() < vararg_function->
min_num_args())
27311 "ERR128 - Invalid number of parameters to call to vararg function: "
27312 + vararg_function_name +
", require at least "
27316 return error_node();
27318 else if (arg_list.size() > vararg_function->
max_num_args())
27323 "ERR129 - Invalid number of parameters to call to vararg function: "
27324 + vararg_function_name +
", require no more than "
27328 return error_node();
27331 result = expression_generator_.vararg_function_call(vararg_function,arg_list);
27359 const std::string& func_name,
27360 const std::string& func_prototypes,
27362 : invalid_state_(true)
27364 , function_name_(func_name)
27365 , default_return_type_(default_return_type)
27367 parse_function_prototypes(func_prototypes);
27370 bool verify(
const std::string& param_seq, std::size_t& pseq_index)
27372 if (function_definition_list_.empty())
27375 std::vector<std::pair<std::size_t,char> > error_list;
27377 for (std::size_t i = 0; i < function_definition_list_.size(); ++i)
27380 std::size_t diff_index = 0;
27384 diff_index, diff_value);
27392 error_list.push_back(std::make_pair(diff_index, diff_value));
27395 if (1 == error_list.size())
27399 parser_.current_token(),
27400 "ERR130 - Failed parameter type check for function '" + function_name_ +
"', "
27401 "Expected '" + function_definition_list_[0].param_seq +
27402 "' call set: '" + param_seq +
"'",
27408 std::size_t max_diff_index = 0;
27410 for (std::size_t i = 1; i < error_list.size(); ++i)
27412 if (error_list[i].first > error_list[max_diff_index].first)
27414 max_diff_index = i;
27420 parser_.current_token(),
27421 "ERR131 - Failed parameter type check for function '" + function_name_ +
"', "
27422 "Best match: '" + function_definition_list_[max_diff_index].param_seq +
27423 "' call set: '" + param_seq +
"'",
27432 return function_definition_list_.size();
27437 return function_definition_list_[index].param_seq;
27442 return function_definition_list_[index].return_type;
27447 return !invalid_state_;
27453 for (std::size_t i = 0; i < function_definition_list_.size(); ++i)
27455 if (std::string::npos != function_definition_list_[i].param_seq.find(
"Z"))
27468 std::string::const_iterator current_begin = param_seq.begin();
27469 std::string::const_iterator iter = param_seq.begin();
27471 std::vector<std::string> result;
27473 while (iter != param_seq.end())
27475 if (*iter == delimiter)
27477 result.push_back(std::string(current_begin, iter));
27478 current_begin = ++iter;
27484 if (current_begin != iter)
27486 result.push_back(std::string(current_begin, iter));
27498 if (param_seq.size() > 2)
27500 if (
':' == param_seq[1])
27504 if (type_checker::e_overload != default_return_type_)
27507 switch (param_seq[0])
27512 case 'S' : funcproto.
return_type = type_checker::e_string;
27515 default :
return false;
27518 param_seq.erase(0,2);
27523 (std::string::npos != param_seq.find(
"?*")) ||
27524 (std::string::npos != param_seq.find(
"**"))
27530 (std::string::npos == param_seq.find_first_not_of(
"STV*?|")) ||
27543 if (func_prototypes.empty())
27546 std::vector<std::string> param_seq_list = split_param_seq(func_prototypes);
27548 typedef std::map<std::string,std::size_t> param_seq_map_t;
27549 param_seq_map_t param_seq_map;
27551 for (std::size_t i = 0; i < param_seq_list.size(); ++i)
27555 if (!is_valid_token(param_seq_list[i], func_proto))
27557 invalid_state_ =
false;
27561 parser_.current_token(),
27562 "ERR132 - Invalid parameter sequence of '" + param_seq_list[i] +
27563 "' for function: " + function_name_,
27568 param_seq_map_t::const_iterator seq_itr = param_seq_map.find(param_seq_list[i]);
27570 if (param_seq_map.end() != seq_itr)
27572 invalid_state_ =
false;
27576 parser_.current_token(),
27577 "ERR133 - Function '" + function_name_ +
"' has a parameter sequence conflict between " +
27580 "param seq: " + param_seq_list[i],
27585 function_definition_list_.push_back(func_proto);
27601 std::vector<expression_node_ptr> arg_list;
27607 std::string param_type_list;
27612 function->parameter_sequence,
27613 type_checker::e_string);
27620 "ERR134 - Type checker instantiation failure for generic function: " + function_name,
27623 return error_node();
27626 if (token_is(token_t::e_lbracket))
27628 if (token_is(token_t::e_rbracket))
27631 !function->allow_zero_parameters() &&
27638 "ERR135 - Zero parameter call to generic function: "
27639 + function_name +
" not allowed",
27642 return error_node();
27652 return error_node();
27655 param_type_list +=
'V';
27657 param_type_list +=
'S';
27659 param_type_list +=
'T';
27661 arg_list.push_back(arg);
27663 if (token_is(token_t::e_rbracket))
27665 else if (!token_is(token_t::e_comma))
27670 "ERR136 - Expected ',' for call to generic function: " + function_name,
27673 return error_node();
27679 !function->parameter_sequence.empty() &&
27680 function->allow_zero_parameters () &&
27687 "ERR137 - Zero parameter call to generic function: "
27688 + function_name +
" not allowed",
27691 return error_node();
27694 std::size_t param_seq_index = 0;
27697 state_.type_check_enabled &&
27698 !tc.
verify(param_type_list, param_seq_index)
27704 "ERR138 - Invalid input parameter sequence for call to generic function: " + function_name,
27707 return error_node();
27713 expression_generator_
27714 .generic_function_call(
function, arg_list) :
27715 expression_generator_
27716 .generic_function_call(
function, arg_list, param_seq_index);
27724 std::vector<expression_node_ptr>& arg_list,
27725 const std::string& function_name,
27729 if (token_is(token_t::e_lbracket))
27731 if (token_is(token_t::e_rbracket))
27734 !function->allow_zero_parameters() &&
27741 "ERR139 - Zero parameter call to generic function: "
27742 + function_name +
" not allowed",
27758 param_type_list +=
'V';
27760 param_type_list +=
'S';
27762 param_type_list +=
'T';
27764 arg_list.push_back(arg);
27766 if (token_is(token_t::e_rbracket))
27768 else if (!token_is(token_t::e_comma))
27773 "ERR140 - Expected ',' for call to string function: " + function_name,
27787 #ifndef exprtk_disable_string_capabilities
27793 std::string param_type_list;
27795 type_checker tc((*
this), function_name, function->parameter_sequence, type_checker::e_string);
27798 (!function->parameter_sequence.empty()) &&
27802 return error_node();
27805 std::vector<expression_node_ptr> arg_list;
27808 if (!parse_igeneric_function_params(param_type_list, arg_list, function_name,
function, tc))
27810 return error_node();
27813 std::size_t param_seq_index = 0;
27815 if (!tc.
verify(param_type_list, param_seq_index))
27820 "ERR141 - Invalid input parameter sequence for call to string function: " + function_name,
27823 return error_node();
27829 expression_generator_
27830 .string_function_call(
function, arg_list) :
27831 expression_generator_
27832 .string_function_call(
function, arg_list, param_seq_index);
27844 std::string param_type_list;
27846 type_checker tc((*
this), function_name, function->parameter_sequence, type_checker::e_overload);
27849 (!function->parameter_sequence.empty()) &&
27853 return error_node();
27856 std::vector<expression_node_ptr> arg_list;
27859 if (!parse_igeneric_function_params(param_type_list, arg_list, function_name,
function, tc))
27861 return error_node();
27864 std::size_t param_seq_index = 0;
27866 if (!tc.
verify(param_type_list, param_seq_index))
27871 "ERR142 - Invalid input parameter sequence for call to overloaded function: " + function_name,
27874 return error_node();
27882 result = expression_generator_
27883 .generic_function_call(
function, arg_list);
27885 result = expression_generator_
27886 .generic_function_call(
function, arg_list, param_seq_index);
27888 else if (type_checker::e_string == tc.
return_type(param_seq_index))
27891 result = expression_generator_
27892 .string_function_call(
function, arg_list);
27894 result = expression_generator_
27895 .string_function_call(
function, arg_list, param_seq_index);
27902 "ERR143 - Invalid return type for call to overloaded function: " + function_name,
27911 template <
typename Type, std::
size_t NumberOfParameters>
27925 if (!p.
token_is(token_t::e_lbracket))
27930 "ERR144 - Expected '(' for special function '" + sf_name +
"'",
27933 return error_node();
27936 for (std::size_t i = 0; i < NumberOfParameters; ++i)
27940 if (0 == branch[i])
27944 else if (i < (NumberOfParameters - 1))
27946 if (!p.
token_is(token_t::e_comma))
27951 "ERR145 - Expected ',' before next parameter of special function '" + sf_name +
"'",
27959 if (!p.
token_is(token_t::e_rbracket))
27964 "ERR146 - Invalid number of parameters for special function '" + sf_name +
"'",
27980 const std::string sf_name = current_token().
value;
27991 "ERR147 - Invalid special function[1]: " + sf_name,
27994 return error_node();
27997 const int id = (sf_name[2] -
'0') * 10 +
27998 (sf_name[3] -
'0');
28005 "ERR148 - Invalid special function[2]: " + sf_name,
28008 return error_node();
28013 const std::size_t NumberOfParameters = (
id < (sf_3_to_4 - 1000)) ? 3U : 4U;
28015 switch (NumberOfParameters)
28019 default :
return error_node();
28026 return node_allocator_.allocate<details::null_node<T> >();
28029 #ifndef exprtk_disable_break_continue
28032 if (state_.parsing_break_stmt)
28037 "ERR149 - Invoking 'break' within a break call is not allowed",
28040 return error_node();
28042 else if (0 == state_.parsing_loop_stmt_count)
28047 "ERR150 - Invalid use of 'break', allowed only in the scope of a loop",
28050 return error_node();
28055 if (!brkcnt_list_.empty())
28059 brkcnt_list_.front() =
true;
28063 if (token_is(token_t::e_lsqrbracket))
28065 if (0 == (return_expr = parse_expression()))
28070 "ERR151 - Failed to parse return expression for 'break' statement",
28073 return error_node();
28075 else if (!token_is(token_t::e_rsqrbracket))
28080 "ERR152 - Expected ']' at the completion of break's return expression",
28083 free_node(node_allocator_,return_expr);
28085 return error_node();
28089 state_.activate_side_effect(
"parse_break_statement()");
28091 return node_allocator_.allocate<details::break_node<T> >(return_expr);
28098 "ERR153 - Invalid use of 'break', allowed only in the scope of a loop",
28102 return error_node();
28107 if (0 == state_.parsing_loop_stmt_count)
28112 "ERR154 - Invalid use of 'continue', allowed only in the scope of a loop",
28115 return error_node();
28121 brkcnt_list_.front() =
true;
28122 state_.activate_side_effect(
"parse_continue_statement()");
28124 return node_allocator_.allocate<details::continue_node<T> >();
28133 if (!token_is(token_t::e_lsqrbracket))
28138 "ERR155 - Expected '[' as part of vector size definition",
28141 return error_node();
28143 else if (0 == (size_expression_node = parse_expression()))
28148 "ERR156 - Failed to determine size of vector '" + vec_name +
"'",
28151 return error_node();
28155 const bool is_rebaseble_vector =
28157 static_cast<details::vector_size_node<T>*
>(size_expression_node)->vec_holder()->rebaseable();
28159 free_node(node_allocator_,size_expression_node);
28161 const std::string error_msg = (is_rebaseble_vector) ?
28162 std::string(
"Rebasable/Resizable vector cannot be used to define the size of vector") :
28163 std::string(
"Expected a constant literal number as size of vector");
28167 "ERR157 - " + error_msg +
" '" + vec_name +
"'",
28170 return error_node();
28173 const T vector_size = size_expression_node->
value();
28175 free_node(node_allocator_,size_expression_node);
28177 const std::size_t max_vector_size = settings_.max_local_vector_size();
28180 (vector_size <= T(0)) ||
28181 std::not_equal_to<T>()
28182 (T(0),vector_size - details::numeric::trunc(vector_size)) ||
28183 (
static_cast<std::size_t
>(vector_size) > max_vector_size)
28189 "ERR158 - Invalid vector size. Must be an integer in the "
28190 "range [0," +
details::to_str(
static_cast<std::size_t
>(max_vector_size)) +
"], size: " +
28194 return error_node();
28197 std::vector<expression_node_ptr> vec_initilizer_list;
28201 bool single_value_initialiser =
false;
28202 bool vec_to_vec_initialiser =
false;
28203 bool null_initialisation =
false;
28205 if (!token_is(token_t::e_rsqrbracket))
28210 "ERR159 - Expected ']' as part of vector size definition",
28213 return error_node();
28215 else if (!token_is(token_t::e_eof))
28222 "ERR160 - Expected ':=' as part of vector definition",
28225 return error_node();
28227 else if (token_is(token_t::e_lsqrbracket))
28231 if (0 == initialiser)
28236 "ERR161 - Failed to parse single vector initialiser",
28239 return error_node();
28242 vec_initilizer_list.push_back(initialiser);
28244 if (!token_is(token_t::e_rsqrbracket))
28249 "ERR162 - Expected ']' to close single value vector initialiser",
28252 return error_node();
28255 single_value_initialiser =
true;
28257 else if (!token_is(token_t::e_lcrlbracket))
28262 if (token_t::e_symbol == current_token().type)
28267 if (scope_element::e_vector == se.
type)
28269 if (0 != (initialiser = parse_expression()))
28270 vec_initilizer_list.push_back(initialiser);
28272 return error_node();
28275 else if (symtab_store_.is_vector(current_token().
value))
28277 lodge_symbol(current_token().
value, e_st_vector);
28279 if (0 != (initialiser = parse_expression()))
28280 vec_initilizer_list.push_back(initialiser);
28282 return error_node();
28285 else if (token_is(token_t::e_symbol,
"null"))
28286 null_initialisation =
true;
28289 if (!null_initialisation)
28291 if (0 == initialiser)
28296 "ERR163 - Expected '{' as part of vector initialiser list",
28299 return error_node();
28302 vec_to_vec_initialiser =
true;
28305 else if (!token_is(token_t::e_rcrlbracket))
28311 if (0 == initialiser)
28316 "ERR164 - Expected '{' as part of vector initialiser list",
28319 return error_node();
28322 vec_initilizer_list.push_back(initialiser);
28324 if (token_is(token_t::e_rcrlbracket))
28327 const bool is_next_close = peek_token_is(token_t::e_rcrlbracket);
28329 if (!token_is(token_t::e_comma) && is_next_close)
28334 "ERR165 - Expected ',' between vector initialisers",
28337 return error_node();
28340 if (token_is(token_t::e_rcrlbracket))
28346 !token_is(token_t::e_rbracket , prsrhlpr_t::e_hold) &&
28347 !token_is(token_t::e_rcrlbracket, prsrhlpr_t::e_hold) &&
28348 !token_is(token_t::e_rsqrbracket, prsrhlpr_t::e_hold)
28351 if (!token_is(token_t::e_eof))
28356 "ERR166 - Expected ';' at end of vector definition",
28359 return error_node();
28363 if (T(vec_initilizer_list.size()) > vector_size)
28368 "ERR167 - Initialiser list larger than the number of elements in the vector: '" + vec_name +
"'",
28371 return error_node();
28381 if (se.
name == vec_name)
28388 "ERR168 - Illegal redefinition of local vector: '" + vec_name +
"'",
28391 return error_node();
28394 (se.
size == vec_size) &&
28395 (scope_element::e_vector == se.
type)
28400 se.
depth = state_.scope_depth;
28405 if (0 == vec_holder)
28408 nse.
name = vec_name;
28411 nse.
type = scope_element::e_vector;
28412 nse.
depth = state_.scope_depth;
28413 nse.
size = vec_size;
28414 nse.
data =
new T[vec_size];
28417 std::memset(nse.
data, 0x00, vec_size *
sizeof(T));
28419 if (!sem_.add_element(nse))
28424 "ERR169 - Failed to add new local vector '" + vec_name +
"' to SEM",
28427 sem_.free_element(nse);
28429 return error_node();
28434 exprtk_debug((
"parse_define_vector_statement() - INFO - Added new local vector: %s[%d]\n",
28436 static_cast<int>(nse.
size)));
28439 state_.activate_side_effect(
"parse_define_vector_statement()");
28441 lodge_symbol(vec_name, e_st_local_vector);
28445 if (!single_value_initialiser && vec_initilizer_list.empty())
28447 single_value_initialiser =
true;
28448 assert(vec_initilizer_list.size() <= 1);
28451 if (null_initialisation)
28452 result = expression_generator_(T(0.0));
28453 else if (vec_to_vec_initialiser)
28457 result = expression_generator_(
28460 vec_initilizer_list[0]);
28463 result = node_allocator_
28464 .allocate<details::vector_assignment_node<T> >(
28467 vec_initilizer_list,
28468 single_value_initialiser);
28475 #ifndef exprtk_disable_string_capabilities
28482 if (se.
name == str_name)
28489 "ERR170 - Illegal redefinition of local variable: '" + str_name +
"'",
28492 free_node(node_allocator_,initialisation_expression);
28494 return error_node();
28496 else if (scope_element::e_string == se.
type)
28500 se.
depth = state_.scope_depth;
28508 nse.
name = str_name;
28511 nse.
type = scope_element::e_string;
28512 nse.
depth = state_.scope_depth;
28513 nse.
data =
new std::string;
28516 if (!sem_.add_element(nse))
28521 "ERR171 - Failed to add new local string variable '" + str_name +
"' to SEM",
28524 free_node(node_allocator_,initialisation_expression);
28526 sem_.free_element(nse);
28528 return error_node();
28533 exprtk_debug((
"parse_define_string_statement() - INFO - Added new local string variable: %s\n", nse.
name.c_str()));
28536 lodge_symbol(str_name, e_st_local_string);
28538 state_.activate_side_effect(
"parse_define_string_statement()");
28542 branch[0] = str_node;
28543 branch[1] = initialisation_expression;
28548 inline expression_node_ptr parse_define_string_statement(
const std::string&, expression_node_ptr)
28550 return error_node();
28562 if (settings_.vardef_disabled())
28567 "ERR172 - Illegal variable definition",
28570 return error_node();
28574 return error_node();
28579 const std::string var_name = current_token().value;
28583 if (!token_is(token_t::e_symbol))
28588 "ERR173 - Expected a symbol for variable definition",
28591 return error_node();
28598 "ERR174 - Illegal redefinition of reserved keyword: '" + var_name +
"'",
28601 return error_node();
28603 else if (symtab_store_.symbol_exists(var_name))
28608 "ERR175 - Illegal redefinition of variable '" + var_name +
"'",
28611 return error_node();
28613 else if (local_variable_is_shadowed(var_name))
28618 "ERR176 - Illegal redefinition of local variable: '" + var_name +
"'",
28621 return error_node();
28623 else if (token_is(token_t::e_lsqrbracket,prsrhlpr_t::e_hold))
28625 return parse_define_vector_statement(var_name);
28627 else if (token_is(token_t::e_lcrlbracket,prsrhlpr_t::e_hold))
28629 return parse_uninitialised_var_statement(var_name);
28633 if (0 == (initialisation_expression = parse_expression()))
28638 "ERR177 - Failed to parse initialisation expression",
28641 return error_node();
28646 !token_is(token_t::e_rbracket , prsrhlpr_t::e_hold) &&
28647 !token_is(token_t::e_rcrlbracket, prsrhlpr_t::e_hold) &&
28648 !token_is(token_t::e_rsqrbracket, prsrhlpr_t::e_hold)
28651 if (!token_is(token_t::e_eof,prsrhlpr_t::e_hold))
28656 "ERR178 - Expected ';' after variable definition",
28659 free_node(node_allocator_,initialisation_expression);
28661 return error_node();
28666 (0 != initialisation_expression) &&
28670 return parse_define_string_statement(var_name,initialisation_expression);
28677 if (se.
name == var_name)
28684 "ERR179 - Illegal redefinition of local variable: '" + var_name +
"'",
28687 free_node(node_allocator_, initialisation_expression);
28689 return error_node();
28691 else if (scope_element::e_variable == se.
type)
28695 se.
depth = state_.scope_depth;
28703 nse.
name = var_name;
28706 nse.
type = scope_element::e_variable;
28707 nse.
depth = state_.scope_depth;
28708 nse.
data =
new T(T(0));
28711 if (!sem_.add_element(nse))
28716 "ERR180 - Failed to add new local variable '" + var_name +
"' to SEM",
28719 free_node(node_allocator_, initialisation_expression);
28721 sem_.free_element(nse);
28723 return error_node();
28728 exprtk_debug((
"parse_define_var_statement() - INFO - Added new local variable: %s\n", nse.
name.c_str()));
28731 state_.activate_side_effect(
"parse_define_var_statement()");
28733 lodge_symbol(var_name, e_st_local_variable);
28737 branch[0] = var_node;
28738 branch[1] = initialisation_expression ? initialisation_expression : expression_generator_(T(0));
28746 !token_is(token_t::e_lcrlbracket) ||
28747 !token_is(token_t::e_rcrlbracket)
28753 "ERR181 - Expected a '{}' for uninitialised var definition",
28756 return error_node();
28758 else if (!token_is(token_t::e_eof,prsrhlpr_t::e_hold))
28763 "ERR182 - Expected ';' after uninitialised variable definition",
28766 return error_node();
28773 if (se.
name == var_name)
28780 "ERR183 - Illegal redefinition of local variable: '" + var_name +
"'",
28783 return error_node();
28785 else if (scope_element::e_variable == se.
type)
28796 nse.
name = var_name;
28799 nse.
type = scope_element::e_variable;
28800 nse.
depth = state_.scope_depth;
28801 nse.
ip_index = sem_.next_ip_index();
28802 nse.
data =
new T(T(0));
28805 if (!sem_.add_element(nse))
28810 "ERR184 - Failed to add new local variable '" + var_name +
"' to SEM",
28813 sem_.free_element(nse);
28815 return error_node();
28818 exprtk_debug((
"parse_uninitialised_var_statement() - INFO - Added new local variable: %s\n",
28819 nse.
name.c_str()));
28822 lodge_symbol(var_name, e_st_local_variable);
28824 state_.activate_side_effect(
"parse_uninitialised_var_statement()");
28826 return expression_generator_(T(0));
28833 return error_node();
28838 if (!token_is(token_t::e_lbracket))
28843 "ERR185 - Expected '(' at start of swap statement",
28846 return error_node();
28852 bool variable0_generated =
false;
28853 bool variable1_generated =
false;
28855 const std::string var0_name = current_token().value;
28857 if (!token_is(token_t::e_symbol,prsrhlpr_t::e_hold))
28862 "ERR186 - Expected a symbol for variable or vector element definition",
28865 return error_node();
28867 else if (peek_token_is(token_t::e_lsqrbracket))
28869 if (0 == (variable0 = parse_vector()))
28874 "ERR187 - First parameter to swap is an invalid vector element: '" + var0_name +
"'",
28877 return error_node();
28880 variable0_generated =
true;
28884 if (symtab_store_.is_variable(var0_name))
28886 variable0 = symtab_store_.get_variable(var0_name);
28893 (se.
name == var0_name) &&
28894 (scope_element::e_variable == se.
type)
28900 lodge_symbol(var0_name, e_st_variable);
28902 if (0 == variable0)
28907 "ERR188 - First parameter to swap is an invalid variable: '" + var0_name +
"'",
28910 return error_node();
28916 if (!token_is(token_t::e_comma))
28921 "ERR189 - Expected ',' between parameters to swap",
28924 if (variable0_generated)
28929 return error_node();
28932 const std::string var1_name = current_token().value;
28934 if (!token_is(token_t::e_symbol,prsrhlpr_t::e_hold))
28939 "ERR190 - Expected a symbol for variable or vector element definition",
28942 if (variable0_generated)
28947 return error_node();
28949 else if (peek_token_is(token_t::e_lsqrbracket))
28951 if (0 == (variable1 = parse_vector()))
28956 "ERR191 - Second parameter to swap is an invalid vector element: '" + var1_name +
"'",
28959 if (variable0_generated)
28964 return error_node();
28967 variable1_generated =
true;
28971 if (symtab_store_.is_variable(var1_name))
28973 variable1 = symtab_store_.get_variable(var1_name);
28980 (se.
name == var1_name) &&
28981 (scope_element::e_variable == se.
type)
28987 lodge_symbol(var1_name, e_st_variable);
28989 if (0 == variable1)
28994 "ERR192 - Second parameter to swap is an invalid variable: '" + var1_name +
"'",
28997 if (variable0_generated)
29002 return error_node();
29008 if (!token_is(token_t::e_rbracket))
29013 "ERR193 - Expected ')' at end of swap statement",
29016 if (variable0_generated)
29021 if (variable1_generated)
29026 return error_node();
29029 typedef details::variable_node<T>* variable_node_ptr;
29031 variable_node_ptr v0 = variable_node_ptr(0);
29032 variable_node_ptr v1 = variable_node_ptr(0);
29037 (0 != (v0 =
dynamic_cast<variable_node_ptr
>(variable0))) &&
29038 (0 != (v1 =
dynamic_cast<variable_node_ptr
>(variable1)))
29041 result = node_allocator_.allocate<details::swap_node<T> >(v0, v1);
29043 if (variable0_generated)
29048 if (variable1_generated)
29054 result = node_allocator_.allocate<details::swap_generic_node<T> >
29055 (variable0, variable1);
29057 state_.activate_side_effect(
"parse_swap_statement()");
29062 #ifndef exprtk_disable_return_statement
29065 if (state_.parsing_return_stmt)
29070 "ERR194 - Return call within a return call is not allowed",
29073 return error_node();
29078 std::vector<expression_node_ptr> arg_list;
29084 return error_node();
29089 if (!token_is(token_t::e_lsqrbracket))
29094 "ERR195 - Expected '[' at start of return statement",
29097 return error_node();
29099 else if (!token_is(token_t::e_rsqrbracket))
29106 return error_node();
29108 arg_list.push_back(arg);
29110 if (token_is(token_t::e_rsqrbracket))
29112 else if (!token_is(token_t::e_comma))
29117 "ERR196 - Expected ',' between values during call to return",
29120 return error_node();
29124 else if (settings_.zero_return_disabled())
29129 "ERR197 - Zero parameter return statement not allowed",
29132 return error_node();
29137 if (token_is(token_t::e_rsqrbracket))
29139 if (!arg_list.empty())
29144 "ERR198 - Invalid ']' found during return call",
29147 return error_node();
29151 std::string ret_param_type_list;
29153 for (std::size_t i = 0; i < arg_list.size(); ++i)
29155 if (0 == arg_list[i])
29156 return error_node();
29158 ret_param_type_list +=
'V';
29160 ret_param_type_list +=
'S';
29162 ret_param_type_list +=
'T';
29165 dec_.retparam_list_.push_back(ret_param_type_list);
29171 state_.return_stmt_present =
true;
29173 state_.activate_side_effect(
"parse_return_statement()");
29178 inline expression_node_ptr parse_return_statement()
29180 return error_node();
29187 peek_token_is(token_t::e_lbracket ) ||
29188 peek_token_is(token_t::e_lcrlbracket) ||
29189 peek_token_is(token_t::e_lsqrbracket)
29192 if (!settings_.commutative_check_enabled())
29197 "ERR199 - Invalid sequence of variable '" + symbol +
"' and bracket",
29211 bool implied_mul =
false;
29220 case token_t::e_lcrlbracket : implied_mul = token_is(token_t::e_lbracket ,hold) ||
29221 token_is(token_t::e_lcrlbracket,hold) ||
29222 token_is(token_t::e_lsqrbracket,hold) ;
29225 case token_t::e_lbracket : implied_mul = token_is(token_t::e_lbracket ,hold) ||
29226 token_is(token_t::e_lcrlbracket,hold) ||
29227 token_is(token_t::e_lsqrbracket,hold) ;
29230 case token_t::e_lsqrbracket : implied_mul = token_is(token_t::e_lbracket ,hold) ||
29231 token_is(token_t::e_lcrlbracket,hold) ||
29232 token_is(token_t::e_lsqrbracket,hold) ;
29235 default :
return true;
29240 if (!settings_.commutative_check_enabled())
29245 "ERR200 - Invalid sequence of brackets",
29250 else if (token_t::e_eof != current_token().type)
29252 lexer().insert_front(current_token().type);
29267 const T* begin =
reinterpret_cast<const T*
>(&
t);
29268 const T* end = begin + 1;
29284 immutable_memory_map_.add_interval(interval);
29285 immutable_symtok_map_[interval] = token;
29290 const std::string symbol = current_token().
value;
29294 var_ctxt_t var_ctx = symtab_store_.get_variable_context(symbol);
29296 if (var_ctx.variable)
29298 assert(var_ctx.symbol_table);
29302 if (symtab_store_.is_constant_node(symbol))
29304 result_variable = expression_generator_(var_ctx.variable->value());
29306 else if (symbol_table_t::e_immutable == var_ctx.symbol_table->mutability())
29308 lodge_immutable_symbol(current_token(), make_memory_range(var_ctx.variable->ref()));
29309 result_variable = var_ctx.variable;
29312 if (!post_variable_process(symbol))
29313 return error_node();
29315 lodge_symbol(symbol, e_st_variable);
29319 return result_variable;
29329 if (scope_element::e_variable == se.
type)
29332 lodge_symbol(symbol, e_st_local_variable);
29334 if (!post_variable_process(symbol))
29335 return error_node();
29341 else if (scope_element::e_vector == se.
type)
29343 return parse_vector();
29345 #ifndef exprtk_disable_string_capabilities
29346 else if (scope_element::e_string == se.
type)
29348 return parse_string();
29354 #ifndef exprtk_disable_string_capabilities
29356 if (symtab_store_.is_stringvar(symbol))
29358 return parse_string();
29364 ifunction<T>*
function = symtab_store_.get_function(symbol);
29368 lodge_symbol(symbol, e_st_function);
29371 parse_function_invocation(
function,symbol);
29380 "ERR201 - Failed to generate node for function: '" + symbol +
"'",
29383 return error_node();
29392 if (vararg_function)
29394 lodge_symbol(symbol, e_st_function);
29397 parse_vararg_function_call(vararg_function, symbol);
29399 if (vararg_func_node)
29400 return vararg_func_node;
29406 "ERR202 - Failed to generate node for vararg function: '" + symbol +
"'",
29409 return error_node();
29418 if (generic_function)
29420 lodge_symbol(symbol, e_st_function);
29423 parse_generic_function_call(generic_function, symbol);
29425 if (genericfunc_node)
29426 return genericfunc_node;
29432 "ERR203 - Failed to generate node for generic function: '" + symbol +
"'",
29435 return error_node();
29440 #ifndef exprtk_disable_string_capabilities
29445 if (string_function)
29447 lodge_symbol(symbol, e_st_function);
29450 parse_string_function_call(string_function, symbol);
29452 if (stringfunc_node)
29453 return stringfunc_node;
29459 "ERR204 - Failed to generate node for string function: '" + symbol +
"'",
29462 return error_node();
29471 if (overload_function)
29473 lodge_symbol(symbol, e_st_function);
29476 parse_overload_function_call(overload_function, symbol);
29478 if (overloadfunc_node)
29479 return overloadfunc_node;
29485 "ERR205 - Failed to generate node for overload function: '" + symbol +
"'",
29488 return error_node();
29495 if (symtab_store_.is_vector(symbol))
29497 lodge_symbol(symbol, e_st_vector);
29498 return parse_vector();
29504 settings_.function_enabled(symbol) ||
29511 "ERR206 - Invalid use of reserved symbol '" + symbol +
"'",
29514 return error_node();
29519 if (resolve_unknown_symbol_ && unknown_symbol_resolver_)
29525 std::string error_message;
29527 if (unknown_symbol_resolver::e_usrmode_default == unknown_symbol_resolver_->mode)
29529 T default_value = T(0);
29533 if (unknown_symbol_resolver_->process(symbol, usr_symbol_type, default_value, error_message))
29535 bool create_result =
false;
29537 switch (usr_symbol_type)
29539 case unknown_symbol_resolver::e_usr_variable_type :
29543 case unknown_symbol_resolver::e_usr_constant_type :
29544 create_result = symtab.
add_constant(symbol, default_value);
29547 default : create_result =
false;
29556 if (symtab_store_.is_constant_node(symbol))
29558 var = expression_generator_(var->
value());
29561 lodge_symbol(symbol, e_st_variable);
29563 if (!post_variable_process(symbol))
29564 return error_node();
29576 "ERR207 - Failed to create variable: '" + symbol +
"'" +
29577 (error_message.empty() ?
"" :
" - " + error_message),
29581 else if (unknown_symbol_resolver::e_usrmode_extended == unknown_symbol_resolver_->mode)
29583 if (unknown_symbol_resolver_->process(symbol, symtab, error_message))
29596 "ERR208 - Failed to resolve symbol: '" + symbol +
"'" +
29597 (error_message.empty() ?
"" :
" - " + error_message),
29601 return error_node();
29608 "ERR209 - Undefined symbol: '" + symbol +
"'",
29611 return error_node();
29616 static const std::string symbol_if =
"if" ;
29617 static const std::string symbol_while =
"while" ;
29618 static const std::string symbol_repeat =
"repeat" ;
29619 static const std::string symbol_for =
"for" ;
29620 static const std::string symbol_switch =
"switch" ;
29621 static const std::string symbol_null =
"null" ;
29622 static const std::string symbol_break =
"break" ;
29623 static const std::string symbol_continue =
"continue";
29624 static const std::string symbol_var =
"var" ;
29625 static const std::string symbol_swap =
"swap" ;
29626 static const std::string symbol_return =
"return" ;
29627 static const std::string symbol_not =
"not" ;
29629 const std::string symbol = current_token().
value;
29631 if (valid_vararg_operation(symbol))
29633 return parse_vararg_function();
29637 return parse_not_statement();
29639 else if (valid_base_operation(symbol))
29641 return parse_base_operation();
29645 settings_.control_struct_enabled(symbol)
29648 return parse_conditional_statement();
29652 settings_.control_struct_enabled(symbol)
29655 return parse_while_loop();
29659 settings_.control_struct_enabled(symbol)
29662 return parse_repeat_until_loop();
29666 settings_.control_struct_enabled(symbol)
29669 return parse_for_loop();
29673 settings_.control_struct_enabled(symbol)
29676 return parse_switch_statement();
29680 return parse_special_function();
29684 return parse_null_statement();
29686 #ifndef exprtk_disable_break_continue
29689 return parse_break_statement();
29693 return parse_continue_statement();
29698 return parse_define_var_statement();
29702 return parse_swap_statement();
29704 #ifndef exprtk_disable_return_statement
29707 settings_.control_struct_enabled(symbol)
29710 return parse_return_statement();
29713 else if (symtab_store_.valid() || !sem_.empty())
29715 return parse_symtab_symbol();
29722 "ERR210 - Unknown variable or function encountered. Symbol table(s) "
29723 "is either invalid or does not contain symbol: '" + symbol +
"'",
29726 return error_node();
29736 return error_node();
29741 if (token_t::e_number == current_token().type)
29743 T numeric_value = T(0);
29749 if (0 == literal_exp)
29754 "ERR211 - Failed generate node for scalar: '" + current_token().
value +
"'",
29757 return error_node();
29761 branch = literal_exp;
29768 "ERR212 - Failed to convert '" + current_token().
value +
"' to a number",
29771 return error_node();
29774 else if (token_t::e_symbol == current_token().type)
29776 branch = parse_symbol();
29778 #ifndef exprtk_disable_string_capabilities
29779 else if (token_t::e_string == current_token().type)
29781 branch = parse_const_string();
29784 else if (token_t::e_lbracket == current_token().type)
29788 if (0 == (branch = parse_expression()))
29789 return error_node();
29790 else if (token_is(token_t::e_eof))
29792 else if (!token_is(token_t::e_rbracket))
29797 "ERR213 - Expected ')' instead of: '" + current_token().
value +
"'",
29802 return error_node();
29804 else if (!post_bracket_process(token_t::e_lbracket,branch))
29808 return error_node();
29811 parse_pending_vector_index_operator(branch);
29813 else if (token_t::e_lsqrbracket == current_token().type)
29817 if (0 == (branch = parse_expression()))
29818 return error_node();
29819 else if (!token_is(token_t::e_rsqrbracket))
29824 "ERR214 - Expected ']' instead of: '" + current_token().
value +
"'",
29829 return error_node();
29831 else if (!post_bracket_process(token_t::e_lsqrbracket,branch))
29835 return error_node();
29838 else if (token_t::e_lcrlbracket == current_token().type)
29842 if (0 == (branch = parse_expression()))
29843 return error_node();
29844 else if (!token_is(token_t::e_rcrlbracket))
29849 "ERR215 - Expected '}' instead of: '" + current_token().
value +
"'",
29854 return error_node();
29856 else if (!post_bracket_process(token_t::e_lcrlbracket,branch))
29860 return error_node();
29866 branch = parse_expression(e_level11);
29872 simplify_unary_negation_branch(branch)
29882 return error_node();
29891 branch = parse_expression(e_level13);
29893 else if (token_t::e_eof == current_token().type)
29898 "ERR216 - Premature end of expression[1]",
29901 return error_node();
29908 "ERR217 - Premature end of expression[2]",
29911 return error_node();
29916 (e_level00 == precedence) &&
29917 token_is(token_t::e_ternary,prsrhlpr_t::e_hold)
29920 branch = parse_ternary_conditional_statement(branch);
29923 parse_pending_string_rangesize(branch);
29928 template <
typename Type>
29942 #ifndef exprtk_disable_enhanced_features
29947 #define register_synthezier(S) \
29948 synthesize_map_[S ::node_type::id()] = S ::process; \
30011 #undef register_synthezier
30022 unary_op_map_ = &unary_op_map;
30027 binary_op_map_ = &binary_op_map;
30032 inv_binary_op_map_ = &inv_binary_op_map;
30037 sf3_map_ = &sf3_map;
30042 sf4_map_ = &sf4_map;
30047 node_allocator_ = &na;
30052 strength_reduction_enabled_ = enabled;
30057 return strength_reduction_enabled_;
30062 typename binary_op_map_t::iterator bop_itr = binary_op_map_->find(operation);
30064 if (binary_op_map_->end() == bop_itr)
30067 bop = bop_itr->second;
30074 typename unary_op_map_t::iterator uop_itr = unary_op_map_->find(operation);
30076 if ((*unary_op_map_).end() == uop_itr)
30079 uop = uop_itr->second;
30086 return (*inv_binary_op_map_).find(bop)->second;
30094 #ifndef exprtk_disable_string_capabilities
30115 return error_node();
30145 typename sf3_map_t::const_iterator itr = sf3_map_->find(sf3id);
30147 if (sf3_map_->end() == itr)
30150 tfunc = itr->second.first;
30157 typename sf4_map_t::const_iterator itr = sf4_map_->find(sf4id);
30159 if (sf4_map_->end() == itr)
30162 qfunc = itr->second.first;
30169 typename sf3_map_t::const_iterator itr = sf3_map_->find(sf3id);
30171 if (sf3_map_->end() == itr)
30174 operation = itr->second.second;
30181 typename sf4_map_t::const_iterator itr = sf4_map_->find(sf4id);
30183 if (sf4_map_->end() == itr)
30186 operation = itr->second.second;
30193 if (0 == branch[0])
30195 return error_node();
30203 return error_node();
30207 return error_node();
30211 return synthesize_expression<unary_node_t,1>(operation,branch);
30215 return synthesize_uv_expression(operation,branch);
30219 return synthesize_uvec_expression(operation,branch);
30222 return synthesize_unary_expression(operation,branch);
30234 parser_->settings_.assignment_enabled(operation);
30237 #ifndef exprtk_disable_string_capabilities
30283 default :
return "UNKNOWN";
30311 static const std::string null_str (
"(null)" );
30312 static const std::string const_str (
"(c)" );
30313 static const std::string var_str (
"(v)" );
30314 static const std::string vov_str (
"(vov)" );
30315 static const std::string cov_str (
"(cov)" );
30316 static const std::string voc_str (
"(voc)" );
30317 static const std::string str_str (
"(s)" );
30318 static const std::string strrng_str (
"(rngs)" );
30319 static const std::string cs_str (
"(cs)" );
30320 static const std::string cstrrng_str(
"(crngs)");
30341 return cstrrng_str;
30352 return branch_to_id(branch[0]) + std::string(
"o") + branch_to_id(branch[1]);
30357 if (!operation_optimisable(operation))
30366 if (!operation_optimisable(operation))
30375 if (!operation_optimisable(operation))
30384 if (!operation_optimisable(operation))
30393 if (!operation_optimisable(operation))
30434 if (!operation_optimisable(operation))
30443 if (!operation_optimisable(operation))
30452 if (!operation_optimisable(operation))
30461 if (!operation_optimisable(operation))
30470 if (is_assignment_operation(operation))
30475 return !b1_is_genstring;
30489 || b1_is_genstring;
30506 const Type c =
static_cast<details::literal_node<Type>*
>(branch[1])->
value();
30508 return cardinal_pow_optimisable(operation, c);
30526 bool result =
false;
30528 if (b0_string != b1_string)
30530 else if (!valid_string_operation(operation) && b0_string && b1_string)
30535 parser_->set_synthesis_error(
"Invalid string operation");
30547 bool result =
false;
30549 if ((b0_string != b1_string) || (b1_string != b2_string))
30556 parser_->set_synthesis_error(
"Invalid string operation");
30567 return (b0_string && b1_string && valid_string_operation(operation));
30579 #ifndef exprtk_disable_sc_andor
30640 if ((0 == branch[0]) || (0 == branch[1]))
30644 parser_->current_state().token,
30645 "ERR218 - Invalid branches received for operator '" +
details::to_str(operation) +
"'",
30648 return error_node();
30650 else if (is_invalid_string_op(operation,branch))
30654 parser_->current_state().token,
30655 "ERR219 - Invalid branch pair for string operator '" +
details::to_str(operation) +
"'",
30658 return error_node();
30660 else if (is_invalid_assignment_op(operation,branch))
30664 parser_->current_state().token,
30665 "ERR220 - Invalid branch pair for assignment operator '" +
details::to_str(operation) +
"'",
30668 return error_node();
30670 else if (is_invalid_break_continue_op(branch))
30674 parser_->current_state().token,
30675 "ERR221 - Invalid branch pair for break/continue operator '" +
details::to_str(operation) +
"'",
30678 return error_node();
30682 return synthesize_assignment_expression(operation, branch);
30686 return synthesize_swap_expression(branch);
30688 else if (is_assignment_operation(operation))
30690 return synthesize_assignment_operation_expression(operation, branch);
30692 else if (is_vector_eqineq_logic_operation(operation, branch))
30694 return synthesize_veceqineqlogic_operation_expression(operation, branch);
30696 else if (is_vector_arithmetic_operation(operation, branch))
30698 return synthesize_vecarithmetic_operation_expression(operation, branch);
30700 else if (is_shortcircuit_expression(operation))
30702 return synthesize_shortcircuit_expression(operation, branch);
30704 else if (is_string_operation(operation, branch))
30706 return synthesize_string_expression(operation, branch);
30708 else if (is_null_present(branch))
30710 return synthesize_null_expression(operation, branch);
30712 #ifndef exprtk_disable_cardinal_pow_optimisation
30713 else if (is_constpow_operation(operation, branch))
30715 return cardinal_pow_optimisation(branch);
30721 #ifndef exprtk_disable_enhanced_features
30722 if (synthesize_expression(operation, branch, result))
30737 result = error_node();
30739 if (cocob_optimisable(operation, branch))
30743 else if (coboc_optimisable(operation, branch) && (0 == result))
30752 if (uvouv_optimisable(operation, branch))
30754 return synthesize_uvouv_expression(operation, branch);
30756 else if (vob_optimisable(operation, branch))
30760 else if (bov_optimisable(operation, branch))
30764 else if (cob_optimisable(operation, branch))
30768 else if (boc_optimisable(operation, branch))
30772 #ifndef exprtk_disable_enhanced_features
30773 else if (cov_optimisable(operation, branch))
30778 else if (binext_optimisable(operation, branch))
30783 return synthesize_expression<binary_node_t,2>(operation, branch);
30789 (0 == branch[0]) ||
30790 (0 == branch[1]) ||
30798 parser_->current_state().token,
30799 "ERR222 - Invalid branches operator '" +
details::to_str(operation) +
"'",
30802 return error_node();
30804 else if (is_invalid_string_op(operation, branch))
30808 parser_->current_state().token,
30809 "ERR223 - Invalid branches for string operator '" +
details::to_str(operation) +
"'",
30812 return error_node();
30814 else if (is_string_operation(operation, branch))
30816 return synthesize_string_expression(operation, branch);
30819 return synthesize_expression<trinary_node_t,3>(operation, branch);
30824 return synthesize_expression<quaternary_node_t,4>(operation,branch);
30830 return (*
this)(operation,branch);
30837 if ((0 != b0) && (0 != b1))
30852 if ((0 == condition) || (0 == consequent))
30858 const std::string invalid_branches =
30859 ((0 == condition ) ? std::string(
"condition ") :
"") +
30860 ((0 == consequent) ? std::string(
"consequent") :
"") ;
30864 parser_->current_state().token,
30865 "ERR224 - Invalid " + invalid_branches +
" for conditional statement",
30868 return error_node();
30888 return alternative;
30890 return node_allocator_->allocate<details::null_node<T> >();
30895 std::string node_name =
"Unknown!";
30897 if ((0 != consequent) && (0 != alternative))
30899 result = node_allocator_->allocate<
conditional_node_t>(condition, consequent, alternative);
30900 node_name =
"conditional_node_t";
30905 node_name =
"cons_conditional_node_t";
30908 if (result && result->
valid())
30916 "ERR225 - Failed to synthesize node: " + node_name,
30920 return error_node();
30923 #ifndef exprtk_disable_string_capabilities
30928 if ((0 == condition) || (0 == consequent))
30934 const std::string invalid_branches =
30935 ((0 == condition ) ? std::string(
"condition ") :
"") +
30936 ((0 == consequent) ? std::string(
"consequent") :
"") ;
30940 parser_->current_state().token,
30941 "ERR226 - Invalid " + invalid_branches +
" for string conditional statement",
30944 return error_node();
30964 return alternative;
30966 return node_allocator_->
30967 allocate_c<details::string_literal_node<Type> >(
"");
30970 else if ((0 != consequent) && (0 != alternative))
30975 if (result && result->
valid())
30983 "ERR227 - Failed to synthesize node: conditional_string_node_t",
30989 return error_node();
30996 return error_node();
31004 if ((0 == condition) || (0 == consequent))
31010 const std::string invalid_branches =
31011 ((0 == condition ) ? std::string(
"condition ") :
"") +
31012 ((0 == consequent) ? std::string(
"consequent") :
"") ;
31016 parser_->current_state().token,
31017 "ERR228 - Invalid " + invalid_branches +
" for vector conditional statement",
31020 return error_node();
31040 return alternative;
31042 return node_allocator_->allocate<details::null_node<T> >();
31046 else if ((0 != consequent) && (0 != alternative))
31048 return node_allocator_->
31049 allocate<conditional_vector_node_t>(condition, consequent, alternative);
31052 return error_node();
31058 parser_->loop_runtime_check_ &&
31059 (loop_type == (parser_->loop_runtime_check_->loop_set & loop_type))
31062 return parser_->loop_runtime_check_;
31070 return parser_->vector_access_runtime_check_;
31075 const bool break_continue_present =
false)
const
31086 parser_->current_state().token,
31087 "ERR229 - Infinite loop condition with 'break' not allowed in while-loops",
31090 result = error_node();
31093 result = node_allocator_->allocate<details::null_node<Type> >();
31109 if (!break_continue_present)
31113 (condition, branch, rtc);
31116 (condition, branch);
31118 #ifndef exprtk_disable_break_continue
31123 (condition, branch, rtc);
31126 (condition, branch);
31129 return error_node();
31135 const bool break_continue_present =
false)
const
31152 return error_node();
31163 if (!break_continue_present)
31167 (condition, branch, rtc);
31170 (condition, branch);
31172 #ifndef exprtk_disable_break_continue
31177 (condition, branch, rtc);
31180 (condition, branch);
31183 return error_node();
31191 bool break_continue_present =
false)
const
31203 parser_->current_state().token,
31204 "ERR230 - Infinite loop condition without 'break' not allowed in for-loop",
31207 result = error_node();
31210 result = node_allocator_->allocate<details::null_node<Type> >();
31230 if (!break_continue_present)
31250 #ifndef exprtk_disable_break_continue
31272 return error_node();
31276 template <
typename Allocator,
31277 template <
typename,
typename>
class Sequence>
31282 for (std::size_t i = 0; i < (arg_list.size() / 2); ++i)
31289 result = consequent;
31296 result = arg_list.back();
31299 for (std::size_t i = 0; i < arg_list.size(); ++i)
31303 if (current_expr && (current_expr != result))
31305 free_node(*node_allocator_,current_expr);
31312 template <
typename Allocator,
31313 template <
typename,
typename>
class Sequence>
31318 for (std::size_t i = 0; i < (arg_list.size() / 2); ++i)
31325 result = consequent;
31331 const T zero = T(0);
31335 for (std::size_t i = 0; i < arg_list.size(); ++i)
31339 if (current_expr && (current_expr != result))
31350 typedef std::vector<std::pair<expression_node_ptr,bool> >
arg_list_t;
31352 #define case_stmt(N) \
31353 if (is_true(arg[(2 * N)].first)) { return arg[(2 * N) + 1].first->value(); } \
31361 assert(arg.size() == ((2 * 1) + 1));
31363 return arg.back().first->value();
31373 assert(arg.size() == ((2 * 2) + 1));
31375 return arg.back().first->value();
31386 assert(arg.size() == ((2 * 3) + 1));
31388 return arg.back().first->value();
31399 assert(arg.size() == ((2 * 4) + 1));
31401 return arg.back().first->value();
31413 assert(arg.size() == ((2 * 5) + 1));
31415 return arg.back().first->value();
31427 assert(arg.size() == ((2 * 6) + 1));
31429 return arg.back().first->value();
31442 assert(arg.size() == ((2 * 7) + 1));
31444 return arg.back().first->value();
31451 template <
typename Allocator,
31452 template <
typename,
typename>
class Sequence>
31455 if (arg_list.empty())
31456 return error_node();
31459 (!default_statement_present && (arg_list.size() < 2))
31464 return error_node();
31466 else if (is_constant_foldable(arg_list))
31467 return const_optimise_switch(arg_list);
31469 switch ((arg_list.size() - 1) / 2)
31471 #define case_stmt(N) \
31473 return node_allocator_-> \
31474 allocate<details::switch_n_node \
31475 <Type,typename switch_nodes::switch_impl_##N > >(arg_list); \
31490 template <
typename Allocator,
31491 template <
typename,
typename>
class Sequence>
31498 return error_node();
31500 else if (is_constant_foldable(arg_list))
31501 return const_optimise_mswitch(arg_list);
31503 return node_allocator_->allocate<details::multi_switch_node<Type> >(arg_list);
31506 #define unary_opr_switch_statements \
31507 case_stmt(details::e_abs , details::abs_op ) \
31508 case_stmt(details::e_acos , details::acos_op ) \
31509 case_stmt(details::e_acosh , details::acosh_op) \
31510 case_stmt(details::e_asin , details::asin_op ) \
31511 case_stmt(details::e_asinh , details::asinh_op) \
31512 case_stmt(details::e_atan , details::atan_op ) \
31513 case_stmt(details::e_atanh , details::atanh_op) \
31514 case_stmt(details::e_ceil , details::ceil_op ) \
31515 case_stmt(details::e_cos , details::cos_op ) \
31516 case_stmt(details::e_cosh , details::cosh_op ) \
31517 case_stmt(details::e_exp , details::exp_op ) \
31518 case_stmt(details::e_expm1 , details::expm1_op) \
31519 case_stmt(details::e_floor , details::floor_op) \
31520 case_stmt(details::e_log , details::log_op ) \
31521 case_stmt(details::e_log10 , details::log10_op) \
31522 case_stmt(details::e_log2 , details::log2_op ) \
31523 case_stmt(details::e_log1p , details::log1p_op) \
31524 case_stmt(details::e_neg , details::neg_op ) \
31525 case_stmt(details::e_pos , details::pos_op ) \
31526 case_stmt(details::e_round , details::round_op) \
31527 case_stmt(details::e_sin , details::sin_op ) \
31528 case_stmt(details::e_sinc , details::sinc_op ) \
31529 case_stmt(details::e_sinh , details::sinh_op ) \
31530 case_stmt(details::e_sqrt , details::sqrt_op ) \
31531 case_stmt(details::e_tan , details::tan_op ) \
31532 case_stmt(details::e_tanh , details::tanh_op ) \
31533 case_stmt(details::e_cot , details::cot_op ) \
31534 case_stmt(details::e_sec , details::sec_op ) \
31535 case_stmt(details::e_csc , details::csc_op ) \
31536 case_stmt(details::e_r2d , details::r2d_op ) \
31537 case_stmt(details::e_d2r , details::d2r_op ) \
31538 case_stmt(details::e_d2g , details::d2g_op ) \
31539 case_stmt(details::e_g2d , details::g2d_op ) \
31540 case_stmt(details::e_notl , details::notl_op ) \
31541 case_stmt(details::e_sgn , details::sgn_op ) \
31542 case_stmt(details::e_erf , details::erf_op ) \
31543 case_stmt(details::e_erfc , details::erfc_op ) \
31544 case_stmt(details::e_ncdf , details::ncdf_op ) \
31545 case_stmt(details::e_frac , details::frac_op ) \
31546 case_stmt(details::e_trunc , details::trunc_op) \
31551 T& v =
static_cast<details::variable_node<T>*
>(branch[0])->ref();
31555 #define case_stmt(op0, op1) \
31556 case op0 : return node_allocator_-> \
31557 allocate<typename details::unary_variable_node<Type,op1<Type> > >(v); \
31561 default :
return error_node();
31570 #define case_stmt(op0, op1) \
31571 case op0 : return node_allocator_-> \
31572 allocate<typename details::unary_vector_node<Type,op1<Type> > > \
31573 (operation, branch[0]); \
31577 default :
return error_node();
31586 #define case_stmt(op0, op1) \
31587 case op0 : return node_allocator_-> \
31588 allocate<typename details::unary_branch_node<Type,op1<Type> > >(branch[0]); \
31592 default :
return error_node();
31603 #define case_stmt(op) \
31604 case details::e_sf##op : temp_node = node_allocator_-> \
31605 allocate<details::sf3_node<Type,details::sf##op##_op<Type> > > \
31606 (operation, branch); \
31622 default :
return error_node();
31627 const T v = temp_node->
value();
31636 typedef details::variable_node<Type>* variable_ptr;
31638 const Type& v0 =
static_cast<variable_ptr
>(branch[0])->ref();
31639 const Type& v1 =
static_cast<variable_ptr
>(branch[1])->ref();
31640 const Type& v2 =
static_cast<variable_ptr
>(branch[2])->ref();
31644 #define case_stmt(op) \
31645 case details::e_sf##op : return node_allocator_-> \
31646 allocate_rrr<details::sf3_var_node<Type,details::sf##op##_op<Type> > > \
31662 default :
return error_node();
31669 return error_node();
31670 else if (is_constant_foldable(branch))
31671 return const_optimise_sf3(operation,branch);
31673 return varnode_optimise_sf3(operation,branch);
31678 #define case_stmt(op) \
31679 case details::e_sf##op : return node_allocator_-> \
31680 allocate<details::sf3_node<Type,details::sf##op##_op<Type> > > \
31681 (operation, branch); \
31696 default :
return error_node();
31707 #define case_stmt(op) \
31708 case details::e_sf##op : temp_node = node_allocator_-> \
31709 allocate<details::sf4_node<Type,details::sf##op##_op<Type> > > \
31710 (operation, branch); \
31727 default :
return error_node();
31732 const T v = temp_node->
value();
31741 typedef details::variable_node<Type>* variable_ptr;
31743 const Type& v0 =
static_cast<variable_ptr
>(branch[0])->ref();
31744 const Type& v1 =
static_cast<variable_ptr
>(branch[1])->ref();
31745 const Type& v2 =
static_cast<variable_ptr
>(branch[2])->ref();
31746 const Type& v3 =
static_cast<variable_ptr
>(branch[3])->ref();
31750 #define case_stmt(op) \
31751 case details::e_sf##op : return node_allocator_-> \
31752 allocate_rrrr<details::sf4_var_node<Type,details::sf##op##_op<Type> > > \
31753 (v0, v1, v2, v3); \
31769 default :
return error_node();
31776 return error_node();
31777 else if (is_constant_foldable(branch))
31778 return const_optimise_sf4(operation,branch);
31780 return varnode_optimise_sf4(operation,branch);
31783 #define case_stmt(op) \
31784 case details::e_sf##op : return node_allocator_-> \
31785 allocate<details::sf4_node<Type,details::sf##op##_op<Type> > > \
31786 (operation, branch); \
31802 default :
return error_node();
31806 template <
typename Allocator,
31807 template <
typename,
typename>
class Sequence>
31814 #define case_stmt(op0, op1) \
31815 case op0 : temp_node = node_allocator_-> \
31816 allocate<details::vararg_node<Type,op1<Type> > > \
31829 default :
return error_node();
31832 const T v = temp_node->
value();
31850 template <
typename Allocator,
31851 template <
typename,
typename>
class Sequence>
31856 #define case_stmt(op0, op1) \
31857 case op0 : return node_allocator_-> \
31858 allocate<details::vararg_varnode<Type,op1<Type> > >(arg_list); \
31869 default :
return error_node();
31873 template <
typename Allocator,
31874 template <
typename,
typename>
class Sequence>
31877 if (1 == arg_list.size())
31881 #define case_stmt(op0, op1) \
31882 case op0 : return node_allocator_-> \
31883 allocate<details::vectorize_node<Type,op1<Type> > >(arg_list[0]); \
31891 default :
return error_node();
31895 return error_node();
31898 template <
typename Allocator,
31899 template <
typename,
typename>
class Sequence>
31906 return error_node();
31908 else if (is_constant_foldable(arg_list))
31909 return const_optimise_varargfunc(operation,arg_list);
31911 return vectorize_func(operation,arg_list);
31912 else if ((1 == arg_list.size()) && special_one_parameter_vararg(operation))
31913 return arg_list[0];
31915 return varnode_optimise_varargfunc(operation,arg_list);
31917 #ifndef exprtk_disable_string_capabilities
31921 allocate<details::str_vararg_node<Type,details::vararg_multi_op<Type> > >(arg_list);
31922 if (result && result->
valid())
31930 "ERR231 - Failed to synthesize node: str_vararg_node<vararg_multi_op>",
31942 #define case_stmt(op0, op1) \
31943 case op0 : result = node_allocator_-> \
31944 allocate<details::vararg_node<Type,op1<Type> > >(arg_list); \
31956 default :
return error_node();
31959 if (result && result->
valid())
31967 "ERR232 - Failed to synthesize node: vararg_node",
31973 return error_node();
31976 template <std::
size_t N>
31979 typedef typename details::function_N_node<T,ifunction_t,N> function_N_node_t;
31983 return error_node();
31994 return error_node();
31996 else if (N != f->param_count)
32001 return error_node();
32004 function_N_node_t* func_node_ptr =
reinterpret_cast<function_N_node_t*
>(result);
32006 if (!func_node_ptr->init_branches(b))
32011 return error_node();
32014 if (result && result->
valid())
32022 "ERR233 - Failed to synthesize node: function_N_node_t",
32026 return error_node();
32032 typedef typename details::function_N_node<Type,ifunction_t,0> function_N_node_t;
32033 return node_allocator_->allocate<function_N_node_t>(f);
32037 std::vector<expression_node_ptr>& arg_list)
32043 return error_node();
32046 typedef details::vararg_function_node<Type,ivararg_function_t> alloc_type;
32051 !arg_list.empty() &&
32053 is_constant_foldable(arg_list)
32056 const Type v = result->
value();
32061 parser_->state_.activate_side_effect(
"vararg_function_call()");
32063 if (result && result->
valid())
32071 "ERR234 - Failed to synthesize node: vararg_function_node<ivararg_function_t>",
32075 return error_node();
32079 std::vector<expression_node_ptr>& arg_list,
32085 return error_node();
32094 std::string node_name =
"Unknown";
32096 if (no_psi == param_seq_index)
32098 result = node_allocator_->allocate<alloc_type1>(arg_list,gf);
32099 node_name =
"generic_function_node<igeneric_function_t>";
32103 result = node_allocator_->allocate<alloc_type2>(gf, param_seq_index, arg_list);
32104 node_name =
"multimode_genfunction_node<igeneric_function_t>";
32107 alloc_type1* genfunc_node_ptr =
static_cast<alloc_type1*
>(result);
32109 assert(genfunc_node_ptr);
32112 !arg_list.empty() &&
32114 parser_->state_.type_check_enabled &&
32115 is_constant_foldable(arg_list)
32118 genfunc_node_ptr->init_branches();
32120 const Type v = result->
value();
32126 else if (genfunc_node_ptr->init_branches())
32128 if (result && result->
valid())
32130 parser_->state_.activate_side_effect(
"generic_function_call()");
32137 "ERR235 - Failed to synthesize node: " + node_name,
32141 return error_node();
32148 return error_node();
32152 #ifndef exprtk_disable_string_capabilities
32154 std::vector<expression_node_ptr>& arg_list,
32160 return error_node();
32164 typedef details::multimode_strfunction_node<Type,igeneric_function_t> alloc_type2;
32169 std::string node_name =
"Unknown";
32171 if (no_psi == param_seq_index)
32173 result = node_allocator_->allocate<alloc_type1>(gf,arg_list);
32174 node_name =
"string_function_node<igeneric_function_t>";
32178 result = node_allocator_->allocate<alloc_type2>(gf, param_seq_index, arg_list);
32179 node_name =
"multimode_strfunction_node<igeneric_function_t>";
32182 alloc_type1* strfunc_node_ptr =
static_cast<alloc_type1*
>(result);
32184 assert(strfunc_node_ptr);
32187 !arg_list.empty() &&
32189 is_constant_foldable(arg_list)
32192 strfunc_node_ptr->init_branches();
32194 const Type v = result->
value();
32200 else if (strfunc_node_ptr->init_branches())
32202 if (result && result->
valid())
32204 parser_->state_.activate_side_effect(
"string_function_call()");
32211 "ERR236 - Failed to synthesize node: " + node_name,
32215 return error_node();
32222 return error_node();
32227 #ifndef exprtk_disable_return_statement
32233 return error_node();
32239 allocate_rr<alloc_type>(arg_list,parser_->results_ctx());
32241 alloc_type* return_node_ptr =
static_cast<alloc_type*
>(result);
32243 assert(return_node_ptr);
32245 if (return_node_ptr->init_branches())
32247 if (result && result->
valid())
32249 parser_->state_.activate_side_effect(
"return_call()");
32256 "ERR237 - Failed to synthesize node: return_node",
32260 return error_node();
32267 return error_node();
32273 bool*& return_invoked)
32278 allocate_cr<alloc_type>(body,(*rc));
32280 return_invoked =
static_cast<alloc_type*
>(result)->retinvk_ptr();
32287 return error_node();
32290 inline expression_node_ptr return_envelope(expression_node_ptr,
32291 results_context_t*,
32294 return error_node();
32304 std::string node_name =
"Unknown";
32312 if (vec_index >= vector_base->
size())
32317 "ERR238 - Index of " +
details::to_str(vec_index) +
" out of range for "
32323 return error_node();
32334 node_name = (rtc) ?
32335 "rebasevector_elem_rtc_node_t" :
32336 "rebasevector_elem_node_t" ;
32338 if (result && result->
valid())
32346 "ERR239 - Failed to synthesize node: " + node_name +
" for vector: " + symbol,
32350 return error_node();
32360 node_name = (rtc) ?
32361 "vector_elem_rtc_node_t" :
32362 "vector_elem_node_t" ;
32364 if (result && result->
valid())
32372 "ERR240 - Failed to synthesize node: " + node_name +
" for vector: " + symbol,
32376 return error_node();
32379 const scope_element& se = parser_->sem_.get_element(symbol,vec_index);
32381 if (se.
index == vec_index)
32392 nse.
type = scope_element::e_vecelem;
32393 nse.
index = vec_index;
32394 nse.
depth = parser_->state_.scope_depth;
32398 if (!parser_->sem_.add_element(nse))
32400 parser_->set_synthesis_error(
"Failed to add new local vector element to SEM [1]");
32402 parser_->sem_.free_element(nse);
32404 result = error_node();
32409 exprtk_debug((
"vector_element() - INFO - Added new local vector element: %s\n", nse.
name.c_str()));
32411 parser_->state_.activate_side_effect(
"vector_element()");
32414 node_name =
"variable_node_t";
32427 node_name = (rtc) ?
32428 "rebasevector_elem_rtc_node_t" :
32429 "rebasevector_elem_node_t" ;
32437 node_name = (rtc) ?
32438 "vector_elem_rtc_node_t" :
32439 "vector_elem_node_t" ;
32443 if (result && result->
valid())
32451 "ERR241 - Failed to synthesize node: " + node_name,
32455 return error_node();
32460 template <std::
size_t N,
typename NodePtr>
32463 for (std::size_t i = 0; i < N; ++i)
32474 template <
typename NodePtr,
32475 typename Allocator,
32476 template <
typename,
typename>
class Sequence>
32479 for (std::size_t i = 0; i < b.size(); ++i)
32492 parser_->state_.activate_side_effect(
"lodge_assignment()");
32494 if (!parser_->dec_.collect_assignments())
32497 std::string symbol_name;
32501 case e_st_variable : symbol_name = parser_->symtab_store_
32502 .get_variable_name(node);
32505 #ifndef exprtk_disable_string_capabilities
32506 case e_st_string : symbol_name = parser_->symtab_store_
32507 .get_stringvar_name(node);
32511 case e_st_vector : {
32516 symbol_name = parser_->symtab_store_.get_vector_name(&vh);
32520 case e_st_vecelem : {
32525 symbol_name = parser_->symtab_store_.get_vector_name(&vh);
32534 if (!symbol_name.empty())
32536 parser_->dec_.add_assignment(symbol_name,cst);
32544 switch(node->
type())
32547 return reinterpret_cast<const void*
>(&
static_cast<variable_node_t*
>(node)->ref());
32550 return reinterpret_cast<const void*
>(&
static_cast<vector_elem_node_t*
>(node)->ref());
32574 return reinterpret_cast<const void*
>(
static_cast<vector_node_t*
>(node)->vec_holder().data());
32576 #ifndef exprtk_disable_string_capabilities
32578 return reinterpret_cast<const void*
>((
static_cast<stringvar_node_t*
>(node)->base()));
32583 default :
return reinterpret_cast<const void*
>(0);
32587 return reinterpret_cast<const void*
>(0);
32593 const void* baseptr_addr = base_ptr(node);
32595 exprtk_debug((
"assign_immutable_symbol - base ptr addr: %p\n", baseptr_addr));
32597 if (parser_->immutable_memory_map_.in_interval(baseptr_addr,interval))
32599 typename immutable_symtok_map_t::iterator itr = parser_->immutable_symtok_map_.find(interval);
32601 if (parser_->immutable_symtok_map_.end() != itr)
32603 token_t& token = itr->second;
32607 "ERR242 - Symbol '" + token.
value +
"' cannot be assigned-to as it is immutable.",
32611 parser_->set_synthesis_error(
"Unable to assign symbol is immutable.");
32621 if (assign_immutable_symbol(branch[0]))
32623 return error_node();
32627 lodge_assignment(e_st_variable,branch[0]);
32628 return synthesize_expression<assignment_node_t,2>(operation,branch);
32632 lodge_assignment(e_st_vecelem,branch[0]);
32633 return synthesize_expression<assignment_vec_elem_node_t, 2>(operation, branch);
32637 lodge_assignment(e_st_vecelem,branch[0]);
32638 return synthesize_expression<assignment_vec_elem_rtc_node_t, 2>(operation, branch);
32642 lodge_assignment(e_st_vecelem,branch[0]);
32643 return synthesize_expression<assignment_rebasevec_elem_node_t, 2>(operation, branch);
32647 lodge_assignment(e_st_vecelem,branch[0]);
32648 return synthesize_expression<assignment_rebasevec_elem_rtc_node_t, 2>(operation, branch);
32652 lodge_assignment(e_st_vecelem,branch[0]);
32653 return synthesize_expression<assignment_rebasevec_celem_node_t, 2>(operation, branch);
32655 #ifndef exprtk_disable_string_capabilities
32658 lodge_assignment(e_st_string,branch[0]);
32659 return synthesize_expression<assignment_string_node_t,2>(operation, branch);
32663 lodge_assignment(e_st_string,branch[0]);
32664 return synthesize_expression<assignment_string_range_node_t,2>(operation, branch);
32669 lodge_assignment(e_st_vector,branch[0]);
32672 return synthesize_expression<assignment_vecvec_node_t,2>(operation, branch);
32674 return synthesize_expression<assignment_vec_node_t,2>(operation, branch);
32680 parser_->current_state().token,
32681 "ERR243 - Invalid branches for assignment operator '" +
details::to_str(operation) +
"'",
32684 return error_node();
32691 if (assign_immutable_symbol(branch[0]))
32693 return error_node();
32697 std::string node_name =
"Unknown";
32701 lodge_assignment(e_st_variable,branch[0]);
32705 #define case_stmt(op0, op1) \
32706 case op0 : result = node_allocator_-> \
32707 template allocate_rrr<typename details::assignment_op_node<Type,op1<Type> > > \
32708 (operation, branch[0], branch[1]); \
32709 node_name = "assignment_op_node"; \
32718 default :
return error_node();
32723 lodge_assignment(e_st_vecelem,branch[0]);
32727 #define case_stmt(op0, op1) \
32728 case op0 : result = node_allocator_-> \
32729 template allocate_rrr<typename details::assignment_vec_elem_op_node<Type,op1<Type> > > \
32730 (operation, branch[0], branch[1]); \
32731 node_name = "assignment_vec_elem_op_node"; \
32740 default :
return error_node();
32745 lodge_assignment(e_st_vecelem,branch[0]);
32749 #define case_stmt(op0, op1) \
32750 case op0 : result = node_allocator_-> \
32751 template allocate_rrr<typename details::assignment_vec_elem_op_rtc_node<Type,op1<Type> > > \
32752 (operation, branch[0], branch[1]); \
32753 node_name = "assignment_vec_elem_op_rtc_node"; \
32762 default :
return error_node();
32767 lodge_assignment(e_st_vecelem,branch[0]);
32771 #define case_stmt(op0, op1) \
32772 case op0 : result = node_allocator_-> \
32773 template allocate_rrr<typename details::assignment_vec_celem_op_rtc_node<Type,op1<Type> > > \
32774 (operation, branch[0], branch[1]); \
32775 node_name = "assignment_vec_celem_op_rtc_node"; \
32784 default :
return error_node();
32789 lodge_assignment(e_st_vecelem,branch[0]);
32793 #define case_stmt(op0, op1) \
32794 case op0 : result = node_allocator_-> \
32795 template allocate_rrr<typename details::assignment_rebasevec_elem_op_node<Type,op1<Type> > > \
32796 (operation, branch[0], branch[1]); \
32797 node_name = "assignment_rebasevec_elem_op_node"; \
32806 default :
return error_node();
32811 lodge_assignment(e_st_vecelem,branch[0]);
32815 #define case_stmt(op0, op1) \
32816 case op0 : result = node_allocator_-> \
32817 template allocate_rrr<typename details::assignment_rebasevec_celem_op_node<Type,op1<Type> > > \
32818 (operation, branch[0], branch[1]); \
32819 node_name = "assignment_rebasevec_celem_op_node"; \
32828 default :
return error_node();
32833 lodge_assignment(e_st_vecelem,branch[0]);
32837 #define case_stmt(op0, op1) \
32838 case op0 : result = node_allocator_-> \
32839 template allocate_rrr<typename details::assignment_rebasevec_elem_op_rtc_node<Type,op1<Type> > > \
32840 (operation, branch[0], branch[1]); \
32841 node_name = "assignment_rebasevec_elem_op_rtc_node"; \
32850 default :
return error_node();
32855 lodge_assignment(e_st_vecelem,branch[0]);
32859 #define case_stmt(op0, op1) \
32860 case op0 : result = node_allocator_-> \
32861 template allocate_rrr<typename details::assignment_rebasevec_celem_op_rtc_node<Type,op1<Type> > > \
32862 (operation, branch[0], branch[1]); \
32863 node_name = "assignment_rebasevec_celem_op_rtc_node"; \
32872 default :
return error_node();
32877 lodge_assignment(e_st_vector,branch[0]);
32883 #define case_stmt(op0, op1) \
32884 case op0 : result = node_allocator_-> \
32885 template allocate_rrr<typename details::assignment_vecvec_op_node<Type,op1<Type> > > \
32886 (operation, branch[0], branch[1]); \
32887 node_name = "assignment_rebasevec_celem_op_node"; \
32896 default :
return error_node();
32903 #define case_stmt(op0, op1) \
32904 case op0 : result = node_allocator_-> \
32905 template allocate_rrr<typename details::assignment_vec_op_node<Type,op1<Type> > > \
32906 (operation, branch[0], branch[1]); \
32907 node_name = "assignment_vec_op_node"; \
32916 default :
return error_node();
32920 #ifndef exprtk_disable_string_capabilities
32926 typedef details::assignment_string_node<T,details::asn_addassignment> addass_t;
32928 lodge_assignment(e_st_string,branch[0]);
32930 result = synthesize_expression<addass_t,2>(operation,branch);
32931 node_name =
"assignment_string_node<T,details::asn_addassignment>";
32938 parser_->current_state().token,
32939 "ERR244 - Invalid branches for assignment operator '" +
details::to_str(operation) +
"'",
32942 return error_node();
32945 if (result && result->
valid())
32953 "ERR245 - Failed to synthesize node: " + node_name,
32957 return error_node();
32966 #define batch_eqineq_logic_case \
32967 case_stmt(details::e_lt , details::lt_op ) \
32968 case_stmt(details::e_lte , details::lte_op ) \
32969 case_stmt(details::e_gt , details::gt_op ) \
32970 case_stmt(details::e_gte , details::gte_op ) \
32971 case_stmt(details::e_eq , details::eq_op ) \
32972 case_stmt(details::e_ne , details::ne_op ) \
32973 case_stmt(details::e_equal , details::equal_op) \
32974 case_stmt(details::e_and , details::and_op ) \
32975 case_stmt(details::e_nand , details::nand_op ) \
32976 case_stmt(details::e_or , details::or_op ) \
32977 case_stmt(details::e_nor , details::nor_op ) \
32978 case_stmt(details::e_xor , details::xor_op ) \
32979 case_stmt(details::e_xnor , details::xnor_op ) \
32982 std::string node_name =
"Unknown";
32984 if (is_b0_ivec && is_b1_ivec)
32988 #define case_stmt(op0, op1) \
32989 case op0 : result = node_allocator_-> \
32990 template allocate_rrr<typename details::vec_binop_vecvec_node<Type,op1<Type> > > \
32991 (operation, branch[0], branch[1]); \
32992 node_name = "vec_binop_vecvec_node"; \
32997 default :
return error_node();
33000 else if (is_b0_ivec && !is_b1_ivec)
33004 #define case_stmt(op0, op1) \
33005 case op0 : result = node_allocator_-> \
33006 template allocate_rrr<typename details::vec_binop_vecval_node<Type,op1<Type> > > \
33007 (operation, branch[0], branch[1]); \
33008 node_name = "vec_binop_vecval_node"; \
33013 default :
return error_node();
33016 else if (!is_b0_ivec && is_b1_ivec)
33020 #define case_stmt(op0, op1) \
33021 case op0 : result = node_allocator_-> \
33022 template allocate_rrr<typename details::vec_binop_valvec_node<Type,op1<Type> > > \
33023 (operation, branch[0], branch[1]); \
33024 node_name = "vec_binop_valvec_node"; \
33029 default :
return error_node();
33033 return error_node();
33035 if (result && result->
valid())
33043 "ERR246 - Failed to synthesize node: " + node_name,
33047 return error_node();
33049 #undef batch_eqineq_logic_case
33058 #define vector_ops \
33059 case_stmt(details::e_add , details::add_op) \
33060 case_stmt(details::e_sub , details::sub_op) \
33061 case_stmt(details::e_mul , details::mul_op) \
33062 case_stmt(details::e_div , details::div_op) \
33063 case_stmt(details::e_mod , details::mod_op) \
33066 std::string node_name =
"Unknown";
33068 if (is_b0_ivec && is_b1_ivec)
33072 #define case_stmt(op0, op1) \
33073 case op0 : result = node_allocator_-> \
33074 template allocate_rrr<typename details::vec_binop_vecvec_node<Type,op1<Type> > > \
33075 (operation, branch[0], branch[1]); \
33076 node_name = "vec_binop_vecvec_node"; \
33082 default :
return error_node();
33085 else if (is_b0_ivec && !is_b1_ivec)
33089 #define case_stmt(op0, op1) \
33090 case op0 : result = node_allocator_-> \
33091 template allocate_rrr<typename details::vec_binop_vecval_node<Type,op1<Type> > > \
33092 (operation, branch[0], branch[1]); \
33093 node_name = "vec_binop_vecval_node(b0ivec,!b1ivec)"; \
33099 default :
return error_node();
33102 else if (!is_b0_ivec && is_b1_ivec)
33106 #define case_stmt(op0, op1) \
33107 case op0 : result = node_allocator_-> \
33108 template allocate_rrr<typename details::vec_binop_valvec_node<Type,op1<Type> > > \
33109 (operation, branch[0], branch[1]); \
33110 node_name = "vec_binop_vecval_node(!b0ivec,b1ivec)"; \
33115 default :
return error_node();
33119 return error_node();
33121 if (result && result->
valid())
33129 "ERR247 - Failed to synthesize node: " + node_name,
33133 return error_node();
33146 #ifndef exprtk_disable_string_capabilities
33152 std::string node_name =
"Unknown";
33154 if (v0_is_ivar && v1_is_ivar)
33156 typedef details::variable_node<T>* variable_node_ptr;
33158 variable_node_ptr v0 = variable_node_ptr(0);
33159 variable_node_ptr v1 = variable_node_ptr(0);
33162 (0 != (v0 =
dynamic_cast<variable_node_ptr
>(branch[0]))) &&
33163 (0 != (v1 =
dynamic_cast<variable_node_ptr
>(branch[1])))
33166 result = node_allocator_->allocate<details::swap_node<T> >(v0,v1);
33167 node_name =
"swap_node";
33171 result = node_allocator_->allocate<details::swap_generic_node<T> >(branch[0],branch[1]);
33172 node_name =
"swap_generic_node";
33175 else if (v0_is_ivec && v1_is_ivec)
33177 result = node_allocator_->allocate<details::swap_vecvec_node<T> >(branch[0],branch[1]);
33178 node_name =
"swap_vecvec_node";
33180 #ifndef exprtk_disable_string_capabilities
33181 else if (v0_is_str && v1_is_str)
33185 result = node_allocator_->allocate<details::swap_string_node<T> >
33186 (branch[0], branch[1]);
33187 node_name =
"swap_string_node";
33191 result = node_allocator_->allocate<details::swap_genstrings_node<T> >
33192 (branch[0], branch[1]);
33193 node_name =
"swap_genstrings_node";
33199 parser_->set_synthesis_error(
"Only variables, strings, vectors or vector elements can be swapped");
33200 return error_node();
33203 if (result && result->
valid())
33205 parser_->state_.activate_side_effect(
"synthesize_swap_expression()");
33212 "ERR248 - Failed to synthesize node: " + node_name,
33216 return error_node();
33219 #ifndef exprtk_disable_sc_andor
33228 std::equal_to<T>()(T(0),branch[0]->
value())
33233 std::not_equal_to<T>()(T(0),branch[0]->value())
33242 std::equal_to<T>()(T(0),branch[1]->value())
33247 std::not_equal_to<T>()(T(0),branch[1]->value())
33261 return synthesize_expression<scand_node_t,2>(operation, branch);
33265 return synthesize_expression<scor_node_t,2>(operation, branch);
33268 return error_node();
33273 return error_node();
33277 #define basic_opr_switch_statements \
33278 case_stmt(details::e_add , details::add_op) \
33279 case_stmt(details::e_sub , details::sub_op) \
33280 case_stmt(details::e_mul , details::mul_op) \
33281 case_stmt(details::e_div , details::div_op) \
33282 case_stmt(details::e_mod , details::mod_op) \
33283 case_stmt(details::e_pow , details::pow_op) \
33285 #define extended_opr_switch_statements \
33286 case_stmt(details::e_lt , details::lt_op ) \
33287 case_stmt(details::e_lte , details::lte_op ) \
33288 case_stmt(details::e_gt , details::gt_op ) \
33289 case_stmt(details::e_gte , details::gte_op ) \
33290 case_stmt(details::e_eq , details::eq_op ) \
33291 case_stmt(details::e_ne , details::ne_op ) \
33292 case_stmt(details::e_and , details::and_op ) \
33293 case_stmt(details::e_nand , details::nand_op) \
33294 case_stmt(details::e_or , details::or_op ) \
33295 case_stmt(details::e_nor , details::nor_op ) \
33296 case_stmt(details::e_xor , details::xor_op ) \
33297 case_stmt(details::e_xnor , details::xnor_op) \
33299 #ifndef exprtk_disable_cardinal_pow_optimisation
33300 template <
typename TType,
template <
typename,
typename>
class IPowNode>
33305 #define case_stmt(cp) \
33306 case cp : return node_allocator_-> \
33307 allocate<IPowNode<T,details::numeric::fast_exp<T,cp> > >(v); \
33325 default :
return error_node();
33331 const bool not_recipricol = (c >= T(0));
33336 else if (std::equal_to<T>()(T(2),c))
33338 return node_allocator_->
33339 template allocate_rr<typename details::vov_node<Type,details::mul_op<Type> > >(v,v);
33343 if (not_recipricol)
33344 return cardinal_pow_optimisation_impl<T,details::ipow_node>(v,p);
33346 return cardinal_pow_optimisation_impl<T,details::ipowinv_node>(v,p);
33357 const Type c =
static_cast<details::literal_node<Type>*
>(branch[1])->
value();
33358 const bool not_recipricol = (c >= T(0));
33361 node_allocator_->free(branch[1]);
33369 else if (not_recipricol)
33370 return cardinal_pow_optimisation_impl<expression_node_ptr,details::bipow_node>(branch[0],p);
33372 return cardinal_pow_optimisation_impl<expression_node_ptr,details::bipowinv_node>(branch[0],p);
33377 return error_node();
33385 inline expression_node_ptr cardinal_pow_optimisation(expression_node_ptr(&)[2])
33387 return error_node();
33400 if (left_neg && right_neg)
33416 return error_node();
33426 (branch[0],branch[1]));
33430 template allocate<typename details::binary_ext_node<Type,details::sub_op<Type> > >
33431 (branch[1],branch[0]);
33436 else if (left_neg && !right_neg)
33449 return error_node();
33456 template allocate<typename details::binary_ext_node<Type,details::sub_op<Type> > >
33457 (branch[1], branch[0]);
33463 (branch[0], branch[1]));
33469 (branch[0], branch[1]));
33475 (branch[0], branch[1]));
33477 default :
return error_node();
33481 else if (!left_neg && right_neg)
33494 return error_node();
33501 template allocate<typename details::binary_ext_node<Type,details::sub_op<Type> > >
33502 (branch[0], branch[1]);
33506 template allocate<typename details::binary_ext_node<Type,details::add_op<Type> > >
33507 (branch[0], branch[1]);
33513 (branch[0], branch[1]));
33519 (branch[0], branch[1]));
33521 default :
return error_node();
33528 #define case_stmt(op0, op1) \
33529 case op0 : return expr_gen.node_allocator_-> \
33530 template allocate<typename details::binary_ext_node<Type,op1<Type> > > \
33531 (branch[0], branch[1]); \
33536 default :
return error_node();
33547 const Type& v =
static_cast<details::variable_node<Type>*
>(branch[0])->ref();
33549 #ifndef exprtk_disable_enhanced_features
33554 const bool synthesis_result =
33555 synthesize_sf4ext_expression::template compile_right<vtype>
33556 (expr_gen, v, operation, branch[1], result);
33558 if (synthesis_result)
33579 const Type& v1 =
static_cast<uvbn_ptr_t
>(branch[1])->v();
33587 template allocate_rr<
typename details::
33592 template allocate_rr<
typename details::
33603 #define case_stmt(op0, op1) \
33604 case op0 : return expr_gen.node_allocator_-> \
33605 template allocate_rc<typename details::vob_node<Type,op1<Type> > > \
33611 default :
return error_node();
33622 const Type& v =
static_cast<details::variable_node<Type>*
>(branch[1])->ref();
33624 #ifndef exprtk_disable_enhanced_features
33629 const bool synthesis_result =
33630 synthesize_sf4ext_expression::template compile_left<vtype>
33631 (expr_gen, v, operation, branch[0], result);
33633 if (synthesis_result)
33657 const Type& v0 =
static_cast<uvbn_ptr_t
>(branch[0])->v();
33664 template allocate_rr<
typename details::
33665 vov_node<Type,details::sub_op<Type> > >(v,v0);
33669 template allocate_rr<
typename details::
33674 template allocate_rr<
typename details::
33679 template allocate_rr<
typename details::
33689 #define case_stmt(op0, op1) \
33690 case op0 : return expr_gen.node_allocator_-> \
33691 template allocate_cr<typename details::bov_node<Type,op1<Type> > > \
33697 default :
return error_node();
33708 const Type c =
static_cast<details::literal_node<Type>*
>(branch[0])->
value();
33712 if (std::equal_to<T>()(T(0),c) && (
details::e_mul == operation))
33716 return expr_gen(T(0));
33718 else if (std::equal_to<T>()(T(0),c) && (
details::e_div == operation))
33722 return expr_gen(T(0));
33724 else if (std::equal_to<T>()(T(0),c) && (
details::e_add == operation))
33726 else if (std::equal_to<T>()(T(1),c) && (
details::e_mul == operation))
33747 default :
return error_node();
33768 default :
return error_node();
33789 template allocate_tt<typename details::cob_node<Type,details::mul_op<Type> > >
33794 template allocate_tt<typename details::cob_node<Type,details::div_op<Type> > >
33798 default :
return error_node();
33803 return new_cobnode;
33807 #ifndef exprtk_disable_enhanced_features
33812 const bool synthesis_result =
33813 synthesize_sf4ext_expression::template compile_right<ctype>
33814 (expr_gen, c, operation, branch[1], result);
33816 if (synthesis_result)
33827 #define case_stmt(op0, op1) \
33828 case op0 : return expr_gen.node_allocator_-> \
33829 template allocate_tt<typename details::cob_node<Type,op1<Type> > > \
33835 default :
return error_node();
33846 const Type c =
static_cast<details::literal_node<Type>*
>(branch[1])->
value();
33850 if (std::equal_to<T>()(T(0),c) && (
details::e_mul == operation))
33854 return expr_gen(T(0));
33856 else if (std::equal_to<T>()(T(0),c) && (
details::e_div == operation))
33860 return expr_gen(std::numeric_limits<T>::quiet_NaN());
33862 else if (std::equal_to<T>()(T(0),c) && (
details::e_add == operation))
33864 else if (std::equal_to<T>()(T(1),c) && (
details::e_mul == operation))
33885 default :
return error_node();
33905 default :
return error_node();
33919 bocnode->
set_c(bocnode->
c() * c);
33926 #ifndef exprtk_disable_enhanced_features
33931 const bool synthesis_result =
33932 synthesize_sf4ext_expression::template compile_left<ctype>
33933 (expr_gen, c, operation, branch[0], result);
33935 if (synthesis_result)
33946 #define case_stmt(op0, op1) \
33947 case op0 : return expr_gen.node_allocator_-> \
33948 template allocate_cr<typename details::boc_node<Type,op1<Type> > > \
33954 default :
return error_node();
33972 const Type c =
static_cast<details::literal_node<Type>*
>(branch[1])->
value();
33974 if (std::equal_to<T>()(T(0),c) && (
details::e_mul == operation))
33979 return expr_gen(T(0));
33981 else if (std::equal_to<T>()(T(0),c) && (
details::e_div == operation))
33986 return expr_gen(T(std::numeric_limits<T>::quiet_NaN()));
33988 else if (std::equal_to<T>()(T(0),c) && (
details::e_add == operation))
33994 else if (std::equal_to<T>()(T(1),c) && (
details::e_mul == operation))
34000 else if (std::equal_to<T>()(T(1),c) && (
details::e_div == operation))
34016 default :
return error_node();
34027 default :
return error_node();
34036 cobnode->
set_c(cobnode->
c() * c);
34042 template allocate_tt<typename details::cob_node<Type,details::div_op<Type> > >
34060 const Type c =
static_cast<details::literal_node<Type>*
>(branch[0])->
value();
34062 if (std::equal_to<T>()(T(0),c) && (
details::e_mul == operation))
34067 return expr_gen(T(0));
34069 else if (std::equal_to<T>()(T(0),c) && (
details::e_div == operation))
34074 return expr_gen(T(0));
34076 else if (std::equal_to<T>()(T(0),c) && (
details::e_add == operation))
34082 else if (std::equal_to<T>()(T(1),c) && (
details::e_mul == operation))
34093 cobnode->
set_c(c + cobnode->
c());
34099 template allocate_tt<typename details::cob_node<Type,details::sub_op<Type> > >
34109 cobnode->
set_c(c + cobnode->
c());
34115 template allocate_tt<typename details::cob_node<Type,details::add_op<Type> > >
34125 cobnode->
set_c(c * cobnode->
c());
34131 template allocate_tt<typename details::cob_node<Type,details::div_op<Type> > >
34141 cobnode->
set_c(c * cobnode->
c());
34147 template allocate_tt<typename details::cob_node<Type,details::mul_op<Type> > >
34177 const Type c =
static_cast<details::literal_node<Type>*
>(branch[1])->
value();
34185 default :
return error_node();
34196 default :
return error_node();
34206 template allocate_tt<typename details::boc_node<Type,details::add_op<Type> > >
34213 bocnode->
set_c(bocnode->
c() + c);
34223 default :
return error_node();
34240 const Type c =
static_cast<details::literal_node<Type>*
>(branch[0])->
value();
34246 bocnode->
set_c(c + bocnode->
c());
34252 template allocate_tt<typename details::cob_node<Type,details::sub_op<Type> > >
34263 template allocate_tt<typename details::boc_node<Type,details::add_op<Type> > >
34271 template allocate_tt<typename details::cob_node<Type,details::sub_op<Type> > >
34281 bocnode->
set_c(c * bocnode->
c());
34287 template allocate_tt<typename details::cob_node<Type,details::div_op<Type> > >
34297 bocnode->
set_c(bocnode->
c() / c);
34303 template allocate_tt<typename details::cob_node<Type,details::div_op<Type> > >
34320 #ifndef exprtk_disable_enhanced_features
34325 result = error_node();
34327 if (!operation_optimisable(operation))
34330 const std::string node_id = branch_to_id(branch);
34332 const typename synthesize_map_t::iterator itr = synthesize_map_.find(node_id);
34334 if (synthesize_map_.end() != itr)
34336 result = itr->second((*
this), operation, branch);
34350 const Type& v1 =
static_cast<details::variable_node<Type>*
>(branch[0])->ref();
34351 const Type& v2 =
static_cast<details::variable_node<Type>*
>(branch[1])->ref();
34355 #define case_stmt(op0, op1) \
34356 case op0 : return expr_gen.node_allocator_-> \
34357 template allocate_rr<typename details::vov_node<Type,op1<Type> > > \
34363 default :
return error_node();
34374 const Type c =
static_cast<details::literal_node<Type>*
> (branch[0])->
value();
34375 const Type& v =
static_cast<details::variable_node<Type>*
>(branch[1])->ref ();
34379 if (std::equal_to<T>()(T(0),c) && (
details::e_mul == operation))
34380 return expr_gen(T(0));
34381 else if (std::equal_to<T>()(T(0),c) && (
details::e_div == operation))
34382 return expr_gen(T(0));
34383 else if (std::equal_to<T>()(T(0),c) && (
details::e_add == operation))
34384 return static_cast<details::variable_node<Type>*
>(branch[1]);
34385 else if (std::equal_to<T>()(T(1),c) && (
details::e_mul == operation))
34386 return static_cast<details::variable_node<Type>*
>(branch[1]);
34390 #define case_stmt(op0, op1) \
34391 case op0 : return expr_gen.node_allocator_-> \
34392 template allocate_cr<typename details::cov_node<Type,op1<Type> > > \
34398 default :
return error_node();
34409 const Type& v =
static_cast<details::variable_node<Type>*
>(branch[0])->ref ();
34410 const Type c =
static_cast<details::literal_node<Type>*
> (branch[1])->
value();
34416 if (std::equal_to<T>()(T(1),c))
34421 else if (std::equal_to<T>()(T(0),c) && (
details::e_mul == operation))
34422 return expr_gen(T(0));
34423 else if (std::equal_to<T>()(T(0),c) && (
details::e_div == operation))
34424 return expr_gen(std::numeric_limits<T>::quiet_NaN());
34425 else if (std::equal_to<T>()(T(0),c) && (
details::e_add == operation))
34426 return static_cast<details::variable_node<Type>*
>(branch[0]);
34427 else if (std::equal_to<T>()(T(1),c) && (
details::e_mul == operation))
34428 return static_cast<details::variable_node<Type>*
>(branch[0]);
34429 else if (std::equal_to<T>()(T(1),c) && (
details::e_div == operation))
34430 return static_cast<details::variable_node<Type>*
>(branch[0]);
34434 #define case_stmt(op0, op1) \
34435 case op0 : return expr_gen.node_allocator_-> \
34436 template allocate_rc<typename details::voc_node<Type,op1<Type> > > \
34442 default :
return error_node();
34449 template <
typename T0,
typename T1,
typename T2>
34456 #define case_stmt(op) \
34457 case details::e_sf##op : return details::T0oT1oT2_sf3ext<T,T0,T1,T2,details::sf##op##_op<Type> >:: \
34458 allocate(*(expr_gen.node_allocator_), t0, t1, t2); \
34469 default :
return error_node();
34473 template <
typename T0,
typename T1,
typename T2>
34483 result = synthesize_sf3ext_expression::template process<T0, T1, T2>
34484 (expr_gen, sf3opr, t0, t1, t2);
34492 template <
typename T0,
typename T1,
typename T2,
typename T3>
34499 #define case_stmt0(op) \
34500 case details::e_sf##op : return details::T0oT1oT2oT3_sf4ext<Type,T0,T1,T2,T3,details::sf##op##_op<Type> >:: \
34501 allocate(*(expr_gen.node_allocator_), t0, t1, t2, t3); \
34503 #define case_stmt1(op) \
34504 case details::e_sf4ext##op : return details::T0oT1oT2oT3_sf4ext<Type,T0,T1,T2,T3,details::sfext##op##_op<Type> >:: \
34505 allocate(*(expr_gen.node_allocator_), t0, t1, t2, t3); \
34536 default :
return error_node();
34540 template <
typename T0,
typename T1,
typename T2,
typename T3>
34550 result = synthesize_sf4ext_expression::template process<T0, T1, T2, T3>
34551 (expr_gen, sf4opr, t0, t1, t2, t3);
34557 template <
typename ExternalType>
34569 sf3ext_base_ptr n =
static_cast<sf3ext_base_ptr
>(sf3node);
34570 const std::string
id =
"t" + expr_gen.
to_str(operation) +
"(" + n->type_id() +
")";
34576 (expr_gen, id,
t, sf3node, result);
34580 (expr_gen, id,
t, sf3node, result);
34584 (expr_gen, id,
t, sf3node, result);
34588 (expr_gen, id,
t, sf3node, result);
34592 (expr_gen, id,
t, sf3node, result);
34594 default :
return false;
34599 template <
typename ExternalType>
34611 sf3ext_base_ptr n =
static_cast<sf3ext_base_ptr
>(sf3node);
34613 const std::string
id =
"(" + n->
type_id() +
")" + expr_gen.
to_str(operation) +
"t";
34619 (expr_gen, id,
t, sf3node, result);
34623 (expr_gen, id,
t, sf3node, result);
34627 (expr_gen, id,
t, sf3node, result);
34631 (expr_gen, id,
t, sf3node, result);
34635 (expr_gen, id,
t, sf3node, result);
34637 default :
return false;
34641 template <
typename SF3TypeNode,
typename ExternalType,
typename T0,
typename T1,
typename T2>
34643 const std::string&
id,
34648 SF3TypeNode* n =
dynamic_cast<SF3TypeNode*
>(node);
34656 return synthesize_sf4ext_expression::template compile<ExternalType, T0, T1, T2>
34657 (expr_gen,
id,
t, t0, t1, t2, result);
34663 template <
typename SF3TypeNode,
typename ExternalType,
typename T0,
typename T1,
typename T2>
34665 const std::string&
id,
34670 SF3TypeNode* n =
dynamic_cast<SF3TypeNode*
>(node);
34678 return synthesize_sf4ext_expression::template compile<T0, T1, T2, ExternalType>
34679 (expr_gen,
id, t0, t1, t2,
t, result);
34697 const Type& v0 = vov->
v0();
34698 const Type& v1 = vov->
v1();
34699 const Type& v2 =
static_cast<details::variable_node<Type>*
>(branch[1])->ref();
34712 const bool synthesis_result =
34713 synthesize_sf3ext_expression::
34714 template compile<vtype, vtype, vtype>(expr_gen,
"t/(t*t)", v0, v1, v2, result);
34716 exprtk_debug((
"(v0 / v1) / v2 --> (vovov) v0 / (v1 * v2)\n"));
34718 return (synthesis_result) ? result : error_node();
34722 const bool synthesis_result =
34723 synthesize_sf3ext_expression::template compile<vtype, vtype, vtype>
34724 (expr_gen,
id(expr_gen, o0, o1), v0, v1, v2, result);
34726 if (synthesis_result)
34733 return error_node();
34735 return error_node();
34737 return node_type::allocate(*(expr_gen.
node_allocator_), v0, v1, v2, f0, f1);
34745 <<
"(t" << expr_gen.
to_str(o0)
34746 <<
"t)" << expr_gen.
to_str(o1)
34762 const Type& v0 =
static_cast<details::variable_node<Type>*
>(branch[0])->ref();
34763 const Type& v1 = vov->
v0();
34764 const Type& v2 = vov->
v1();
34777 const bool synthesis_result =
34778 synthesize_sf3ext_expression::
34779 template compile<vtype, vtype, vtype>(expr_gen,
"(t*t)/t", v0, v2, v1, result);
34781 exprtk_debug((
"v0 / (v1 / v2) --> (vovov) (v0 * v2) / v1\n"));
34783 return (synthesis_result) ? result : error_node();
34787 const bool synthesis_result =
34788 synthesize_sf3ext_expression::template compile<vtype, vtype, vtype>
34789 (expr_gen,
id(expr_gen, o0, o1), v0, v1, v2, result);
34791 if (synthesis_result)
34798 return error_node();
34800 return error_node();
34802 return node_type::allocate(*(expr_gen.
node_allocator_), v0, v1, v2, f0, f1);
34810 <<
"t" << expr_gen.
to_str(o0)
34811 <<
"(t" << expr_gen.
to_str(o1)
34827 const Type& v0 = vov->
v0();
34828 const Type& v1 = vov->
v1();
34829 const Type c =
static_cast<details::literal_node<Type>*
>(branch[1])->
value();
34843 const bool synthesis_result =
34844 synthesize_sf3ext_expression::
34845 template compile<vtype, vtype, ctype>(expr_gen,
"t/(t*t)", v0, v1, c, result);
34847 exprtk_debug((
"(v0 / v1) / c --> (vovoc) v0 / (v1 * c)\n"));
34849 return (synthesis_result) ? result : error_node();
34853 const bool synthesis_result =
34854 synthesize_sf3ext_expression::template compile<vtype, vtype, ctype>
34855 (expr_gen,
id(expr_gen, o0, o1), v0, v1, c, result);
34857 if (synthesis_result)
34864 return error_node();
34866 return error_node();
34868 return node_type::allocate(*(expr_gen.
node_allocator_), v0, v1, c, f0, f1);
34876 <<
"(t" << expr_gen.
to_str(o0)
34877 <<
"t)" << expr_gen.
to_str(o1)
34893 const Type& v0 =
static_cast<details::variable_node<Type>*
>(branch[0])->ref();
34894 const Type& v1 = voc->
v();
34895 const Type c = voc->
c();
34908 const bool synthesis_result =
34909 synthesize_sf3ext_expression::
34910 template compile<vtype, ctype, vtype>(expr_gen,
"(t*t)/t", v0, c, v1, result);
34912 exprtk_debug((
"v0 / (v1 / c) --> (vocov) (v0 * c) / v1\n"));
34914 return (synthesis_result) ? result : error_node();
34918 const bool synthesis_result =
34919 synthesize_sf3ext_expression::template compile<vtype, vtype, ctype>
34920 (expr_gen,
id(expr_gen, o0, o1), v0, v1, c, result);
34922 if (synthesis_result)
34929 return error_node();
34931 return error_node();
34933 return node_type::allocate(*(expr_gen.
node_allocator_), v0, v1, c, f0, f1);
34941 <<
"t" << expr_gen.
to_str(o0)
34942 <<
"(t" << expr_gen.
to_str(o1)
34958 const Type& v0 = voc->
v();
34959 const Type c = voc->
c();
34960 const Type& v1 =
static_cast<details::variable_node<Type>*
>(branch[1])->ref();
34973 const bool synthesis_result =
34974 synthesize_sf3ext_expression::
34975 template compile<vtype, vtype, ctype>(expr_gen,
"t/(t*t)", v0, v1, c, result);
34977 exprtk_debug((
"(v0 / c) / v1 --> (vovoc) v0 / (v1 * c)\n"));
34979 return (synthesis_result) ? result : error_node();
34983 const bool synthesis_result =
34984 synthesize_sf3ext_expression::template compile<vtype, ctype, vtype>
34985 (expr_gen,
id(expr_gen, o0, o1), v0, c, v1, result);
34987 if (synthesis_result)
34994 return error_node();
34996 return error_node();
34998 return node_type::allocate(*(expr_gen.
node_allocator_), v0, c, v1, f0, f1);
35006 <<
"(t" << expr_gen.
to_str(o0)
35007 <<
"t)" << expr_gen.
to_str(o1)
35023 const Type& v0 =
static_cast<details::variable_node<Type>*
>(branch[0])->ref();
35024 const Type c = cov->
c();
35025 const Type& v1 = cov->
v();
35038 const bool synthesis_result =
35039 synthesize_sf3ext_expression::
35040 template compile<vtype, vtype, ctype>(expr_gen,
"(t*t)/t", v0, v1, c, result);
35042 exprtk_debug((
"v0 / (c / v1) --> (vovoc) (v0 * v1) / c\n"));
35044 return (synthesis_result) ? result : error_node();
35048 const bool synthesis_result =
35049 synthesize_sf3ext_expression::template compile<vtype, ctype, vtype>
35050 (expr_gen,
id(expr_gen, o0, o1), v0, c, v1, result);
35052 if (synthesis_result)
35059 return error_node();
35061 return error_node();
35063 return node_type::allocate(*(expr_gen.
node_allocator_), v0, c, v1, f0, f1);
35071 <<
"t" << expr_gen.
to_str(o0)
35072 <<
"(t" << expr_gen.
to_str(o1)
35088 const Type c = cov->
c();
35089 const Type& v0 = cov->
v();
35090 const Type& v1 =
static_cast<details::variable_node<Type>*
>(branch[1])->ref();
35103 const bool synthesis_result =
35104 synthesize_sf3ext_expression::
35105 template compile<ctype, vtype, vtype>(expr_gen,
"t/(t*t)", c, v0, v1, result);
35107 exprtk_debug((
"(c / v0) / v1 --> (covov) c / (v0 * v1)\n"));
35109 return (synthesis_result) ? result : error_node();
35113 const bool synthesis_result =
35114 synthesize_sf3ext_expression::template compile<ctype, vtype, vtype>
35115 (expr_gen,
id(expr_gen, o0, o1), c, v0, v1, result);
35117 if (synthesis_result)
35124 return error_node();
35126 return error_node();
35128 return node_type::allocate(*(expr_gen.
node_allocator_), c, v0, v1, f0, f1);
35136 <<
"(t" << expr_gen.
to_str(o0)
35137 <<
"t)" << expr_gen.
to_str(o1)
35153 const Type c =
static_cast<details::literal_node<Type>*
>(branch[0])->
value();
35154 const Type& v0 = vov->
v0();
35155 const Type& v1 = vov->
v1();
35169 const bool synthesis_result =
35170 synthesize_sf3ext_expression::
35171 template compile<ctype, vtype, vtype>(expr_gen,
"(t*t)/t", c, v1, v0, result);
35173 exprtk_debug((
"c / (v0 / v1) --> (covov) (c * v1) / v0\n"));
35175 return (synthesis_result) ? result : error_node();
35179 const bool synthesis_result =
35180 synthesize_sf3ext_expression::template compile<ctype, vtype, vtype>
35181 (expr_gen,
id(expr_gen, o0, o1), c, v0, v1, result);
35183 if (synthesis_result)
35190 return error_node();
35192 return error_node();
35194 return node_type::allocate(*(expr_gen.
node_allocator_), c, v0, v1, f0, f1);
35202 <<
"t" << expr_gen.
to_str(o0)
35203 <<
"(t" << expr_gen.
to_str(o1)
35219 const Type c0 = cov->
c();
35220 const Type& v = cov->
v();
35221 const Type c1 =
static_cast<details::literal_node<Type>*
>(branch[1])->
value();
35235 exprtk_debug((
"(c0 + v) + c1 --> (cov) (c0 + c1) + v\n"));
35238 template allocate_cr<typename details::cov_node<Type,details::add_op<Type> > >(c0 + c1, v);
35243 exprtk_debug((
"(c0 + v) - c1 --> (cov) (c0 - c1) + v\n"));
35246 template allocate_cr<typename details::cov_node<Type,details::add_op<Type> > >(c0 - c1, v);
35251 exprtk_debug((
"(c0 - v) + c1 --> (cov) (c0 + c1) - v\n"));
35254 template allocate_cr<typename details::cov_node<Type,details::sub_op<Type> > >(c0 + c1, v);
35259 exprtk_debug((
"(c0 - v) - c1 --> (cov) (c0 - c1) - v\n"));
35262 template allocate_cr<typename details::cov_node<Type,details::sub_op<Type> > >(c0 - c1, v);
35267 exprtk_debug((
"(c0 * v) * c1 --> (cov) (c0 * c1) * v\n"));
35270 template allocate_cr<typename details::cov_node<Type,details::mul_op<Type> > >(c0 * c1, v);
35275 exprtk_debug((
"(c0 * v) / c1 --> (cov) (c0 / c1) * v\n"));
35278 template allocate_cr<typename details::cov_node<Type,details::mul_op<Type> > >(c0 / c1, v);
35283 exprtk_debug((
"(c0 / v) * c1 --> (cov) (c0 * c1) / v\n"));
35286 template allocate_cr<typename details::cov_node<Type,details::div_op<Type> > >(c0 * c1, v);
35291 exprtk_debug((
"(c0 / v) / c1 --> (cov) (c0 / c1) / v\n"));
35294 template allocate_cr<typename details::cov_node<Type,details::div_op<Type> > >(c0 / c1, v);
35298 const bool synthesis_result =
35299 synthesize_sf3ext_expression::template compile<ctype, vtype, ctype>
35300 (expr_gen,
id(expr_gen, o0, o1), c0, v, c1, result);
35302 if (synthesis_result)
35309 return error_node();
35311 return error_node();
35313 return node_type::allocate(*(expr_gen.
node_allocator_), c0, v, c1, f0, f1);
35321 <<
"(t" << expr_gen.
to_str(o0)
35322 <<
"t)" << expr_gen.
to_str(o1)
35338 const Type c0 =
static_cast<details::literal_node<Type>*
>(branch[0])->
value();
35339 const Type& v = voc->
v();
35340 const Type c1 = voc->
c();
35354 exprtk_debug((
"(c0) + (v + c1) --> (cov) (c0 + c1) + v\n"));
35357 template allocate_cr<typename details::cov_node<Type,details::add_op<Type> > >(c0 + c1, v);
35362 exprtk_debug((
"(c0) + (v - c1) --> (cov) (c0 - c1) + v\n"));
35365 template allocate_cr<typename details::cov_node<Type,details::add_op<Type> > >(c0 - c1, v);
35370 exprtk_debug((
"(c0) - (v + c1) --> (cov) (c0 - c1) - v\n"));
35373 template allocate_cr<typename details::cov_node<Type,details::sub_op<Type> > >(c0 - c1, v);
35378 exprtk_debug((
"(c0) - (v - c1) --> (cov) (c0 + c1) - v\n"));
35381 template allocate_cr<typename details::cov_node<Type,details::sub_op<Type> > >(c0 + c1, v);
35386 exprtk_debug((
"(c0) * (v * c1) --> (voc) v * (c0 * c1)\n"));
35389 template allocate_cr<typename details::cov_node<Type,details::mul_op<Type> > >(c0 * c1, v);
35394 exprtk_debug((
"(c0) * (v / c1) --> (cov) (c0 / c1) * v\n"));
35397 template allocate_cr<typename details::cov_node<Type,details::mul_op<Type> > >(c0 / c1, v);
35402 exprtk_debug((
"(c0) / (v * c1) --> (cov) (c0 / c1) / v\n"));
35405 template allocate_cr<typename details::cov_node<Type,details::div_op<Type> > >(c0 / c1, v);
35410 exprtk_debug((
"(c0) / (v / c1) --> (cov) (c0 * c1) / v\n"));
35413 template allocate_cr<typename details::cov_node<Type,details::div_op<Type> > >(c0 * c1, v);
35417 const bool synthesis_result =
35418 synthesize_sf3ext_expression::template compile<ctype, vtype, ctype>
35419 (expr_gen,
id(expr_gen, o0, o1), c0, v, c1, result);
35421 if (synthesis_result)
35428 return error_node();
35430 return error_node();
35432 return node_type::allocate(*(expr_gen.
node_allocator_), c0, v, c1, f0, f1);
35440 <<
"t" << expr_gen.
to_str(o0)
35441 <<
"(t" << expr_gen.
to_str(o1)
35454 return error_node();
35469 const Type c0 =
static_cast<details::literal_node<Type>*
>(branch[0])->
value();
35470 const Type c1 = cov->
c();
35471 const Type& v = cov->
v();
35485 exprtk_debug((
"(c0) + (c1 + v) --> (cov) (c0 + c1) + v\n"));
35488 template allocate_cr<typename details::cov_node<Type,details::add_op<Type> > >(c0 + c1, v);
35493 exprtk_debug((
"(c0) + (c1 - v) --> (cov) (c0 + c1) - v\n"));
35496 template allocate_cr<typename details::cov_node<Type,details::sub_op<Type> > >(c0 + c1, v);
35501 exprtk_debug((
"(c0) - (c1 + v) --> (cov) (c0 - c1) - v\n"));
35504 template allocate_cr<typename details::cov_node<Type,details::sub_op<Type> > >(c0 - c1, v);
35509 exprtk_debug((
"(c0) - (c1 - v) --> (cov) (c0 - c1) + v\n"));
35512 template allocate_cr<typename details::cov_node<Type,details::add_op<Type> > >(c0 - c1, v);
35517 exprtk_debug((
"(c0) * (c1 * v) --> (cov) (c0 * c1) * v\n"));
35520 template allocate_cr<typename details::cov_node<Type,details::mul_op<Type> > >(c0 * c1, v);
35525 exprtk_debug((
"(c0) * (c1 / v) --> (cov) (c0 * c1) / v\n"));
35528 template allocate_cr<typename details::cov_node<Type,details::div_op<Type> > >(c0 * c1, v);
35533 exprtk_debug((
"(c0) / (c1 * v) --> (cov) (c0 / c1) / v\n"));
35536 template allocate_cr<typename details::cov_node<Type,details::div_op<Type> > >(c0 / c1, v);
35541 exprtk_debug((
"(c0) / (c1 / v) --> (cov) (c0 / c1) * v\n"));
35544 template allocate_cr<typename details::cov_node<Type,details::mul_op<Type> > >(c0 / c1, v);
35548 const bool synthesis_result =
35549 synthesize_sf3ext_expression::template compile<ctype, ctype, vtype>
35550 (expr_gen,
id(expr_gen, o0, o1), c0, c1, v, result);
35552 if (synthesis_result)
35559 return error_node();
35561 return error_node();
35563 return node_type::allocate(*(expr_gen.
node_allocator_), c0, c1, v, f0, f1);
35571 <<
"t" << expr_gen.
to_str(o0)
35572 <<
"(t" << expr_gen.
to_str(o1)
35588 const Type& v = voc->
v();
35589 const Type& c0 = voc->
c();
35590 const Type& c1 =
static_cast<details::literal_node<Type>*
>(branch[1])->
value();
35604 exprtk_debug((
"(v + c0) + c1 --> (voc) v + (c0 + c1)\n"));
35607 template allocate_rc<typename details::voc_node<Type,details::add_op<Type> > >(v, c0 + c1);
35612 exprtk_debug((
"(v + c0) - c1 --> (voc) v + (c0 - c1)\n"));
35615 template allocate_rc<typename details::voc_node<Type,details::add_op<Type> > >(v, c0 - c1);
35620 exprtk_debug((
"(v - c0) + c1 --> (voc) v - (c0 + c1)\n"));
35623 template allocate_rc<typename details::voc_node<Type,details::add_op<Type> > >(v, c1 - c0);
35628 exprtk_debug((
"(v - c0) - c1 --> (voc) v - (c0 + c1)\n"));
35631 template allocate_rc<typename details::voc_node<Type,details::sub_op<Type> > >(v, c0 + c1);
35636 exprtk_debug((
"(v * c0) * c1 --> (voc) v * (c0 * c1)\n"));
35639 template allocate_rc<typename details::voc_node<Type,details::mul_op<Type> > >(v, c0 * c1);
35644 exprtk_debug((
"(v * c0) / c1 --> (voc) v * (c0 / c1)\n"));
35647 template allocate_rc<typename details::voc_node<Type,details::mul_op<Type> > >(v, c0 / c1);
35652 exprtk_debug((
"(v / c0) * c1 --> (voc) v * (c1 / c0)\n"));
35655 template allocate_rc<typename details::voc_node<Type,details::mul_op<Type> > >(v, c1 / c0);
35660 exprtk_debug((
"(v / c0) / c1 --> (voc) v / (c0 * c1)\n"));
35663 template allocate_rc<typename details::voc_node<Type,details::div_op<Type> > >(v, c0 * c1);
35668 exprtk_debug((
"(v ^ c0) ^ c1 --> (voc) v ^ (c0 * c1)\n"));
35671 template allocate_rc<typename details::voc_node<Type,details::pow_op<Type> > >(v, c0 * c1);
35675 const bool synthesis_result =
35676 synthesize_sf3ext_expression::template compile<vtype, ctype, ctype>
35677 (expr_gen,
id(expr_gen, o0, o1), v, c0, c1, result);
35679 if (synthesis_result)
35686 return error_node();
35688 return error_node();
35690 return node_type::allocate(*(expr_gen.
node_allocator_), v, c0, c1, f0, f1);
35698 <<
"(t" << expr_gen.
to_str(o0)
35699 <<
"t)" << expr_gen.
to_str(o1)
35713 exprtk_debug((
"(v) o0 (c0 o1 c1) - Not possible.\n"));
35714 return error_node();
35734 const Type& v0 = vov0->
v0();
35735 const Type& v1 = vov0->
v1();
35736 const Type& v2 = vov1->
v0();
35737 const Type& v3 = vov1->
v1();
35752 const bool synthesis_result =
35753 synthesize_sf4ext_expression::
35754 template compile<vtype, vtype, vtype, vtype>(expr_gen,
"(t*t)/(t*t)", v0, v2, v1, v3, result);
35756 exprtk_debug((
"(v0 / v1) * (v2 / v3) --> (vovovov) (v0 * v2) / (v1 * v3)\n"));
35758 return (synthesis_result) ? result : error_node();
35763 const bool synthesis_result =
35764 synthesize_sf4ext_expression::
35765 template compile<vtype, vtype, vtype, vtype>(expr_gen,
"(t*t)/(t*t)", v0, v3, v1, v2, result);
35767 exprtk_debug((
"(v0 / v1) / (v2 / v3) --> (vovovov) (v0 * v3) / (v1 * v2)\n"));
35769 return (synthesis_result) ? result : error_node();
35774 const bool synthesis_result =
35775 synthesize_sf4ext_expression::
35776 template compile<vtype, vtype, vtype, vtype>(expr_gen,
"(t+t)*(t/t)", v0, v1, v3, v2, result);
35778 exprtk_debug((
"(v0 + v1) / (v2 / v3) --> (vovovov) (v0 + v1) * (v3 / v2)\n"));
35780 return (synthesis_result) ? result : error_node();
35785 const bool synthesis_result =
35786 synthesize_sf4ext_expression::
35787 template compile<vtype, vtype, vtype, vtype>(expr_gen,
"(t-t)*(t/t)", v0, v1, v3, v2, result);
35789 exprtk_debug((
"(v0 - v1) / (v2 / v3) --> (vovovov) (v0 - v1) * (v3 / v2)\n"));
35791 return (synthesis_result) ? result : error_node();
35796 const bool synthesis_result =
35797 synthesize_sf4ext_expression::
35798 template compile<vtype, vtype, vtype, vtype>(expr_gen,
"((t*t)*t)/t", v0, v1, v3, v2, result);
35800 exprtk_debug((
"(v0 * v1) / (v2 / v3) --> (vovovov) ((v0 * v1) * v3) / v2\n"));
35802 return (synthesis_result) ? result : error_node();
35806 const bool synthesis_result =
35807 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
35808 (expr_gen,
id(expr_gen, o0, o1, o2), v0, v1, v2, v3, result);
35810 if (synthesis_result)
35818 return error_node();
35820 return error_node();
35822 return error_node();
35824 return node_type::allocate(*(expr_gen.
node_allocator_), v0, v1, v2, v3, f0, f1, f2);
35833 <<
"(t" << expr_gen.
to_str(o0)
35834 <<
"t)" << expr_gen.
to_str(o1)
35835 <<
"(t" << expr_gen.
to_str(o2)
35856 const Type& v0 = vov->
v0();
35857 const Type& v1 = vov->
v1();
35858 const Type& v2 = voc->v ();
35859 const Type c = voc->c ();
35874 const bool synthesis_result =
35875 synthesize_sf4ext_expression::
35876 template compile<vtype, vtype, vtype, ctype>(expr_gen,
"(t*t)/(t*t)", v0, v2, v1, c, result);
35878 exprtk_debug((
"(v0 / v1) * (v2 / c) --> (vovovoc) (v0 * v2) / (v1 * c)\n"));
35880 return (synthesis_result) ? result : error_node();
35885 const bool synthesis_result =
35886 synthesize_sf4ext_expression::
35887 template compile<vtype, ctype, vtype, vtype>(expr_gen,
"(t*t)/(t*t)", v0, c, v1, v2, result);
35889 exprtk_debug((
"(v0 / v1) / (v2 / c) --> (vocovov) (v0 * c) / (v1 * v2)\n"));
35891 return (synthesis_result) ? result : error_node();
35895 const bool synthesis_result =
35896 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
35897 (expr_gen,
id(expr_gen, o0, o1, o2), v0, v1, v2, c, result);
35899 if (synthesis_result)
35907 return error_node();
35909 return error_node();
35911 return error_node();
35913 return node_type::allocate(*(expr_gen.
node_allocator_), v0, v1, v2, c, f0, f1, f2);
35922 <<
"(t" << expr_gen.
to_str(o0)
35923 <<
"t)" << expr_gen.
to_str(o1)
35924 <<
"(t" << expr_gen.
to_str(o2)
35945 const Type& v0 = vov->
v0();
35946 const Type& v1 = vov->
v1();
35947 const Type& v2 = cov->v ();
35948 const Type c = cov->c ();
35963 const bool synthesis_result =
35964 synthesize_sf4ext_expression::
35965 template compile<vtype, ctype, vtype, vtype>(expr_gen,
"(t*t)/(t*t)", v0, c, v1, v2, result);
35967 exprtk_debug((
"(v0 / v1) * (c / v2) --> (vocovov) (v0 * c) / (v1 * v2)\n"));
35969 return (synthesis_result) ? result : error_node();
35974 const bool synthesis_result =
35975 synthesize_sf4ext_expression::
35976 template compile<vtype, vtype, vtype, ctype>(expr_gen,
"(t*t)/(t*t)", v0, v2, v1, c, result);
35978 exprtk_debug((
"(v0 / v1) / (c / v2) --> (vovovoc) (v0 * v2) / (v1 * c)\n"));
35980 return (synthesis_result) ? result : error_node();
35984 const bool synthesis_result =
35985 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
35986 (expr_gen,
id(expr_gen, o0, o1, o2), v0, v1, c, v2, result);
35988 if (synthesis_result)
35996 return error_node();
35998 return error_node();
36000 return error_node();
36002 return node_type::allocate(*(expr_gen.
node_allocator_), v0, v1, c, v2, f0, f1, f2);
36011 <<
"(t" << expr_gen.
to_str(o0)
36012 <<
"t)" << expr_gen.
to_str(o1)
36013 <<
"(t" << expr_gen.
to_str(o2)
36034 const Type c = voc->
c ();
36035 const Type& v0 = voc->
v ();
36036 const Type& v1 = vov->v0();
36037 const Type& v2 = vov->v1();
36052 const bool synthesis_result =
36053 synthesize_sf4ext_expression::
36054 template compile<vtype, vtype, ctype, vtype>(expr_gen,
"(t*t)/(t*t)", v0, v1, c, v2, result);
36056 exprtk_debug((
"(v0 / c) * (v1 / v2) --> (vovocov) (v0 * v1) / (c * v2)\n"));
36058 return (synthesis_result) ? result : error_node();
36063 const bool synthesis_result =
36064 synthesize_sf4ext_expression::
36065 template compile<vtype, vtype, ctype, vtype>(expr_gen,
"(t*t)/(t*t)", v0, v2, c, v1, result);
36067 exprtk_debug((
"(v0 / c) / (v1 / v2) --> (vovocov) (v0 * v2) / (c * v1)\n"));
36069 return (synthesis_result) ? result : error_node();
36073 const bool synthesis_result =
36074 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
36075 (expr_gen,
id(expr_gen, o0, o1, o2), v0, c, v1, v2, result);
36077 if (synthesis_result)
36085 return error_node();
36087 return error_node();
36089 return error_node();
36091 return node_type::allocate(*(expr_gen.
node_allocator_), v0, c, v1, v2, f0, f1, f2);
36100 <<
"(t" << expr_gen.
to_str(o0)
36101 <<
"t)" << expr_gen.
to_str(o1)
36102 <<
"(t" << expr_gen.
to_str(o2)
36123 const Type c = cov->
c ();
36124 const Type& v0 = cov->
v ();
36125 const Type& v1 = vov->v0();
36126 const Type& v2 = vov->v1();
36141 const bool synthesis_result =
36142 synthesize_sf4ext_expression::
36143 template compile<ctype, vtype, vtype, vtype>(expr_gen,
"(t*t)/(t*t)", c, v1, v0, v2, result);
36145 exprtk_debug((
"(c / v0) * (v1 / v2) --> (covovov) (c * v1) / (v0 * v2)\n"));
36147 return (synthesis_result) ? result : error_node();
36152 const bool synthesis_result =
36153 synthesize_sf4ext_expression::
36154 template compile<ctype, vtype, vtype, vtype>(expr_gen,
"(t*t)/(t*t)", c, v2, v0, v1, result);
36156 exprtk_debug((
"(c / v0) / (v1 / v2) --> (covovov) (c * v2) / (v0 * v1)\n"));
36158 return (synthesis_result) ? result : error_node();
36162 const bool synthesis_result =
36163 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
36164 (expr_gen,
id(expr_gen, o0, o1, o2), c, v0, v1, v2, result);
36166 if (synthesis_result)
36174 return error_node();
36176 return error_node();
36178 return error_node();
36180 return node_type::allocate(*(expr_gen.
node_allocator_), c, v0, v1, v2, f0, f1, f2);
36189 <<
"(t" << expr_gen.
to_str(o0)
36190 <<
"t)" << expr_gen.
to_str(o1)
36191 <<
"(t" << expr_gen.
to_str(o2)
36212 const Type c0 = cov0->
c();
36213 const Type& v0 = cov0->
v();
36214 const Type c1 = cov1->
c();
36215 const Type& v1 = cov1->
v();
36230 const bool synthesis_result =
36231 synthesize_sf3ext_expression::
36232 template compile<ctype, vtype, vtype>(expr_gen,
"(t+t)+t", (c0 + c1), v0, v1, result);
36234 exprtk_debug((
"(c0 + v0) + (c1 + v1) --> (covov) (c0 + c1) + v0 + v1\n"));
36236 return (synthesis_result) ? result : error_node();
36241 const bool synthesis_result =
36242 synthesize_sf3ext_expression::
36243 template compile<ctype, vtype, vtype>(expr_gen,
"(t+t)-t", (c0 - c1), v0, v1, result);
36245 exprtk_debug((
"(c0 + v0) - (c1 + v1) --> (covov) (c0 - c1) + v0 - v1\n"));
36247 return (synthesis_result) ? result : error_node();
36252 const bool synthesis_result =
36253 synthesize_sf3ext_expression::
36254 template compile<ctype, vtype, vtype>(expr_gen,
"(t-t)+t", (c0 - c1), v0, v1, result);
36256 exprtk_debug((
"(c0 - v0) - (c1 - v1) --> (covov) (c0 - c1) - v0 + v1\n"));
36258 return (synthesis_result) ? result : error_node();
36263 const bool synthesis_result =
36264 synthesize_sf3ext_expression::
36265 template compile<ctype, vtype, vtype>(expr_gen,
"(t*t)*t", (c0 * c1), v0, v1, result);
36267 exprtk_debug((
"(c0 * v0) * (c1 * v1) --> (covov) (c0 * c1) * v0 * v1\n"));
36269 return (synthesis_result) ? result : error_node();
36274 const bool synthesis_result =
36275 synthesize_sf3ext_expression::
36276 template compile<ctype, vtype, vtype>(expr_gen,
"(t*t)/t", (c0 / c1), v0, v1, result);
36278 exprtk_debug((
"(c0 * v0) / (c1 * v1) --> (covov) (c0 / c1) * (v0 / v1)\n"));
36280 return (synthesis_result) ? result : error_node();
36285 const bool synthesis_result =
36286 synthesize_sf3ext_expression::
36287 template compile<ctype, vtype, vtype>(expr_gen,
"t/(t*t)", (c0 * c1), v0, v1, result);
36289 exprtk_debug((
"(c0 / v0) * (c1 / v1) --> (covov) (c0 * c1) / (v0 * v1)\n"));
36291 return (synthesis_result) ? result : error_node();
36296 const bool synthesis_result =
36297 synthesize_sf3ext_expression::
36298 template compile<ctype, vtype, vtype>(expr_gen,
"(t*t)/t", (c0 / c1), v1, v0, result);
36300 exprtk_debug((
"(c0 / v0) / (c1 / v1) --> (covov) ((c0 / c1) * v1) / v0\n"));
36302 return (synthesis_result) ? result : error_node();
36307 const bool synthesis_result =
36308 synthesize_sf3ext_expression::
36309 template compile<ctype, vtype, vtype>(expr_gen,
"t*(t*t)", (c0 / c1), v0, v1, result);
36311 exprtk_debug((
"(c0 * v0) / (c1 / v1) --> (covov) (c0 / c1) * (v0 * v1)\n"));
36313 return (synthesis_result) ? result : error_node();
36318 const bool synthesis_result =
36319 synthesize_sf3ext_expression::
36320 template compile<ctype, vtype, vtype>(expr_gen,
"t/(t*t)", (c0 / c1), v0, v1, result);
36322 exprtk_debug((
"(c0 / v0) / (c1 * v1) --> (covov) (c0 / c1) / (v0 * v1)\n"));
36324 return (synthesis_result) ? result : error_node();
36328 (std::equal_to<T>()(c0,c1)) &&
36337 std::string specfunc;
36343 default :
return error_node();
36346 const bool synthesis_result =
36347 synthesize_sf3ext_expression::
36348 template compile<ctype, vtype, vtype>(expr_gen, specfunc, c0, v0, v1, result);
36350 exprtk_debug((
"(c * v0) +/- (c * v1) --> (covov) c * (v0 +/- v1)\n"));
36352 return (synthesis_result) ? result : error_node();
36356 const bool synthesis_result =
36357 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
36358 (expr_gen,
id(expr_gen, o0, o1, o2), c0, v0, c1, v1, result);
36360 if (synthesis_result)
36368 return error_node();
36370 return error_node();
36372 return error_node();
36374 return node_type::allocate(*(expr_gen.
node_allocator_), c0, v0, c1, v1, f0, f1, f2);
36383 <<
"(t" << expr_gen.
to_str(o0)
36384 <<
"t)" << expr_gen.
to_str(o1)
36385 <<
"(t" << expr_gen.
to_str(o2)
36406 const Type c0 = voc0->
c();
36407 const Type& v0 = voc0->
v();
36408 const Type c1 = voc1->
c();
36409 const Type& v1 = voc1->
v();
36424 const bool synthesis_result =
36425 synthesize_sf3ext_expression::
36426 template compile<ctype, vtype, vtype>(expr_gen,
"(t+t)+t", (c0 + c1), v0, v1, result);
36428 exprtk_debug((
"(v0 + c0) + (v1 + c1) --> (covov) (c0 + c1) + v0 + v1\n"));
36430 return (synthesis_result) ? result : error_node();
36435 const bool synthesis_result =
36436 synthesize_sf3ext_expression::
36437 template compile<ctype, vtype, vtype>(expr_gen,
"(t+t)-t", (c0 - c1), v0, v1, result);
36439 exprtk_debug((
"(v0 + c0) - (v1 + c1) --> (covov) (c0 - c1) + v0 - v1\n"));
36441 return (synthesis_result) ? result : error_node();
36446 const bool synthesis_result =
36447 synthesize_sf3ext_expression::
36448 template compile<ctype, vtype, vtype>(expr_gen,
"(t+t)-t", (c1 - c0), v0, v1, result);
36450 exprtk_debug((
"(v0 - c0) - (v1 - c1) --> (covov) (c1 - c0) + v0 - v1\n"));
36452 return (synthesis_result) ? result : error_node();
36457 const bool synthesis_result =
36458 synthesize_sf3ext_expression::
36459 template compile<ctype, vtype, vtype>(expr_gen,
"(t*t)*t", (c0 * c1), v0, v1, result);
36461 exprtk_debug((
"(v0 * c0) * (v1 * c1) --> (covov) (c0 * c1) * v0 * v1\n"));
36463 return (synthesis_result) ? result : error_node();
36468 const bool synthesis_result =
36469 synthesize_sf3ext_expression::
36470 template compile<ctype, vtype, vtype>(expr_gen,
"(t*t)/t", (c0 / c1), v0, v1, result);
36472 exprtk_debug((
"(v0 * c0) / (v1 * c1) --> (covov) (c0 / c1) * (v0 / v1)\n"));
36474 return (synthesis_result) ? result : error_node();
36479 const bool synthesis_result =
36480 synthesize_sf3ext_expression::
36481 template compile<ctype, vtype, vtype>(expr_gen,
"(t*t)*t", Type(1) / (c0 * c1), v0, v1, result);
36483 exprtk_debug((
"(v0 / c0) * (v1 / c1) --> (covov) (1 / (c0 * c1)) * v0 * v1\n"));
36485 return (synthesis_result) ? result : error_node();
36490 const bool synthesis_result =
36491 synthesize_sf3ext_expression::
36492 template compile<ctype, vtype, vtype>(expr_gen,
"(t*t)/t", (c1 / c0), v0, v1, result);
36494 exprtk_debug((
"(v0 / c0) / (v1 / c1) --> (covov) ((c1 / c0) * v0) / v1\n"));
36496 return (synthesis_result) ? result : error_node();
36501 const bool synthesis_result =
36502 synthesize_sf3ext_expression::
36503 template compile<ctype, vtype, vtype>(expr_gen,
"t*(t/t)", (c0 * c1), v0, v1, result);
36505 exprtk_debug((
"(v0 * c0) / (v1 / c1) --> (covov) (c0 * c1) * (v0 / v1)\n"));
36507 return (synthesis_result) ? result : error_node();
36512 const bool synthesis_result =
36513 synthesize_sf3ext_expression::
36514 template compile<ctype, vtype, vtype>(expr_gen,
"t*(t/t)", Type(1) / (c0 * c1), v0, v1, result);
36516 exprtk_debug((
"(v0 / c0) / (v1 * c1) --> (covov) (1 / (c0 * c1)) * v0 / v1\n"));
36518 return (synthesis_result) ? result : error_node();
36523 const bool synthesis_result =
36524 synthesize_sf4ext_expression::
36525 template compile<vtype, ctype, vtype, ctype>(expr_gen,
"(t*t)*(t+t)", v0, T(1) / c0, v1, c1, result);
36527 exprtk_debug((
"(v0 / c0) * (v1 + c1) --> (vocovoc) (v0 * (1 / c0)) * (v1 + c1)\n"));
36529 return (synthesis_result) ? result : error_node();
36534 const bool synthesis_result =
36535 synthesize_sf4ext_expression::
36536 template compile<vtype, ctype, vtype, ctype>(expr_gen,
"(t*t)*(t-t)", v0, T(1) / c0, v1, c1, result);
36538 exprtk_debug((
"(v0 / c0) * (v1 - c1) --> (vocovoc) (v0 * (1 / c0)) * (v1 - c1)\n"));
36540 return (synthesis_result) ? result : error_node();
36544 (std::equal_to<T>()(c0,c1)) &&
36553 std::string specfunc;
36559 default :
return error_node();
36562 const bool synthesis_result =
36563 synthesize_sf3ext_expression::
36564 template compile<ctype, vtype, vtype>(expr_gen, specfunc, c0, v0, v1, result);
36566 exprtk_debug((
"(v0 * c) +/- (v1 * c) --> (covov) c * (v0 +/- v1)\n"));
36568 return (synthesis_result) ? result : error_node();
36572 (std::equal_to<T>()(c0,c1)) &&
36581 std::string specfunc;
36587 default :
return error_node();
36590 const bool synthesis_result =
36591 synthesize_sf3ext_expression::
36592 template compile<vtype, vtype, ctype>(expr_gen, specfunc, v0, v1, c0, result);
36594 exprtk_debug((
"(v0 / c) +/- (v1 / c) --> (vovoc) (v0 +/- v1) / c\n"));
36596 return (synthesis_result) ? result : error_node();
36600 const bool synthesis_result =
36601 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
36602 (expr_gen,
id(expr_gen, o0, o1, o2), v0, c0, v1, c1, result);
36604 if (synthesis_result)
36612 return error_node();
36614 return error_node();
36616 return error_node();
36618 return node_type::allocate(*(expr_gen.
node_allocator_), v0, c0, v1, c1, f0, f1, f2);
36627 <<
"(t" << expr_gen.
to_str(o0)
36628 <<
"t)" << expr_gen.
to_str(o1)
36629 <<
"(t" << expr_gen.
to_str(o2)
36650 const Type c0 = cov->
c();
36651 const Type& v0 = cov->
v();
36652 const Type c1 = voc->
c();
36653 const Type& v1 = voc->
v();
36668 const bool synthesis_result =
36669 synthesize_sf3ext_expression::
36670 template compile<ctype, vtype, vtype>(expr_gen,
"(t+t)+t", (c0 + c1), v0, v1, result);
36672 exprtk_debug((
"(c0 + v0) + (v1 + c1) --> (covov) (c0 + c1) + v0 + v1\n"));
36674 return (synthesis_result) ? result : error_node();
36679 const bool synthesis_result =
36680 synthesize_sf3ext_expression::
36681 template compile<ctype, vtype, vtype>(expr_gen,
"(t+t)-t", (c0 - c1), v0, v1, result);
36683 exprtk_debug((
"(c0 + v0) - (v1 + c1) --> (covov) (c0 - c1) + v0 - v1\n"));
36685 return (synthesis_result) ? result : error_node();
36690 const bool synthesis_result =
36691 synthesize_sf3ext_expression::
36692 template compile<ctype, vtype, vtype>(expr_gen,
"t-(t+t)", (c0 + c1), v0, v1, result);
36694 exprtk_debug((
"(c0 - v0) - (v1 - c1) --> (covov) (c0 + c1) - v0 - v1\n"));
36696 return (synthesis_result) ? result : error_node();
36701 const bool synthesis_result =
36702 synthesize_sf3ext_expression::
36703 template compile<ctype, vtype, vtype>(expr_gen,
"(t*t)*t", (c0 * c1), v0, v1, result);
36705 exprtk_debug((
"(c0 * v0) * (v1 * c1) --> (covov) (c0 * c1) * v0 * v1\n"));
36707 return (synthesis_result) ? result : error_node();
36712 const bool synthesis_result =
36713 synthesize_sf3ext_expression::
36714 template compile<ctype, vtype, vtype>(expr_gen,
"(t*t)/t", (c0 / c1), v0, v1, result);
36716 exprtk_debug((
"(c0 * v0) / (v1 * c1) --> (covov) (c0 / c1) * (v0 / v1)\n"));
36718 return (synthesis_result) ? result : error_node();
36723 const bool synthesis_result =
36724 synthesize_sf3ext_expression::
36725 template compile<ctype, vtype, vtype>(expr_gen,
"t*(t/t)", (c0 / c1), v1, v0, result);
36727 exprtk_debug((
"(c0 / v0) * (v1 / c1) --> (covov) (c0 / c1) * (v1 / v0)\n"));
36729 return (synthesis_result) ? result : error_node();
36734 const bool synthesis_result =
36735 synthesize_sf3ext_expression::
36736 template compile<ctype, vtype, vtype>(expr_gen,
"t/(t*t)", (c0 * c1), v0, v1, result);
36738 exprtk_debug((
"(c0 / v0) / (v1 / c1) --> (covov) (c0 * c1) / (v0 * v1)\n"));
36740 return (synthesis_result) ? result : error_node();
36745 const bool synthesis_result =
36746 synthesize_sf3ext_expression::
36747 template compile<ctype, vtype, vtype>(expr_gen,
"(t*t)/t", (c0 * c1), v0, v1, result);
36749 exprtk_debug((
"(c0 * v0) / (v1 / c1) --> (covov) (c0 * c1) * (v0 / v1)\n"));
36751 return (synthesis_result) ? result : error_node();
36756 const bool synthesis_result =
36757 synthesize_sf3ext_expression::
36758 template compile<ctype, vtype, vtype>(expr_gen,
"t/(t*t)", (c0 / c1), v0, v1, result);
36760 exprtk_debug((
"(c0 / v0) / (v1 * c1) --> (covov) (c0 / c1) / (v0 * v1)\n"));
36762 return (synthesis_result) ? result : error_node();
36766 (std::equal_to<T>()(c0,c1)) &&
36775 std::string specfunc;
36781 default :
return error_node();
36784 const bool synthesis_result =
36785 synthesize_sf3ext_expression::
36786 template compile<ctype, vtype, vtype>(expr_gen, specfunc, c0, v0, v1, result);
36788 exprtk_debug((
"(c * v0) +/- (v1 * c) --> (covov) c * (v0 +/- v1)\n"));
36790 return (synthesis_result) ? result : error_node();
36794 const bool synthesis_result =
36795 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
36796 (expr_gen,
id(expr_gen, o0, o1, o2), c0, v0, v1, c1, result);
36798 if (synthesis_result)
36806 return error_node();
36808 return error_node();
36810 return error_node();
36812 return node_type::allocate(*(expr_gen.
node_allocator_), c0, v0, v1, c1, f0, f1, f2);
36821 <<
"(t" << expr_gen.
to_str(o0)
36822 <<
"t)" << expr_gen.
to_str(o1)
36823 <<
"(t" << expr_gen.
to_str(o2)
36844 const Type c0 = voc->
c();
36845 const Type& v0 = voc->
v();
36846 const Type c1 = cov->
c();
36847 const Type& v1 = cov->
v();
36862 const bool synthesis_result =
36863 synthesize_sf3ext_expression::
36864 template compile<ctype, vtype, vtype>(expr_gen,
"(t+t)+t", (c0 + c1), v0, v1, result);
36866 exprtk_debug((
"(v0 + c0) + (c1 + v1) --> (covov) (c0 + c1) + v0 + v1\n"));
36868 return (synthesis_result) ? result : error_node();
36873 const bool synthesis_result =
36874 synthesize_sf3ext_expression::
36875 template compile<ctype, vtype, vtype>(expr_gen,
"(t+t)-t", (c0 - c1), v0, v1, result);
36877 exprtk_debug((
"(v0 + c0) - (c1 + v1) --> (covov) (c0 - c1) + v0 - v1\n"));
36879 return (synthesis_result) ? result : error_node();
36884 const bool synthesis_result =
36885 synthesize_sf3ext_expression::
36886 template compile<vtype, vtype, ctype>(expr_gen,
"(t+t)-t", v0, v1, (c1 + c0), result);
36888 exprtk_debug((
"(v0 - c0) - (c1 - v1) --> (vovoc) v0 + v1 - (c1 + c0)\n"));
36890 return (synthesis_result) ? result : error_node();
36895 const bool synthesis_result =
36896 synthesize_sf3ext_expression::
36897 template compile<ctype, vtype, vtype>(expr_gen,
"(t*t)*t", (c0 * c1), v0, v1, result);
36899 exprtk_debug((
"(v0 * c0) * (c1 * v1) --> (covov) (c0 * c1) * v0 * v1\n"));
36901 return (synthesis_result) ? result : error_node();
36906 const bool synthesis_result =
36907 synthesize_sf3ext_expression::
36908 template compile<ctype, vtype, vtype>(expr_gen,
"(t*t)/t", (c0 / c1), v0, v1, result);
36910 exprtk_debug((
"(v0 * c0) / (c1 * v1) --> (covov) (c0 / c1) * (v0 * v1)\n"));
36912 return (synthesis_result) ? result : error_node();
36917 const bool synthesis_result =
36918 synthesize_sf3ext_expression::
36919 template compile<ctype, vtype, vtype>(expr_gen,
"(t*t)/t", (c1 / c0), v0, v1, result);
36921 exprtk_debug((
"(v0 / c0) * (c1 / v1) --> (covov) (c1 / c0) * (v0 / v1)\n"));
36923 return (synthesis_result) ? result : error_node();
36928 const bool synthesis_result =
36929 synthesize_sf3ext_expression::
36930 template compile<ctype, vtype, vtype>(expr_gen,
"(t*t)*t", (c0 / c1), v0, v1, result);
36932 exprtk_debug((
"(v0 * c0) / (c1 / v1) --> (covov) (c0 / c1) * (v0 * v1)\n"));
36934 return (synthesis_result) ? result : error_node();
36939 const bool synthesis_result =
36940 synthesize_sf3ext_expression::
36941 template compile<ctype, vtype, vtype>(expr_gen,
"(t*t)/t", Type(1) / (c0 * c1), v0, v1, result);
36943 exprtk_debug((
"(v0 / c0) / (c1 * v1) --> (covov) (1 / (c0 * c1)) * (v0 / v1)\n"));
36945 return (synthesis_result) ? result : error_node();
36950 const bool synthesis_result =
36951 synthesize_sf3ext_expression::
36952 template compile<vtype, vtype, ctype>(expr_gen,
"(t*t)*t", v0, v1, Type(1) / (c0 * c1), result);
36954 exprtk_debug((
"(v0 / c0) / (c1 / v1) --> (vovoc) (v0 * v1) * (1 / (c0 * c1))\n"));
36956 return (synthesis_result) ? result : error_node();
36960 (std::equal_to<T>()(c0,c1)) &&
36968 std::string specfunc;
36974 default :
return error_node();
36977 const bool synthesis_result =
36978 synthesize_sf3ext_expression::
36979 template compile<ctype, vtype, vtype>(expr_gen, specfunc, c0, v0, v1, result);
36981 exprtk_debug((
"(v0 * c) +/- (c * v1) --> (covov) c * (v0 +/- v1)\n"));
36983 return (synthesis_result) ? result : error_node();
36987 const bool synthesis_result =
36988 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
36989 (expr_gen,
id(expr_gen, o0, o1, o2), v0, c0, c1, v1, result);
36991 if (synthesis_result)
36999 return error_node();
37001 return error_node();
37003 return error_node();
37005 return node_type::allocate(*(expr_gen.
node_allocator_), v0, c0, c1, v1, f0, f1, f2);
37014 <<
"(t" << expr_gen.
to_str(o0)
37015 <<
"t)" << expr_gen.
to_str(o1)
37016 <<
"(t" << expr_gen.
to_str(o2)
37037 const lcl_vovov_t* vovov =
static_cast<const lcl_vovov_t*
>(branch[1]);
37038 const Type& v0 =
static_cast<details::variable_node<Type>*
>(branch[0])->ref();
37039 const Type& v1 = vovov->t0();
37040 const Type& v2 = vovov->t1();
37041 const Type& v3 = vovov->t2();
37054 const bool synthesis_result =
37055 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
37056 (expr_gen,
id(expr_gen, o0, o1, o2), v0, v1, v2, v3, result);
37058 if (synthesis_result)
37061 return error_node();
37065 return node_type::allocate(*(expr_gen.
node_allocator_), v0, v1, v2, v3, f0, f1, f2);
37074 <<
"t" << expr_gen.
to_str(o0)
37075 <<
"(t" << expr_gen.
to_str(o1)
37076 <<
"(t" << expr_gen.
to_str(o2)
37097 const lcl_vovoc_t* vovoc =
static_cast<const lcl_vovoc_t*
>(branch[1]);
37098 const Type& v0 =
static_cast<details::variable_node<Type>*
>(branch[0])->ref();
37099 const Type& v1 = vovoc->t0();
37100 const Type& v2 = vovoc->t1();
37101 const Type c = vovoc->t2();
37114 const bool synthesis_result =
37115 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
37116 (expr_gen,
id(expr_gen, o0, o1, o2), v0, v1, v2, c, result);
37118 if (synthesis_result)
37121 return error_node();
37125 return node_type::allocate(*(expr_gen.
node_allocator_), v0, v1, v2, c, f0, f1, f2);
37134 <<
"t" << expr_gen.
to_str(o0)
37135 <<
"(t" << expr_gen.
to_str(o1)
37136 <<
"(t" << expr_gen.
to_str(o2)
37157 const lcl_vocov_t* vocov =
static_cast<const lcl_vocov_t*
>(branch[1]);
37158 const Type& v0 =
static_cast<details::variable_node<Type>*
>(branch[0])->ref();
37159 const Type& v1 = vocov->t0();
37160 const Type c = vocov->t1();
37161 const Type& v2 = vocov->t2();
37174 const bool synthesis_result =
37175 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
37176 (expr_gen,
id(expr_gen, o0, o1, o2), v0, v1, c, v2, result);
37178 if (synthesis_result)
37181 return error_node();
37185 return node_type::allocate(*(expr_gen.
node_allocator_), v0, v1, c, v2, f0, f1, f2);
37194 <<
"t" << expr_gen.
to_str(o0)
37195 <<
"(t" << expr_gen.
to_str(o1)
37196 <<
"(t" << expr_gen.
to_str(o2)
37217 const lcl_covov_t* covov =
static_cast<const lcl_covov_t*
>(branch[1]);
37218 const Type& v0 =
static_cast<details::variable_node<Type>*
>(branch[0])->ref();
37219 const Type c = covov->t0();
37220 const Type& v1 = covov->t1();
37221 const Type& v2 = covov->t2();
37234 const bool synthesis_result =
37235 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
37236 (expr_gen,
id(expr_gen, o0, o1, o2), v0, c, v1, v2, result);
37238 if (synthesis_result)
37241 return error_node();
37245 return node_type::allocate(*(expr_gen.
node_allocator_), v0, c, v1, v2, f0, f1, f2);
37254 <<
"t" << expr_gen.
to_str(o0)
37255 <<
"(t" << expr_gen.
to_str(o1)
37256 <<
"(t" << expr_gen.
to_str(o2)
37277 const lcl_vovov_t* vovov =
static_cast<const lcl_vovov_t*
>(branch[1]);
37278 const Type c =
static_cast<details::literal_node<Type>*
>(branch[0])->
value();
37279 const Type& v0 = vovov->t0();
37280 const Type& v1 = vovov->t1();
37281 const Type& v2 = vovov->t2();
37295 const bool synthesis_result =
37296 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
37297 (expr_gen,
id(expr_gen, o0, o1, o2), c, v0, v1, v2, result);
37299 if (synthesis_result)
37302 return error_node();
37306 return node_type::allocate(*(expr_gen.
node_allocator_), c, v0, v1, v2, f0, f1, f2);
37315 <<
"t" << expr_gen.
to_str(o0)
37316 <<
"(t" << expr_gen.
to_str(o1)
37317 <<
"(t" << expr_gen.
to_str(o2)
37338 const lcl_vocov_t* vocov =
static_cast<const lcl_vocov_t*
>(branch[1]);
37339 const Type c0 =
static_cast<details::literal_node<Type>*
>(branch[0])->
value();
37340 const Type& v0 = vocov->t0();
37341 const Type c1 = vocov->t1();
37342 const Type& v1 = vocov->t2();
37356 const bool synthesis_result =
37357 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
37358 (expr_gen,
id(expr_gen, o0, o1, o2), c0, v0, c1, v1, result);
37360 if (synthesis_result)
37363 return error_node();
37367 return node_type::allocate(*(expr_gen.
node_allocator_), c0, v0, c1, v1, f0, f1, f2);
37376 <<
"t" << expr_gen.
to_str(o0)
37377 <<
"(t" << expr_gen.
to_str(o1)
37378 <<
"(t" << expr_gen.
to_str(o2)
37399 const lcl_covoc_t* covoc =
static_cast<const lcl_covoc_t*
>(branch[1]);
37400 const Type& v0 =
static_cast<details::variable_node<Type>*
>(branch[0])->ref();
37401 const Type c0 = covoc->t0();
37402 const Type& v1 = covoc->t1();
37403 const Type c1 = covoc->t2();
37416 const bool synthesis_result =
37417 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
37418 (expr_gen,
id(expr_gen, o0, o1, o2), v0, c0, v1, c1, result);
37420 if (synthesis_result)
37423 return error_node();
37427 return node_type::allocate(*(expr_gen.
node_allocator_), v0, c0, v1, c1, f0, f1, f2);
37436 <<
"t" << expr_gen.
to_str(o0)
37437 <<
"(t" << expr_gen.
to_str(o1)
37438 <<
"(t" << expr_gen.
to_str(o2)
37458 const lcl_vovoc_t* vovoc =
static_cast<const lcl_vovoc_t*
>(branch[1]);
37459 const Type c0 =
static_cast<details::literal_node<Type>*
>(branch[0])->
value();
37460 const Type& v0 = vovoc->t0();
37461 const Type& v1 = vovoc->t1();
37462 const Type c1 = vovoc->t2();
37476 const bool synthesis_result =
37477 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
37478 (expr_gen,
id(expr_gen, o0, o1, o2), c0, v0, v1, c1, result);
37480 if (synthesis_result)
37483 return error_node();
37487 return node_type::allocate(*(expr_gen.
node_allocator_), c0, v0, v1, c1, f0, f1, f2);
37496 <<
"t" << expr_gen.
to_str(o0)
37497 <<
"(t" << expr_gen.
to_str(o1)
37498 <<
"(t" << expr_gen.
to_str(o2)
37519 const lcl_cocov_t* cocov =
static_cast<const lcl_cocov_t*
>(branch[1]);
37520 const Type& v0 =
static_cast<details::variable_node<Type>*
>(branch[0])->ref();
37521 const Type c0 = cocov->t0();
37522 const Type c1 = cocov->t1();
37523 const Type& v1 = cocov->t2();
37536 const bool synthesis_result =
37537 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
37538 (expr_gen,
id(expr_gen, o0, o1, o2), v0, c0, c1, v1, result);
37540 if (synthesis_result)
37543 return error_node();
37547 return node_type::allocate(*(expr_gen.
node_allocator_), v0, c0, c1, v1, f0, f1, f2);
37556 <<
"t" << expr_gen.
to_str(o0)
37557 <<
"(t" << expr_gen.
to_str(o1)
37558 <<
"(t" << expr_gen.
to_str(o2)
37579 const lcl_vovov_t* vovov =
static_cast<const lcl_vovov_t*
>(branch[1]);
37580 const Type& v0 =
static_cast<details::variable_node<Type>*
>(branch[0])->ref();
37581 const Type& v1 = vovov->t0();
37582 const Type& v2 = vovov->t1();
37583 const Type& v3 = vovov->t2();
37596 const bool synthesis_result =
37597 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
37598 (expr_gen,
id(expr_gen, o0, o1, o2), v0, v1, v2, v3, result);
37600 if (synthesis_result)
37603 return error_node();
37607 return node_type::allocate(*(expr_gen.
node_allocator_), v0, v1, v2, v3, f0, f1, f2);
37616 <<
"t" << expr_gen.
to_str(o0)
37617 <<
"((t" << expr_gen.
to_str(o1)
37618 <<
"t)" << expr_gen.
to_str(o2)
37639 const lcl_vovoc_t* vovoc =
static_cast<const lcl_vovoc_t*
>(branch[1]);
37640 const Type& v0 =
static_cast<details::variable_node<Type>*
>(branch[0])->ref();
37641 const Type& v1 = vovoc->t0();
37642 const Type& v2 = vovoc->t1();
37643 const Type c = vovoc->t2();
37656 const bool synthesis_result =
37657 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
37658 (expr_gen,
id(expr_gen, o0, o1, o2), v0, v1, v2, c, result);
37660 if (synthesis_result)
37663 return error_node();
37667 return node_type::allocate(*(expr_gen.
node_allocator_), v0, v1, v2, c, f0, f1, f2);
37676 <<
"t" << expr_gen.
to_str(o0)
37677 <<
"((t" << expr_gen.
to_str(o1)
37678 <<
"t)" << expr_gen.
to_str(o2)
37699 const lcl_vocov_t* vocov =
static_cast<const lcl_vocov_t*
>(branch[1]);
37700 const Type& v0 =
static_cast<details::variable_node<Type>*
>(branch[0])->ref();
37701 const Type& v1 = vocov->t0();
37702 const Type c = vocov->t1();
37703 const Type& v2 = vocov->t2();
37716 const bool synthesis_result =
37717 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
37718 (expr_gen,
id(expr_gen, o0, o1, o2), v0, v1, c, v2, result);
37720 if (synthesis_result)
37723 return error_node();
37727 return node_type::allocate(*(expr_gen.
node_allocator_), v0, v1, c, v2, f0, f1, f2);
37736 <<
"t" << expr_gen.
to_str(o0)
37737 <<
"((t" << expr_gen.
to_str(o1)
37738 <<
"t)" << expr_gen.
to_str(o2)
37759 const lcl_covov_t* covov =
static_cast<const lcl_covov_t*
>(branch[1]);
37760 const Type& v0 =
static_cast<details::variable_node<Type>*
>(branch[0])->ref();
37761 const Type c = covov->t0();
37762 const Type& v1 = covov->t1();
37763 const Type& v2 = covov->t2();
37776 const bool synthesis_result =
37777 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
37778 (expr_gen,
id(expr_gen, o0, o1, o2), v0, c, v1, v2, result);
37780 if (synthesis_result)
37783 return error_node();
37787 return node_type::allocate(*(expr_gen.
node_allocator_), v0, c, v1, v2, f0, f1, f2);
37796 <<
"t" << expr_gen.
to_str(o0)
37797 <<
"((t" << expr_gen.
to_str(o1)
37798 <<
"t)" << expr_gen.
to_str(o2)
37819 const lcl_vovov_t* vovov =
static_cast<const lcl_vovov_t*
>(branch[1]);
37820 const Type c =
static_cast<details::literal_node<Type>*
>(branch[0])->
value();
37821 const Type& v0 = vovov->t0();
37822 const Type& v1 = vovov->t1();
37823 const Type& v2 = vovov->t2();
37837 const bool synthesis_result =
37838 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
37839 (expr_gen,
id(expr_gen, o0, o1, o2), c, v0, v1, v2, result);
37841 if (synthesis_result)
37844 return error_node();
37848 return node_type::allocate(*(expr_gen.
node_allocator_), c, v0, v1, v2, f0, f1, f2);
37857 <<
"t" << expr_gen.
to_str(o0)
37858 <<
"((t" << expr_gen.
to_str(o1)
37859 <<
"t)" << expr_gen.
to_str(o2)
37880 const lcl_vocov_t* vocov =
static_cast<const lcl_vocov_t*
>(branch[1]);
37881 const Type c0 =
static_cast<details::literal_node<Type>*
>(branch[0])->
value();
37882 const Type& v0 = vocov->t0();
37883 const Type c1 = vocov->t1();
37884 const Type& v1 = vocov->t2();
37898 const bool synthesis_result =
37899 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
37900 (expr_gen,
id(expr_gen, o0, o1, o2), c0, v0, c1, v1, result);
37902 if (synthesis_result)
37905 return error_node();
37909 return node_type::allocate(*(expr_gen.
node_allocator_), c0, v0, c1, v1, f0, f1, f2);
37918 <<
"t" << expr_gen.
to_str(o0)
37919 <<
"((t" << expr_gen.
to_str(o1)
37920 <<
"t)" << expr_gen.
to_str(o2)
37941 const lcl_covoc_t* covoc =
static_cast<const lcl_covoc_t*
>(branch[1]);
37942 const Type& v0 =
static_cast<details::variable_node<Type>*
>(branch[0])->ref();
37943 const Type c0 = covoc->t0();
37944 const Type& v1 = covoc->t1();
37945 const Type c1 = covoc->t2();
37958 const bool synthesis_result =
37959 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
37960 (expr_gen,
id(expr_gen, o0, o1, o2), v0, c0, v1, c1, result);
37962 if (synthesis_result)
37965 return error_node();
37969 return node_type::allocate(*(expr_gen.
node_allocator_), v0, c0, v1, c1, f0, f1, f2);
37978 <<
"t" << expr_gen.
to_str(o0)
37979 <<
"((t" << expr_gen.
to_str(o1)
37980 <<
"t)" << expr_gen.
to_str(o2)
38001 const lcl_vovoc_t* vovoc =
static_cast<const lcl_vovoc_t*
>(branch[1]);
38002 const Type c0 =
static_cast<details::literal_node<Type>*
>(branch[0])->
value();
38003 const Type& v0 = vovoc->t0();
38004 const Type& v1 = vovoc->t1();
38005 const Type c1 = vovoc->t2();
38019 const bool synthesis_result =
38020 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
38021 (expr_gen,
id(expr_gen, o0, o1, o2), c0, v0, v1, c1, result);
38023 if (synthesis_result)
38026 return error_node();
38030 return node_type::allocate(*(expr_gen.
node_allocator_), c0, v0, v1, c1, f0, f1, f2);
38039 <<
"t" << expr_gen.
to_str(o0)
38040 <<
"((t" << expr_gen.
to_str(o1)
38041 <<
"t)" << expr_gen.
to_str(o2)
38054 exprtk_debug((
"v0 o0 ((c0 o1 c1) o2 v1) - Not possible\n"));
38055 return error_node();
38083 const lcl_vovov_t* vovov =
static_cast<const lcl_vovov_t*
>(branch[0]);
38084 const Type& v0 = vovov->t0();
38085 const Type& v1 = vovov->t1();
38086 const Type& v2 = vovov->t2();
38087 const Type& v3 =
static_cast<details::variable_node<Type>*
>(branch[1])->ref();
38100 const bool synthesis_result =
38101 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
38102 (expr_gen,
id(expr_gen, o0, o1, o2), v0, v1, v2, v3, result);
38104 if (synthesis_result)
38107 return error_node();
38111 return node_type::allocate(*(expr_gen.
node_allocator_), v0, v1, v2, v3, f0, f1, f2);
38120 <<
"((t" << expr_gen.
to_str(o0)
38121 <<
"t)" << expr_gen.
to_str(o1)
38122 <<
"t)" << expr_gen.
to_str(o2)
38143 const lcl_vovov_t* vovov =
static_cast<const lcl_vovov_t*
>(branch[0]);
38144 const Type& v0 = vovov->t0();
38145 const Type& v1 = vovov->t1();
38146 const Type& v2 = vovov->t2();
38147 const Type c =
static_cast<details::literal_node<Type>*
>(branch[1])->
value();
38161 const bool synthesis_result =
38162 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
38163 (expr_gen,
id(expr_gen, o0, o1, o2), v0, v1, v2, c, result);
38165 if (synthesis_result)
38168 return error_node();
38172 return node_type::allocate(*(expr_gen.
node_allocator_), v0, v1, v2, c, f0, f1, f2);
38181 <<
"((t" << expr_gen.
to_str(o0)
38182 <<
"t)" << expr_gen.
to_str(o1)
38183 <<
"t)" << expr_gen.
to_str(o2)
38204 const lcl_vovoc_t* vovoc =
static_cast<const lcl_vovoc_t*
>(branch[0]);
38205 const Type& v0 = vovoc->t0();
38206 const Type& v1 = vovoc->t1();
38207 const Type c = vovoc->t2();
38208 const Type& v2 =
static_cast<details::variable_node<Type>*
>(branch[1])->ref();
38221 const bool synthesis_result =
38222 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
38223 (expr_gen,
id(expr_gen, o0, o1, o2), v0, v1, c, v2, result);
38225 if (synthesis_result)
38228 return error_node();
38232 return node_type::allocate(*(expr_gen.
node_allocator_), v0, v1, c, v2, f0, f1, f2);
38241 <<
"((t" << expr_gen.
to_str(o0)
38242 <<
"t)" << expr_gen.
to_str(o1)
38243 <<
"t)" << expr_gen.
to_str(o2)
38264 const lcl_vocov_t* vocov =
static_cast<const lcl_vocov_t*
>(branch[0]);
38265 const Type& v0 = vocov->t0();
38266 const Type c = vocov->t1();
38267 const Type& v1 = vocov->t2();
38268 const Type& v2 =
static_cast<details::variable_node<Type>*
>(branch[1])->ref();
38281 const bool synthesis_result =
38282 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
38283 (expr_gen,
id(expr_gen, o0, o1, o2), v0, c, v1, v2, result);
38285 if (synthesis_result)
38288 return error_node();
38292 return node_type::allocate(*(expr_gen.
node_allocator_), v0, c, v1, v2, f0, f1, f2);
38301 <<
"((t" << expr_gen.
to_str(o0)
38302 <<
"t)" << expr_gen.
to_str(o1)
38303 <<
"t)" << expr_gen.
to_str(o2)
38324 const lcl_covov_t* covov =
static_cast<const lcl_covov_t*
>(branch[0]);
38325 const Type c = covov->t0();
38326 const Type& v0 = covov->t1();
38327 const Type& v1 = covov->t2();
38328 const Type& v2 =
static_cast<details::variable_node<Type>*
>(branch[1])->ref();
38341 const bool synthesis_result =
38342 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
38343 (expr_gen,
id(expr_gen, o0, o1, o2), c, v0, v1, v2, result);
38345 if (synthesis_result)
38348 return error_node();
38352 return node_type::allocate(*(expr_gen.
node_allocator_), c, v0, v1, v2, f0, f1, f2);
38361 <<
"((t" << expr_gen.
to_str(o0)
38362 <<
"t)" << expr_gen.
to_str(o1)
38363 <<
"t)" << expr_gen.
to_str(o2)
38384 const lcl_covoc_t* covoc =
static_cast<const lcl_covoc_t*
>(branch[0]);
38385 const Type c0 = covoc->t0();
38386 const Type& v0 = covoc->t1();
38387 const Type c1 = covoc->t2();
38388 const Type& v1 =
static_cast<details::variable_node<Type>*
>(branch[1])->ref();
38401 const bool synthesis_result =
38402 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
38403 (expr_gen,
id(expr_gen, o0, o1, o2), c0, v0, c1, v1, result);
38405 if (synthesis_result)
38408 return error_node();
38412 return node_type::allocate(*(expr_gen.
node_allocator_), c0, v0, c1, v1, f0, f1, f2);
38421 <<
"((t" << expr_gen.
to_str(o0)
38422 <<
"t)" << expr_gen.
to_str(o1)
38423 <<
"t)" << expr_gen.
to_str(o2)
38444 const lcl_vocov_t* vocov =
static_cast<const lcl_vocov_t*
>(branch[0]);
38445 const Type& v0 = vocov->t0();
38446 const Type c0 = vocov->t1();
38447 const Type& v1 = vocov->t2();
38448 const Type c1 =
static_cast<details::literal_node<Type>*
>(branch[1])->
value();
38462 const bool synthesis_result =
38463 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
38464 (expr_gen,
id(expr_gen, o0, o1, o2), v0, c0, v1, c1, result);
38466 if (synthesis_result)
38469 return error_node();
38473 return node_type::allocate(*(expr_gen.
node_allocator_), v0, c0, v1, c1, f0, f1, f2);
38482 <<
"((t" << expr_gen.
to_str(o0)
38483 <<
"t)" << expr_gen.
to_str(o1)
38484 <<
"t)" << expr_gen.
to_str(o2)
38505 const lcl_covov_t* covov =
static_cast<const lcl_covov_t*
>(branch[0]);
38506 const Type c0 = covov->t0();
38507 const Type& v0 = covov->t1();
38508 const Type& v1 = covov->t2();
38509 const Type c1 =
static_cast<details::literal_node<Type>*
>(branch[1])->
value();
38523 const bool synthesis_result =
38524 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
38525 (expr_gen,
id(expr_gen, o0, o1, o2), c0, v0, v1, c1, result);
38527 if (synthesis_result)
38530 return error_node();
38534 return node_type::allocate(*(expr_gen.
node_allocator_), c0, v0, v1, c1, f0, f1, f2);
38543 <<
"((t" << expr_gen.
to_str(o0)
38544 <<
"t)" << expr_gen.
to_str(o1)
38545 <<
"t)" << expr_gen.
to_str(o2)
38566 const lcl_vococ_t* vococ =
static_cast<const lcl_vococ_t*
>(branch[0]);
38567 const Type& v0 = vococ->t0();
38568 const Type c0 = vococ->t1();
38569 const Type c1 = vococ->t2();
38570 const Type& v1 =
static_cast<details::variable_node<Type>*
>(branch[1])->ref();
38583 const bool synthesis_result =
38584 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
38585 (expr_gen,
id(expr_gen, o0, o1, o2), v0, c0, c1, v1, result);
38587 if (synthesis_result)
38590 return error_node();
38594 return node_type::allocate(*(expr_gen.
node_allocator_), v0, c0, c1, v1, f0, f1, f2);
38603 <<
"((t" << expr_gen.
to_str(o0)
38604 <<
"t)" << expr_gen.
to_str(o1)
38605 <<
"t)" << expr_gen.
to_str(o2)
38626 const lcl_vovov_t* vovov =
static_cast<const lcl_vovov_t*
>(branch[0]);
38627 const Type& v0 = vovov->t0();
38628 const Type& v1 = vovov->t1();
38629 const Type& v2 = vovov->t2();
38630 const Type& v3 =
static_cast<details::variable_node<Type>*
>(branch[1])->ref();
38643 const bool synthesis_result =
38644 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
38645 (expr_gen,
id(expr_gen, o0, o1, o2), v0, v1, v2, v3, result);
38647 if (synthesis_result)
38650 return error_node();
38654 return node_type::allocate(*(expr_gen.
node_allocator_), v0, v1, v2, v3, f0, f1, f2);
38663 <<
"(t" << expr_gen.
to_str(o0)
38664 <<
"(t" << expr_gen.
to_str(o1)
38665 <<
"t)" << expr_gen.
to_str(o2)
38686 const lcl_vovov_t* vovov =
static_cast<const lcl_vovov_t*
>(branch[0]);
38687 const Type& v0 = vovov->t0();
38688 const Type& v1 = vovov->t1();
38689 const Type& v2 = vovov->t2();
38690 const Type c =
static_cast<details::literal_node<Type>*
>(branch[1])->
value();
38704 const bool synthesis_result =
38705 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
38706 (expr_gen,
id(expr_gen, o0, o1, o2), v0, v1, v2, c, result);
38708 if (synthesis_result)
38711 return error_node();
38715 return node_type::allocate(*(expr_gen.
node_allocator_), v0, v1, v2, c, f0, f1, f2);
38724 <<
"(t" << expr_gen.
to_str(o0)
38725 <<
"(t" << expr_gen.
to_str(o1)
38726 <<
"t)" << expr_gen.
to_str(o2)
38747 const lcl_vovoc_t* vovoc =
static_cast<const lcl_vovoc_t*
>(branch[0]);
38748 const Type& v0 = vovoc->t0();
38749 const Type& v1 = vovoc->t1();
38750 const Type c = vovoc->t2();
38751 const Type& v2 =
static_cast<details::variable_node<Type>*
>(branch[1])->ref();
38764 const bool synthesis_result =
38765 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
38766 (expr_gen,
id(expr_gen, o0, o1, o2), v0, v1, c, v2, result);
38768 if (synthesis_result)
38771 return error_node();
38775 return node_type::allocate(*(expr_gen.
node_allocator_), v0, v1, c, v2, f0, f1, f2);
38784 <<
"(t" << expr_gen.
to_str(o0)
38785 <<
"(t" << expr_gen.
to_str(o1)
38786 <<
"t)" << expr_gen.
to_str(o2)
38807 const lcl_vocov_t* vocov =
static_cast<const lcl_vocov_t*
>(branch[0]);
38808 const Type& v0 = vocov->t0();
38809 const Type c = vocov->t1();
38810 const Type& v1 = vocov->t2();
38811 const Type& v2 =
static_cast<details::variable_node<Type>*
>(branch[1])->ref();
38823 const bool synthesis_result =
38824 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
38825 (expr_gen,
id(expr_gen, o0, o1, o2), v0, c, v1, v2, result);
38827 if (synthesis_result)
38830 return error_node();
38834 return node_type::allocate(*(expr_gen.
node_allocator_), v0, c, v1, v2, f0, f1, f2);
38843 <<
"(t" << expr_gen.
to_str(o0)
38844 <<
"(t" << expr_gen.
to_str(o1)
38845 <<
"t)" << expr_gen.
to_str(o2)
38866 const lcl_covov_t* covov =
static_cast<const lcl_covov_t*
>(branch[0]);
38867 const Type c = covov->t0();
38868 const Type& v0 = covov->t1();
38869 const Type& v1 = covov->t2();
38870 const Type& v2 =
static_cast<details::variable_node<Type>*
>(branch[1])->ref();
38883 const bool synthesis_result =
38884 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
38885 (expr_gen,
id(expr_gen, o0, o1, o2), c, v0, v1, v2, result);
38887 if (synthesis_result)
38890 return error_node();
38894 return node_type::allocate(*(expr_gen.
node_allocator_), c, v0, v1, v2, f0, f1, f2);
38903 <<
"(t" << expr_gen.
to_str(o0)
38904 <<
"(t" << expr_gen.
to_str(o1)
38905 <<
"t)" << expr_gen.
to_str(o2)
38926 const lcl_covoc_t* covoc =
static_cast<const lcl_covoc_t*
>(branch[0]);
38927 const Type c0 = covoc->t0();
38928 const Type& v0 = covoc->t1();
38929 const Type c1 = covoc->t2();
38930 const Type& v1 =
static_cast<details::variable_node<Type>*
>(branch[1])->ref();
38943 const bool synthesis_result =
38944 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
38945 (expr_gen,
id(expr_gen, o0, o1, o2), c0, v0, c1, v1, result);
38947 if (synthesis_result)
38950 return error_node();
38954 return node_type::allocate(*(expr_gen.
node_allocator_), c0, v0, c1, v1, f0, f1, f2);
38963 <<
"(t" << expr_gen.
to_str(o0)
38964 <<
"(t" << expr_gen.
to_str(o1)
38965 <<
"t)" << expr_gen.
to_str(o2)
38986 const lcl_vocov_t* vocov =
static_cast<const lcl_vocov_t*
>(branch[0]);
38987 const Type& v0 = vocov->t0();
38988 const Type c0 = vocov->t1();
38989 const Type& v1 = vocov->t2();
38990 const Type c1 =
static_cast<details::literal_node<Type>*
>(branch[1])->
value();
39004 const bool synthesis_result =
39005 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
39006 (expr_gen,
id(expr_gen, o0, o1, o2), v0, c0, v1, c1, result);
39008 if (synthesis_result)
39011 return error_node();
39015 return node_type::allocate(*(expr_gen.
node_allocator_), v0, c0, v1, c1, f0, f1, f2);
39024 <<
"(t" << expr_gen.
to_str(o0)
39025 <<
"(t" << expr_gen.
to_str(o1)
39026 <<
"t)" << expr_gen.
to_str(o2)
39047 const lcl_covov_t* covov =
static_cast<const lcl_covov_t*
>(branch[0]);
39048 const Type c0 = covov->t0();
39049 const Type& v0 = covov->t1();
39050 const Type& v1 = covov->t2();
39051 const Type c1 =
static_cast<details::literal_node<Type>*
>(branch[1])->
value();
39065 const bool synthesis_result =
39066 synthesize_sf4ext_expression::template compile<T0, T1, T2, T3>
39067 (expr_gen,
id(expr_gen, o0, o1, o2), c0, v0, v1, c1, result);
39069 if (synthesis_result)
39072 return error_node();
39076 return node_type::allocate(*(expr_gen.
node_allocator_), c0, v0, v1, c1, f0, f1, f2);
39085 <<
"(t" << expr_gen.
to_str(o0)
39086 <<
"(t" << expr_gen.
to_str(o1)
39087 <<
"t)" << expr_gen.
to_str(o2)
39100 exprtk_debug((
"((v0 o0 (c0 o1 c1)) o2 v1) - Not possible\n"));
39101 return error_node();
39125 if (!valid_operator(o0,u0))
39126 return error_node();
39127 else if (!valid_operator(o1,u1))
39128 return error_node();
39129 else if (!valid_operator(operation,f))
39130 return error_node();
39144 allocate_rr<
typename details::
39145 vov_node<Type,details::add_op<Type> > >(v0, v1));
39151 allocate_rr<
typename details::
39152 vov_node<Type,details::sub_op<Type> > >(v1, v0);
39158 allocate_rr<
typename details::
39159 vov_node<Type,details::mul_op<Type> > >(v0, v1);
39165 allocate_rr<
typename details::
39166 vov_node<Type,details::div_op<Type> > >(v0, v1);
39176 result = node_allocator_->
39177 allocate_rrrrr<typename details::uvouv_node<Type> >(v0, v1, u0, u1, f);
39184 #undef basic_opr_switch_statements
39185 #undef extended_opr_switch_statements
39186 #undef unary_opr_switch_statements
39188 #ifndef exprtk_disable_string_capabilities
39190 #define string_opr_switch_statements \
39191 case_stmt(details::e_lt , details::lt_op ) \
39192 case_stmt(details::e_lte , details::lte_op ) \
39193 case_stmt(details::e_gt , details::gt_op ) \
39194 case_stmt(details::e_gte , details::gte_op ) \
39195 case_stmt(details::e_eq , details::eq_op ) \
39196 case_stmt(details::e_ne , details::ne_op ) \
39197 case_stmt(details::e_in , details::in_op ) \
39198 case_stmt(details::e_like , details::like_op ) \
39199 case_stmt(details::e_ilike , details::ilike_op) \
39201 template <
typename T0,
typename T1>
39208 #define case_stmt(op0, op1) \
39209 case op0 : return node_allocator_-> \
39210 allocate_ttt<typename details::str_xrox_node<Type,T0,T1,range_t,op1<Type> >,T0,T1> \
39215 default :
return error_node();
39219 template <
typename T0,
typename T1>
39226 #define case_stmt(op0, op1) \
39227 case op0 : return node_allocator_-> \
39228 allocate_ttt<typename details::str_xoxr_node<Type,T0,T1,range_t,op1<Type> >,T0,T1> \
39233 default :
return error_node();
39237 template <
typename T0,
typename T1>
39244 #define case_stmt(op0, op1) \
39245 case op0 : return node_allocator_-> \
39246 allocate_tttt<typename details::str_xroxr_node<Type,T0,T1,range_t,op1<Type> >,T0,T1> \
39247 (s0, s1, rp0, rp1); \
39251 default :
return error_node();
39255 template <
typename T0,
typename T1>
39260 #define case_stmt(op0, op1) \
39261 case op0 : return node_allocator_-> \
39262 allocate_tt<typename details::sos_node<Type,T0,T1,op1<Type> >,T0,T1>(s0, s1); \
39266 default :
return error_node();
39272 std::string& s0 =
static_cast<details::stringvar_node<Type>*
>(branch[0])->ref();
39273 std::string& s1 =
static_cast<details::stringvar_node<Type>*
>(branch[1])->ref();
39275 return synthesize_sos_expression_impl<std::string&,std::string&>(opr, s0, s1);
39280 std::string& s0 =
static_cast<details::string_range_node<Type>*
>(branch[0])->ref ();
39281 std::string& s1 =
static_cast<details::stringvar_node<Type>*
> (branch[1])->ref ();
39282 range_t rp0 =
static_cast<details::string_range_node<Type>*
>(branch[0])->range();
39284 static_cast<details::string_range_node<Type>*
>(branch[0])->range_ref().clear();
39288 return synthesize_str_xrox_expression_impl<std::string&,std::string&>(opr, s0, s1, rp0);
39293 std::string& s0 =
static_cast<details::stringvar_node<Type>*
> (branch[0])->ref ();
39294 std::string& s1 =
static_cast<details::string_range_node<Type>*
>(branch[1])->ref ();
39295 range_t rp1 =
static_cast<details::string_range_node<Type>*
>(branch[1])->range();
39297 static_cast<details::string_range_node<Type>*
>(branch[1])->range_ref().clear();
39301 return synthesize_str_xoxr_expression_impl<std::string&,std::string&>(opr, s0, s1, rp1);
39306 std::string& s0 =
static_cast<details::stringvar_node<Type>*
> (branch[0])->ref ();
39307 std::string s1 =
static_cast<details::const_string_range_node<Type>*
>(branch[1])->str ();
39308 range_t rp1 =
static_cast<details::const_string_range_node<Type>*
>(branch[1])->range();
39310 static_cast<details::const_string_range_node<Type>*
>(branch[1])->range_ref().clear();
39314 return synthesize_str_xoxr_expression_impl<std::string&, const std::string>(opr, s0, s1, rp1);
39319 std::string& s0 =
static_cast<details::string_range_node<Type>*
>(branch[0])->ref ();
39320 std::string& s1 =
static_cast<details::string_range_node<Type>*
>(branch[1])->ref ();
39321 range_t rp0 =
static_cast<details::string_range_node<Type>*
>(branch[0])->range();
39322 range_t rp1 =
static_cast<details::string_range_node<Type>*
>(branch[1])->range();
39324 static_cast<details::string_range_node<Type>*
>(branch[0])->range_ref().clear();
39325 static_cast<details::string_range_node<Type>*
>(branch[1])->range_ref().clear();
39330 return synthesize_str_xroxr_expression_impl<std::string&,std::string&>(opr, s0, s1, rp0, rp1);
39335 std::string& s0 =
static_cast< details::stringvar_node<Type>*
>(branch[0])->ref();
39336 std::string s1 =
static_cast<details::string_literal_node<Type>*
>(branch[1])->str();
39340 return synthesize_sos_expression_impl<std::string&, const std::string>(opr, s0, s1);
39345 std::string s0 =
static_cast<details::string_literal_node<Type>*
>(branch[0])->str();
39346 std::string& s1 =
static_cast<details::stringvar_node<Type>*
>(branch[1])->ref();
39350 return synthesize_sos_expression_impl<const std::string,std::string&>(opr, s0, s1);
39355 std::string s0 =
static_cast<details::string_literal_node<Type>*
>(branch[0])->str ();
39356 std::string& s1 =
static_cast<details::string_range_node<Type>*
>(branch[1])->ref ();
39357 range_t rp1 =
static_cast<details::string_range_node<Type>*
>(branch[1])->range();
39359 static_cast<details::string_range_node<Type>*
>(branch[1])->range_ref().clear();
39364 return synthesize_str_xoxr_expression_impl<const std::string,std::string&>(opr, s0, s1, rp1);
39369 std::string& s0 =
static_cast<details::string_range_node<Type>*
>(branch[0])->ref ();
39370 std::string s1 =
static_cast<details::string_literal_node<Type>*
>(branch[1])->str ();
39371 range_t rp0 =
static_cast<details::string_range_node<Type>*
>(branch[0])->range();
39373 static_cast<details::string_range_node<Type>*
>(branch[0])->range_ref().clear();
39378 return synthesize_str_xrox_expression_impl<std::string&, const std::string>(opr, s0, s1, rp0);
39383 std::string& s0 =
static_cast<details::string_range_node<Type>*
>(branch[0])->ref ();
39384 std::string s1 =
static_cast<details::const_string_range_node<Type>*
>(branch[1])->str ();
39385 range_t rp0 =
static_cast<details::string_range_node<Type>*
>(branch[0])->range();
39386 range_t rp1 =
static_cast<details::const_string_range_node<Type>*
>(branch[1])->range();
39388 static_cast<details::string_range_node<Type>*
> (branch[0])->range_ref().clear();
39389 static_cast<details::const_string_range_node<Type>*
>(branch[1])->range_ref().clear();
39394 return synthesize_str_xroxr_expression_impl<std::string&, const std::string>(opr, s0, s1, rp0, rp1);
39399 const std::string s0 =
static_cast<details::string_literal_node<Type>*
>(branch[0])->str();
39400 const std::string s1 =
static_cast<details::string_literal_node<Type>*
>(branch[1])->str();
39405 result = node_allocator_->allocate_c<details::string_literal_node<Type> >(s0 + s1);
39414 expression_node_ptr temp = synthesize_sos_expression_impl<const std::string, const std::string>(opr, s0, s1);
39416 const Type v = temp->
value();
39430 const std::string s0 =
static_cast<details::string_literal_node<Type>*
>(branch[0])->str ();
39431 std::string s1 =
static_cast<details::const_string_range_node<Type>*
>(branch[1])->str ();
39432 range_t rp1 =
static_cast<details::const_string_range_node<Type>*
>(branch[1])->range();
39434 static_cast<details::const_string_range_node<Type>*
>(branch[1])->range_ref().clear();
39439 return synthesize_str_xoxr_expression_impl<const std::string, const std::string>(opr, s0, s1, rp1);
39444 std::string s0 =
static_cast<details::const_string_range_node<Type>*
>(branch[0])->str ();
39445 std::string& s1 =
static_cast<details::stringvar_node<Type>*
>(branch[1])->ref ();
39446 range_t rp0 =
static_cast<details::const_string_range_node<Type>*
>(branch[0])->range();
39448 static_cast<details::const_string_range_node<Type>*
>(branch[0])->range_ref().clear();
39452 return synthesize_str_xrox_expression_impl<const std::string,std::string&>(opr, s0, s1, rp0);
39457 const std::string s0 =
static_cast<details::const_string_range_node<Type>*
>(branch[0])->str ();
39458 std::string& s1 =
static_cast<details::string_range_node<Type>*
>(branch[1])->ref ();
39459 const range_t rp0 =
static_cast<details::const_string_range_node<Type>*
>(branch[0])->range();
39460 const range_t rp1 =
static_cast<details::string_range_node<Type>*
>(branch[1])->range();
39462 static_cast<details::const_string_range_node<Type>*
>(branch[0])->range_ref().clear();
39463 static_cast<details::string_range_node<Type>*
> (branch[1])->range_ref().clear();
39468 return synthesize_str_xroxr_expression_impl<const std::string,std::string&>(opr, s0, s1, rp0, rp1);
39473 const std::string s0 =
static_cast<details::const_string_range_node<Type>*
>(branch[0])->str ();
39474 const std::string s1 =
static_cast<details::string_literal_node<Type>*
>(branch[1])->str ();
39475 const range_t rp0 =
static_cast<details::const_string_range_node<Type>*
>(branch[0])->range();
39477 static_cast<details::const_string_range_node<Type>*
>(branch[0])->range_ref().clear();
39481 return synthesize_str_xrox_expression_impl<const std::string,std::string>(opr, s0, s1, rp0);
39486 const std::string s0 =
static_cast<details::const_string_range_node<Type>*
>(branch[0])->str ();
39487 const std::string s1 =
static_cast<details::const_string_range_node<Type>*
>(branch[1])->str ();
39488 const range_t rp0 =
static_cast<details::const_string_range_node<Type>*
>(branch[0])->range();
39489 const range_t rp1 =
static_cast<details::const_string_range_node<Type>*
>(branch[1])->range();
39491 static_cast<details::const_string_range_node<Type>*
>(branch[0])->range_ref().clear();
39492 static_cast<details::const_string_range_node<Type>*
>(branch[1])->range_ref().clear();
39496 return synthesize_str_xroxr_expression_impl<const std::string, const std::string>(opr, s0, s1, rp0, rp1);
39503 #define case_stmt(op0, op1) \
39504 case op0 : return node_allocator_-> \
39505 allocate_ttt<typename details::str_sogens_node<Type,op1<Type> > > \
39506 (opr, branch[0], branch[1]); \
39510 default :
return error_node();
39514 #undef string_opr_switch_statements
39517 #ifndef exprtk_disable_string_capabilities
39520 if ((0 == branch[0]) || (0 == branch[1]))
39524 return error_node();
39555 if (!b0_is_cs || !b1_is_cs)
39557 return synthesize_expression<string_concat_node_t,2>(opr,branch);
39561 if (b0_is_gen || b1_is_gen)
39563 return synthesize_strogen_expression(opr,branch);
39567 if (b1_is_s )
return synthesize_sos_expression (opr,branch);
39568 else if (b1_is_cs )
return synthesize_socs_expression (opr,branch);
39569 else if (b1_is_sr )
return synthesize_sosr_expression (opr,branch);
39570 else if (b1_is_csr)
return synthesize_socsr_expression (opr,branch);
39574 if (b1_is_s )
return synthesize_csos_expression (opr,branch);
39575 else if (b1_is_cs )
return synthesize_csocs_expression (opr,branch);
39576 else if (b1_is_sr )
return synthesize_csosr_expression (opr,branch);
39577 else if (b1_is_csr)
return synthesize_csocsr_expression(opr,branch);
39581 if (b1_is_s )
return synthesize_sros_expression (opr,branch);
39582 else if (b1_is_sr )
return synthesize_srosr_expression (opr,branch);
39583 else if (b1_is_cs )
return synthesize_srocs_expression (opr,branch);
39584 else if (b1_is_csr)
return synthesize_srocsr_expression(opr,branch);
39586 else if (b0_is_csr)
39588 if (b1_is_s )
return synthesize_csros_expression (opr,branch);
39589 else if (b1_is_sr )
return synthesize_csrosr_expression (opr,branch);
39590 else if (b1_is_cs )
return synthesize_csrocs_expression (opr,branch);
39591 else if (b1_is_csr)
return synthesize_csrocsr_expression(opr,branch);
39594 return error_node();
39600 return error_node();
39604 #ifndef exprtk_disable_string_capabilities
39608 return error_node();
39609 else if ((0 == branch[0]) || (0 == branch[1]) || (0 == branch[2]))
39613 return error_node();
39621 const std::string s0 =
static_cast<details::string_literal_node<Type>*
>(branch[0])->str();
39622 const std::string s1 =
static_cast<details::string_literal_node<Type>*
>(branch[1])->str();
39623 const std::string s2 =
static_cast<details::string_literal_node<Type>*
>(branch[2])->str();
39625 const Type v = (((s0 <= s1) && (s1 <= s2)) ? Type(1) : Type(0));
39629 return node_allocator_->allocate_c<details::literal_node<Type> >(v);
39637 std::string& s0 =
static_cast<details::stringvar_node<Type>*
>(branch[0])->ref();
39638 std::string& s1 =
static_cast<details::stringvar_node<Type>*
>(branch[1])->ref();
39639 std::string& s2 =
static_cast<details::stringvar_node<Type>*
>(branch[2])->ref();
39641 typedef typename details::sosos_node<Type, std::string&, std::string&, std::string&, details::inrange_op<Type> > inrange_t;
39643 return node_allocator_->allocate_type<inrange_t, std::string&, std::string&, std::string&>(s0, s1, s2);
39651 std::string s0 =
static_cast<details::string_literal_node<Type>*
>(branch[0])->str();
39652 std::string& s1 =
static_cast<details::stringvar_node<Type>*
>(branch[1])->ref();
39653 std::string s2 =
static_cast<details::string_literal_node<Type>*
>(branch[2])->str();
39655 typedef typename details::sosos_node<Type, std::string, std::string&, std::string, details::inrange_op<Type> > inrange_t;
39660 return node_allocator_->allocate_type<inrange_t, std::string, std::string&, std::string>(s0, s1, s2);
39668 std::string& s0 =
static_cast<details::stringvar_node<Type>*
>(branch[0])->ref();
39669 std::string s1 =
static_cast<details::string_literal_node<Type>*
>(branch[1])->str();
39670 std::string& s2 =
static_cast<details::stringvar_node<Type>*
>(branch[2])->ref();
39672 typedef typename details::sosos_node<Type, std::string&, std::string, std::string&, details::inrange_op<Type> > inrange_t;
39676 return node_allocator_->allocate_type<inrange_t, std::string&, std::string, std::string&>(s0, s1, s2);
39684 std::string& s0 =
static_cast<details::stringvar_node<Type>*
>(branch[0])->ref();
39685 std::string& s1 =
static_cast<details::stringvar_node<Type>*
>(branch[1])->ref();
39686 std::string s2 =
static_cast<details::string_literal_node<Type>*
>(branch[2])->str();
39688 typedef typename details::sosos_node<Type, std::string&, std::string&, std::string, details::inrange_op<Type> > inrange_t;
39692 return node_allocator_->allocate_type<inrange_t, std::string&, std::string&, std::string>(s0, s1, s2);
39700 std::string s0 =
static_cast<details::string_literal_node<Type>*
>(branch[0])->str();
39701 std::string& s1 =
static_cast<details::stringvar_node<Type>*
>(branch[1])->ref();
39702 std::string& s2 =
static_cast<details::stringvar_node<Type>*
>(branch[2])->ref();
39704 typedef typename details::sosos_node<Type, std::string, std::string&, std::string&, details::inrange_op<Type> > inrange_t;
39708 return node_allocator_->allocate_type<inrange_t, std::string, std::string&, std::string&>(s0, s1, s2);
39711 return error_node();
39717 return error_node();
39734 typedef typename details::null_eq_node<T> nulleq_node_t;
39739 if (b0_null && b1_null)
39763 allocate_rc<nulleq_node_t>(branch[b0_null ? 0 : 1],
true);
39772 allocate_rc<nulleq_node_t>(branch[b0_null ? 0 : 1],
false);
39781 branch[0] = branch[1];
39782 branch[1] = error_node();
39787 branch[1] = error_node();
39814 return node_allocator_->allocate<details::null_node<Type> >();
39817 template <
typename NodeType, std::
size_t N>
39828 return error_node();
39830 else if (!details::all_nodes_valid<N>(branch))
39834 return error_node();
39839 expression_node_ptr expression_point = node_allocator_->allocate<NodeType>(operation,branch);
39841 if (is_constant_foldable<N>(branch))
39843 const Type v = expression_point->
value();
39849 if (expression_point && expression_point->
valid())
39851 return expression_point;
39857 "ERR249 - Failed to synthesize node: NodeType",
39863 return error_node();
39866 template <
typename NodeType, std::
size_t N>
39869 if (!details::all_nodes_valid<N>(branch))
39873 return error_node();
39876 typedef typename details::function_N_node<T,ifunction_t,N> function_N_node_t;
39881 function_N_node_t* func_node_ptr =
dynamic_cast<function_N_node_t*
>(expression_point);
39883 if (0 == func_node_ptr)
39887 return error_node();
39890 func_node_ptr->init_branches(branch);
39894 Type v = expression_point->
value();
39900 parser_->state_.activate_side_effect(
"synthesize_expression(function<NT,N>)");
39902 return expression_point;
39918 error_list_.push_back(error_type);
39923 if (!error_list_.empty())
39925 error_list_.pop_back();
39931 if (synthesis_error_.empty())
39933 synthesis_error_ = synthesis_error_message;
39939 for (std::size_t i = 0; i < sem_.size(); ++i)
39944 (scope_element::e_variable == se.
type) ||
39945 (scope_element::e_vecelem == se.
type)
39955 e.register_local_data(se.
data, 1, 0);
39958 else if (scope_element::e_vector == se.
type)
39967 e.register_local_data(se.
data, se.
size, 1);
39970 #ifndef exprtk_disable_string_capabilities
39971 else if (scope_element::e_string == se.
type)
39980 e.register_local_data(se.
data, se.
size, 2);
39987 #ifndef exprtk_disable_string_capabilities
39998 e.register_return_results(results_context_);
39999 results_context_ = 0;
40004 #define register_unary_op(Op, UnaryFunctor) \
40005 m.insert(std::make_pair(Op,UnaryFunctor<T>::process)); \
40046 #undef register_unary_op
40051 typedef typename binary_op_map_t::value_type value_type;
40053 #define register_binary_op(Op, BinaryFunctor) \
40054 m.insert(value_type(Op,BinaryFunctor<T>::process)); \
40074 #undef register_binary_op
40079 typedef typename inv_binary_op_map_t::value_type value_type;
40081 #define register_binary_op(Op, BinaryFunctor) \
40082 m.insert(value_type(BinaryFunctor<T>::process,Op)); \
40102 #undef register_binary_op
40107 typedef std::pair<trinary_functor_t,details::operator_type> pair_t;
40109 #define register_sf3(Op) \
40110 sf3_map[details::sf##Op##_op<T>::id()] = pair_t(details::sf##Op##_op<T>::process,details::e_sf##Op); \
40120 #undef register_sf3
40122 #define register_sf3_extid(Id, Op) \
40123 sf3_map[Id] = pair_t(details::sf##Op##_op<T>::process,details::e_sf##Op); \
40126 #undef register_sf3_extid
40131 typedef std::pair<quaternary_functor_t,details::operator_type> pair_t;
40133 #define register_sf4(Op) \
40134 sf4_map[details::sf##Op##_op<T>::id()] = pair_t(details::sf##Op##_op<T>::process,details::e_sf##Op); \
40145 #undef register_sf4
40147 #define register_sf4ext(Op) \
40148 sf4_map[details::sfext##Op##_op<T>::id()] = pair_t(details::sfext##Op##_op<T>::process,details::e_sf4ext##Op); \
40166 #undef register_sf4ext
40171 if (0 == results_context_)
40176 return (*results_context_);
40181 #ifndef exprtk_disable_return_statement
40182 if (results_context_)
40184 delete results_context_;
40185 results_context_ = 0;
40188 state_.return_stmt_present =
false;
40237 template <
typename ParserType>
40243 template <
typename T>
40249 typedef typename parser_t::dependent_entity_collector::symbol_t
symbol_t;
40260 virtual bool process(
const std::string& unknown_symbol,
40271 std::set<std::string>& symbol_set,
40274 const bool vector_pass,
40297 bool pass_result =
false;
40303 pass_result =
true;
40305 std::deque<symbol_t> symb_list;
40308 for (std::size_t i = 0; i < symb_list.size(); ++i)
40310 symbol_set.insert(symb_list[i].first);
40314 return pass_result;
40319 template <
typename Allocator,
40320 template <
typename,
typename>
class Sequence>
40322 Sequence<std::string, Allocator>& symbol_list)
40327 collect_t::symbol_table_t null_symbol_table;
40329 std::set<std::string> symbol_set;
40331 const bool variable_pass = collect_t::collection_pass
40332 (
expression, symbol_set,
true,
false,
false, null_symbol_table);
40333 const bool vector_pass = collect_t::collection_pass
40334 (
expression, symbol_set,
true,
false,
true, null_symbol_table);
40336 if (!variable_pass && !vector_pass)
40339 std::set<std::string>::iterator itr = symbol_set.begin();
40341 while (symbol_set.end() != itr)
40343 symbol_list.push_back(*itr);
40350 template <
typename T,
40351 typename Allocator,
40352 template <
typename,
typename>
class Sequence>
40355 Sequence<std::string, Allocator>& symbol_list)
40359 std::set<std::string> symbol_set;
40361 const bool variable_pass = collect_t::collection_pass
40362 (
expression, symbol_set,
true,
false,
false, extrnl_symbol_table);
40363 const bool vector_pass = collect_t::collection_pass
40364 (
expression, symbol_set,
true,
false,
true, extrnl_symbol_table);
40366 if (!variable_pass && !vector_pass)
40369 std::set<std::string>::iterator itr = symbol_set.begin();
40371 while (symbol_set.end() != itr)
40373 symbol_list.push_back(*itr);
40380 template <
typename Allocator,
40381 template <
typename,
typename>
class Sequence>
40383 Sequence<std::string, Allocator>& symbol_list)
40388 collect_t::symbol_table_t null_symbol_table;
40390 std::set<std::string> symbol_set;
40392 const bool variable_pass = collect_t::collection_pass
40393 (
expression, symbol_set,
false,
true,
false, null_symbol_table);
40394 const bool vector_pass = collect_t::collection_pass
40395 (
expression, symbol_set,
false,
true,
true, null_symbol_table);
40397 if (!variable_pass && !vector_pass)
40400 std::set<std::string>::iterator itr = symbol_set.begin();
40402 while (symbol_set.end() != itr)
40404 symbol_list.push_back(*itr);
40411 template <
typename T,
40412 typename Allocator,
40413 template <
typename,
typename>
class Sequence>
40416 Sequence<std::string, Allocator>& symbol_list)
40420 std::set<std::string> symbol_set;
40422 const bool variable_pass = collect_t::collection_pass
40423 (
expression, symbol_set,
false,
true,
false, extrnl_symbol_table);
40424 const bool vector_pass = collect_t::collection_pass
40425 (
expression, symbol_set,
false,
true,
true, extrnl_symbol_table);
40427 if (!variable_pass && !vector_pass)
40430 std::set<std::string>::iterator itr = symbol_set.begin();
40432 while (symbol_set.end() != itr)
40434 symbol_list.push_back(*itr);
40441 template <
typename T>
40444 const T& r0,
const T& r1,
40445 const std::size_t number_of_intervals = 1000000)
40450 const T h = (r1 - r0) / (T(2) * number_of_intervals);
40451 T total_area = T(0);
40453 for (std::size_t i = 0; i < number_of_intervals; ++i)
40455 x = r0 + T(2) * i * h;
40456 const T y0 =
e.value();
x += h;
40457 const T y1 =
e.value();
x += h;
40458 const T y2 =
e.value();
x += h;
40459 total_area += h * (y0 + T(4) * y1 + y2) / T(3);
40465 template <
typename T>
40467 const std::string& variable_name,
40468 const T& r0,
const T& r1,
40469 const std::size_t number_of_intervals = 1000000)
40473 if (!sym_table.
valid())
40475 return std::numeric_limits<T>::quiet_NaN();
40478 details::variable_node<T>* var = sym_table.
get_variable(variable_name);
40483 const T x_original =
x;
40484 const T result =
integrate(
e,
x, r0, r1, number_of_intervals);
40490 return std::numeric_limits<T>::quiet_NaN();
40493 template <
typename T>
40496 const T& h = T(0.00000001))
40498 const T x_init =
x;
40499 const T _2h = T(2) * h;
40502 const T y0 =
e.value();
40504 const T y1 =
e.value();
40506 const T y2 =
e.value();
40508 const T y3 =
e.value();
40511 return (-y0 + T(8) * (y1 - y2) + y3) / (T(12) * h);
40514 template <
typename T>
40517 const T& h = T(0.00001))
40519 const T x_init =
x;
40520 const T _2h = T(2) * h;
40522 const T y =
e.value();
40524 const T y0 =
e.value();
40526 const T y1 =
e.value();
40528 const T y2 =
e.value();
40530 const T y3 =
e.value();
40533 return (-y0 + T(16) * (y1 + y2) - T(30) * y - y3) / (T(12) * h * h);
40536 template <
typename T>
40539 const T& h = T(0.0001))
40541 const T x_init =
x;
40542 const T _2h = T(2) * h;
40545 const T y0 =
e.value();
40547 const T y1 =
e.value();
40549 const T y2 =
e.value();
40551 const T y3 =
e.value();
40554 return (y0 + T(2) * (y2 - y1) - y3) / (T(2) * h * h * h);
40557 template <
typename T>
40559 const std::string& variable_name,
40560 const T& h = T(0.00000001))
40564 if (!sym_table.
valid())
40566 return std::numeric_limits<T>::quiet_NaN();
40569 details::variable_node<T>* var = sym_table.
get_variable(variable_name);
40574 const T x_original =
x;
40581 return std::numeric_limits<T>::quiet_NaN();
40584 template <
typename T>
40586 const std::string& variable_name,
40587 const T& h = T(0.00001))
40591 if (!sym_table.
valid())
40593 return std::numeric_limits<T>::quiet_NaN();
40596 details::variable_node<T>* var = sym_table.
get_variable(variable_name);
40601 const T x_original =
x;
40608 return std::numeric_limits<T>::quiet_NaN();
40611 template <
typename T>
40613 const std::string& variable_name,
40614 const T& h = T(0.0001))
40618 if (!sym_table.
valid())
40620 return std::numeric_limits<T>::quiet_NaN();
40623 details::variable_node<T>* var = sym_table.
get_variable(variable_name);
40628 const T x_original =
x;
40635 return std::numeric_limits<T>::quiet_NaN();
40648 template <
typename T>
40649 inline bool compute(
const std::string& expression_string, T& result)
40670 template <
typename T>
40671 inline bool compute(
const std::string& expression_string,
40676 static const std::string x_var(
"x");
40697 template <
typename T>
40698 inline bool compute(
const std::string& expression_string,
40699 const T&
x,
const T& y,
40703 static const std::string x_var(
"x");
40704 static const std::string y_var(
"y");
40726 template <
typename T>
40727 inline bool compute(
const std::string& expression_string,
40728 const T&
x,
const T& y,
const T&
z,
40732 static const std::string x_var(
"x");
40733 static const std::string y_var(
"y");
40734 static const std::string z_var(
"z");
40757 template <
typename T, std::
size_t N>
40762 template <
typename Type, std::
size_t NumberOfCoefficients>
40765 template <
typename Type>
40769 const Type c12,
const Type c11,
const Type c10,
const Type c9,
const Type c8,
40770 const Type c7,
const Type c6,
const Type c5,
const Type c4,
const Type c3,
40771 const Type c2,
const Type c1,
const Type c0)
40774 return ((((((((((((c12 *
x + c11) *
x + c10) *
x + c9) *
x + c8) *
x + c7) *
x + c6) *
x + c5) *
x + c4) *
x + c3) *
x + c2) *
x + c1) *
x + c0);
40778 template <
typename Type>
40782 const Type c11,
const Type c10,
const Type c9,
const Type c8,
const Type c7,
40783 const Type c6,
const Type c5,
const Type c4,
const Type c3,
const Type c2,
40784 const Type c1,
const Type c0)
40787 return (((((((((((c11 *
x + c10) *
x + c9) *
x + c8) *
x + c7) *
x + c6) *
x + c5) *
x + c4) *
x + c3) *
x + c2) *
x + c1) *
x + c0);
40791 template <
typename Type>
40795 const Type c10,
const Type c9,
const Type c8,
const Type c7,
const Type c6,
40796 const Type c5,
const Type c4,
const Type c3,
const Type c2,
const Type c1,
40800 return ((((((((((c10 *
x + c9) *
x + c8) *
x + c7) *
x + c6) *
x + c5) *
x + c4) *
x + c3) *
x + c2) *
x + c1) *
x + c0);
40804 template <
typename Type>
40808 const Type c9,
const Type c8,
const Type c7,
const Type c6,
const Type c5,
40809 const Type c4,
const Type c3,
const Type c2,
const Type c1,
const Type c0)
40812 return (((((((((c9 *
x + c8) *
x + c7) *
x + c6) *
x + c5) *
x + c4) *
x + c3) *
x + c2) *
x + c1) *
x + c0);
40816 template <
typename Type>
40820 const Type c8,
const Type c7,
const Type c6,
const Type c5,
const Type c4,
40821 const Type c3,
const Type c2,
const Type c1,
const Type c0)
40824 return ((((((((c8 *
x + c7) *
x + c6) *
x + c5) *
x + c4) *
x + c3) *
x + c2) *
x + c1) *
x + c0);
40828 template <
typename Type>
40832 const Type c7,
const Type c6,
const Type c5,
const Type c4,
const Type c3,
40833 const Type c2,
const Type c1,
const Type c0)
40836 return (((((((c7 *
x + c6) *
x + c5) *
x + c4) *
x + c3) *
x + c2) *
x + c1) *
x + c0);
40840 template <
typename Type>
40844 const Type c6,
const Type c5,
const Type c4,
const Type c3,
const Type c2,
40845 const Type c1,
const Type c0)
40848 return ((((((c6 *
x + c5) *
x + c4) *
x + c3) *
x + c2) *
x + c1) *
x + c0);
40852 template <
typename Type>
40856 const Type c5,
const Type c4,
const Type c3,
const Type c2,
40857 const Type c1,
const Type c0)
40860 return (((((c5 *
x + c4) *
x + c3) *
x + c2) *
x + c1) *
x + c0);
40864 template <
typename Type>
40867 static inline T
evaluate(
const Type
x,
const Type c4,
const Type c3,
const Type c2,
const Type c1,
const Type c0)
40870 return ((((c4 *
x + c3) *
x + c2) *
x + c1) *
x + c0);
40874 template <
typename Type>
40877 static inline T
evaluate(
const Type
x,
const Type c3,
const Type c2,
const Type c1,
const Type c0)
40880 return (((c3 *
x + c2) *
x + c1) *
x + c0);
40884 template <
typename Type>
40887 static inline T
evaluate(
const Type
x,
const Type c2,
const Type c1,
const Type c0)
40890 return ((c2 *
x + c1) *
x + c0);
40894 template <
typename Type>
40897 static inline T
evaluate(
const Type
x,
const Type c1,
const Type c0)
40900 return (c1 *
x + c0);
40909 :
ifunction<T>((N+2 <= 20) ? (N + 2) : std::numeric_limits<std::size_t>::
max())
40917 #define poly_rtrn(NN) \
40918 return (NN != N) ? std::numeric_limits<T>::quiet_NaN() :
40930 inline virtual T operator() (
const T&
x,
const T& c3,
const T& c2,
const T& c1,
const T& c0)
exprtk_override
40935 inline virtual T operator() (
const T&
x,
const T& c4,
const T& c3,
const T& c2,
const T& c1,
40941 inline virtual T operator() (
const T&
x,
const T& c5,
const T& c4,
const T& c3,
const T& c2,
40947 inline virtual T operator() (
const T&
x,
const T& c6,
const T& c5,
const T& c4,
const T& c3,
40953 inline virtual T operator() (
const T&
x,
const T& c7,
const T& c6,
const T& c5,
const T& c4,
40959 inline virtual T operator() (
const T&
x,
const T& c8,
const T& c7,
const T& c6,
const T& c5,
40960 const T& c4,
const T& c3,
const T& c2,
const T& c1,
const T& c0)
exprtk_override
40962 poly_rtrn(8) (
poly_impl<T,8>::evaluate(
x, c8, c7, c6, c5, c4, c3, c2, c1, c0));
40965 inline virtual T operator() (
const T&
x,
const T& c9,
const T& c8,
const T& c7,
const T& c6,
40966 const T& c5,
const T& c4,
const T& c3,
const T& c2,
const T& c1,
40969 poly_rtrn(9) (
poly_impl<T,9>::evaluate(
x, c9, c8, c7, c6, c5, c4, c3, c2, c1, c0));
40972 inline virtual T operator() (
const T&
x,
const T& c10,
const T& c9,
const T& c8,
const T& c7,
40973 const T& c6,
const T& c5,
const T& c4,
const T& c3,
const T& c2,
40976 poly_rtrn(10) (
poly_impl<T,10>::evaluate(
x, c10, c9, c8, c7, c6, c5, c4, c3, c2, c1, c0));
40979 inline virtual T operator() (
const T&
x,
const T& c11,
const T& c10,
const T& c9,
const T& c8,
40980 const T& c7,
const T& c6,
const T& c5,
const T& c4,
const T& c3,
40983 poly_rtrn(11) (
poly_impl<T,11>::evaluate(
x, c11, c10, c9, c8, c7, c6, c5, c4, c3, c2, c1, c0));
40986 inline virtual T operator() (
const T&
x,
const T& c12,
const T& c11,
const T& c10,
const T& c9,
40987 const T& c8,
const T& c7,
const T& c6,
const T& c5,
const T& c4,
40990 poly_rtrn(12) (
poly_impl<T,12>::evaluate(
x, c12, c11, c10, c9, c8, c7, c6, c5, c4, c3, c2, c1, c0));
40997 return std::numeric_limits<T>::quiet_NaN();
41002 return std::numeric_limits<T>::quiet_NaN();
41007 return std::numeric_limits<T>::quiet_NaN();
41011 template <
typename T>
41026 function(
const std::string& n)
41030 function(
const std::string& name,
41036 function(
const std::string& name,
41038 const std::string& v0)
41045 function(
const std::string& name,
41047 const std::string& v0,
const std::string& v1)
41051 v_.push_back(v0); v_.push_back(v1);
41054 function(
const std::string& name,
41056 const std::string& v0,
const std::string& v1,
41057 const std::string& v2)
41061 v_.push_back(v0); v_.push_back(v1);
41065 function(
const std::string& name,
41067 const std::string& v0,
const std::string& v1,
41068 const std::string& v2,
const std::string& v3)
41072 v_.push_back(v0); v_.push_back(v1);
41073 v_.push_back(v2); v_.push_back(v3);
41076 function(
const std::string& name,
41078 const std::string& v0,
const std::string& v1,
41079 const std::string& v2,
const std::string& v3,
41080 const std::string& v4)
41084 v_.push_back(v0); v_.push_back(v1);
41085 v_.push_back(v2); v_.push_back(v3);
41089 inline function&
name(
const std::string& n)
41101 inline function&
var(
const std::string& v)
41107 inline function&
vars(
const std::string& v0,
41108 const std::string& v1)
41115 inline function&
vars(
const std::string& v0,
41116 const std::string& v1,
41117 const std::string& v2)
41125 inline function&
vars(
const std::string& v0,
41126 const std::string& v1,
41127 const std::string& v2,
41128 const std::string& v3)
41137 inline function&
vars(
const std::string& v0,
41138 const std::string& v1,
41139 const std::string& v2,
41140 const std::string& v3,
41141 const std::string& v4)
41171 , local_var_stack_size(0)
41180 #define exprtk_assign(Index) \
41181 (*v[Index]) = v##Index; \
41193 inline void update(
const T& v0,
const T& v1,
const T& v2)
41199 inline void update(
const T& v0,
const T& v1,
const T& v2,
const T& v3)
41205 inline void update(
const T& v0,
const T& v1,
const T& v2,
const T& v3,
const T& v4)
41212 inline void update(
const T& v0,
const T& v1,
const T& v2,
const T& v3,
const T& v4,
const T& v5)
41219 #ifdef exprtk_assign
41220 #undef exprtk_assign
41227 typedef typename expression_t::control_block::local_data_list_t ldl_t;
41231 std::vector<std::size_t> index_list;
41233 for (std::size_t i = 0; i < ldl.size(); ++i)
41237 index_list.push_back(i);
41241 std::size_t input_param_count = 0;
41243 for (std::size_t i = 0; i < index_list.size(); ++i)
41245 const std::size_t index = index_list[i];
41247 if (i < (index_list.size() - v.size()))
41251 reinterpret_cast<T*
>(ldl[index].pointer),
41254 local_var_stack_size += ldl[index].size;
41257 v[input_param_count++] =
reinterpret_cast<T*
>(ldl[index].pointer);
41271 var_t var_stack(v.size(),T(0));
41273 param_stack.push_back(var_stack);
41278 var_t local_var_stack(local_var_stack_size,T(0));
41279 copy(lv,local_var_stack);
41280 local_stack.push_back(local_var_stack);
41291 copy(param_stack.back(),v);
41292 param_stack.pop_back();
41297 copy(local_stack.back(),lv);
41298 local_stack.pop_back();
41305 for (std::size_t i = 0; i < src_v.size(); ++i)
41307 dest_v[i] = (*src_v[i]);
41313 for (std::size_t i = 0; i < src_v.size(); ++i)
41315 (*dest_v[i]) = src_v[i];
41321 typename var_t::iterator itr = dest_v.begin();
41322 typedef typename std::iterator_traits<typename var_t::iterator>::difference_type diff_t;
41324 for (std::size_t i = 0; i < src_v.size(); ++i)
41328 if (1 == vr.second)
41329 *itr++ = (*vr.first);
41332 std::copy(vr.first, vr.first + vr.second, itr);
41333 itr +=
static_cast<diff_t
>(vr.second);
41340 typename var_t::const_iterator itr = src_v.begin();
41341 typedef typename std::iterator_traits<typename var_t::iterator>::difference_type diff_t;
41343 for (std::size_t i = 0; i < src_v.size(); ++i)
41347 if (1 == vr.second)
41348 (*vr.first) = *itr++;
41351 std::copy(itr, itr +
static_cast<diff_t
>(vr.second), vr.first);
41352 itr +=
static_cast<diff_t
>(vr.second);
41359 for (std::size_t i = 0; i < v.size(); ++i)
41389 return this->
value(base_func::expression);
41395 template <
typename BaseFuncType>
41426 base_func::update(v0);
41427 return this->
value(base_func::expression);
41440 base_func::update(v0, v1);
41441 return this->
value(base_func::expression);
41454 base_func::update(v0, v1, v2);
41455 return this->
value(base_func::expression);
41468 base_func::update(v0, v1, v2, v3);
41469 return this->
value(base_func::expression);
41482 base_func::update(v0, v1, v2, v3, v4);
41483 return this->
value(base_func::expression);
41496 base_func::update(v0, v1, v2, v3, v4, v5);
41497 return this->
value(base_func::expression);
41504 typedef typename results_context_t::type_store_t type_t;
41505 typedef typename type_t::scalar_view scalar_t;
41507 const T result =
e.value();
41509 if (
e.return_invoked())
41514 return scalar_t(
e.results()[0])();
41520 #define def_fp_retval(N) \
41521 struct func_##N##param_retval exprtk_final : public func_##N##param \
41523 inline T value(expression_t& e) exprtk_override \
41525 return return_value(e); \
41537 #undef def_fp_retval
41539 template <
typename Allocator,
41540 template <
typename,
typename>
class Sequence>
41541 inline bool add(
const std::string& name,
41543 const Sequence<std::string,Allocator>& var_list,
41544 const bool override =
false)
41546 const typename std::map<std::string,expression_t>::iterator itr = expr_map_.find(name);
41548 if (expr_map_.end() != itr)
41552 exprtk_debug((
"Compositor error(add): function '%s' already defined\n",
41558 remove(name, var_list.size());
41561 if (compile_expression(name,
expression, var_list))
41563 const std::size_t n = var_list.size();
41565 fp_map_[n][name]->setup(expr_map_[name]);
41571 exprtk_debug((
"Compositor error(add): Failed to compile function '%s'\n",
41581 : parser_(
settings_t::default_compile_all_opts +
41584 , load_variables_(false)
41585 , load_vectors_(false)
41589 : symbol_table_(st)
41590 , parser_(
settings_t::default_compile_all_opts +
41593 , load_variables_(false)
41594 , load_vectors_(false)
41604 return symbol_table_;
41609 return symbol_table_;
41614 auxiliary_symtab_list_.push_back(&symtab);
41619 load_variables_ = load;
41624 load_vectors_ = load;
41629 symbol_table_.clear();
41630 expr_map_ .clear();
41632 for (std::size_t i = 0; i < fp_map_.size(); ++i)
41634 typename funcparam_t::iterator itr = fp_map_[i].begin();
41635 typename funcparam_t::iterator end = fp_map_[i].end ();
41639 delete itr->second;
41643 fp_map_[i].clear();
41647 inline bool add(
const function& f,
const bool override =
false)
41649 return add(f.name_, f.expression_, f.v_,
override);
41654 if (!error_list_.empty())
41656 return error_list_[0].diagnostic;
41659 return std::string(
"No Error");
41664 return error_list_.size();
41669 if (index < error_list_.size())
41670 return error_list_[index];
41672 throw std::invalid_argument(
"compositor::get_error() - Invalid error index specified");
41677 template <
typename Allocator,
41678 template <
typename,
typename>
class Sequence>
41681 const Sequence<std::string,Allocator>& input_var_list,
41682 bool return_present =
false)
41687 local_symbol_table.
load_from(symbol_table_);
41690 if (load_variables_)
41700 error_list_.clear();
41702 if (!valid(name,input_var_list.size()))
41708 "ERR250 - Function '" + name +
"' is an invalid overload",
41711 error_list_.push_back(error);
41716 input_var_list.size(),
41717 local_symbol_table,
41723 for (std::size_t i = 0; i < auxiliary_symtab_list_.size(); ++i)
41728 std::string mod_expression;
41730 for (std::size_t i = 0; i < input_var_list.size(); ++i)
41732 mod_expression +=
" var " + input_var_list[i] +
"{};\n";
41743 if (!parser_.compile(mod_expression,compiled_expression))
41745 exprtk_debug((
"Compositor Error: %s\n", parser_.error().c_str()));
41746 exprtk_debug((
"Compositor modified expression: \n%s\n", mod_expression.c_str()));
41748 remove(name,input_var_list.size());
41750 for (std::size_t err_index = 0; err_index < parser_.error_count(); ++err_index)
41752 error_list_.push_back(parser_.get_error(err_index));
41758 if (!return_present && parser_.dec().return_present())
41760 remove(name,input_var_list.size());
41761 return compile_expression(name,
expression, input_var_list,
true);
41765 if (parser_.dec().return_present())
41767 typedef std::vector<std::string> str_list_t;
41769 str_list_t ret_param_list = parser_.dec().return_param_type_list();
41771 for (std::size_t i = 0; i < ret_param_list.size(); ++i)
41773 const std::string& params = ret_param_list[i];
41775 if (params.empty() || (
'T' != params[0]))
41777 exprtk_debug((
"Compositor Error: Return statement in function '%s' is invalid\n",
41780 remove(name,input_var_list.size());
41787 expr_map_[name] = compiled_expression;
41791 if (symbol_table_.add_function(name,ifunc))
41795 exprtk_debug((
"Compositor Error: Failed to add function '%s' to symbol table\n",
41804 symbol_table_.is_variable (symbol) ||
41805 symbol_table_.is_stringvar (symbol) ||
41806 symbol_table_.is_function (symbol) ||
41807 symbol_table_.is_vector (symbol) ||
41808 symbol_table_.is_vararg_function(symbol)
41813 const std::size_t& arg_count)
const
41817 else if (symbol_used(name))
41819 else if (fp_map_[arg_count].end() != fp_map_[arg_count].find(name))
41826 const std::size_t& arg_count,
41828 const bool ret_present =
false)
41832 #define case_stmt(N) \
41833 case N : (fp_map_[arg_count])[name] = \
41834 (!ret_present) ? static_cast<base_func*> \
41835 (new func_##N##param) : \
41836 static_cast<base_func*> \
41837 (new func_##N##param_retval) ; \
41851 inline void remove(
const std::string& name,
const std::size_t& arg_count)
41856 const typename std::map<std::string,expression_t>::iterator em_itr = expr_map_.find(name);
41858 if (expr_map_.end() != em_itr)
41860 expr_map_.erase(em_itr);
41863 const typename funcparam_t::iterator fp_itr = fp_map_[arg_count].find(name);
41865 if (fp_map_[arg_count].end() != fp_itr)
41867 delete fp_itr->second;
41868 fp_map_[arg_count].erase(fp_itr);
41871 symbol_table_.remove_function(name);
41888 #if defined(_MSC_VER) || defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
41892 # ifndef WIN32_LEAN_AND_MEAN
41893 # define WIN32_LEAN_AND_MEAN
41895 # include <windows.h>
41899 # include <sys/time.h>
41900 # include <sys/types.h>
41909 #if defined(_MSC_VER) || defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
41915 QueryPerformanceFrequency(&clock_frequency_);
41918 inline void start()
41930 inline double time()
const
41991 #if defined(_MSC_VER) || defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
41994 LARGE_INTEGER clock_frequency_;
42001 template <
typename T>
42014 #ifndef exprtk_disable_rtl_io
42017 namespace rtl {
namespace io {
namespace details
42019 template <
typename T>
42024 #if defined(__clang__)
42025 #pragma clang diagnostic push
42026 #pragma clang diagnostic ignored "-Wformat-nonliteral"
42027 #elif defined(__GNUC__) || defined(__GNUG__)
42028 #pragma GCC diagnostic push
42029 #pragma GCC diagnostic ignored "-Wformat-nonliteral"
42030 #elif defined(_MSC_VER)
42033 printf(fmt.c_str(), v);
42035 #if defined(__clang__)
42036 #pragma clang diagnostic pop
42037 #elif defined(__GNUC__) || defined(__GNUG__)
42038 #pragma GCC diagnostic pop
42039 #elif defined(_MSC_VER)
42043 template <
typename T>
42055 for (std::size_t i = 0; i < parameters.
size(); ++i)
42070 default :
continue;
42082 for (std::size_t i = 0; i < v.
size(); ++i)
42086 if ((i + 1) < v.
size())
42093 printf(
"%s",
to_str(s).c_str());
42099 template <
typename T>
42106 explicit print(
const std::string& scalar_format =
"%10.5f")
42107 : scalar_format_(scalar_format)
42121 template <
typename T>
42128 explicit println(
const std::string& scalar_format =
"%10.5f")
42129 : scalar_format_(scalar_format)
42141 std::string scalar_format_;
42144 template <
typename T>
42152 #define exprtk_register_function(FunctionName, FunctionType) \
42153 if (!symtab.add_function(FunctionName,FunctionType)) \
42156 "exprtk::rtl::io::register_package - Failed to add function: %s\n", \
42163 #undef exprtk_register_function
42174 #ifndef exprtk_disable_rtl_io_file
42178 namespace rtl {
namespace io {
namespace file {
namespace details
42207 std::ifstream* stream =
new std::ifstream(
file_name.c_str(),std::ios::binary);
42223 std::ofstream* stream =
new std::ofstream(
file_name.c_str(),std::ios::binary);
42239 std::fstream* stream =
new std::fstream(
file_name.c_str(),std::ios::binary);
42257 template <
typename Stream,
typename Ptr>
42260 Stream* stream =
reinterpret_cast<Stream*
>(p);
42263 p =
reinterpret_cast<Ptr
>(0);
42279 default :
return false;
42285 template <
typename View>
42286 bool write(
const View& view,
const std::size_t amount,
const std::size_t offset = 0)
42291 write(
reinterpret_cast<char_cptr>(view.begin() + offset), amount *
sizeof(
typename View::value_t));
42295 write(
reinterpret_cast<char_cptr>(view.begin() + offset) , amount *
sizeof(
typename View::value_t));
42298 default :
return false;
42304 template <
typename View>
42305 bool read(View& view,
const std::size_t amount,
const std::size_t offset = 0)
42310 read(
reinterpret_cast<char_ptr>(view.begin() + offset), amount *
sizeof(
typename View::value_t));
42314 read(
reinterpret_cast<char_ptr>(view.begin() + offset) , amount *
sizeof(
typename View::value_t));
42317 default :
return false;
42327 case e_read :
return (!!std::getline(*
reinterpret_cast<std::ifstream*
>(
stream_ptr),s));
42328 case e_rdwrt :
return (!!std::getline(*
reinterpret_cast<std::fstream*
>(
stream_ptr),s));
42329 default :
return false;
42340 default :
return true;
42346 if (access.empty() || access.size() > 2)
42349 std::size_t w_cnt = 0;
42350 std::size_t r_cnt = 0;
42352 for (std::size_t i = 0; i < access.size(); ++i)
42354 switch (std::tolower(access[i]))
42356 case 'r' : r_cnt++;
break;
42357 case 'w' : w_cnt++;
break;
42362 if ((0 == r_cnt) && (0 == w_cnt))
42364 else if ((r_cnt > 1) || (w_cnt > 1))
42366 else if ((1 == r_cnt) && (1 == w_cnt))
42368 else if (1 == r_cnt)
42375 template <
typename T>
42381 std::memcpy(
reinterpret_cast<char_ptr >(&fd),
42387 template <
typename T>
42391 #pragma warning(push)
42392 #pragma warning(disable: 4127)
42394 if (
sizeof(T) <
sizeof(
void*))
42396 throw std::runtime_error(
"exprtk::rtl::io::file - Error - pointer size larger than holder.");
42399 #pragma warning(pop)
42401 assert(
sizeof(T) <=
sizeof(
void*));
42406 template <
typename T>
42416 using igfun_t::operator();
42420 { details::perform_check<T>(); }
42426 if (file_name.empty())
42429 if ((1 == ps_index) && (0 ==
string_t(parameters[1]).
size()))
42434 const std::string access =
42445 std::memcpy(
reinterpret_cast<char*
>(&
t ),
42446 reinterpret_cast<char*
>(&fd),
42458 template <
typename T>
42465 { details::perform_check<T>(); }
42480 template <
typename T>
42492 using igfun_t::operator();
42496 { details::perform_check<T>(); }
42505 const string_t buffer(parameters[1]);
42506 const std::size_t amount = buffer.
size();
42507 return T(fd->
write(buffer, amount) ? 1 : 0);
42511 const string_t buffer(parameters[1]);
42512 const std::size_t amount =
42514 static_cast<std::size_t
>(
scalar_t(parameters[2])()));
42515 return T(fd->
write(buffer, amount) ? 1 : 0);
42519 const vector_t vec(parameters[1]);
42520 const std::size_t amount = vec.
size();
42521 return T(fd->
write(vec, amount) ? 1 : 0);
42525 const vector_t vec(parameters[1]);
42526 const std::size_t amount =
42528 static_cast<std::size_t
>(
scalar_t(parameters[2])()));
42529 return T(fd->
write(vec, amount) ? 1 : 0);
42537 template <
typename T>
42549 using igfun_t::operator();
42553 { details::perform_check<T>(); }
42563 const std::size_t amount = buffer.
size();
42564 return T(fd->
read(buffer,amount) ? 1 : 0);
42569 const std::size_t amount =
42571 static_cast<std::size_t
>(
scalar_t(parameters[2])()));
42572 return T(fd->
read(buffer,amount) ? 1 : 0);
42577 const std::size_t amount = vec.
size();
42578 return T(fd->
read(vec,amount) ? 1 : 0);
42583 const std::size_t amount =
42585 static_cast<std::size_t
>(
scalar_t(parameters[2])()));
42586 return T(fd->
read(vec,amount) ? 1 : 0);
42594 template <
typename T>
42605 using igfun_t::operator();
42609 { details::perform_check<T>(); }
42614 return T(fd->
getline(result) ? 1 : 0);
42618 template <
typename T>
42625 { details::perform_check<T>(); }
42631 return (fd->
eof() ? T(1) : T(0));
42635 template <
typename T>
42647 #define exprtk_register_function(FunctionName, FunctionType) \
42648 if (!symtab.add_function(FunctionName,FunctionType)) \
42651 "exprtk::rtl::io::file::register_package - Failed to add function: %s\n", \
42662 #undef exprtk_register_function
42674 #ifndef exprtk_disable_rtl_vecops
42677 namespace rtl {
namespace vecops {
42681 template <
typename Vector>
42682 inline bool invalid_range(
const Vector& v,
const std::size_t r0,
const std::size_t r1)
42684 if (r0 > (v.size() - 1))
42686 else if (r1 > (v.size() - 1))
42694 template <
typename T>
42704 std::size_t& r0, std::size_t& r1,
42705 const std::size_t& r0_prmidx,
42706 const std::size_t& r1_prmidx,
42707 const std::size_t vec_idx = 0)
42709 if (r0_prmidx >= parameters.
size())
42712 if (r1_prmidx >= parameters.
size())
42715 if (!
scalar_t(parameters[r0_prmidx]).to_uint(r0))
42718 if (!
scalar_t(parameters[r1_prmidx]).to_uint(r1))
42728 template <
typename T>
42731 const T
x = v - error;
42732 const T y = sum +
x;
42733 error = (y - sum) -
x;
42739 template <
typename T>
42749 using igfun_t::operator();
42762 const vector_t vec(parameters[0]);
42764 std::size_t r0 = 0;
42765 std::size_t r1 = vec.
size() - 1;
42772 return std::numeric_limits<T>::quiet_NaN();
42775 for (std::size_t i = r0; i <= r1; ++i)
42777 if (vec[i] == T(0))
42787 template <
typename T>
42797 using igfun_t::operator();
42810 const vector_t vec(parameters[0]);
42812 std::size_t r0 = 0;
42813 std::size_t r1 = vec.
size() - 1;
42820 return std::numeric_limits<T>::quiet_NaN();
42823 for (std::size_t i = r0; i <= r1; ++i)
42825 if (vec[i] != T(0))
42835 template <
typename T>
42845 using igfun_t::operator();
42858 const vector_t vec(parameters[0]);
42860 std::size_t r0 = 0;
42861 std::size_t r1 = vec.
size() - 1;
42868 return std::numeric_limits<T>::quiet_NaN();
42871 for (std::size_t i = r0; i <= r1; ++i)
42873 if (vec[i] != T(0))
42883 template <
typename T>
42893 using igfun_t::operator();
42906 const vector_t vec(parameters[0]);
42908 std::size_t r0 = 0;
42909 std::size_t r1 = vec.
size() - 1;
42916 return std::numeric_limits<T>::quiet_NaN();
42919 for (std::size_t i = r0; i <= r1; ++i)
42921 if (vec[i] == T(0))
42931 template <
typename T>
42941 using igfun_t::operator();
42954 const vector_t vec(parameters[0]);
42956 std::size_t r0 = 0;
42957 std::size_t r1 = vec.
size() - 1;
42964 return std::numeric_limits<T>::quiet_NaN();
42967 std::size_t cnt = 0;
42969 for (std::size_t i = r0; i <= r1; ++i)
42971 if (vec[i] != T(0)) ++cnt;
42978 template <
typename T>
42989 using igfun_t::operator();
43003 vector_t y(parameters[(0 == ps_index) ? 1 : 3]);
43005 std::size_t xr0 = 0;
43006 std::size_t xr1 =
x.size() - 1;
43008 std::size_t yr0 = 0;
43009 std::size_t yr1 = y.
size() - 1;
43020 const std::size_t n =
std::min(xr1 - xr0 + 1, yr1 - yr0 + 1);
43024 x.begin() + xr0 + n,
43031 template <
typename T>
43042 using igfun_t::operator();
43058 std::size_t r0 = 0;
43059 std::size_t r1 = vec.
size() - 1;
43061 if (!
scalar_t(parameters[1]).to_uint(n))
43070 const std::size_t dist = r1 - r0 + 1;
43071 const std::size_t shift = n % dist;
43075 vec.
begin() + r0 + shift,
43076 vec.
begin() + r1 + 1);
43082 template <
typename T>
43093 using igfun_t::operator();
43109 std::size_t r0 = 0;
43110 std::size_t r1 = vec.
size() - 1;
43112 if (!
scalar_t(parameters[1]).to_uint(n))
43121 const std::size_t dist = r1 - r0 + 1;
43122 const std::size_t shift = (dist - (n % dist)) % dist;
43126 vec.
begin() + r0 + shift,
43127 vec.
begin() + r1 + 1);
43133 template <
typename T>
43144 using igfun_t::operator();
43160 std::size_t r0 = 0;
43161 std::size_t r1 = vec.
size() - 1;
43163 if (!
scalar_t(parameters[1]).to_uint(n))
43172 const std::size_t dist = r1 - r0 + 1;
43179 vec.
begin() + r0 + n,
43180 vec.
begin() + r1 + 1);
43182 for (std::size_t i = r1 - n + 1; i <= r1; ++i)
43191 template <
typename T>
43202 using igfun_t::operator();
43218 std::size_t r0 = 0;
43219 std::size_t r1 = vec.
size() - 1;
43221 if (!
scalar_t(parameters[1]).to_uint(n))
43230 const std::size_t dist = r1 - r0 + 1;
43235 const std::size_t shift = (dist - (n % dist)) % dist;
43239 vec.
begin() + r0 + shift,
43240 vec.
begin() + r1 + 1);
43242 for (std::size_t i = r0; i < r0 + n; ++i)
43251 template <
typename T>
43262 using igfun_t::operator();
43279 std::size_t r0 = 0;
43280 std::size_t r1 = vec.
size() - 1;
43287 bool ascending =
true;
43289 if ((2 == ps_index) || (3 == ps_index))
43302 vec.
begin() + r1 + 1,
43307 vec.
begin() + r1 + 1,
43308 std::greater<T>());
43314 template <
typename T>
43325 using igfun_t::operator();
43341 std::size_t r0 = 0;
43342 std::size_t r1 = vec.
size() - 1;
43344 if (!
scalar_t(parameters[1]).to_uint(n))
43349 return std::numeric_limits<T>::quiet_NaN();
43354 vec.
begin() + r0 + n ,
43355 vec.
begin() + r1 + 1);
43361 template <
typename T>
43372 using igfun_t::operator();
43388 const T assign_value =
scalar_t(parameters[1]);
43390 const std::size_t step_size = (2 != ps_index) ? 1 :
43391 static_cast<std::size_t
>(
scalar_t(parameters.back())());
43393 std::size_t r0 = 0;
43394 std::size_t r1 = vec.
size() - 1;
43397 ((ps_index == 1) || (ps_index == 2)) &&
43404 for (std::size_t i = r0; i <= r1; i += step_size)
43406 vec[i] = assign_value;
43413 template <
typename T>
43424 using igfun_t::operator();
43445 const T start_value = (ps_index <= 1) ?
43449 const T step_size = ((0 == ps_index) || (2 == ps_index)) ?
43453 std::size_t r0 = 0;
43454 std::size_t r1 = vec.
size() - 1;
43457 ((ps_index == 2) || (ps_index == 3)) &&
43464 for (std::size_t i = r0; i <= r1; ++i)
43466 vec[i] = start_value + ((i - r0) * step_size);
43473 template <
typename T>
43484 using igfun_t::operator();
43498 const vector_t vec(parameters[0]);
43500 const std::size_t stride = (2 != ps_index) ? 1 :
43501 static_cast<std::size_t
>(
scalar_t(parameters[3])());
43503 std::size_t r0 = 0;
43504 std::size_t r1 = vec.
size() - 1;
43507 ((1 == ps_index) || (2 == ps_index)) &&
43511 return std::numeric_limits<T>::quiet_NaN();
43517 for (std::size_t i = r0; i <= r1; i += stride)
43526 template <
typename T>
43537 using igfun_t::operator();
43554 std::size_t r0 = 0;
43558 return std::numeric_limits<T>::quiet_NaN();
43560 return std::numeric_limits<T>::quiet_NaN();
43562 const T a =
scalar_t(parameters[0])();
43564 for (std::size_t i = r0; i <= r1; ++i)
43566 y[i] = (a *
x[i]) + y[i];
43573 template <
typename T>
43584 using igfun_t::operator();
43601 std::size_t r0 = 0;
43605 return std::numeric_limits<T>::quiet_NaN();
43607 return std::numeric_limits<T>::quiet_NaN();
43609 const T a =
scalar_t(parameters[0])();
43610 const T b =
scalar_t(parameters[2])();
43612 for (std::size_t i = r0; i <= r1; ++i)
43614 y[i] = (a *
x[i]) + (b * y[i]);
43621 template <
typename T>
43632 using igfun_t::operator();
43650 std::size_t r0 = 0;
43654 return std::numeric_limits<T>::quiet_NaN();
43656 return std::numeric_limits<T>::quiet_NaN();
43658 return std::numeric_limits<T>::quiet_NaN();
43660 const T a =
scalar_t(parameters[0])();
43662 for (std::size_t i = r0; i <= r1; ++i)
43664 z[i] = (a *
x[i]) + y[i];
43671 template <
typename T>
43682 using igfun_t::operator();
43700 std::size_t r0 = 0;
43704 return std::numeric_limits<T>::quiet_NaN();
43706 return std::numeric_limits<T>::quiet_NaN();
43708 return std::numeric_limits<T>::quiet_NaN();
43710 const T a =
scalar_t(parameters[0])();
43711 const T b =
scalar_t(parameters[2])();
43713 for (std::size_t i = r0; i <= r1; ++i)
43715 z[i] = (a *
x[i]) + (b * y[i]);
43722 template <
typename T>
43733 using igfun_t::operator();
43750 std::size_t r0 = 0;
43754 return std::numeric_limits<T>::quiet_NaN();
43756 return std::numeric_limits<T>::quiet_NaN();
43758 const T a =
scalar_t(parameters[0])();
43759 const T b =
scalar_t(parameters[2])();
43761 const std::size_t s =
static_cast<std::size_t
>(
scalar_t(parameters[3])());
43763 for (std::size_t i = r0; i <= r1; ++i)
43765 y[i] = (a *
x[i]) + (b * y[i + s]);
43772 template <
typename T>
43783 using igfun_t::operator();
43801 std::size_t r0 = 0;
43805 return std::numeric_limits<T>::quiet_NaN();
43807 return std::numeric_limits<T>::quiet_NaN();
43809 return std::numeric_limits<T>::quiet_NaN();
43811 const T a =
scalar_t(parameters[0])();
43812 const T b =
scalar_t(parameters[2])();
43814 const std::size_t s =
static_cast<std::size_t
>(
scalar_t(parameters[3])());
43816 for (std::size_t i = r0; i <= r1; ++i)
43818 z[i] = (a *
x[i]) + (b * y[i + s]);
43825 template <
typename T>
43836 using igfun_t::operator();
43853 std::size_t r0 = 0;
43854 std::size_t r1 =
x.size() - 1;
43857 return std::numeric_limits<T>::quiet_NaN();
43859 return std::numeric_limits<T>::quiet_NaN();
43861 const T a =
scalar_t(parameters[0])();
43862 const T b =
scalar_t(parameters[2])();
43864 for (std::size_t i = r0; i <= r1; ++i)
43866 z[i] = (a *
x[i]) + b;
43873 template <
typename T>
43884 using igfun_t::operator();
43901 const std::size_t r0 = 0;
43904 const std::size_t stride = (1 != ps_index) ? 1 :
43907 for (std::size_t i = 0; i < stride; ++i)
43909 y[i] = std::numeric_limits<T>::quiet_NaN();
43912 for (std::size_t i = (r0 + stride); i <= r1; ++i)
43914 y[i] =
x[i] -
x[i - stride];
43921 template <
typename T>
43932 using igfun_t::operator();
43948 std::size_t r0 = 0;
43952 return std::numeric_limits<T>::quiet_NaN();
43954 return std::numeric_limits<T>::quiet_NaN();
43958 for (std::size_t i = r0; i <= r1; ++i)
43960 result += (
x[i] * y[i]);
43967 template <
typename T>
43978 using igfun_t::operator();
43994 std::size_t r0 = 0;
43998 return std::numeric_limits<T>::quiet_NaN();
44000 return std::numeric_limits<T>::quiet_NaN();
44005 for (std::size_t i = r0; i <= r1; ++i)
44014 template <
typename T>
44025 using igfun_t::operator();
44044 const T threshold_value = (0 == ps_index) ?
44048 const T snap_value =
scalar_t(parameters.back());
44050 std::size_t r0 = 0;
44051 std::size_t r1 = vec.
size() - 1;
44061 for (std::size_t i = r0; i <= r1; ++i)
44063 if (vec[i] < threshold_value)
44065 vec[i] = snap_value;
44073 template <
typename T>
44084 using igfun_t::operator();
44103 const T threshold_value = (0 == ps_index) ?
44107 const T snap_value =
scalar_t(parameters.back());
44109 std::size_t r0 = 0;
44110 std::size_t r1 = vec.
size() - 1;
44120 for (std::size_t i = r0; i <= r1; ++i)
44122 if (vec[i] > threshold_value)
44124 vec[i] = snap_value;
44132 template <
typename T>
44165 #define exprtk_register_function(FunctionName, FunctionType) \
44166 if (!symtab.add_function(FunctionName,FunctionType)) \
44169 "exprtk::rtl::vecops::register_package - Failed to add function: %s\n", \
44203 #undef exprtk_register_function
44216 namespace information
44222 "49775724709369995957496696762772407"
44223 "66303535475945713821785251664274274"
44224 "66391932003059921817413596629043572";
44230 static const std::string info_str = std::string(
library) +
44231 std::string(
" v") + std::string(
version) +
44232 std::string(
" (") +
date + std::string(
")") +
44233 std::string(
" (") +
min_cpp + std::string(
")");
44239 #ifdef exprtk_debug
44240 #undef exprtk_debug
44243 #ifdef exprtk_error_location
44244 #undef exprtk_error_location
44247 #ifdef exprtk_fallthrough
44248 #undef exprtk_fallthrough
44251 #ifdef exprtk_override
44252 #undef exprtk_override
44255 #ifdef exprtk_final
44256 #undef exprtk_final
44259 #ifdef exprtk_delete
44260 #undef exprtk_delete
#define basic_opr_switch_statements
Definition: Exprtk.hpp:33277
#define register_binary_op(Op, BinaryFunctor)
#define define_sfop4(NN, OP0, OP1)
#define exprtk_final
Definition: Exprtk.hpp:78
#define case_stmt(N)
Definition: Exprtk.hpp:31352
#define exprtk_register_function(FunctionName, FunctionType)
#define exprtk_process_digit
#define register_unary_op(Op, UnaryFunctor)
#define exprtk_define_unary_function(FunctionName)
Definition: Exprtk.hpp:1631
#define register_synthezier(S)
#define exprtk_define_process(Type)
Definition: Exprtk.hpp:19299
#define empty_method_body(N)
Definition: Exprtk.hpp:18873
#define exprtk_crtype(Type)
Definition: Exprtk.hpp:16318
#define poly_rtrn(NN)
Definition: Exprtk.hpp:40917
#define igeneric_function_empty_body(N)
Definition: Exprtk.hpp:18996
#define register_sf4ext(Op)
#define exprtk_register_int_type_tag(T)
Definition: Exprtk.hpp:837
#define def_fp_retval(N)
Definition: Exprtk.hpp:41520
#define extended_opr_switch_statements
Definition: Exprtk.hpp:33285
#define exprtk_override
Definition: Exprtk.hpp:77
#define exprtk_debug(params)
Definition: Exprtk.hpp:66
#define exprtk_error_location
Definition: Exprtk.hpp:69
#define string_opr_switch_statements
Definition: Exprtk.hpp:39190
#define register_op(Symbol, Type, Args)
#define exprtk_assign(Index)
Definition: Exprtk.hpp:41180
#define exprtk_define_freefunction(NN)
Definition: Exprtk.hpp:20185
#define unary_opr_switch_statements
Definition: Exprtk.hpp:31506
#define register_sf3_extid(Id, Op)
#define exprtk_fallthrough
Definition: Exprtk.hpp:85
#define token_inserter_empty_body
Definition: Exprtk.hpp:3249
#define batch_eqineq_logic_case
#define exprtk_delete
Definition: Exprtk.hpp:79
Definition: Exprtk.hpp:16115
virtual std::string type_id() const =0
virtual ~T0oT1oT2_base_node()
Definition: Exprtk.hpp:16118
Definition: Exprtk.hpp:16126
virtual std::string type_id() const =0
virtual ~T0oT1oT2oT3_base_node()
Definition: Exprtk.hpp:16129
Definition: Exprtk.hpp:6831
operator_type operation_
Definition: Exprtk.hpp:6891
T value() const exprtk_override
Definition: Exprtk.hpp:6846
binary_node(const operator_type &opr, expression_ptr branch0, expression_ptr branch1)
Definition: Exprtk.hpp:6837
bool valid() const exprtk_override
Definition: Exprtk.hpp:6872
std::size_t node_depth() const exprtk_final
Definition: Exprtk.hpp:6884
expression_node< T > * branch(const std::size_t &index=0) const exprtk_override
Definition: Exprtk.hpp:6866
expression_node< T >::node_type type() const exprtk_override
Definition: Exprtk.hpp:6856
operator_type operation()
Definition: Exprtk.hpp:6861
expression_node< T > * expression_ptr
Definition: Exprtk.hpp:6834
void collect_nodes(typename expression_node< T >::noderef_list_t &node_delete_list) exprtk_override
Definition: Exprtk.hpp:6879
std::pair< expression_ptr, bool > branch_t
Definition: Exprtk.hpp:6835
Definition: Exprtk.hpp:16051
virtual ~boc_base_node()
Definition: Exprtk.hpp:16054
virtual operator_type operation() const
Definition: Exprtk.hpp:16057
virtual void set_c(const T)=0
virtual expression_node< T > * move_branch(const std::size_t &index)=0
virtual const T c() const =0
Definition: Exprtk.hpp:16020
virtual const T & v() const =0
virtual ~bov_base_node()
Definition: Exprtk.hpp:16023
Definition: Exprtk.hpp:7193
T value
Definition: Exprtk.hpp:7200
break_exception(const T &v)
Definition: Exprtk.hpp:7196
Definition: Exprtk.hpp:394
build_string & operator<<(const std::string &s)
Definition: Exprtk.hpp:402
build_string(const std::size_t &initial_size=64)
Definition: Exprtk.hpp:397
std::string as_string() const
Definition: Exprtk.hpp:419
std::string data_
Definition: Exprtk.hpp:426
Definition: Exprtk.hpp:16031
virtual const T c() const =0
virtual expression_node< T > * move_branch(const std::size_t &index)=0
virtual ~cob_base_node()
Definition: Exprtk.hpp:16034
virtual operator_type operation() const
Definition: Exprtk.hpp:16037
virtual void set_c(const T)=0
Definition: Exprtk.hpp:7203
Definition: Exprtk.hpp:15973
virtual const T c() const =0
virtual const T & v() const =0
virtual operator_type operation() const
Definition: Exprtk.hpp:15979
virtual ~cov_base_node()
Definition: Exprtk.hpp:15976
Definition: Exprtk.hpp:5465
virtual T value() const
Definition: Exprtk.hpp:5519
virtual node_type type() const
Definition: Exprtk.hpp:5529
nci_t::noderef_list_t noderef_list_t
Definition: Exprtk.hpp:5513
node_type
Definition: Exprtk.hpp:5469
@ e_bov
Definition: Exprtk.hpp:5495
@ e_constant
Definition: Exprtk.hpp:5470
@ e_cstringvarrng
Definition: Exprtk.hpp:5475
@ e_rbvecelem
Definition: Exprtk.hpp:5502
@ e_cot
Definition: Exprtk.hpp:5491
@ e_exp
Definition: Exprtk.hpp:5487
@ e_nor
Definition: Exprtk.hpp:5482
@ e_covocov
Definition: Exprtk.hpp:5499
@ e_veccelem
Definition: Exprtk.hpp:5501
@ e_frac
Definition: Exprtk.hpp:5494
@ e_abs
Definition: Exprtk.hpp:5484
@ e_for
Definition: Exprtk.hpp:5473
@ e_log10
Definition: Exprtk.hpp:5488
@ e_ilike
Definition: Exprtk.hpp:5483
@ e_rbveccelem
Definition: Exprtk.hpp:5503
@ e_erf
Definition: Exprtk.hpp:5493
@ e_function
Definition: Exprtk.hpp:5477
@ e_vecfunc
Definition: Exprtk.hpp:5504
@ e_covoc
Definition: Exprtk.hpp:5497
@ e_binary
Definition: Exprtk.hpp:5471
@ e_d2g
Definition: Exprtk.hpp:5492
@ e_valvecineq
Definition: Exprtk.hpp:5505
@ e_pos
Definition: Exprtk.hpp:5489
@ e_boc
Definition: Exprtk.hpp:5496
@ e_add
Definition: Exprtk.hpp:5478
@ e_gt
Definition: Exprtk.hpp:5480
@ e_and
Definition: Exprtk.hpp:5481
@ e_acosh
Definition: Exprtk.hpp:5485
@ e_atanh
Definition: Exprtk.hpp:5486
@ e_conditional
Definition: Exprtk.hpp:5472
@ e_stringsize
Definition: Exprtk.hpp:5476
@ e_retenv
Definition: Exprtk.hpp:5474
@ e_covovov
Definition: Exprtk.hpp:5498
@ e_sinh
Definition: Exprtk.hpp:5490
@ e_div
Definition: Exprtk.hpp:5479
@ e_break
Definition: Exprtk.hpp:5507
@ e_valvecarith
Definition: Exprtk.hpp:5506
@ e_nulleq
Definition: Exprtk.hpp:5500
expression_node< T > * expression_ptr
Definition: Exprtk.hpp:5511
node_depth_base< expression_node< T > > ndb_t
Definition: Exprtk.hpp:5514
node_collector_interface< expression_node< T > > nci_t
Definition: Exprtk.hpp:5512
virtual bool valid() const
Definition: Exprtk.hpp:5534
virtual expression_node< T > * branch(const std::size_t &index=0) const
Definition: Exprtk.hpp:5524
T value_type
Definition: Exprtk.hpp:5510
virtual ~expression_node()
Definition: Exprtk.hpp:5516
Definition: Exprtk.hpp:6511
std::size_t base_size() const exprtk_override
Definition: Exprtk.hpp:8414
assignment_string_range_node(const operator_type &opr, expression_ptr branch0, expression_ptr branch1)
Definition: Exprtk.hpp:10545
swap_generic_node(expression_ptr var0, expression_ptr var1)
Definition: Exprtk.hpp:9377
while_loop_node< T > parent_t
Definition: Exprtk.hpp:7377
ufunc_t u0()
Definition: Exprtk.hpp:16215
ProcessMode process_mode_t
Definition: Exprtk.hpp:16626
functor_t::ufunc_t ufunc_t
Definition: Exprtk.hpp:16183
~conditional_vector_node()
Definition: Exprtk.hpp:13584
const std::size_t max_vector_index_
Definition: Exprtk.hpp:8756
const T & v_
Definition: Exprtk.hpp:16172
static expression_node< T > * allocate(Allocator &allocator, T0 p0, T1 p1, T2 p2)
Definition: Exprtk.hpp:16959
results_context_t * results_context_
Definition: Exprtk.hpp:14663
std::string & s1()
Definition: Exprtk.hpp:17634
static T process_3(const Sequence &arg_list)
Definition: Exprtk.hpp:15138
ipow_node< T, PowOp > & operator=(const ipow_node< T, PowOp > &) exprtk_delete
assignment_vecvec_node(const operator_type &opr, expression_ptr branch0, expression_ptr branch1)
Definition: Exprtk.hpp:11987
vector_elem_rtc_node(expression_ptr vec_node, expression_ptr index, vector_holder_ptr vec_holder, vector_access_runtime_check_ptr vec_rt_chk)
Definition: Exprtk.hpp:8665
range_t & range_ref()
Definition: Exprtk.hpp:10925
bool initialised_
Definition: Exprtk.hpp:9516
const T & v0() const exprtk_override
Definition: Exprtk.hpp:17227
variable_node< T > * variable_node_ptr
Definition: Exprtk.hpp:9345
unary_branch_node(expression_ptr branch)
Definition: Exprtk.hpp:16251
bov_node< T, Operation > & operator=(const bov_node< T, Operation > &) exprtk_delete
T0oT1oT2oT3(const node_type &) exprtk_delete
generic_string_range_node(expression_ptr str_branch, const range_t &brange)
Definition: Exprtk.hpp:9789
std::vector< branch_t > arg_list_
Definition: Exprtk.hpp:8092
range_t * range_ptr
Definition: Exprtk.hpp:9784
repeat_until_loop_bc_node< T > parent_t
Definition: Exprtk.hpp:7752
memory_context_t< T > memory_context
Definition: Exprtk.hpp:12837
bfunc_t f() const
Definition: Exprtk.hpp:16592
vec_binop_valvec_node(const operator_type &opr, expression_ptr branch0, expression_ptr branch1)
Definition: Exprtk.hpp:13208
str_vararg_node(const Sequence< expression_ptr, Allocator > &arg_list)
Definition: Exprtk.hpp:10978
ivariable_ptr var1_
Definition: Exprtk.hpp:9397
for_loop_rtc_node(expression_ptr initialiser, expression_ptr condition, expression_ptr incrementor, expression_ptr loop_body, loop_runtime_check_ptr loop_rt_chk)
Definition: Exprtk.hpp:7586
const T c() const exprtk_override
Definition: Exprtk.hpp:17277
variable_node_ptr var0_
Definition: Exprtk.hpp:9365
bool * retinvk_ptr()
Definition: Exprtk.hpp:14710
RangePack rp1_
Definition: Exprtk.hpp:17776
T0oT1oT2oT3_sf4(const node_type &) exprtk_delete
bipow_node< T, PowOp > & operator=(const bipow_node< T, PowOp > &) exprtk_delete
ipowinv_node< T, PowOp > & operator=(const ipowinv_node< T, PowOp > &) exprtk_delete
rebasevector_celem_node(expression_ptr vec_node, const std::size_t index, vector_holder_ptr vec_holder)
Definition: Exprtk.hpp:8955
assignment_rebasevec_elem_node(const operator_type &opr, expression_ptr branch0, expression_ptr branch1)
Definition: Exprtk.hpp:11733
expression_node< T >::node_type type() const exprtk_override
Definition: Exprtk.hpp:6519
T0oT1oT2< T, T0, T1, T2, ProcessMode > node_type
Definition: Exprtk.hpp:16625
cov_node< T, Operation > & operator=(const cov_node< T, Operation > &) exprtk_delete
const T & v1()
Definition: Exprtk.hpp:16210
static T process_7(const Sequence &arg_list)
Definition: Exprtk.hpp:15669
for_loop_node< T > parent_t
Definition: Exprtk.hpp:7583
T0oT1oT2oT3(T0 p0, T1 p1, T2 p2, T3 p3, bfunc_t p4, bfunc_t p5, bfunc_t p6)
Definition: Exprtk.hpp:16722
bfunc_t f2() const
Definition: Exprtk.hpp:16767
~vec_binop_vecval_node()
Definition: Exprtk.hpp:13080
ivariable< T > * ivariable_ptr
Definition: Exprtk.hpp:9375
T0 t0() const exprtk_override
Definition: Exprtk.hpp:16933
T0oT1(const T0oT1< T, T0, T1 > &) exprtk_delete
cob_node(const cob_node< T, Operation > &) exprtk_delete
virtual const std::string & ref() const
Definition: Exprtk.hpp:9674
bool init_branches(expression_ptr(&b)[NumBranches])
Definition: Exprtk.hpp:13762
stringvar_size_node(std::string &v)
Definition: Exprtk.hpp:10316
uvouv_node(const T &var0, const T &var1, ufunc_t uf0, ufunc_t uf1, bfunc_t bf)
Definition: Exprtk.hpp:16186
swap_string_node(expression_ptr branch0, expression_ptr branch1)
Definition: Exprtk.hpp:10073
vector_node_ptr vec() exprtk_override
Definition: Exprtk.hpp:8394
results_context< T > results_context_t
Definition: Exprtk.hpp:14622
rebasevector_elem_node< T > * rbvec_node_ptr_
Definition: Exprtk.hpp:11762
unary_variable_node< T, Operation > & operator=(const unary_variable_node< T, Operation > &) exprtk_delete
static expression_node< T > * allocate(Allocator &allocator, T0 p0, T1 p1, T2 p2, tfunc_t p3)
Definition: Exprtk.hpp:16870
string_size_node(expression_ptr branch)
Definition: Exprtk.hpp:10347
vov_node(const vov_node< T, Operation > &) exprtk_delete
std::vector< T > value_list_
Definition: Exprtk.hpp:14170
vector_holder_t & vec_holder()
Definition: Exprtk.hpp:8429
static expression_node< T > * allocate(Allocator &allocator, T0 p0, T1 p1, T2 p2, T3 p3)
Definition: Exprtk.hpp:17136
branch_t branch_
Definition: Exprtk.hpp:6624
sf4_var_node(const T &v0, const T &v1, const T &v2, const T &v3)
Definition: Exprtk.hpp:11412
irange_ptr str0_range_ptr_
Definition: Exprtk.hpp:10049
assignment_rebasevec_elem_rtc_node(const operator_type &opr, expression_ptr branch0, expression_ptr branch1)
Definition: Exprtk.hpp:11773
ifunction * function_
Definition: Exprtk.hpp:14060
~str_xroxr_node()
Definition: Exprtk.hpp:17801
ufunc_t f()
Definition: Exprtk.hpp:16225
voc_node(const T &var, const T &const_var)
Definition: Exprtk.hpp:17307
T0oT1(T0 p0, T1 p1, const bfunc_t p2)
Definition: Exprtk.hpp:16560
sos_node(SType0 p0, SType1 p1)
Definition: Exprtk.hpp:17609
vector_node(vector_holder_t *vh)
Definition: Exprtk.hpp:8366
multi_switch_node(const Sequence< expression_ptr, Allocator > &arg_list)
Definition: Exprtk.hpp:8027
opr_base< T >::Type Type
Definition: Exprtk.hpp:15096
vararg_function_node(VarArgFunction *func, const std::vector< expression_ptr > &arg_list)
Definition: Exprtk.hpp:14112
ivariable_ptr var0_
Definition: Exprtk.hpp:9396
assignment_rebasevec_celem_node(const operator_type &opr, expression_ptr branch0, expression_ptr branch1)
Definition: Exprtk.hpp:11813
assignment_vec_elem_node(const operator_type &opr, expression_ptr branch0, expression_ptr branch1)
Definition: Exprtk.hpp:11653
T2 t2() const exprtk_override
Definition: Exprtk.hpp:16943
T * vector_base_
Definition: Exprtk.hpp:8568
char_cptr base() const
Definition: Exprtk.hpp:10915
const T & v() const exprtk_override
Definition: Exprtk.hpp:16162
T single_initialiser_value_
Definition: Exprtk.hpp:9336
T0 t0_
Definition: Exprtk.hpp:16612
operator_type operation() const exprtk_override
Definition: Exprtk.hpp:16157
std::string str() const
Definition: Exprtk.hpp:10910
boc_node(const expression_ptr branch, const T const_var)
Definition: Exprtk.hpp:17537
swap_vecvec_node(expression_ptr branch0, expression_ptr branch1)
Definition: Exprtk.hpp:9413
sos_node< T, SType0, SType1, Operation > & operator=(const sos_node< T, SType0, SType1, Operation > &) exprtk_delete
std::string str() const exprtk_override
Definition: Exprtk.hpp:6732
sf4_node(const operator_type &opr, expression_ptr branch0, expression_ptr branch1, expression_ptr branch2, expression_ptr branch3)
Definition: Exprtk.hpp:11353
str_base_ptr str0_base_ptr_
Definition: Exprtk.hpp:10047
assignment_rebasevec_elem_op_node(const operator_type &opr, expression_ptr branch0, expression_ptr branch1)
Definition: Exprtk.hpp:12313
rebasevector_elem_rtc_node< T > * rbvec_node_ptr_
Definition: Exprtk.hpp:11802
static T process_6(const Sequence &arg_list)
Definition: Exprtk.hpp:15658
bool valid() const exprtk_override
Definition: Exprtk.hpp:6606
std::string & s0()
Definition: Exprtk.hpp:17629
details::functor_t< T > functor_t
Definition: Exprtk.hpp:16181
IFunction ifunction
Definition: Exprtk.hpp:13753
unary_vector_node(const operator_type &opr, expression_ptr branch0)
Definition: Exprtk.hpp:13373
T0oT1oT2oT3_sf4< T, T0, T1, T2, T3 > node_type
Definition: Exprtk.hpp:16998
branch_t index_
Definition: Exprtk.hpp:8570
vector_holder_t & vec_holder() const
Definition: Exprtk.hpp:8434
static std::string id()
Definition: Exprtk.hpp:16682
std::vector< const T * > arg_list_
Definition: Exprtk.hpp:11552
vec_data_store< T > vds_t
Definition: Exprtk.hpp:8364
static T process_5(const Sequence &arg_list)
Definition: Exprtk.hpp:15152
node_type & operator=(const node_type &) exprtk_delete
vector_node_ptr vec() const exprtk_override
Definition: Exprtk.hpp:8389
std::size_t result_vec_size_
Definition: Exprtk.hpp:13686
cov_node(const T &const_var, const T &var)
Definition: Exprtk.hpp:17257
expression_node< T > * expression_ptr
Definition: Exprtk.hpp:6575
vector_assignment_node(T *vector_base, const std::size_t &size, const std::vector< expression_ptr > &initialiser_list, const bool single_value_initialse)
Definition: Exprtk.hpp:9224
const bool single_value_initialse_
Definition: Exprtk.hpp:9333
vectorize_node(const expression_ptr v)
Definition: Exprtk.hpp:11564
T3 t3() const
Definition: Exprtk.hpp:16752
repeat_until_loop_node< T > parent_t
Definition: Exprtk.hpp:7470
branch_t return_
Definition: Exprtk.hpp:7248
T0oT1oT2oT3_sf4(T0 p0, T1 p1, T2 p2, T3 p3, const qfunc_t p4)
Definition: Exprtk.hpp:17000
VarArgFunction * function_
Definition: Exprtk.hpp:14168
expression_ptr alternative_
Definition: Exprtk.hpp:10831
expression_node< T > * branch(const std::size_t &) const exprtk_override
Definition: Exprtk.hpp:6601
stringvar_node()
Definition: Exprtk.hpp:9533
rebasevector_celem_rtc_node< T > * rbvec_node_ptr_
Definition: Exprtk.hpp:12462
memory_context memory_context_
Definition: Exprtk.hpp:13025
static T null_value
Definition: Exprtk.hpp:8114
swap_genstrings_node(expression_ptr branch0, expression_ptr branch1)
Definition: Exprtk.hpp:10159
string_range_node(std::string &v, const range_t &rp)
Definition: Exprtk.hpp:9629
T2 t2() const
Definition: Exprtk.hpp:16662
std::string * value_
Definition: Exprtk.hpp:9610
function_N_node(ifunction *func)
Definition: Exprtk.hpp:13755
~generic_string_range_node()
Definition: Exprtk.hpp:9819
static T process_8(const Sequence &arg_list)
Definition: Exprtk.hpp:15681
ipowinv_node(const ipowinv_node< T, PowOp > &) exprtk_delete
static T process_4(const Sequence &arg_list)
Definition: Exprtk.hpp:15145
functor_t::tfunc_t tfunc_t
Definition: Exprtk.hpp:16812
assignment_vec_node(const operator_type &opr, expression_ptr branch0, expression_ptr branch1)
Definition: Exprtk.hpp:11858
variable_node()
Definition: Exprtk.hpp:8116
T0oT1oT2_sf3ext(const node_type &) exprtk_delete
Operation operation_t
Definition: Exprtk.hpp:16141
T0_ T0
Definition: Exprtk.hpp:16715
T0oT1< T, T0, T1 > node_type
Definition: Exprtk.hpp:16558
~vec_binop_vecvec_node()
Definition: Exprtk.hpp:12910
T0oT1oT2(T0 p0, T1 p1, T2 p2, const bfunc_t p3, const bfunc_t p4)
Definition: Exprtk.hpp:16628
vob_node< T, Operation > & operator=(const vob_node< T, Operation > &) exprtk_delete
static const std::string null_value
Definition: Exprtk.hpp:10310
static expression_node< T > * allocate(Allocator &allocator, T0 p0, T1 p1, bfunc_t p2)
Definition: Exprtk.hpp:16598
vec_binop_vecvec_node(const operator_type &opr, expression_ptr branch0, expression_ptr branch1)
Definition: Exprtk.hpp:12841
literal_node< T > & operator=(const literal_node< T > &) exprtk_delete
bov_node(const bov_node< T, Operation > &) exprtk_delete
T0oT1oT2(const node_type &) exprtk_delete
T2_ T2
Definition: Exprtk.hpp:16717
assignment_node(const operator_type &opr, expression_ptr branch0, expression_ptr branch1)
Definition: Exprtk.hpp:11615
return_envelope_node(expression_ptr body, results_context_t &rc)
Definition: Exprtk.hpp:14675
char_cptr base() const exprtk_override
Definition: Exprtk.hpp:6737
bipowinv_node< T, PowOp > & operator=(const bipowinv_node< T, PowOp > &) exprtk_delete
bool return_invoked_
Definition: Exprtk.hpp:14728
std::size_t size() const exprtk_override
Definition: Exprtk.hpp:6742
range_t range_
Definition: Exprtk.hpp:9906
T0 t0() const
Definition: Exprtk.hpp:16582
str_xoxr_node(const node_type &) exprtk_delete
literal_node(const literal_node< T > &) exprtk_delete
str_xrox_node< T, SType0, SType1, RangePack, Operation > node_type
Definition: Exprtk.hpp:17657
strvar_node_ptr str0_node_ptr_
Definition: Exprtk.hpp:10141
~const_string_range_node()
Definition: Exprtk.hpp:9718
bipow_node(const bipow_node< T, PowOp > &) exprtk_delete
SType2 s2_
Definition: Exprtk.hpp:18026
strvar_node_ptr str1_node_ptr_
Definition: Exprtk.hpp:10142
vector_assignment_node(const vector_assignment_node< T > &) exprtk_delete
ipow_node(const T &v)
Definition: Exprtk.hpp:18043
range_t & range_ref() exprtk_override
Definition: Exprtk.hpp:6747
str_rng_node_ptr str0_rng_node_ptr_
Definition: Exprtk.hpp:10662
T0oT1oT2_sf3ext(T0 p0, T1 p1, T2 p2)
Definition: Exprtk.hpp:16911
sf3_var_node< T, SpecialFunction > & operator=(const sf3_var_node< T, SpecialFunction > &) exprtk_delete
stringvar_node< T > * strvar_node_ptr
Definition: Exprtk.hpp:9781
str_sogens_node< T, Operation > & operator=(const str_sogens_node< T, Operation > &) exprtk_delete
vector_elem_rtc_node< T > * vec_node_ptr_
Definition: Exprtk.hpp:11722
void populate_value_list() const
Definition: Exprtk.hpp:14160
assignment_op_node(const operator_type &opr, expression_ptr branch0, expression_ptr branch1)
Definition: Exprtk.hpp:12153
static expression_node< T > * allocate(Allocator &allocator, T0 p0, T1 p1, T2 p2, T3 p3, qfunc_t p4)
Definition: Exprtk.hpp:17060
cob_node(const T const_var, const expression_ptr branch)
Definition: Exprtk.hpp:17465
ipow_node(const ipow_node< T, PowOp > &) exprtk_delete
const T & v0_
Definition: Exprtk.hpp:11400
T3_ T3
Definition: Exprtk.hpp:16718
swap_node(variable_node_ptr var0, variable_node_ptr var1)
Definition: Exprtk.hpp:9347
const range_t & range_ref() const
Definition: Exprtk.hpp:10930
static T process_1(const Sequence &arg_list)
Definition: Exprtk.hpp:15126
static std::string null_value
Definition: Exprtk.hpp:9531
T0oT1oT2_sf3(const node_type &) exprtk_delete
vector_holder< T > vector_holder_t
Definition: Exprtk.hpp:8362
~str_xrox_node()
Definition: Exprtk.hpp:17666
std::string & ref()
Definition: Exprtk.hpp:9574
T0oT1oT2oT3_sf4ext(const node_type &) exprtk_delete
str_xrox_node(SType0 p0, SType1 p1, RangePack rp0)
Definition: Exprtk.hpp:17660
vector_holder_t * vector_holder_
Definition: Exprtk.hpp:8441
bool equality_
Definition: Exprtk.hpp:6623
conditional_vector_node(expression_ptr condition, expression_ptr consequent, expression_ptr alternative)
Definition: Exprtk.hpp:13532
qfunc_t f() const
Definition: Exprtk.hpp:17044
T3 t3_
Definition: Exprtk.hpp:16800
scor_node(const operator_type &opr, expression_ptr branch0, expression_ptr branch1)
Definition: Exprtk.hpp:13726
T value() const exprtk_override
Definition: Exprtk.hpp:6514
while_loop_rtc_node(expression_ptr condition, expression_ptr loop_body, loop_runtime_check_ptr loop_rt_chk)
Definition: Exprtk.hpp:7380
range_interface< T > irange_t
Definition: Exprtk.hpp:9785
const ufunc_t u1_
Definition: Exprtk.hpp:16238
variable_node< T > * var_node_ptr_
Definition: Exprtk.hpp:11642
vds_t & vds() exprtk_override
Definition: Exprtk.hpp:8419
for_loop_bc_node< T > parent_t
Definition: Exprtk.hpp:7859
SType0 s0_
Definition: Exprtk.hpp:17641
multimode_strfunction_node(StringFunction *func, const std::size_t ¶m_seq_index, const std::vector< typename str_function_t::expression_ptr > &arg_list)
Definition: Exprtk.hpp:14556
branch_t consequent_
Definition: Exprtk.hpp:7131
vector_celem_rtc_node< T > * vec_node_ptr_
Definition: Exprtk.hpp:12302
unary_branch_node(const unary_branch_node< T, Operation > &) exprtk_delete
sf3_var_node(const sf3_var_node< T, SpecialFunction > &) exprtk_delete
unary_variable_node(const T &var)
Definition: Exprtk.hpp:16143
vector_elem_node(expression_ptr vec_node, expression_ptr index, vector_holder_ptr vec_holder)
Definition: Exprtk.hpp:8501
vector_node_ptr alternative_node_ptr_
Definition: Exprtk.hpp:13682
branch_t vector_node_
Definition: Exprtk.hpp:8569
const bfunc_t f_
Definition: Exprtk.hpp:16239
vector_size_node(vector_holder_t *vh)
Definition: Exprtk.hpp:8454
binary_ext_node(expression_ptr branch0, expression_ptr branch1)
Definition: Exprtk.hpp:6903
virtual ~string_range_node()
Definition: Exprtk.hpp:9634
vector_node< T > * vector_node_ptr
Definition: Exprtk.hpp:8363
str_xroxr_node(const node_type &) exprtk_delete
static T process_2(const Sequence &arg_list)
Definition: Exprtk.hpp:15132
const_string_range_node< T > & operator=(const const_string_range_node< T > &) exprtk_delete
~str_xoxr_node()
Definition: Exprtk.hpp:17730
string_literal_node(const std::string &v)
Definition: Exprtk.hpp:6708
bool src_is_ivec_
Definition: Exprtk.hpp:12141
cons_conditional_node(expression_ptr condition, expression_ptr consequent)
Definition: Exprtk.hpp:7144
sos_node(const sos_node< T, SType0, SType1, Operation > &) exprtk_delete
const_string_range_node(const std::string &v, const range_t &rp)
Definition: Exprtk.hpp:9713
vector_access_runtime_check_ptr vec_rt_chk_
Definition: Exprtk.hpp:8755
const std::string value_
Definition: Exprtk.hpp:6762
string_function_node< T, StringFunction > str_function_t
Definition: Exprtk.hpp:14553
rebasevector_elem_rtc_node(expression_ptr vec_node, expression_ptr index, vector_holder_ptr vec_holder, vector_access_runtime_check_ptr vec_rt_chk)
Definition: Exprtk.hpp:9028
while_loop_bc_node< T > parent_t
Definition: Exprtk.hpp:7671
uvouv_node< T > & operator=(const uvouv_node< T > &) exprtk_delete
ufunc_t u1()
Definition: Exprtk.hpp:16220
range_interface< T >::range_t range_t
Definition: Exprtk.hpp:9529
bipow_node(expression_ptr branch)
Definition: Exprtk.hpp:18074
assignment_string_node(const operator_type &opr, expression_ptr branch0, expression_ptr branch1)
Definition: Exprtk.hpp:10422
cob_node< T, Operation > & operator=(const cob_node< T, Operation > &) exprtk_delete
rebasevector_elem_node(expression_ptr vec_node, expression_ptr index, vector_holder_ptr vec_holder)
Definition: Exprtk.hpp:8873
literal_node(const T &v)
Definition: Exprtk.hpp:6632
voc_node(const voc_node< T, Operation > &) exprtk_delete
bov_node(const expression_ptr branch, const T &var)
Definition: Exprtk.hpp:17409
~unary_vector_node()
Definition: Exprtk.hpp:13407
vov_node(const T &var0, const T &var1)
Definition: Exprtk.hpp:17207
const std::string & ref() const
Definition: Exprtk.hpp:9579
~vector_node()
Definition: Exprtk.hpp:8378
assignment_vec_elem_op_rtc_node(const operator_type &opr, expression_ptr branch0, expression_ptr branch1)
Definition: Exprtk.hpp:12233
static T process(const Sequence< Type, Allocator > &arg_list)
Definition: Exprtk.hpp:15101
expression_node< T > * move_branch(const std::size_t &) exprtk_override
Definition: Exprtk.hpp:17502
const T & v2_
Definition: Exprtk.hpp:11402
sosos_node(SType0 p0, SType1 p1, SType2 p2)
Definition: Exprtk.hpp:17986
branch_t body_
Definition: Exprtk.hpp:14729
irange_ptr str_range_ptr_
Definition: Exprtk.hpp:9904
vararg_varnode(const Sequence< expression_ptr, Allocator > &arg_list)
Definition: Exprtk.hpp:11512
expression_node< T > * branch(const std::size_t &index=0) const exprtk_override
Definition: Exprtk.hpp:6926
vector_node< T > * vec_node_ptr_
Definition: Exprtk.hpp:11970
T * value_
Definition: Exprtk.hpp:8151
bipowinv_node(expression_ptr branch)
Definition: Exprtk.hpp:18152
irange_ptr str1_range_ptr_
Definition: Exprtk.hpp:10050
vov_node< T, Operation > & operator=(const vov_node< T, Operation > &) exprtk_delete
SType1 s1_
Definition: Exprtk.hpp:17642
ipowinv_node(const T &v)
Definition: Exprtk.hpp:18121
std::vector< expression_ptr > arg_list_
Definition: Exprtk.hpp:14169
swap_genstrings_node(const swap_genstrings_node< T > &) exprtk_delete
T & ref() exprtk_override
Definition: Exprtk.hpp:8134
generic_function_node< T, igeneric_function_t > gen_function_t
Definition: Exprtk.hpp:14625
operator_type operation()
Definition: Exprtk.hpp:6921
str_xrox_node(const node_type &) exprtk_delete
unary_variable_node(const unary_variable_node< T, Operation > &) exprtk_delete
conditional_string_node(expression_ptr condition, expression_ptr consequent, expression_ptr alternative)
Definition: Exprtk.hpp:10682
irange_t * irange_ptr
Definition: Exprtk.hpp:9786
T0oT1< T, T0, T1 > & operator=(const T0oT1< T, T0, T1 > &)
Definition: Exprtk.hpp:16610
voc_node< T, Operation > & operator=(const voc_node< T, Operation > &) exprtk_delete
assignment_rebasevec_celem_op_node(const operator_type &opr, expression_ptr branch0, expression_ptr branch1)
Definition: Exprtk.hpp:12353
str_xroxr_node< T, SType0, SType1, RangePack, Operation > node_type
Definition: Exprtk.hpp:17791
std::string type_id() const
Definition: Exprtk.hpp:16859
return_node(const std::vector< typename gen_function_t::expression_ptr > &arg_list, results_context_t &rc)
Definition: Exprtk.hpp:14627
break_node(expression_ptr ret=expression_ptr(0))
Definition: Exprtk.hpp:7213
const T & v0()
Definition: Exprtk.hpp:16205
bipowinv_node(const bipowinv_node< T, PowOp > &) exprtk_delete
const T & ref() const exprtk_override
Definition: Exprtk.hpp:8139
for_loop_bc_rtc_node(expression_ptr initialiser, expression_ptr condition, expression_ptr incrementor, expression_ptr loop_body, loop_runtime_check_ptr loop_rt_chk)
Definition: Exprtk.hpp:7862
~vector_size_node()
Definition: Exprtk.hpp:8458
assignment_vec_op_node(const operator_type &opr, expression_ptr branch0, expression_ptr branch1)
Definition: Exprtk.hpp:12478
std::vector< expression_ptr > initialiser_list_
Definition: Exprtk.hpp:9331
null_igenfunc< T > igeneric_function_t
Definition: Exprtk.hpp:14623
string_base_node< T > * str_base_ptr
Definition: Exprtk.hpp:9782
T1 t1() const exprtk_override
Definition: Exprtk.hpp:16938
const ufunc_t u0_
Definition: Exprtk.hpp:16237
str_xoxr_node< T, SType0, SType1, RangePack, Operation > node_type
Definition: Exprtk.hpp:17721
std::size_t node_depth() const exprtk_override exprtk_final
Definition: Exprtk.hpp:8085
str_xoxr_node(SType0 p0, SType1 p1, RangePack rp1)
Definition: Exprtk.hpp:17724
str_function_t::range_t range_t
Definition: Exprtk.hpp:14554
sf4_var_node< T, SpecialFunction > & operator=(const sf4_var_node< T, SpecialFunction > &) exprtk_delete
stringvar_size_node()
Definition: Exprtk.hpp:10312
boc_node(const boc_node< T, Operation > &) exprtk_delete
T1 t1() const
Definition: Exprtk.hpp:16587
bfunc_t f0() const
Definition: Exprtk.hpp:16667
vob_node(const vob_node< T, Operation > &) exprtk_delete
bool side_effect() const exprtk_override
Definition: Exprtk.hpp:12588
branch_t v_
Definition: Exprtk.hpp:11604
const bfunc_t f1_
Definition: Exprtk.hpp:16704
assignment_vec_elem_op_node(const operator_type &opr, expression_ptr branch0, expression_ptr branch1)
Definition: Exprtk.hpp:12193
vector_node< T > * vec0_node_ptr_
Definition: Exprtk.hpp:9514
vector_celem_rtc_node(expression_ptr vec_node, const std::size_t index, vector_holder_ptr vec_holder, vector_access_runtime_check_ptr vec_rt_chk)
Definition: Exprtk.hpp:8771
vector_node_ptr temp_vec_node_
Definition: Exprtk.hpp:13683
PowOp operation_t
Definition: Exprtk.hpp:18041
stringvar_node(std::string &v)
Definition: Exprtk.hpp:9537
range_pack< T > range_t
Definition: Exprtk.hpp:6706
unary_branch_node< T, Operation > & operator=(const unary_branch_node< T, Operation > &) exprtk_delete
T0oT1oT2oT3< T, T0, T1, T2, T3, ProcessMode > node_type
Definition: Exprtk.hpp:16719
scand_node(const operator_type &opr, expression_ptr branch0, expression_ptr branch1)
Definition: Exprtk.hpp:13699
str_sogens_node(const str_sogens_node< T, Operation > &) exprtk_delete
string_literal_node< T > & operator=(const string_literal_node< T > &) exprtk_delete
assignment_vec_elem_rtc_node(const operator_type &opr, expression_ptr branch0, expression_ptr branch1)
Definition: Exprtk.hpp:11693
vector_node(const vds_t &vds, vector_holder_t *vh)
Definition: Exprtk.hpp:8373
std::size_t node_depth() const exprtk_override
Definition: Exprtk.hpp:6616
vector_interface< T > * vec_interface_ptr
Definition: Exprtk.hpp:13524
branch_t alternative_
Definition: Exprtk.hpp:7132
sf3_var_node(const T &v0, const T &v1, const T &v2)
Definition: Exprtk.hpp:11379
cons_conditional_str_node(expression_ptr condition, expression_ptr consequent)
Definition: Exprtk.hpp:10851
functor_t::bfunc_t bfunc_t
Definition: Exprtk.hpp:16182
T0oT1oT2_sf3ext< T, T0, T1, T2, SF3Operation > node_type
Definition: Exprtk.hpp:16909
sosos_node< T, SType0, SType1, SType2, Operation > node_type
Definition: Exprtk.hpp:17983
vector_node_ptr consequent_node_ptr_
Definition: Exprtk.hpp:13681
sf4_var_node(const sf4_var_node< T, SpecialFunction > &) exprtk_delete
rebasevector_celem_node< T > * rbvec_node_ptr_
Definition: Exprtk.hpp:11842
T0oT1oT2oT3_sf4ext(T0 p0, T1 p1, T2 p2, T3 p3)
Definition: Exprtk.hpp:17087
variable_node_ptr var1_
Definition: Exprtk.hpp:9366
const std::size_t param_seq_index_
Definition: Exprtk.hpp:14593
assignment_rebasevec_elem_op_rtc_node(const operator_type &opr, expression_ptr branch0, expression_ptr branch1)
Definition: Exprtk.hpp:12393
const_string_range_node(const const_string_range_node< T > &) exprtk_delete
range_t rp_
Definition: Exprtk.hpp:6763
vds_t vds_
Definition: Exprtk.hpp:8442
std::size_t parameter_count_
Definition: Exprtk.hpp:14061
static expression_node< T > * allocate(Allocator &allocator, T0 p0, T1 p1, T2 p2, bfunc_t p3, bfunc_t p4)
Definition: Exprtk.hpp:16688
T * access_vector() const
Definition: Exprtk.hpp:8561
string_literal_node(const string_literal_node< T > &) exprtk_delete
str_sogens_node(const operator_type &opr, expression_ptr branch0, expression_ptr branch1)
Definition: Exprtk.hpp:17876
T0oT1oT2oT3_sf4ext< T, T0, T1, T2, T3, SF4Operation > node_type
Definition: Exprtk.hpp:17085
str_xroxr_node(SType0 p0, SType1 p1, RangePack rp0, RangePack rp1)
Definition: Exprtk.hpp:17794
range_t base_range_
Definition: Exprtk.hpp:9905
assignment_vecvec_op_node(const operator_type &opr, expression_ptr branch0, expression_ptr branch1)
Definition: Exprtk.hpp:12612
T1 t1_
Definition: Exprtk.hpp:16613
tfunc_t f() const
Definition: Exprtk.hpp:16854
const T c_
Definition: Exprtk.hpp:17289
vector_holder_t * vector_holder_ptr
Definition: Exprtk.hpp:8498
assignment_rebasevec_celem_op_rtc_node(const operator_type &opr, expression_ptr branch0, expression_ptr branch1)
Definition: Exprtk.hpp:12433
const T & v1_
Definition: Exprtk.hpp:11401
T0oT1oT2_sf3< T, T0, T1, T2 > node_type
Definition: Exprtk.hpp:16814
branch_t condition_
Definition: Exprtk.hpp:7130
T2 t2_
Definition: Exprtk.hpp:16702
vec_binop_vecval_node(const operator_type &opr, expression_ptr branch0, expression_ptr branch1)
Definition: Exprtk.hpp:13044
T value_type
Definition: Exprtk.hpp:16557
const tfunc_t f_
Definition: Exprtk.hpp:16885
rebasevector_celem_rtc_node(expression_ptr vec_node, const std::size_t index, vector_holder_ptr vec_holder, vector_access_runtime_check_ptr vec_rt_chk)
Definition: Exprtk.hpp:9130
boc_node< T, Operation > & operator=(const boc_node< T, Operation > &) exprtk_delete
vob_node(const T &var, const expression_ptr branch)
Definition: Exprtk.hpp:17353
std::pair< expression_ptr, bool > branch_t
Definition: Exprtk.hpp:6576
std::string type_id() const exprtk_override
Definition: Exprtk.hpp:16677
str_base_ptr str_base_ptr_
Definition: Exprtk.hpp:9903
expression_ptr consequent_
Definition: Exprtk.hpp:10830
variable_node(T &v)
Definition: Exprtk.hpp:8120
while_loop_bc_rtc_node(expression_ptr condition, expression_ptr loop_body, loop_runtime_check_ptr loop_rt_chk)
Definition: Exprtk.hpp:7674
std::pair< expression_ptr, bool > branch_t
Definition: Exprtk.hpp:18071
virtual std::string & ref()
Definition: Exprtk.hpp:9669
functor_t::qfunc_t qfunc_t
Definition: Exprtk.hpp:16996
const T value_
Definition: Exprtk.hpp:6656
null_eq_node(expression_ptr branch, const bool equality=true)
Definition: Exprtk.hpp:6578
const range_t & range_ref() const exprtk_override
Definition: Exprtk.hpp:6752
std::size_t size() const
Definition: Exprtk.hpp:10920
cov_node(const cov_node< T, Operation > &) exprtk_delete
const vds_t & vds() const exprtk_override
Definition: Exprtk.hpp:8424
void release()
Definition: Exprtk.hpp:16281
const T & v1() const exprtk_override
Definition: Exprtk.hpp:17232
void set_c(const T new_c) exprtk_override
Definition: Exprtk.hpp:17487
vector_assignment_node< T > & operator=(const vector_assignment_node< T > &) exprtk_delete
static expression_node< T > * allocate(Allocator &allocator, T0 p0, T1 p1, T2 p2, T3 p3, bfunc_t p4, bfunc_t p5, bfunc_t p6)
Definition: Exprtk.hpp:16783
vector_node< T > * vec1_node_ptr_
Definition: Exprtk.hpp:9515
vararg_node(const Sequence< expression_ptr, Allocator > &arg_list)
Definition: Exprtk.hpp:11450
void collect_nodes(typename expression_node< T >::noderef_list_t &node_delete_list) exprtk_override
Definition: Exprtk.hpp:6611
const bfunc_t f2_
Definition: Exprtk.hpp:16803
vector_elem_node< T > * vec_node_ptr_
Definition: Exprtk.hpp:11682
const T & v3_
Definition: Exprtk.hpp:11437
const std::string * value_
Definition: Exprtk.hpp:10332
const std::size_t size_
Definition: Exprtk.hpp:9332
vector_celem_node(expression_ptr vec_node, const std::size_t index, vector_holder_ptr vec_holder)
Definition: Exprtk.hpp:8585
igeneric_function_t * igeneric_function_ptr
Definition: Exprtk.hpp:14624
repeat_until_loop_rtc_node(expression_ptr condition, expression_ptr loop_body, loop_runtime_check_ptr loop_rt_chk)
Definition: Exprtk.hpp:7473
swap_genstrings_node< T > & operator=(const swap_genstrings_node< T > &) exprtk_delete
vector_holder_t * vec_holder()
Definition: Exprtk.hpp:8479
bool zero_value_initialse_
Definition: Exprtk.hpp:9334
const qfunc_t f_
Definition: Exprtk.hpp:17076
vector_interface< T > * ivec_ptr_
Definition: Exprtk.hpp:11603
range_t range() const
Definition: Exprtk.hpp:9664
conditional_node(expression_ptr condition, expression_ptr consequent, expression_ptr alternative)
Definition: Exprtk.hpp:7084
expression_ptr condition_
Definition: Exprtk.hpp:10829
RangePack rp0_
Definition: Exprtk.hpp:17706
assignment_vec_celem_op_rtc_node(const operator_type &opr, expression_ptr branch0, expression_ptr branch1)
Definition: Exprtk.hpp:12273
switch_n_node(const Sequence< expression_ptr, Allocator > &arg_list)
Definition: Exprtk.hpp:8007
str_base_ptr str1_base_ptr_
Definition: Exprtk.hpp:10048
T1_ T1
Definition: Exprtk.hpp:16716
bfunc_t f1() const
Definition: Exprtk.hpp:16672
string_range_node< T > * str_rng_node_ptr
Definition: Exprtk.hpp:10540
void rebase(std::string &s)
Definition: Exprtk.hpp:9599
string_concat_node(const operator_type &opr, expression_ptr branch0, expression_ptr branch1)
Definition: Exprtk.hpp:9927
sosos_node(const node_type &) exprtk_delete
std::string & s2()
Definition: Exprtk.hpp:18017
~vec_binop_valvec_node()
Definition: Exprtk.hpp:13244
const bfunc_t f0_
Definition: Exprtk.hpp:16703
vector_holder_ptr temp_
Definition: Exprtk.hpp:13684
bool const_nonzero_literal_value_initialse_
Definition: Exprtk.hpp:9335
uvouv_node(const uvouv_node< T > &) exprtk_delete
branch_t final_node_
Definition: Exprtk.hpp:11091
repeat_until_loop_bc_rtc_node(expression_ptr condition, expression_ptr loop_body, loop_runtime_check_ptr loop_rt_chk)
Definition: Exprtk.hpp:7755
T0oT1oT2_sf3(T0 p0, T1 p1, T2 p2, const tfunc_t p3)
Definition: Exprtk.hpp:16816
Definition: Exprtk.hpp:7791
T value() const exprtk_override
Definition: Exprtk.hpp:7806
for_loop_node< T > parent_t
Definition: Exprtk.hpp:7794
for_loop_bc_node(expression_ptr initialiser, expression_ptr condition, expression_ptr incrementor, expression_ptr loop_body)
Definition: Exprtk.hpp:7797
expression_node< T > * expression_ptr
Definition: Exprtk.hpp:7795
Definition: Exprtk.hpp:7500
expression_node< T >::node_type type() const exprtk_override
Definition: Exprtk.hpp:7544
branch_t loop_body_
Definition: Exprtk.hpp:7573
std::pair< expression_ptr, bool > branch_t
Definition: Exprtk.hpp:7504
bool valid() const exprtk_override exprtk_final
Definition: Exprtk.hpp:7549
branch_t condition_
Definition: Exprtk.hpp:7571
for_loop_node(expression_ptr initialiser, expression_ptr condition, expression_ptr incrementor, expression_ptr loop_body)
Definition: Exprtk.hpp:7506
expression_node< T > * expression_ptr
Definition: Exprtk.hpp:7503
void collect_nodes(typename expression_node< T >::noderef_list_t &node_delete_list) exprtk_override
Definition: Exprtk.hpp:7554
T value() const exprtk_override
Definition: Exprtk.hpp:7518
std::size_t node_depth() const exprtk_override
Definition: Exprtk.hpp:7562
branch_t initialiser_
Definition: Exprtk.hpp:7570
branch_t incrementor_
Definition: Exprtk.hpp:7572
Definition: Exprtk.hpp:14175
std::vector< expression_ptr > arg_list_
Definition: Exprtk.hpp:14404
std::vector< range_data_type_t > range_list_t
Definition: Exprtk.hpp:14194
variable_node_t * variable_node_ptr_t
Definition: Exprtk.hpp:14182
vector_holder< T > * vh_t
Definition: Exprtk.hpp:14189
range_interface< T > range_interface_t
Definition: Exprtk.hpp:14184
GenericFunction * function_
Definition: Exprtk.hpp:14399
virtual ~generic_function_node()
Definition: Exprtk.hpp:14202
void collect_nodes(typename expression_node< T >::noderef_list_t &node_delete_list) exprtk_override
Definition: Exprtk.hpp:14215
std::pair< expression_ptr, bool > branch_t
Definition: Exprtk.hpp:14188
vector_node< T > vector_node_t
Definition: Exprtk.hpp:14181
std::vector< type_store_t > typestore_list_t
Definition: Exprtk.hpp:14193
std::vector< vecview_t > vv_list_
Definition: Exprtk.hpp:14406
std::vector< T > tmp_vs_t
Definition: Exprtk.hpp:14192
range_data_type< T > range_data_type_t
Definition: Exprtk.hpp:14185
vector_node_t * vector_node_ptr_t
Definition: Exprtk.hpp:14183
typestore_list_t typestore_list_
Definition: Exprtk.hpp:14400
std::vector< branch_t > branch_
Definition: Exprtk.hpp:14405
tmp_vs_t expr_as_vec1_store_
Definition: Exprtk.hpp:14407
expression_node< T >::node_type type() const exprtk_override
Definition: Exprtk.hpp:14340
range_list_t range_list_
Definition: Exprtk.hpp:14408
virtual bool populate_value_list() const
Definition: Exprtk.hpp:14352
T value() const exprtk_override
Definition: Exprtk.hpp:14328
variable_node< T > variable_node_t
Definition: Exprtk.hpp:14180
bool valid() const exprtk_override
Definition: Exprtk.hpp:14345
range_interface< T >::range_t range_t
Definition: Exprtk.hpp:14186
std::vector< std::size_t > range_param_list_
Definition: Exprtk.hpp:14409
std::size_t node_depth() const exprtk_override exprtk_final
Definition: Exprtk.hpp:14220
type_store< T > type_store_t
Definition: Exprtk.hpp:14178
expression_node< T > * expression_ptr
Definition: Exprtk.hpp:14179
virtual bool init_branches()
Definition: Exprtk.hpp:14225
vector_view< T > * vecview_t
Definition: Exprtk.hpp:14190
generic_function_node(const std::vector< expression_ptr > &arg_list, GenericFunction *func=reinterpret_cast< GenericFunction * >(0))
Definition: Exprtk.hpp:14196
Definition: Exprtk.hpp:8097
virtual ~ivariable()
Definition: Exprtk.hpp:8100
virtual const T & ref() const =0
Definition: Exprtk.hpp:14505
generic_function_node< T, GenericFunction > gen_function_t
Definition: Exprtk.hpp:14508
multimode_genfunction_node(GenericFunction *func, const std::size_t ¶m_seq_index, const std::vector< typename gen_function_t::expression_ptr > &arg_list)
Definition: Exprtk.hpp:14511
expression_node< T >::node_type type() const exprtk_override exprtk_final
Definition: Exprtk.hpp:14537
std::size_t param_seq_index_
Definition: Exprtk.hpp:14544
gen_function_t::range_t range_t
Definition: Exprtk.hpp:14509
T value() const exprtk_override
Definition: Exprtk.hpp:14518
Definition: Exprtk.hpp:18331
expression_node< typename node_type::value_type > * allocate_cr(const T1 &t1, T2 &t2) const
Definition: Exprtk.hpp:18436
expression_node< typename node_type::value_type > * allocate(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, const T5 &t5, const T6 &t6, const T7 &t7, const T8 &t8, const T9 &t9, const T10 &t10) const
Definition: Exprtk.hpp:18627
expression_node< typename node_type::value_type > * allocate_type(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) const
Definition: Exprtk.hpp:18679
expression_node< typename node_type::value_type > * allocate_c(const T1 &t1) const
Definition: Exprtk.hpp:18416
expression_node< typename node_type::value_type > * allocate(const Sequence< Type, Allocator > &seq) const
Definition: Exprtk.hpp:18398
expression_node< typename node_type::value_type > * allocate_rc(T1 &t1, const T2 &t2) const
Definition: Exprtk.hpp:18446
expression_node< typename node_type::value_type > * allocate_rr(T1 &t1, T2 &t2) const
Definition: Exprtk.hpp:18456
expression_node< typename ResultNode::value_type > * allocate(OpType &operation, ExprNode(&branch)[1])
Definition: Exprtk.hpp:18335
expression_node< typename node_type::value_type > * allocate(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, const T5 &t5, const T6 &t6, const T7 &t7, const T8 &t8) const
Definition: Exprtk.hpp:18593
expression_node< typename node_type::value_type > * allocate_type(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) const
Definition: Exprtk.hpp:18665
expression_node< typename node_type::value_type > * allocate(T1 &t1) const
Definition: Exprtk.hpp:18407
expression_node< typename node_type::value_type > * allocate_tt(T1 t1, T2 t2) const
Definition: Exprtk.hpp:18466
expression_node< typename node_type::value_type > * allocate_ttt(T1 t1, T2 t2, T3 t3) const
Definition: Exprtk.hpp:18476
expression_node< typename node_type::value_type > * allocate_type(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7) const
Definition: Exprtk.hpp:18693
expression_node< typename node_type::value_type > * allocate(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, const T5 &t5) const
Definition: Exprtk.hpp:18550
expression_node< typename node_type::value_type > * allocate(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, const T5 &t5, const T6 &t6) const
Definition: Exprtk.hpp:18563
expression_node< typename node_type::value_type > * allocate(const T1 &t1, const T2 &t2) const
Definition: Exprtk.hpp:18426
expression_node< typename node_type::value_type > * allocate_rrrrr(T1 &t1, T2 &t2, T3 &t3, T4 &t4, T5 &t5) const
Definition: Exprtk.hpp:18516
expression_node< typename node_type::value_type > * allocate_rrrr(T1 &t1, T2 &t2, T3 &t3, T4 &t4) const
Definition: Exprtk.hpp:18506
expression_node< typename node_type::value_type > * allocate() const
Definition: Exprtk.hpp:18389
expression_node< typename ResultNode::value_type > * allocate(OpType &operation, ExprNode(&branch)[4])
Definition: Exprtk.hpp:18362
expression_node< typename ResultNode::value_type > * allocate(OpType &operation, ExprNode(&branch)[5])
Definition: Exprtk.hpp:18371
expression_node< typename node_type::value_type > * allocate(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4) const
Definition: Exprtk.hpp:18538
expression_node< typename node_type::value_type > * allocate(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, const T5 &t5, const T6 &t6, const T7 &t7) const
Definition: Exprtk.hpp:18577
expression_node< typename ResultNode::value_type > * allocate(OpType &operation, ExprNode(&branch)[6])
Definition: Exprtk.hpp:18380
void free(expression_node< T > *&e) const
Definition: Exprtk.hpp:18705
expression_node< typename node_type::value_type > * allocate_type(T1 t1, T2 t2, T3 t3) const
Definition: Exprtk.hpp:18641
expression_node< typename node_type::value_type > * allocate(const T1 &t1, const T2 &t2, const T3 &t3) const
Definition: Exprtk.hpp:18526
expression_node< typename node_type::value_type > * allocate(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, const T5 &t5, const T6 &t6, const T7 &t7, const T8 &t8, const T9 &t9) const
Definition: Exprtk.hpp:18609
expression_node< typename node_type::value_type > * allocate_tttt(T1 t1, T2 t2, T3 t3, T4 t4) const
Definition: Exprtk.hpp:18486
expression_node< typename node_type::value_type > * allocate_type(T1 t1, T2 t2, T3 t3, T4 t4) const
Definition: Exprtk.hpp:18652
expression_node< typename ResultNode::value_type > * allocate(OpType &operation, ExprNode(&branch)[3])
Definition: Exprtk.hpp:18353
expression_node< typename node_type::value_type > * allocate_rrr(T1 &t1, T2 &t2, T3 &t3) const
Definition: Exprtk.hpp:18496
expression_node< typename ResultNode::value_type > * allocate(OpType &operation, ExprNode(&branch)[2])
Definition: Exprtk.hpp:18344
Definition: Exprtk.hpp:5831
nci_t::node_pp_t node_pp_t
Definition: Exprtk.hpp:5837
nci_t::node_ptr_t node_ptr_t
Definition: Exprtk.hpp:5836
static void collect_nodes(node_ptr_t &root, noderef_list_t &node_delete_list)
Definition: Exprtk.hpp:5858
static void delete_nodes(node_ptr_t &root)
Definition: Exprtk.hpp:5840
node_collector_interface< Node > nci_t
Definition: Exprtk.hpp:5834
nci_t::noderef_list_t noderef_list_t
Definition: Exprtk.hpp:5838
Definition: Exprtk.hpp:14601
virtual ~null_igenfunc()
Definition: Exprtk.hpp:14604
type_store< T > generic_type
Definition: Exprtk.hpp:14607
generic_type::parameter_list parameter_list_t
Definition: Exprtk.hpp:14608
Definition: Exprtk.hpp:7025
void collect_nodes(typename expression_node< T >::noderef_list_t &node_delete_list) exprtk_override
Definition: Exprtk.hpp:7051
expression_node< T > * expression_ptr
Definition: Exprtk.hpp:7028
bool valid() const exprtk_override
Definition: Exprtk.hpp:7061
std::size_t node_depth() const exprtk_override exprtk_final
Definition: Exprtk.hpp:7056
operator_type operation_
Definition: Exprtk.hpp:7072
quaternary_node(const operator_type &opr, expression_ptr branch0, expression_ptr branch1, expression_ptr branch2, expression_ptr branch3)
Definition: Exprtk.hpp:7031
expression_node< T >::node_type type() const exprtk_override
Definition: Exprtk.hpp:7046
T value() const exprtk_override
Definition: Exprtk.hpp:7041
std::pair< expression_ptr, bool > branch_t
Definition: Exprtk.hpp:7029
Definition: Exprtk.hpp:6667
virtual const range_t & range_ref() const =0
virtual range_t & range_ref()=0
range_pack< T > range_t
Definition: Exprtk.hpp:6670
virtual ~range_interface()
Definition: Exprtk.hpp:6672
Definition: Exprtk.hpp:7709
T value() const exprtk_override
Definition: Exprtk.hpp:7722
repeat_until_loop_node< T > parent_t
Definition: Exprtk.hpp:7712
expression_node< T > * expression_ptr
Definition: Exprtk.hpp:7713
repeat_until_loop_bc_node(expression_ptr condition, expression_ptr loop_body)
Definition: Exprtk.hpp:7715
Definition: Exprtk.hpp:7407
void collect_nodes(typename expression_node< T >::noderef_list_t &node_delete_list) exprtk_override
Definition: Exprtk.hpp:7446
expression_node< T >::node_type type() const exprtk_override
Definition: Exprtk.hpp:7434
T value() const exprtk_override
Definition: Exprtk.hpp:7421
std::size_t node_depth() const exprtk_override
Definition: Exprtk.hpp:7452
branch_t loop_body_
Definition: Exprtk.hpp:7460
repeat_until_loop_node(expression_ptr condition, expression_ptr loop_body)
Definition: Exprtk.hpp:7413
bool valid() const exprtk_override exprtk_final
Definition: Exprtk.hpp:7439
std::pair< expression_ptr, bool > branch_t
Definition: Exprtk.hpp:7411
expression_node< T > * expression_ptr
Definition: Exprtk.hpp:7410
branch_t condition_
Definition: Exprtk.hpp:7459
Definition: Exprtk.hpp:4807
Definition: Exprtk.hpp:14597
Definition: Exprtk.hpp:4806
Definition: Exprtk.hpp:16890
virtual ~sf3ext_type_node()
Definition: Exprtk.hpp:16893
Definition: Exprtk.hpp:16087
virtual ~sos_base_node()
Definition: Exprtk.hpp:16090
virtual operator_type operation() const
Definition: Exprtk.hpp:16093
Definition: Exprtk.hpp:16101
virtual operator_type operation() const
Definition: Exprtk.hpp:16107
virtual ~sosos_base_node()
Definition: Exprtk.hpp:16104
Definition: Exprtk.hpp:6683
virtual ~string_base_node()
Definition: Exprtk.hpp:6688
virtual std::string str() const =0
virtual char_cptr base() const =0
range_data_type< T > range_data_type_t
Definition: Exprtk.hpp:6686
virtual std::size_t size() const =0
Definition: Exprtk.hpp:14417
std::string ret_string_
Definition: Exprtk.hpp:14499
string_function_node(StringFunction *func, const std::vector< typename gen_function_t::expression_ptr > &arg_list)
Definition: Exprtk.hpp:14423
const range_t & range_ref() const exprtk_override
Definition: Exprtk.hpp:14491
range_t & range_ref() exprtk_override
Definition: Exprtk.hpp:14486
range_t range_
Definition: Exprtk.hpp:14498
std::size_t size() const exprtk_override
Definition: Exprtk.hpp:14481
T value() const exprtk_override
Definition: Exprtk.hpp:14439
char_cptr base() const exprtk_override
Definition: Exprtk.hpp:14476
range_interface< T >::range_t range_t
Definition: Exprtk.hpp:14421
expression_node< T >::node_type type() const exprtk_override
Definition: Exprtk.hpp:14461
std::string str() const exprtk_override
Definition: Exprtk.hpp:14471
generic_function_node< T, StringFunction > gen_function_t
Definition: Exprtk.hpp:14420
bool valid() const exprtk_override
Definition: Exprtk.hpp:14466
Definition: Exprtk.hpp:7924
expression_node< T > * expression_ptr
Definition: Exprtk.hpp:7927
void collect_nodes(typename expression_node< T >::noderef_list_t &node_delete_list) exprtk_override
Definition: Exprtk.hpp:7983
switch_node(const Sequence< expression_ptr, Allocator > &arg_list)
Definition: Exprtk.hpp:7932
std::vector< branch_t > arg_list_
Definition: Exprtk.hpp:7995
expression_node< T >::node_type type() const exprtk_override exprtk_final
Definition: Exprtk.hpp:7973
std::size_t node_depth() const exprtk_override exprtk_final
Definition: Exprtk.hpp:7988
bool valid() const exprtk_override
Definition: Exprtk.hpp:7978
std::pair< expression_ptr, bool > branch_t
Definition: Exprtk.hpp:7928
T value() const exprtk_override
Definition: Exprtk.hpp:7955
Definition: Exprtk.hpp:6956
expression_node< T > * expression_ptr
Definition: Exprtk.hpp:6959
operator_type operation_
Definition: Exprtk.hpp:7019
bool valid() const exprtk_override
Definition: Exprtk.hpp:6999
T value() const exprtk_override
Definition: Exprtk.hpp:6972
trinary_node(const operator_type &opr, expression_ptr branch0, expression_ptr branch1, expression_ptr branch2)
Definition: Exprtk.hpp:6962
std::size_t node_depth() const exprtk_override exprtk_final
Definition: Exprtk.hpp:7012
expression_node< T >::node_type type() const exprtk_override
Definition: Exprtk.hpp:6994
void collect_nodes(typename expression_node< T >::noderef_list_t &node_delete_list) exprtk_override
Definition: Exprtk.hpp:7007
std::pair< expression_ptr, bool > branch_t
Definition: Exprtk.hpp:6960
Definition: Exprtk.hpp:6769
branch_t branch_
Definition: Exprtk.hpp:6826
expression_node< T >::node_type type() const exprtk_override
Definition: Exprtk.hpp:6788
expression_node< T > * branch(const std::size_t &) const exprtk_override
Definition: Exprtk.hpp:6798
unary_node(const operator_type &opr, expression_ptr branch)
Definition: Exprtk.hpp:6775
expression_node< T > * expression_ptr
Definition: Exprtk.hpp:6772
operator_type operation_
Definition: Exprtk.hpp:6825
void collect_nodes(typename expression_node< T >::noderef_list_t &node_delete_list) exprtk_override
Definition: Exprtk.hpp:6813
std::pair< expression_ptr, bool > branch_t
Definition: Exprtk.hpp:6773
operator_type operation()
Definition: Exprtk.hpp:6793
void release()
Definition: Exprtk.hpp:6808
std::size_t node_depth() const exprtk_final
Definition: Exprtk.hpp:6818
T value() const exprtk_override
Definition: Exprtk.hpp:6782
bool valid() const exprtk_override
Definition: Exprtk.hpp:6803
Definition: Exprtk.hpp:16071
virtual operator_type operation() const
Definition: Exprtk.hpp:16077
virtual ~uv_base_node()
Definition: Exprtk.hpp:16074
virtual const T & v() const =0
Definition: Exprtk.hpp:5101
~vec_data_store()
Definition: Exprtk.hpp:5210
data_t & ref()
Definition: Exprtk.hpp:5251
vec_data_store(const std::size_t &size)
Definition: Exprtk.hpp:5196
data_t data()
Definition: Exprtk.hpp:5236
control_block * control_block_
Definition: Exprtk.hpp:5295
void dump() const
Definition: Exprtk.hpp:5256
vec_data_store(const std::size_t &size, data_t data, bool dstrct=false)
Definition: Exprtk.hpp:5200
vec_data_store(const type &vds)
Definition: Exprtk.hpp:5204
T * data_t
Definition: Exprtk.hpp:5105
static std::size_t min_size(const control_block *cb0, const control_block *cb1)
Definition: Exprtk.hpp:5284
type & operator=(const type &vds)
Definition: Exprtk.hpp:5215
vec_data_store()
Definition: Exprtk.hpp:5192
std::size_t size() const
Definition: Exprtk.hpp:5246
static void match_sizes(type &vds0, type &vds1)
Definition: Exprtk.hpp:5275
vec_data_store< T > type
Definition: Exprtk.hpp:5104
data_t data() const
Definition: Exprtk.hpp:5241
Definition: Exprtk.hpp:6242
vector_view< Type > & vec_view_holder_
Definition: Exprtk.hpp:6426
resizable_vector_impl(vector_holder &vec_view_holder, const Type *vec, const std::size_t &vec_size)
Definition: Exprtk.hpp:6377
void remove_ref(value_ptr *ref) exprtk_override
Definition: Exprtk.hpp:6332
sequence_vector_impl & operator=(const sequence_vector_impl &) exprtk_delete
const Type * vec_
Definition: Exprtk.hpp:6273
sequence_vector_impl(const sequence_vector_impl &) exprtk_delete
virtual ~resizable_vector_impl()
Definition: Exprtk.hpp:6388
void set_ref(value_ptr *ref) exprtk_override
Definition: Exprtk.hpp:6327
resizable_vector_impl & operator=(const resizable_vector_impl &) exprtk_delete
const std::size_t size_
Definition: Exprtk.hpp:6274
value_ptr value_at(const std::size_t &index) const exprtk_override
Definition: Exprtk.hpp:6252
array_vector_impl(const Type *vec, const std::size_t &vec_size)
Definition: Exprtk.hpp:6245
array_vector_impl(const array_vector_impl &) exprtk_delete
vector_view_t & vec_view_
Definition: Exprtk.hpp:6370
exprtk::vector_view< Type > vector_view_t
Definition: Exprtk.hpp:6319
sequence_vector_impl(sequence_t &seq)
Definition: Exprtk.hpp:6285
vector_view_impl(vector_view_t &vec_view)
Definition: Exprtk.hpp:6321
virtual vector_view< Type > * rebaseable_instance() exprtk_override
Definition: Exprtk.hpp:6414
array_vector_impl & operator=(const array_vector_impl &) exprtk_delete
vector_view_impl(const vector_view_impl &) exprtk_delete
vector_view< Type > * rebaseable_instance() exprtk_override
Definition: Exprtk.hpp:6342
std::size_t vector_base_size() const exprtk_override
Definition: Exprtk.hpp:6263
std::size_t vector_size() const exprtk_override
Definition: Exprtk.hpp:6258
sequence_t & sequence_
Definition: Exprtk.hpp:6312
resizable_vector_impl(const resizable_vector_impl &) exprtk_delete
vector_view_impl & operator=(const vector_view_impl &) exprtk_delete
Sequence< Type, Allocator > sequence_t
Definition: Exprtk.hpp:6283
bool rebaseable() const exprtk_override
Definition: Exprtk.hpp:6337
Definition: Exprtk.hpp:6192
virtual void set_ref(value_ptr *)
Definition: Exprtk.hpp:6223
virtual std::size_t vector_size() const =0
virtual ~vector_holder_base()
Definition: Exprtk.hpp:6195
virtual std::size_t vector_base_size() const =0
std::size_t base_size() const
Definition: Exprtk.hpp:6208
value_ptr data() const
Definition: Exprtk.hpp:6213
value_ptr operator[](const std::size_t &index) const
Definition: Exprtk.hpp:6198
virtual vector_view< Type > * rebaseable_instance()
Definition: Exprtk.hpp:6229
std::size_t size() const
Definition: Exprtk.hpp:6203
virtual bool rebaseable() const
Definition: Exprtk.hpp:6218
virtual void remove_ref(value_ptr *)
Definition: Exprtk.hpp:6226
virtual value_ptr value_at(const std::size_t &) const =0
Definition: Exprtk.hpp:6183
vector_view< Type > * rebaseable_instance()
Definition: Exprtk.hpp:6495
vector_holder_base * vector_holder_base_
Definition: Exprtk.hpp:6505
std::size_t base_size() const
Definition: Exprtk.hpp:6464
value_type * value_ptr
Definition: Exprtk.hpp:6187
vector_holder(Type *vec, const std::size_t &vec_size)
Definition: Exprtk.hpp:6433
void remove_ref(value_ptr *ref)
Definition: Exprtk.hpp:6482
vector_holder(std::vector< Type, Allocator > &vec)
Definition: Exprtk.hpp:6442
const value_ptr const_value_ptr
Definition: Exprtk.hpp:6188
details::vec_data_store< Type > vds_t
Definition: Exprtk.hpp:6431
vector_holder(exprtk::vector_view< Type > &vec)
Definition: Exprtk.hpp:6446
vector_holder(const vector_holder< Type > &) exprtk_delete
std::size_t size() const
Definition: Exprtk.hpp:6459
vector_holder(const vds_t &vds)
Definition: Exprtk.hpp:6437
vector_holder< Type > & operator=(const vector_holder< Type > &) exprtk_delete
vector_holder(vector_holder_t &vec_holder, const vds_t &vds)
Definition: Exprtk.hpp:6450
value_ptr data() const
Definition: Exprtk.hpp:6469
Type value_type
Definition: Exprtk.hpp:6186
vector_holder< Type > vector_holder_t
Definition: Exprtk.hpp:6189
value_ptr operator[](const std::size_t &index) const
Definition: Exprtk.hpp:6454
void set_ref(value_ptr *ref)
Definition: Exprtk.hpp:6474
bool rebaseable() const
Definition: Exprtk.hpp:6490
Definition: Exprtk.hpp:8330
virtual vector_node_ptr vec() const =0
virtual const vds_t & vds() const =0
virtual bool side_effect() const
Definition: Exprtk.hpp:8351
vector_node< T > * vector_node_ptr
Definition: Exprtk.hpp:8333
virtual vector_node_ptr vec()=0
virtual std::size_t size() const =0
virtual ~vector_interface()
Definition: Exprtk.hpp:8336
vec_data_store< T > vds_t
Definition: Exprtk.hpp:8334
virtual std::size_t base_size() const =0
Definition: Exprtk.hpp:8326
Definition: Exprtk.hpp:16009
virtual ~vob_base_node()
Definition: Exprtk.hpp:16012
virtual const T & v() const =0
Definition: Exprtk.hpp:15991
virtual const T & v() const =0
virtual ~voc_base_node()
Definition: Exprtk.hpp:15994
virtual const T c() const =0
virtual operator_type operation() const
Definition: Exprtk.hpp:15997
Definition: Exprtk.hpp:15955
virtual const T & v0() const =0
virtual operator_type operation() const
Definition: Exprtk.hpp:15961
virtual ~vov_base_node()
Definition: Exprtk.hpp:15958
virtual const T & v1() const =0
Definition: Exprtk.hpp:7629
while_loop_node< T > parent_t
Definition: Exprtk.hpp:7632
expression_node< T > * expression_ptr
Definition: Exprtk.hpp:7633
while_loop_bc_node(expression_ptr condition, expression_ptr loop_body)
Definition: Exprtk.hpp:7635
T value() const exprtk_override
Definition: Exprtk.hpp:7642
Definition: Exprtk.hpp:7315
void collect_nodes(typename expression_node< T >::noderef_list_t &node_delete_list) exprtk_override
Definition: Exprtk.hpp:7353
std::pair< expression_ptr, bool > branch_t
Definition: Exprtk.hpp:7319
T value() const exprtk_override
Definition: Exprtk.hpp:7329
while_loop_node(expression_ptr condition, expression_ptr loop_body)
Definition: Exprtk.hpp:7321
expression_node< T >::node_type type() const exprtk_override
Definition: Exprtk.hpp:7341
expression_node< T > * expression_ptr
Definition: Exprtk.hpp:7318
branch_t condition_
Definition: Exprtk.hpp:7366
bool valid() const exprtk_override exprtk_final
Definition: Exprtk.hpp:7346
std::size_t node_depth() const exprtk_override
Definition: Exprtk.hpp:7359
branch_t loop_body_
Definition: Exprtk.hpp:7367
Definition: Exprtk.hpp:21155
static bool is_variable(const expression< T > &expr)
Definition: Exprtk.hpp:21163
static bool is_binary(const expression< T > &expr)
Definition: Exprtk.hpp:21173
static bool is_constant(const expression< T > &expr)
Definition: Exprtk.hpp:21158
static bool is_function(const expression< T > &expr)
Definition: Exprtk.hpp:21178
static bool is_unary(const expression< T > &expr)
Definition: Exprtk.hpp:21168
static bool is_null(const expression< T > &expr)
Definition: Exprtk.hpp:21183
Definition: Exprtk.hpp:20773
const control_block::local_data_list_t & local_data_list()
Definition: Exprtk.hpp:21114
expression()
Definition: Exprtk.hpp:20903
details::vector_holder< T > * vector_holder_ptr
Definition: Exprtk.hpp:20777
symbol_table< T > & get_symbol_table(const std::size_t &index=0)
Definition: Exprtk.hpp:21015
expression(const expression< T > &e)
Definition: Exprtk.hpp:20909
void set_expression(const expression_ptr expr)
Definition: Exprtk.hpp:21045
void register_local_var(expression_ptr expr)
Definition: Exprtk.hpp:21061
const symbol_table< T > & get_symbol_table(const std::size_t &index=0) const
Definition: Exprtk.hpp:21010
bool operator!() const
Definition: Exprtk.hpp:20953
void register_symbol_table(symbol_table< T > &st)
Definition: Exprtk.hpp:20997
const results_context_t & results() const
Definition: Exprtk.hpp:21022
bool operator==(const expression< T > &e) const
Definition: Exprtk.hpp:20948
expression(const symbol_table< T > &symbol_table)
Definition: Exprtk.hpp:20916
symtab_list_t get_symbol_table_list() const
Definition: Exprtk.hpp:21040
std::vector< symbol_table< T > > symtab_list_t
Definition: Exprtk.hpp:20778
void register_local_var(vector_holder_ptr vec_holder)
Definition: Exprtk.hpp:21076
bool return_invoked() const
Definition: Exprtk.hpp:21033
friend bool is_valid(const expression< TT > &expr)
results_context< T > results_context_t
Definition: Exprtk.hpp:21020
~expression()
Definition: Exprtk.hpp:20969
void set_retinvk(bool *retinvk_ptr)
Definition: Exprtk.hpp:21135
expression< T > & operator=(const expression< T > &e)
Definition: Exprtk.hpp:20923
void register_local_data(void *data, const std::size_t &size=0, const std::size_t data_mode=0)
Definition: Exprtk.hpp:21091
T value() const
Definition: Exprtk.hpp:20974
expression< T > & release()
Definition: Exprtk.hpp:20961
control_block * control_block_
Definition: Exprtk.hpp:21143
void register_return_results(results_context_t *rc)
Definition: Exprtk.hpp:21127
details::expression_node< T > * expression_ptr
Definition: Exprtk.hpp:20776
Definition: Exprtk.hpp:41013
bool forward(const std::string &name, const std::size_t &arg_count, symbol_table_t &sym_table, const bool ret_present=false)
Definition: Exprtk.hpp:41825
exprtk::symbol_table< T > symbol_table_t
Definition: Exprtk.hpp:41017
std::vector< symbol_table_t * > auxiliary_symtab_list_
Definition: Exprtk.hpp:41880
bool load_vectors_
Definition: Exprtk.hpp:41883
const symbol_table_t & symbol_table() const
Definition: Exprtk.hpp:41607
const T & type
Definition: Exprtk.hpp:41393
std::vector< funcparam_t > fp_map_
Definition: Exprtk.hpp:41879
exprtk::parser< T > parser_t
Definition: Exprtk.hpp:41018
function_compositor()
Definition: Exprtk.hpp:41580
void add_auxiliary_symtab(symbol_table_t &symtab)
Definition: Exprtk.hpp:41612
bool load_variables_
Definition: Exprtk.hpp:41882
std::string error() const
Definition: Exprtk.hpp:41652
bool add(const function &f, const bool override=false)
Definition: Exprtk.hpp:41647
parser_error::type get_error(const std::size_t &index) const
Definition: Exprtk.hpp:41667
~function_compositor()
Definition: Exprtk.hpp:41597
static T return_value(expression_t &e)
Definition: Exprtk.hpp:41501
std::map< std::string, expression_t > expr_map_
Definition: Exprtk.hpp:41878
parser_t parser_
Definition: Exprtk.hpp:41877
std::map< std::string, base_func * > funcparam_t
Definition: Exprtk.hpp:41379
parser_t::settings_store settings_t
Definition: Exprtk.hpp:41019
std::deque< parser_error::type > error_list_
Definition: Exprtk.hpp:41881
void load_vectors(const bool load=true)
Definition: Exprtk.hpp:41622
void clear()
Definition: Exprtk.hpp:41627
bool compile_expression(const std::string &name, const std::string &expression, const Sequence< std::string, Allocator > &input_var_list, bool return_present=false)
Definition: Exprtk.hpp:41679
void remove(const std::string &name, const std::size_t &arg_count)
Definition: Exprtk.hpp:41851
void load_variables(const bool load=true)
Definition: Exprtk.hpp:41617
function_compositor(const symbol_table_t &st)
Definition: Exprtk.hpp:41588
symbol_table_t symbol_table_
Definition: Exprtk.hpp:41876
exprtk::expression< T > expression_t
Definition: Exprtk.hpp:41016
std::size_t error_count() const
Definition: Exprtk.hpp:41662
bool valid(const std::string &name, const std::size_t &arg_count) const
Definition: Exprtk.hpp:41812
bool symbol_used(const std::string &symbol) const
Definition: Exprtk.hpp:41801
symbol_table_t & symbol_table()
Definition: Exprtk.hpp:41602
Definition: Exprtk.hpp:18779
std::size_t & max_num_args()
Definition: Exprtk.hpp:18804
function_traits()
Definition: Exprtk.hpp:18782
std::size_t & min_num_args()
Definition: Exprtk.hpp:18799
bool has_side_effects_
Definition: Exprtk.hpp:18812
std::size_t max_num_args_
Definition: Exprtk.hpp:18814
bool allow_zero_parameters_
Definition: Exprtk.hpp:18811
std::size_t min_num_args_
Definition: Exprtk.hpp:18813
bool & allow_zero_parameters()
Definition: Exprtk.hpp:18789
bool & has_side_effects()
Definition: Exprtk.hpp:18794
Definition: Exprtk.hpp:18863
virtual ~ifunction()
Definition: Exprtk.hpp:18870
ifunction(const std::size_t &pc)
Definition: Exprtk.hpp:18866
Definition: Exprtk.hpp:18974
generic_type::parameter_list parameter_list_t
Definition: Exprtk.hpp:18986
T type
Definition: Exprtk.hpp:18984
igeneric_function(const std::string ¶m_seq="", const return_type rtr_type=e_rtrn_scalar)
Definition: Exprtk.hpp:18988
type_store< T > generic_type
Definition: Exprtk.hpp:18985
virtual ~igeneric_function()
Definition: Exprtk.hpp:18993
return_type
Definition: Exprtk.hpp:18978
virtual T operator()(parameter_list_t) igeneric_function_empty_body(1) inline virtual T operator()(std return_type rtrn_type
Definition: Exprtk.hpp:19003
Definition: Exprtk.hpp:18959
virtual ~ivararg_function()
Definition: Exprtk.hpp:18962
Definition: Exprtk.hpp:2348
std::string substr(const std::size_t &begin, const std::size_t &end) const
Definition: Exprtk.hpp:2475
token_t operator[](const std::size_t &index) const
Definition: Exprtk.hpp:2448
token_t & next_token()
Definition: Exprtk.hpp:2420
bool finished() const
Definition: Exprtk.hpp:2456
void insert_front(token_t::token_type tk_type)
Definition: Exprtk.hpp:2461
void scan_string()
Definition: Exprtk.hpp:2911
token_t & operator[](const std::size_t &index)
Definition: Exprtk.hpp:2440
bool is_comment_start(details::char_cptr itr) const
Definition: Exprtk.hpp:2501
void scan_symbol()
Definition: Exprtk.hpp:2730
token_t eof_token_
Definition: Exprtk.hpp:3019
void scan_number()
Definition: Exprtk.hpp:2762
token_list_itr_t store_token_itr_
Definition: Exprtk.hpp:3018
void begin()
Definition: Exprtk.hpp:2404
void scan_operator()
Definition: Exprtk.hpp:2665
bool process(const std::string &str)
Definition: Exprtk.hpp:2374
bool empty() const
Definition: Exprtk.hpp:2394
token_list_t::iterator token_list_itr_t
Definition: Exprtk.hpp:2353
void scan_special_function()
Definition: Exprtk.hpp:2869
details::char_t char_t
Definition: Exprtk.hpp:2354
token_list_itr_t token_itr_
Definition: Exprtk.hpp:3017
void store()
Definition: Exprtk.hpp:2410
void restore()
Definition: Exprtk.hpp:2415
token_list_t token_list_
Definition: Exprtk.hpp:3016
details::char_cptr base_itr_
Definition: Exprtk.hpp:3020
generator()
Definition: Exprtk.hpp:2356
void skip_comments()
Definition: Exprtk.hpp:2530
token token_t
Definition: Exprtk.hpp:2351
token_t & peek_next_token()
Definition: Exprtk.hpp:2430
void clear()
Definition: Exprtk.hpp:2364
details::char_cptr s_itr_
Definition: Exprtk.hpp:3021
std::size_t size() const
Definition: Exprtk.hpp:2399
void skip_whitespace()
Definition: Exprtk.hpp:2522
bool is_end(details::char_cptr itr) const
Definition: Exprtk.hpp:2495
std::vector< token_t > token_list_t
Definition: Exprtk.hpp:2352
details::char_cptr s_end_
Definition: Exprtk.hpp:3022
void scan_token()
Definition: Exprtk.hpp:2607
std::string remaining() const
Definition: Exprtk.hpp:2483
Definition: Exprtk.hpp:3407
void ignore_symbol(const std::string &symbol)
Definition: Exprtk.hpp:3416
std::set< std::string, details::ilesscompare > ignore_set_
Definition: Exprtk.hpp:3465
int insert(const lexer::token &t0, const lexer::token &t1, lexer::token &new_token) exprtk_override
Definition: Exprtk.hpp:3421
commutative_inserter()
Definition: Exprtk.hpp:3412
Definition: Exprtk.hpp:3469
bool state_
Definition: Exprtk.hpp:3724
std::map< std::string, std::pair< std::string, token::token_type >, details::ilesscompare > replace_map_t
Definition: Exprtk.hpp:3797
lexer::token error_token()
Definition: Exprtk.hpp:3671
void clear_errors()
Definition: Exprtk.hpp:3782
bool join(const lexer::token &t0, const lexer::token &t1, const lexer::token &t2, lexer::token &t) exprtk_override
Definition: Exprtk.hpp:3621
std::vector< std::size_t > error_list_
Definition: Exprtk.hpp:3790
bool result() exprtk_override
Definition: Exprtk.hpp:3655
bool modify(lexer::token &t) exprtk_override
Definition: Exprtk.hpp:3836
numeric_checker()
Definition: Exprtk.hpp:3736
void add_invalid(const token_t t0, const token_t t1, const token_t t2)
Definition: Exprtk.hpp:4108
void reset() exprtk_override
Definition: Exprtk.hpp:3676
sequence_validator_3tokens()
Definition: Exprtk.hpp:4044
std::pair< lexer::token::token_type, lexer::token::token_type > token_pair_t
Definition: Exprtk.hpp:3864
std::set< token_pair_t > set_t
Definition: Exprtk.hpp:3865
std::size_t error_count() const
Definition: Exprtk.hpp:3769
std::pair< lexer::token, lexer::token > error(const std::size_t index)
Definition: Exprtk.hpp:3925
bool add_replace(const std::string &target_symbol, const std::string &replace_symbol, const lexer::token::token_type token_type=lexer::token::e_symbol)
Definition: Exprtk.hpp:3813
std::set< token_triplet_t > set_t
Definition: Exprtk.hpp:4038
bracket_checker()
Definition: Exprtk.hpp:3650
sequence_validator()
Definition: Exprtk.hpp:3871
set_t invalid_comb_
Definition: Exprtk.hpp:4028
std::size_t error_index(const std::size_t &i)
Definition: Exprtk.hpp:3774
void add_invalid_set1(const lexer::token::token_type t)
Definition: Exprtk.hpp:3950
lexer::token error_token_
Definition: Exprtk.hpp:3726
bool remove(const std::string &target_symbol)
Definition: Exprtk.hpp:3801
bool invalid_bracket_check(const lexer::token::token_type base, const lexer::token::token_type t)
Definition: Exprtk.hpp:3969
void clear()
Definition: Exprtk.hpp:3829
std::pair< token_t, std::pair< token_t, token_t > > token_triplet_t
Definition: Exprtk.hpp:4037
std::stack< std::pair< char, std::size_t > > stack_
Definition: Exprtk.hpp:3725
std::vector< std::pair< lexer::token, lexer::token > > error_list_
Definition: Exprtk.hpp:4029
bool join(const lexer::token &t0, const lexer::token &t1, lexer::token &t) exprtk_override
Definition: Exprtk.hpp:3476
lexer::token::token_type token_t
Definition: Exprtk.hpp:4036
replace_map_t replace_map_
Definition: Exprtk.hpp:3857
void add_invalid(const lexer::token::token_type base, const lexer::token::token_type t)
Definition: Exprtk.hpp:3945
std::size_t current_index_
Definition: Exprtk.hpp:3789
operator_joiner(const std::size_t &stride)
Definition: Exprtk.hpp:3472
Definition: Exprtk.hpp:3031
virtual bool result()
Definition: Exprtk.hpp:3036
virtual void init()
Definition: Exprtk.hpp:3034
virtual std::size_t process(generator &)
Definition: Exprtk.hpp:3037
virtual ~helper_interface()
Definition: Exprtk.hpp:3038
virtual void reset()
Definition: Exprtk.hpp:3035
Definition: Exprtk.hpp:4276
generator_t lexer_
Definition: Exprtk.hpp:4474
generator_t & lexer()
Definition: Exprtk.hpp:4296
bool token_is_loop(const token_advance_mode mode=e_advance)
Definition: Exprtk.hpp:4455
void advance_token(const token_advance_mode mode)
Definition: Exprtk.hpp:4339
const generator_t & lexer() const
Definition: Exprtk.hpp:4301
bool token_is_arithmetic_opr(const token_advance_mode mode=e_advance)
Definition: Exprtk.hpp:4389
bool token_is_left_bracket(const token_advance_mode mode=e_advance)
Definition: Exprtk.hpp:4425
bool token_is_right_bracket(const token_advance_mode mode=e_advance)
Definition: Exprtk.hpp:4440
token_advance_mode
Definition: Exprtk.hpp:4334
bool token_is_ineq_opr(const token_advance_mode mode=e_advance)
Definition: Exprtk.hpp:4407
bool token_is(const std::string &value, const token_advance_mode mode=e_advance)
Definition: Exprtk.hpp:4376
bool peek_token_is(const token_t::token_type &ttype)
Definition: Exprtk.hpp:4462
void next_token()
Definition: Exprtk.hpp:4318
void restore_token()
Definition: Exprtk.hpp:4312
bool peek_token_is(const std::string &s)
Definition: Exprtk.hpp:4467
token token_t
Definition: Exprtk.hpp:4279
token_t store_current_token_
Definition: Exprtk.hpp:4476
bool init(const std::string &str)
Definition: Exprtk.hpp:4282
generator generator_t
Definition: Exprtk.hpp:4280
token_t current_token_
Definition: Exprtk.hpp:4475
const token_t & peek_next_token()
Definition: Exprtk.hpp:4328
const token_t & current_token() const
Definition: Exprtk.hpp:4323
bool token_is(const token_t::token_type &ttype, const std::string &value, const token_advance_mode mode=e_advance)
Definition: Exprtk.hpp:4359
void store_token()
Definition: Exprtk.hpp:4306
bool token_is(const token_t::token_type &ttype, const token_advance_mode mode=e_advance)
Definition: Exprtk.hpp:4347
Definition: Exprtk.hpp:3168
std::size_t process(generator &g) exprtk_override
Definition: Exprtk.hpp:3180
virtual int insert(const token &, token &) token_inserter_empty_body inline virtual int insert(const token &
token_inserter(const std::size_t &stride)
Definition: Exprtk.hpp:3171
virtual int const token token &virtual token_inserter_empty_body int insert(const token &, const token &, const token &, token &) token_inserter_empty_body inline virtual int insert(const token &
Definition: Exprtk.hpp:3277
const std::size_t stride_
Definition: Exprtk.hpp:3387
virtual bool join(const token &, const token &, token &)
Definition: Exprtk.hpp:3297
token_joiner(const std::size_t &stride)
Definition: Exprtk.hpp:3280
std::size_t process_stride_3(generator &g)
Definition: Exprtk.hpp:3344
std::size_t process_stride_2(generator &g)
Definition: Exprtk.hpp:3302
std::size_t process(generator &g) exprtk_override
Definition: Exprtk.hpp:3284
virtual bool join(const token &, const token &, const token &, token &)
Definition: Exprtk.hpp:3298
Definition: Exprtk.hpp:3149
virtual bool modify(token &t)=0
std::size_t process(generator &g) exprtk_override
Definition: Exprtk.hpp:3152
Definition: Exprtk.hpp:3042
token_scanner(const std::size_t &stride)
Definition: Exprtk.hpp:3048
const std::size_t stride_
Definition: Exprtk.hpp:3145
std::size_t process(generator &g) exprtk_override
Definition: Exprtk.hpp:3057
virtual ~token_scanner()
Definition: Exprtk.hpp:3045
Definition: Exprtk.hpp:22643
std::pair< std::string, symbol_type > symbol_t
Definition: Exprtk.hpp:22646
bool & collect_variables()
Definition: Exprtk.hpp:22719
bool collect_assignments_
Definition: Exprtk.hpp:22794
void clear()
Definition: Exprtk.hpp:22710
std::vector< std::string > retparam_list_t
Definition: Exprtk.hpp:22744
bool return_present_
Definition: Exprtk.hpp:22795
bool collect_functions_
Definition: Exprtk.hpp:22793
bool final_stmt_return_
Definition: Exprtk.hpp:22796
bool collect_variables_
Definition: Exprtk.hpp:22792
bool final_stmt_return() const
Definition: Exprtk.hpp:22739
symbol_list_t symbol_name_list_
Definition: Exprtk.hpp:22797
symbol_list_t assignment_name_list_
Definition: Exprtk.hpp:22798
bool return_present() const
Definition: Exprtk.hpp:22734
std::vector< symbol_t > symbol_list_t
Definition: Exprtk.hpp:22647
void add_assignment(const std::string &symbol, const symbol_type st)
Definition: Exprtk.hpp:22776
bool & collect_assignments()
Definition: Exprtk.hpp:22729
bool & collect_functions()
Definition: Exprtk.hpp:22724
void add_symbol(const std::string &symbol, const symbol_type st)
Definition: Exprtk.hpp:22753
std::size_t assignment_symbols(Sequence< symbol_t, Allocator > &assignment_list)
Definition: Exprtk.hpp:22686
std::size_t options_
Definition: Exprtk.hpp:22791
retparam_list_t return_param_type_list() const
Definition: Exprtk.hpp:22746
dependent_entity_collector(const std::size_t options=e_ct_none)
Definition: Exprtk.hpp:22649
std::size_t symbols(Sequence< symbol_t, Allocator > &symbols_list)
Definition: Exprtk.hpp:22660
Definition: Exprtk.hpp:29930
expression_node_ptr repeat_until_loop(expression_node_ptr &condition, expression_node_ptr &branch, const bool break_continue_present=false) const
Definition: Exprtk.hpp:31133
void lodge_assignment(symbol_type cst, expression_node_ptr node)
Definition: Exprtk.hpp:32490
bool sf4_optimisable(const std::string &sf4id, quaternary_functor_t &qfunc) const
Definition: Exprtk.hpp:30155
expression_node_ptr conditional(expression_node_ptr condition, expression_node_ptr consequent, expression_node_ptr alternative) const
Definition: Exprtk.hpp:30848
std::string branch_to_id(expression_node_ptr(&branch)[2]) const
Definition: Exprtk.hpp:30350
bool coboc_optimisable(const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
Definition: Exprtk.hpp:30416
details::expression_node< Type > * expression_node_ptr
Definition: Exprtk.hpp:29933
bool assign_immutable_symbol(expression_node_ptr node)
Definition: Exprtk.hpp:32590
bool boc_optimisable(const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
Definition: Exprtk.hpp:30391
bool special_one_parameter_vararg(const details::operator_type &operation) const
Definition: Exprtk.hpp:31839
expression_node_ptr conditional_vector(expression_node_ptr condition, expression_node_ptr consequent, expression_node_ptr alternative) const
Definition: Exprtk.hpp:31000
expression_node_ptr const_optimise_varargfunc(const details::operator_type &operation, Sequence< expression_node_ptr, Allocator > &arg_list)
Definition: Exprtk.hpp:31808
bool cov_optimisable(const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
Definition: Exprtk.hpp:30355
expression_node_ptr generic_function_call(igeneric_function_t *gf, std::vector< expression_node_ptr > &arg_list, const std::size_t ¶m_seq_index=std::numeric_limits< std::size_t >::max())
Definition: Exprtk.hpp:32078
expression_node_ptr synthesize_uvec_expression(const details::operator_type &operation, expression_node_ptr(&branch)[1])
Definition: Exprtk.hpp:31565
bool is_invalid_string_op(const details::operator_type &operation, expression_node_ptr(&branch)[3]) const
Definition: Exprtk.hpp:30541
expression_node_ptr synthesize_sosr_expression(const details::operator_type &opr, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:39291
expression_node_ptr synthesize_veceqineqlogic_operation_expression(const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:32960
expression_node_ptr synthesize_expression(F *f, expression_node_ptr(&branch)[N])
Definition: Exprtk.hpp:39867
expression_node_ptr cardinal_pow_optimisation(expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:33355
expression_node_ptr synthesize_uv_expression(const details::operator_type &operation, expression_node_ptr(&branch)[1])
Definition: Exprtk.hpp:31548
expression_node_ptr vararg_function(const details::operator_type &operation, Sequence< expression_node_ptr, Allocator > &arg_list)
Definition: Exprtk.hpp:31900
bool is_invalid_string_op(const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
Definition: Exprtk.hpp:30521
expression_node_ptr varnode_optimise_varargfunc(const details::operator_type &operation, Sequence< expression_node_ptr, Allocator > &arg_list)
Definition: Exprtk.hpp:31852
expression_node_ptr switch_statement(Sequence< expression_node_ptr, Allocator > &arg_list, const bool default_statement_present)
Definition: Exprtk.hpp:31453
void set_allocator(details::node_allocator &na)
Definition: Exprtk.hpp:30045
bool is_invalid_assignment_op(const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
Definition: Exprtk.hpp:30468
expression_node_ptr multi_switch_statement(Sequence< expression_node_ptr, Allocator > &arg_list)
Definition: Exprtk.hpp:31492
synthesize_map_t synthesize_map_
Definition: Exprtk.hpp:39907
sf4_map_t * sf4_map_
Definition: Exprtk.hpp:39912
expression_node_ptr synthesize_swap_expression(expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:33138
bool is_null_present(expression_node_ptr(&branch)[2]) const
Definition: Exprtk.hpp:30594
expression_node_ptr synthesize_srosr_expression(const details::operator_type &opr, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:39317
void set_ibom(inv_binary_op_map_t &inv_binary_op_map)
Definition: Exprtk.hpp:30030
expression_node_ptr const_optimise_switch(Sequence< expression_node_ptr, Allocator > &arg_list)
Definition: Exprtk.hpp:31278
bool synthesize_expression(const details::operator_type &operation, expression_node_ptr(&branch)[2], expression_node_ptr &result)
Definition: Exprtk.hpp:34321
expression_node_ptr special_function(const details::operator_type &operation, expression_node_ptr(&branch)[4])
Definition: Exprtk.hpp:31773
bool valid_operator(const details::operator_type &operation, binary_functor_t &bop)
Definition: Exprtk.hpp:30060
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:39238
expression_node_ptr synthesize_csros_expression(const details::operator_type &opr, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:39442
bool is_vector_eqineq_logic_operation(const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
Definition: Exprtk.hpp:30602
void set_bom(binary_op_map_t &binary_op_map)
Definition: Exprtk.hpp:30025
bool strength_reduction_enabled_
Definition: Exprtk.hpp:39905
bool is_string_operation(const details::operator_type &operation, expression_node_ptr(&branch)[3]) const
Definition: Exprtk.hpp:30570
const void * base_ptr(expression_node_ptr node)
Definition: Exprtk.hpp:32540
bool binext_optimisable(const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
Definition: Exprtk.hpp:30459
std::string to_str(const details::operator_type &operation) const
Definition: Exprtk.hpp:30261
bool is_constant_foldable(const Sequence< NodePtr, Allocator > &b) const
Definition: Exprtk.hpp:32477
expression_node_ptr synthesize_csosr_expression(const details::operator_type &opr, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:39353
details::operator_type get_operator(const binary_functor_t &bop) const
Definition: Exprtk.hpp:30084
expression_node_ptr synthesize_shortcircuit_expression(const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:33220
expression_node_ptr varnode_optimise_sf3(const details::operator_type &operation, expression_node_ptr(&branch)[3])
Definition: Exprtk.hpp:31634
expression_node_ptr synthesize_sos_expression_impl(const details::operator_type &opr, T0 s0, T1 s1)
Definition: Exprtk.hpp:39256
expression_node_ptr synthesize_uvouv_expression(const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:39114
bool is_string_operation(const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
Definition: Exprtk.hpp:30562
void set_uom(unary_op_map_t &unary_op_map)
Definition: Exprtk.hpp:30020
void set_parser(parser_t &p)
Definition: Exprtk.hpp:30015
bool is_constpow_operation(const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
Definition: Exprtk.hpp:30495
expression_node_ptr synthesize_csocs_expression(const details::operator_type &opr, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:39397
expression_node_ptr return_envelope(expression_node_ptr body, results_context_t *rc, bool *&return_invoked)
Definition: Exprtk.hpp:32271
bool is_vector_arithmetic_operation(const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
Definition: Exprtk.hpp:30624
bool valid_string_operation(const details::operator_type &operation) const
Definition: Exprtk.hpp:30238
bool is_invalid_break_continue_op(expression_node_ptr(&branch)[2]) const
Definition: Exprtk.hpp:30511
vector_access_runtime_check_ptr get_vector_access_runtime_check() const
Definition: Exprtk.hpp:31068
expression_node_ptr synthesize_string_expression(const details::operator_type &opr, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:39518
exprtk::parser< Type > parser_t
Definition: Exprtk.hpp:29936
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
Definition: Exprtk.hpp:31187
bool valid_operator(const details::operator_type &operation, unary_functor_t &uop)
Definition: Exprtk.hpp:30072
expression_node_ptr synthesize_srocs_expression(const details::operator_type &opr, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:39367
unary_op_map_t * unary_op_map_
Definition: Exprtk.hpp:39908
expression_node_ptr synthesize_assignment_expression(const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:32619
expression_node_ptr return_call(std::vector< expression_node_ptr > &arg_list)
Definition: Exprtk.hpp:32228
bool vob_optimisable(const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
Definition: Exprtk.hpp:30441
void init_synthesize_map()
Definition: Exprtk.hpp:29940
expression_node_ptr synthesize_csos_expression(const details::operator_type &opr, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:39343
expression_node_ptr synthesize_null_expression(const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:39721
parser_t * parser_
Definition: Exprtk.hpp:39913
expression_node_ptr while_loop(expression_node_ptr &condition, expression_node_ptr &branch, const bool break_continue_present=false) const
Definition: Exprtk.hpp:31073
expression_node_ptr synthesize_unary_expression(const details::operator_type &operation, expression_node_ptr(&branch)[1])
Definition: Exprtk.hpp:31581
const Type ctype
Definition: Exprtk.hpp:29938
sf3_map_t * sf3_map_
Definition: Exprtk.hpp:39911
void set_strength_reduction_state(const bool enabled)
Definition: Exprtk.hpp:30050
expression_node_ptr synthesize_srocsr_expression(const details::operator_type &opr, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:39381
bool sf3_optimisable(const std::string &sf3id, trinary_functor_t &tfunc) const
Definition: Exprtk.hpp:30143
expression_node_ptr vector_element(const std::string &symbol, vector_holder_ptr vector_base, expression_node_ptr vec_node, expression_node_ptr index)
Definition: Exprtk.hpp:32298
expression_node_ptr synthesize_assignment_operation_expression(const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:32688
expression_node_ptr synthesize_str_xoxr_expression_impl(const details::operator_type &opr, T0 s0, T1 s1, range_t rp1)
Definition: Exprtk.hpp:39220
expression_node_ptr synthesize_vecarithmetic_operation_expression(const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:33052
expression_node_ptr special_function(const details::operator_type &operation, expression_node_ptr(&branch)[3])
Definition: Exprtk.hpp:31666
bool cardinal_pow_optimisable(const details::operator_type &operation, const T &c) const
Definition: Exprtk.hpp:33350
expression_node_ptr synthesize_string_expression(const details::operator_type &opr, expression_node_ptr(&branch)[3])
Definition: Exprtk.hpp:39605
expression_node_ptr synthesize_sros_expression(const details::operator_type &opr, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:39278
expression_node_ptr synthesize_csocsr_expression(const details::operator_type &opr, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:39428
bool strength_reduction_enabled() const
Definition: Exprtk.hpp:30055
expression_node_ptr varnode_optimise_sf4(const details::operator_type &operation, expression_node_ptr(&branch)[4])
Definition: Exprtk.hpp:31739
details::node_allocator * node_allocator_
Definition: Exprtk.hpp:39906
bool operation_optimisable(const details::operator_type &operation) const
Definition: Exprtk.hpp:30287
expression_node_ptr synthesize_csrocs_expression(const details::operator_type &opr, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:39471
expression_node_ptr synthesize_socsr_expression(const details::operator_type &opr, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:39304
expression_node_ptr synthesize_csrocsr_expression(const details::operator_type &opr, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:39484
expression_node_ptr vectorize_func(const details::operator_type &operation, Sequence< expression_node_ptr, Allocator > &arg_list)
Definition: Exprtk.hpp:31875
bool cob_optimisable(const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
Definition: Exprtk.hpp:30382
expression_node_ptr synthesize_expression(const details::operator_type &operation, expression_node_ptr(&branch)[N])
Definition: Exprtk.hpp:39818
bool unary_optimisable(const details::operator_type &operation) const
Definition: Exprtk.hpp:30119
expression_node_ptr cardinal_pow_optimisation(const T &v, const T &c)
Definition: Exprtk.hpp:33329
bool is_constant_foldable(NodePtr(&b)[N]) const
Definition: Exprtk.hpp:32461
expression_node_ptr const_optimise_sf3(const details::operator_type &operation, expression_node_ptr(&branch)[3])
Definition: Exprtk.hpp:31596
expression_node_ptr const_optimise_sf4(const details::operator_type &operation, expression_node_ptr(&branch)[4])
Definition: Exprtk.hpp:31701
expression_node_ptr synthesize_strogen_expression(const details::operator_type &opr, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:39499
std::string branch_to_id(expression_node_ptr branch) const
Definition: Exprtk.hpp:30309
bool bov_optimisable(const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
Definition: Exprtk.hpp:30450
expression_node_ptr synthesize_csrosr_expression(const details::operator_type &opr, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:39455
bool voc_optimisable(const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
Definition: Exprtk.hpp:30364
expression_node_ptr string_function_call(igeneric_function_t *gf, std::vector< expression_node_ptr > &arg_list, const std::size_t ¶m_seq_index=std::numeric_limits< std::size_t >::max())
Definition: Exprtk.hpp:32153
inv_binary_op_map_t * inv_binary_op_map_
Definition: Exprtk.hpp:39910
bool sf3_optimisable(const std::string &sf3id, details::operator_type &operation) const
Definition: Exprtk.hpp:30167
loop_runtime_check_ptr get_loop_runtime_check(const loop_runtime_check::loop_types loop_type) const
Definition: Exprtk.hpp:31055
expression_node_ptr vararg_function_call(ivararg_function_t *vaf, std::vector< expression_node_ptr > &arg_list)
Definition: Exprtk.hpp:32036
bool is_shortcircuit_expression(const details::operator_type &operation) const
Definition: Exprtk.hpp:30580
expression_node_ptr cardinal_pow_optimisation_impl(const TType &v, const unsigned int &p)
Definition: Exprtk.hpp:33301
void set_sf3m(sf3_map_t &sf3_map)
Definition: Exprtk.hpp:30035
bool uvouv_optimisable(const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
Definition: Exprtk.hpp:30432
bool is_assignment_operation(const details::operator_type &operation) const
Definition: Exprtk.hpp:30225
bool sf4_optimisable(const std::string &sf4id, details::operator_type &operation) const
Definition: Exprtk.hpp:30179
std::map< std::string, synthesize_functor_t > synthesize_map_t
Definition: Exprtk.hpp:29935
bool cocob_optimisable(const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
Definition: Exprtk.hpp:30400
expression_node_ptr synthesize_str_xrox_expression_impl(const details::operator_type &opr, T0 s0, T1 s1, range_t rp0)
Definition: Exprtk.hpp:39202
binary_op_map_t * binary_op_map_
Definition: Exprtk.hpp:39909
bool vov_optimisable(const details::operator_type &operation, expression_node_ptr(&branch)[2]) const
Definition: Exprtk.hpp:30373
expression_node_ptr conditional_string(expression_node_ptr condition, expression_node_ptr consequent, expression_node_ptr alternative) const
Definition: Exprtk.hpp:30924
expression_node_ptr const_optimise_mswitch(Sequence< expression_node_ptr, Allocator > &arg_list)
Definition: Exprtk.hpp:31314
expression_node_ptr synthesize_socs_expression(const details::operator_type &opr, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:39333
void set_sf4m(sf4_map_t &sf4_map)
Definition: Exprtk.hpp:30040
expression_node_ptr synthesize_sos_expression(const details::operator_type &opr, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:39270
const Type & vtype
Definition: Exprtk.hpp:29937
Definition: Exprtk.hpp:21858
bool add_interval(const interval_point_t begin, const interval_point_t end)
Definition: Exprtk.hpp:21907
bool in_interval(const interval_point_t point, interval_t &interval) const
Definition: Exprtk.hpp:21876
std::map< interval_point_t, interval_t > interval_map_t
Definition: Exprtk.hpp:21863
std::pair< interval_point_t, interval_point_t > interval_t
Definition: Exprtk.hpp:21862
interval_map_t::const_iterator interval_map_citr_t
Definition: Exprtk.hpp:21864
interval_map_t interval_map_
Definition: Exprtk.hpp:21926
IntervalPointType interval_point_t
Definition: Exprtk.hpp:21861
void reset()
Definition: Exprtk.hpp:21871
bool add_interval(const interval_t interval)
Definition: Exprtk.hpp:21919
bool in_interval(const interval_point_t point) const
Definition: Exprtk.hpp:21901
std::size_t size() const
Definition: Exprtk.hpp:21866
Definition: Exprtk.hpp:21551
scope_element & get_active_element(const std::string &var_name, const std::size_t index=std::numeric_limits< std::size_t >::max())
Definition: Exprtk.hpp:21602
scope_element_manager & operator=(const scope_element_manager &) exprtk_delete
bool empty() const
Definition: Exprtk.hpp:21568
bool add_element(const scope_element &se)
Definition: Exprtk.hpp:21624
scope_element_manager(parser< T > &p)
Definition: Exprtk.hpp:21558
scope_element null_element_
Definition: Exprtk.hpp:21763
expression_node_ptr get_variable(const T &v)
Definition: Exprtk.hpp:21713
scope_element & get_element(const std::string &var_name, const std::size_t index=std::numeric_limits< std::size_t >::max())
Definition: Exprtk.hpp:21581
parser_t & parser_
Definition: Exprtk.hpp:21761
void cleanup()
Definition: Exprtk.hpp:21696
scope_element_manager(const scope_element_manager &) exprtk_delete
std::size_t size() const
Definition: Exprtk.hpp:21563
void free_element(scope_element &se)
Definition: Exprtk.hpp:21667
expression_node_t * expression_node_ptr
Definition: Exprtk.hpp:21554
std::size_t input_param_cnt_
Definition: Exprtk.hpp:21764
scope_element & get_element(const std::size_t &index)
Definition: Exprtk.hpp:21573
std::string get_vector_name(const T *data)
Definition: Exprtk.hpp:21737
variable_node_t * variable_node_ptr
Definition: Exprtk.hpp:21555
std::size_t next_ip_index()
Definition: Exprtk.hpp:21708
std::vector< scope_element > element_
Definition: Exprtk.hpp:21762
parser< T > parser_t
Definition: Exprtk.hpp:21556
void deactivate(const std::size_t &scope_depth)
Definition: Exprtk.hpp:21647
Definition: Exprtk.hpp:21768
scope_handler(const scope_handler &) exprtk_delete
scope_handler(parser< T > &p)
Definition: Exprtk.hpp:21773
~scope_handler()
Definition: Exprtk.hpp:21785
parser_t & parser_
Definition: Exprtk.hpp:21802
scope_handler & operator=(const scope_handler &) exprtk_delete
parser< T > parser_t
Definition: Exprtk.hpp:21771
Definition: Exprtk.hpp:22805
bool enable_collect_assings_
Definition: Exprtk.hpp:23463
settings_store & enable_all_arithmetic_ops()
Definition: Exprtk.hpp:22927
settings_store & enable_arithmetic_operation(const settings_arithmetic_opr arithmetic)
Definition: Exprtk.hpp:23292
bool collect_functions_enabled() const
Definition: Exprtk.hpp:23043
bool control_struct_disabled(const std::string &control_struct) const
Definition: Exprtk.hpp:23108
bool function_disabled(const std::string &function_name) const
Definition: Exprtk.hpp:23100
bool collect_variables_enabled() const
Definition: Exprtk.hpp:23042
bool assignment_enabled(const details::operator_type &assignment) const
Definition: Exprtk.hpp:23082
bool vardef_disabled() const
Definition: Exprtk.hpp:23045
settings_store & disable_all_inequality_ops()
Definition: Exprtk.hpp:23008
std::size_t max_local_vector_size() const
Definition: Exprtk.hpp:23371
bool enable_numeric_check_
Definition: Exprtk.hpp:23456
settings_store & enable_base_function(const settings_base_funcs bf)
Definition: Exprtk.hpp:23238
settings_store & disable_all_control_structures()
Definition: Exprtk.hpp:22972
bool enable_replacer_
Definition: Exprtk.hpp:23454
disabled_entity_set_t::iterator des_itr_t
Definition: Exprtk.hpp:22809
bool enable_joiner_
Definition: Exprtk.hpp:23455
settings_assignment_opr
Definition: Exprtk.hpp:22878
@ e_assign_addass
Definition: Exprtk.hpp:22880
@ e_assign_divass
Definition: Exprtk.hpp:22881
disabled_entity_set_t disabled_arithmetic_set_
Definition: Exprtk.hpp:23471
settings_control_structs
Definition: Exprtk.hpp:22852
@ e_ctrl_repeat_loop
Definition: Exprtk.hpp:22858
@ e_ctrl_switch
Definition: Exprtk.hpp:22855
@ e_ctrl_for_loop
Definition: Exprtk.hpp:22856
@ e_ctrl_while_loop
Definition: Exprtk.hpp:22857
@ e_ctrl_ifelse
Definition: Exprtk.hpp:22854
std::set< std::string, details::ilesscompare > disabled_entity_set_t
Definition: Exprtk.hpp:22808
settings_store & disable_assignment_operation(const settings_assignment_opr assignment)
Definition: Exprtk.hpp:23212
settings_store & enable_commutative_check()
Definition: Exprtk.hpp:22951
std::string inequality_opr_to_string(details::operator_type opr) const
Definition: Exprtk.hpp:23423
settings_compilation_options
Definition: Exprtk.hpp:22814
disabled_entity_set_t disabled_assignment_set_
Definition: Exprtk.hpp:23472
bool assignment_disabled(const details::operator_type assignment_operation) const
Definition: Exprtk.hpp:23124
settings_store & enable_control_structure(const settings_control_structs ctrl_struct)
Definition: Exprtk.hpp:23256
settings_store & enable_all_control_structures()
Definition: Exprtk.hpp:22915
bool disable_rsrvd_sym_usr_
Definition: Exprtk.hpp:23465
bool enable_collect_vars_
Definition: Exprtk.hpp:23461
settings_inequality_opr
Definition: Exprtk.hpp:22885
@ e_ineq_equal
Definition: Exprtk.hpp:22888
@ e_ineq_gte
Definition: Exprtk.hpp:22889
@ e_ineq_eq
Definition: Exprtk.hpp:22887
bool disable_zero_return_
Definition: Exprtk.hpp:23466
bool disable_vardef_
Definition: Exprtk.hpp:23464
bool bracket_check_enabled() const
Definition: Exprtk.hpp:23039
settings_store & disable_logic_operation(const settings_logic_opr logic)
Definition: Exprtk.hpp:23186
settings_store & enable_all_base_functions()
Definition: Exprtk.hpp:22909
settings_store & disable_all_base_functions()
Definition: Exprtk.hpp:22963
settings_store & enable_inequality_operation(const settings_inequality_opr inequality)
Definition: Exprtk.hpp:23328
disabled_entity_set_t disabled_inequality_set_
Definition: Exprtk.hpp:23473
bool logic_enabled(const std::string &logic_operation) const
Definition: Exprtk.hpp:23065
std::string arith_opr_to_string(details::operator_type opr) const
Definition: Exprtk.hpp:23409
bool rsrvd_sym_usr_disabled() const
Definition: Exprtk.hpp:23046
settings_store & enable_all_assignment_ops()
Definition: Exprtk.hpp:22933
std::size_t max_stack_depth() const
Definition: Exprtk.hpp:23361
settings_store & enable_all_logic_ops()
Definition: Exprtk.hpp:22921
settings_store & disable_inequality_operation(const settings_inequality_opr inequality)
Definition: Exprtk.hpp:23225
settings_base_funcs
Definition: Exprtk.hpp:22832
@ e_bf_rad2deg
Definition: Exprtk.hpp:22848
@ e_bf_min
Definition: Exprtk.hpp:22842
@ e_bf_avg
Definition: Exprtk.hpp:22836
@ e_bf_swap
Definition: Exprtk.hpp:22846
@ e_bf_erf
Definition: Exprtk.hpp:22838
@ e_bf_asinh
Definition: Exprtk.hpp:22835
@ e_bf_like
Definition: Exprtk.hpp:22840
@ e_bf_abs
Definition: Exprtk.hpp:22834
@ e_bf_ncdf
Definition: Exprtk.hpp:22843
@ e_bf_roundn
Definition: Exprtk.hpp:22844
@ e_bf_deg2grad
Definition: Exprtk.hpp:22847
@ e_bf_sinc
Definition: Exprtk.hpp:22845
@ e_bf_log2
Definition: Exprtk.hpp:22841
@ e_bf_cosh
Definition: Exprtk.hpp:22837
@ e_bf_floor
Definition: Exprtk.hpp:22839
bool enable_collect_funcs_
Definition: Exprtk.hpp:23462
std::size_t max_stack_depth_
Definition: Exprtk.hpp:23475
bool enable_commutative_check_
Definition: Exprtk.hpp:23459
bool zero_return_disabled() const
Definition: Exprtk.hpp:23047
settings_store & disable_arithmetic_operation(const settings_arithmetic_opr arithmetic)
Definition: Exprtk.hpp:23199
bool control_struct_enabled(const std::string &control_struct) const
Definition: Exprtk.hpp:23057
settings_store & disable_base_function(const settings_base_funcs bf)
Definition: Exprtk.hpp:23160
std::size_t max_local_vector_size_
Definition: Exprtk.hpp:23477
void set_max_node_depth(const std::size_t max_node_depth)
Definition: Exprtk.hpp:23351
settings_store & disable_all_arithmetic_ops()
Definition: Exprtk.hpp:22990
bool commutative_check_enabled() const
Definition: Exprtk.hpp:23036
settings_arithmetic_opr
Definition: Exprtk.hpp:22871
@ e_arith_add
Definition: Exprtk.hpp:22873
@ e_arith_div
Definition: Exprtk.hpp:22874
settings_store & disable_control_structure(const settings_control_structs ctrl_struct)
Definition: Exprtk.hpp:23173
settings_store & disable_commutative_check()
Definition: Exprtk.hpp:23023
void set_max_local_vector_size(const std::size_t max_local_vector_size)
Definition: Exprtk.hpp:23356
disabled_entity_set_t disabled_logic_set_
Definition: Exprtk.hpp:23470
bool enable_sequence_check_
Definition: Exprtk.hpp:23458
std::size_t max_node_depth() const
Definition: Exprtk.hpp:23366
std::size_t max_node_depth_
Definition: Exprtk.hpp:23476
settings_store & enable_logic_operation(const settings_logic_opr logic)
Definition: Exprtk.hpp:23274
bool inequality_enabled(const details::operator_type &inequality) const
Definition: Exprtk.hpp:23091
bool inequality_disabled(const details::operator_type &inequality) const
Definition: Exprtk.hpp:23151
disabled_entity_set_t disabled_ctrl_set_
Definition: Exprtk.hpp:23469
std::string assign_opr_to_string(details::operator_type opr) const
Definition: Exprtk.hpp:23395
settings_store(const std::size_t compile_options=default_compile_all_opts)
Definition: Exprtk.hpp:22901
settings_store & disable_all_logic_ops()
Definition: Exprtk.hpp:22981
settings_store & disable_strength_reduction()
Definition: Exprtk.hpp:23029
disabled_entity_set_t disabled_func_set_
Definition: Exprtk.hpp:23468
settings_store & enable_local_vardef()
Definition: Exprtk.hpp:22945
bool logic_disabled(const std::string &logic_operation) const
Definition: Exprtk.hpp:23116
bool joiner_enabled() const
Definition: Exprtk.hpp:23037
bool enable_strength_reduction_
Definition: Exprtk.hpp:23460
settings_store & enable_strength_reduction()
Definition: Exprtk.hpp:22957
settings_store & disable_local_vardef()
Definition: Exprtk.hpp:23017
bool collect_assignments_enabled() const
Definition: Exprtk.hpp:23044
bool numeric_check_enabled() const
Definition: Exprtk.hpp:23038
bool arithmetic_enabled(const details::operator_type &arithmetic_operation) const
Definition: Exprtk.hpp:23073
void load_compile_options(const std::size_t compile_options)
Definition: Exprtk.hpp:23378
settings_logic_opr
Definition: Exprtk.hpp:22863
@ e_logic_scand
Definition: Exprtk.hpp:22867
@ e_logic_and
Definition: Exprtk.hpp:22865
@ e_logic_not
Definition: Exprtk.hpp:22866
bool replacer_enabled() const
Definition: Exprtk.hpp:23035
bool strength_reduction_enabled() const
Definition: Exprtk.hpp:23041
bool arithmetic_disabled(const details::operator_type arithmetic_operation) const
Definition: Exprtk.hpp:23142
bool function_enabled(const std::string &function_name) const
Definition: Exprtk.hpp:23049
bool logic_disabled(const details::operator_type logic_operation) const
Definition: Exprtk.hpp:23133
bool sequence_check_enabled() const
Definition: Exprtk.hpp:23040
std::string logic_opr_to_string(details::operator_type opr) const
Definition: Exprtk.hpp:23439
settings_store & enable_all_inequality_ops()
Definition: Exprtk.hpp:22939
void set_max_stack_depth(const std::size_t max_stack_depth)
Definition: Exprtk.hpp:23346
settings_store & enable_assignment_operation(const settings_assignment_opr assignment)
Definition: Exprtk.hpp:23310
bool enable_bracket_check_
Definition: Exprtk.hpp:23457
settings_store & disable_all_assignment_ops()
Definition: Exprtk.hpp:22999
Definition: Exprtk.hpp:21930
~stack_limit_handler()
Definition: Exprtk.hpp:21950
stack_limit_handler & operator=(const stack_limit_handler &) exprtk_delete
parser_t & parser_
Definition: Exprtk.hpp:21966
stack_limit_handler(const stack_limit_handler &) exprtk_delete
stack_limit_handler(parser< T > &p)
Definition: Exprtk.hpp:21935
parser< T > parser_t
Definition: Exprtk.hpp:21933
bool operator!()
Definition: Exprtk.hpp:21956
bool limit_exceeded_
Definition: Exprtk.hpp:21967
Definition: Exprtk.hpp:27339
std::size_t paramseq_count() const
Definition: Exprtk.hpp:27430
std::vector< function_prototype_t > function_definition_list_t
Definition: Exprtk.hpp:27356
const return_type_t default_return_type_
Definition: Exprtk.hpp:27595
parser_t & parser_
Definition: Exprtk.hpp:27593
return_type_t return_type(const std::size_t &index) const
Definition: Exprtk.hpp:27440
bool is_valid_token(std::string param_seq, function_prototype_t &funcproto) const
Definition: Exprtk.hpp:27492
parser< T > parser_t
Definition: Exprtk.hpp:27355
bool allow_zero_parameters() const
Definition: Exprtk.hpp:27450
type_checker & operator=(const type_checker &) exprtk_delete
bool verify(const std::string ¶m_seq, std::size_t &pseq_index)
Definition: Exprtk.hpp:27370
bool invalid_state_
Definition: Exprtk.hpp:27592
bool invalid() const
Definition: Exprtk.hpp:27445
return_type_t
Definition: Exprtk.hpp:27343
type_checker(const type_checker &) exprtk_delete
function_definition_list_t function_definition_list_
Definition: Exprtk.hpp:27596
std::string paramseq(const std::size_t &index) const
Definition: Exprtk.hpp:27435
std::string function_name_
Definition: Exprtk.hpp:27594
std::vector< std::string > split_param_seq(const std::string ¶m_seq, const details::char_t delimiter='|') const
Definition: Exprtk.hpp:27466
type_checker(parser_t &p, const std::string &func_name, const std::string &func_prototypes, const return_type_t default_return_type)
Definition: Exprtk.hpp:27358
void parse_function_prototypes(const std::string &func_prototypes)
Definition: Exprtk.hpp:27541
Definition: Exprtk.hpp:21332
expression_node_ptr parse_string_function_call(igeneric_function< T > *function, const std::string &function_name)
Definition: Exprtk.hpp:27788
std::set< std::string, details::ilesscompare > disabled_func_set_t
Definition: Exprtk.hpp:21433
parser< T > & operator=(const parser< T > &) exprtk_delete
ifunction< T > F
Definition: Exprtk.hpp:21344
sf4_map_t sf4_map_
Definition: Exprtk.hpp:40214
expression_node_ptr parse_swap_statement()
Definition: Exprtk.hpp:28829
lexer::helper::bracket_checker bracket_checker_
Definition: Exprtk.hpp:40228
expression_node_ptr parse_for_loop()
Definition: Exprtk.hpp:25813
details::assignment_node< T > assignment_node_t
Definition: Exprtk.hpp:21397
void enable_unknown_symbol_resolver(unknown_symbol_resolver &usr)
Definition: Exprtk.hpp:23913
expression_node_ptr parse_function_invocation(ifunction< T > *function, const std::string &function_name)
Definition: Exprtk.hpp:24711
interval_container_t< const void * > immutable_memory_map_t
Definition: Exprtk.hpp:29262
settings_store settings_
Definition: Exprtk.hpp:40197
bool is_invalid_inequality_operation(const details::operator_type operation) const
Definition: Exprtk.hpp:24012
details::vector_node< T > vector_node_t
Definition: Exprtk.hpp:21382
expression_node_ptr parse_special_function()
Definition: Exprtk.hpp:27978
expression_node_ptr parse_expression(precedence_level precedence=e_level00)
Definition: Exprtk.hpp:24192
void init_precompilation()
Definition: Exprtk.hpp:23525
void clear_vector_access_runtime_check()
Definition: Exprtk.hpp:23944
std::multimap< std::string, details::base_operation_t, details::ilesscompare > base_ops_map_t
Definition: Exprtk.hpp:21432
details::assignment_vec_elem_node< T > assignment_vec_elem_node_t
Definition: Exprtk.hpp:21398
bool is_invalid_assignment_operation(const details::operator_type operation) const
Definition: Exprtk.hpp:24007
std::map< std::string, std::pair< quaternary_functor_t, operator_t> > sf4_map_t
Definition: Exprtk.hpp:21429
details::trinary_node< T > trinary_node_t
Definition: Exprtk.hpp:21354
details::conditional_string_node< T > conditional_string_node_t
Definition: Exprtk.hpp:21394
bool parse_range(range_t &rp, const bool skip_lsqr=false)
Definition: Exprtk.hpp:26740
binary_op_map_t binary_op_map_
Definition: Exprtk.hpp:40211
details::rebasevector_celem_node< T > rebasevector_celem_node_t
Definition: Exprtk.hpp:21379
details::T0oT1oT2oT3_define< T, cref_t, cref_t, const_t, cref_t > vovocov_t
Definition: Exprtk.hpp:21449
details::vector_size_node< T > vector_size_node_t
Definition: Exprtk.hpp:21383
expression_t compile(const std::string &expression_string, symbol_table_t &symtab)
Definition: Exprtk.hpp:23698
details::unary_node< T > unary_node_t
Definition: Exprtk.hpp:21352
bool compile(const std::string &expression_string, expression< T > &expr)
Definition: Exprtk.hpp:23589
bool valid_vararg_operation(const std::string &symbol) const
Definition: Exprtk.hpp:23970
expression_node_t * expression_node_ptr
Definition: Exprtk.hpp:21409
bool parse_igeneric_function_params(std::string ¶m_type_list, std::vector< expression_node_ptr > &arg_list, const std::string &function_name, igeneric_function< T > *function, const type_checker &tc)
Definition: Exprtk.hpp:27723
expression_node_ptr parse_vector()
Definition: Exprtk.hpp:27139
details::assignment_vec_elem_rtc_node< T > assignment_vec_elem_rtc_node_t
Definition: Exprtk.hpp:21399
std::map< std::string, std::pair< trinary_functor_t,operator_t> > sf3_map_t
Definition: Exprtk.hpp:21428
parser(const parser< T > &) exprtk_delete
void register_compilation_timeout_check(compilation_check &compchk)
Definition: Exprtk.hpp:23934
details::T0oT1oT2oT3_define< T, cref_t, cref_t, cref_t, cref_t > vovovov_t
Definition: Exprtk.hpp:21447
void load_unary_operations_map(unary_op_map_t &m)
Definition: Exprtk.hpp:40002
void clear_compilation_timeout_check()
Definition: Exprtk.hpp:23949
expression_node_ptr parse_multi_switch_statement()
Definition: Exprtk.hpp:26225
details::switch_node< T > switch_node_t
Definition: Exprtk.hpp:21372
details::T0oT1oT2oT3_define< T, cref_t, const_t, cref_t, cref_t > vocovov_t
Definition: Exprtk.hpp:21450
details::assignment_vecvec_node< T > assignment_vecvec_node_t
Definition: Exprtk.hpp:21404
inv_binary_op_map_t inv_binary_op_map_
Definition: Exprtk.hpp:40212
expression_node_ptr parse_base_operation()
Definition: Exprtk.hpp:24951
std::size_t parse_base_function_call(expression_node_ptr(¶m_list)[MaxNumberofParameters], const std::string &function_name="")
Definition: Exprtk.hpp:24879
details::for_loop_rtc_node< T > for_loop_rtc_node_t
Definition: Exprtk.hpp:21363
bool valid_base_operation(const std::string &symbol) const
Definition: Exprtk.hpp:23956
expression_node_ptr parse_continue_statement()
Definition: Exprtk.hpp:28105
details::for_loop_bc_node< T > for_loop_bc_node_t
Definition: Exprtk.hpp:21367
igeneric_function< T > igeneric_function_t
Definition: Exprtk.hpp:21349
vector_holder_t * vector_holder_ptr
Definition: Exprtk.hpp:21414
expression< T >::symtab_list_t symbol_table_list_t
Definition: Exprtk.hpp:21412
unknown_symbol_resolver default_usr_
Definition: Exprtk.hpp:40208
void load_sf3_map(sf3_map_t &sf3_map)
Definition: Exprtk.hpp:40105
std::map< operator_t, unary_functor_t > unary_op_map_t
Definition: Exprtk.hpp:21424
details::while_loop_bc_rtc_node< T > while_loop_bc_rtc_node_t
Definition: Exprtk.hpp:21368
void lodge_symbol(const std::string &symbol, const symbol_type st)
Definition: Exprtk.hpp:26924
parser(const settings_t &settings=settings_t())
Definition: Exprtk.hpp:23484
details::assignment_vec_node< T > assignment_vec_node_t
Definition: Exprtk.hpp:21403
details::range_pack< T > range_t
Definition: Exprtk.hpp:21384
bool is_invalid_logic_operation(const details::operator_type operation) const
Definition: Exprtk.hpp:23997
expression_node_ptr parse_conditional_statement_01(expression_node_ptr condition)
Definition: Exprtk.hpp:25018
expression_node_ptr simplify(Sequence< expression_node_ptr, Allocator1 > &expression_list, Sequence< bool, Allocator2 > &side_effect_list, const bool specialise_on_final_type=false)
Definition: Exprtk.hpp:26578
details::string_concat_node< T > string_concat_node_t
Definition: Exprtk.hpp:21391
expression_node_ptr parse_generic_function_call(igeneric_function< T > *function, const std::string &function_name)
Definition: Exprtk.hpp:27599
details::stringvar_node< T > stringvar_node_t
Definition: Exprtk.hpp:21386
void return_cleanup()
Definition: Exprtk.hpp:40179
functor_t::qfunc_t quaternary_functor_t
Definition: Exprtk.hpp:21417
details::vector_elem_node< T > vector_elem_node_t
Definition: Exprtk.hpp:21374
bool is_invalid_arithmetic_operation(const details::operator_type operation) const
Definition: Exprtk.hpp:24002
interval_t make_memory_range(details::char_cptr begin, const std::size_t size)
Definition: Exprtk.hpp:29277
void pop_current_state()
Definition: Exprtk.hpp:24156
details::T0oT1oT2_define< T, const_t, const_t, cref_t > cocov_t
Definition: Exprtk.hpp:21444
loop_runtime_check_ptr loop_runtime_check_
Definition: Exprtk.hpp:40233
details::while_loop_bc_node< T > while_loop_bc_node_t
Definition: Exprtk.hpp:21365
details::T0oT1_define< T, cref_t, cref_t > vov_t
Definition: Exprtk.hpp:21435
details::expression_node< T > expression_node_t
Definition: Exprtk.hpp:21350
details::vector_celem_rtc_node< T > vector_celem_rtc_node_t
Definition: Exprtk.hpp:21377
dependent_entity_collector dec_
Definition: Exprtk.hpp:40201
std::vector< state_t > current_state_stack_
Definition: Exprtk.hpp:40217
ifunction< T > ifunction_t
Definition: Exprtk.hpp:21347
expression_node_ptr parse_corpus()
Definition: Exprtk.hpp:24035
std::deque< parser_error::type > error_list_
Definition: Exprtk.hpp:40202
lexer::helper::operator_joiner operator_joiner_3_
Definition: Exprtk.hpp:40226
unknown_symbol_resolver * unknown_symbol_resolver_
Definition: Exprtk.hpp:40207
details::while_loop_rtc_node< T > while_loop_rtc_node_t
Definition: Exprtk.hpp:21361
expression_node_ptr parse_vararg_function_call(ivararg_function< T > *vararg_function, const std::string &vararg_function_name)
Definition: Exprtk.hpp:27241
expression_node_ptr parse_switch_statement()
Definition: Exprtk.hpp:26052
details::T0oT1oT2_define< T, const_t, cref_t, cref_t > covov_t
Definition: Exprtk.hpp:21442
details::T0oT1oT2_define< T, cref_t, cref_t, cref_t > vovov_t
Definition: Exprtk.hpp:21439
details::assignment_rebasevec_elem_rtc_node< T > assignment_rebasevec_elem_rtc_node_t
Definition: Exprtk.hpp:21401
details::T0oT1oT2_define< T, cref_t, const_t, cref_t > vocov_t
Definition: Exprtk.hpp:21441
const T const_t
Definition: Exprtk.hpp:21343
parser_helper prsrhlpr_t
Definition: Exprtk.hpp:21460
details::cons_conditional_str_node< T > cons_conditional_str_node_t
Definition: Exprtk.hpp:21395
ivararg_function< T > VAF
Definition: Exprtk.hpp:21345
expression_node_ptr parse_const_string()
Definition: Exprtk.hpp:27037
void register_local_vars(expression< T > &e)
Definition: Exprtk.hpp:39937
vector_access_runtime_check_ptr vector_access_runtime_check_
Definition: Exprtk.hpp:40234
symbol_type
Definition: Exprtk.hpp:22630
void parse_pending_vector_index_operator(expression_node_ptr &expression)
Definition: Exprtk.hpp:26522
settings_store settings_t
Definition: Exprtk.hpp:23482
expression_node_ptr parse_function_call(ifunction< T > *function, const std::string &function_name)
Definition: Exprtk.hpp:24764
void set_synthesis_error(const std::string &synthesis_error_message)
Definition: Exprtk.hpp:39929
details::conditional_node< T > conditional_node_t
Definition: Exprtk.hpp:21356
expression_node_ptr parse_overload_function_call(igeneric_function< T > *function, const std::string &function_name)
Definition: Exprtk.hpp:27839
details::T0oT1oT2oT3_define< T, cref_t, const_t, const_t, cref_t > vococov_t
Definition: Exprtk.hpp:21456
lexer::helper::operator_joiner operator_joiner_2_
Definition: Exprtk.hpp:40225
expression_node_ptr parse_function_call_0(ifunction< T > *function, const std::string &function_name)
Definition: Exprtk.hpp:24851
dependent_entity_collector & dec()
Definition: Exprtk.hpp:23878
functor_t::tfunc_t trinary_functor_t
Definition: Exprtk.hpp:21418
details::T0oT1_define< T, const_t, cref_t > cov_t
Definition: Exprtk.hpp:21436
details::for_loop_node< T > for_loop_node_t
Definition: Exprtk.hpp:21360
functor_t::bfunc_t binary_functor_t
Definition: Exprtk.hpp:21419
void process_lexer_errors()
Definition: Exprtk.hpp:23706
bool post_variable_process(const std::string &symbol)
Definition: Exprtk.hpp:29184
igeneric_function< T > GF
Definition: Exprtk.hpp:21346
details::assignment_string_node< T > assignment_string_node_t
Definition: Exprtk.hpp:21392
lexer::helper::symbol_replacer symbol_replacer_
Definition: Exprtk.hpp:40227
void enable_unknown_symbol_resolver(unknown_symbol_resolver *usr=reinterpret_cast< unknown_symbol_resolver * >(0))
Definition: Exprtk.hpp:23903
ivararg_function< T > ivararg_function_t
Definition: Exprtk.hpp:21348
details::T0oT1oT2oT3_define< T, const_t, cref_t, cref_t, const_t > covovoc_t
Definition: Exprtk.hpp:21455
expression_node_ptr parse_while_loop()
Definition: Exprtk.hpp:25556
settings_store & settings()
Definition: Exprtk.hpp:23850
expression_node_ptr parse_string()
Definition: Exprtk.hpp:26931
details::scand_node< T > scand_node_t
Definition: Exprtk.hpp:21406
std::map< binary_functor_t, operator_t> inv_binary_op_map_t
Definition: Exprtk.hpp:21431
expression_node_ptr parse_define_var_statement()
Definition: Exprtk.hpp:28560
void push_current_state(const state_t current_state)
Definition: Exprtk.hpp:24151
details::binary_node< T > binary_node_t
Definition: Exprtk.hpp:21353
bool remove_replace_symbol(const std::string &symbol)
Definition: Exprtk.hpp:23893
expression_node_ptr parse_conditional_statement()
Definition: Exprtk.hpp:25351
results_context_t * results_context_
Definition: Exprtk.hpp:40206
details::literal_node< T > literal_node_t
Definition: Exprtk.hpp:21351
immutable_symtok_map_t immutable_symtok_map_
Definition: Exprtk.hpp:40220
~parser()
Definition: Exprtk.hpp:23522
symtab_store symtab_store_
Definition: Exprtk.hpp:40200
compilation_check_ptr compilation_check_ptr_
Definition: Exprtk.hpp:40235
sf3_map_t sf3_map_
Definition: Exprtk.hpp:40213
details::repeat_until_loop_node< T > repeat_until_loop_node_t
Definition: Exprtk.hpp:21359
details::repeat_until_loop_bc_node< T > repeat_until_loop_bc_node_t
Definition: Exprtk.hpp:21366
details::assignment_rebasevec_elem_node< T > assignment_rebasevec_elem_node_t
Definition: Exprtk.hpp:21400
std::map< operator_t, trinary_functor_t > trinary_op_map_t
Definition: Exprtk.hpp:21426
expression_node_ptr parse_vararg_function()
Definition: Exprtk.hpp:26341
void lodge_immutable_symbol(const lexer::token &token, const interval_t interval)
Definition: Exprtk.hpp:29282
details::variable_node< T > variable_node_t
Definition: Exprtk.hpp:21373
details::T0oT1oT2oT3_define< T, cref_t, const_t, cref_t, const_t > vocovoc_t
Definition: Exprtk.hpp:21454
details::T0oT1_define< T, cref_t, const_t > voc_t
Definition: Exprtk.hpp:21437
expression_generator< T > expression_generator_
Definition: Exprtk.hpp:40198
expression_node_ptr parse_multi_sequence(const std::string &source="", const bool enforce_crlbrackets=false)
Definition: Exprtk.hpp:26657
expression_node_ptr parse_branch(precedence_level precedence=e_level00)
Definition: Exprtk.hpp:29730
expression_node_ptr parse_break_statement()
Definition: Exprtk.hpp:28030
void load_inv_binary_operations_map(inv_binary_op_map_t &m)
Definition: Exprtk.hpp:40077
details::T0oT1oT2oT3_define< T, const_t, cref_t, cref_t, cref_t > covovov_t
Definition: Exprtk.hpp:21451
lexer::helper::sequence_validator sequence_validator_
Definition: Exprtk.hpp:40230
results_context_t & results_ctx()
Definition: Exprtk.hpp:40169
lexer::helper::commutative_inserter commutative_inserter_
Definition: Exprtk.hpp:40224
interval_t make_memory_range(const T &t)
Definition: Exprtk.hpp:29265
expression< T > expression_t
Definition: Exprtk.hpp:21410
void handle_brkcnt_scope_exit()
Definition: Exprtk.hpp:25550
expression_node_ptr parse_conditional_statement_02(expression_node_ptr condition)
Definition: Exprtk.hpp:25154
details::T0oT1oT2oT3_define< T, cref_t, cref_t, cref_t, const_t > vovovoc_t
Definition: Exprtk.hpp:21448
std::string construct_subexpr(lexer::token &begin_token, lexer::token &end_token)
Definition: Exprtk.hpp:24111
expression_node_ptr parse_not_statement()
Definition: Exprtk.hpp:25534
details::operator_type operator_t
Definition: Exprtk.hpp:21422
bool run_assemblies()
Definition: Exprtk.hpp:23743
details::functor_t< T > functor_t
Definition: Exprtk.hpp:21416
const T & cref_t
Definition: Exprtk.hpp:21342
void register_loop_runtime_check(loop_runtime_check &lrtchk)
Definition: Exprtk.hpp:23924
details::vector_elem_rtc_node< T > vector_elem_rtc_node_t
Definition: Exprtk.hpp:21376
parser_state state_
Definition: Exprtk.hpp:40204
details::for_loop_bc_rtc_node< T > for_loop_bc_rtc_node_t
Definition: Exprtk.hpp:21370
details::conditional_vector_node< T > conditional_vector_node_t
Definition: Exprtk.hpp:21405
details::repeat_until_loop_bc_rtc_node< T > repeat_until_loop_bc_rtc_node_t
Definition: Exprtk.hpp:21369
lexer::helper::sequence_validator_3tokens sequence_validator_3tkns_
Definition: Exprtk.hpp:40231
void set_error(const parser_error::type &error_type)
Definition: Exprtk.hpp:39916
expression_node_ptr parse_null_statement()
Definition: Exprtk.hpp:28023
details::T0oT1oT2_define< T, cref_t, cref_t, const_t > vovoc_t
Definition: Exprtk.hpp:21440
expression_node_ptr synthesize_vector_element(const std::string &vector_name, vector_holder_ptr vec, expression_node_ptr vec_node, expression_node_ptr index_expr)
Definition: Exprtk.hpp:27211
lexer::helper::numeric_checker< T > numeric_checker_
Definition: Exprtk.hpp:40229
details::rebasevector_elem_rtc_node< T > rebasevector_elem_rtc_node_t
Definition: Exprtk.hpp:21380
parser_error::type get_error(const std::size_t &index) const
Definition: Exprtk.hpp:23855
void load_binary_operations_map(binary_op_map_t &m)
Definition: Exprtk.hpp:40049
bool post_bracket_process(const typename token_t::token_type &token, expression_node_ptr &branch)
Definition: Exprtk.hpp:29209
bool simplify_unary_negation_branch(expression_node_ptr &node)
Definition: Exprtk.hpp:24476
details::rebasevector_celem_rtc_node< T > rebasevector_celem_rtc_node_t
Definition: Exprtk.hpp:21381
std::string error() const
Definition: Exprtk.hpp:23863
details::node_allocator node_allocator_
Definition: Exprtk.hpp:40199
details::generic_string_range_node< T > generic_string_range_node_t
Definition: Exprtk.hpp:21390
details::T0oT1oT2oT3_define< T, const_t, cref_t, const_t, cref_t > covocov_t
Definition: Exprtk.hpp:21453
details::cons_conditional_node< T > cons_conditional_node_t
Definition: Exprtk.hpp:21357
void register_vector_access_runtime_check(vector_access_runtime_check &vartchk)
Definition: Exprtk.hpp:23929
void remove_last_error()
Definition: Exprtk.hpp:39921
unary_op_map_t unary_op_map_
Definition: Exprtk.hpp:40210
expression_node_ptr parse_define_vector_statement(const std::string &vec_name)
Definition: Exprtk.hpp:28129
expression_node_ptr parse_vector_index(const std::string &vector_name="")
Definition: Exprtk.hpp:27109
scope_element_manager sem_
Definition: Exprtk.hpp:40216
details::assignment_rebasevec_celem_node< T > assignment_rebasevec_celem_node_t
Definition: Exprtk.hpp:21402
expression_node_ptr parse_ternary_conditional_statement(expression_node_ptr condition)
Definition: Exprtk.hpp:25414
functor_t::ufunc_t unary_functor_t
Definition: Exprtk.hpp:21420
expression_node_ptr parse_symbol()
Definition: Exprtk.hpp:29614
bool replace_symbol(const std::string &old_symbol, const std::string &new_symbol)
Definition: Exprtk.hpp:23883
lexer::token token_t
Definition: Exprtk.hpp:21408
details::assignment_string_range_node< T > assignment_string_range_node_t
Definition: Exprtk.hpp:21393
details::scor_node< T > scor_node_t
Definition: Exprtk.hpp:21407
std::map< operator_t, binary_functor_t > binary_op_map_t
Definition: Exprtk.hpp:21425
results_context< T > results_context_t
Definition: Exprtk.hpp:21458
std::string synthesis_error_
Definition: Exprtk.hpp:40215
expression_node_ptr parse_string_range_statement(expression_node_ptr &expression)
Definition: Exprtk.hpp:26434
void register_return_results(expression< T > &e)
Definition: Exprtk.hpp:39996
details::T0oT1oT2_define< T, const_t, cref_t, const_t > covoc_t
Definition: Exprtk.hpp:21443
details::vector_holder< T > vector_holder_t
Definition: Exprtk.hpp:21413
interval_t make_memory_range(const T *begin, const std::size_t size)
Definition: Exprtk.hpp:29272
std::size_t error_count() const
Definition: Exprtk.hpp:23873
expression_node_ptr parse_define_string_statement(const std::string &str_name, expression_node_ptr initialisation_expression)
Definition: Exprtk.hpp:28476
precedence_level
Definition: Exprtk.hpp:21336
@ e_level10
Definition: Exprtk.hpp:21339
@ e_level05
Definition: Exprtk.hpp:21338
@ e_level00
Definition: Exprtk.hpp:21337
details::string_range_node< T > string_range_node_t
Definition: Exprtk.hpp:21388
base_ops_map_t base_ops_map_
Definition: Exprtk.hpp:40209
details::quaternary_node< T > quaternary_node_t
Definition: Exprtk.hpp:21355
std::deque< bool > brkcnt_list_
Definition: Exprtk.hpp:40203
void clear_loop_runtime_check()
Definition: Exprtk.hpp:23939
void disable_unknown_symbol_resolver()
Definition: Exprtk.hpp:23918
immutable_memory_map_t immutable_memory_map_
Definition: Exprtk.hpp:40219
expression_node_ptr parse_return_statement()
Definition: Exprtk.hpp:29063
details::vector_celem_node< T > vector_celem_node_t
Definition: Exprtk.hpp:21375
state_t current_state() const
Definition: Exprtk.hpp:24164
void load_sf4_map(sf4_map_t &sf4_map)
Definition: Exprtk.hpp:40129
details::string_literal_node< T > string_literal_node_t
Definition: Exprtk.hpp:21387
expression_node_ptr parse_symtab_symbol()
Definition: Exprtk.hpp:29288
interval_container_t< const void * >::interval_t interval_t
Definition: Exprtk.hpp:29261
details::T0oT1oT2_define< T, cref_t, const_t, const_t > vococ_t
Definition: Exprtk.hpp:21445
details::while_loop_node< T > while_loop_node_t
Definition: Exprtk.hpp:21358
expression_node_ptr parse_uninitialised_var_statement(const std::string &var_name)
Definition: Exprtk.hpp:28743
std::map< interval_t, token_t > immutable_symtok_map_t
Definition: Exprtk.hpp:29263
bool local_variable_is_shadowed(const std::string &symbol)
Definition: Exprtk.hpp:28554
bool resolve_unknown_symbol_
Definition: Exprtk.hpp:40205
lexer::helper::helper_assembly helper_assembly_
Definition: Exprtk.hpp:40222
symbol_table< T > symbol_table_t
Definition: Exprtk.hpp:21411
details::repeat_until_loop_rtc_node< T > repeat_until_loop_rtc_node_t
Definition: Exprtk.hpp:21362
details::rebasevector_elem_node< T > rebasevector_elem_node_t
Definition: Exprtk.hpp:21378
collect_type
Definition: Exprtk.hpp:22622
static expression_node_ptr error_node()
Definition: Exprtk.hpp:24531
bool parse_pending_string_rangesize(expression_node_ptr &expression)
Definition: Exprtk.hpp:26500
expression_node_ptr parse_repeat_until_loop()
Definition: Exprtk.hpp:25653
bool halt_compilation_check()
Definition: Exprtk.hpp:24171
details::const_string_range_node< T > const_string_range_node_t
Definition: Exprtk.hpp:21389
Definition: Exprtk.hpp:40759
polynomial()
Definition: Exprtk.hpp:40908
virtual ~polynomial()
Definition: Exprtk.hpp:40914
Definition: Exprtk.hpp:4813
type_store_t::parameter_list parameter_list_t
Definition: Exprtk.hpp:4906
type_store_t::scalar_view scalar_t
Definition: Exprtk.hpp:4817
type_store_t::vector_view vector_t
Definition: Exprtk.hpp:4818
bool get_string(const std::size_t &index, std::string &out) const
Definition: Exprtk.hpp:4883
std::size_t count() const
Definition: Exprtk.hpp:4825
void assign(const parameter_list_t &pl)
Definition: Exprtk.hpp:4908
results_context()
Definition: Exprtk.hpp:4821
const type_store_t & operator[](const std::size_t &index) const
Definition: Exprtk.hpp:4838
type_store_t::string_view string_t
Definition: Exprtk.hpp:4819
bool get_vector(const std::size_t &index, std::vector< T > &out) const
Definition: Exprtk.hpp:4878
bool get_scalar(const std::size_t &index, T &out) const
Definition: Exprtk.hpp:4843
bool get_vector(const std::size_t &index, OutputIterator out_itr) const
Definition: Exprtk.hpp:4859
bool results_available_
Definition: Exprtk.hpp:4914
type_store_t & operator[](const std::size_t &index)
Definition: Exprtk.hpp:4833
std::vector< type_store_t > ts_list_t
Definition: Exprtk.hpp:4905
void clear()
Definition: Exprtk.hpp:4900
type_store< T > type_store_t
Definition: Exprtk.hpp:4816
Definition: Exprtk.hpp:42408
generic_type::scalar_view scalar_t
Definition: Exprtk.hpp:42489
close()
Definition: Exprtk.hpp:42463
write()
Definition: Exprtk.hpp:42494
exprtk::igeneric_function< T > igfun_t
Definition: Exprtk.hpp:42411
getline()
Definition: Exprtk.hpp:42607
igfun_t::parameter_list_t parameter_list_t
Definition: Exprtk.hpp:42412
igfun_t::generic_type generic_type
Definition: Exprtk.hpp:42413
open()
Definition: Exprtk.hpp:42418
generic_type::vector_view vector_t
Definition: Exprtk.hpp:42490
generic_type::string_view string_t
Definition: Exprtk.hpp:42414
read()
Definition: Exprtk.hpp:42551
eof()
Definition: Exprtk.hpp:42623
Definition: Exprtk.hpp:42741
sort()
Definition: Exprtk.hpp:43264
generic_type::scalar_view scalar_t
Definition: Exprtk.hpp:42986
all_false()
Definition: Exprtk.hpp:42799
axpbz()
Definition: Exprtk.hpp:43838
assign()
Definition: Exprtk.hpp:43374
shift_left()
Definition: Exprtk.hpp:43146
ror()
Definition: Exprtk.hpp:43095
any_true()
Definition: Exprtk.hpp:42847
generic_type::vector_view vector_t
Definition: Exprtk.hpp:42747
axpy()
Definition: Exprtk.hpp:43539
iota()
Definition: Exprtk.hpp:43426
generic_type::string_view string_t
Definition: Exprtk.hpp:43259
axpby()
Definition: Exprtk.hpp:43586
all_true()
Definition: Exprtk.hpp:42751
sumk()
Definition: Exprtk.hpp:43486
threshold_above()
Definition: Exprtk.hpp:44086
axpbsyz()
Definition: Exprtk.hpp:43785
igfun_t::generic_type generic_type
Definition: Exprtk.hpp:42746
diff()
Definition: Exprtk.hpp:43886
axpbsy()
Definition: Exprtk.hpp:43735
axpbyz()
Definition: Exprtk.hpp:43684
axpyz()
Definition: Exprtk.hpp:43634
any_false()
Definition: Exprtk.hpp:42895
nthelement()
Definition: Exprtk.hpp:43327
shift_right()
Definition: Exprtk.hpp:43204
copy()
Definition: Exprtk.hpp:42991
igfun_t::parameter_list_t parameter_list_t
Definition: Exprtk.hpp:42745
threshold_below()
Definition: Exprtk.hpp:44027
exprtk::igeneric_function< T > igfun_t
Definition: Exprtk.hpp:42744
count()
Definition: Exprtk.hpp:42943
dotk()
Definition: Exprtk.hpp:43980
rol()
Definition: Exprtk.hpp:43044
dot()
Definition: Exprtk.hpp:43934
Definition: Exprtk.hpp:19027
std::string name_
Definition: Exprtk.hpp:19056
details::stringvar_node< T > stringvar_node_t
Definition: Exprtk.hpp:19030
std::string name() const
Definition: Exprtk.hpp:19042
bool valid() const
Definition: Exprtk.hpp:19037
stringvar_base(const std::string &name, stringvar_node_t *svn)
Definition: Exprtk.hpp:19032
void rebase(std::string &s)
Definition: Exprtk.hpp:19048
stringvar_node_t * string_varnode_
Definition: Exprtk.hpp:19057
Definition: Exprtk.hpp:19066
void clear_local_constants()
Definition: Exprtk.hpp:19851
bool add_package(Package &package)
Definition: Exprtk.hpp:20391
symbol_table(const symtab_mutability_type mutability=e_mutable)
Definition: Exprtk.hpp:19787
symtab_mutability_type mutability() const
Definition: Exprtk.hpp:19824
bool remove_vararg_function(const std::string &vararg_function_name)
Definition: Exprtk.hpp:20348
bool add_constant(const std::string &constant_name, const T &value)
Definition: Exprtk.hpp:20103
control_block * control_block_
Definition: Exprtk.hpp:20763
variable_ptr get_variable(const T &var_ref) const
Definition: Exprtk.hpp:19910
std::size_t function_count() const
Definition: Exprtk.hpp:19884
generic_function_ptr get_string_function(const std::string &function_name) const
Definition: Exprtk.hpp:19979
bool add_epsilon()
Definition: Exprtk.hpp:20378
std::size_t get_function_list(Sequence< std::string, Allocator > &function_list) const
Definition: Exprtk.hpp:20450
variable_t * variable_ptr
Definition: Exprtk.hpp:19657
bool is_vararg_function(const std::string &vararg_function_name) const
Definition: Exprtk.hpp:20543
bool remove_variable(const std::string &variable_name, const bool delete_node=true)
Definition: Exprtk.hpp:20322
void clear_variables(const bool delete_node=true)
Definition: Exprtk.hpp:19829
void clear_functions()
Definition: Exprtk.hpp:19834
control_block::st_data local_data_t
Definition: Exprtk.hpp:20751
bool add_vector(const std::string &vector_name, std::vector< T, Allocator > &v)
Definition: Exprtk.hpp:20294
bool is_function(const std::string &function_name) const
Definition: Exprtk.hpp:20535
std::string get_variable_name(const expression_ptr &ptr) const
Definition: Exprtk.hpp:20559
local_data_t & local_data()
Definition: Exprtk.hpp:20753
bool add_function(const std::string &vararg_function_name, vararg_function_t &vararg_function)
Definition: Exprtk.hpp:20144
bool add_function(const std::string &function_name, function_t &function)
Definition: Exprtk.hpp:20132
bool is_stringvar(const std::string &stringvar_name) const
Definition: Exprtk.hpp:20511
stringvar_base< T > get_stringvar_base(const std::string &string_name) const
Definition: Exprtk.hpp:19930
void clear_strings()
Definition: Exprtk.hpp:19839
bool add_infinity()
Definition: Exprtk.hpp:20384
details::vector_holder< T > vector_holder_t
Definition: Exprtk.hpp:19656
bool remove_vector(const std::string &vector_name)
Definition: Exprtk.hpp:20356
bool is_constant_node(const std::string &symbol_name) const
Definition: Exprtk.hpp:20035
stringvar_t * stringvar_ptr
Definition: Exprtk.hpp:19660
symbol_table< T > & operator=(const symbol_table< T > &st)
Definition: Exprtk.hpp:19806
std::size_t get_variable_list(Sequence< std::string, Allocator > &vlist) const
Definition: Exprtk.hpp:20408
bool is_vector(const std::string &vector_name) const
Definition: Exprtk.hpp:20551
std::string get_stringvar_name(const expression_ptr &ptr) const
Definition: Exprtk.hpp:20570
void load_vectors_from(const symbol_table< T > &st)
Definition: Exprtk.hpp:20681
ivararg_function< T > vararg_function_t
Definition: Exprtk.hpp:19663
vararg_function_t * vararg_function_ptr
Definition: Exprtk.hpp:19666
bool valid_symbol(const std::string &symbol, const bool check_reserved_symb=true) const
Definition: Exprtk.hpp:20699
bool add_reserved_function(const std::string &vararg_function_name, vararg_function_t &vararg_function)
Definition: Exprtk.hpp:20225
vector_holder_t * vector_holder_ptr
Definition: Exprtk.hpp:19999
T & variable_ref(const std::string &symbol_name)
Definition: Exprtk.hpp:20011
function_ptr get_function(const std::string &function_name) const
Definition: Exprtk.hpp:19949
void load_from(const symbol_table< T > &st)
Definition: Exprtk.hpp:20587
details::expression_node< T > * expression_ptr
Definition: Exprtk.hpp:19654
igeneric_function< T > generic_function_t
Definition: Exprtk.hpp:19664
std::size_t get_variable_list(Sequence< std::pair< std::string, T >, Allocator > &vlist) const
Definition: Exprtk.hpp:20398
stringvar_ptr get_stringvar(const std::string &string_name) const
Definition: Exprtk.hpp:19920
std::string get_conststr_stringvar_name(const expression_ptr &ptr) const
Definition: Exprtk.hpp:20575
void clear_vectors()
Definition: Exprtk.hpp:19846
const local_data_t & local_data() const
Definition: Exprtk.hpp:20758
bool valid_function(const std::string &symbol) const
Definition: Exprtk.hpp:20725
bool add_vector(const std::string &vector_name, T *v, const std::size_t &v_size)
Definition: Exprtk.hpp:20279
generic_function_t * generic_function_ptr
Definition: Exprtk.hpp:19667
std::size_t variable_count() const
Definition: Exprtk.hpp:19866
bool create_stringvar(const std::string &stringvar_name, const std::string &value=std::string(""))
Definition: Exprtk.hpp:20075
bool remove_stringvar(const std::string &string_name)
Definition: Exprtk.hpp:20331
std::string get_vector_name(const vector_holder_ptr &ptr) const
Definition: Exprtk.hpp:20564
exprtk_define_freefunction(00) exprtk_define_freefunction(01) exprtk_define_freefunction(02) exprtk_define_freefunction(03) exprtk_define_freefunction(04) exprtk_define_freefunction(05) exprtk_define_freefunction(06) exprtk_define_freefunction(07) exprtk_define_freefunction(08) exprtk_define_freefunction(09) exprtk_define_freefunction(10) exprtk_define_freefunction(11) exprtk_define_freefunction(12) exprtk_define_freefunction(13) exprtk_define_freefunction(14) exprtk_define_freefunction(15) inline bool add_reserved_function(const std
Definition: Exprtk.hpp:20202
bool add_constants()
Definition: Exprtk.hpp:20364
variable_ptr get_variable(const std::string &variable_name) const
Definition: Exprtk.hpp:19900
std::string & stringvar_ref(const std::string &symbol_name)
Definition: Exprtk.hpp:20023
symbol_table(const symbol_table< T > &st)
Definition: Exprtk.hpp:19800
bool add_function(const std::string &function_name, generic_function_t &function)
Definition: Exprtk.hpp:20156
generic_function_ptr get_generic_function(const std::string &function_name) const
Definition: Exprtk.hpp:19969
bool create_variable(const std::string &variable_name, const T &value=T(0))
Definition: Exprtk.hpp:20059
void clear()
Definition: Exprtk.hpp:19856
bool add_pi()
Definition: Exprtk.hpp:20371
generic_function_ptr get_overload_function(const std::string &function_name) const
Definition: Exprtk.hpp:19989
std::size_t vector_count() const
Definition: Exprtk.hpp:19892
bool operator==(const symbol_table< T > &st) const
Definition: Exprtk.hpp:19819
bool is_conststr_stringvar(const std::string &symbol_name) const
Definition: Exprtk.hpp:20519
bool add_variable(const std::string &variable_name, T &t, const bool is_constant=false)
Definition: Exprtk.hpp:20091
bool add_vector(const std::string &vector_name, exprtk::vector_view< T > &v)
Definition: Exprtk.hpp:20308
bool is_constant_string(const std::string &symbol_name) const
Definition: Exprtk.hpp:20046
void load_variables_from(const symbol_table< T > &st)
Definition: Exprtk.hpp:20665
bool valid() const
Definition: Exprtk.hpp:20581
symtab_mutability_type
Definition: Exprtk.hpp:19070
bool symbol_exists(const std::string &symbol_name, const bool check_reserved_symb=true) const
Definition: Exprtk.hpp:20477
bool add_reserved_function(const std::string &function_name, generic_function_t &function)
Definition: Exprtk.hpp:20237
details::stringvar_node< T > stringvar_t
Definition: Exprtk.hpp:19659
std::size_t get_stringvar_list(Sequence< std::string, Allocator > &svlist) const
Definition: Exprtk.hpp:20429
bool add_vector(const std::string &vector_name, T(&v)[N])
Definition: Exprtk.hpp:20267
bool add_stringvar(const std::string &stringvar_name, std::string &s, const bool is_constant=false)
Definition: Exprtk.hpp:20119
function_t * function_ptr
Definition: Exprtk.hpp:19665
ifunction< T > function_t
Definition: Exprtk.hpp:19662
std::size_t get_stringvar_list(Sequence< std::pair< std::string, std::string >, Allocator > &svlist) const
Definition: Exprtk.hpp:20419
std::size_t stringvar_count() const
Definition: Exprtk.hpp:19875
details::variable_node< T > variable_t
Definition: Exprtk.hpp:19655
std::size_t get_vector_list(Sequence< std::string, Allocator > &vec_list) const
Definition: Exprtk.hpp:20440
vector_holder_ptr get_vector(const std::string &vector_name) const
Definition: Exprtk.hpp:20001
vararg_function_ptr get_vararg_function(const std::string &vararg_function_name) const
Definition: Exprtk.hpp:19959
bool remove_function(const std::string &function_name)
Definition: Exprtk.hpp:20340
~symbol_table()
Definition: Exprtk.hpp:19794
bool is_variable(const std::string &variable_name) const
Definition: Exprtk.hpp:20502
Definition: Exprtk.hpp:41906
void stop()
Definition: Exprtk.hpp:41953
timer()
Definition: Exprtk.hpp:41937
double time() const
Definition: Exprtk.hpp:41975
bool in_use_
Definition: Exprtk.hpp:41989
struct timeval stop_time_
Definition: Exprtk.hpp:41997
struct timeval start_time_
Definition: Exprtk.hpp:41996
unsigned long long int usec_time() const
Definition: Exprtk.hpp:41959
void start()
Definition: Exprtk.hpp:41947
bool in_use() const
Definition: Exprtk.hpp:41982
Definition: Exprtk.hpp:4631
type_store & operator[](const std::size_t &index)
Definition: Exprtk.hpp:4648
const type_store & operator[](const std::size_t &index) const
Definition: Exprtk.hpp:4653
type_store & front()
Definition: Exprtk.hpp:4658
const type_store & back() const
Definition: Exprtk.hpp:4673
parameter_list(std::vector< type_store > &pl)
Definition: Exprtk.hpp:4634
const type_store & front() const
Definition: Exprtk.hpp:4663
std::size_t size() const
Definition: Exprtk.hpp:4643
bool empty() const
Definition: Exprtk.hpp:4638
type_store & back()
Definition: Exprtk.hpp:4668
std::vector< type_store > & parameter_list_
Definition: Exprtk.hpp:4680
Definition: Exprtk.hpp:4482
const std::size_t base_size_
Definition: Exprtk.hpp:4582
std::size_t size() const
Definition: Exprtk.hpp:4528
std::vector< data_ptr_t * > data_ref_
Definition: Exprtk.hpp:4585
vector_view(data_ptr_t data, const std::size_t &size)
Definition: Exprtk.hpp:4487
T * data_ptr_t
Definition: Exprtk.hpp:4485
T & operator[](const std::size_t index)
Definition: Exprtk.hpp:4539
void rebase(data_ptr_t data)
Definition: Exprtk.hpp:4505
data_ptr_t data_
Definition: Exprtk.hpp:4584
std::size_t base_size() const
Definition: Exprtk.hpp:4523
std::size_t size_
Definition: Exprtk.hpp:4583
void remove_ref(data_ptr_t *data_ref)
Definition: Exprtk.hpp:4553
data_ptr_t data() const
Definition: Exprtk.hpp:4518
void set_ref(data_ptr_t *data_ref)
Definition: Exprtk.hpp:4545
vector_view(const vector_view< T > &vv)
Definition: Exprtk.hpp:4496
bool set_size(const std::size_t new_size)
Definition: Exprtk.hpp:4563
const T & operator[](const std::size_t index) const
Definition: Exprtk.hpp:4533
const
Definition: Sensor.hpp:225
const unsigned int global_loop_batch_size
Definition: Exprtk.hpp:5044
static const double e
Definition: Exprtk.hpp:808
static const double pi
Definition: Exprtk.hpp:809
static const double log2
Definition: Exprtk.hpp:816
static const double _180_pi
Definition: Exprtk.hpp:815
static const double pi_180
Definition: Exprtk.hpp:812
static const double _1_pi
Definition: Exprtk.hpp:813
static const double _2_pi
Definition: Exprtk.hpp:814
static const double pi_2
Definition: Exprtk.hpp:810
static const double sqrt2
Definition: Exprtk.hpp:817
static const double pi_4
Definition: Exprtk.hpp:811
T floor_impl(const T v, real_type_tag)
Definition: Exprtk.hpp:1350
bool is_false_impl(const T v)
Definition: Exprtk.hpp:905
T xor_impl(const T v0, const T v1, int_type_tag)
Definition: Exprtk.hpp:1210
T ceil_impl(const T v, real_type_tag)
Definition: Exprtk.hpp:1346
T shr_impl(const T v0, const T v1, real_type_tag)
Definition: Exprtk.hpp:1116
T atan2_impl(const T, const T, int_type_tag)
Definition: Exprtk.hpp:1110
T tanh_impl(const T v, real_type_tag)
Definition: Exprtk.hpp:1360
T acosh_impl(const T v, real_type_tag)
Definition: Exprtk.hpp:1341
T nor_impl(const T v0, const T v1, real_type_tag)
Definition: Exprtk.hpp:1192
bool is_integer_impl(const T &v, real_type_tag)
Definition: Exprtk.hpp:1407
T sinc_impl(const T v, real_type_tag)
Definition: Exprtk.hpp:1326
T const_pi_impl(real_type_tag)
Definition: Exprtk.hpp:1372
T asin_impl(const T v, real_type_tag)
Definition: Exprtk.hpp:1342
T log10_impl(const T v, real_type_tag)
Definition: Exprtk.hpp:1352
T hypot_impl(const T v0, const T v1, int_type_tag)
Definition: Exprtk.hpp:1098
T r2d_impl(const T v, real_type_tag)
Definition: Exprtk.hpp:1364
T shl_impl(const T v0, const T v1, real_type_tag)
Definition: Exprtk.hpp:1128
T logn_impl(const T v0, const T v1, real_type_tag)
Definition: Exprtk.hpp:1009
T shl_impl(const T v0, const T v1, int_type_tag)
Definition: Exprtk.hpp:1134
T sqrt_impl(const T v, real_type_tag)
Definition: Exprtk.hpp:1358
T xnor_impl(const T v0, const T v1, real_type_tag)
Definition: Exprtk.hpp:1216
T asinh_impl(const T v, real_type_tag)
Definition: Exprtk.hpp:1343
T erf_impl(const T v, int_type_tag)
Definition: Exprtk.hpp:1279
T nand_impl(const T v0, const T v1, int_type_tag)
Definition: Exprtk.hpp:1174
T const_e_impl(real_type_tag)
Definition: Exprtk.hpp:1373
T d2r_impl(const T v, real_type_tag)
Definition: Exprtk.hpp:1365
T neg_impl(const T v, real_type_tag)
Definition: Exprtk.hpp:1354
T pow_impl(const T v0, const T v1, int_type_tag)
Definition: Exprtk.hpp:1003
T process_impl(const operator_type operation, const T arg0, const T arg1, int_type_tag)
Definition: Exprtk.hpp:5394
T process_impl(const operator_type operation, const T arg)
Definition: Exprtk.hpp:5303
T erfc_impl(const T v, int_type_tag)
Definition: Exprtk.hpp:1305
T root_impl(const T v0, const T v1, real_type_tag)
Definition: Exprtk.hpp:1048
T and_impl(const T v0, const T v1, real_type_tag)
Definition: Exprtk.hpp:1156
T pos_impl(const T v, real_type_tag)
Definition: Exprtk.hpp:1355
T log_impl(const T v, real_type_tag)
Definition: Exprtk.hpp:1351
_uint64_t to_uint64_impl(const T v, real_type_tag)
Definition: Exprtk.hpp:893
T ncdf_impl(const T v, real_type_tag)
Definition: Exprtk.hpp:1311
real_type_tag
Definition: Exprtk.hpp:876
T csc_impl(const T v, real_type_tag)
Definition: Exprtk.hpp:1363
_int64_t to_int64_impl(const T v, real_type_tag)
Definition: Exprtk.hpp:887
T log2_impl(const T v, real_type_tag)
Definition: Exprtk.hpp:1353
T cot_impl(const T v, real_type_tag)
Definition: Exprtk.hpp:1361
exprtk_define_erfc(float,::erfcf) exprtk_define_erfc(double
T or_impl(const T v0, const T v1, real_type_tag)
Definition: Exprtk.hpp:1180
T cos_impl(const T v, real_type_tag)
Definition: Exprtk.hpp:1347
T sinh_impl(const T v, real_type_tag)
Definition: Exprtk.hpp:1357
T nequal_impl(const T v0, const T v1, int_type_tag)
Definition: Exprtk.hpp:979
T roundn_impl(const T v0, const T v1, real_type_tag)
Definition: Exprtk.hpp:1074
bool is_integer_impl(const T &, int_type_tag)
Definition: Exprtk.hpp:1413
T modulus_impl(const T v0, const T v1, int_type_tag)
Definition: Exprtk.hpp:991
T sec_impl(const T v, real_type_tag)
Definition: Exprtk.hpp:1362
T atan2_impl(const T v0, const T v1, real_type_tag)
Definition: Exprtk.hpp:1104
T pow_impl(const T v0, const T v1, real_type_tag)
Definition: Exprtk.hpp:997
T modulus_impl(const T v0, const T v1, real_type_tag)
Definition: Exprtk.hpp:985
T log1p_impl(const T v, real_type_tag)
Definition: Exprtk.hpp:1021
T trunc_impl(const T v, real_type_tag)
Definition: Exprtk.hpp:1370
exprtk_define_erf(float, ::erff) exprtk_define_erf(double
exprtk_define_epsilon_type(float, 0.00000100000f) exprtk_define_epsilon_type(double
T frac_impl(const T v, real_type_tag)
Definition: Exprtk.hpp:1369
T hypot_impl(const T v0, const T v1, real_type_tag)
Definition: Exprtk.hpp:1092
T nand_impl(const T v0, const T v1, real_type_tag)
Definition: Exprtk.hpp:1168
T min_impl(const T v0, const T v1, real_type_tag)
Definition: Exprtk.hpp:917
T const_qnan_impl(real_type_tag)
Definition: Exprtk.hpp:1374
T equal_impl(const T v0, const T v1, real_type_tag)
Definition: Exprtk.hpp:929
T nequal_impl(const T v0, const T v1, real_type_tag)
Definition: Exprtk.hpp:964
T g2d_impl(const T v, real_type_tag)
Definition: Exprtk.hpp:1367
T max_impl(const T v0, const T v1, real_type_tag)
Definition: Exprtk.hpp:923
T exp_impl(const T v, real_type_tag)
Definition: Exprtk.hpp:1349
bool is_true_impl(const T v)
Definition: Exprtk.hpp:899
T shr_impl(const T v0, const T v1, int_type_tag)
Definition: Exprtk.hpp:1122
T logn_impl(const T v0, const T v1, int_type_tag)
Definition: Exprtk.hpp:1015
T sin_impl(const T v, real_type_tag)
Definition: Exprtk.hpp:1356
T roundn_impl(const T v0, const T, int_type_tag)
Definition: Exprtk.hpp:1086
T round_impl(const T v, real_type_tag)
Definition: Exprtk.hpp:1068
T abs_impl(const T v, real_type_tag)
Definition: Exprtk.hpp:911
T sgn_impl(const T v, real_type_tag)
Definition: Exprtk.hpp:1140
T d2g_impl(const T v, real_type_tag)
Definition: Exprtk.hpp:1366
T acos_impl(const T v, real_type_tag)
Definition: Exprtk.hpp:1340
T tan_impl(const T v, real_type_tag)
Definition: Exprtk.hpp:1359
T nor_impl(const T v0, const T v1, int_type_tag)
Definition: Exprtk.hpp:1198
T xor_impl(const T v0, const T v1, real_type_tag)
Definition: Exprtk.hpp:1204
T expm1_impl(const T v, real_type_tag)
Definition: Exprtk.hpp:948
int to_int32_impl(const T v, real_type_tag)
Definition: Exprtk.hpp:881
T and_impl(const T v0, const T v1, int_type_tag)
Definition: Exprtk.hpp:1162
exprtk_register_real_type_tag(float) exprtk_register_real_type_tag(double) exprtk_register_real_type_tag(long double) exprtk_register_int_type_tag(short) exprtk_register_int_type_tag(int) exprtk_register_int_type_tag(_int64_t) exprtk_register_int_type_tag(unsigned short) exprtk_register_int_type_tag(unsigned int) exprtk_register_int_type_tag(_uint64_t) template< typename T > struct epsilon_type
Definition: Exprtk.hpp:841
T root_impl(const T v0, const T v1, int_type_tag)
Definition: Exprtk.hpp:1062
T atanh_impl(const T v, real_type_tag)
Definition: Exprtk.hpp:1345
T xnor_impl(const T v0, const T v1, int_type_tag)
Definition: Exprtk.hpp:1228
T atan_impl(const T v, real_type_tag)
Definition: Exprtk.hpp:1344
T notl_impl(const T v, real_type_tag)
Definition: Exprtk.hpp:1368
T or_impl(const T v0, const T v1, int_type_tag)
Definition: Exprtk.hpp:1186
T cosh_impl(const T v, real_type_tag)
Definition: Exprtk.hpp:1348
T equal_impl(const T v0, const T v1, int_type_tag)
Definition: Exprtk.hpp:942
T logn(const T v0, const T v1)
Definition: Exprtk.hpp:1498
T process(const operator_type operation, const T arg0, const T arg1)
Definition: Exprtk.hpp:5439
int to_int32(const T v)
Definition: Exprtk.hpp:1428
T xor_opr(const T v0, const T v1)
Definition: Exprtk.hpp:1575
T hypot(const T v0, const T v1)
Definition: Exprtk.hpp:1519
T pow(const T v0, const T v1)
Definition: Exprtk.hpp:1491
_uint64_t to_uint64(const T v)
Definition: Exprtk.hpp:1442
T nor_opr(const T v0, const T v1)
Definition: Exprtk.hpp:1568
bool is_nan(const T v)
Definition: Exprtk.hpp:1449
T root(const T v0, const T v1)
Definition: Exprtk.hpp:1505
bool is_integer(const T v)
Definition: Exprtk.hpp:1589
T nand_opr(const T v0, const T v1)
Definition: Exprtk.hpp:1554
T min(const T v0, const T v1)
Definition: Exprtk.hpp:1456
T nequal(const T v0, const T v1)
Definition: Exprtk.hpp:1477
T or_opr(const T v0, const T v1)
Definition: Exprtk.hpp:1561
T roundn(const T v0, const T v1)
Definition: Exprtk.hpp:1512
T atan2(const T v0, const T v1)
Definition: Exprtk.hpp:1526
T equal(const T v0, const T v1)
Definition: Exprtk.hpp:1470
T shl(const T v0, const T v1)
Definition: Exprtk.hpp:1540
T and_opr(const T v0, const T v1)
Definition: Exprtk.hpp:1547
T xnor_opr(const T v0, const T v1)
Definition: Exprtk.hpp:1582
_int64_t to_int64(const T v)
Definition: Exprtk.hpp:1435
T modulus(const T v0, const T v1)
Definition: Exprtk.hpp:1484
T max(const T v0, const T v1)
Definition: Exprtk.hpp:1463
T shr(const T v0, const T v1)
Definition: Exprtk.hpp:1533
bool is_string_ccondition_node(const expression_node< T > *node)
Definition: Exprtk.hpp:18288
bool is_left_bracket(const char_t c)
Definition: Exprtk.hpp:138
static bool parse_nan(Iterator &itr, const Iterator end, T &t)
Definition: Exprtk.hpp:1822
bool is_true(const double v)
Definition: Exprtk.hpp:5543
static const double pow10[]
Definition: Exprtk.hpp:793
bool is_voc_node(const expression_node< T > *node)
Definition: Exprtk.hpp:18204
bool is_vector_elem_rtc_node(const expression_node< T > *node)
Definition: Exprtk.hpp:5642
bool string_to_real(Iterator &itr_external, const Iterator end, T &t, numeric::details::real_type_tag)
Definition: Exprtk.hpp:1896
bool all_nodes_variables(expression_node< T > *const (&b)[N])
Definition: Exprtk.hpp:5800
bool is_ivector_node(const expression_node< T > *node)
Definition: Exprtk.hpp:5684
const char_t & back(const std::string &s)
Definition: Exprtk.hpp:268
static const std::string assignment_ops_list[]
Definition: Exprtk.hpp:495
bool all_nodes_valid(expression_node< T > *const (&b)[N])
Definition: Exprtk.hpp:5776
bool is_sign(const char_t c)
Definition: Exprtk.hpp:153
T compute_pow10(T d, const int exponent)
Definition: Exprtk.hpp:1683
const std::size_t size
Definition: Exprtk.hpp:783
bool is_hex_digit(const uchar_t digit)
Definition: Exprtk.hpp:302
bool is_whitespace(const char_t c)
Definition: Exprtk.hpp:99
bool is_ivariable_node(const expression_node< T > *node)
Definition: Exprtk.hpp:5613
bool imatch(const char_t c1, const char_t c2)
Definition: Exprtk.hpp:234
synthesis_node_type_define(const T0 &, const T1 &, e_vov) synthesis_node_type_define(const T0 &
bool is_unary_node(const expression_node< T > *node)
Definition: Exprtk.hpp:5589
bool is_invalid(const char_t c)
Definition: Exprtk.hpp:158
bool is_false(const expression_node< T > *node)
Definition: Exprtk.hpp:5571
bool is_rebasevector_elem_node(const expression_node< T > *node)
Definition: Exprtk.hpp:5654
bool is_base_function(const std::string &function_name)
Definition: Exprtk.hpp:538
bool is_function(const expression_node< T > *node)
Definition: Exprtk.hpp:5743
bool is_t0ot1ot2ot3_node(const expression_node< T > *node)
Definition: Exprtk.hpp:18228
long long int _int64_t
Definition: Exprtk.hpp:97
void construct_branch_pair(std::pair< expression_node< T > *, bool >(&branch)[N], expression_node< T > *b, const std::size_t &index)
Definition: Exprtk.hpp:6526
bool is_reserved_symbol(const std::string &symbol)
Definition: Exprtk.hpp:525
static const std::size_t arithmetic_ops_list_size
Definition: Exprtk.hpp:493
bool is_operator_char(const char_t c)
Definition: Exprtk.hpp:107
bool is_vector_celem_node(const expression_node< T > *node)
Definition: Exprtk.hpp:5636
bool is_control_struct(const std::string &cntrl_strct)
Definition: Exprtk.hpp:551
bool is_bracket(const char_t c)
Definition: Exprtk.hpp:148
static const std::size_t base_function_list_size
Definition: Exprtk.hpp:472
bool is_literal_node(const expression_node< T > *node)
Definition: Exprtk.hpp:5583
bool is_string_assignment_node(const expression_node< T > *node)
Definition: Exprtk.hpp:18264
bool is_sf4ext_node(const expression_node< T > *n)
Definition: Exprtk.hpp:17155
bool is_string_vararg_node(const expression_node< T > *node)
Definition: Exprtk.hpp:18294
bool string_to_type_converter_impl_ref(Iterator &itr, const Iterator end, T &result)
Definition: Exprtk.hpp:1745
bool match_impl(const Iterator pattern_begin, const Iterator pattern_end, const Iterator data_begin, const Iterator data_end, const typename std::iterator_traits< Iterator >::value_type &zero_or_more, const typename std::iterator_traits< Iterator >::value_type &exactly_one)
Definition: Exprtk.hpp:594
static const std::size_t assignment_ops_list_size
Definition: Exprtk.hpp:501
static const std::string arithmetic_ops_list[]
Definition: Exprtk.hpp:488
bool is_vov_node(const expression_node< T > *node)
Definition: Exprtk.hpp:18192
static const std::string reserved_symbols[]
Definition: Exprtk.hpp:440
bool branch_deletable(const expression_node< T > *node)
Definition: Exprtk.hpp:5768
bool is_uv_node(const expression_node< T > *node)
Definition: Exprtk.hpp:18234
bool is_rebasevector_celem_rtc_node(const expression_node< T > *node)
Definition: Exprtk.hpp:5666
bool is_vector_celem_rtc_node(const expression_node< T > *node)
Definition: Exprtk.hpp:5648
exprtk_define_unary_op(abs) exprtk_define_unary_op(acos) exprtk_define_unary_op(acosh) exprtk_define_unary_op(asin) exprtk_define_unary_op(asinh) exprtk_define_unary_op(atan) exprtk_define_unary_op(atanh) exprtk_define_unary_op(ceil) exprtk_define_unary_op(cos) exprtk_define_unary_op(cosh) exprtk_define_unary_op(cot) exprtk_define_unary_op(csc) exprtk_define_unary_op(d2g) exprtk_define_unary_op(d2r) exprtk_define_unary_op(erf) exprtk_define_unary_op(erfc) exprtk_define_unary_op(exp) exprtk_define_unary_op(expm1) exprtk_define_unary_op(floor) exprtk_define_unary_op(frac) exprtk_define_unary_op(g2d) exprtk_define_unary_op(log) exprtk_define_unary_op(log10) exprtk_define_unary_op(log2) exprtk_define_unary_op(log1p) exprtk_define_unary_op(ncdf) exprtk_define_unary_op(neg) exprtk_define_unary_op(notl) exprtk_define_unary_op(pos) exprtk_define_unary_op(r2d) exprtk_define_unary_op(round) exprtk_define_unary_op(sec) exprtk_define_unary_op(sgn) exprtk_define_unary_op(sin) exprtk_define_unary_op(sinc) exprtk_define_unary_op(sinh) exprtk_define_unary_op(sqrt) exprtk_define_unary_op(tan) exprtk_define_unary_op(tanh) exprtk_define_unary_op(trunc) template< typename T > struct opr_base
Definition: Exprtk.hpp:14756
void case_normalise(std::string &)
Definition: Exprtk.hpp:231
x y t t *t x y t t t x y t t t x *y t *t t x *y t *t t x y t t t x y t t t t(t/t)") define_sfop3(19
char char_t
Definition: Exprtk.hpp:90
bool is_constant_node(const expression_node< T > *node)
Definition: Exprtk.hpp:5709
const T1 const T2 const T3
Definition: Exprtk.hpp:16533
void dump_vector(const std::string &, const T *, const std::size_t)
Definition: Exprtk.hpp:5096
x y * z
Definition: Exprtk.hpp:11139
static const std::string logic_ops_list[]
Definition: Exprtk.hpp:474
bool is_valid_sf_symbol(const std::string &symbol)
Definition: Exprtk.hpp:253
const T1
Definition: Exprtk.hpp:16489
bool is_binary_node(const expression_node< T > *node)
Definition: Exprtk.hpp:5601
bool is_string_node(const expression_node< T > *node)
Definition: Exprtk.hpp:18240
void dump_ptr(const std::string &, const void *)
Definition: Exprtk.hpp:5093
bool is_valid_string_char(const char_t c)
Definition: Exprtk.hpp:171
T value(details::expression_node< T > *n)
Definition: Exprtk.hpp:15070
bool wc_match(const std::string &wild_card, const std::string &str)
Definition: Exprtk.hpp:656
static bool parse_inf(Iterator &itr, const Iterator end, T &t, const bool negative)
Definition: Exprtk.hpp:1855
bool is_const_string_range_node(const expression_node< T > *node)
Definition: Exprtk.hpp:18258
void load_operations_map(std::multimap< std::string, details::base_operation_t, details::ilesscompare > &m)
Definition: Exprtk.hpp:18716
static const std::string reserved_words[]
Definition: Exprtk.hpp:429
bool is_boc_node(const expression_node< T > *node)
Definition: Exprtk.hpp:18216
bool is_string_condition_node(const expression_node< T > *node)
Definition: Exprtk.hpp:18282
bool valid_exponent(const int exponent, numeric::details::real_type_tag)
Definition: Exprtk.hpp:1889
void disable_type_checking(Parser &p)
Definition: Exprtk.hpp:21324
static const std::string inequality_ops_list[]
Definition: Exprtk.hpp:503
static const std::size_t cntrl_struct_list_size
Definition: Exprtk.hpp:486
bool is_string_function_node(const expression_node< T > *node)
Definition: Exprtk.hpp:18276
bool is_letter_or_digit(const char_t c)
Definition: Exprtk.hpp:133
bool is_cov_node(const expression_node< T > *node)
Definition: Exprtk.hpp:18198
bool is_const_string_node(const expression_node< T > *node)
Definition: Exprtk.hpp:18252
const char_t & front(const std::string &s)
Definition: Exprtk.hpp:263
define_sfop3(00,(x+y)/z,"(t+t)/t") define_sfop3(01
bool is_genricstring_range_node(const expression_node< T > *node)
Definition: Exprtk.hpp:18300
uchar_t const * uchar_cptr
Definition: Exprtk.hpp:95
bool is_null_node(const expression_node< T > *node)
Definition: Exprtk.hpp:5719
T axn(const T a, const T x)
Definition: Exprtk.hpp:11099
T axnb(const T a, const T x, const T b)
Definition: Exprtk.hpp:11106
bool sequence_match(const std::string &pattern, const std::string &str, std::size_t &diff_index, char_t &diff_value)
Definition: Exprtk.hpp:682
T value(const T &t)
Definition: Exprtk.hpp:15088
static const std::size_t inequality_ops_list_size
Definition: Exprtk.hpp:510
std::string to_str(int i)
Definition: Exprtk.hpp:273
operator_type
Definition: Exprtk.hpp:4926
@ e_sf4ext08
Definition: Exprtk.hpp:4981
@ e_sf07
Definition: Exprtk.hpp:4954
@ e_sf4ext14
Definition: Exprtk.hpp:4982
@ e_sf16
Definition: Exprtk.hpp:4957
@ e_tan
Definition: Exprtk.hpp:4942
@ e_sf4ext25
Definition: Exprtk.hpp:4985
@ e_sf71
Definition: Exprtk.hpp:4970
@ e_sf47
Definition: Exprtk.hpp:4964
@ e_root
Definition: Exprtk.hpp:4941
@ e_sf4ext38
Definition: Exprtk.hpp:4988
@ e_sf26
Definition: Exprtk.hpp:4959
@ e_asin
Definition: Exprtk.hpp:4936
@ e_sf4ext57
Definition: Exprtk.hpp:4993
@ e_sf30
Definition: Exprtk.hpp:4960
@ e_sf4ext49
Definition: Exprtk.hpp:4991
@ e_sf94
Definition: Exprtk.hpp:4976
@ e_sf56
Definition: Exprtk.hpp:4967
@ e_sf09
Definition: Exprtk.hpp:4955
@ e_sf62
Definition: Exprtk.hpp:4968
@ e_eq
Definition: Exprtk.hpp:4931
@ e_sffinal
Definition: Exprtk.hpp:4978
@ e_sinc
Definition: Exprtk.hpp:4941
@ e_sf4ext47
Definition: Exprtk.hpp:4990
@ e_sf59
Definition: Exprtk.hpp:4967
@ e_expm1
Definition: Exprtk.hpp:4938
@ e_sf38
Definition: Exprtk.hpp:4962
@ e_like
Definition: Exprtk.hpp:4949
@ e_equal
Definition: Exprtk.hpp:4931
@ e_sf55
Definition: Exprtk.hpp:4966
@ e_sf92
Definition: Exprtk.hpp:4976
@ e_cosh
Definition: Exprtk.hpp:4937
@ e_sf4ext17
Definition: Exprtk.hpp:4983
@ e_sqrt
Definition: Exprtk.hpp:4941
@ e_sec
Definition: Exprtk.hpp:4942
@ e_sf4ext06
Definition: Exprtk.hpp:4980
@ e_sf50
Definition: Exprtk.hpp:4965
@ e_acosh
Definition: Exprtk.hpp:4936
@ e_or
Definition: Exprtk.hpp:4933
@ e_sf49
Definition: Exprtk.hpp:4965
@ e_sf90
Definition: Exprtk.hpp:4975
@ e_sf53
Definition: Exprtk.hpp:4966
@ e_sf63
Definition: Exprtk.hpp:4968
@ e_add
Definition: Exprtk.hpp:4927
@ e_cos
Definition: Exprtk.hpp:4937
@ e_sf37
Definition: Exprtk.hpp:4962
@ e_nand
Definition: Exprtk.hpp:4932
@ e_sf43
Definition: Exprtk.hpp:4963
@ e_sf34
Definition: Exprtk.hpp:4961
@ e_divass
Definition: Exprtk.hpp:4948
@ e_sf91
Definition: Exprtk.hpp:4975
@ e_sf08
Definition: Exprtk.hpp:4955
@ e_sf35
Definition: Exprtk.hpp:4961
@ e_sf72
Definition: Exprtk.hpp:4971
@ e_sf25
Definition: Exprtk.hpp:4959
@ e_sf18
Definition: Exprtk.hpp:4957
@ e_sf27
Definition: Exprtk.hpp:4959
@ e_sf4ext52
Definition: Exprtk.hpp:4992
@ e_smulti
Definition: Exprtk.hpp:4949
@ e_multi
Definition: Exprtk.hpp:4949
@ e_sf01
Definition: Exprtk.hpp:4953
@ e_sf11
Definition: Exprtk.hpp:4955
@ e_sf98
Definition: Exprtk.hpp:4977
@ e_sf44
Definition: Exprtk.hpp:4964
@ e_sf4ext05
Definition: Exprtk.hpp:4980
@ e_sf88
Definition: Exprtk.hpp:4975
@ e_mulass
Definition: Exprtk.hpp:4948
@ e_sf4ext10
Definition: Exprtk.hpp:4981
@ e_sf4ext15
Definition: Exprtk.hpp:4982
@ e_sf4ext36
Definition: Exprtk.hpp:4988
@ e_sf61
Definition: Exprtk.hpp:4968
@ e_addass
Definition: Exprtk.hpp:4947
@ e_sf19
Definition: Exprtk.hpp:4957
@ e_atanh
Definition: Exprtk.hpp:4937
@ e_sf78
Definition: Exprtk.hpp:4972
@ e_sf20
Definition: Exprtk.hpp:4958
@ e_lte
Definition: Exprtk.hpp:4930
@ e_lt
Definition: Exprtk.hpp:4930
@ e_tanh
Definition: Exprtk.hpp:4943
@ e_sf57
Definition: Exprtk.hpp:4967
@ e_sf4ext22
Definition: Exprtk.hpp:4984
@ e_round
Definition: Exprtk.hpp:4940
@ e_clamp
Definition: Exprtk.hpp:4943
@ e_sf04
Definition: Exprtk.hpp:4954
@ e_sf4ext31
Definition: Exprtk.hpp:4986
@ e_logn
Definition: Exprtk.hpp:4939
@ e_prod
Definition: Exprtk.hpp:4930
@ e_sf36
Definition: Exprtk.hpp:4962
@ e_sf4ext16
Definition: Exprtk.hpp:4983
@ e_sf42
Definition: Exprtk.hpp:4963
@ e_sf4ext32
Definition: Exprtk.hpp:4987
@ e_sf73
Definition: Exprtk.hpp:4971
@ e_min
Definition: Exprtk.hpp:4929
@ e_sf4ext03
Definition: Exprtk.hpp:4979
@ e_sf45
Definition: Exprtk.hpp:4964
@ e_sf93
Definition: Exprtk.hpp:4976
@ e_sf54
Definition: Exprtk.hpp:4966
@ e_sf4ext33
Definition: Exprtk.hpp:4987
@ e_sf03
Definition: Exprtk.hpp:4953
@ e_trunc
Definition: Exprtk.hpp:4947
@ e_sf4ext48
Definition: Exprtk.hpp:4991
@ e_ceil
Definition: Exprtk.hpp:4937
@ e_sf4ext01
Definition: Exprtk.hpp:4979
@ e_notl
Definition: Exprtk.hpp:4945
@ e_avg
Definition: Exprtk.hpp:4929
@ e_erfc
Definition: Exprtk.hpp:4946
@ e_sgn
Definition: Exprtk.hpp:4944
@ e_sf4ext04
Definition: Exprtk.hpp:4980
@ e_sf29
Definition: Exprtk.hpp:4960
@ e_sf4ext53
Definition: Exprtk.hpp:4992
@ e_sf66
Definition: Exprtk.hpp:4969
@ e_sf4ext58
Definition: Exprtk.hpp:4993
@ e_sf4ext40
Definition: Exprtk.hpp:4989
@ e_floor
Definition: Exprtk.hpp:4938
@ e_asinh
Definition: Exprtk.hpp:4936
@ e_sf10
Definition: Exprtk.hpp:4955
@ e_mul
Definition: Exprtk.hpp:4928
@ e_acos
Definition: Exprtk.hpp:4935
@ e_sf4ext20
Definition: Exprtk.hpp:4984
@ e_sf79
Definition: Exprtk.hpp:4972
@ e_subass
Definition: Exprtk.hpp:4947
@ e_sf41
Definition: Exprtk.hpp:4963
@ e_mor
Definition: Exprtk.hpp:4934
@ e_sf17
Definition: Exprtk.hpp:4957
@ e_nor
Definition: Exprtk.hpp:4933
@ e_atan
Definition: Exprtk.hpp:4936
@ e_hypot
Definition: Exprtk.hpp:4945
@ e_sf46
Definition: Exprtk.hpp:4964
@ e_gt
Definition: Exprtk.hpp:4932
@ e_sf22
Definition: Exprtk.hpp:4958
@ e_pos
Definition: Exprtk.hpp:4940
@ e_sf4ext27
Definition: Exprtk.hpp:4985
@ e_inrange
Definition: Exprtk.hpp:4944
@ e_sin
Definition: Exprtk.hpp:4941
@ e_sf21
Definition: Exprtk.hpp:4958
@ e_sf06
Definition: Exprtk.hpp:4954
@ e_sf33
Definition: Exprtk.hpp:4961
@ e_xor
Definition: Exprtk.hpp:4933
@ e_sum
Definition: Exprtk.hpp:4930
@ e_sf4ext11
Definition: Exprtk.hpp:4981
@ e_sf4ext28
Definition: Exprtk.hpp:4986
@ e_sf4ext60
Definition: Exprtk.hpp:4994
@ e_exp
Definition: Exprtk.hpp:4938
@ e_log
Definition: Exprtk.hpp:4938
@ e_sf96
Definition: Exprtk.hpp:4977
@ e_sf4ext29
Definition: Exprtk.hpp:4986
@ e_sf51
Definition: Exprtk.hpp:4965
@ e_sf12
Definition: Exprtk.hpp:4956
@ e_xnor
Definition: Exprtk.hpp:4933
@ e_sf4ext37
Definition: Exprtk.hpp:4988
@ e_sf97
Definition: Exprtk.hpp:4977
@ e_sf83
Definition: Exprtk.hpp:4973
@ e_roundn
Definition: Exprtk.hpp:4940
@ e_sf67
Definition: Exprtk.hpp:4969
@ e_sf4ext45
Definition: Exprtk.hpp:4990
@ e_sf39
Definition: Exprtk.hpp:4962
@ e_sf80
Definition: Exprtk.hpp:4973
@ e_sf68
Definition: Exprtk.hpp:4970
@ e_sf87
Definition: Exprtk.hpp:4974
@ e_sf4ext35
Definition: Exprtk.hpp:4987
@ e_sf4ext50
Definition: Exprtk.hpp:4991
@ e_default
Definition: Exprtk.hpp:4927
@ e_ilike
Definition: Exprtk.hpp:4949
@ e_sf40
Definition: Exprtk.hpp:4963
@ e_sf4ext59
Definition: Exprtk.hpp:4993
@ e_sf05
Definition: Exprtk.hpp:4954
@ e_sf4ext00
Definition: Exprtk.hpp:4979
@ e_nequal
Definition: Exprtk.hpp:4931
@ e_sf58
Definition: Exprtk.hpp:4967
@ e_sf77
Definition: Exprtk.hpp:4972
@ e_scor
Definition: Exprtk.hpp:4934
@ e_assign
Definition: Exprtk.hpp:4947
@ e_sf4ext46
Definition: Exprtk.hpp:4990
@ e_sf4ext54
Definition: Exprtk.hpp:4992
@ e_sf48
Definition: Exprtk.hpp:4965
@ e_mand
Definition: Exprtk.hpp:4934
@ e_null
Definition: Exprtk.hpp:4927
@ e_sf13
Definition: Exprtk.hpp:4956
@ e_sf4ext13
Definition: Exprtk.hpp:4982
@ e_abs
Definition: Exprtk.hpp:4935
@ e_sf4ext12
Definition: Exprtk.hpp:4982
@ e_sf85
Definition: Exprtk.hpp:4974
@ e_sf4ext02
Definition: Exprtk.hpp:4979
@ e_shl
Definition: Exprtk.hpp:4935
@ e_sf32
Definition: Exprtk.hpp:4961
@ e_scand
Definition: Exprtk.hpp:4934
@ e_atan2
Definition: Exprtk.hpp:4929
@ e_d2g
Definition: Exprtk.hpp:4945
@ e_sf76
Definition: Exprtk.hpp:4972
@ e_sf02
Definition: Exprtk.hpp:4953
@ e_sf4ext51
Definition: Exprtk.hpp:4991
@ e_sf4ext41
Definition: Exprtk.hpp:4989
@ e_pow
Definition: Exprtk.hpp:4928
@ e_sf4ext61
Definition: Exprtk.hpp:4994
@ e_ne
Definition: Exprtk.hpp:4931
@ e_modass
Definition: Exprtk.hpp:4948
@ e_sf4ext19
Definition: Exprtk.hpp:4983
@ e_sf84
Definition: Exprtk.hpp:4974
@ e_iclamp
Definition: Exprtk.hpp:4943
@ e_sf52
Definition: Exprtk.hpp:4966
@ e_in
Definition: Exprtk.hpp:4948
@ e_sf69
Definition: Exprtk.hpp:4970
@ e_erf
Definition: Exprtk.hpp:4946
@ e_sf75
Definition: Exprtk.hpp:4971
@ e_ncdf
Definition: Exprtk.hpp:4946
@ e_sf65
Definition: Exprtk.hpp:4969
@ e_log1p
Definition: Exprtk.hpp:4939
@ e_sf14
Definition: Exprtk.hpp:4956
@ e_sf4ext43
Definition: Exprtk.hpp:4989
@ e_sf4ext34
Definition: Exprtk.hpp:4987
@ e_and
Definition: Exprtk.hpp:4932
@ e_sf95
Definition: Exprtk.hpp:4976
@ e_sf4ext23
Definition: Exprtk.hpp:4984
@ e_sf4ext44
Definition: Exprtk.hpp:4990
@ e_sf70
Definition: Exprtk.hpp:4970
@ e_gte
Definition: Exprtk.hpp:4932
@ e_cot
Definition: Exprtk.hpp:4943
@ e_log10
Definition: Exprtk.hpp:4939
@ e_div
Definition: Exprtk.hpp:4928
@ e_mod
Definition: Exprtk.hpp:4928
@ e_sf4ext26
Definition: Exprtk.hpp:4985
@ e_sf4ext56
Definition: Exprtk.hpp:4993
@ e_sf28
Definition: Exprtk.hpp:4960
@ e_sf00
Definition: Exprtk.hpp:4953
@ e_r2d
Definition: Exprtk.hpp:4944
@ e_g2d
Definition: Exprtk.hpp:4945
@ e_sf4ext07
Definition: Exprtk.hpp:4980
@ e_sf4ext21
Definition: Exprtk.hpp:4984
@ e_sf74
Definition: Exprtk.hpp:4971
@ e_sf64
Definition: Exprtk.hpp:4969
@ e_sf4ext24
Definition: Exprtk.hpp:4985
@ e_sf4ext42
Definition: Exprtk.hpp:4989
@ e_sf15
Definition: Exprtk.hpp:4956
@ e_sf89
Definition: Exprtk.hpp:4975
@ e_sf99
Definition: Exprtk.hpp:4977
@ e_sf86
Definition: Exprtk.hpp:4974
@ e_d2r
Definition: Exprtk.hpp:4944
@ e_sf4ext39
Definition: Exprtk.hpp:4988
@ e_swap
Definition: Exprtk.hpp:4950
@ e_sf4ext55
Definition: Exprtk.hpp:4992
@ e_sf31
Definition: Exprtk.hpp:4960
@ e_sinh
Definition: Exprtk.hpp:4942
@ e_sf4ext30
Definition: Exprtk.hpp:4986
@ e_neg
Definition: Exprtk.hpp:4940
@ e_shr
Definition: Exprtk.hpp:4935
@ e_sub
Definition: Exprtk.hpp:4927
@ e_sf4ext18
Definition: Exprtk.hpp:4983
@ e_frac
Definition: Exprtk.hpp:4946
@ e_sf60
Definition: Exprtk.hpp:4968
@ e_sf24
Definition: Exprtk.hpp:4959
@ e_log2
Definition: Exprtk.hpp:4939
@ e_sf23
Definition: Exprtk.hpp:4958
@ e_sf82
Definition: Exprtk.hpp:4973
@ e_max
Definition: Exprtk.hpp:4929
@ e_sf4ext09
Definition: Exprtk.hpp:4981
@ e_csc
Definition: Exprtk.hpp:4942
@ e_sf81
Definition: Exprtk.hpp:4973
unsigned long long int _uint64_t
Definition: Exprtk.hpp:96
bool is_variable_node(const expression_node< T > *node)
Definition: Exprtk.hpp:5607
bool is_vector_node(const expression_node< T > *node)
Definition: Exprtk.hpp:5678
bool is_negate_node(const expression_node< T > *node)
Definition: Exprtk.hpp:5757
bool is_swap_node(const expression_node< T > *node)
Definition: Exprtk.hpp:5737
void destroy_node(expression_node< T > *&node)
Definition: Exprtk.hpp:5935
bool is_string_concat_node(const expression_node< T > *node)
Definition: Exprtk.hpp:18270
bool is_reserved_word(const std::string &symbol)
Definition: Exprtk.hpp:512
bool is_letter(const char_t c)
Definition: Exprtk.hpp:122
bool is_vector_elem_node(const expression_node< T > *node)
Definition: Exprtk.hpp:5630
bool wc_imatch(const std::string &wild_card, const std::string &str)
Definition: Exprtk.hpp:669
x y t t *t x y t t t x y t t t x *y t *t t x *y t *t t x y t t t x y t t t t(t+t)") define_sfop3(16
bool is_return_node(const expression_node< T > *node)
Definition: Exprtk.hpp:5749
const e_voc T1 e_none const e_none T1 e_none T0
Definition: Exprtk.hpp:16499
static const std::size_t reserved_words_size
Definition: Exprtk.hpp:438
static const std::string cntrl_struct_list[]
Definition: Exprtk.hpp:481
bool is_cob_node(const expression_node< T > *node)
Definition: Exprtk.hpp:18210
unsigned char uchar_t
Definition: Exprtk.hpp:93
bool is_generally_string_node(const expression_node< T > *node)
Definition: Exprtk.hpp:18306
memory_context_t< T > make_memory_context(vector_holder< T > &vec_holder, vec_data_store< T > &vds)
Definition: Exprtk.hpp:12790
static const std::string base_function_list[]
Definition: Exprtk.hpp:459
uchar_t hex_to_bin(uchar_t h)
Definition: Exprtk.hpp:309
bool is_digit(const char_t c)
Definition: Exprtk.hpp:128
uchar_t * uchar_ptr
Definition: Exprtk.hpp:94
bool is_rebasevector_celem_node(const expression_node< T > *node)
Definition: Exprtk.hpp:5672
static const std::size_t reserved_symbols_size
Definition: Exprtk.hpp:457
void set_zero_value(std::vector< T > &v)
Definition: Exprtk.hpp:788
bool is_string_range_node(const expression_node< T > *node)
Definition: Exprtk.hpp:18246
void free_node(NodeAllocator &, expression_node< T > *&node)
Definition: Exprtk.hpp:5923
bool is_continue_node(const expression_node< T > *node)
Definition: Exprtk.hpp:5731
bool is_logic_opr(const std::string &lgc_opr)
Definition: Exprtk.hpp:564
const T1 const T2
Definition: Exprtk.hpp:16511
char_t const * char_cptr
Definition: Exprtk.hpp:92
bool parse_hex(Iterator &itr, Iterator end, char_t &result)
Definition: Exprtk.hpp:318
static const std::size_t pow10_size
Definition: Exprtk.hpp:802
pod_set_zero_value(float) pod_set_zero_value(double) pod_set_zero_value(long double) template< typename T > inline void set_zero_value(T *data
char_t * char_ptr
Definition: Exprtk.hpp:91
void free_all_nodes(NodeAllocator &node_allocator, expression_node< T > *(&b)[N])
Definition: Exprtk.hpp:5900
bool is_sf3ext_node(const expression_node< T > *n)
Definition: Exprtk.hpp:16977
bool is_rebasevector_elem_rtc_node(const expression_node< T > *node)
Definition: Exprtk.hpp:5660
bool cleanup_escapes(std::string &s)
Definition: Exprtk.hpp:341
x y t t *t x y t t t x y t t t x *y t *t t x *y t *t t x y t t t x y t t t x(y+z)
x y t t *t x y t t t x y t t t x *y t *t t x *y t *t t x y t t t x y t t t x(y/z)
static const std::size_t logic_ops_list_size
Definition: Exprtk.hpp:479
bool is_break_node(const expression_node< T > *node)
Definition: Exprtk.hpp:5725
bool is_right_bracket(const char_t c)
Definition: Exprtk.hpp:143
void init_branches(std::pair< expression_node< T > *, bool >(&branch)[N], expression_node< T > *b0, expression_node< T > *b1=reinterpret_cast< expression_node< T > * >(0), expression_node< T > *b2=reinterpret_cast< expression_node< T > * >(0), expression_node< T > *b3=reinterpret_cast< expression_node< T > * >(0), expression_node< T > *b4=reinterpret_cast< expression_node< T > * >(0), expression_node< T > *b5=reinterpret_cast< expression_node< T > * >(0), expression_node< T > *b6=reinterpret_cast< expression_node< T > * >(0), expression_node< T > *b7=reinterpret_cast< expression_node< T > * >(0), expression_node< T > *b8=reinterpret_cast< expression_node< T > * >(0), expression_node< T > *b9=reinterpret_cast< expression_node< T > * >(0))
Definition: Exprtk.hpp:6546
bool is_neg_unary_node(const expression_node< T > *node)
Definition: Exprtk.hpp:5595
bool is_t0ot1ot2_node(const expression_node< T > *node)
Definition: Exprtk.hpp:18222
void dump(const lexer::generator &generator)
Definition: Exprtk.hpp:3393
error_mode
Definition: Exprtk.hpp:21198
@ e_helper
Definition: Exprtk.hpp:21206
@ e_lexer
Definition: Exprtk.hpp:21204
@ e_synthesis
Definition: Exprtk.hpp:21205
@ e_parser
Definition: Exprtk.hpp:21207
@ e_symtab
Definition: Exprtk.hpp:21203
@ e_token
Definition: Exprtk.hpp:21201
@ e_numeric
Definition: Exprtk.hpp:21202
@ e_unknown
Definition: Exprtk.hpp:21199
@ e_syntax
Definition: Exprtk.hpp:21200
void dump_error(const type &error)
Definition: Exprtk.hpp:21312
bool update_error(type &error, const std::string &expression)
Definition: Exprtk.hpp:21270
type make_error(const error_mode mode, const std::string &diagnostic="", const std::string &src_location="")
Definition: Exprtk.hpp:21227
type make_error(const error_mode mode, const lexer::token &tk, const std::string &diagnostic="", const std::string &src_location="")
Definition: Exprtk.hpp:21240
std::string to_str(error_mode mode)
Definition: Exprtk.hpp:21254
void print_type(const std::string &fmt, const T v, exprtk::details::numeric::details::real_type_tag)
Definition: Exprtk.hpp:42020
file_descriptor * make_handle(T v)
Definition: Exprtk.hpp:42376
file_mode
Definition: Exprtk.hpp:42184
@ e_write
Definition: Exprtk.hpp:42187
@ e_error
Definition: Exprtk.hpp:42185
@ e_rdwrt
Definition: Exprtk.hpp:42188
@ e_read
Definition: Exprtk.hpp:42186
void perform_check()
Definition: Exprtk.hpp:42388
void kahan_sum(T &sum, T &error, const T v)
Definition: Exprtk.hpp:42729
bool invalid_range(const Vector &v, const std::size_t r0, const std::size_t r1)
Definition: Exprtk.hpp:42682
Definition: Exprtk.hpp:60
void enable_zero_parameters(FunctionType &func)
Definition: Exprtk.hpp:18818
bool collect_variables(const std::string &expression, Sequence< std::string, Allocator > &symbol_list)
Definition: Exprtk.hpp:40321
vector_access_runtime_check * vector_access_runtime_check_ptr
Definition: Exprtk.hpp:2156
void set_max_num_args(FunctionType &func, const std::size_t &num_args)
Definition: Exprtk.hpp:18856
bool is_valid(const expression< T > &expr)
Definition: Exprtk.hpp:21190
void disable_has_side_effects(FunctionType &func)
Definition: Exprtk.hpp:18841
vector_view< T > make_vector_view(T *data, const std::size_t size, const std::size_t offset=0)
Definition: Exprtk.hpp:4589
compilation_check * compilation_check_ptr
Definition: Exprtk.hpp:2171
void disable_zero_parameters(FunctionType &func)
Definition: Exprtk.hpp:18829
T third_derivative(const expression< T > &e, T &x, const T &h=T(0.0001))
Definition: Exprtk.hpp:40537
bool collect_functions(const std::string &expression, Sequence< std::string, Allocator > &symbol_list)
Definition: Exprtk.hpp:40382
loop_runtime_check * loop_runtime_check_ptr
Definition: Exprtk.hpp:2132
bool compute(const std::string &expression_string, T &result)
Definition: Exprtk.hpp:40649
T derivative(const expression< T > &e, T &x, const T &h=T(0.00000001))
Definition: Exprtk.hpp:40494
T second_derivative(const expression< T > &e, T &x, const T &h=T(0.00001))
Definition: Exprtk.hpp:40515
std::string to_str(const StringView &view)
Definition: Exprtk.hpp:4798
void set_min_num_args(FunctionType &func, const std::size_t &num_args)
Definition: Exprtk.hpp:18847
void enable_has_side_effects(FunctionType &func)
Definition: Exprtk.hpp:18835
T integrate(const expression< T > &e, T &x, const T &r0, const T &r1, const std::size_t number_of_intervals=1000000)
Definition: Exprtk.hpp:40442
Definition: Exprtk.hpp:2161
std::string error_message
Definition: Exprtk.hpp:2162
Definition: Exprtk.hpp:2159
virtual bool continue_compilation(compilation_context &)=0
virtual ~compilation_check()
Definition: Exprtk.hpp:2167
Definition: Exprtk.hpp:17174
details::T0oT1< T, T0, T1 > type0
Definition: Exprtk.hpp:17175
Definition: Exprtk.hpp:16371
static std::string id()
Definition: Exprtk.hpp:16381
static T process(const T &t0, const T &t1, const T &t2, const T &t3, const bfunc_t bf0, const bfunc_t bf1, const bfunc_t bf2)
Definition: Exprtk.hpp:16372
Definition: Exprtk.hpp:16392
static T process(const T &t0, const T &t1, const T &t2, const T &t3, const bfunc_t bf0, const bfunc_t bf1, const bfunc_t bf2)
Definition: Exprtk.hpp:16393
static std::string id()
Definition: Exprtk.hpp:16401
Definition: Exprtk.hpp:16412
static T process(const T &t0, const T &t1, const T &t2, const T &t3, const bfunc_t bf0, const bfunc_t bf1, const bfunc_t bf2)
Definition: Exprtk.hpp:16413
static std::string id()
Definition: Exprtk.hpp:16422
Definition: Exprtk.hpp:16433
static std::string id()
Definition: Exprtk.hpp:16443
static T process(const T &t0, const T &t1, const T &t2, const T &t3, const bfunc_t bf0, const bfunc_t bf1, const bfunc_t bf2)
Definition: Exprtk.hpp:16434
Definition: Exprtk.hpp:16454
static std::string id()
Definition: Exprtk.hpp:16464
static T process(const T &t0, const T &t1, const T &t2, const T &t3, const bfunc_t bf0, const bfunc_t bf1, const bfunc_t bf2)
Definition: Exprtk.hpp:16455
Definition: Exprtk.hpp:16366
details::functor_t< T > functor_t
Definition: Exprtk.hpp:16367
functor_t::bfunc_t bfunc_t
Definition: Exprtk.hpp:16368
Definition: Exprtk.hpp:17180
details::T0oT1oT2< T, T0, T1, T2, typename T0oT1oT2process< T >::mode0 > type0
Definition: Exprtk.hpp:17181
details::T0oT1oT2_sf3< T, T0, T1, T2 > sf3_type
Definition: Exprtk.hpp:17183
details::T0oT1oT2< T, T0, T1, T2, typename T0oT1oT2process< T >::mode1 > type1
Definition: Exprtk.hpp:17182
details::sf3ext_type_node< T, T0, T1, T2 > sf3_type_node
Definition: Exprtk.hpp:17184
Definition: Exprtk.hpp:17189
details::T0oT1oT2oT3_sf4< T, T0, T1, T2, T3 > sf4_type
Definition: Exprtk.hpp:17195
details::T0oT1oT2oT3< T, T0, T1, T2, T3, typename T0oT1oT20T3process< T >::mode2 > type2
Definition: Exprtk.hpp:17192
details::T0oT1oT2oT3< T, T0, T1, T2, T3, typename T0oT1oT20T3process< T >::mode0 > type0
Definition: Exprtk.hpp:17190
details::T0oT1oT2oT3< T, T0, T1, T2, T3, typename T0oT1oT20T3process< T >::mode1 > type1
Definition: Exprtk.hpp:17191
details::T0oT1oT2oT3< T, T0, T1, T2, T3, typename T0oT1oT20T3process< T >::mode4 > type4
Definition: Exprtk.hpp:17194
details::T0oT1oT2oT3< T, T0, T1, T2, T3, typename T0oT1oT20T3process< T >::mode3 > type3
Definition: Exprtk.hpp:17193
Definition: Exprtk.hpp:16328
static std::string id()
Definition: Exprtk.hpp:16336
static T process(const T &t0, const T &t1, const T &t2, const bfunc_t bf0, const bfunc_t bf1)
Definition: Exprtk.hpp:16329
Definition: Exprtk.hpp:16346
static std::string id()
Definition: Exprtk.hpp:16354
static T process(const T &t0, const T &t1, const T &t2, const bfunc_t bf0, const bfunc_t bf1)
Definition: Exprtk.hpp:16347
Definition: Exprtk.hpp:16323
details::functor_t< T > functor_t
Definition: Exprtk.hpp:16324
functor_t::bfunc_t bfunc_t
Definition: Exprtk.hpp:16325
Definition: Exprtk.hpp:14812
static T process(Type t1, Type t2)
Definition: Exprtk.hpp:14816
static T process(Type t1, Type t2, Type t3)
Definition: Exprtk.hpp:14817
static details::operator_type operation()
Definition: Exprtk.hpp:14820
static void assign(RefType t1, Type t2)
Definition: Exprtk.hpp:14818
opr_base< T >::Type Type
Definition: Exprtk.hpp:14813
opr_base< T >::RefType RefType
Definition: Exprtk.hpp:14814
static expression_node< T >::node_type type()
Definition: Exprtk.hpp:14819
Definition: Exprtk.hpp:14964
static T process(Type t1, Type t2)
Definition: Exprtk.hpp:14967
static details::operator_type operation()
Definition: Exprtk.hpp:14969
static expression_node< T >::node_type type()
Definition: Exprtk.hpp:14968
opr_base< T >::Type Type
Definition: Exprtk.hpp:14965
Definition: Exprtk.hpp:10399
static void execute(std::string &s, char_cptr data, const std::size_t size)
Definition: Exprtk.hpp:10400
Definition: Exprtk.hpp:10393
static void execute(std::string &s, char_cptr data, const std::size_t size)
Definition: Exprtk.hpp:10394
Definition: Exprtk.hpp:5032
base_operation_t(const operator_type t, const unsigned int &np)
Definition: Exprtk.hpp:5033
operator_type type
Definition: Exprtk.hpp:5038
unsigned int num_params
Definition: Exprtk.hpp:5039
Definition: Exprtk.hpp:586
static bool cmp(const char_t c0, const char_t c1)
Definition: Exprtk.hpp:587
Definition: Exprtk.hpp:40253
virtual bool process(const std::string &unknown_symbol, symbol_table_t &symbol_table, std::string &) exprtk_override
Definition: Exprtk.hpp:40260
exprtk::parser< T > parser_t
Definition: Exprtk.hpp:40254
resolve_as_vector()
Definition: Exprtk.hpp:40256
Definition: Exprtk.hpp:40245
static bool collection_pass(const std::string &expression_string, std::set< std::string > &symbol_set, const bool collect_variables, const bool collect_functions, const bool vector_pass, symbol_table_t &ext_symbol_table)
Definition: Exprtk.hpp:40270
parser_t::dependent_entity_collector::symbol_t symbol_t
Definition: Exprtk.hpp:40249
exprtk::symbol_table< T > symbol_table_t
Definition: Exprtk.hpp:40246
parser_t::unknown_symbol_resolver usr_t
Definition: Exprtk.hpp:40250
exprtk::parser< T > parser_t
Definition: Exprtk.hpp:40248
exprtk::expression< T > expression_t
Definition: Exprtk.hpp:40247
Definition: Exprtk.hpp:578
static bool cmp(const char_t c0, const char_t c1)
Definition: Exprtk.hpp:579
Definition: Exprtk.hpp:14851
static T process(Type t1, Type t2)
Definition: Exprtk.hpp:14855
static details::operator_type operation()
Definition: Exprtk.hpp:14859
static expression_node< T >::node_type type()
Definition: Exprtk.hpp:14858
static void assign(RefType t1, Type t2)
Definition: Exprtk.hpp:14857
opr_base< T >::RefType RefType
Definition: Exprtk.hpp:14853
static T process(Type t1, Type t2, Type t3)
Definition: Exprtk.hpp:14856
opr_base< T >::Type Type
Definition: Exprtk.hpp:14852
Definition: Exprtk.hpp:14932
opr_base< T >::Type Type
Definition: Exprtk.hpp:14933
static T process(Type t1, Type t2)
Definition: Exprtk.hpp:14934
static T process(const std::string &t1, const std::string &t2)
Definition: Exprtk.hpp:14935
static expression_node< T >::node_type type()
Definition: Exprtk.hpp:14936
static details::operator_type operation()
Definition: Exprtk.hpp:14937
Definition: Exprtk.hpp:14942
static expression_node< T >::node_type type()
Definition: Exprtk.hpp:14947
static details::operator_type operation()
Definition: Exprtk.hpp:14948
static T process(Type t1, Type t2)
Definition: Exprtk.hpp:14945
opr_base< T >::Type Type
Definition: Exprtk.hpp:14943
static T process(const std::string &t1, const std::string &t2)
Definition: Exprtk.hpp:14946
static void execute(T_(&v)[1], const branch_t(&b)[1])
Definition: Exprtk.hpp:13909
static void execute(T_(&v)[2], const branch_t(&b)[2])
Definition: Exprtk.hpp:13899
static void execute(T_(&v)[3], const branch_t(&b)[3])
Definition: Exprtk.hpp:13888
static void execute(T_(&v)[4], const branch_t(&b)[4])
Definition: Exprtk.hpp:13876
static void execute(T_(&v)[5], const branch_t(&b)[5])
Definition: Exprtk.hpp:13863
static void execute(T_(&v)[6], const branch_t(&b)[6])
Definition: Exprtk.hpp:13849
Definition: Exprtk.hpp:13836
static void execute(T_(&v)[BranchCount], const branch_t(&b)[BranchCount])
Definition: Exprtk.hpp:13837
static T_ execute(ifunction &f, T_(&v)[10])
Definition: Exprtk.hpp:13991
static T_ execute(ifunction &f, T_(&v)[11])
Definition: Exprtk.hpp:13984
static T_ execute(ifunction &f, T_(&v)[12])
Definition: Exprtk.hpp:13977
static T_ execute(ifunction &f, T_(&v)[13])
Definition: Exprtk.hpp:13970
static T_ execute(ifunction &f, T_(&v)[14])
Definition: Exprtk.hpp:13963
static T_ execute(ifunction &f, T_(&v)[15])
Definition: Exprtk.hpp:13956
static T_ execute(ifunction &f, T_(&v)[16])
Definition: Exprtk.hpp:13949
static T_ execute(ifunction &f, T_(&v)[17])
Definition: Exprtk.hpp:13942
static T_ execute(ifunction &f, T_(&v)[18])
Definition: Exprtk.hpp:13935
static T_ execute(ifunction &f, T_(&v)[19])
Definition: Exprtk.hpp:13928
static T_ execute(ifunction &f, T_(&v)[1])
Definition: Exprtk.hpp:14054
static T_ execute(ifunction &f, T_(&v)[20])
Definition: Exprtk.hpp:13921
static T_ execute(ifunction &f, T_(&v)[2])
Definition: Exprtk.hpp:14047
static T_ execute(ifunction &f, T_(&v)[3])
Definition: Exprtk.hpp:14040
static T_ execute(ifunction &f, T_(&v)[4])
Definition: Exprtk.hpp:14033
static T_ execute(ifunction &f, T_(&v)[5])
Definition: Exprtk.hpp:14026
static T_ execute(ifunction &f, T_(&v)[6])
Definition: Exprtk.hpp:14019
static T_ execute(ifunction &f, T_(&v)[7])
Definition: Exprtk.hpp:14012
static T_ execute(ifunction &f, T_(&v)[8])
Definition: Exprtk.hpp:14005
static T_ execute(ifunction &f, T_(&v)[9])
Definition: Exprtk.hpp:13998
Definition: Exprtk.hpp:13916
static T execute(ifunction &, branch_t(&)[ParamCount])
Definition: Exprtk.hpp:13916
Definition: Exprtk.hpp:2066
const T & Type
Definition: Exprtk.hpp:2074
T(* bfunc_t)(Type t0, Type t1)
Definition: Exprtk.hpp:2078
T & RefType
Definition: Exprtk.hpp:2075
T(* qfunc_t)(Type t0, Type t1, Type t2, Type t3)
Definition: Exprtk.hpp:2076
T(* tfunc_t)(Type t0, Type t1, Type t2)
Definition: Exprtk.hpp:2077
T(* ufunc_t)(Type t0)
Definition: Exprtk.hpp:2079
Definition: Exprtk.hpp:14910
static expression_node< T >::node_type type()
Definition: Exprtk.hpp:14915
static T process(Type t1, Type t2)
Definition: Exprtk.hpp:14913
static T process(const std::string &t1, const std::string &t2)
Definition: Exprtk.hpp:14914
opr_base< T >::Type Type
Definition: Exprtk.hpp:14911
static details::operator_type operation()
Definition: Exprtk.hpp:14916
Definition: Exprtk.hpp:14921
static T process(Type t1, Type t2)
Definition: Exprtk.hpp:14924
static expression_node< T >::node_type type()
Definition: Exprtk.hpp:14926
static details::operator_type operation()
Definition: Exprtk.hpp:14927
static T process(const std::string &t1, const std::string &t2)
Definition: Exprtk.hpp:14925
opr_base< T >::Type Type
Definition: Exprtk.hpp:14922
Definition: Exprtk.hpp:245
bool operator()(const std::string &s1, const std::string &s2) const
Definition: Exprtk.hpp:246
Definition: Exprtk.hpp:15046
static T process(const std::string &t1, const std::string &t2)
Definition: Exprtk.hpp:15050
static details::operator_type operation()
Definition: Exprtk.hpp:15052
static T process(const T &, const T &)
Definition: Exprtk.hpp:15049
opr_base< T >::Type Type
Definition: Exprtk.hpp:15047
static expression_node< T >::node_type type()
Definition: Exprtk.hpp:15051
Definition: Exprtk.hpp:15024
opr_base< T >::Type Type
Definition: Exprtk.hpp:15025
static T process(const T &, const T &)
Definition: Exprtk.hpp:15027
static expression_node< T >::node_type type()
Definition: Exprtk.hpp:15029
static T process(const std::string &t1, const std::string &t2)
Definition: Exprtk.hpp:15028
static details::operator_type operation()
Definition: Exprtk.hpp:15030
Definition: Exprtk.hpp:15057
static expression_node< T >::node_type type()
Definition: Exprtk.hpp:15065
opr_base< T >::Type Type
Definition: Exprtk.hpp:15058
static details::operator_type operation()
Definition: Exprtk.hpp:15066
static T process(const T &t0, const T &t1, const T &t2)
Definition: Exprtk.hpp:15060
static T process(const std::string &t0, const std::string &t1, const std::string &t2)
Definition: Exprtk.hpp:15061
Definition: Exprtk.hpp:16306
Definition: Exprtk.hpp:16304
Definition: Exprtk.hpp:16308
Definition: Exprtk.hpp:15035
static details::operator_type operation()
Definition: Exprtk.hpp:15041
static T process(const T &, const T &)
Definition: Exprtk.hpp:15038
static expression_node< T >::node_type type()
Definition: Exprtk.hpp:15040
opr_base< T >::Type Type
Definition: Exprtk.hpp:15036
static T process(const std::string &t1, const std::string &t2)
Definition: Exprtk.hpp:15039
Definition: Exprtk.hpp:7272
const details::_uint64_t & max_loop_iterations_
Definition: Exprtk.hpp:7309
_uint64_t iteration_count_
Definition: Exprtk.hpp:7307
bool check() const
Definition: Exprtk.hpp:7288
void reset(const _uint64_t initial_value=0) const
Definition: Exprtk.hpp:7283
loop_runtime_checker(loop_runtime_check_ptr loop_runtime_check, loop_runtime_check::loop_types lp_typ=loop_runtime_check::e_invalid)
Definition: Exprtk.hpp:7273
loop_runtime_check::loop_types loop_type_
Definition: Exprtk.hpp:7310
loop_runtime_check_ptr loop_runtime_check_
Definition: Exprtk.hpp:7308
Definition: Exprtk.hpp:5052
unsigned int batch_size
Definition: Exprtk.hpp:5060
int upper_bound
Definition: Exprtk.hpp:5062
int remainder
Definition: Exprtk.hpp:5061
details(const std::size_t &vsize, const unsigned int loop_batch_size=global_loop_batch_size)
Definition: Exprtk.hpp:5053
Definition: Exprtk.hpp:14888
static T process(Type t1, Type t2)
Definition: Exprtk.hpp:14891
static T process(const std::string &t1, const std::string &t2)
Definition: Exprtk.hpp:14892
static details::operator_type operation()
Definition: Exprtk.hpp:14894
opr_base< T >::Type Type
Definition: Exprtk.hpp:14889
static expression_node< T >::node_type type()
Definition: Exprtk.hpp:14893
Definition: Exprtk.hpp:14899
static T process(const std::string &t1, const std::string &t2)
Definition: Exprtk.hpp:14903
static details::operator_type operation()
Definition: Exprtk.hpp:14905
opr_base< T >::Type Type
Definition: Exprtk.hpp:14900
static expression_node< T >::node_type type()
Definition: Exprtk.hpp:14904
static T process(Type t1, Type t2)
Definition: Exprtk.hpp:14902
Definition: Exprtk.hpp:12769
vector_holder_t * vector_holder_ptr
Definition: Exprtk.hpp:12772
vector_node< T > * vector_node_ptr
Definition: Exprtk.hpp:12770
memory_context_t()
Definition: Exprtk.hpp:12774
vector_holder_ptr temp_
Definition: Exprtk.hpp:12785
vector_node_ptr temp_vec_node_
Definition: Exprtk.hpp:12786
vector_holder< T > vector_holder_t
Definition: Exprtk.hpp:12771
void clear()
Definition: Exprtk.hpp:12779
Definition: Exprtk.hpp:14864
opr_base< T >::Type Type
Definition: Exprtk.hpp:14865
static expression_node< T >::node_type type()
Definition: Exprtk.hpp:14870
static T process(Type t1, Type t2)
Definition: Exprtk.hpp:14868
opr_base< T >::RefType RefType
Definition: Exprtk.hpp:14866
static details::operator_type operation()
Definition: Exprtk.hpp:14871
static void assign(RefType t1, Type t2)
Definition: Exprtk.hpp:14869
Definition: Exprtk.hpp:14825
static expression_node< T >::node_type type()
Definition: Exprtk.hpp:14832
opr_base< T >::Type Type
Definition: Exprtk.hpp:14826
opr_base< T >::RefType RefType
Definition: Exprtk.hpp:14827
static details::operator_type operation()
Definition: Exprtk.hpp:14833
static void assign(RefType t1, Type t2)
Definition: Exprtk.hpp:14831
static T process(Type t1, Type t2, Type t3)
Definition: Exprtk.hpp:14830
static T process(Type t1, Type t2)
Definition: Exprtk.hpp:14829
Definition: Exprtk.hpp:14974
static T process(Type t1, Type t2)
Definition: Exprtk.hpp:14977
static details::operator_type operation()
Definition: Exprtk.hpp:14979
static expression_node< T >::node_type type()
Definition: Exprtk.hpp:14978
opr_base< T >::Type Type
Definition: Exprtk.hpp:14975
Definition: Exprtk.hpp:14953
static expression_node< T >::node_type type()
Definition: Exprtk.hpp:14958
static T process(Type t1, Type t2)
Definition: Exprtk.hpp:14956
opr_base< T >::Type Type
Definition: Exprtk.hpp:14954
static details::operator_type operation()
Definition: Exprtk.hpp:14959
static T process(const std::string &t1, const std::string &t2)
Definition: Exprtk.hpp:14957
Definition: Exprtk.hpp:5447
virtual void collect_nodes(noderef_list_t &)
Definition: Exprtk.hpp:5455
std::vector< node_pp_t > noderef_list_t
Definition: Exprtk.hpp:5450
Node * node_ptr_t
Definition: Exprtk.hpp:5448
virtual ~node_collector_interface()
Definition: Exprtk.hpp:5452
Node ** node_pp_t
Definition: Exprtk.hpp:5449
Definition: Exprtk.hpp:5946
bool depth_set
Definition: Exprtk.hpp:6103
std::size_t compute_node_depth(const BranchType &n0, const BranchType &n1, const BranchType &n2) const
Definition: Exprtk.hpp:6039
std::pair< node_ptr_t, bool > nb_pair_t
Definition: Exprtk.hpp:5948
virtual ~node_depth_base()
Definition: Exprtk.hpp:5955
std::size_t max_node_depth(const BranchType &n0, const BranchType &n1, const BranchType &n2, const BranchType &n3) const
Definition: Exprtk.hpp:6018
virtual std::size_t node_depth() const
Definition: Exprtk.hpp:5958
std::size_t depth
Definition: Exprtk.hpp:6104
std::size_t max_node_depth(const BranchType &n0, const BranchType &n1, const BranchType &n2) const
Definition: Exprtk.hpp:6011
std::size_t compute_node_depth(const BranchType &n0, const BranchType &n1, const BranchType &n2, const BranchType &n3) const
Definition: Exprtk.hpp:6052
node_depth_base()
Definition: Exprtk.hpp:5950
std::size_t compute_node_depth(const nb_pair_t(&branch)[N]) const
Definition: Exprtk.hpp:5983
void collect(Node *&node, NodeSequence &delete_node_list) const
Definition: Exprtk.hpp:6125
std::size_t compute_node_depth(const Node *const &node) const
Definition: Exprtk.hpp:5960
std::size_t compute_node_depth(const Sequence< nb_pair_t, Allocator > &branch_list) const
Definition: Exprtk.hpp:6085
void collect(const nb_pair_t &branch, NodeSequence &delete_node_list) const
Definition: Exprtk.hpp:6118
std::size_t compute_node_depth(const BranchType &n0, const BranchType &n1) const
Definition: Exprtk.hpp:6027
void collect(const nb_pair_t(&branch)[N], NodeSequence &delete_node_list) const
Definition: Exprtk.hpp:6132
void collect(const Sequence< nb_pair_t, Allocator > &branch, NodeSequence &delete_node_list) const
Definition: Exprtk.hpp:6144
std::size_t compute_node_depth(const Sequence< node_ptr_t, Allocator > &branch_list) const
Definition: Exprtk.hpp:6066
void collect(node_ptr_t const &node, const bool deletable, NodeSequence &delete_node_list) const
Definition: Exprtk.hpp:6107
std::size_t max_node_depth(const BranchType &n0, const BranchType &n1) const
Definition: Exprtk.hpp:6005
Node * node_ptr_t
Definition: Exprtk.hpp:5947
std::size_t compute_node_depth(const nb_pair_t &branch) const
Definition: Exprtk.hpp:5971
void collect(const Sequence< node_ptr_t, Allocator > &branch_list, NodeSequence &delete_node_list) const
Definition: Exprtk.hpp:6156
void collect(const Sequence< node_ptr_t, AllocatorT > &branch_list, const Sequence< Boolean, AllocatorB > &branch_deletable_list, NodeSequence &delete_node_list) const
Definition: Exprtk.hpp:6170
Definition: Exprtk.hpp:16478
static const expression_node< T >::node_type result
Definition: Exprtk.hpp:16478
Definition: Exprtk.hpp:16500
static const expression_node< T >::node_type result
Definition: Exprtk.hpp:16500
Definition: Exprtk.hpp:16522
static const expression_node< T >::node_type result
Definition: Exprtk.hpp:16522
Definition: Exprtk.hpp:14994
opr_base< T >::Type Type
Definition: Exprtk.hpp:14995
static details::operator_type operation()
Definition: Exprtk.hpp:14999
static expression_node< T >::node_type type()
Definition: Exprtk.hpp:14998
static T process(Type t1, Type t2)
Definition: Exprtk.hpp:14997
Definition: Exprtk.hpp:824
int_type_tag()
Definition: Exprtk.hpp:824
Definition: Exprtk.hpp:828
number_type()
Definition: Exprtk.hpp:830
unknown_type_tag type
Definition: Exprtk.hpp:829
Definition: Exprtk.hpp:823
real_type_tag()
Definition: Exprtk.hpp:823
Definition: Exprtk.hpp:822
unknown_type_tag()
Definition: Exprtk.hpp:822
static T result(const T)
Definition: Exprtk.hpp:1629
static T result(const T v)
Definition: Exprtk.hpp:1619
static T result(const T v)
Definition: Exprtk.hpp:1628
static T result(const T v)
Definition: Exprtk.hpp:1627
static T result(const T v)
Definition: Exprtk.hpp:1626
static T result(const T v)
Definition: Exprtk.hpp:1625
static T result(const T v)
Definition: Exprtk.hpp:1624
static T result(const T v)
Definition: Exprtk.hpp:1623
static T result(const T v)
Definition: Exprtk.hpp:1622
static T result(const T v)
Definition: Exprtk.hpp:1621
static T result(const T v)
Definition: Exprtk.hpp:1620
Definition: Exprtk.hpp:1597
static T result(T v)
Definition: Exprtk.hpp:1598
Definition: Exprtk.hpp:1420
@ bound_length
Definition: Exprtk.hpp:1420
@ max_exp
Definition: Exprtk.hpp:1420
@ min_exp
Definition: Exprtk.hpp:1420
@ length
Definition: Exprtk.hpp:1420
@ size
Definition: Exprtk.hpp:1420
Definition: Exprtk.hpp:14984
static details::operator_type operation()
Definition: Exprtk.hpp:14989
opr_base< T >::Type Type
Definition: Exprtk.hpp:14985
static expression_node< T >::node_type type()
Definition: Exprtk.hpp:14988
static T process(Type t1, Type t2)
Definition: Exprtk.hpp:14987
static std::string result()
Definition: Exprtk.hpp:16316
Definition: Exprtk.hpp:16313
static std::string result()
Definition: Exprtk.hpp:16313
Definition: Exprtk.hpp:14876
opr_base< T >::RefType RefType
Definition: Exprtk.hpp:14878
opr_base< T >::Type Type
Definition: Exprtk.hpp:14877
static expression_node< T >::node_type type()
Definition: Exprtk.hpp:14882
static details::operator_type operation()
Definition: Exprtk.hpp:14883
static void assign(RefType t1, Type t2)
Definition: Exprtk.hpp:14881
static T process(Type t1, Type t2)
Definition: Exprtk.hpp:14880
Definition: Exprtk.hpp:8307
strbase_ptr_t str_node
Definition: Exprtk.hpp:8323
range_pack< T > range_t
Definition: Exprtk.hpp:8308
std::size_t type_size
Definition: Exprtk.hpp:8322
string_base_node< T > * strbase_ptr_t
Definition: Exprtk.hpp:8309
std::size_t size
Definition: Exprtk.hpp:8321
range_t * range
Definition: Exprtk.hpp:8319
void * data
Definition: Exprtk.hpp:8320
range_data_type()
Definition: Exprtk.hpp:8311
Definition: Exprtk.hpp:8159
std::size_t const_size() const
Definition: Exprtk.hpp:8260
cached_range_t cache
Definition: Exprtk.hpp:8274
std::size_t cache_size() const
Definition: Exprtk.hpp:8265
range_pack()
Definition: Exprtk.hpp:8163
std::pair< bool, expression_node_ptr > n1_e
Definition: Exprtk.hpp:8271
expression_node< T > * expression_node_ptr
Definition: Exprtk.hpp:8160
std::pair< std::size_t, std::size_t > cached_range_t
Definition: Exprtk.hpp:8161
std::pair< bool, std::size_t > n0_c
Definition: Exprtk.hpp:8272
std::pair< bool, std::size_t > n1_c
Definition: Exprtk.hpp:8273
void free()
Definition: Exprtk.hpp:8180
bool var_range() const
Definition: Exprtk.hpp:8215
std::pair< bool, expression_node_ptr > n0_e
Definition: Exprtk.hpp:8270
bool const_range() const
Definition: Exprtk.hpp:8209
void clear()
Definition: Exprtk.hpp:8171
Definition: Exprtk.hpp:754
static void process(T *base_ptr, const std::size_t size)
Definition: Exprtk.hpp:755
Definition: Exprtk.hpp:11114
details::functor_t< T >::Type Type
Definition: Exprtk.hpp:11115
functor_t::tfunc_t trinary_functor_t
Definition: Exprtk.hpp:11118
functor_t::ufunc_t unary_functor_t
Definition: Exprtk.hpp:11120
details::functor_t< T > functor_t
Definition: Exprtk.hpp:11116
functor_t::bfunc_t binary_functor_t
Definition: Exprtk.hpp:11119
functor_t::qfunc_t quaternary_functor_t
Definition: Exprtk.hpp:11117
Definition: Exprtk.hpp:14838
static void assign(RefType t1, Type t2)
Definition: Exprtk.hpp:14844
static T process(Type t1, Type t2, Type t3)
Definition: Exprtk.hpp:14843
static T process(Type t1, Type t2)
Definition: Exprtk.hpp:14842
opr_base< T >::RefType RefType
Definition: Exprtk.hpp:14840
static details::operator_type operation()
Definition: Exprtk.hpp:14846
static expression_node< T >::node_type type()
Definition: Exprtk.hpp:14845
opr_base< T >::Type Type
Definition: Exprtk.hpp:14839
Definition: Exprtk.hpp:15696
vector_interface< T > * ivector_ptr
Definition: Exprtk.hpp:15697
static T process(const ivector_ptr v)
Definition: Exprtk.hpp:15699
Definition: Exprtk.hpp:15895
static T process(const ivector_ptr v)
Definition: Exprtk.hpp:15898
vector_interface< T > * ivector_ptr
Definition: Exprtk.hpp:15896
Definition: Exprtk.hpp:5110
data_t data
Definition: Exprtk.hpp:5173
bool destruct
Definition: Exprtk.hpp:5174
std::size_t size
Definition: Exprtk.hpp:5172
void create_data()
Definition: Exprtk.hpp:5181
static void destroy(control_block *&cntrl_blck)
Definition: Exprtk.hpp:5155
static control_block * create(const std::size_t &dsize, data_t data_ptr=data_t(0), bool dstrct=false)
Definition: Exprtk.hpp:5142
control_block & operator=(const control_block &) exprtk_delete
std::size_t ref_count
Definition: Exprtk.hpp:5171
control_block()
Definition: Exprtk.hpp:5111
control_block(const control_block &) exprtk_delete
control_block(const std::size_t &dsize)
Definition: Exprtk.hpp:5118
~control_block()
Definition: Exprtk.hpp:5132
control_block(const std::size_t &dsize, data_t dptr, bool dstrct=false)
Definition: Exprtk.hpp:5125
Definition: Exprtk.hpp:15931
vector_interface< T > * ivector_ptr
Definition: Exprtk.hpp:15932
static T process(const ivector_ptr v)
Definition: Exprtk.hpp:15934
Definition: Exprtk.hpp:15907
vector_interface< T > * ivector_ptr
Definition: Exprtk.hpp:15908
static T process(const ivector_ptr v)
Definition: Exprtk.hpp:15910
Definition: Exprtk.hpp:15796
vector_interface< T > * ivector_ptr
Definition: Exprtk.hpp:15797
static T process(const ivector_ptr v)
Definition: Exprtk.hpp:15799
Definition: Exprtk.hpp:15014
static details::operator_type operation()
Definition: Exprtk.hpp:15019
opr_base< T >::Type Type
Definition: Exprtk.hpp:15015
static expression_node< T >::node_type type()
Definition: Exprtk.hpp:15018
static T process(Type t1, Type t2)
Definition: Exprtk.hpp:15017
Definition: Exprtk.hpp:15004
static expression_node< T >::node_type type()
Definition: Exprtk.hpp:15008
static details::operator_type operation()
Definition: Exprtk.hpp:15009
opr_base< T >::Type Type
Definition: Exprtk.hpp:15005
static T process(Type t1, Type t2)
Definition: Exprtk.hpp:15007
Definition: Exprtk.hpp:20793
void * pointer
Definition: Exprtk.hpp:20806
std::size_t size
Definition: Exprtk.hpp:20808
data_pack(void *ptr, const data_type dt, const std::size_t sz=0)
Definition: Exprtk.hpp:20800
data_type type
Definition: Exprtk.hpp:20807
data_pack()
Definition: Exprtk.hpp:20794
Definition: Exprtk.hpp:20781
std::vector< data_pack > local_data_list_t
Definition: Exprtk.hpp:20811
std::size_t ref_count
Definition: Exprtk.hpp:20891
static cntrl_blck_ptr_t create(expression_ptr e)
Definition: Exprtk.hpp:20870
expression_ptr expr
Definition: Exprtk.hpp:20892
control_block(expression_ptr e)
Definition: Exprtk.hpp:20823
~control_block()
Definition: Exprtk.hpp:20831
control_block()
Definition: Exprtk.hpp:20815
results_context_t * results
Definition: Exprtk.hpp:20894
static void destroy(cntrl_blck_ptr_t &cntrl_blck)
Definition: Exprtk.hpp:20875
data_type
Definition: Exprtk.hpp:20783
@ e_expr
Definition: Exprtk.hpp:20785
@ e_data
Definition: Exprtk.hpp:20787
@ e_unknown
Definition: Exprtk.hpp:20784
@ e_vecdata
Definition: Exprtk.hpp:20788
@ e_vecholder
Definition: Exprtk.hpp:20786
results_context< T > results_context_t
Definition: Exprtk.hpp:20812
bool retinv_null
Definition: Exprtk.hpp:20895
local_data_list_t local_data_list
Definition: Exprtk.hpp:20893
control_block * cntrl_blck_ptr_t
Definition: Exprtk.hpp:20813
Definition: Exprtk.hpp:41159
virtual ~base_func()
Definition: Exprtk.hpp:41177
void copy(const varref_t &src_v, var_t &dest_v)
Definition: Exprtk.hpp:41303
virtual T value(expression_t &e)
Definition: Exprtk.hpp:41365
std::deque< var_t > param_stack
Definition: Exprtk.hpp:41375
std::size_t stack_depth
Definition: Exprtk.hpp:41374
base_func(const std::size_t &pc=0)
Definition: Exprtk.hpp:41169
void pre()
Definition: Exprtk.hpp:41265
exprtk::ifunction< T > function_t
Definition: Exprtk.hpp:41161
void copy(const var_t &src_v, lvr_vec_t &dest_v)
Definition: Exprtk.hpp:41338
void copy(const lvr_vec_t &src_v, var_t &dest_v)
Definition: Exprtk.hpp:41319
void post()
Definition: Exprtk.hpp:41285
const T & type
Definition: Exprtk.hpp:41160
void update(const T &v0, const T &v1, const T &v2, const T &v3)
Definition: Exprtk.hpp:41199
std::vector< T * > varref_t
Definition: Exprtk.hpp:41162
void update(const T &v0, const T &v1, const T &v2)
Definition: Exprtk.hpp:41193
varref_t v
Definition: Exprtk.hpp:41371
std::size_t local_var_stack_size
Definition: Exprtk.hpp:41373
void update(const T &v0, const T &v1)
Definition: Exprtk.hpp:41188
std::vector< lvarref_t > lvr_vec_t
Definition: Exprtk.hpp:41165
void update(const T &v0, const T &v1, const T &v2, const T &v3, const T &v4, const T &v5)
Definition: Exprtk.hpp:41212
void copy(const var_t &src_v, varref_t &dest_v)
Definition: Exprtk.hpp:41311
lvr_vec_t lv
Definition: Exprtk.hpp:41372
std::vector< T > var_t
Definition: Exprtk.hpp:41163
std::deque< var_t > local_stack
Definition: Exprtk.hpp:41376
expression_t expression
Definition: Exprtk.hpp:41370
function_t & setup(expression_t &expr)
Definition: Exprtk.hpp:41223
void update(const T &v0, const T &v1, const T &v2, const T &v3, const T &v4)
Definition: Exprtk.hpp:41205
void update(const T &v0)
Definition: Exprtk.hpp:41183
std::pair< T *, std::size_t > lvarref_t
Definition: Exprtk.hpp:41164
void clear_stack()
Definition: Exprtk.hpp:41357
Definition: Exprtk.hpp:41382
func_0param()
Definition: Exprtk.hpp:41385
Definition: Exprtk.hpp:41418
func_1param()
Definition: Exprtk.hpp:41421
Definition: Exprtk.hpp:41432
func_2param()
Definition: Exprtk.hpp:41435
Definition: Exprtk.hpp:41446
func_3param()
Definition: Exprtk.hpp:41449
Definition: Exprtk.hpp:41460
func_4param()
Definition: Exprtk.hpp:41463
Definition: Exprtk.hpp:41474
func_5param()
Definition: Exprtk.hpp:41477
Definition: Exprtk.hpp:41488
func_6param()
Definition: Exprtk.hpp:41491
Definition: Exprtk.hpp:41022
function & name(const std::string &n)
Definition: Exprtk.hpp:41089
function & vars(const std::string &v0, const std::string &v1, const std::string &v2)
Definition: Exprtk.hpp:41115
function & vars(const std::string &v0, const std::string &v1, const std::string &v2, const std::string &v3, const std::string &v4)
Definition: Exprtk.hpp:41137
std::deque< std::string > v_
Definition: Exprtk.hpp:41153
std::string name_
Definition: Exprtk.hpp:41151
function & vars(const std::string &v0, const std::string &v1, const std::string &v2, const std::string &v3)
Definition: Exprtk.hpp:41125
function & vars(const std::string &v0, const std::string &v1)
Definition: Exprtk.hpp:41107
function & var(const std::string &v)
Definition: Exprtk.hpp:41101
function & expression(const std::string &e)
Definition: Exprtk.hpp:41095
std::string expression_
Definition: Exprtk.hpp:41152
Definition: Exprtk.hpp:41397
scoped_bft & operator=(const scoped_bft &) exprtk_delete
scoped_bft(BaseFuncType &bft)
Definition: Exprtk.hpp:41398
BaseFuncType & bft_
Definition: Exprtk.hpp:41409
scoped_bft(const scoped_bft &) exprtk_delete
~scoped_bft()
Definition: Exprtk.hpp:41404
Definition: Exprtk.hpp:4118
std::vector< lexer::token_inserter * > token_inserter_list
Definition: Exprtk.hpp:4266
bool register_inserter(lexer::token_inserter *inserter)
Definition: Exprtk.hpp:4161
lexer::token_joiner * error_token_joiner
Definition: Exprtk.hpp:4270
std::vector< lexer::token_joiner * > token_joiner_list
Definition: Exprtk.hpp:4265
bool run_inserters(lexer::generator &g)
Definition: Exprtk.hpp:4219
bool register_scanner(lexer::token_scanner *scanner)
Definition: Exprtk.hpp:4119
bool run_joiners(lexer::generator &g)
Definition: Exprtk.hpp:4197
std::vector< lexer::token_modifier * > token_modifier_list
Definition: Exprtk.hpp:4264
bool register_joiner(lexer::token_joiner *joiner)
Definition: Exprtk.hpp:4147
bool register_modifier(lexer::token_modifier *modifier)
Definition: Exprtk.hpp:4133
lexer::token_modifier * error_token_modifier
Definition: Exprtk.hpp:4269
std::vector< lexer::token_scanner * > token_scanner_list
Definition: Exprtk.hpp:4263
bool run_scanners(lexer::generator &g)
Definition: Exprtk.hpp:4241
lexer::token_scanner * error_token_scanner
Definition: Exprtk.hpp:4268
bool run_modifiers(lexer::generator &g)
Definition: Exprtk.hpp:4175
lexer::token_inserter * error_token_inserter
Definition: Exprtk.hpp:4271
Definition: Exprtk.hpp:2176
token & set_string(const Iterator begin, const Iterator end, const Iterator base_begin=Iterator(0))
Definition: Exprtk.hpp:2241
std::size_t position
Definition: Exprtk.hpp:2344
bool is_error() const
Definition: Exprtk.hpp:2331
token & set_string(const std::string &s, const std::size_t p)
Definition: Exprtk.hpp:2250
token & set_symbol(const Iterator begin, const Iterator end, const Iterator base_begin=Iterator(0))
Definition: Exprtk.hpp:2221
token & set_operator(const token_type tt, const Iterator begin, const Iterator end, const Iterator base_begin=Iterator(0))
Definition: Exprtk.hpp:2209
token & set_numeric(const Iterator begin, const Iterator end, const Iterator base_begin=Iterator(0))
Definition: Exprtk.hpp:2231
std::string value
Definition: Exprtk.hpp:2343
token & set_error(const token_type et, const Iterator begin, const Iterator end, const Iterator base_begin=Iterator(0))
Definition: Exprtk.hpp:2259
void clear()
Definition: Exprtk.hpp:2201
token()
Definition: Exprtk.hpp:2195
static std::string to_str(token_type t)
Definition: Exprtk.hpp:2284
token_type type
Definition: Exprtk.hpp:2342
token_type
Definition: Exprtk.hpp:2178
@ e_divass
Definition: Exprtk.hpp:2183
@ e_rbracket
Definition: Exprtk.hpp:2187
@ e_addass
Definition: Exprtk.hpp:2182
@ e_lte
Definition: Exprtk.hpp:2185
@ e_err_number
Definition: Exprtk.hpp:2180
@ e_error
Definition: Exprtk.hpp:2179
@ e_rsqrbracket
Definition: Exprtk.hpp:2188
@ e_assign
Definition: Exprtk.hpp:2182
@ e_swap
Definition: Exprtk.hpp:2186
@ e_lsqrbracket
Definition: Exprtk.hpp:2188
@ e_pow
Definition: Exprtk.hpp:2191
@ e_mulass
Definition: Exprtk.hpp:2183
@ e_div
Definition: Exprtk.hpp:2190
@ e_shr
Definition: Exprtk.hpp:2184
@ e_comma
Definition: Exprtk.hpp:2189
@ e_lt
Definition: Exprtk.hpp:2186
@ e_symbol
Definition: Exprtk.hpp:2181
@ e_string
Definition: Exprtk.hpp:2182
@ e_err_sfunc
Definition: Exprtk.hpp:2180
@ e_sub
Definition: Exprtk.hpp:2190
@ e_lbracket
Definition: Exprtk.hpp:2187
@ e_rcrlbracket
Definition: Exprtk.hpp:2188
@ e_eof
Definition: Exprtk.hpp:2181
@ e_lcrlbracket
Definition: Exprtk.hpp:2189
@ e_err_symbol
Definition: Exprtk.hpp:2179
@ e_gte
Definition: Exprtk.hpp:2185
@ e_eq
Definition: Exprtk.hpp:2187
@ e_shl
Definition: Exprtk.hpp:2184
@ e_number
Definition: Exprtk.hpp:2181
@ e_modass
Definition: Exprtk.hpp:2184
@ e_subass
Definition: Exprtk.hpp:2183
@ e_mod
Definition: Exprtk.hpp:2191
@ e_ternary
Definition: Exprtk.hpp:2192
@ e_err_string
Definition: Exprtk.hpp:2180
@ e_gt
Definition: Exprtk.hpp:2186
@ e_add
Definition: Exprtk.hpp:2189
@ e_mul
Definition: Exprtk.hpp:2190
@ e_ne
Definition: Exprtk.hpp:2185
@ e_colon
Definition: Exprtk.hpp:2191
Definition: Exprtk.hpp:2112
violation_type violation
Definition: Exprtk.hpp:2114
loop_types loop
Definition: Exprtk.hpp:2113
details::_uint64_t iteration_count
Definition: Exprtk.hpp:2115
Definition: Exprtk.hpp:2085
virtual void handle_runtime_violation(const violation_context &)
Definition: Exprtk.hpp:2123
loop_types loop_set
Definition: Exprtk.hpp:2102
virtual bool check()
Definition: Exprtk.hpp:2118
loop_types
Definition: Exprtk.hpp:2087
@ e_while_loop
Definition: Exprtk.hpp:2090
@ e_repeat_until_loop
Definition: Exprtk.hpp:2091
@ e_for_loop
Definition: Exprtk.hpp:2089
@ e_invalid
Definition: Exprtk.hpp:2088
details::_uint64_t max_loop_iterations
Definition: Exprtk.hpp:2109
violation_type
Definition: Exprtk.hpp:2096
@ e_iteration_count
Definition: Exprtk.hpp:2098
virtual ~loop_runtime_check()
Definition: Exprtk.hpp:2128
loop_runtime_check()
Definition: Exprtk.hpp:2104
Definition: Exprtk.hpp:21832
static bool is_greater(const T_ &v, const T_ &end)
Definition: Exprtk.hpp:21844
static bool end_inclusive()
Definition: Exprtk.hpp:21849
static bool is_less(const T_ &v, const T_ &begin)
Definition: Exprtk.hpp:21839
static bool is_within(const T_ &v, const T_ &begin, const T_ &end)
Definition: Exprtk.hpp:21833
Definition: Exprtk.hpp:31356
static T process(const arg_list_t &arg)
Definition: Exprtk.hpp:31357
Definition: Exprtk.hpp:31368
static T process(const arg_list_t &arg)
Definition: Exprtk.hpp:31369
Definition: Exprtk.hpp:31380
static T process(const arg_list_t &arg)
Definition: Exprtk.hpp:31381
Definition: Exprtk.hpp:31393
static T process(const arg_list_t &arg)
Definition: Exprtk.hpp:31394
Definition: Exprtk.hpp:31406
static T process(const arg_list_t &arg)
Definition: Exprtk.hpp:31407
Definition: Exprtk.hpp:31420
static T process(const arg_list_t &arg)
Definition: Exprtk.hpp:31421
Definition: Exprtk.hpp:31434
static T process(const arg_list_t &arg)
Definition: Exprtk.hpp:31435
Definition: Exprtk.hpp:31349
std::vector< std::pair< expression_node_ptr, bool > > arg_list_t
Definition: Exprtk.hpp:31350
Definition: Exprtk.hpp:33392
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:33393
Definition: Exprtk.hpp:33841
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:33842
Definition: Exprtk.hpp:33617
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:33618
Definition: Exprtk.hpp:33703
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:33704
Definition: Exprtk.hpp:34165
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:34166
Definition: Exprtk.hpp:33960
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:33961
Definition: Exprtk.hpp:35447
cocov_t::type0 node_type
Definition: Exprtk.hpp:35448
static expression_node_ptr process(expression_generator< Type > &, const details::operator_type &, expression_node_ptr(&)[2])
Definition: Exprtk.hpp:35449
Definition: Exprtk.hpp:35459
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:35463
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1)
Definition: Exprtk.hpp:35566
cocov_t::sf3_type sf3_type
Definition: Exprtk.hpp:35461
cocov_t::type1 node_type
Definition: Exprtk.hpp:35460
Definition: Exprtk.hpp:34369
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:34370
Definition: Exprtk.hpp:35209
covoc_t::sf3_type sf3_type
Definition: Exprtk.hpp:35211
covoc_t::type0 node_type
Definition: Exprtk.hpp:35210
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:35213
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1)
Definition: Exprtk.hpp:35316
Definition: Exprtk.hpp:35328
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:35332
covoc_t::sf3_type sf3_type
Definition: Exprtk.hpp:35330
covoc_t::type1 node_type
Definition: Exprtk.hpp:35329
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1)
Definition: Exprtk.hpp:35435
Definition: Exprtk.hpp:36197
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:36377
node_type::T2 T2
Definition: Exprtk.hpp:36202
covocov_t::sf4_type sf4_type
Definition: Exprtk.hpp:36199
node_type::T0 T0
Definition: Exprtk.hpp:36200
node_type::T1 T1
Definition: Exprtk.hpp:36201
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:36205
covocov_t::type0 node_type
Definition: Exprtk.hpp:36198
node_type::T3 T3
Definition: Exprtk.hpp:36203
Definition: Exprtk.hpp:37323
node_type::T1 T1
Definition: Exprtk.hpp:37327
node_type::T3 T3
Definition: Exprtk.hpp:37329
node_type::T2 T2
Definition: Exprtk.hpp:37328
node_type::T0 T0
Definition: Exprtk.hpp:37326
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:37370
covocov_t::type1 node_type
Definition: Exprtk.hpp:37324
covocov_t::sf4_type sf4_type
Definition: Exprtk.hpp:37325
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:37331
Definition: Exprtk.hpp:37865
node_type::T1 T1
Definition: Exprtk.hpp:37869
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:37873
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:37912
covocov_t::sf4_type sf4_type
Definition: Exprtk.hpp:37867
node_type::T0 T0
Definition: Exprtk.hpp:37868
covocov_t::type2 node_type
Definition: Exprtk.hpp:37866
node_type::T3 T3
Definition: Exprtk.hpp:37871
node_type::T2 T2
Definition: Exprtk.hpp:37870
Definition: Exprtk.hpp:38369
node_type::T1 T1
Definition: Exprtk.hpp:38373
covocov_t::sf4_type sf4_type
Definition: Exprtk.hpp:38371
node_type::T0 T0
Definition: Exprtk.hpp:38372
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:38377
covocov_t::type3 node_type
Definition: Exprtk.hpp:38370
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:38415
node_type::T3 T3
Definition: Exprtk.hpp:38375
node_type::T2 T2
Definition: Exprtk.hpp:38374
Definition: Exprtk.hpp:38911
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:38919
node_type::T0 T0
Definition: Exprtk.hpp:38914
node_type::T1 T1
Definition: Exprtk.hpp:38915
covocov_t::type4 node_type
Definition: Exprtk.hpp:38912
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:38957
covocov_t::sf4_type sf4_type
Definition: Exprtk.hpp:38913
node_type::T2 T2
Definition: Exprtk.hpp:38916
node_type::T3 T3
Definition: Exprtk.hpp:38917
Definition: Exprtk.hpp:35078
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1)
Definition: Exprtk.hpp:35131
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:35082
covov_t::sf3_type sf3_type
Definition: Exprtk.hpp:35080
covov_t::type0 node_type
Definition: Exprtk.hpp:35079
Definition: Exprtk.hpp:35143
covov_t::sf3_type sf3_type
Definition: Exprtk.hpp:35145
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:35147
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1)
Definition: Exprtk.hpp:35197
covov_t::type1 node_type
Definition: Exprtk.hpp:35144
Definition: Exprtk.hpp:36635
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:36643
node_type::T2 T2
Definition: Exprtk.hpp:36640
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:36815
covovoc_t::sf4_type sf4_type
Definition: Exprtk.hpp:36637
node_type::T1 T1
Definition: Exprtk.hpp:36639
covovoc_t::type0 node_type
Definition: Exprtk.hpp:36636
node_type::T3 T3
Definition: Exprtk.hpp:36641
node_type::T0 T0
Definition: Exprtk.hpp:36638
Definition: Exprtk.hpp:37444
covovoc_t::sf4_type sf4_type
Definition: Exprtk.hpp:37446
node_type::T1 T1
Definition: Exprtk.hpp:37448
covovoc_t::type1 node_type
Definition: Exprtk.hpp:37445
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:37490
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:37451
node_type::T3 T3
Definition: Exprtk.hpp:37450
node_type::T0 T0
Definition: Exprtk.hpp:37447
node_type::T2 T2
Definition: Exprtk.hpp:37449
Definition: Exprtk.hpp:37986
node_type::T2 T2
Definition: Exprtk.hpp:37991
node_type::T3 T3
Definition: Exprtk.hpp:37992
covovoc_t::sf4_type sf4_type
Definition: Exprtk.hpp:37988
covovoc_t::type2 node_type
Definition: Exprtk.hpp:37987
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:38033
node_type::T1 T1
Definition: Exprtk.hpp:37990
node_type::T0 T0
Definition: Exprtk.hpp:37989
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:37994
Definition: Exprtk.hpp:38490
covovoc_t::sf4_type sf4_type
Definition: Exprtk.hpp:38492
covovoc_t::type3 node_type
Definition: Exprtk.hpp:38491
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:38498
node_type::T2 T2
Definition: Exprtk.hpp:38495
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:38537
node_type::T0 T0
Definition: Exprtk.hpp:38493
node_type::T1 T1
Definition: Exprtk.hpp:38494
node_type::T3 T3
Definition: Exprtk.hpp:38496
Definition: Exprtk.hpp:39032
node_type::T2 T2
Definition: Exprtk.hpp:39037
covovoc_t::type4 node_type
Definition: Exprtk.hpp:39033
node_type::T3 T3
Definition: Exprtk.hpp:39038
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:39040
node_type::T1 T1
Definition: Exprtk.hpp:39036
node_type::T0 T0
Definition: Exprtk.hpp:39035
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:39079
covovoc_t::sf4_type sf4_type
Definition: Exprtk.hpp:39034
Definition: Exprtk.hpp:36108
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:36183
node_type::T0 T0
Definition: Exprtk.hpp:36111
node_type::T2 T2
Definition: Exprtk.hpp:36113
covovov_t::sf4_type sf4_type
Definition: Exprtk.hpp:36110
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:36116
node_type::T3 T3
Definition: Exprtk.hpp:36114
covovov_t::type0 node_type
Definition: Exprtk.hpp:36109
node_type::T1 T1
Definition: Exprtk.hpp:36112
Definition: Exprtk.hpp:37262
covovov_t::sf4_type sf4_type
Definition: Exprtk.hpp:37264
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:37309
node_type::T3 T3
Definition: Exprtk.hpp:37268
node_type::T1 T1
Definition: Exprtk.hpp:37266
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:37270
covovov_t::type1 node_type
Definition: Exprtk.hpp:37263
node_type::T0 T0
Definition: Exprtk.hpp:37265
node_type::T2 T2
Definition: Exprtk.hpp:37267
Definition: Exprtk.hpp:37804
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:37851
covovov_t::sf4_type sf4_type
Definition: Exprtk.hpp:37806
node_type::T2 T2
Definition: Exprtk.hpp:37809
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:37812
node_type::T1 T1
Definition: Exprtk.hpp:37808
node_type::T3 T3
Definition: Exprtk.hpp:37810
covovov_t::type2 node_type
Definition: Exprtk.hpp:37805
node_type::T0 T0
Definition: Exprtk.hpp:37807
Definition: Exprtk.hpp:38309
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:38355
node_type::T2 T2
Definition: Exprtk.hpp:38314
node_type::T3 T3
Definition: Exprtk.hpp:38315
node_type::T1 T1
Definition: Exprtk.hpp:38313
covovov_t::type3 node_type
Definition: Exprtk.hpp:38310
covovov_t::sf4_type sf4_type
Definition: Exprtk.hpp:38311
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:38317
node_type::T0 T0
Definition: Exprtk.hpp:38312
Definition: Exprtk.hpp:38851
node_type::T0 T0
Definition: Exprtk.hpp:38854
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:38897
node_type::T2 T2
Definition: Exprtk.hpp:38856
covovov_t::sf4_type sf4_type
Definition: Exprtk.hpp:38853
node_type::T3 T3
Definition: Exprtk.hpp:38857
covovov_t::type4 node_type
Definition: Exprtk.hpp:38852
node_type::T1 T1
Definition: Exprtk.hpp:38855
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:38859
Definition: Exprtk.hpp:34448
static bool compile(expression_generator< Type > &expr_gen, const std::string &id, T0 t0, T1 t1, T2 t2, expression_node_ptr &result)
Definition: Exprtk.hpp:34474
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &sf3opr, T0 t0, T1 t1, T2 t2)
Definition: Exprtk.hpp:34450
Definition: Exprtk.hpp:34491
static bool compile_left(expression_generator< Type > &expr_gen, ExternalType t, const details::operator_type &operation, expression_node_ptr &sf3node, expression_node_ptr &result)
Definition: Exprtk.hpp:34600
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &sf4opr, T0 t0, T1 t1, T2 t2, T3 t3)
Definition: Exprtk.hpp:34493
static bool compile_left_impl(expression_generator< Type > &expr_gen, const std::string &id, ExternalType t, expression_node_ptr &node, expression_node_ptr &result)
Definition: Exprtk.hpp:34664
static bool compile_right(expression_generator< Type > &expr_gen, ExternalType t, const details::operator_type &operation, expression_node_ptr &sf3node, expression_node_ptr &result)
Definition: Exprtk.hpp:34558
static bool compile_right_impl(expression_generator< Type > &expr_gen, const std::string &id, ExternalType t, expression_node_ptr &node, expression_node_ptr &result)
Definition: Exprtk.hpp:34642
static bool compile(expression_generator< Type > &expr_gen, const std::string &id, T0 t0, T1 t1, T2 t2, T3 t3, expression_node_ptr &result)
Definition: Exprtk.hpp:34541
Definition: Exprtk.hpp:33542
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:33543
Definition: Exprtk.hpp:34404
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:34405
Definition: Exprtk.hpp:35578
vococ_t::sf3_type sf3_type
Definition: Exprtk.hpp:35580
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1)
Definition: Exprtk.hpp:35693
vococ_t::type0 node_type
Definition: Exprtk.hpp:35579
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:35582
Definition: Exprtk.hpp:35705
vococ_t::type0 node_type
Definition: Exprtk.hpp:35706
static expression_node_ptr process(expression_generator< Type > &, const details::operator_type &, expression_node_ptr(&)[2])
Definition: Exprtk.hpp:35708
Definition: Exprtk.hpp:36829
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:36837
vococov_t::type0 node_type
Definition: Exprtk.hpp:36830
vococov_t::sf4_type sf4_type
Definition: Exprtk.hpp:36831
node_type::T2 T2
Definition: Exprtk.hpp:36834
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:37008
node_type::T1 T1
Definition: Exprtk.hpp:36833
node_type::T0 T0
Definition: Exprtk.hpp:36832
node_type::T3 T3
Definition: Exprtk.hpp:36835
Definition: Exprtk.hpp:37504
node_type::T1 T1
Definition: Exprtk.hpp:37508
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:37550
node_type::T0 T0
Definition: Exprtk.hpp:37507
vococov_t::sf4_type sf4_type
Definition: Exprtk.hpp:37506
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:37512
node_type::T2 T2
Definition: Exprtk.hpp:37509
node_type::T3 T3
Definition: Exprtk.hpp:37510
vococov_t::type1 node_type
Definition: Exprtk.hpp:37505
Definition: Exprtk.hpp:38047
static expression_node_ptr process(expression_generator< Type > &, const details::operator_type &, expression_node_ptr(&)[2])
Definition: Exprtk.hpp:38049
vococov_t::type2 node_type
Definition: Exprtk.hpp:38048
static std::string id(expression_generator< Type > &, const details::operator_type, const details::operator_type, const details::operator_type)
Definition: Exprtk.hpp:38058
Definition: Exprtk.hpp:38551
node_type::T0 T0
Definition: Exprtk.hpp:38554
node_type::T2 T2
Definition: Exprtk.hpp:38556
node_type::T3 T3
Definition: Exprtk.hpp:38557
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:38597
node_type::T1 T1
Definition: Exprtk.hpp:38555
vococov_t::type3 node_type
Definition: Exprtk.hpp:38552
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:38559
vococov_t::sf4_type sf4_type
Definition: Exprtk.hpp:38553
Definition: Exprtk.hpp:39093
vococov_t::type4 node_type
Definition: Exprtk.hpp:39094
static expression_node_ptr process(expression_generator< Type > &, const details::operator_type &, expression_node_ptr(&)[2])
Definition: Exprtk.hpp:39095
static std::string id(expression_generator< Type > &, const details::operator_type, const details::operator_type, const details::operator_type)
Definition: Exprtk.hpp:39104
Definition: Exprtk.hpp:34948
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1)
Definition: Exprtk.hpp:35001
vocov_t::type0 node_type
Definition: Exprtk.hpp:34949
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:34952
vocov_t::sf3_type sf3_type
Definition: Exprtk.hpp:34950
Definition: Exprtk.hpp:35013
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1)
Definition: Exprtk.hpp:35066
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:35017
vocov_t::type1 node_type
Definition: Exprtk.hpp:35014
vocov_t::sf3_type sf3_type
Definition: Exprtk.hpp:35015
Definition: Exprtk.hpp:36391
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:36399
node_type::T2 T2
Definition: Exprtk.hpp:36396
vocovoc_t::type0 node_type
Definition: Exprtk.hpp:36392
node_type::T0 T0
Definition: Exprtk.hpp:36394
node_type::T3 T3
Definition: Exprtk.hpp:36397
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:36621
node_type::T1 T1
Definition: Exprtk.hpp:36395
vocovoc_t::sf4_type sf4_type
Definition: Exprtk.hpp:36393
Definition: Exprtk.hpp:37384
node_type::T0 T0
Definition: Exprtk.hpp:37387
vocovoc_t::type1 node_type
Definition: Exprtk.hpp:37385
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:37392
node_type::T2 T2
Definition: Exprtk.hpp:37389
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:37430
node_type::T1 T1
Definition: Exprtk.hpp:37388
vocovoc_t::sf4_type sf4_type
Definition: Exprtk.hpp:37386
node_type::T3 T3
Definition: Exprtk.hpp:37390
Definition: Exprtk.hpp:37926
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:37934
node_type::T3 T3
Definition: Exprtk.hpp:37932
vocovoc_t::type2 node_type
Definition: Exprtk.hpp:37927
node_type::T1 T1
Definition: Exprtk.hpp:37930
node_type::T0 T0
Definition: Exprtk.hpp:37929
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:37972
node_type::T2 T2
Definition: Exprtk.hpp:37931
vocovoc_t::sf4_type sf4_type
Definition: Exprtk.hpp:37928
Definition: Exprtk.hpp:38429
node_type::T1 T1
Definition: Exprtk.hpp:38433
node_type::T3 T3
Definition: Exprtk.hpp:38435
vocovoc_t::sf4_type sf4_type
Definition: Exprtk.hpp:38431
node_type::T2 T2
Definition: Exprtk.hpp:38434
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:38437
node_type::T0 T0
Definition: Exprtk.hpp:38432
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:38476
vocovoc_t::type3 node_type
Definition: Exprtk.hpp:38430
Definition: Exprtk.hpp:38971
node_type::T1 T1
Definition: Exprtk.hpp:38975
vocovoc_t::sf4_type sf4_type
Definition: Exprtk.hpp:38973
vocovoc_t::type4 node_type
Definition: Exprtk.hpp:38972
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:39018
node_type::T2 T2
Definition: Exprtk.hpp:38976
node_type::T3 T3
Definition: Exprtk.hpp:38977
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:38979
node_type::T0 T0
Definition: Exprtk.hpp:38974
Definition: Exprtk.hpp:36019
node_type::T1 T1
Definition: Exprtk.hpp:36023
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:36027
node_type::T2 T2
Definition: Exprtk.hpp:36024
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:36094
node_type::T3 T3
Definition: Exprtk.hpp:36025
node_type::T0 T0
Definition: Exprtk.hpp:36022
vocovov_t::type0 node_type
Definition: Exprtk.hpp:36020
vocovov_t::sf4_type sf4_type
Definition: Exprtk.hpp:36021
Definition: Exprtk.hpp:37202
node_type::T0 T0
Definition: Exprtk.hpp:37205
node_type::T3 T3
Definition: Exprtk.hpp:37208
node_type::T2 T2
Definition: Exprtk.hpp:37207
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:37210
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:37248
vocovov_t::sf4_type sf4_type
Definition: Exprtk.hpp:37204
node_type::T1 T1
Definition: Exprtk.hpp:37206
vocovov_t::type1 node_type
Definition: Exprtk.hpp:37203
Definition: Exprtk.hpp:37744
vocovov_t::type2 node_type
Definition: Exprtk.hpp:37745
node_type::T1 T1
Definition: Exprtk.hpp:37748
vocovov_t::sf4_type sf4_type
Definition: Exprtk.hpp:37746
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:37752
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:37790
node_type::T0 T0
Definition: Exprtk.hpp:37747
node_type::T3 T3
Definition: Exprtk.hpp:37750
node_type::T2 T2
Definition: Exprtk.hpp:37749
Definition: Exprtk.hpp:38249
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:38295
node_type::T2 T2
Definition: Exprtk.hpp:38254
node_type::T0 T0
Definition: Exprtk.hpp:38252
node_type::T3 T3
Definition: Exprtk.hpp:38255
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:38257
vocovov_t::sf4_type sf4_type
Definition: Exprtk.hpp:38251
vocovov_t::type3 node_type
Definition: Exprtk.hpp:38250
node_type::T1 T1
Definition: Exprtk.hpp:38253
Definition: Exprtk.hpp:38792
node_type::T1 T1
Definition: Exprtk.hpp:38796
vocovov_t::type4 node_type
Definition: Exprtk.hpp:38793
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:38800
node_type::T3 T3
Definition: Exprtk.hpp:38798
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:38837
node_type::T0 T0
Definition: Exprtk.hpp:38795
vocovov_t::sf4_type sf4_type
Definition: Exprtk.hpp:38794
node_type::T2 T2
Definition: Exprtk.hpp:38797
Definition: Exprtk.hpp:34345
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:34346
Definition: Exprtk.hpp:34817
vovoc_t::type0 node_type
Definition: Exprtk.hpp:34818
vovoc_t::sf3_type sf3_type
Definition: Exprtk.hpp:34819
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1)
Definition: Exprtk.hpp:34871
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:34821
Definition: Exprtk.hpp:34883
vovoc_t::type1 node_type
Definition: Exprtk.hpp:34884
vovoc_t::sf3_type sf3_type
Definition: Exprtk.hpp:34885
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1)
Definition: Exprtk.hpp:34936
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:34887
Definition: Exprtk.hpp:35930
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:35938
node_type::T0 T0
Definition: Exprtk.hpp:35933
vovocov_t::sf4_type sf4_type
Definition: Exprtk.hpp:35932
vovocov_t::type0 node_type
Definition: Exprtk.hpp:35931
node_type::T2 T2
Definition: Exprtk.hpp:35935
node_type::T1 T1
Definition: Exprtk.hpp:35934
node_type::T3 T3
Definition: Exprtk.hpp:35936
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:36005
Definition: Exprtk.hpp:37142
node_type::T0 T0
Definition: Exprtk.hpp:37145
node_type::T2 T2
Definition: Exprtk.hpp:37147
node_type::T1 T1
Definition: Exprtk.hpp:37146
node_type::T3 T3
Definition: Exprtk.hpp:37148
vovocov_t::sf4_type sf4_type
Definition: Exprtk.hpp:37144
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:37150
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:37188
vovocov_t::type1 node_type
Definition: Exprtk.hpp:37143
Definition: Exprtk.hpp:37684
node_type::T3 T3
Definition: Exprtk.hpp:37690
vovocov_t::sf4_type sf4_type
Definition: Exprtk.hpp:37686
node_type::T0 T0
Definition: Exprtk.hpp:37687
node_type::T2 T2
Definition: Exprtk.hpp:37689
node_type::T1 T1
Definition: Exprtk.hpp:37688
vovocov_t::type2 node_type
Definition: Exprtk.hpp:37685
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:37692
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:37730
Definition: Exprtk.hpp:38189
node_type::T1 T1
Definition: Exprtk.hpp:38193
node_type::T2 T2
Definition: Exprtk.hpp:38194
node_type::T0 T0
Definition: Exprtk.hpp:38192
vovocov_t::sf4_type sf4_type
Definition: Exprtk.hpp:38191
node_type::T3 T3
Definition: Exprtk.hpp:38195
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:38197
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:38235
vovocov_t::type3 node_type
Definition: Exprtk.hpp:38190
Definition: Exprtk.hpp:38732
vovocov_t::type4 node_type
Definition: Exprtk.hpp:38733
node_type::T3 T3
Definition: Exprtk.hpp:38738
node_type::T1 T1
Definition: Exprtk.hpp:38736
node_type::T0 T0
Definition: Exprtk.hpp:38735
node_type::T2 T2
Definition: Exprtk.hpp:38737
vovocov_t::sf4_type sf4_type
Definition: Exprtk.hpp:38734
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:38778
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:38740
Definition: Exprtk.hpp:34687
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1)
Definition: Exprtk.hpp:34740
vovov_t::sf3_type sf3_type
Definition: Exprtk.hpp:34689
vovov_t::type0 node_type
Definition: Exprtk.hpp:34688
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:34691
Definition: Exprtk.hpp:34752
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1)
Definition: Exprtk.hpp:34805
vovov_t::type1 node_type
Definition: Exprtk.hpp:34753
vovov_t::sf3_type sf3_type
Definition: Exprtk.hpp:34754
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:34756
Definition: Exprtk.hpp:35841
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:35849
vovovoc_t::sf4_type sf4_type
Definition: Exprtk.hpp:35843
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:35916
vovovoc_t::type0 node_type
Definition: Exprtk.hpp:35842
node_type::T2 T2
Definition: Exprtk.hpp:35846
node_type::T3 T3
Definition: Exprtk.hpp:35847
node_type::T0 T0
Definition: Exprtk.hpp:35844
node_type::T1 T1
Definition: Exprtk.hpp:35845
Definition: Exprtk.hpp:37082
node_type::T0 T0
Definition: Exprtk.hpp:37085
node_type::T3 T3
Definition: Exprtk.hpp:37088
vovovoc_t::type1 node_type
Definition: Exprtk.hpp:37083
vovovoc_t::sf4_type sf4_type
Definition: Exprtk.hpp:37084
node_type::T1 T1
Definition: Exprtk.hpp:37086
node_type::T2 T2
Definition: Exprtk.hpp:37087
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:37090
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:37128
Definition: Exprtk.hpp:37624
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:37632
node_type::T2 T2
Definition: Exprtk.hpp:37629
node_type::T3 T3
Definition: Exprtk.hpp:37630
vovovoc_t::type2 node_type
Definition: Exprtk.hpp:37625
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:37670
node_type::T1 T1
Definition: Exprtk.hpp:37628
vovovoc_t::sf4_type sf4_type
Definition: Exprtk.hpp:37626
node_type::T0 T0
Definition: Exprtk.hpp:37627
Definition: Exprtk.hpp:38128
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:38175
vovovoc_t::type3 node_type
Definition: Exprtk.hpp:38129
vovovoc_t::sf4_type sf4_type
Definition: Exprtk.hpp:38130
node_type::T1 T1
Definition: Exprtk.hpp:38132
node_type::T2 T2
Definition: Exprtk.hpp:38133
node_type::T0 T0
Definition: Exprtk.hpp:38131
node_type::T3 T3
Definition: Exprtk.hpp:38134
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:38136
Definition: Exprtk.hpp:38671
vovovoc_t::type4 node_type
Definition: Exprtk.hpp:38672
node_type::T3 T3
Definition: Exprtk.hpp:38677
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:38679
node_type::T0 T0
Definition: Exprtk.hpp:38674
node_type::T1 T1
Definition: Exprtk.hpp:38675
vovovoc_t::sf4_type sf4_type
Definition: Exprtk.hpp:38673
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:38718
node_type::T2 T2
Definition: Exprtk.hpp:38676
Definition: Exprtk.hpp:35719
node_type::T1 T1
Definition: Exprtk.hpp:35723
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:35827
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:35727
node_type::T2 T2
Definition: Exprtk.hpp:35724
node_type::T0 T0
Definition: Exprtk.hpp:35722
vovovov_t::type0 node_type
Definition: Exprtk.hpp:35720
node_type::T3 T3
Definition: Exprtk.hpp:35725
vovovov_t::sf4_type sf4_type
Definition: Exprtk.hpp:35721
Definition: Exprtk.hpp:37022
node_type::T1 T1
Definition: Exprtk.hpp:37026
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:37068
node_type::T2 T2
Definition: Exprtk.hpp:37027
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:37030
vovovov_t::type1 node_type
Definition: Exprtk.hpp:37023
node_type::T3 T3
Definition: Exprtk.hpp:37028
vovovov_t::sf4_type sf4_type
Definition: Exprtk.hpp:37024
node_type::T0 T0
Definition: Exprtk.hpp:37025
Definition: Exprtk.hpp:37564
vovovov_t::sf4_type sf4_type
Definition: Exprtk.hpp:37566
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:37610
node_type::T2 T2
Definition: Exprtk.hpp:37569
vovovov_t::type2 node_type
Definition: Exprtk.hpp:37565
node_type::T1 T1
Definition: Exprtk.hpp:37568
node_type::T0 T0
Definition: Exprtk.hpp:37567
node_type::T3 T3
Definition: Exprtk.hpp:37570
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:37572
Definition: Exprtk.hpp:38068
vovovov_t::type3 node_type
Definition: Exprtk.hpp:38069
node_type::T0 T0
Definition: Exprtk.hpp:38071
vovovov_t::sf4_type sf4_type
Definition: Exprtk.hpp:38070
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:38076
node_type::T1 T1
Definition: Exprtk.hpp:38072
node_type::T3 T3
Definition: Exprtk.hpp:38074
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:38114
node_type::T2 T2
Definition: Exprtk.hpp:38073
Definition: Exprtk.hpp:38611
vovovov_t::sf4_type sf4_type
Definition: Exprtk.hpp:38613
static std::string id(expression_generator< Type > &expr_gen, const details::operator_type o0, const details::operator_type o1, const details::operator_type o2)
Definition: Exprtk.hpp:38657
node_type::T1 T1
Definition: Exprtk.hpp:38615
vovovov_t::type4 node_type
Definition: Exprtk.hpp:38612
node_type::T3 T3
Definition: Exprtk.hpp:38617
static expression_node_ptr process(expression_generator< Type > &expr_gen, const details::operator_type &operation, expression_node_ptr(&branch)[2])
Definition: Exprtk.hpp:38619
node_type::T0 T0
Definition: Exprtk.hpp:38614
node_type::T2 T2
Definition: Exprtk.hpp:38616
Definition: Exprtk.hpp:21807
static bool is_less(const T_ &v, const T_ &begin)
Definition: Exprtk.hpp:21814
static bool is_within(const T_ &v, const T_ &begin, const T_ &end)
Definition: Exprtk.hpp:21808
static bool end_inclusive()
Definition: Exprtk.hpp:21824
static bool is_greater(const T_ &v, const T_ &end)
Definition: Exprtk.hpp:21819
Definition: Exprtk.hpp:27913
static expression_node_ptr process(parser< Type > &p, const details::operator_type opt_type, const std::string &sf_name)
Definition: Exprtk.hpp:27914
Definition: Exprtk.hpp:22529
bool parsing_break_stmt
Definition: Exprtk.hpp:22562
void activate_side_effect(const std::string &)
Definition: Exprtk.hpp:22548
void reset()
Definition: Exprtk.hpp:22536
parser_state()
Definition: Exprtk.hpp:22530
bool return_stmt_present
Definition: Exprtk.hpp:22563
std::size_t parsing_loop_stmt_count
Definition: Exprtk.hpp:22568
std::size_t stack_depth
Definition: Exprtk.hpp:22567
bool type_check_enabled
Definition: Exprtk.hpp:22565
bool parsing_return_stmt
Definition: Exprtk.hpp:22561
bool side_effect_present
Definition: Exprtk.hpp:22564
std::size_t scope_depth
Definition: Exprtk.hpp:22566
Definition: Exprtk.hpp:21463
void clear()
Definition: Exprtk.hpp:21516
stringvar_node_ptr str_node
Definition: Exprtk.hpp:21546
variable_node_t * variable_node_ptr
Definition: Exprtk.hpp:21474
details::vector_holder< T > vector_holder_t
Definition: Exprtk.hpp:21473
stringvar_node_t * stringvar_node_ptr
Definition: Exprtk.hpp:21478
std::size_t size
Definition: Exprtk.hpp:21535
vector_holder_ptr vec_node
Definition: Exprtk.hpp:21544
std::size_t depth
Definition: Exprtk.hpp:21537
expression_node_ptr var_node
Definition: Exprtk.hpp:21543
bool active
Definition: Exprtk.hpp:21541
element_type
Definition: Exprtk.hpp:21465
@ e_none
Definition: Exprtk.hpp:21466
@ e_vecelem
Definition: Exprtk.hpp:21469
@ e_variable
Definition: Exprtk.hpp:21467
@ e_vector
Definition: Exprtk.hpp:21468
std::size_t ip_index
Definition: Exprtk.hpp:21539
scope_element()
Definition: Exprtk.hpp:21481
expression_node_t * expression_node_ptr
Definition: Exprtk.hpp:21476
std::string name
Definition: Exprtk.hpp:21534
element_type type
Definition: Exprtk.hpp:21540
vector_holder_t * vector_holder_ptr
Definition: Exprtk.hpp:21475
std::size_t ref_count
Definition: Exprtk.hpp:21538
std::size_t index
Definition: Exprtk.hpp:21536
void * data
Definition: Exprtk.hpp:21542
Definition: Exprtk.hpp:24669
~scoped_bool_negator()
Definition: Exprtk.hpp:24674
scoped_bool_negator(bool &bb)
Definition: Exprtk.hpp:24670
bool & b
Definition: Exprtk.hpp:24677
Definition: Exprtk.hpp:24681
bool & b
Definition: Exprtk.hpp:24692
scoped_bool_or_restorer(bool &bb)
Definition: Exprtk.hpp:24682
bool original_value_
Definition: Exprtk.hpp:24693
~scoped_bool_or_restorer()
Definition: Exprtk.hpp:24687
Definition: Exprtk.hpp:24564
scoped_delete< Type, N > & operator=(const scoped_delete< Type, N > &) exprtk_delete
Type * ptr_t
Definition: Exprtk.hpp:24565
scoped_delete(parser< T > &pr, ptr_t(&p)[N])
Definition: Exprtk.hpp:24573
ptr_t * p_
Definition: Exprtk.hpp:24592
parser< T > & parser_
Definition: Exprtk.hpp:24591
bool delete_ptr
Definition: Exprtk.hpp:24590
~scoped_delete()
Definition: Exprtk.hpp:24579
scoped_delete(parser< T > &pr, ptr_t &p)
Definition: Exprtk.hpp:24567
scoped_delete(const scoped_delete< Type, N > &) exprtk_delete
Definition: Exprtk.hpp:24602
parser< T > & parser_
Definition: Exprtk.hpp:24625
std::deque< ptr_t > & deq_
Definition: Exprtk.hpp:24626
scoped_deq_delete(parser< T > &pr, std::deque< ptr_t > &deq)
Definition: Exprtk.hpp:24605
bool delete_ptr
Definition: Exprtk.hpp:24624
Type * ptr_t
Definition: Exprtk.hpp:24603
~scoped_deq_delete()
Definition: Exprtk.hpp:24611
scoped_deq_delete< Type > & operator=(const scoped_deq_delete< Type > &) exprtk_delete
scoped_deq_delete(const scoped_deq_delete< Type > &) exprtk_delete
Definition: Exprtk.hpp:24537
scoped_expression_delete(parser< T > &pr, expression_node_ptr &expression)
Definition: Exprtk.hpp:24538
scoped_expression_delete(const scoped_expression_delete &) exprtk_delete
scoped_expression_delete & operator=(const scoped_expression_delete &) exprtk_delete
bool delete_ptr
Definition: Exprtk.hpp:24552
~scoped_expression_delete()
Definition: Exprtk.hpp:24544
parser< T > & parser_
Definition: Exprtk.hpp:24553
expression_node_ptr & expression_
Definition: Exprtk.hpp:24554
Definition: Exprtk.hpp:24697
~scoped_inc_dec()
Definition: Exprtk.hpp:24702
scoped_inc_dec(std::size_t &v)
Definition: Exprtk.hpp:24698
std::size_t & v_
Definition: Exprtk.hpp:24708
Definition: Exprtk.hpp:24636
scoped_vec_delete(parser< T > &pr, std::vector< ptr_t > &vec)
Definition: Exprtk.hpp:24639
parser< T > & parser_
Definition: Exprtk.hpp:24659
std::vector< ptr_t > & vec_
Definition: Exprtk.hpp:24660
bool delete_ptr
Definition: Exprtk.hpp:24658
scoped_vec_delete< Type > & operator=(const scoped_vec_delete< Type > &) exprtk_delete
Type * ptr_t
Definition: Exprtk.hpp:24637
~scoped_vec_delete()
Definition: Exprtk.hpp:24645
scoped_vec_delete(const scoped_vec_delete< Type > &) exprtk_delete
Definition: Exprtk.hpp:24126
precedence_level right
Definition: Exprtk.hpp:24146
void reset()
Definition: Exprtk.hpp:24138
token_t token
Definition: Exprtk.hpp:24148
void set(const precedence_level &l, const precedence_level &r, const details::operator_type &o, const token_t tkn=token_t())
Definition: Exprtk.hpp:24127
precedence_level left
Definition: Exprtk.hpp:24145
details::operator_type operation
Definition: Exprtk.hpp:24147
Definition: Exprtk.hpp:22008
const symbol_table_t * symbol_table
Definition: Exprtk.hpp:22014
stringvar_ptr str_var
Definition: Exprtk.hpp:22015
string_context()
Definition: Exprtk.hpp:22009
Definition: Exprtk.hpp:21985
const symbol_table_t * symbol_table
Definition: Exprtk.hpp:21991
variable_context()
Definition: Exprtk.hpp:21986
variable_ptr variable
Definition: Exprtk.hpp:21992
Definition: Exprtk.hpp:21996
vector_holder_ptr vector_holder
Definition: Exprtk.hpp:22003
vector_context()
Definition: Exprtk.hpp:21997
const symbol_table_t * symbol_table
Definition: Exprtk.hpp:22002
Definition: Exprtk.hpp:21971
stringvar_ptr get_stringvar(const std::string &string_name) const
Definition: Exprtk.hpp:22150
std::string get_vector_name(const vector_holder_ptr &ptr) const
Definition: Exprtk.hpp:22495
symbol_table_t::function_ptr function_ptr
Definition: Exprtk.hpp:21976
symbol_table_t::variable_ptr variable_ptr
Definition: Exprtk.hpp:21975
function_ptr get_function(const std::string &function_name) const
Definition: Exprtk.hpp:22172
bool is_stringvar(const std::string &stringvar_name) const
Definition: Exprtk.hpp:22403
symbol_table_list_t symtab_list_
Definition: Exprtk.hpp:21972
std::string get_stringvar_name(const expression_node_ptr &ptr) const
Definition: Exprtk.hpp:22501
bool valid() const
Definition: Exprtk.hpp:22029
generic_function_ptr get_generic_function(const std::string &function_name) const
Definition: Exprtk.hpp:22214
vector_holder_ptr get_vector(const std::string &vector_name) const
Definition: Exprtk.hpp:22302
symbol_table_t::vararg_function_ptr vararg_function_ptr
Definition: Exprtk.hpp:21981
symbol_table_t::vector_holder_ptr vector_holder_ptr
Definition: Exprtk.hpp:21980
bool is_conststr_stringvar(const std::string &symbol_name) const
Definition: Exprtk.hpp:22419
symbol_table_t::local_data_t local_data_t
Definition: Exprtk.hpp:21974
bool is_constant_node(const std::string &symbol_name) const
Definition: Exprtk.hpp:22327
variable_context get_variable_context(const std::string &variable_name) const
Definition: Exprtk.hpp:22059
variable_ptr get_variable(const T &var_ref) const
Definition: Exprtk.hpp:22105
string_context get_string_context(const std::string &string_name) const
Definition: Exprtk.hpp:22124
bool symbol_exists(const std::string &symbol) const
Definition: Exprtk.hpp:22368
bool is_constant_string(const std::string &symbol_name) const
Definition: Exprtk.hpp:22349
bool is_variable(const std::string &variable_name) const
Definition: Exprtk.hpp:22386
symbol_table_t::stringvar_ptr stringvar_ptr
Definition: Exprtk.hpp:21978
vector_context get_vector_context(const std::string &vector_name) const
Definition: Exprtk.hpp:22277
vararg_function_ptr get_vararg_function(const std::string &vararg_function_name) const
Definition: Exprtk.hpp:22193
symbol_table_t & get_symbol_table(const std::size_t &index=0)
Definition: Exprtk.hpp:22522
bool is_vararg_function(const std::string &vararg_function_name) const
Definition: Exprtk.hpp:22458
bool valid_function_name(const std::string &symbol) const
Definition: Exprtk.hpp:22051
generic_function_ptr get_overload_function(const std::string &function_name) const
Definition: Exprtk.hpp:22256
bool is_vector(const std::string &vector_name) const
Definition: Exprtk.hpp:22474
bool empty() const
Definition: Exprtk.hpp:22019
const local_data_t & local_data(const std::size_t &index=0) const
Definition: Exprtk.hpp:22517
std::string get_variable_name(const expression_node_ptr &ptr) const
Definition: Exprtk.hpp:22490
void clear()
Definition: Exprtk.hpp:22024
generic_function_ptr get_string_function(const std::string &function_name) const
Definition: Exprtk.hpp:22235
bool valid_symbol(const std::string &symbol) const
Definition: Exprtk.hpp:22043
symbol_table_t::generic_function_ptr generic_function_ptr
Definition: Exprtk.hpp:21982
variable_ptr get_variable(const std::string &variable_name) const
Definition: Exprtk.hpp:22084
bool is_function(const std::string &function_name) const
Definition: Exprtk.hpp:22442
std::string get_conststr_stringvar_name(const expression_node_ptr &ptr) const
Definition: Exprtk.hpp:22506
local_data_t & local_data(const std::size_t &index=0)
Definition: Exprtk.hpp:22512
Definition: Exprtk.hpp:27350
std::string param_seq
Definition: Exprtk.hpp:27352
return_type_t return_type
Definition: Exprtk.hpp:27351
Definition: Exprtk.hpp:22574
usr_mode
Definition: Exprtk.hpp:22584
virtual ~unknown_symbol_resolver()
Definition: Exprtk.hpp:22595
unknown_symbol_resolver(const usr_mode m=e_usrmode_default)
Definition: Exprtk.hpp:22591
virtual bool process(const std::string &, symbol_table_t &, std::string &)
Definition: Exprtk.hpp:22613
virtual bool process(const std::string &, usr_symbol_type &st, T &default_value, std::string &error_message)
Definition: Exprtk.hpp:22598
usr_symbol_type
Definition: Exprtk.hpp:22577
usr_mode mode
Definition: Exprtk.hpp:22589
Definition: Exprtk.hpp:21211
std::string error_line
Definition: Exprtk.hpp:21222
std::size_t line_no
Definition: Exprtk.hpp:21223
std::size_t column_no
Definition: Exprtk.hpp:21224
std::string diagnostic
Definition: Exprtk.hpp:21220
error_mode mode
Definition: Exprtk.hpp:21219
std::string src_location
Definition: Exprtk.hpp:21221
type()
Definition: Exprtk.hpp:21212
lexer::token token
Definition: Exprtk.hpp:21218
static T evaluate(const Type x, const Type c10, const Type c9, const Type c8, const Type c7, const Type c6, const Type c5, const Type c4, const Type c3, const Type c2, const Type c1, const Type c0)
Definition: Exprtk.hpp:40794
static T evaluate(const Type x, const Type c11, const Type c10, const Type c9, const Type c8, const Type c7, const Type c6, const Type c5, const Type c4, const Type c3, const Type c2, const Type c1, const Type c0)
Definition: Exprtk.hpp:40781
static T evaluate(const Type x, const Type c12, const Type c11, const Type c10, const Type c9, const Type c8, const Type c7, const Type c6, const Type c5, const Type c4, const Type c3, const Type c2, const Type c1, const Type c0)
Definition: Exprtk.hpp:40768
static T evaluate(const Type x, const Type c1, const Type c0)
Definition: Exprtk.hpp:40897
static T evaluate(const Type x, const Type c2, const Type c1, const Type c0)
Definition: Exprtk.hpp:40887
static T evaluate(const Type x, const Type c3, const Type c2, const Type c1, const Type c0)
Definition: Exprtk.hpp:40877
static T evaluate(const Type x, const Type c4, const Type c3, const Type c2, const Type c1, const Type c0)
Definition: Exprtk.hpp:40867
static T evaluate(const Type x, const Type c5, const Type c4, const Type c3, const Type c2, const Type c1, const Type c0)
Definition: Exprtk.hpp:40855
static T evaluate(const Type x, const Type c6, const Type c5, const Type c4, const Type c3, const Type c2, const Type c1, const Type c0)
Definition: Exprtk.hpp:40843
static T evaluate(const Type x, const Type c7, const Type c6, const Type c5, const Type c4, const Type c3, const Type c2, const Type c1, const Type c0)
Definition: Exprtk.hpp:40831
static T evaluate(const Type x, const Type c8, const Type c7, const Type c6, const Type c5, const Type c4, const Type c3, const Type c2, const Type c1, const Type c0)
Definition: Exprtk.hpp:40819
static T evaluate(const Type x, const Type c9, const Type c8, const Type c7, const Type c6, const Type c5, const Type c4, const Type c3, const Type c2, const Type c1, const Type c0)
Definition: Exprtk.hpp:40807
Definition: Exprtk.hpp:40763
Definition: Exprtk.hpp:42045
generic_type::string_view string_t
Definition: Exprtk.hpp:42050
igeneric_function< T >::generic_type generic_type
Definition: Exprtk.hpp:42046
static void print(const string_t &s)
Definition: Exprtk.hpp:42091
igeneric_function< T >::parameter_list_t parameter_list_t
Definition: Exprtk.hpp:42047
static void print(const std::string &scalar_format, const scalar_t &s)
Definition: Exprtk.hpp:42075
generic_type::scalar_view scalar_t
Definition: Exprtk.hpp:42048
exprtk::details::numeric::details::number_type< T >::type num_type
Definition: Exprtk.hpp:42051
static void print(const std::string &scalar_format, const vector_t &v)
Definition: Exprtk.hpp:42080
static void process(const std::string &scalar_format, parameter_list_t parameters)
Definition: Exprtk.hpp:42053
generic_type::vector_view vector_t
Definition: Exprtk.hpp:42049
Definition: Exprtk.hpp:42101
igeneric_function< T >::parameter_list_t parameter_list_t
Definition: Exprtk.hpp:42102
std::string scalar_format_
Definition: Exprtk.hpp:42118
println(const std::string &scalar_format="%10.5f")
Definition: Exprtk.hpp:42128
print(const std::string &scalar_format="%10.5f")
Definition: Exprtk.hpp:42106
Definition: Exprtk.hpp:42192
void close(Ptr &p)
Definition: Exprtk.hpp:42258
bool getline(std::string &s)
Definition: Exprtk.hpp:42323
file_mode mode
Definition: Exprtk.hpp:42200
file_descriptor(const std::string &fname, const std::string &access)
Definition: Exprtk.hpp:42193
std::string file_name
Definition: Exprtk.hpp:42201
bool write(const View &view, const std::size_t amount, const std::size_t offset=0)
Definition: Exprtk.hpp:42286
bool close()
Definition: Exprtk.hpp:42266
void * stream_ptr
Definition: Exprtk.hpp:42199
bool eof() const
Definition: Exprtk.hpp:42333
bool open()
Definition: Exprtk.hpp:42203
bool read(View &view, const std::size_t amount, const std::size_t offset=0)
Definition: Exprtk.hpp:42305
file_mode get_file_mode(const std::string &access) const
Definition: Exprtk.hpp:42344
Definition: Exprtk.hpp:42637
read< T > r
Definition: Exprtk.hpp:42641
bool register_package(exprtk::symbol_table< T > &symtab)
Definition: Exprtk.hpp:42645
close< T > c
Definition: Exprtk.hpp:42639
eof< T > e
Definition: Exprtk.hpp:42643
write< T > w
Definition: Exprtk.hpp:42640
getline< T > g
Definition: Exprtk.hpp:42642
open< T > o
Definition: Exprtk.hpp:42638
Definition: Exprtk.hpp:42146
bool register_package(exprtk::symbol_table< T > &symtab)
Definition: Exprtk.hpp:42150
println< T > pl
Definition: Exprtk.hpp:42148
print< T > p
Definition: Exprtk.hpp:42147
Definition: Exprtk.hpp:42696
igfun_t::generic_type generic_type
Definition: Exprtk.hpp:42699
exprtk::igeneric_function< T > igfun_t
Definition: Exprtk.hpp:42697
generic_type::vector_view vector_t
Definition: Exprtk.hpp:42701
static bool process(parameter_list_t ¶meters, std::size_t &r0, std::size_t &r1, const std::size_t &r0_prmidx, const std::size_t &r1_prmidx, const std::size_t vec_idx=0)
Definition: Exprtk.hpp:42703
generic_type::scalar_view scalar_t
Definition: Exprtk.hpp:42700
igfun_t::parameter_list_t parameter_list_t
Definition: Exprtk.hpp:42698
Definition: Exprtk.hpp:44134
axpby< T > b1_axpby
Definition: Exprtk.hpp:44151
dotk< T > dtk
Definition: Exprtk.hpp:44159
threshold_below< T > tb
Definition: Exprtk.hpp:44161
nthelement< T > ne
Definition: Exprtk.hpp:44146
bool register_package(exprtk::symbol_table< T > &symtab)
Definition: Exprtk.hpp:44163
iota< T > ia
Definition: Exprtk.hpp:44148
dot< T > dt
Definition: Exprtk.hpp:44158
sort< T > st
Definition: Exprtk.hpp:44145
any_true< T > nt
Definition: Exprtk.hpp:44137
axpy< T > b1_axpy
Definition: Exprtk.hpp:44150
copy< T > cp
Definition: Exprtk.hpp:44140
count< T > c
Definition: Exprtk.hpp:44139
axpbyz< T > b1_axpbyz
Definition: Exprtk.hpp:44153
any_false< T > nf
Definition: Exprtk.hpp:44138
all_false< T > af
Definition: Exprtk.hpp:44136
sumk< T > sk
Definition: Exprtk.hpp:44149
all_true< T > at
Definition: Exprtk.hpp:44135
axpbsy< T > b1_axpbsy
Definition: Exprtk.hpp:44154
rol< T > rl
Definition: Exprtk.hpp:44141
ror< T > rr
Definition: Exprtk.hpp:44142
assign< T > an
Definition: Exprtk.hpp:44147
axpbz< T > b1_axpbz
Definition: Exprtk.hpp:44156
threshold_above< T > ta
Definition: Exprtk.hpp:44160
diff< T > df
Definition: Exprtk.hpp:44157
axpyz< T > b1_axpyz
Definition: Exprtk.hpp:44152
shift_right< T > sr
Definition: Exprtk.hpp:44144
shift_left< T > sl
Definition: Exprtk.hpp:44143
axpbsyz< T > b1_axpbsyz
Definition: Exprtk.hpp:44155
Definition: Exprtk.hpp:19675
type_store< vector_holder_t, vector_holder_t > vector_store
Definition: Exprtk.hpp:19682
static st_data * create()
Definition: Exprtk.hpp:19713
type_store< function_t, function_t > function_store
Definition: Exprtk.hpp:19677
std::list< std::string > local_stringvar_list_
Definition: Exprtk.hpp:19725
std::set< std::string > reserved_symbol_table_
Definition: Exprtk.hpp:19726
bool is_reserved_symbol(const std::string &symbol) const
Definition: Exprtk.hpp:19708
std::list< T > local_symbol_list_
Definition: Exprtk.hpp:19724
static void destroy(st_data *&sd)
Definition: Exprtk.hpp:19718
type_store< vararg_function_t, vararg_function_t > vararg_function_store
Definition: Exprtk.hpp:19678
type_store< generic_function_t, generic_function_t > string_function_store
Definition: Exprtk.hpp:19680
std::vector< ifunction< T > * > free_function_list_
Definition: Exprtk.hpp:19727
~st_data()
Definition: Exprtk.hpp:19700
type_store< generic_function_t, generic_function_t > overload_function_store
Definition: Exprtk.hpp:19681
type_store< generic_function_t, generic_function_t > generic_function_store
Definition: Exprtk.hpp:19679
type_store< stringvar_t, std::string > stringvar_store
Definition: Exprtk.hpp:19684
type_store< variable_t, T > variable_store
Definition: Exprtk.hpp:19676
st_data()
Definition: Exprtk.hpp:19687
Definition: Exprtk.hpp:19673
~control_block()
Definition: Exprtk.hpp:19742
control_block()
Definition: Exprtk.hpp:19730
std::size_t ref_count
Definition: Exprtk.hpp:19780
symtab_mutability_type mutability_
Definition: Exprtk.hpp:19782
control_block(st_data *data)
Definition: Exprtk.hpp:19736
static void destroy(control_block *&cntrl_blck, SymTab *sym_tab)
Definition: Exprtk.hpp:19756
st_data * data_
Definition: Exprtk.hpp:19781
void set_mutability(const symtab_mutability_type mutability)
Definition: Exprtk.hpp:19775
static control_block * create()
Definition: Exprtk.hpp:19750
Definition: Exprtk.hpp:19096
freefunc10(ff10_functor ff)
Definition: Exprtk.hpp:19202
ff02_functor f
Definition: Exprtk.hpp:19122
freefunc04(ff04_functor ff)
Definition: Exprtk.hpp:19139
ff12_functor f
Definition: Exprtk.hpp:19229
freefunc02(ff02_functor ff)
Definition: Exprtk.hpp:19119
freefunc11(ff11_functor ff)
Definition: Exprtk.hpp:19213
ff13_functor f
Definition: Exprtk.hpp:19241
freefunc12(ff12_functor ff)
Definition: Exprtk.hpp:19224
freefunc13(ff13_functor ff)
Definition: Exprtk.hpp:19236
freefunc15(ff15_functor ff)
Definition: Exprtk.hpp:19260
ff15_functor f
Definition: Exprtk.hpp:19265
ff01_functor f
Definition: Exprtk.hpp:19112
ff04_functor f
Definition: Exprtk.hpp:19142
freefunc08(ff08_functor ff)
Definition: Exprtk.hpp:19180
freefunc07(ff07_functor ff)
Definition: Exprtk.hpp:19169
freefunc14(ff14_functor ff)
Definition: Exprtk.hpp:19248
ff03_functor f
Definition: Exprtk.hpp:19132
freefunc09(ff09_functor ff)
Definition: Exprtk.hpp:19191
freefunc03(ff03_functor ff)
Definition: Exprtk.hpp:19129
ff09_functor f
Definition: Exprtk.hpp:19195
ff11_functor f
Definition: Exprtk.hpp:19217
ff07_functor f
Definition: Exprtk.hpp:19173
ff14_functor f
Definition: Exprtk.hpp:19253
freefunc06(ff06_functor ff)
Definition: Exprtk.hpp:19159
freefunc00(ff00_functor ff)
Definition: Exprtk.hpp:19099
ff10_functor f
Definition: Exprtk.hpp:19206
ff08_functor f
Definition: Exprtk.hpp:19184
freefunc01(ff01_functor ff)
Definition: Exprtk.hpp:19109
ff06_functor f
Definition: Exprtk.hpp:19162
ff00_functor f
Definition: Exprtk.hpp:19102
Definition: Exprtk.hpp:19146
ff05_functor f
Definition: Exprtk.hpp:19152
freefunc05(ff05_functor ff)
Definition: Exprtk.hpp:19149
Definition: Exprtk.hpp:19298
exprtk_define_process(variable_node_t) exprtk_define_process(vector_t) exprtk_define_process(stringvar_node_t) template< typename DeleteType > static inline void process(std
Definition: Exprtk.hpp:19305
static bool test(const variable_node_t *p, const void *ptr)
Definition: Exprtk.hpp:19521
Definition: Exprtk.hpp:19511
static bool test(const PtrType, const void *)
Definition: Exprtk.hpp:19512
Definition: Exprtk.hpp:19390
static std::pair< bool, vector_t * > make(std::pair< T *, std::size_t > v, const bool is_const=false)
Definition: Exprtk.hpp:19391
Definition: Exprtk.hpp:19415
static std::pair< bool, vector_t * > make(std::deque< T, Allocator > &v, const bool is_const=false)
Definition: Exprtk.hpp:19417
Definition: Exprtk.hpp:19398
static std::pair< bool, vector_t * > make(std::vector< T, Allocator > &v, const bool is_const=false)
Definition: Exprtk.hpp:19400
Definition: Exprtk.hpp:19407
static std::pair< bool, vector_t * > make(exprtk::vector_view< T > &v, const bool is_const=false)
Definition: Exprtk.hpp:19408
Definition: Exprtk.hpp:19270
details::stringvar_node< T > stringvar_node_t
Definition: Exprtk.hpp:19278
std::size_t size
Definition: Exprtk.hpp:19291
bool remove(const std::string &symbol_name, const bool delete_node=true)
Definition: Exprtk.hpp:19547
type_map_t::iterator tm_itr_t
Definition: Exprtk.hpp:19285
igeneric_function< T > igeneric_function_t
Definition: Exprtk.hpp:19275
std::map< std::string, type_pair_t, details::ilesscompare > type_map_t
Definition: Exprtk.hpp:19284
type_t * type_ptr
Definition: Exprtk.hpp:19282
details::variable_node< T > variable_node_t
Definition: Exprtk.hpp:19272
std::size_t get_list(Sequence< std::string, Allocator > &vlist) const
Definition: Exprtk.hpp:19633
bool add_impl(const std::string &symbol_name, RType t, const bool is_const)
Definition: Exprtk.hpp:19365
type_map_t::const_iterator tm_const_itr_t
Definition: Exprtk.hpp:19286
type_store()
Definition: Exprtk.hpp:19293
type_map_t map
Definition: Exprtk.hpp:19290
type_ptr get(const std::string &symbol_name) const
Definition: Exprtk.hpp:19499
std::string entity_name(const PtrType &ptr) const
Definition: Exprtk.hpp:19329
RawType & type_ref(const std::string &symbol_name)
Definition: Exprtk.hpp:19567
std::pair< bool, type_ptr > type_pair_t
Definition: Exprtk.hpp:19283
bool add(const std::string &symbol_name, std::vector< T, Allocator > &v, const bool is_const=false)
Definition: Exprtk.hpp:19437
bool is_constant(const std::string &symbol_name) const
Definition: Exprtk.hpp:19349
bool add(const std::string &symbol_name, RawType &t_, const bool is_const=false)
Definition: Exprtk.hpp:19456
bool symbol_exists(const std::string &symbol_name) const
Definition: Exprtk.hpp:19318
bool add(const std::string &symbol_name, T(&v)[v_size], const bool is_const=false)
Definition: Exprtk.hpp:19424
ivararg_function< T > ivararg_function_t
Definition: Exprtk.hpp:19274
type_ptr get_from_varptr(const void *ptr) const
Definition: Exprtk.hpp:19528
bool add(const std::string &symbol_name, std::deque< T, Allocator > &v, const bool is_const=false)
Definition: Exprtk.hpp:19450
bool add(const std::string &symbol_name, exprtk::vector_view< T > &v, const bool is_const=false)
Definition: Exprtk.hpp:19443
ifunction< T > ifunction_t
Definition: Exprtk.hpp:19273
void clear(const bool delete_node=true)
Definition: Exprtk.hpp:19587
details::expression_node< T > * expression_ptr
Definition: Exprtk.hpp:19271
details::vector_holder< T > vector_t
Definition: Exprtk.hpp:19276
std::size_t get_list(Sequence< std::pair< std::string, RawType >, Allocator > &list) const
Definition: Exprtk.hpp:19611
bool add(const std::string &symbol_name, T *v, const std::size_t v_size, const bool is_const=false)
Definition: Exprtk.hpp:19430
Type type_t
Definition: Exprtk.hpp:19281
Definition: Exprtk.hpp:42003
symbol_table< T > symbol_table_t
Definition: Exprtk.hpp:42004
expression< T > expression_t
Definition: Exprtk.hpp:42005
function_compositor< T > compositor_t
Definition: Exprtk.hpp:42008
compositor_t::function function_t
Definition: Exprtk.hpp:42009
parser_error::type error_t
Definition: Exprtk.hpp:42007
parser< T > parser_t
Definition: Exprtk.hpp:42006
Definition: Exprtk.hpp:4737
bool to_uint(UIntType &u) const
Definition: Exprtk.hpp:4781
scalar_view(type_store_t &ts)
Definition: Exprtk.hpp:4741
type_store< T > type_store_t
Definition: Exprtk.hpp:4738
scalar_view(const type_store_t &ts)
Definition: Exprtk.hpp:4745
T & v_
Definition: Exprtk.hpp:4793
bool to_int(IntType &i) const
Definition: Exprtk.hpp:4770
T value_t
Definition: Exprtk.hpp:4739
Definition: Exprtk.hpp:4687
value_t & operator[](const std::size_t &i)
Definition: Exprtk.hpp:4706
type_view(type_store_t &ts)
Definition: Exprtk.hpp:4691
ViewType value_t
Definition: Exprtk.hpp:4689
value_t * begin()
Definition: Exprtk.hpp:4717
const value_t * begin() const
Definition: Exprtk.hpp:4716
value_t * end()
Definition: Exprtk.hpp:4724
type_view(const type_store_t &ts)
Definition: Exprtk.hpp:4696
std::size_t size() const
Definition: Exprtk.hpp:4701
value_t * data_
Definition: Exprtk.hpp:4730
const value_t & operator[](const std::size_t &i) const
Definition: Exprtk.hpp:4711
type_store_t & ts_
Definition: Exprtk.hpp:4729
const value_t * end() const
Definition: Exprtk.hpp:4719
type_store< T > type_store_t
Definition: Exprtk.hpp:4688
Definition: Exprtk.hpp:4606
type_view< T > vector_view
Definition: Exprtk.hpp:4733
store_type
Definition: Exprtk.hpp:4608
@ e_vector
Definition: Exprtk.hpp:4611
@ e_string
Definition: Exprtk.hpp:4612
@ e_scalar
Definition: Exprtk.hpp:4610
@ e_unknown
Definition: Exprtk.hpp:4609
type_store()
Definition: Exprtk.hpp:4615
std::size_t size
Definition: Exprtk.hpp:4627
void * data
Definition: Exprtk.hpp:4623
T * vec_data
Definition: Exprtk.hpp:4624
type_view< char > string_view
Definition: Exprtk.hpp:4734
store_type type
Definition: Exprtk.hpp:4628
Definition: Exprtk.hpp:2137
std::size_t type_size
Definition: Exprtk.hpp:2141
void * access_ptr
Definition: Exprtk.hpp:2140
void * base_ptr
Definition: Exprtk.hpp:2138
void * end_ptr
Definition: Exprtk.hpp:2139
Definition: Exprtk.hpp:2135
virtual bool handle_runtime_violation(violation_context &)
Definition: Exprtk.hpp:2147
virtual ~vector_access_runtime_check()
Definition: Exprtk.hpp:2144