C++ Mathematical Expression Library (ExprTk) https://www.partow.net/programming/exprtk/index.html
This commit is contained in:
parent
5694e5d915
commit
6760336fb1
22
exprtk.hpp
22
exprtk.hpp
|
@ -2427,11 +2427,25 @@ namespace exprtk
|
|||
{
|
||||
const char* initial_itr = s_itr_;
|
||||
|
||||
while (
|
||||
(!is_end(s_itr_)) &&
|
||||
(details::is_letter_or_digit(*s_itr_) || ((*s_itr_) == '_'))
|
||||
)
|
||||
while (!is_end(s_itr_))
|
||||
{
|
||||
if (!details::is_letter_or_digit(*s_itr_) && ('_' != (*s_itr_)))
|
||||
{
|
||||
if ('.' != (*s_itr_))
|
||||
break;
|
||||
/*
|
||||
Permit symbols that contain a 'dot'
|
||||
Allowed : abc.xyz, a123.xyz, abc.123, abc_.xyz a123_.xyz abc._123
|
||||
Disallowed: abc.<white-space>, abc.<eof>
|
||||
*/
|
||||
if (
|
||||
!is_end(s_itr_ + 1) &&
|
||||
details::is_letter_or_digit(*s_itr_ + 1) &&
|
||||
('_' != (*s_itr_ + 1))
|
||||
)
|
||||
break;
|
||||
}
|
||||
|
||||
++s_itr_;
|
||||
}
|
||||
|
||||
|
|
|
@ -2769,9 +2769,9 @@ into account when using ExprTk:
|
|||
function names are case-insensitive.
|
||||
|
||||
(07) Variable, vector, string variable and function names must begin
|
||||
with a letter (A-Z or a-z), then can be comprised of any
|
||||
combination of letters, digits and underscores. (eg: x, var1 or
|
||||
power_func99)
|
||||
with a letter (A-Z or a-z), then can be comprised of any
|
||||
combination of letters, digits, underscores and dots. (eg: x,
|
||||
var1 or power_func99, person.age, item.size.0)
|
||||
|
||||
(08) Expression lengths and sub-expression lists are limited only by
|
||||
storage capacity.
|
||||
|
|
Loading…
Reference in New Issue